Browse Source

formatting readme

master
poikilos 9 years ago
committed by Jacob Gustafson
parent
commit
fe39f2d694
  1. 11
      README.md

11
README.md

@ -19,6 +19,7 @@ screen -t chunkymapregen python $HOME/chunkymap/generator.py
#Then if you are using screen and want to leave the output without terminating the process press Ctrl a d #Then if you are using screen and want to leave the output without terminating the process press Ctrl a d
# ( to run only once, run: python generator.py --no-loop true ) # ( to run only once, run: python generator.py --no-loop true )
``` ```
* Save jpg or png named as player's index to the players folder of the world to change player's icon on map (index is a number assigned for use with ajax when $show_player_names_enable is false). The index can be found in the player's yml file generated by generator.py. * Save jpg or png named as player's index to the players folder of the world to change player's icon on map (index is a number assigned for use with ajax when $show_player_names_enable is false). The index can be found in the player's yml file generated by generator.py.
* Other programs (or echo command) can send signals to generator.py via signals.txt in same folder (which will be deleted after read, so must be created by same user/group) * Other programs (or echo command) can send signals to generator.py via signals.txt in same folder (which will be deleted after read, so must be created by same user/group)
* to maintain stability of your text editor, save the file, close it, then move/copy it to the directory (or save it as something else then rename it to signals.txt). * to maintain stability of your text editor, save the file, close it, then move/copy it to the directory (or save it as something else then rename it to signals.txt).
@ -29,12 +30,14 @@ echo "refresh_map_enable:False" > $HOME/chunkymap/signals.txt
sleep 15s sleep 15s
echo "loop_enable:False" > $HOME/chunkymap/signals.txt echo "loop_enable:False" > $HOME/chunkymap/signals.txt
``` ```
* In Windows(R) command prompt do something like: * In Windows(R) command prompt do something like:
```perl ```perl
REM cd to the minetest-chunkymap or minetest-chunkymap-master folder you unzipped REM cd to the minetest-chunkymap or minetest-chunkymap-master folder you unzipped
echo refresh_map_enable:False > signals.txt echo refresh_map_enable:False > signals.txt
echo loop_enable:False > signals.txt echo loop_enable:False > signals.txt
``` ```
* list of signals: * list of signals:
```YAML ```YAML
loop_enable:True loop_enable:True
@ -55,6 +58,7 @@ refresh_players_seconds:1
``` ```
## Changes ## Changes
* (2016-03-22) Detect exceptions in mintestmapper (such as database locked) and do NOT mark the chunk as is_empty * (2016-03-22) Detect exceptions in mintestmapper (such as database locked) and do NOT mark the chunk as is_empty
* optionally hide player location * optionally hide player location
@ -78,6 +82,7 @@ To avoid this problem, instead derive the paths from the parent paths using your
world_path = minetestinfo.get_var("primary_world_path") world_path = minetestinfo.get_var("primary_world_path")
world_name = os.path.basename(world_path) world_name = os.path.basename(world_path)
``` ```
* Keep in mind that gameid (in game.conf in a subgame folder, and world.mt in a world folder) is NOT case-sensitive: for example, minetest_game has the gameid 'Minetest' (first letter capitalized) but the worlds generated by Minetest client have the gameid 'minetest' (lowercase) in their world.mt * Keep in mind that gameid (in game.conf in a subgame folder, and world.mt in a world folder) is NOT case-sensitive: for example, minetest_game has the gameid 'Minetest' (first letter capitalized) but the worlds generated by Minetest client have the gameid 'minetest' (lowercase) in their world.mt
Yet somehow for everything else, gameid in world.mt is the name of the game FOLDER (NOT the name variable in the folder's game.conf) Yet somehow for everything else, gameid in world.mt is the name of the game FOLDER (NOT the name variable in the folder's game.conf)
* the map update function is only able to detect new chunks, and only checks edge chunks if player is present in one * the map update function is only able to detect new chunks, and only checks edge chunks if player is present in one
@ -89,6 +94,7 @@ user_minetest_path
world_name world_name
world_path world_path
``` ```
* Installing as cron job is OPTIONAL (and NOT recommended): * Installing as cron job is OPTIONAL (and NOT recommended):
(schedules update script every minute that runs the py file unless the py file is not complete [may take longer than 1 minute so (schedules update script every minute that runs the py file unless the py file is not complete [may take longer than 1 minute so
requires GNU flock]) requires GNU flock])
@ -137,6 +143,7 @@ sudo python chunkymap/singleimage.py
#then start generator which will update player entries on your website (can be made anonymous--see viewchunkymap.php): #then start generator which will update player entries on your website (can be made anonymous--see viewchunkymap.php):
sudo python chunkymap/generator.py sudo python chunkymap/generator.py
``` ```
OPTION 2: IF you are using Ubuntu go to a terminal, cd to this directory, OPTION 2: IF you are using Ubuntu go to a terminal, cd to this directory,
then switch user to the one that will run minetestserver then switch user to the one that will run minetestserver
(since install-chunkymap-on-ubuntu.sh DOES replace "/home/owner" with current user's home [replace-with-current-user.py, which is automatically called by install, will change /home/owner to current user's directory in each script that install copies to $HOME/chunkymap]) (since install-chunkymap-on-ubuntu.sh DOES replace "/home/owner" with current user's home [replace-with-current-user.py, which is automatically called by install, will change /home/owner to current user's directory in each script that install copies to $HOME/chunkymap])
@ -144,10 +151,12 @@ sudo python chunkymap/generator.py
```perl ```perl
minetestserver minetestserver
``` ```
then when it is finished loading, press Ctrl C then run: then when it is finished loading, press Ctrl C then run:
```perl ```perl
chmod +x install-chunkymap-on-ubuntu.sh && ./install-chunkymap-on-ubuntu.sh chmod +x install-chunkymap-on-ubuntu.sh && ./install-chunkymap-on-ubuntu.sh
``` ```
* IF you are using Linux * IF you are using Linux
* Rename viewchunkymap.php so it won't be overwritten on update if you want to modify it (or anything you want) then make a link to it on your website or share the link some other way. * Rename viewchunkymap.php so it won't be overwritten on update if you want to modify it (or anything you want) then make a link to it on your website or share the link some other way.
```perl ```perl
@ -159,6 +168,7 @@ sudo cp -R --no-clobber "$HOME/Downloads/minetest-chunkymap/web/images/*" "$MT_M
#--no-clobber: do not overwrite existing #--no-clobber: do not overwrite existing
# after you do this, the update script will do it for you if you are using /var/www/html/minetest, otherwise edit the update script before using it to get these things updated # after you do this, the update script will do it for you if you are using /var/www/html/minetest, otherwise edit the update script before using it to get these things updated
``` ```
* IF you are using Windows * IF you are using Windows
* Install Python 2.7 * Install Python 2.7
* Run install-chunkymap-on-windows.bat * Run install-chunkymap-on-windows.bat
@ -172,6 +182,7 @@ sudo cp -R --no-clobber "$HOME/Downloads/minetest-chunkymap/web/images/*" "$MT_M
``` ```
python_exe_path python_exe_path
``` ```
* Add AJAX to update players on canvas (refresh players every 10 seconds) * Add AJAX to update players on canvas (refresh players every 10 seconds)
* Add AJAX to update chunks on canvas (check for new map chunks every minute) * Add AJAX to update chunks on canvas (check for new map chunks every minute)
* Fix static html version of map (echo_chunkymap_table() php function) -- see viewchunkymap.php * Fix static html version of map (echo_chunkymap_table() php function) -- see viewchunkymap.php

Loading…
Cancel
Save