diff --git a/README.md b/README.md index 05f5fe5..adf4977 100644 --- a/README.md +++ b/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 # ( 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. * 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). @@ -29,12 +30,14 @@ echo "refresh_map_enable:False" > $HOME/chunkymap/signals.txt sleep 15s echo "loop_enable:False" > $HOME/chunkymap/signals.txt ``` + * In Windows(R) command prompt do something like: ```perl REM cd to the minetest-chunkymap or minetest-chunkymap-master folder you unzipped echo refresh_map_enable:False > signals.txt echo loop_enable:False > signals.txt ``` + * list of signals: ```YAML loop_enable:True @@ -53,6 +56,7 @@ refresh_map_seconds:1 #where 1 is number of seconds: refresh_players_seconds:1 ``` + ## Changes @@ -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_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 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 @@ -89,6 +94,7 @@ user_minetest_path world_name world_path ``` + * 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 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): sudo python chunkymap/generator.py ``` + 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 (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 minetestserver ``` + then when it is finished loading, press Ctrl C then run: ```perl chmod +x install-chunkymap-on-ubuntu.sh && ./install-chunkymap-on-ubuntu.sh ``` + * 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. ```perl @@ -159,6 +168,7 @@ sudo cp -R --no-clobber "$HOME/Downloads/minetest-chunkymap/web/images/*" "$MT_M #--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 ``` + * IF you are using Windows * Install Python 2.7 * 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 ``` + * 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) * Fix static html version of map (echo_chunkymap_table() php function) -- see viewchunkymap.php