diff --git a/README.md b/README.md index 3c83b4d..10546bc 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,41 @@ # EnlivenMinetest -Subgame for minetest +Subgame for minetest with the goals of creating immersion and lessons for humanity. +This collection of scripts includes some scripts to help install and manage your git version of Minetest Server on Ubuntu Server or various *buntu flavors (a gui distro neither required nor recommended). + +## How to use: +The installer script (in the "etc/change_world_name_manually_first" folder) downloads the git versions of all of the mods to the ENLIVEN folder which will be placed in your minetest games folder (one of the two folders listed below, otherwise fails). +* (optionally) place the enliven folder in the games folder here into the games folder on your server such as: + /usr/local/share/minetest/games/ + (If you're not using the git version of Minetest on Ubuntu Server, try something like: + /usr/share/games/minetest/games/ ) + although the installer script should create the initial version of the minetest.conf in there (NOTE: there is a different version of minetest.conf for clients, as described below) +* BEFORE running game-install-enliven.sh, make sure you FIRST CHANGE the value after "MT_MYWORLD_NAME=" +Do not expect the mods from game-install-enliven-testing.sh to work. Also, do not run the file directly -- instead, paste the variables (before backup process) in game-install-enliven.sh into a terminal window, then paste the contents of game-install-enliven-test.sh +* mts-ENLIVEN starts server (place it in $HOME normally), but requires you to FIRST CHANGE the value after worldname to the name of your world +* Recommend your users download the minetest.conf from this folder and put it in their minetest folder for better graphics (opengl 3.0 shaders, smooth lighting) + +## Customization +* Before using anything in the change_world_name_manually_first and subfolders, change the values of the variables in the folder name as noted before using. +* If you have a dedicated server, the value server_dedicated = false should be changed to server_dedicated = true in your SERVER's minetest.conf in the ENLIVEN folder that the installer creates. + +## Security and Performance Notes +* The installer script changes owner and group for ENLIVEN's world.mt and world.mt.1st if present to $USER +* The included minetest.conf recommended for your clients includes the line enable_local_map_saving = true, which will cache the world locally on their machines. You can feel free to change that according to your preference. + + +## Naming conventions: +* The filenames without extensions +* The abbreviation "mts" is for minetest server-specific scripts or variables +* du-show-big searches your hard drive for big files, in case $HOME/.minetest/debug.txt fills your drive, or a log rotate utility fails (going into a cumulative copy loop, or not) in regard to debug.txt, filling up your drive +* The network folder contains some stuff for networks, which is usually only useful for using Minetest in a network cafe or school. +(The purpose of minetest_userscript_localENLIVEN_server_only.vbs is to make sure the user only uses the hostname localENLIVEN, however this only changes the default, and cannot be enforced in any way as far as I know without recompiling the client.) + +## Known issues: +* Installer script does not copy certain stuff to the config files due to permissions unless runs as root (the rest is designed to run as sudoer, and use sudo only as needed) +* minetestserver-update-from-git.sh usually doesn't work right. Normally just rename your minetest folder then clone it from git instead. +* make sure always cd $HOME/Downloads before downloading stuff (double check installer script) +* minetest_userscript_localENLIVEN_server_only.vbs logon script in network folder only works if you make C:\games\Minetest writable to Authenticated Users, in order for minetest.conf to be created via this script (feel free to offer comments on how to avoid making the entire Minetest folder writable to Authenticated Users [I haven't experimented with which of the files and subfolders can be set to do not inherit]) +* minetest_userscript_localENLIVEN_server_only.vbs does not read the recommended minetest.conf, so it echoes the lines manually. Ideally it would analyze the recommended one and change the server settings. + +### Known issues in mods: +* compassgps crashes server for some players upon use--see yelby in etc/debugging (wrap sorting in "if player~=nil then...end" to avoid) diff --git a/etc/archive-mts-debug b/etc/archive-mts-debug new file mode 100644 index 0000000..a800043 --- /dev/null +++ b/etc/archive-mts-debug @@ -0,0 +1,36 @@ +#!/bin/sh +echo "" +minetest_data_path=$HOME/.minetest +logs_folder_name=debug_archived +logs_folder_path=$minetest_data_path/$logs_folder_name +year_string=`date +%Y` +if [ -f "$minetest_data_path/debug.txt" ]; +then + #date_string=`date +%Y-%m-%d` + month_string=`date +%m` + day_string=`date +%d` + if [ ! -d "$logs_folder_path" ]; + then + mkdir "$logs_folder_path" + fi + if [ ! -d "$logs_folder_path/$year_string" ]; + then + mkdir "$logs_folder_path/$year_string" + fi + if [ ! -d "$logs_folder_path/$year_string/$month_string" ]; + then + mkdir "$logs_folder_path/$year_string/$month_string" + fi + + mts_log_archive_today_file_path=$logs_folder_path/$year_string/$month_string/$day_string.txt + mv "$minetest_data_path/debug.txt" "$mts_log_archive_today_file_path" + if [ -f "$mts_log_archive_today_file_path" ]; then + echo "log saved to $mts_log_archive_today_file_path" + else + echo "Failed to save log to $mts_log_archive_today_file_path" + fi +else + echo "nothing to do (no $minetest_data_path/debug.txt is present--perhaps it was already archived--check $year_string folder (perhaps this month's $year_string/$month_string folder) in $logs_folder_path/" +fi + + diff --git a/etc/change_world_name_manually_first/WIP (DO NOT USE)/redis-mtredisalize-start b/etc/change_world_name_manually_first/WIP (DO NOT USE)/redis-mtredisalize-start new file mode 100644 index 0000000..f71c899 --- /dev/null +++ b/etc/change_world_name_manually_first/WIP (DO NOT USE)/redis-mtredisalize-start @@ -0,0 +1,29 @@ +#!/bin/sh +USR_SHARE_MINETEST=/usr/share/games/minetest +#IF git version is installed: +if [ -d "/usr/local/share/minetest" ]; +then +USR_SHARE_MINETEST=/usr/local/share/minetest +fi +#UNUSED (unknown use): MT_GAMES_DIR=$HOME/.minetest/mods +#intentionally skip the slash in the following line since $USR_SHARE_MINETEST already starts with one: + +MT_BACKUP_GAMES_DIR=$HOME/Backup$USR_SHARE_MINETEST/games +MT_GAMES_DIR=$USR_SHARE_MINETEST/games +MT_MYGAME_NAME=ENLIVEN +MT_MYGAME_DIR=$MT_GAMES_DIR/$MT_MYGAME_NAME +MT_MYGAME_MODDIR=$MT_MYGAME_DIR/mods +MT_MYWORLD_NAME=FCAGameAWorld +MT_MYWORLD_DIR=$HOME/.minetest/worlds/$MT_MYWORLD_NAME +if [ ! -d "$MT_MYGAME_DIR" ]; then + sudo mkdir "$MT_MYGAME_DIR" +fi + + +mtredisalize \ + -host=localhost \ + -interleaved=true \ + -change-url=http://localhost:8808/update \ + -change-duration=10s \ + $MT_MYWORLD_DIR/map.db + diff --git a/etc/change_world_name_manually_first/also_change_username_manually_first/WIP (do not use)/nightly-cronjob b/etc/change_world_name_manually_first/also_change_username_manually_first/WIP (do not use)/nightly-cronjob new file mode 100644 index 0000000..eda7326 --- /dev/null +++ b/etc/change_world_name_manually_first/also_change_username_manually_first/WIP (do not use)/nightly-cronjob @@ -0,0 +1,15 @@ +#!/bin/sh +#To add this, type: +# sudo crontab -e +# #Go to bottom, then to run at 9pm daily: +# * 21 * * * /home/owner/nightly-cronjob +# #Press Ctrl-X +# #Press y +killall --signal SIGINT minetestserver +#chunkymap, if present, must run as root. +python chunkymap/singleimage.py +cd /home/owner +# NOTE: sudo -u owner doesn't work, since $HOME is still root in that case ($HOME is used extensively by the scripts and programs below) +su - owner ./archive-mts-debug +su - owner ./backup-mts-world +su - owner /home/owner/mts-ENLIVEN diff --git a/etc/change_world_name_manually_first/also_change_username_manually_first/backup-mts-world_cron b/etc/change_world_name_manually_first/also_change_username_manually_first/backup-mts-world_cron new file mode 100644 index 0000000..32e6586 --- /dev/null +++ b/etc/change_world_name_manually_first/also_change_username_manually_first/backup-mts-world_cron @@ -0,0 +1,22 @@ +#!/bin/sh + +date_string=`date +%Y-%m-%d` +MT_WORLDS_PATH=/home/owner/.minetest/worlds +cd $MT_WORLDS_PATH +ls +dest_name=FCAGameAWorld-$date_string.tar.gz +dest_path=$MT_WORLDS_PATH/$dest_name +echo "Attempting to create $name_string" +if [ ! -f "$name_string" ] + then + cd "$MT_WORLDS_PATH" + tar -czvf "$dest_name" FCAGameAWorld + if [ -f "$dest_path" ] + then + echo "Successfully created $dest_path" > $HOME/backup-FCAGAW-result.txt >> /var/log/minetestserver-scripts.log + else + echo "Failed to create $dest_path" > $HOME/backup-FCAGAW-result.txt >> /var/log/minetestserver/scripts.log + fi +else + echo "Nothing to do. Already saved $MT_WORLDS_PATH/$name_string" >> /var/log/minetestserver-scripts.log +fi diff --git a/etc/change_world_name_manually_first/backup-mts-world b/etc/change_world_name_manually_first/backup-mts-world new file mode 100644 index 0000000..e0ce66b --- /dev/null +++ b/etc/change_world_name_manually_first/backup-mts-world @@ -0,0 +1,20 @@ +#!/bin/sh + +date_string=`date +%Y-%m-%d` +MT_WORLDS_PATH=$HOME/.minetest/worlds +cd $MT_WORLDS_PATH +ls +name_string=FCAGameAWorld-$date_string.tar.gz +echo "Attempting to create $name_string" +if [ ! -f "$name_string" ] + then + tar -czvf "$name_string" FCAGameAWorld + if [ -f "$name_string" ] + then + echo "Successfully created $MT_WORLDS_PATH/$name_string" + else + echo "Failed to create $MT_WORLDS_PATH/$name_string" + fi +else + echo "Nothing to do. Already saved $MT_WORLDS_PATH/$name_string" +fi diff --git a/etc/change_world_name_manually_first/eauth b/etc/change_world_name_manually_first/eauth new file mode 100644 index 0000000..75e972d --- /dev/null +++ b/etc/change_world_name_manually_first/eauth @@ -0,0 +1,2 @@ +#!/bin/sh +nano ~/.minetest/worlds/FCAGameAWorld/auth.txt diff --git a/etc/change_world_name_manually_first/editmtsconf b/etc/change_world_name_manually_first/editmtsconf new file mode 100644 index 0000000..c1ddae4 --- /dev/null +++ b/etc/change_world_name_manually_first/editmtsconf @@ -0,0 +1,8 @@ +#!/bin/sh +USR_SHARE_MINETEST=/usr/share/games/minetest +if [ -d "/usr/local/share/minetest" ]; +then +USR_SHARE_MINETEST=/usr/local/share/minetest +fi +MT_MYGAME_NAME=ENLIVEN +sudo nano "$USR_SHARE_MINETEST/games/$MT_MYGAME_NAME/minetest.conf" \ No newline at end of file diff --git a/etc/change_world_name_manually_first/game-install-ENLIVEN b/etc/change_world_name_manually_first/game-install-ENLIVEN new file mode 100644 index 0000000..7574966 --- /dev/null +++ b/etc/change_world_name_manually_first/game-install-ENLIVEN @@ -0,0 +1,1649 @@ +#!/bin/sh + +#First make sure all folders in $HOME/.minetest are created (I am not sure whether this is required!): +# minetestserver +# Mods were found at https://forum.minetest.net/viewforum.php?f=11 + + +# * Git version uses /home/*/minetest/games and /usr/local/share/minetest/games but the latter is used for minetestserver (minetest-server package) + + +#(Ubuntu 14.04 Trusty Tahr Server) folders were found using: +# cd / +# sudo find -name 'worlds' (worlds folder is in $HOME/.minetest) +# sudo find -name 'minimal' (stable build [such as 0.4.9 games folder is /usr/share/games/minetest/games, but git version games folder is /usr/local/share/minetest/games) + +#NOTE: minetest mods are ALWAYS ONLY installed on server + +USR_SHARE_MINETEST=/usr/share/games/minetest +#IF git version is installed: +if [ -d "/usr/local/share/minetest" ]; then + USR_SHARE_MINETEST=/usr/local/share/minetest +fi +#UNUSED (unknown use): MT_GAMES_DIR=$HOME/.minetest/mods +#intentionally skip the slash in the following line since $USR_SHARE_MINETEST already starts with one: +MT_BACKUP_GAMES_DIR=$HOME/Backup$USR_SHARE_MINETEST/games +MT_GAMES_DIR=$USR_SHARE_MINETEST/games +MT_MYGAME_NAME=ENLIVEN +MT_MYGAME_DIR=$MT_GAMES_DIR/$MT_MYGAME_NAME +#formerly MT_MYGAME_MODDIR: +MT_MYGAME_MODS_PATH=$MT_MYGAME_DIR/mods +MT_MYWORLD_NAME=FCAGameAWorld +MT_MYWORLD_DIR=$HOME/.minetest/worlds/$MT_MYWORLD_NAME + +#BACKUP THE WORLD: +sudo chown $USER "$MT_MYWORLD_DIR/world.mt" +sudo chown $USER "$MT_MYWORLD_DIR/world.mt.1st" +if [ ! -d "$MT_MYGAME_DIR" ]; then + sudo mkdir "$MT_MYGAME_DIR" +fi +if [ -f "$MT_MYWORLD_DIR/world.mt.1st" ]; then + echo "Already backed up world.mt to $MT_MYWORLD_DIR/world.mt.1st" +else + cp "$MT_MYWORLD_DIR/world.mt" "$MT_MYWORLD_DIR/world.mt.1st" + echo "The original world.mt is now backed up at $MT_MYWORLD_DIR/world.mt.1st" +fi +touch "$MT_MYWORLD_DIR/world.mt" +mv -f "$MT_MYWORLD_DIR/world.mt" "$MT_MYWORLD_DIR/world.mt.bak" + +# REMAKE world.mt +cd +echo "gameid = $MT_MYGAME_NAME" > "world.mt" +sudo mv "world.mt" "$MT_MYWORLD_DIR/world.mt" +sudo chown $USER "$MT_MYWORLD_DIR/world.mt" +sudo chgrp $USER "$MT_MYWORLD_DIR/world.mt" +echo "backend = leveldb" >> "$MT_MYWORLD_DIR/world.mt" +#mv "world.mt" $MT_MYWORLD_DIR/world.mt + +#MT_MYGAME_DIR (a Minetest "game") is the equivalent of a Minecraft modpack, however, in this case it is actually a collection of mods and modpacks, either of which can be in the mods folder + +#cd +if [ ! -d "$HOME/Downloads" ]; then + mkdir "$HOME/Downloads" +fi +cd "$HOME/Downloads" + +if [ -d "$MT_MYGAME_DIR BAK" ]; +then + echo "already backed up $MT_MYGAME_DIR" +else + sudo mv "$MT_MYGAME_DIR" "$MT_MYGAME_DIR BAK" +fi + + +#sudo mkdir "$MT_MYGAME_DIR" +#sudo mkdir "$MT_MYGAME_MODS_PATH" +if [ ! -d "$MT_MYGAME_DIR/" ]; then + echo "ERROR: failed to create $MT_MYGAME_DIR, so cannot continue." + exit 1 +fi +#sudo cp -R $USR_SHARE_MINETEST/games/minetest_game/mods/* "$MT_MYGAME_DIR/mods/" +sudo cp -R $USR_SHARE_MINETEST/games/minetest_game/* "$MT_MYGAME_DIR/" + +#wget https://github.com/BlockMen/cme/releases/download/v2.3/cme-2_3-BlockMen.zip +#unzip cme-2_3-BlockMen.zip +#sudo mv cme "$MT_MYGAME_MODS_PATH/cme" +##DO NOT DO THIS (since cme is a modpack): echo "load_mod_cme = true" >> "$MT_MYWORLD_DIR/world.mt" +#echo "#cme Creatures MOB-Engine (cme) is a modpack" >> "$MT_MYWORLD_DIR/world.mt" + +cd "$HOME/Downloads" +MTMOD_DL_ZIP=master.zip +MTMOD_SRC_ZIP=mobs_redo.zip +MTMOD_UNZ_NAME=mobs_redo-master +MTMOD_DEST_NAME=mobs +MTMOD_DEST_PATH=$MT_MYGAME_MODS_PATH/$MTMOD_DEST_NAME +if [ -f $MTMOD_DL_ZIP ]; then + rm -f $MTMOD_DL_ZIP +fi +if [ -f $MTMOD_SRC_ZIP ]; then + rm -f $MTMOD_SRC_ZIP +fi +rm -Rvf $MTMOD_UNZ_NAME +#sudo rm -Rvf "$MTMOD_DEST_PATH" +echo "Installing TenPlus1's mobs.zip from https://github.com/tenplus1/mobs_redo/archive/master.zip" +echo "Installing TenPlus1's mobs.zip from https://github.com/tenplus1/mobs_redo/archive/master.zip" > mobs.zip.txt +#SEE ALSO RELEASE VERSION (must be logged in to download): https://forum.minetest.net/download/file.php?id=5282 +#wget https://github.com/tenplus1/mobs/archive/master.zip +wget https://github.com/tenplus1/mobs_redo/archive/master.zip +mv $MTMOD_DL_ZIP $MTMOD_SRC_ZIP +unzip $MTMOD_SRC_ZIP +sudo mv $MTMOD_UNZ_NAME "$MTMOD_DEST_PATH" +if [ ! -d "$MTMOD_DEST_PATH" ]; then + echo "ERROR: failed to unzip $MTMOD_DEST_PATH, so cannot continue." + exit 1 +fi +echo "load_mod_mobs = true" >> "$MT_MYWORLD_DIR/world.mt" + + + + +cd "$HOME/Downloads" +MTMOD_DL_ZIP=master.zip +MTMOD_SRC_ZIP=mobs_monster.zip +MTMOD_UNZ_NAME=mobs_monster-master +MTMOD_DEST_NAME=mobs_monster +MTMOD_DEST_PATH=$MT_MYGAME_MODS_PATH/$MTMOD_DEST_NAME +if [ -f $MTMOD_DL_ZIP ]; then + rm -f $MTMOD_DL_ZIP +fi +if [ -f $MTMOD_SRC_ZIP ]; then + rm -f $MTMOD_SRC_ZIP +fi +rm -Rvf $MTMOD_UNZ_NAME +wget https://github.com/tenplus1/mobs_monster/archive/master.zip +mv $MTMOD_DL_ZIP $MTMOD_SRC_ZIP +unzip $MTMOD_SRC_ZIP +sudo mv $MTMOD_UNZ_NAME "$MTMOD_DEST_PATH" +if [ ! -d "$MTMOD_DEST_PATH" ]; then + echo "ERROR: failed to unzip $MTMOD_DEST_PATH, so cannot continue." + exit 1 +fi +echo "load_mod_mobs_monster = true" >> "$MT_MYWORLD_DIR/world.mt" + +cd "$HOME/Downloads" +MTMOD_DL_ZIP=master.zip +MTMOD_SRC_ZIP=mobs_animal.zip +MTMOD_UNZ_NAME=mobs_animal-master +MTMOD_DEST_NAME=mobs_animal +MTMOD_DEST_PATH=$MT_MYGAME_MODS_PATH/$MTMOD_DEST_NAME +if [ -f $MTMOD_DL_ZIP ]; then + rm -f $MTMOD_DL_ZIP +fi +if [ -f $MTMOD_SRC_ZIP ]; then + rm -f $MTMOD_SRC_ZIP +fi +rm -Rvf $MTMOD_UNZ_NAME +wget https://github.com/tenplus1/mobs_animal/archive/master.zip +mv $MTMOD_DL_ZIP $MTMOD_SRC_ZIP +unzip $MTMOD_SRC_ZIP +sudo mv $MTMOD_UNZ_NAME "$MTMOD_DEST_PATH" +if [ ! -d "$MTMOD_DEST_PATH" ]; then + echo "ERROR: failed to unzip $MTMOD_DEST_PATH, so cannot continue." + exit 1 +fi +echo "load_mod_mobs_animal = true" >> "$MT_MYWORLD_DIR/world.mt" + + + +#the following downloads protector (REDO version posted at https://forum.minetest.net/viewtopic.php?f=11&t=9376) not the original 2012 protector or 2012 fork of 2012 protector +#rm protector.zip +#wget https://forum.minetest.net/download/file.php?id=5046 +#mv -f "file.php?id=5046" protector.zip +#USE GIT VERSION INSTEAD: +cd "$HOME/Downloads" +MTMOD_DL_ZIP=master.zip +MTMOD_SRC_ZIP=protector.zip +MTMOD_UNZ_NAME=protector-master +MTMOD_DEST_NAME=protector +MTMOD_DEST_PATH=$MT_MYGAME_MODS_PATH/$MTMOD_DEST_NAME +if [ -f $MTMOD_DL_ZIP ]; then + rm -f $MTMOD_DL_ZIP +fi +if [ -f $MTMOD_SRC_ZIP ]; then + rm -f $MTMOD_SRC_ZIP +fi +rm -Rvf $MTMOD_UNZ_NAME +#as of 2016-02-20, CRASHES on default 0.4.9 minetesterver 0.4.13 git 2016-02-20: +wget https://github.com/tenplus1/protector/archive/master.zip +#expertmm fork to work in above situation: +#wget https://github.com/expertmm/protector/archive/master.zip +#results in UNKNOWN NODE for all protected blocks: wget https://github.com/MinetestForFun/protector/archive/master.zip +mv -f $MTMOD_DL_ZIP $MTMOD_SRC_ZIP +unzip $MTMOD_SRC_ZIP +#sudo rm -Rf "$MT_MYGAME_MODS_PATH/protector-master" +sudo mv $MTMOD_UNZ_NAME "$MTMOD_DEST_PATH" +if [ ! -d "$MTMOD_DEST_PATH" ]; then + echo "ERROR: failed to unzip $MTMOD_DEST_PATH, so cannot continue." + exit 1 +fi + +#sudo su - +#WRITEABLE_MINETEST_CONF=$USR_SHARE_MINETEST/games/$MT_MYGAME_NAME/minetest.conf +WRITEABLE_MINETEST_CONF=$HOME/minetest.conf +rm -f "$HOME/minetest.conf" +if [ ! -f "$USR_SHARE_MINETEST/games/$MT_MYGAME_NAME/minetest.conf" ]; then + sudo cp "$USR_SHARE_MINETEST/games/minetest_game/minetest.conf" "$USR_SHARE_MINETEST/games/$MT_MYGAME_NAME/minetest.conf.1st" +fi +cp "$USR_SHARE_MINETEST/games/minetest_game/minetest.conf" "$WRITEABLE_MINETEST_CONF" +touch "$WRITEABLE_MINETEST_CONF" +echo "protector_radius = 7" >> "$WRITEABLE_MINETEST_CONF" +echo "protector_pvp = true" >> "$WRITEABLE_MINETEST_CONF" +echo "protector_pvp_spawn = 10" >> "$WRITEABLE_MINETEST_CONF" +echo "protector_drop = false" >> "$WRITEABLE_MINETEST_CONF" +echo "protector_hurt = 1" >> "$WRITEABLE_MINETEST_CONF" +echo "default_privs = interact,shout,home" >> "$WRITEABLE_MINETEST_CONF" +echo "max_users = 50" >> "$WRITEABLE_MINETEST_CONF" +echo "motd = \"Actions and chat messages are logged. Visit fcacloud.com/minetest for recipes and live map.\"" >> "$WRITEABLE_MINETEST_CONF" +echo "disallow_empty_passwords = true" >> "$WRITEABLE_MINETEST_CONF" +echo "secure.trusted_mods = advanced_npc" >> "$WRITEABLE_MINETEST_CONF" +echo "server_dedicated = false" >> "$WRITEABLE_MINETEST_CONF" + +sudo mv -f $HOME/minetest.conf "$USR_SHARE_MINETEST/games/$MT_MYGAME_NAME/minetest.conf" +echo "load_mod_protector = true" >> $MT_MYWORLD_DIR/world.mt + + +cd "$HOME/Downloads" +MTMOD_DL_ZIP=master.tar.gz +MTMOD_SRC_ZIP=xban2.tar.gz +#MTMOD_UNZ_NAME=minetest-xban2-master +MTMOD_UNZ_NAME=xban2-master +MTMOD_DEST_NAME=xban2 +MTMOD_DEST_PATH=$MT_MYGAME_MODS_PATH/$MTMOD_DEST_NAME +if [ -f $MTMOD_DL_ZIP ]; then + rm -f $MTMOD_DL_ZIP +fi +if [ -f $MTMOD_SRC_ZIP ]; then + rm -f $MTMOD_SRC_ZIP +fi +rm -Rvf $MTMOD_UNZ_NAME +wget https://github.com/kaeza/minetest-xban2/archive/master.tar.gz +mv $MTMOD_DL_ZIP $MTMOD_SRC_ZIP +tar -xzvf $MTMOD_SRC_ZIP +# As http://wiki.minetest.net/Installing_Mods specifies, a mod MUST be renamed to official name as in the official thread of the mod: +mv $MTMOD_UNZ_NAME $MTMOD_DEST_NAME +sudo mv $MTMOD_DEST_NAME "$MTMOD_DEST_PATH" +if [ ! -d "$MTMOD_DEST_PATH" ]; then + echo "ERROR: failed to unzip $MTMOD_DEST_PATH, so cannot continue." + exit 1 +fi + +echo "load_mod_xban2 = true" >> "$MT_MYWORLD_DIR/world.mt" + +cd "$HOME/Downloads" +MTMOD_DL_ZIP=master.zip +MTMOD_SRC_ZIP=areas.zip +MTMOD_UNZ_NAME=areas-master +MTMOD_DEST_NAME=areas +MTMOD_DEST_PATH=$MT_MYGAME_MODS_PATH/$MTMOD_DEST_NAME +echo "Installing ShadowNinja's " +echo "Installing ShadowNinja's " >> $MTMOD_SRC_ZIP.txt +if [ -f $MTMOD_DL_ZIP ]; then + rm -f $MTMOD_DL_ZIP +fi +if [ -f $MTMOD_SRC_ZIP ]; then + rm -f $MTMOD_SRC_ZIP +fi +rm -Rvf $MTMOD_UNZ_NAME +wget https://github.com/ShadowNinja/areas/archive/master.zip +mv $MTMOD_DL_ZIP $MTMOD_SRC_ZIP +unzip $MTMOD_SRC_ZIP +sudo mv $MTMOD_UNZ_NAME "$MTMOD_DEST_PATH" +if [ ! -d "$MTMOD_DEST_PATH" ]; then + echo "ERROR: failed to unzip $MTMOD_DEST_PATH, so cannot continue." + exit 1 +fi +echo "load_mod_areas = true" >> "$MT_MYWORLD_DIR/world.mt" + +if [ -f "$MT_MYGAME_DIR/game.conf.1st" ]; then + echo "Already backed up $MT_MYGAME_DIR/game.conf to $MT_MYGAME_DIR/game.conf.1st" +else + sudo cp "$MT_MYGAME_DIR/game.conf" "$MT_MYGAME_DIR/game.conf.1st" +fi +echo "name = $MT_MYGAME_NAME" > "$HOME/game.conf" +sudo mv -f "$HOME/game.conf" "$MT_MYGAME_DIR/game.conf" +#su - +#FAILS: echo "name = $MT_MYGAME_NAME" > "$MT_MYGAME_DIR/game.conf" +#sudo nano "$MT_MYGAME_DIR/game.conf" +echo "" +echo "You should see $MT_MYGAME_NAME in the list below if the game was configured properly:" +minetestserver --gameid list +echo "" + + +#ls "$MT_MYGAME_MODS_PATH" +if [ ! -d "$MT_BACKUP_GAMES_DIR" ]; then + mkdir -p "$MT_BACKUP_GAMES_DIR" +#-p to make parent recursively +fi + +if [ -d "$MT_BACKUP_GAMES_DIR/minetest_game_1st" ]; then + echo "already backed up $USR_SHARE_MINETEST/games/minetest_game" +else + sudo cp -R "$USR_SHARE_MINETEST/games/minetest_game" "$MT_BACKUP_GAMES_DIR/" +fi +#sudo mv "$USR_SHARE_MINETEST/games/fca-game-a" "$USR_SHARE_MINETEST/games/minetest_game" + +#UNUSED, and is based on a much older version of minetest_game: +#MTMOD_DL_ZIP=master.zip +#MTMOD_SRC_ZIP=carbone-ng.zip +#MTMOD_UNZ_NAME=carbone-ng-master +#MTMOD_DEST_NAME=carbone-ng +##MTMOD_DEST_PATH=$MT_MYGAME_MODS_PATH/$MTMOD_DEST_NAME +#MTMOD_DEST_PATH=$MT_GAMES_DIR/$MTMOD_DEST_NAME +##if [ -d "$MTMOD_UNZ_NAME" ]; then +#rm -Rf $MTMOD_UNZ_NAME +##fi +#if [ -f "$MTMOD_DL_ZIP" ]; then +# rm -f "$MTMOD_DL_ZIP" +#fi +#if [ -f "$MTMOD_SRC_ZIP" ]; then +# rm -f "$MTMOD_SRC_ZIP" +#fi +#cd "$HOME/Downloads" +#wget https://github.com/Calinou/carbone-ng/archive/master.zip +#mv $MTMOD_DL_ZIP $MTMOD_SRC_ZIP +#unzip $MTMOD_SRC_ZIP +#sudo mv $MTMOD_UNZ_NAME "$MTMOD_DEST_PATH" +#if [ ! -d "$MTMOD_DEST_PATH" ]; then +# echo "ERROR: failed to unzip $MTMOD_DEST_PATH, so cannot continue." +# exit 1 +#fi + +#sudo cp -R /usr/share/games/minetest/games/carbone-ng /usr/local/share/minetest/games/carbone-ng + +#IF git version is installed: +#if [ -d "/usr/local/share/minetest/games" ]; +#then +#sudo cp -R $USR_SHARE_MINETEST/games/$MT_MYGAME_NAME /usr/local/share/minetest/games/$MT_MYGAME_NAME +#sudo mv $HOME/Downloads/cme /usr/local/share/minetest/games/$MT_MYGAME_NAME/mods/cme +#sudo mv $HOME/Downloads/protector /usr/local/share/minetest/games/$MT_MYGAME_NAME/mods/protector +#fi + +# actually farming REDO as per https://forum.minetest.net/viewtopic.php?f=11&t=9019 +#wget https://forum.minetest.net/download/file.php?id=5045 +#mv "file.php?id=5045" farming.zip +#unzip farming.zip +#sudo rm -Rf $MT_MYGAME_MODS_PATH/farming +#sudo mv farming $MT_MYGAME_MODS_PATH/farming +# breaks 0.4.13 dev version 2016-02-17 (says height_max deprecated, use y_max; and later +#2016-02-17 11:10:19: ERROR[Main]: ModError: Failed to load and run script from $USR_SHARE_MINETEST/games/enliven/mods/farming/init.lua: +#2016-02-17 11:10:19: ERROR[Main]: ...share/minetest/games/enliven/mods/farming/pumpkin.lua:78: attempt to perform arithmetic on field 'LIGHT_MAX' (a nil value) +#2016-02-17 11:10:19: ERROR[Main]: stack traceback: +#2016-02-17 11:10:19: ERROR[Main]: ...share/minetest/games/enliven/mods/farming/pumpkin.lua:78: in main chunk +#2016-02-17 11:10:19: ERROR[Main]: [C]: in function 'dofile' +#2016-02-17 11:10:19: ERROR[Main]: ...al/share/minetest/games/enliven/mods/farming/init.lua:65: in main chunk +# Remove & overwrite Farming REDO since it crashes 0.4.13 git 2016-02-16: +#sudo rm -Rf $MT_MYGAME_MODS_PATH/farming +#sudo cp -R $USR_SHARE_MINETEST/games/minetest_game/mods/farming $MT_MYGAME_MODS_PATH/farming + +MTMOD_DL_ZIP=master.zip +MTMOD_SRC_ZIP=unified_inventory.zip +MTMOD_UNZ_NAME=unified_inventory-master +MTMOD_DEST_NAME=unified_inventory +MTMOD_DEST_PATH=$MT_MYGAME_MODS_PATH/$MTMOD_DEST_NAME +#if [ -d "$MTMOD_UNZ_NAME" ]; then +rm -Rf $MTMOD_UNZ_NAME +#fi +if [ -f "$MTMOD_DL_ZIP" ]; then + rm -f "$MTMOD_DL_ZIP" +fi +if [ -f "$MTMOD_SRC_ZIP" ]; then + rm -f "$MTMOD_SRC_ZIP" +fi +wget https://github.com/minetest-technic/unified_inventory/archive/master.zip +mv $MTMOD_DL_ZIP $MTMOD_SRC_ZIP +unzip $MTMOD_SRC_ZIP +sudo mv $MTMOD_UNZ_NAME "$MTMOD_DEST_PATH" +if [ ! -d "$MTMOD_DEST_PATH" ]; then + echo "ERROR: failed to unzip $MTMOD_DEST_PATH, so cannot continue." + exit 1 +fi +echo "load_mod_unified_inventory = true" >> $MT_MYWORLD_DIR/world.mt + + +MTMOD_DL_ZIP=master.zip +MTMOD_SRC_ZIP=technic.zip +MTMOD_UNZ_NAME=technic-master +MTMOD_DEST_NAME=technic +MTMOD_DEST_PATH=$MT_MYGAME_MODS_PATH/$MTMOD_DEST_NAME +#if [ -d "$MTMOD_UNZ_NAME" ]; then +rm -Rf $MTMOD_UNZ_NAME +#fi +if [ -f "$MTMOD_DL_ZIP" ]; then + rm -f "$MTMOD_DL_ZIP" +fi +if [ -f "$MTMOD_SRC_ZIP" ]; then + rm -f "$MTMOD_SRC_ZIP" +fi +wget https://github.com/minetest-technic/technic/archive/master.zip +mv $MTMOD_DL_ZIP $MTMOD_SRC_ZIP +unzip $MTMOD_SRC_ZIP +sudo mv $MTMOD_UNZ_NAME "$MTMOD_DEST_PATH" +if [ ! -d "$MTMOD_DEST_PATH" ]; then + echo "ERROR: failed to unzip $MTMOD_DEST_PATH, so cannot continue." + exit 1 +fi +echo "load_mod_technic = true" >> $MT_MYWORLD_DIR/world.mt + + + +#uninstall: +#if [ -d "$MT_MYGAME_MODS_PATH/unified_inventory" ]; then +# if [ -d "$HOME/Backup/unified_inventory" ]; then +# rm -Rf "$HOME/Backup/unified_inventory" +# fi +# sudo mv "$MT_MYGAME_MODS_PATH/unified_inventory" "$HOME/Backup/unified_inventory" +#fi +#reinstall: +#sudo mv "$HOME/Backup/unified_inventory" "$MT_MYGAME_MODS_PATH/unified_inventory" + +MTMOD_DL_ZIP=treasurer0.2.0.zip +MTMOD_SRC_ZIP=treasurer0.2.0.zip +MTMOD_UNZ_NAME=treasurer +MTMOD_DEST_NAME=treasurer +MTMOD_DEST_PATH=$MT_MYGAME_MODS_PATH/$MTMOD_DEST_NAME +if [ -f "tsm_gift_example" ]; then + rm "tsm_gift_example" +fi +if [ -d "tsm_gift_example" ]; then + rm -Rvf "tsm_gift_example" +fi +if [ -f "tsm_chests_example" ]; then + rm "tsm_chests_example" +fi +if [ -f "trm_default_example" ]; then + rm "trm_default_example" +fi +if [ -f "tsm_default_example" ]; then + rm "tsm_default_example" +fi +#if [ -d "$MTMOD_UNZ_NAME" ]; then +rm -Rf $MTMOD_UNZ_NAME +#fi +if [ -f "$MTMOD_DL_ZIP" ]; then + rm -f "$MTMOD_DL_ZIP" +fi +if [ -f "$MTMOD_SRC_ZIP" ]; then + rm -f "$MTMOD_SRC_ZIP" +fi +wget http://axlemedia.net/abiyahh/users/Wuzzy/downloads/treasurer0.2.0.zip +unzip $MTMOD_SRC_ZIP +sudo mv -f $MTMOD_UNZ_NAME "$MTMOD_DEST_PATH" +if [ ! -d "$MTMOD_DEST_PATH" ]; then + echo "ERROR: failed to unzip $MTMOD_DEST_PATH, so cannot continue." + exit 1 +fi +echo "load_mod_treasurer = true" >> $MT_MYWORLD_DIR/world.mt + + +#DEPRECATED, replaced by spawners (which includes pyramids worldgen mod) +#MTMOD_DL_ZIP=ebf839579197053b2ead85072757f23158960319.zip +#MTMOD_SRC_ZIP=tsm_pyramids.zip +#MTMOD_UNZ_NAME=tsm_pyramids-* +#MTMOD_DEST_NAME=tsm_pyramids +#MTMOD_DEST_PATH=$MT_MYGAME_MODS_PATH/$MTMOD_DEST_NAME +##if [ -d "$MTMOD_UNZ_NAME" ]; then +#rm -Rf $MTMOD_UNZ_NAME +##fi +#if [ -f "$MTMOD_DL_ZIP" ]; then +# rm -f "$MTMOD_DL_ZIP" +#fi +#if [ -f "$MTMOD_SRC_ZIP" ]; then +# rm -f "$MTMOD_SRC_ZIP" +#fi +#wget http://repo.or.cz/w/minetest_pyramids/tsm_pyramids.git/snapshot/ebf839579197053b2ead85072757f23158960319.zip +#mv $MTMOD_DL_ZIP $MTMOD_SRC_ZIP +#unzip $MTMOD_SRC_ZIP +#sudo mv -f $MTMOD_UNZ_NAME "$MTMOD_DEST_PATH" +#if [ ! -d "$MTMOD_DEST_PATH" ]; then +# echo "ERROR: failed to unzip $MTMOD_DEST_PATH, so cannot continue." +# exit 1 +#fi + +cd "$HOME/Downloads" +MTMOD_DL_ZIP=akiba-* +wget http://git.akiba.fr:81/minetest/akiba/repository/archive.zip?ref=af571404a27a2cb06842c644930344f565a0b786 +rm -f $MTMOD_DL_ZIP + +wget https://github.com/MinetestForFun/server-minetestforfun/raw/master/mods/trm_pyramids/depends.txt +wget https://github.com/MinetestForFun/server-minetestforfun/raw/master/mods/trm_pyramids/init.lua +wget https://github.com/MinetestForFun/server-minetestforfun/raw/master/mods/trm_pyramids/more_trms.lua + +cd "$HOME/Downloads" +MTMOD_DL_ZIP=hud_hunger-2_x_1-BlockMen.zip +MTMOD_SRC_ZIP=hud_hunger-2_x_1-BlockMen.zip +MTMOD_UNZ_NAME=hud_hunger +MTMOD_DEST_NAME=hud_hunger +MTMOD_DEST_PATH=$MT_MYGAME_MODS_PATH/$MTMOD_DEST_NAME +#in case someone installed the mods apart from the modpack: +if [ -d "$MT_MYGAME_MODS_PATH/hud" ]; then + sudo rm -Rf "$MT_MYGAME_MODS_PATH/hud" +fi +if [ -d "$MT_MYGAME_MODS_PATH/hunger" ]; then + sudo rm -Rf "$MT_MYGAME_MODS_PATH/hunger" +fi +if [ -f $MTMOD_DL_ZIP ]; then + rm -f $MTMOD_DL_ZIP +fi +if [ -f $MTMOD_SRC_ZIP ]; then + rm -f $MTMOD_SRC_ZIP +fi +rm -Rvf $MTMOD_UNZ_NAME +wget https://github.com/BlockMen/hud_hunger/releases/download/2.x.1/hud_hunger-2_x_1-BlockMen.zip +unzip $MTMOD_SRC_ZIP +sudo mv $MTMOD_UNZ_NAME "$MTMOD_DEST_PATH" +if [ ! -d "$MTMOD_DEST_PATH" ]; then + echo "ERROR: failed to unzip $MTMOD_DEST_PATH, so cannot continue." + exit 1 +fi + + +cd "$HOME/Downloads" +MTMOD_DL_ZIP=master.zip +MTMOD_SRC_ZIP=moreblocks.zip +MTMOD_UNZ_NAME=moreblocks-master +MTMOD_DEST_NAME=moreblocks +MTMOD_DEST_PATH=$MT_MYGAME_MODS_PATH/$MTMOD_DEST_NAME +if [ -d "moreblocks-master" ]; then + rm -Rf moreblocks-master +fi +if [ -f "master.zip" ]; then + rm master.zip +fi +if [ -f "moreblocks.zip" ]; then + rm moreblocks.zip +fi +#wget https://gitorious.com/calinou/moreblocks/archive/master.zip +wget https://github.com/minetest-mods/moreblocks/archive/master.zip +mv $MTMOD_DL_ZIP $MTMOD_SRC_ZIP +unzip $MTMOD_SRC_ZIP +sudo mv -f $MTMOD_UNZ_NAME "$MTMOD_DEST_PATH" +if [ ! -d "$MTMOD_DEST_PATH" ]; then + echo "ERROR: failed to unzip $MTMOD_DEST_PATH, so cannot continue." + exit 1 +fi + + +MTMOD_DL_ZIP=master.zip +MTMOD_SRC_ZIP=pipeworks.zip +MTMOD_UNZ_NAME=pipeworks-master +MTMOD_DEST_NAME=pipeworks +MTMOD_DEST_PATH=$MT_MYGAME_MODS_PATH/$MTMOD_DEST_NAME +if [ -d "$MTMOD_UNZ_NAME" ]; then + rm -Rf "$MTMOD_UNZ_NAME" +fi +if [ -f "$MTMOD_DL_ZIP" ]; then + rm -f "$MTMOD_DL_ZIP" +fi +if [ -f "$MTMOD_SRC_ZIP" ]; then + rm -f "$MTMOD_SRC_ZIP" +fi +wget https://github.com/VanessaE/pipeworks/archive/master.zip +mv $MTMOD_DL_ZIP "$MTMOD_SRC_ZIP" +unzip "$MTMOD_SRC_ZIP" +sudo mv $MTMOD_UNZ_NAME "$MTMOD_DEST_PATH" +if [ ! -d "$MTMOD_DEST_PATH" ]; then + echo "ERROR: failed to unzip $MTMOD_DEST_PATH, so cannot continue." + exit 1 +fi + + +MTMOD_DL_ZIP=master.zip +MTMOD_SRC_ZIP=plantlife_modpack.zip +MTMOD_UNZ_NAME=plantlife_modpack-master +MTMOD_DEST_NAME=plantlife_modpack +MTMOD_DEST_PATH=$MT_MYGAME_MODS_PATH/$MTMOD_DEST_NAME +if [ -d "$MTMOD_UNZ_NAME" ]; then + rm -Rf "$MTMOD_UNZ_NAME" +fi +if [ -f "$MTMOD_DL_ZIP" ]; then + rm -f "$MTMOD_DL_ZIP" +fi +if [ -f "$MTMOD_SRC_ZIP" ]; then + rm -f "$MTMOD_SRC_ZIP" +fi +wget https://github.com/VanessaE/plantlife_modpack/archive/master.zip +mv $MTMOD_DL_ZIP "$MTMOD_SRC_ZIP" +unzip "$MTMOD_SRC_ZIP" +sudo mv $MTMOD_UNZ_NAME "$MTMOD_DEST_PATH" +if [ ! -d "$MTMOD_DEST_PATH" ]; then + echo "ERROR: failed to unzip $MTMOD_DEST_PATH, so cannot continue." + exit 1 +fi + + + +#NOTE: https://forum.minetest.net/viewtopic.php?f=9&t=12368 +# has blocks, but OTHER ONE ONLY HAS DYE (not used): https://forum.minetest.net/viewtopic.php?f=9&t=11287 +cd "$HOME/Downloads" +MTMOD_DL_ZIP=master.zip +MTMOD_SRC_ZIP=lapis_Napiophelios.zip +MTMOD_UNZ_NAME=LapisLazuli-master +MTMOD_DEST_NAME=lapis +MTMOD_DEST_PATH=$MT_MYGAME_MODS_PATH/$MTMOD_DEST_NAME +if [ -d "$MTMOD_UNZ_NAME" ]; then + rm -Rf "$MTMOD_UNZ_NAME" +fi +if [ -f "$MTMOD_DL_ZIP" ]; then + rm -f "$MTMOD_DL_ZIP" +fi +if [ -f "$MTMOD_SRC_ZIP" ]; then + rm -f "$MTMOD_SRC_ZIP" +fi +wget https://github.com/Napiophelios/LapisLazuli/archive/master.zip +mv "$MTMOD_DL_ZIP" "$MTMOD_SRC_ZIP" +unzip "$MTMOD_SRC_ZIP" +sudo mv $MTMOD_UNZ_NAME "$MTMOD_DEST_PATH" +if [ ! -d "$MTMOD_DEST_PATH" ]; then + echo "ERROR: failed to unzip $MTMOD_DEST_PATH, so cannot continue." + exit 1 +fi + +#cd "$HOME/Downloads" +#MTMOD_DL_ZIP=master.zip +#MTMOD_SRC_ZIP=helicopter.zip +#MTMOD_UNZ_NAME=helicopter-master +#MTMOD_DEST_NAME=helicopter +#if [ -f "$MTMOD_DL_ZIP" ]; then +# rm -f "$MTMOD_DL_ZIP" +#fi +#if [ -f "$MTMOD_SRC_ZIP" ]; then +# rm -f "$MTMOD_SRC_ZIP" +#fi +#wget https://github.com/SokolovPavel/helicopter/archive/master.zip +#mv "$MTMOD_DL_ZIP" "$MTMOD_SRC_ZIP" +#unzip "$MTMOD_SRC_ZIP" +#sudo mv "$MTMOD_UNZ_NAME" "$MT_MYGAME_MODS_PATH/$MTMOD_DEST_NAME" +#UNINSTALL since crashes 0.4.13 git 2016-02: +#sudo mv "$MT_MYGAME_MODS_PATH/$MTMOD_DEST_NAME" "$MTMOD_UNZ_NAME" + +MTMOD_DL_ZIP=master.zip +MTMOD_SRC_ZIP=biome_lib.zip +MTMOD_UNZ_NAME=biome_lib-master +MTMOD_DEST_NAME=biome_lib +MTMOD_DEST_PATH=$MT_MYGAME_MODS_PATH/$MTMOD_DEST_NAME +if [ -d "$MTMOD_UNZ_NAME" ]; then + rm -Rf "$MTMOD_UNZ_NAME" +fi +if [ -f "$MTMOD_DL_ZIP" ]; then + rm -f "$MTMOD_DL_ZIP" +fi +if [ -f "$MTMOD_SRC_ZIP" ]; then + rm -f "$MTMOD_SRC_ZIP" +fi +wget https://github.com/VanessaE/biome_lib/archive/master.zip +mv $MTMOD_DL_ZIP "$MTMOD_SRC_ZIP" +unzip "$MTMOD_SRC_ZIP" +sudo mv $MTMOD_UNZ_NAME "$MTMOD_DEST_PATH" +if [ ! -d "$MTMOD_DEST_PATH" ]; then + echo "ERROR: failed to unzip $MTMOD_DEST_PATH, so cannot continue." + exit 1 +fi + +MTMOD_DL_ZIP=master.zip +MTMOD_SRC_ZIP=moretrees.zip +MTMOD_UNZ_NAME=moretrees-master +MTMOD_DEST_NAME=moretrees +MTMOD_DEST_PATH=$MT_MYGAME_MODS_PATH/$MTMOD_DEST_NAME +if [ -d "$MTMOD_UNZ_NAME" ]; then + rm -Rf "$MTMOD_UNZ_NAME" +fi +if [ -f "$MTMOD_DL_ZIP" ]; then + rm -f "$MTMOD_DL_ZIP" +fi +if [ -f "$MTMOD_SRC_ZIP" ]; then + rm -f "$MTMOD_SRC_ZIP" +fi +wget https://github.com/VanessaE/moretrees/archive/master.zip +mv $MTMOD_DL_ZIP "$MTMOD_SRC_ZIP" +unzip "$MTMOD_SRC_ZIP" +sudo mv $MTMOD_UNZ_NAME "$MTMOD_DEST_PATH" +if [ ! -d "$MTMOD_DEST_PATH" ]; then + echo "ERROR: failed to unzip $MTMOD_DEST_PATH, so cannot continue." + exit 1 +fi + + +MTMOD_DL_ZIP=master.zip +MTMOD_SRC_ZIP=minetest-3d_armor.zip +MTMOD_UNZ_NAME=minetest-3d_armor-master +MTMOD_DEST_NAME=3d_armor +MTMOD_DEST_PATH=$MT_MYGAME_MODS_PATH/$MTMOD_DEST_NAME +if [ -d "$MTMOD_UNZ_NAME" ]; then + rm -Rf "$MTMOD_UNZ_NAME" +fi +if [ -f "$MTMOD_DL_ZIP" ]; then + rm -f "$MTMOD_DL_ZIP" +fi +if [ -f "$MTMOD_SRC_ZIP" ]; then + rm -f "$MTMOD_SRC_ZIP" +fi +wget https://github.com/stujones11/minetest-3d_armor/archive/master.zip +mv $MTMOD_DL_ZIP "$MTMOD_SRC_ZIP" +unzip "$MTMOD_SRC_ZIP" +sudo mv $MTMOD_UNZ_NAME "$MTMOD_DEST_PATH" +if [ ! -d "$MTMOD_DEST_PATH" ]; then + echo "ERROR: failed to unzip $MTMOD_DEST_PATH, so cannot continue." + exit 1 +fi +#mv minetest-3d_armor-master minetest-3d_armor_MODPACK +#sudo mv minetest-3d_armor_MODPACK/wieldview $MT_MYGAME_MODS_PATH/wieldview +#sudo mv minetest-3d_armor_MODPACK/3d_armor $MT_MYGAME_MODS_PATH/3d_armor +#sudo mv minetest-3d_armor_MODPACK/shields $MT_MYGAME_MODS_PATH/shields +#echo "load_mod_wieldview = true" >> $MT_MYWORLD_DIR/world.mt +echo "load_mod_3d_armor = true" >> $MT_MYWORLD_DIR/world.mt +#echo "load_mod_shields = true" >> $MT_MYWORLD_DIR/world.mt +#echo "load_mod_technic_armor = false" >> $MT_MYWORLD_DIR/world.mt + +MTMOD_DL_ZIP=master.zip +MTMOD_SRC_ZIP=caverealms.zip +MTMOD_UNZ_NAME=minetest-caverealms-master +MTMOD_DEST_NAME=caverealms +MTMOD_DEST_PATH=$MT_MYGAME_MODS_PATH/$MTMOD_DEST_NAME +if [ -d "$MTMOD_UNZ_NAME" ]; then + rm -Rf "$MTMOD_UNZ_NAME" +fi +if [ -f "$MTMOD_DL_ZIP" ]; then + rm -f "$MTMOD_DL_ZIP" +fi +if [ -f "$MTMOD_SRC_ZIP" ]; then + rm -f "$MTMOD_SRC_ZIP" +fi +wget https://github.com/HeroOfTheWinds/minetest-caverealms/archive/master.zip +mv $MTMOD_DL_ZIP "$MTMOD_SRC_ZIP" +unzip "$MTMOD_SRC_ZIP" +sudo mv $MTMOD_UNZ_NAME "$MTMOD_DEST_PATH" +if [ ! -d "$MTMOD_DEST_PATH" ]; then + echo "ERROR: failed to unzip $MTMOD_DEST_PATH, so cannot continue." + exit 1 +fi + +#if [ -f "master.zip" ]; then + #rm master.zip +#fi +#wget https://github.com/Splizard/minetest-mod-snow/archive/master.zip +#mv master.zip snow.zip +#unzip snow.zip +#mv minetest-mod-snow-master snow +#sudo mv snow "$MT_MYGAME_MODS_PATH/snow" +# (since snow prevents server 0.4.13 git 2016-02-16 from starting): +#sudo mv $MT_MYGAME_MODS_PATH/snow $HOME/Downloads/snow + +MTMOD_DL_ZIP=master.zip +MTMOD_SRC_ZIP=moreores.zip +MTMOD_UNZ_NAME=moreores-master +MTMOD_DEST_NAME=moreores +MTMOD_DEST_PATH=$MT_MYGAME_MODS_PATH/$MTMOD_DEST_NAME +if [ -d "$MTMOD_UNZ_NAME" ]; then + rm -Rf "$MTMOD_UNZ_NAME" +fi +if [ -f "$MTMOD_DL_ZIP" ]; then + rm -f "$MTMOD_DL_ZIP" +fi +if [ -f "$MTMOD_SRC_ZIP" ]; then + rm -f "$MTMOD_SRC_ZIP" +fi +wget https://github.com/Calinou/moreores/archive/master.zip +mv $MTMOD_DL_ZIP "$MTMOD_SRC_ZIP" +unzip "$MTMOD_SRC_ZIP" +sudo mv $MTMOD_UNZ_NAME "$MTMOD_DEST_PATH" +if [ ! -d "$MTMOD_DEST_PATH" ]; then + echo "ERROR: failed to unzip $MTMOD_DEST_PATH, so cannot continue." + exit 1 +fi + +MTMOD_DL_ZIP=master.zip +MTMOD_SRC_ZIP=sprint.zip +MTMOD_UNZ_NAME=sprint-master +MTMOD_DEST_NAME=sprint +MTMOD_DEST_PATH=$MT_MYGAME_MODS_PATH/$MTMOD_DEST_NAME +if [ -d "$MTMOD_UNZ_NAME" ]; then + rm -Rf "$MTMOD_UNZ_NAME" +fi +if [ -f "$MTMOD_DL_ZIP" ]; then + rm -f "$MTMOD_DL_ZIP" +fi +if [ -f "$MTMOD_SRC_ZIP" ]; then + rm -f "$MTMOD_SRC_ZIP" +fi +# sprint https://forum.minetest.net/viewtopic.php?f=9&t=9650 +wget https://github.com/GunshipPenguin/sprint/archive/master.zip +mv $MTMOD_DL_ZIP "$MTMOD_SRC_ZIP" +unzip "$MTMOD_SRC_ZIP" +sudo mv $MTMOD_UNZ_NAME "$MTMOD_DEST_PATH" +if [ ! -d "$MTMOD_DEST_PATH" ]; then + echo "ERROR: failed to unzip $MTMOD_DEST_PATH, so cannot continue." + exit 1 +fi + +#the following is NOT needed, since one of the mods above adds the home gui and home permission (but no /home or /sethome command) +#if [ -f "master.zip" ]; then + #rm master.zip +#fi +#wget https://github.com/cornernote/minetest-home_gui/archive/master.zip +#mv master.zip minetest-home_gui.zip +#unzip minetest-home_gui.zip +#sudo mv minetest-home_gui-master/home_gui "$MT_MYGAME_MODS_PATH/home_gui" + +#echo "snow:snow 255 255 255" >> $HOME/minetest/util/colors.txt +#echo "snow:snow_block 255 255 255" >> $HOME/minetest/util/colors.txt +#echo "snow:ice 144 217 234" >> $HOME/minetest/util/colors.txt + +#sh chunkymap/install-ubuntu.sh + +cd "$HOME/Downloads" +#does NOT have a zip extension when downloaded via wget: +MTMOD_DL_ZIP=master +MTMOD_SRC_ZIP=mesecons_modpack.zip +MTMOD_UNZ_NAME=Jeija-minetest-mod-mesecons-* +MTMOD_DEST_NAME=mesecons +MTMOD_DEST_PATH=$MT_MYGAME_MODS_PATH/$MTMOD_DEST_NAME +#if [ -d "$MTMOD_UNZ_NAME" ]; then +rm -Rf $MTMOD_UNZ_NAME +#fi +if [ -f "$MTMOD_DL_ZIP" ]; then + rm -f "$MTMOD_DL_ZIP" +fi +if [ -f "$MTMOD_SRC_ZIP" ]; then + rm -f "$MTMOD_SRC_ZIP" +fi +wget https://github.com/Jeija/minetest-mod-mesecons/zipball/master +mv master mesecons_modpack.zip +unzip mesecons_modpack.zip +sudo mv -f $MTMOD_UNZ_NAME "$MTMOD_DEST_PATH" +if [ ! -d "$MTMOD_DEST_PATH" ]; then + echo "ERROR: failed to create $MTMOD_DEST_PATH, so cannot continue." + exit 1 +fi +#cd Jeija-minetest-mod-mesecons-* +#sudo mv -f mesecons* "$MT_MYGAME_MODS_PATH/" + +############ REQUIRES MESECONS ############ +##### NEEDED since carts in minetest_game added much of this functionality but not yet startstoprail or detectorrail ##### +#See also carts plus, a fork of carts (the PilzAdam one later added to minetest_game) https://github.com/Kilarin/minetest-mod-carts-plus which adds touring rails, a hand break, switching, and view locking +#NOTE: boost_cart has handbrake (back key), Rail junction switching with the 'right-left' walking keys +#So either install this mod or do (less functionality): +#minetest.register_alias("boost_cart:detectorrail", "carts:rail") +#minetest.register_alias("boost_cart:startstoprail", "carts:powerrail") +#-- carts:brakerail +#-- carts:cart +#-- carts:powerrail +#-- carts:rail +cd "$HOME/Downloads" +MTMOD_DL_ZIP=master.zip +MTMOD_SRC_ZIP=boost_cart.zip +MTMOD_UNZ_NAME=boost_cart-master +MTMOD_DEST_NAME=boost_cart +MTMOD_DEST_PATH=$MT_MYGAME_MODS_PATH/$MTMOD_DEST_NAME +#if [ -d "$MTMOD_UNZ_NAME" ]; then +rm -Rf $MTMOD_UNZ_NAME +#fi +if [ -f "$MTMOD_DL_ZIP" ]; then + rm -f "$MTMOD_DL_ZIP" +fi +if [ -f "$MTMOD_SRC_ZIP" ]; then + rm -f "$MTMOD_SRC_ZIP" +fi +if [ -d "$MTMOD_DEST_PATH" ]; then + rm -Rf "$MTMOD_DEST_PATH" +fi +wget https://github.com/SmallJoker/boost_cart/archive/master.zip +mv $MTMOD_DL_ZIP "$MTMOD_SRC_ZIP" +unzip "$MTMOD_SRC_ZIP" +#https://forum.minetest.net/viewtopic.php?f=11&t=10172&hilit=boost+cart +sudo mv $MTMOD_UNZ_NAME "$MTMOD_DEST_PATH" +if [ ! -d "$MTMOD_DEST_PATH" ]; then + echo "ERROR: failed to unzip $MTMOD_DEST_PATH, so cannot continue." + exit 1 +fi + +cd "$HOME/Downloads" +#MTMOD_DL_ZIP=archive.zip +MTMOD_DL_ZIP=master.zip +#MTMOD_SRC_ZIP=throwing_Echoes91.zip +MTMOD_SRC_ZIP=throwing_MinetestForFun.zip +MTMOD_UNZ_NAME=server-minetestforfun-master/mods/throwing +MTMOD_DEST_NAME=throwing +MTMOD_DEST_PATH=$MT_MYGAME_MODS_PATH/$MTMOD_DEST_NAME +if [ -d "$MTMOD_DEST_PATH" ]; then + echo "Removing old version of throwing..." + sudo rm -Rf $MTMOD_DEST_PATH +fi +echo "Installing MinetestForFun's PvP fork of Echoes91's (NOT Echoes91's Throwing enhanced NOT PilzAdam's NOT Jeija's) Throwing " +if [ -f "throwing_Echoes91.zip" ]; then + rm throwing_Echoes91.zip +fi +#if [ -d "$MTMOD_UNZ_NAME" ]; then +rm -Rf $MTMOD_UNZ_NAME +#fi +if [ -f "$MTMOD_DL_ZIP" ]; then + rm -f "$MTMOD_DL_ZIP" +fi +if [ -f "$MTMOD_SRC_ZIP" ]; then + rm -f "$MTMOD_SRC_ZIP" +fi +#wget https://github.com/PilzAdam/throwing/zipball/master +#wget https://gitlab.com/echoes91/throwing/repository/archive.zip +wget https://github.com/MinetestForFun/server-minetestforfun/archive/master.zip +mv $MTMOD_DL_ZIP "$MTMOD_SRC_ZIP" +unzip "$MTMOD_SRC_ZIP" +sudo mv $MTMOD_UNZ_NAME "$MTMOD_DEST_PATH" +if [ ! -d "$MTMOD_DEST_PATH" ]; then + echo "ERROR: failed to unzip $MTMOD_DEST_PATH, so cannot continue." + exit 1 +fi + +cd "$HOME/Downloads" +#MTMOD_DL_ZIP=* +MTMOD_SRC_ZIP=tsm_mines.zip +#MTMOD_UNZ_NAME=tsm_mines-* +MTMOD_UNZ_NAME=tsm_mines +MTMOD_DEST_NAME=tsm_mines +MTMOD_DEST_PATH=$MT_MYGAME_MODS_PATH/$MTMOD_DEST_NAME +if [ -d tsm_mines ]; then + rm -Rf tsm_mines +fi +if [ -f tsm_mines.zip ]; then + rm tsm_mines.zip +fi +if [ -d tsm_mines_zipped ]; then + rm -Rf tsm_mines_zipped +fi +if [ -d "$MTMOD_DEST_PATH" ]; then + sudo rm -Rf "$MTMOD_DEST_PATH" +fi +#if [ ! -d tsm_mines_zipped ]; then +# mkdir tsm_mines_zipped +#fi +#cd tsm_mines_zipped +#wget http://repo.or.cz/w/tsm_mines.git/snapshot/7ff7f5c24c05b463ecfbf80cbd5e8f6f4a4f4520.zip +#wget http://repo.or.cz/tsm_mines.git/shortlog/refs/heads/master +#mv master master.zip +#unzip master.zip +#unzip * +git clone git://repo.or.cz/tsm_mines.git +sudo mv $MTMOD_UNZ_NAME "$MTMOD_DEST_PATH" +if [ ! -d "$MTMOD_DEST_PATH" ]; then + echo "ERROR: failed to unzip $MTMOD_DEST_PATH, so cannot continue." + exit 1 +fi + +cd "$HOME/Downloads" +#MTMOD_DL_ZIP=* +MTMOD_SRC_ZIP=tsm_railcorridors.zip +#MTMOD_UNZ_NAME=tsm_railcorridors-* +MTMOD_UNZ_NAME=tsm_railcorridors +MTMOD_DEST_NAME=tsm_railcorridors +MTMOD_DEST_PATH=$MT_MYGAME_MODS_PATH/$MTMOD_DEST_NAME +if [ -d $MTMOD_DEST_NAME ]; then + rm -Rf $MTMOD_DEST_NAME +fi +if [ -f $MTMOD_SRC_ZIP ]; then + rm -f $MTMOD_SRC_ZIP +fi +if [ -d tsm_railcorridors_zipped ]; then + rm -Rf tsm_railcorridors_zipped +fi +#if [ ! -d tsm_railcorridors_zipped ]; then +# mkdir tsm_railcorridors_zipped +#fi +if [ -d "$MTMOD_DEST_PATH" ]; then + sudo rm -Rf "$MTMOD_DEST_PATH" +fi +#cd "tsm_railcorridors_zipped" +#wget http://repo.or.cz/w/RailCorridors/tsm_railcorridors.git/snapshot/7fab088e813b777ceddaa56fc980ccc55b0b3f01.zip +git clone git://repo.or.cz/RailCorridors/tsm_railcorridors.git +#unzip * +sudo mv $MTMOD_UNZ_NAME "$MTMOD_DEST_PATH" +if [ ! -d "$MTMOD_DEST_PATH" ]; then + echo "ERROR: failed to unzip $MTMOD_DEST_PATH, so cannot continue." + exit 1 +fi + +cd "$HOME/Downloads" +MTMOD_DL_ZIP=master.zip +MTMOD_SRC_ZIP=fishing_Minetestforfun.zip +MTMOD_UNZ_NAME=fishing-master +MTMOD_DEST_NAME=fishing +MTMOD_DEST_PATH=$MT_MYGAME_MODS_PATH/$MTMOD_DEST_NAME +echo "Installing Minetestforfun's (NOT wulfsdad's) fishing " +echo "Installing Minetestforfun's (NOT wulfsdad's) fishing " >> $MTMOD_SRC_ZIP.txt +#if [ -d "$MTMOD_UNZ_NAME" ]; then +rm -Rf $MTMOD_UNZ_NAME +#fi +if [ -f $MTMOD_DL_ZIP ]; then + rm -f $MTMOD_DL_ZIP +fi +if [ -f $MTMOD_SRC_ZIP ]; then + rm -f $MTMOD_SRC_ZIP +fi +wget https://github.com/MinetestForFun/fishing/archive/master.zip +mv $MTMOD_DL_ZIP $MTMOD_SRC_ZIP +unzip $MTMOD_SRC_ZIP +sudo mv $MTMOD_UNZ_NAME "$MTMOD_DEST_PATH" +if [ ! -d "$MTMOD_DEST_PATH" ]; then + echo "ERROR: failed to unzip $MTMOD_DEST_PATH, so cannot continue." + exit 1 +fi + +cd "$HOME/Downloads" +MTMOD_DL_ZIP=master.zip +MTMOD_SRC_ZIP=compassgps.zip +MTMOD_UNZ_NAME=compassgps-master +MTMOD_DEST_NAME=compassgps +MTMOD_DEST_PATH=$MT_MYGAME_MODS_PATH/$MTMOD_DEST_NAME +echo "Installing Kilarin's compassgps (NOT TeTpaAka, nor Echo, nor PilzAdam compass) " +echo "Installing Kilarin's compassgps (NOT TeTpaAka, nor Echo, nor PilzAdam compass) " >> $MTMOD_SRC_ZIP.txt +#if [ -d "$MTMOD_UNZ_NAME" ]; then +rm -Rf $MTMOD_UNZ_NAME +#fi +if [ -f $MTMOD_DL_ZIP ]; then + rm -f $MTMOD_DL_ZIP +fi +if [ -f $MTMOD_SRC_ZIP ]; then + rm -f $MTMOD_SRC_ZIP +fi +wget https://github.com/Kilarin/compassgps/archive/master.zip +mv $MTMOD_DL_ZIP $MTMOD_SRC_ZIP +unzip $MTMOD_SRC_ZIP +sudo mv $MTMOD_UNZ_NAME "$MTMOD_DEST_PATH" +if [ ! -d "$MTMOD_DEST_PATH" ]; then + echo "ERROR: failed to unzip $MTMOD_DEST_PATH, so cannot continue." + exit 1 +fi + +MTMOD_DL_ZIP=master.zip +MTMOD_SRC_ZIP=whitelist.zip +MTMOD_UNZ_NAME=whitelist-master +MTMOD_DEST_NAME=whitelist +MTMOD_DEST_PATH=$MT_MYGAME_MODS_PATH/$MTMOD_DEST_NAME +echo "Installing ShadowNinja's whitelist " +echo "Installing ShadowNinja's whitelist " >> $MTMOD_SRC_ZIP.txt +#if [ -d "$MTMOD_UNZ_NAME" ]; then +rm -Rf $MTMOD_UNZ_NAME +#fi +if [ -f $MTMOD_DL_ZIP ]; then + rm -f $MTMOD_DL_ZIP +fi +if [ -f $MTMOD_SRC_ZIP ]; then + rm -f $MTMOD_SRC_ZIP +fi +wget https://github.com/ShadowNinja/whitelist/archive/master.zip +mv $MTMOD_DL_ZIP "$MTMOD_SRC_ZIP" +unzip "$MTMOD_SRC_ZIP" +sudo mv $MTMOD_UNZ_NAME "$MTMOD_DEST_PATH" +if [ ! -d "$MTMOD_DEST_PATH" ]; then + echo "ERROR: failed to unzip $MTMOD_DEST_PATH, so cannot continue." + exit 1 +fi + + +#if [ -f playereffects_Wuzzy.zip ]; then +# rm playereffects_Wuzzy.zip +#fi +#if [ -f "3b860c74ae9803f9a979b12c6f6beb74f96ae62c.zip" ]; then +# rm "3b860c74ae9803f9a979b12c6f6beb74f96ae62c.zip" +#fi +#if [ -d "minetest_playereffects-3b860c7" ]; then +# rm -Rf minetest_playereffects-3b860c7 +#fi +#cd "$HOME/Downloads" +#wget http://repo.or.cz/minetest_playereffects.git/snapshot/3b860c74ae9803f9a979b12c6f6beb74f96ae62c.zip +#mv "3b860c74ae9803f9a979b12c6f6beb74f96ae62c.zip" playereffects_Wuzzy.zip +#unzip playereffects_Wuzzy.zip +#sudo mv minetest_playereffects* "$MT_MYGAME_MODS_PATH/playereffects" + +#Byakuren. . + +MTMOD_DL_ZIP=master.zip +MTMOD_SRC_ZIP=monoidal_effects.zip +MTMOD_UNZ_NAME=monoidal_effects-master +MTMOD_DEST_NAME=monoidal_effects +MTMOD_DEST_PATH=$MT_MYGAME_MODS_PATH/$MTMOD_DEST_NAME +#if [ -d "$MTMOD_UNZ_NAME" ]; then +rm -Rf $MTMOD_UNZ_NAME +#fi +if [ -f $MTMOD_DL_ZIP ]; then + rm -f $MTMOD_DL_ZIP +fi +if [ -f $MTMOD_SRC_ZIP ]; then + rm $MTMOD_SRC_ZIP +fi +wget https://github.com/minetest-mods/monoidal_effects/archive/master.zip +mv $MTMOD_DL_ZIP $MTMOD_SRC_ZIP +unzip $MTMOD_SRC_ZIP +sudo mv $MTMOD_UNZ_NAME "$MTMOD_DEST_PATH" +if [ ! -d "$MTMOD_DEST_PATH" ]; then + echo "ERROR: failed to unzip $MTMOD_DEST_PATH, so cannot continue." + exit 1 +fi + +cd "$HOME/Downloads" +MTMOD_DL_ZIP=master +MTMOD_SRC_ZIP=worldedit.zip +MTMOD_UNZ_NAME=Uberi-Minetest-WorldEdit-* +MTMOD_DEST_NAME=worldedit +MTMOD_DEST_PATH=$MT_MYGAME_MODS_PATH/$MTMOD_DEST_NAME +echo "Installing sfan5's " +echo "Installing sfan5's " >> $MTMOD_SRC_ZIP.txt +if [ -f $MTMOD_DL_ZIP ]; then + rm $MTMOD_DL_ZIP +fi +if [ -f $MTMOD_SRC_ZIP ]; then + rm $MTMOD_SRC_ZIP +fi +rm -Rvf $MTMOD_UNZ_NAME +wget https://github.com/Uberi/MineTest-WorldEdit/zipball/master +mv $MTMOD_DL_ZIP "$MTMOD_SRC_ZIP" +unzip "$MTMOD_SRC_ZIP" +sudo mv -f $MTMOD_UNZ_NAME "$MTMOD_DEST_PATH" +if [ ! -d "$MTMOD_DEST_PATH" ]; then + echo "ERROR: failed to unzip $MTMOD_DEST_PATH, so cannot continue." + exit 1 +fi + + +cd "$HOME/Downloads" +MTMOD_DL_ZIP=master.zip +MTMOD_SRC_ZIP=u_skins.zip +MTMOD_UNZ_NAME=minetest-u_skinsdb-master +MTMOD_DEST_NAME=u_skins +MTMOD_DEST_PATH=$MT_MYGAME_MODS_PATH/$MTMOD_DEST_NAME +if [ -f $MTMOD_DL_ZIP ]; then + rm -f $MTMOD_DL_ZIP +fi +if [ -f $MTMOD_SRC_ZIP ]; then + rm -f $MTMOD_SRC_ZIP +fi +rm -Rvf $MTMOD_UNZ_NAME +#NOTE: a skin database is at http://minetest.fensta.bplaced.net/ +#bell07's 2016 (FORK of Krock's fork of dmonty's) u_skins (u_skins is a skin GUI that works with unified_inventory, whereas other skin GUIs often use inventory++) +# Krock's is outdated and has remaining bugs such as in updater: wget https://github.com/SmallJoker/minetest-u_skinsdb/archive/master.zip +wget https://github.com/bell07/minetest-u_skinsdb/archive/master.zip +mv $MTMOD_DL_ZIP "$MTMOD_SRC_ZIP" +unzip "$MTMOD_SRC_ZIP" +sudo mv -f $MTMOD_UNZ_NAME "$MTMOD_DEST_PATH" +if [ ! -d "$MTMOD_DEST_PATH" ]; then + echo "ERROR: failed to unzip $MTMOD_DEST_PATH, so cannot continue." + exit 1 +fi + +# Update skins database: +#(jq is a json processor, required for the updater bash script:) +sudo apt-get install jq +cd "$MTMOD_DEST_PATH" +# cd u_skins #bell07's version is a mod, not a modpack +cd updater + +# Only download entire skins database if you +# REALLY, REALLY MEAN IT: +# ./update_skins_db.sh +# (note, bell07 has the fixed bash script, but the python3 script is still bugged as of 2016-01-29, and the .NET assembly seems to only work for Windows (has meta directory not found error on mono for Linux) + + +#MarkBu's ambience/ambiance ambient sounds (burli on https://forum.minetest.net/viewtopic.php?f=9&t=14814 ) +#cd "$HOME/Downloads" +#MTMOD_DL_ZIP=master.zip +#MTMOD_SRC_ZIP=ambianceplus.zip +#MTMOD_UNZ_NAME=ambianceplus-master +#MTMOD_DEST_NAME=ambianceplus +#MTMOD_DEST_PATH=$MT_MYGAME_MODS_PATH/$MTMOD_DEST_NAME +#if [ -f $MTMOD_DL_ZIP ]; then +# rm -f $MTMOD_DL_ZIP +#fi +#if [ -f $MTMOD_SRC_ZIP ]; then +# rm -f $MTMOD_SRC_ZIP +#fi +#rm -Rvf $MTMOD_UNZ_NAME +#wget https://github.com/MarkuBu/ambianceplus/archive/master.zip +##git clone https://github.com/MarkuBu/ambianceplus.git +#mv $MTMOD_DL_ZIP "$MTMOD_SRC_ZIP" +#unzip "$MTMOD_SRC_ZIP" +#sudo mv -f $MTMOD_UNZ_NAME "$MTMOD_DEST_PATH" +#if [ ! -d "$MTMOD_DEST_PATH" ]; then +# echo "ERROR: failed to unzip $MTMOD_DEST_PATH, so cannot continue." +# exit 1 +#fi + +#tenplus1's ambience/ambiance ambient sounds (fork linked at original's thread at https://forum.minetest.net/viewtopic.php?f=11&t=2807&start=275 ) +cd "$HOME/Downloads" +MTMOD_DL_ZIP=master.zip +MTMOD_SRC_ZIP=ambience.zip +MTMOD_UNZ_NAME=ambience-master +MTMOD_DEST_NAME=ambience +MTMOD_DEST_PATH=$MT_MYGAME_MODS_PATH/$MTMOD_DEST_NAME +if [ -f $MTMOD_DL_ZIP ]; then + rm -f $MTMOD_DL_ZIP +fi +if [ -f $MTMOD_SRC_ZIP ]; then + rm -f $MTMOD_SRC_ZIP +fi +rm -Rvf $MTMOD_UNZ_NAME +wget https://github.com/tenplus1/ambience/archive/master.zip +#git clone https://github.com/tenplus1/ambience.git +mv $MTMOD_DL_ZIP "$MTMOD_SRC_ZIP" +unzip "$MTMOD_SRC_ZIP" +sudo mv -f $MTMOD_UNZ_NAME "$MTMOD_DEST_PATH" +if [ ! -d "$MTMOD_DEST_PATH" ]; then + echo "ERROR: failed to unzip $MTMOD_DEST_PATH, so cannot continue." + exit 1 +fi + + +#[mod-pack] sky critters (for mobs_redo) [mobs_sky] +#requires mobs redo +cd $HOME/Downloads +MTMOD_DL_ZIP=master.zip +MTMOD_SRC_ZIP=mobs_sky.zip +MTMOD_UNZ_NAME=mobs_sky-master +MTMOD_DEST_NAME=mobs_sky +MTMOD_DEST_PATH=$MT_MYGAME_MODS_PATH/$MTMOD_DEST_NAME +#if [ -d "$MTMOD_UNZ_NAME" ]; then +rm -Rf $MTMOD_UNZ_NAME +#fi +if [ -f $MTMOD_DL_ZIP ]; then + rm -f $MTMOD_DL_ZIP +fi +if [ -f $MTMOD_SRC_ZIP ]; then + rm -f $MTMOD_SRC_ZIP +fi +wget https://github.com/blert2112/mobs_sky/archive/master.zip +mv $MTMOD_DL_ZIP "$MTMOD_SRC_ZIP" +unzip "$MTMOD_SRC_ZIP" +sudo mv $MTMOD_UNZ_NAME "$MTMOD_DEST_PATH" +if [ ! -d "$MTMOD_DEST_PATH" ]; then + echo "ERROR: failed to unzip $MTMOD_DEST_PATH, so cannot continue." + exit 1 +fi + +#requires xpanes (now part of minetest_game), fake_fire (or not, since only uses fire:flint_and_steel, and fire is in minetest_game), and mobs redo or creatures +#REPLACES pyramids +cd $HOME/Downloads +MTMOD_DL_ZIP=master.zip +MTMOD_SRC_ZIP=spawners.zip +MTMOD_UNZ_NAME=minetest_gamers-spawners-* +MTMOD_DEST_NAME=spawners +MTMOD_DEST_PATH=$MT_MYGAME_MODS_PATH/$MTMOD_DEST_NAME +#if [ -d "$MTMOD_UNZ_NAME" ]; then +rm -Rf $MTMOD_UNZ_NAME +#fi +if [ -f $MTMOD_DL_ZIP ]; then + rm -f $MTMOD_DL_ZIP +fi +if [ -f $MTMOD_SRC_ZIP ]; then + rm -f $MTMOD_SRC_ZIP +fi +wget https://bitbucket.org/minetest_gamers/spawners/get/master.zip +mv $MTMOD_DL_ZIP "$MTMOD_SRC_ZIP" +unzip "$MTMOD_SRC_ZIP" +#mv minetest_gamers-spawners-* minetest_gamers-spawners +sudo mv $MTMOD_UNZ_NAME "$MTMOD_DEST_PATH" +if [ ! -d "$MTMOD_DEST_PATH" ]; then + echo "ERROR: failed to unzip $MTMOD_DEST_PATH, so cannot continue." + exit 1 +fi +echo "SPAWN_PYRAMIDS = true" > settings.txt +echo "SPAWNERS_GENERATE = true" >> settings.txt +echo "CHESTS_GENERATE = true" >> settings.txt +sudo mv settings.txt "$MTMOD_DEST_PATH/" +echo "NOTE: in spawners, only SPAWNERS_GENERATE or CHESTS_GENERATE, not both (SPAWNERS_GENERATE overrides) spawn in world for now. See thread for updated info: https://forum.minetest.net/viewtopic.php?f=11&t=13857&start=25" +echo "see also expertmm's game-install-enliven-testing-SPAWNERS_BOTH_DEBUG.txt" + + +#REPLACES PilzAdam's, modified by kaeza, maintained by VenessaE; FORMERLY in homedecor_modpack +#forum post: https://forum.minetest.net/viewtopic.php?t=13762 +cd $HOME/Downloads +MTMOD_DL_ZIP=master.zip +MTMOD_SRC_ZIP=signs_lib.zip +MTMOD_UNZ_NAME=signs_lib-master +MTMOD_DEST_NAME=signs_lib +MTMOD_DEST_PATH=$MT_MYGAME_MODS_PATH/$MTMOD_DEST_NAME +#if [ -d "$MTMOD_UNZ_NAME" ]; then +rm -Rf $MTMOD_UNZ_NAME +#fi +if [ -f $MTMOD_DL_ZIP ]; then + rm -f $MTMOD_DL_ZIP +fi +if [ -f $MTMOD_SRC_ZIP ]; then + rm -f $MTMOD_SRC_ZIP +fi +if [ -d "$MTMOD_DEST_PATH" ]; then + sudo rm -Rf "$MTMOD_DEST_PATH" +fi +wget https://github.com/minetest-mods/signs_lib/archive/master.zip +mv $MTMOD_DL_ZIP "$MTMOD_SRC_ZIP" +unzip "$MTMOD_SRC_ZIP" +sudo mv $MTMOD_UNZ_NAME "$MTMOD_DEST_PATH" +if [ ! -d "$MTMOD_DEST_PATH" ]; then + echo "ERROR: failed to unzip $MTMOD_DEST_PATH, so cannot continue." + exit 1 +fi + + + +#cd $HOME/Downloads +#MTMOD_DL_ZIP=master.zip +#MTMOD_SRC_ZIP=minetest-signs_lib-extrafonts.zip +#MTMOD_UNZ_NAME=minetest-signs_lib-extrafonts-master +#MTMOD_DEST_NAME=signs_lib/textures +#MTMOD_DEST_PATH=$MT_MYGAME_MODS_PATH/$MTMOD_DEST_NAME +##if [ -d "$MTMOD_UNZ_NAME" ]; then +#rm -Rf $MTMOD_UNZ_NAME +##fi +#if [ -f $MTMOD_DL_ZIP ]; then +# rm -f $MTMOD_DL_ZIP +#fi +#if [ -f $MTMOD_SRC_ZIP ]; then +# rm -f $MTMOD_SRC_ZIP +#fi +#if [ -d "$MTMOD_DEST_PATH" ]; then +# sudo rm -Rf "$MTMOD_DEST_PATH" +#fi +#wget https://github.com/kaeza/minetest-signs_lib-extrafonts/archive/master.zip +#mv $MTMOD_DL_ZIP "$MTMOD_SRC_ZIP" +#unzip "$MTMOD_SRC_ZIP" +##sudo cp -f $MTMOD_UNZ_NAME/15px/* "$MTMOD_DEST_PATH/" +#sudo cp -f $MTMOD_UNZ_NAME/31px/* "$MTMOD_DEST_PATH/" +#if [ ! -d "$MTMOD_DEST_PATH" ]; then +# echo "ERROR: failed to unzip $MTMOD_DEST_PATH, so cannot continue." +# exit 1 +#fi + + + +cd $HOME/Downloads +MTMOD_DL_ZIP=master.zip +MTMOD_SRC_ZIP=playeranim.zip +MTMOD_UNZ_NAME=playeranim-master +MTMOD_DEST_NAME=playeranim +MTMOD_DEST_PATH=$MT_MYGAME_MODS_PATH/$MTMOD_DEST_NAME +#if [ -d "$MTMOD_UNZ_NAME" ]; then +rm -Rf $MTMOD_UNZ_NAME +#fi +if [ -f $MTMOD_DL_ZIP ]; then + rm -f $MTMOD_DL_ZIP +fi +if [ -f $MTMOD_SRC_ZIP ]; then + rm -f $MTMOD_SRC_ZIP +fi +wget https://github.com/minetest-mods/playeranim/archive/master.zip +mv $MTMOD_DL_ZIP "$MTMOD_SRC_ZIP" +unzip "$MTMOD_SRC_ZIP" +sudo mv $MTMOD_UNZ_NAME "$MTMOD_DEST_PATH" +if [ ! -d "$MTMOD_DEST_PATH" ]; then + echo "ERROR: failed to unzip $MTMOD_DEST_PATH, so cannot continue." + exit 1 +fi + +cd $HOME/Downloads +MTMOD_DL_ZIP=master.zip +MTMOD_SRC_ZIP=homedecor_modpack.zip +MTMOD_UNZ_NAME=homedecor_modpack-master +MTMOD_DEST_NAME=homedecor_modpack +MTMOD_DEST_PATH=$MT_MYGAME_MODS_PATH/$MTMOD_DEST_NAME +#if [ -d "$MTMOD_UNZ_NAME" ]; then +rm -Rf $MTMOD_UNZ_NAME +#fi +if [ -f $MTMOD_DL_ZIP ]; then + rm -f $MTMOD_DL_ZIP +fi +if [ -f $MTMOD_SRC_ZIP ]; then + rm -f $MTMOD_SRC_ZIP +fi +wget https://github.com/minetest-mods/homedecor_modpack/archive/master.zip +mv $MTMOD_DL_ZIP "$MTMOD_SRC_ZIP" +unzip "$MTMOD_SRC_ZIP" +sudo mv $MTMOD_UNZ_NAME "$MTMOD_DEST_PATH" +if [ ! -d "$MTMOD_DEST_PATH" ]; then + echo "ERROR: failed to unzip $MTMOD_DEST_PATH, so cannot continue." + exit 1 +fi + + +#a rather non-maintained mod--forum link is at https://forum.minetest.net/viewtopic.php?id=3663 +cd $HOME/Downloads +MTMOD_DL_ZIP=master.zip +MTMOD_SRC_ZIP=birthstones.zip +MTMOD_UNZ_NAME=birthstones-mod-master +MTMOD_DEST_NAME=birthstones +MTMOD_DEST_PATH=$MT_MYGAME_MODS_PATH/$MTMOD_DEST_NAME +#if [ -d "$MTMOD_UNZ_NAME" ]; then +rm -Rf $MTMOD_UNZ_NAME +#fi +if [ -f $MTMOD_DL_ZIP ]; then + rm -f $MTMOD_DL_ZIP +fi +if [ -f $MTMOD_SRC_ZIP ]; then + rm -f $MTMOD_SRC_ZIP +fi +wget https://github.com/Doc22/birthstones-mod/archive/master.zip +mv $MTMOD_DL_ZIP "$MTMOD_SRC_ZIP" +unzip "$MTMOD_SRC_ZIP" +sudo mv $MTMOD_UNZ_NAME "$MTMOD_DEST_PATH" +if [ ! -d "$MTMOD_DEST_PATH" ]; then + echo "ERROR: failed to unzip $MTMOD_DEST_PATH, so cannot continue." + exit 1 +fi + + + +cd $HOME/Downloads +MTMOD_DL_ZIP=master.zip +MTMOD_SRC_ZIP=bakedclay.zip +MTMOD_UNZ_NAME=bakedclay-master +MTMOD_DEST_NAME=bakedclay +MTMOD_DEST_PATH=$MT_MYGAME_MODS_PATH/$MTMOD_DEST_NAME +#if [ -d "$MTMOD_UNZ_NAME" ]; then +rm -Rf $MTMOD_UNZ_NAME +#fi +if [ -f $MTMOD_DL_ZIP ]; then + rm -f $MTMOD_DL_ZIP +fi +if [ -f $MTMOD_SRC_ZIP ]; then + rm -f $MTMOD_SRC_ZIP +fi +wget https://github.com/tenplus1/bakedclay/archive/master.zip +mv $MTMOD_DL_ZIP "$MTMOD_SRC_ZIP" +unzip "$MTMOD_SRC_ZIP" +sudo mv $MTMOD_UNZ_NAME "$MTMOD_DEST_PATH" +if [ ! -d "$MTMOD_DEST_PATH" ]; then + echo "ERROR: failed to unzip $MTMOD_DEST_PATH, so cannot continue." + exit 1 +fi + +cd $HOME/Downloads +MTMOD_DL_ZIP=master.zip +MTMOD_SRC_ZIP=farming.zip +MTMOD_UNZ_NAME=farming-master +MTMOD_DEST_NAME=farming +MTMOD_DEST_PATH=$MT_MYGAME_MODS_PATH/$MTMOD_DEST_NAME +#if [ -d "$MTMOD_UNZ_NAME" ]; then +rm -Rf $MTMOD_UNZ_NAME +#fi +if [ -f $MTMOD_DL_ZIP ]; then + rm -f $MTMOD_DL_ZIP +fi +if [ -f $MTMOD_SRC_ZIP ]; then + rm -f $MTMOD_SRC_ZIP +fi +if [ -d "$MTMOD_DEST_PATH" ]; then + sudo rm -Rf "$MTMOD_DEST_PATH" +fi +wget https://github.com/tenplus1/farming/archive/master.zip +mv $MTMOD_DL_ZIP "$MTMOD_SRC_ZIP" +unzip "$MTMOD_SRC_ZIP" +sudo mv $MTMOD_UNZ_NAME "$MTMOD_DEST_PATH" +if [ ! -d "$MTMOD_DEST_PATH" ]; then + echo "ERROR: failed to unzip $MTMOD_DEST_PATH, so cannot continue." + exit 1 +fi + + +#Forum post: https://forum.minetest.net/viewtopic.php?f=11&t=10423 +#Wuzzy's slimenodes mod (only available via give). +cd "$HOME/Downloads" +#MTMOD_DL_ZIP=master.zip +#MTMOD_SRC_ZIP=slimenodes.zip +#MTMOD_UNZ_NAME=slimenodes-master +MTMOD_UNZ_NAME=minetest_slimenodes +MTMOD_DEST_NAME=slimenodes +MTMOD_DEST_PATH=$MT_MYGAME_MODS_PATH/$MTMOD_DEST_NAME +#if [ -d "$MTMOD_UNZ_NAME" ]; then +rm -Rf $MTMOD_UNZ_NAME +#fi +if [ -f $MTMOD_DL_ZIP ]; then + rm -f $MTMOD_DL_ZIP +fi +if [ -f $MTMOD_SRC_ZIP ]; then + rm -f $MTMOD_SRC_ZIP +fi +if [ -d "$MTMOD_DEST_PATH" ]; then + sudo rm -Rf "$MTMOD_DEST_PATH" +fi +# web view: http://repo.or.cz/w/minetest_slimenodes.git +git clone git://repo.or.cz/minetest_slimenodes.git +sudo mv $MTMOD_UNZ_NAME "$MTMOD_DEST_PATH" +if [ ! -d "$MTMOD_DEST_PATH" ]; then + echo "ERROR: failed to unzip $MTMOD_DEST_PATH, so cannot continue." + exit 1 +fi + + + +cd $HOME/Downloads +MTMOD_DL_ZIP=file.php?id=6140 +MTMOD_SRC_ZIP=invhack.zip +MTMOD_UNZ_NAME=invhack +MTMOD_DEST_NAME=invhack +MTMOD_DEST_PATH=$MT_MYGAME_MODS_PATH/$MTMOD_DEST_NAME +#if [ -d "$MTMOD_UNZ_NAME" ]; then +rm -Rf $MTMOD_UNZ_NAME +#fi +if [ -f $MTMOD_DL_ZIP ]; then + rm -f $MTMOD_DL_ZIP +fi +if [ -f $MTMOD_SRC_ZIP ]; then + rm -f $MTMOD_SRC_ZIP +fi +if [ -d "$MTMOD_DEST_PATH" ]; then + sudo rm -Rf "$MTMOD_DEST_PATH" +fi +wget https://forum.minetest.net/download/file.php?id=6140 +mv $MTMOD_DL_ZIP "$MTMOD_SRC_ZIP" +unzip "$MTMOD_SRC_ZIP" +sudo mv $MTMOD_UNZ_NAME "$MTMOD_DEST_PATH" +if [ ! -d "$MTMOD_DEST_PATH" ]; then + echo "ERROR: failed to unzip $MTMOD_DEST_PATH, so cannot continue." + exit 1 +fi + + + +cd $HOME/Downloads +MTMOD_DL_ZIP=master.zip +MTMOD_SRC_ZIP=unifieddyes.zip +MTMOD_UNZ_NAME=unifieddyes-master +MTMOD_DEST_NAME=unifieddyes +MTMOD_DEST_PATH=$MT_MYGAME_MODS_PATH/$MTMOD_DEST_NAME +#if [ -d "$MTMOD_UNZ_NAME" ]; then +rm -Rf $MTMOD_UNZ_NAME +#fi +if [ -f $MTMOD_DL_ZIP ]; then + rm -f $MTMOD_DL_ZIP +fi +if [ -f $MTMOD_SRC_ZIP ]; then + rm -f $MTMOD_SRC_ZIP +fi +if [ -d "$MTMOD_DEST_PATH" ]; then + sudo rm -Rf "$MTMOD_DEST_PATH" +fi +wget https://github.com/minetest-mods/unifieddyes/archive/master.zip +mv $MTMOD_DL_ZIP "$MTMOD_SRC_ZIP" +unzip "$MTMOD_SRC_ZIP" +sudo mv $MTMOD_UNZ_NAME "$MTMOD_DEST_PATH" +if [ ! -d "$MTMOD_DEST_PATH" ]; then + echo "ERROR: failed to unzip $MTMOD_DEST_PATH, so cannot continue." + exit 1 +fi + + + + + + + + + +cd "$HOME/Downloads" +MTMOD_DL_ZIP=teleporter_badCommand_jkedit.zip +MTMOD_SRC_ZIP=teleporter.zip +MTMOD_UNZ_NAME=teleporter-master/teleporter +MTMOD_DEST_NAME=teleporter +MTMOD_DEST_PATH=$MT_MYGAME_MODS_PATH/$MTMOD_DEST_NAME +echo "Installing TenPlus1's (NOT Bad_Command_'s) teleporter " +echo "Installing TenPlus1's (NOT Bad_Command_'s) teleporter " >> $MTMOD_SRC_ZIP.txt +if [ -d "teleporter-master" ]; then + rm -Rf "teleporter-master" +fi +#if [ -d "$MTMOD_UNZ_NAME" ]; then +rm -Rf $MTMOD_UNZ_NAME +#fi +if [ -f $MTMOD_DL_ZIP ]; then + rm $MTMOD_DL_ZIP +fi +if [ -f $MTMOD_SRC_ZIP ]; then + rm $MTMOD_SRC_ZIP +fi +#wget https://github.com/Bad-Command/teleporter/archive/master.zip +#TODO: +MTMOD_UNZ_NAME=teleporter +wget http://axlemedia.net/abiyahh/users/TenPlus1/downloads/teleporter_badCommand_jkedit.zip +mv $MTMOD_DL_ZIP $MTMOD_SRC_ZIP +unzip $MTMOD_SRC_ZIP +sudo mv $MTMOD_UNZ_NAME "$MTMOD_DEST_PATH" +if [ ! -d "$MTMOD_DEST_PATH" ]; then + echo "ERROR: failed to unzip $MTMOD_DEST_PATH, so cannot continue." + #exit 1 +fi +rm -Rf teleporter-master + +echo "teleport_perms_to_build = false" >> "$MT_MYWORLD_DIR/world.mt" +#When true, a player has to have the teleport permission to build a teleporter. When false, anyone can build a new teleporter. +echo "teleport_perms_to_configure = false" >> "$MT_MYWORLD_DIR/world.mt" +#When true, a player has to have the teleport permission to configure a teleporter. Players can still build teleporters without this, however the teleporter will be locked to the default location. +echo "teleport_requires_pairing = true" >> "$MT_MYWORLD_DIR/world.mt" +#When true, a teleporter can only be configured to teleport to a location near an existing teleporter. This prevents players from pointing teleporters in to unexplored terrain. +echo "teleport_pairing_check_radius = 2" >> "$MT_MYWORLD_DIR/world.mt" +#Specifies the size of the volume to scan when looking for a paired teleporter. Do not set this to a large value; the number of nodes scanned increases by a power of 3. +echo "teleport_default_coordinates = 0,0,0" >> "$MT_MYWORLD_DIR/world.mt" +#Allows for the default coordinates for new a teleporter to be specified. This is useful when players can build new teleporters, but can't configure them. + +echo "" +echo "" +echo "" +echo "#### $MT_MYWORLD_DIR/world.mt: ####" +cat "$MT_MYWORLD_DIR/world.mt" +echo "### end $MT_MYWORLD_DIR/world.mt ##" +echo "" +echo "" +echo "" +#echo "Remember, if you are using Better HUD + Hunger, add the values for the new meat to hunger.lua" +#echo "--see " +echo "NOTE: hud_hunger/hunger/food.lua now comes with values for food from mobs." +#hud_hunger now includes mobs food (see /usr/local/share/minetest/games/enliven/mods/hud_hunger/hunger/food.lua ) +echo "" +echo "NOW MAKE SURE YOU EDIT $MT_MYGAME_MODS_PATH/protector/init.lua near line 325 to block comment ( --[[ then afterward --]]) the on_rightclick registration (since protection block right-clicked by its owner crashes server)" +echo "Then make sure you login, REMEMBERING to put a password in second box, then logout then:" +echo " nano $MT_MYWORLD_DIR/players/username where username is YOUR username, give yourself the following permissions to edit areas, edit protector blocks (and other protector nodes), and do other things: areas,delprotect,home,noclip,fly,rollback,settime,teleport,bring,fast,password,give,ban,privs,kick,worldedit" +echo " bring: allows to you teleport other players" +echo " ban: allows /ban ip and /unban ip (and /whitelist add player and /whitelist remove player commands if whitelist mod is installed)" +echo " kick: allows /kick player" +echo " privs: allows grant and revoke commands" +echo " delprotect: circumvents protector blocks, including allowing removing them" +echo "" +echo "Also remember to:" +echo " nano $MT_MYGAME_MODS_PATH/teleporter/config.lua" +echo " #then change:" +echo " teleporter.requires_pairing = true" +echo " # also see other lines in this script that wouldn't echo as non-root" +echo " #otherwise people can type any coordinates for destination (approaching infinite distance)!" +echo " * uncomment columns in lapis mod" +echo " * set number = 0 or number = {min=0, max=0} in cme since only using cme for creatures:*_spawner nodes and for compatibility with old worlds" +echo " * remember to /grant yourself invhack and then /giveme invhack:tool for editing player inventories as moderator" +echo " * Make sure client (server done already above) minetest.conf has secure.trusted_mods = advanced_npc" +echo " * Make sure writable minetest conf was successfully written" +echo " over /usr/local/share/minetest/games/enliven/minetest.conf with:" +echo "protector_radius = 7" +echo "protector_pvp = true" +echo "protector_pvp_spawn = 10" +echo "protector_drop = true" +echo "protector_hurt = 1" +echo "" +echo "default_privs = interact,shout,home" +echo "max_users = 50" +echo "motd = \"Actions and chat messages are logged. Visit fcacloud.com/minetest for recipes and live map.\"" +echo "disallow_empty_passwords = true" +echo "" +echo "#not all settings can be changed in this minetest.conf (see minetest.conf.example in THIS folder)" +echo "#some settings can only be changed in client's local copy of minetest.conf (see or login scripts in network)" + diff --git a/etc/change_world_name_manually_first/minetest-mods-install-ENLIVEN.old b/etc/change_world_name_manually_first/minetest-mods-install-ENLIVEN.old new file mode 100644 index 0000000..6188645 --- /dev/null +++ b/etc/change_world_name_manually_first/minetest-mods-install-ENLIVEN.old @@ -0,0 +1,1101 @@ +#!/bin/sh + +#First make sure all folders in $HOME/.minetest are created (I am not sure whether this is required!): +# minetestserver +# Mods were found at https://forum.minetest.net/viewforum.php?f=11 + + +# * Git version uses /home/*/minetest/games and /usr/local/share/minetest/games but the latter is used for minetestserver (minetest-server package) + + +#(Ubuntu 14.04 Trusty Tahr Server) folders were found using: +# cd / +# sudo find -name 'worlds' (worlds folder is in $HOME/.minetest) +# sudo find -name 'minimal' (stable build [such as 0.4.9 games folder is /usr/share/games/minetest/games, but git version games folder is /usr/local/share/minetest/games) + +#NOTE: minetest mods are ALWAYS ONLY installed on server + +USR_SHARE_MINETEST=/usr/share/games/minetest +#IF git version is installed: +if [ -d "/usr/local/share/minetest" ]; then + USR_SHARE_MINETEST=/usr/local/share/minetest +fi +#UNUSED (unknown use): MT_GAMES_DIR=$HOME/.minetest/mods +#intentionally skip the slash in the following line since $USR_SHARE_MINETEST already starts with one: +MT_BACKUP_GAMES_DIR=$HOME/Backup$USR_SHARE_MINETEST/games +MT_GAMES_DIR=$USR_SHARE_MINETEST/games +MT_MYGAME_NAME=ENLIVEN +MT_MYGAME_DIR=$MT_GAMES_DIR/$MT_MYGAME_NAME +#formerly MT_MYGAME_MODDIR: +MT_MYGAME_MODS_PATH=$MT_MYGAME_DIR/mods +MT_MYWORLD_NAME=FCAGameAWorld +MT_MYWORLD_DIR=$HOME/.minetest/worlds/$MT_MYWORLD_NAME + +#BACKUP THE WORLD: +if [ ! -d "$MT_MYGAME_DIR" ]; then + sudo mkdir "$MT_MYGAME_DIR" +fi +if [ -f "$MT_MYWORLD_DIR/world.mt.1st" ]; then + echo "Already backed up world.mt to $MT_MYWORLD_DIR/world.mt.1st" +else + cp "$MT_MYWORLD_DIR/world.mt" "$MT_MYWORLD_DIR/world.mt.1st" + echo "The original world.mt is now backed up at $MT_MYWORLD_DIR/world.mt.1st" +fi +touch "$MT_MYWORLD_DIR/world.mt" +mv -f "$MT_MYWORLD_DIR/world.mt" "$MT_MYWORLD_DIR/world.mt.bak" +# REMAKE world.mt +echo "gameid = $MT_MYGAME_NAME" > "$MT_MYWORLD_DIR/world.mt" +echo "backend = leveldb" >> "$MT_MYWORLD_DIR/world.mt" +#mv "world.mt" $MT_MYWORLD_DIR/world.mt + +#MT_MYGAME_DIR (a Minetest "game") is the equivalent of a Minecraft modpack + +#cd +if [ ! -d "$HOME/Downloads" ]; then + mkdir "$HOME/Downloads" +fi +cd "$HOME/Downloads" + +if [ -d "$MT_MYGAME_DIR BAK" ]; +then + echo "already backed up $MT_MYGAME_DIR" +else + sudo mv "$MT_MYGAME_DIR" "$MT_MYGAME_DIR BAK" +fi + + +#sudo mkdir "$MT_MYGAME_DIR" +#sudo mkdir "$MT_MYGAME_MODS_PATH" +if [ ! -d "$MT_MYGAME_DIR/" ]; then + echo "ERROR: failed to create $MT_MYGAME_DIR, so cannot continue." + exit 1 +fi +#sudo cp -R $USR_SHARE_MINETEST/games/minetest_game/mods/* "$MT_MYGAME_DIR/mods/" +sudo cp -R $USR_SHARE_MINETEST/games/minetest_game/* "$MT_MYGAME_DIR/" + +#wget https://github.com/BlockMen/cme/releases/download/v2.3/cme-2_3-BlockMen.zip +#unzip cme-2_3-BlockMen.zip +#sudo mv cme "$MT_MYGAME_MODS_PATH/cme" +##DO NOT DO THIS (since cme is a modpack): echo "load_mod_cme = true" >> "$MT_MYWORLD_DIR/world.mt" +#echo "#cme Creatures MOB-Engine (cme) is a modpack" >> "$MT_MYWORLD_DIR/world.mt" + +cd "$HOME/Downloads" +MTMOD_DL_ZIP=master.zip +MTMOD_SRC_ZIP=mobs_redo.zip +MTMOD_UNZ_NAME=mobs_redo-master +MTMOD_DEST_NAME=mobs +MTMOD_DEST_PATH=$MT_MYGAME_MODS_PATH/$MTMOD_DEST_NAME +if [ -f $MTMOD_DL_ZIP ]; then + rm $MTMOD_DL_ZIP +fi +if [ -f $MTMOD_SRC_ZIP ]; then + rm $MTMOD_SRC_ZIP +fi +rm -Rvf $MTMOD_UNZ_NAME +echo "Installing TenPlus1's mobs.zip from https://github.com/tenplus1/mobs_redo/archive/master.zip" +echo "Installing TenPlus1's mobs.zip from https://github.com/tenplus1/mobs_redo/archive/master.zip" > mobs.zip.txt +#SEE ALSO RELEASE VERSION (must be logged in to download): https://forum.minetest.net/download/file.php?id=5282 +#wget https://github.com/tenplus1/mobs/archive/master.zip +wget https://github.com/tenplus1/mobs_redo/archive/master.zip +mv $MTMOD_DL_ZIP $MTMOD_SRC_ZIP +unzip $MTMOD_SRC_ZIP +sudo mv $MTMOD_UNZ_NAME "$MTMOD_DEST_PATH" +if [ ! -d "$MTMOD_DEST_PATH" ]; then + echo "ERROR: failed to unzip $MTMOD_DEST_PATH, so cannot continue." + exit 1 +fi +echo "load_mod_mobs = true" >> "$MT_MYWORLD_DIR/world.mt" + + +#the following downloads protector (REDO version posted at https://forum.minetest.net/viewtopic.php?f=11&t=9376) not the original 2012 protector or 2012 fork of 2012 protector +#rm protector.zip +#wget https://forum.minetest.net/download/file.php?id=5046 +#mv -f "file.php?id=5046" protector.zip +#USE GIT VERSION INSTEAD: +cd "$HOME/Downloads" +MTMOD_DL_ZIP=master.zip +MTMOD_SRC_ZIP=protector.zip +MTMOD_UNZ_NAME=protector-master +MTMOD_DEST_NAME=protector +MTMOD_DEST_PATH=$MT_MYGAME_MODS_PATH/$MTMOD_DEST_NAME +if [ -f $MTMOD_DL_ZIP ]; then + rm $MTMOD_DL_ZIP +fi +if [ -f $MTMOD_SRC_ZIP ]; then + rm $MTMOD_SRC_ZIP +fi +rm -Rvf $MTMOD_UNZ_NAME +#as of 2016-02-20, CRASHES on default 0.4.9 minetesterver 0.4.13 git 2016-02-20: +wget https://github.com/tenplus1/protector/archive/master.zip +#expertmm fork to work in above situation: +#wget https://github.com/expertmm/protector/archive/master.zip +#results in UNKNOWN NODE for all protected blocks: wget https://github.com/MinetestForFun/protector/archive/master.zip +mv -f $MTMOD_DL_ZIP $MTMOD_SRC_ZIP +unzip $MTMOD_SRC_ZIP +#sudo rm -Rf "$MT_MYGAME_MODS_PATH/protector-master" +sudo mv $MTMOD_UNZ_NAME "$MTMOD_DEST_PATH" +if [ ! -d "$MTMOD_DEST_PATH" ]; then + echo "ERROR: failed to unzip $MTMOD_DEST_PATH, so cannot continue." + exit 1 +fi + +#sudo su - +#WRITEABLE_MINETEST_CONF=$USR_SHARE_MINETEST/games/$MT_MYGAME_NAME/minetest.conf +WRITEABLE_MINETEST_CONF=$HOME/minetest.conf +rm $HOME/minetest.conf +if [ ! -f "$USR_SHARE_MINETEST/games/$MT_MYGAME_NAME/minetest.conf" ]; then + sudo cp "$USR_SHARE_MINETEST/games/minetest_game/minetest.conf" "$USR_SHARE_MINETEST/games/$MT_MYGAME_NAME/minetest.conf.1st" +fi +cp "$USR_SHARE_MINETEST/games/minetest_game/minetest.conf" "$WRITEABLE_MINETEST_CONF" +touch "$WRITEABLE_MINETEST_CONF" +echo "protector_radius = 5" >> "$WRITEABLE_MINETEST_CONF" +echo "protector_pvp = true" >> "$WRITEABLE_MINETEST_CONF" +echo "protector_pvp_spawn = 10" >> "$WRITEABLE_MINETEST_CONF" +echo "protector_drop = false" >> "$WRITEABLE_MINETEST_CONF" +echo "protector_hurt = 1" >> "$WRITEABLE_MINETEST_CONF" +sudo mv -f $HOME/minetest.conf "$USR_SHARE_MINETEST/games/$MT_MYGAME_NAME/minetest.conf" +echo "load_mod_protector = true" >> $MT_MYWORLD_DIR/world.mt + + +cd "$HOME/Downloads" +MTMOD_DL_ZIP=master.tar.gz +MTMOD_SRC_ZIP=xban2.tar.gz +#MTMOD_UNZ_NAME=minetest-xban2-master +MTMOD_UNZ_NAME=xban2-master +MTMOD_DEST_NAME=xban2 +MTMOD_DEST_PATH=$MT_MYGAME_MODS_PATH/$MTMOD_DEST_NAME +if [ -f $MTMOD_DL_ZIP ]; then + rm $MTMOD_DL_ZIP +fi +if [ -f $MTMOD_SRC_ZIP ]; then + rm $MTMOD_SRC_ZIP +fi +rm -Rvf $MTMOD_UNZ_NAME +wget https://github.com/kaeza/minetest-xban2/archive/master.tar.gz +mv $MTMOD_DL_ZIP $MTMOD_SRC_ZIP +tar -xzvf $MTMOD_SRC_ZIP +# As http://wiki.minetest.net/Installing_Mods specifies, a mod MUST be renamed to official name as in the official thread of the mod: +mv $MTMOD_UNZ_NAME $MTMOD_DEST_NAME +sudo mv $MTMOD_DEST_NAME "$MTMOD_DEST_PATH" +if [ ! -d "$MTMOD_DEST_PATH" ]; then + echo "ERROR: failed to unzip $MTMOD_DEST_PATH, so cannot continue." + exit 1 +fi +echo "load_mod_xban2 = true" >> "$MT_MYWORLD_DIR/world.mt" + +cd "$HOME/Downloads" +MTMOD_DL_ZIP=master.zip +MTMOD_SRC_ZIP=areas.zip +MTMOD_UNZ_NAME=areas-master +MTMOD_DEST_NAME=areas +MTMOD_DEST_PATH=$MT_MYGAME_MODS_PATH/$MTMOD_DEST_NAME +echo "Installing ShadowNinja's " +echo "Installing ShadowNinja's " >> $MTMOD_SRC_ZIP.txt +if [ -f $MTMOD_DL_ZIP ]; then + rm $MTMOD_DL_ZIP +fi +if [ -f $MTMOD_SRC_ZIP ]; then + rm $MTMOD_SRC_ZIP +fi +rm -Rvf $MTMOD_UNZ_NAME +wget https://github.com/ShadowNinja/areas/archive/master.zip +mv $MTMOD_DL_ZIP $MTMOD_SRC_ZIP +unzip $MTMOD_SRC_ZIP +sudo mv $MTMOD_UNZ_NAME "$MTMOD_DEST_PATH" +if [ ! -d "$MTMOD_DEST_PATH" ]; then + echo "ERROR: failed to unzip $MTMOD_DEST_PATH, so cannot continue." + exit 1 +fi +echo "load_mod_areas = true" >> "$MT_MYWORLD_DIR/world.mt" + +if [ -f "$MT_MYGAME_DIR/game.conf.1st" ]; then + echo "Already backed up $MT_MYGAME_DIR/game.conf to $MT_MYGAME_DIR/game.conf.1st" +else + sudo cp "$MT_MYGAME_DIR/game.conf" "$MT_MYGAME_DIR/game.conf.1st" +fi +echo "name = $MT_MYGAME_NAME" > "$HOME/game.conf" +sudo mv -f "$HOME/game.conf" "$MT_MYGAME_DIR/game.conf" +#su - +#FAILS: echo "name = $MT_MYGAME_NAME" > "$MT_MYGAME_DIR/game.conf" +#sudo nano "$MT_MYGAME_DIR/game.conf" +echo "" +echo "You should see $MT_MYGAME_NAME in the list below if the game was configured properly:" +minetestserver --gameid list +echo "" + + +#ls "$MT_MYGAME_MODS_PATH" +if [ ! -d "$MT_BACKUP_GAMES_DIR" ]; then + mkdir -p "$MT_BACKUP_GAMES_DIR" +#-p to make parent recursively +fi + +if [ -d "$MT_BACKUP_GAMES_DIR/minetest_game_1st" ]; then + echo "already backed up $USR_SHARE_MINETEST/games/minetest_game" +else + sudo cp -R "$USR_SHARE_MINETEST/games/minetest_game" "$MT_BACKUP_GAMES_DIR/" +fi +#sudo mv "$USR_SHARE_MINETEST/games/fca-game-a" "$USR_SHARE_MINETEST/games/minetest_game" + +#UNUSED, but install anyway: +MTMOD_DL_ZIP=master.zip +MTMOD_SRC_ZIP=carbone-ng.zip +MTMOD_UNZ_NAME=carbone-ng-master +MTMOD_DEST_NAME=carbone-ng +#MTMOD_DEST_PATH=$MT_MYGAME_MODS_PATH/$MTMOD_DEST_NAME +MTMOD_DEST_PATH=$MT_GAMES_DIR/$MTMOD_DEST_NAME +#if [ -d "$MTMOD_UNZ_NAME" ]; then +rm -Rf $MTMOD_UNZ_NAME +#fi +if [ -f "$MTMOD_DL_ZIP" ]; then + rm "$MTMOD_DL_ZIP" +fi +if [ -f "$MTMOD_SRC_ZIP" ]; then + rm "$MTMOD_SRC_ZIP" +fi +cd "$HOME/Downloads" +wget https://github.com/Calinou/carbone-ng/archive/master.zip +mv $MTMOD_DL_ZIP $MTMOD_SRC_ZIP +unzip $MTMOD_SRC_ZIP +sudo mv $MTMOD_UNZ_NAME "$MTMOD_DEST_PATH" +if [ ! -d "$MTMOD_DEST_PATH" ]; then + echo "ERROR: failed to unzip $MTMOD_DEST_PATH, so cannot continue." + exit 1 +fi + +#sudo cp -R /usr/share/games/minetest/games/carbone-ng /usr/local/share/minetest/games/carbone-ng + +#IF git version is installed: +#if [ -d "/usr/local/share/minetest/games" ]; +#then +#sudo cp -R $USR_SHARE_MINETEST/games/$MT_MYGAME_NAME /usr/local/share/minetest/games/$MT_MYGAME_NAME +#sudo mv $HOME/Downloads/cme /usr/local/share/minetest/games/$MT_MYGAME_NAME/mods/cme +#sudo mv $HOME/Downloads/protector /usr/local/share/minetest/games/$MT_MYGAME_NAME/mods/protector +#fi + +# actually farming REDO as per https://forum.minetest.net/viewtopic.php?f=11&t=9019 +#wget https://forum.minetest.net/download/file.php?id=5045 +#mv "file.php?id=5045" farming.zip +#unzip farming.zip +#sudo rm -Rf $MT_MYGAME_MODS_PATH/farming +#sudo mv farming $MT_MYGAME_MODS_PATH/farming +# breaks 0.4.13 dev version 2016-02-17 (says height_max deprecated, use y_max; and later +#2016-02-17 11:10:19: ERROR[Main]: ModError: Failed to load and run script from $USR_SHARE_MINETEST/games/ENLIVEN/mods/farming/init.lua: +#2016-02-17 11:10:19: ERROR[Main]: ...share/minetest/games/ENLIVEN/mods/farming/pumpkin.lua:78: attempt to perform arithmetic on field 'LIGHT_MAX' (a nil value) +#2016-02-17 11:10:19: ERROR[Main]: stack traceback: +#2016-02-17 11:10:19: ERROR[Main]: ...share/minetest/games/ENLIVEN/mods/farming/pumpkin.lua:78: in main chunk +#2016-02-17 11:10:19: ERROR[Main]: [C]: in function 'dofile' +#2016-02-17 11:10:19: ERROR[Main]: ...al/share/minetest/games/ENLIVEN/mods/farming/init.lua:65: in main chunk +# Remove & overwrite Farming REDO since it crashes 0.4.13 git 2016-02-16: +#sudo rm -Rf $MT_MYGAME_MODS_PATH/farming +#sudo cp -R $USR_SHARE_MINETEST/games/minetest_game/mods/farming $MT_MYGAME_MODS_PATH/farming + +MTMOD_DL_ZIP=master.zip +MTMOD_SRC_ZIP=unified_inventory.zip +MTMOD_UNZ_NAME=unified_inventory-master +MTMOD_DEST_NAME=unified_inventory +MTMOD_DEST_PATH=$MT_MYGAME_MODS_PATH/$MTMOD_DEST_NAME +#if [ -d "$MTMOD_UNZ_NAME" ]; then +rm -Rf $MTMOD_UNZ_NAME +#fi +if [ -f "$MTMOD_DL_ZIP" ]; then + rm "$MTMOD_DL_ZIP" +fi +if [ -f "$MTMOD_SRC_ZIP" ]; then + rm "$MTMOD_SRC_ZIP" +fi +wget https://github.com/minetest-technic/unified_inventory/archive/master.zip +mv $MTMOD_DL_ZIP $MTMOD_SRC_ZIP +unzip $MTMOD_SRC_ZIP +sudo mv $MTMOD_UNZ_NAME "$MTMOD_DEST_PATH" +if [ ! -d "$MTMOD_DEST_PATH" ]; then + echo "ERROR: failed to unzip $MTMOD_DEST_PATH, so cannot continue." + exit 1 +fi +echo "load_mod_unified_inventory = true" >> $MT_MYWORLD_DIR/world.mt + +#uninstall: +#if [ -d "$MT_MYGAME_MODS_PATH/unified_inventory" ]; then +# if [ -d "$HOME/Backup/unified_inventory" ]; then +# rm -Rf "$HOME/Backup/unified_inventory" +# fi +# sudo mv "$MT_MYGAME_MODS_PATH/unified_inventory" "$HOME/Backup/unified_inventory" +#fi +#reinstall: +#sudo mv "$HOME/Backup/unified_inventory" "$MT_MYGAME_MODS_PATH/unified_inventory" + +MTMOD_DL_ZIP=treasurer0.2.0.zip +MTMOD_SRC_ZIP=treasurer0.2.0.zip +MTMOD_UNZ_NAME=treasurer +MTMOD_DEST_NAME=treasurer +MTMOD_DEST_PATH=$MT_MYGAME_MODS_PATH/$MTMOD_DEST_NAME +if [ -f "tsm_gift_example" ]; then + rm "tsm_gift_example" +fi +if [ -f "tsm_chests_example" ]; then + rm "tsm_chests_example" +fi +if [ -f "trm_default_example" ]; then + rm "trm_default_example" +fi +if [ -f "tsm_default_example" ]; then + rm "tsm_default_example" +fi +#if [ -d "$MTMOD_UNZ_NAME" ]; then +rm -Rf $MTMOD_UNZ_NAME +#fi +if [ -f "$MTMOD_DL_ZIP" ]; then + rm "$MTMOD_DL_ZIP" +fi +if [ -f "$MTMOD_SRC_ZIP" ]; then + rm "$MTMOD_SRC_ZIP" +fi +wget http://axlemedia.net/abiyahh/users/Wuzzy/downloads/treasurer0.2.0.zip +unzip $MTMOD_SRC_ZIP +sudo mv -f $MTMOD_UNZ_NAME "$MTMOD_DEST_PATH" +if [ ! -d "$MTMOD_DEST_PATH" ]; then + echo "ERROR: failed to unzip $MTMOD_DEST_PATH, so cannot continue." + exit 1 +fi +echo "load_mod_treasurer = true" >> $MT_MYWORLD_DIR/world.mt + + +MTMOD_DL_ZIP=ebf839579197053b2ead85072757f23158960319.zip +MTMOD_SRC_ZIP=tsm_pyramids.zip +MTMOD_UNZ_NAME=tsm_pyramids-* +MTMOD_DEST_NAME=tsm_pyramids +MTMOD_DEST_PATH=$MT_MYGAME_MODS_PATH/$MTMOD_DEST_NAME +#if [ -d "$MTMOD_UNZ_NAME" ]; then +rm -Rf $MTMOD_UNZ_NAME +#fi +if [ -f "$MTMOD_DL_ZIP" ]; then + rm "$MTMOD_DL_ZIP" +fi +if [ -f "$MTMOD_SRC_ZIP" ]; then + rm "$MTMOD_SRC_ZIP" +fi +wget http://repo.or.cz/w/minetest_pyramids/tsm_pyramids.git/snapshot/ebf839579197053b2ead85072757f23158960319.zip +mv $MTMOD_DL_ZIP $MTMOD_SRC_ZIP +unzip $MTMOD_SRC_ZIP +sudo mv -f $MTMOD_UNZ_NAME "$MTMOD_DEST_PATH" +if [ ! -d "$MTMOD_DEST_PATH" ]; then + echo "ERROR: failed to unzip $MTMOD_DEST_PATH, so cannot continue." + exit 1 +fi + +cd "$HOME/Downloads" +MTMOD_DL_ZIP=akiba-* +wget http://git.akiba.fr:81/minetest/akiba/repository/archive.zip?ref=af571404a27a2cb06842c644930344f565a0b786 +rm $MTMOD_DL_ZIP + +wget https://github.com/MinetestForFun/server-minetestforfun/raw/master/mods/trm_pyramids/depends.txt +wget https://github.com/MinetestForFun/server-minetestforfun/raw/master/mods/trm_pyramids/init.lua +wget https://github.com/MinetestForFun/server-minetestforfun/raw/master/mods/trm_pyramids/more_trms.lua + +cd "$HOME/Downloads" +MTMOD_DL_ZIP=hud_hunger-2_x_1-BlockMen.zip +MTMOD_SRC_ZIP=hud_hunger-2_x_1-BlockMen.zip +MTMOD_UNZ_NAME=hud_hunger +MTMOD_DEST_NAME=hud_hunger +MTMOD_DEST_PATH=$MT_MYGAME_MODS_PATH/$MTMOD_DEST_NAME +#in case someone installed the mods apart from the modpack: +if [ -d "$MT_MYGAME_MODS_PATH/hud" ]; then + sudo rm -Rf "$MT_MYGAME_MODS_PATH/hud" +fi +if [ -d "$MT_MYGAME_MODS_PATH/hunger" ]; then + sudo rm -Rf "$MT_MYGAME_MODS_PATH/hunger" +fi +if [ -f $MTMOD_DL_ZIP ]; then + rm $MTMOD_DL_ZIP +fi +if [ -f $MTMOD_SRC_ZIP ]; then + rm $MTMOD_SRC_ZIP +fi +rm -Rvf $MTMOD_UNZ_NAME +wget https://github.com/BlockMen/hud_hunger/releases/download/2.x.1/hud_hunger-2_x_1-BlockMen.zip +unzip $MTMOD_SRC_ZIP +sudo mv $MTMOD_UNZ_NAME "$MTMOD_DEST_PATH" +if [ ! -d "$MTMOD_DEST_PATH" ]; then + echo "ERROR: failed to unzip $MTMOD_DEST_PATH, so cannot continue." + exit 1 +fi + + +cd "$HOME/Downloads" +MTMOD_DL_ZIP=master.zip +MTMOD_SRC_ZIP=moreblocks.zip +MTMOD_UNZ_NAME=moreblocks-master +MTMOD_DEST_NAME=moreblocks +MTMOD_DEST_PATH=$MT_MYGAME_MODS_PATH/$MTMOD_DEST_NAME +if [ -d "moreblocks-master" ]; then + rm -Rf moreblocks-master +fi +if [ -f "master.zip" ]; then + rm master.zip +fi +if [ -f "moreblocks.zip" ]; then + rm moreblocks.zip +fi +#wget https://gitorious.com/calinou/moreblocks/archive/master.zip +wget https://github.com/minetest-mods/moreblocks/archive/master.zip +mv $MTMOD_DL_ZIP $MTMOD_SRC_ZIP +unzip $MTMOD_SRC_ZIP +sudo mv -f $MTMOD_UNZ_NAME "$MTMOD_DEST_PATH" +if [ ! -d "$MTMOD_DEST_PATH" ]; then + echo "ERROR: failed to unzip $MTMOD_DEST_PATH, so cannot continue." + exit 1 +fi + + +MTMOD_DL_ZIP=master.zip +MTMOD_SRC_ZIP=pipeworks.zip +MTMOD_UNZ_NAME=pipeworks-master +MTMOD_DEST_NAME=pipeworks +MTMOD_DEST_PATH=$MT_MYGAME_MODS_PATH/$MTMOD_DEST_NAME +if [ -d "$MTMOD_UNZ_NAME" ]; then + rm -Rf "$MTMOD_UNZ_NAME" +fi +if [ -f "$MTMOD_DL_ZIP" ]; then + rm "$MTMOD_DL_ZIP" +fi +if [ -f "$MTMOD_SRC_ZIP" ]; then + rm "$MTMOD_SRC_ZIP" +fi +wget https://github.com/VanessaE/pipeworks/archive/master.zip +mv $MTMOD_DL_ZIP "$MTMOD_SRC_ZIP" +unzip "$MTMOD_SRC_ZIP" +sudo mv $MTMOD_UNZ_NAME "$MTMOD_DEST_PATH" +if [ ! -d "$MTMOD_DEST_PATH" ]; then + echo "ERROR: failed to unzip $MTMOD_DEST_PATH, so cannot continue." + exit 1 +fi + + +MTMOD_DL_ZIP=master.zip +MTMOD_SRC_ZIP=plantlife_modpack.zip +MTMOD_UNZ_NAME=plantlife_modpack-master +MTMOD_DEST_NAME=plantlife_modpack +MTMOD_DEST_PATH=$MT_MYGAME_MODS_PATH/$MTMOD_DEST_NAME +if [ -d "$MTMOD_UNZ_NAME" ]; then + rm -Rf "$MTMOD_UNZ_NAME" +fi +if [ -f "$MTMOD_DL_ZIP" ]; then + rm "$MTMOD_DL_ZIP" +fi +if [ -f "$MTMOD_SRC_ZIP" ]; then + rm "$MTMOD_SRC_ZIP" +fi +wget https://github.com/VanessaE/plantlife_modpack/archive/master.zip +mv $MTMOD_DL_ZIP "$MTMOD_SRC_ZIP" +unzip "$MTMOD_SRC_ZIP" +sudo mv $MTMOD_UNZ_NAME "$MTMOD_DEST_PATH" +if [ ! -d "$MTMOD_DEST_PATH" ]; then + echo "ERROR: failed to unzip $MTMOD_DEST_PATH, so cannot continue." + exit 1 +fi + + + +#NOTE: https://forum.minetest.net/viewtopic.php?f=9&t=12368 +# has blocks, but OTHER ONE ONLY HAS DYE (not used): https://forum.minetest.net/viewtopic.php?f=9&t=11287 +cd "$HOME/Downloads" +MTMOD_DL_ZIP=master.zip +MTMOD_SRC_ZIP=lapis_Napiophelios.zip +MTMOD_UNZ_NAME=LapisLazuli-master +MTMOD_DEST_NAME=lapis +MTMOD_DEST_PATH=$MT_MYGAME_MODS_PATH/$MTMOD_DEST_NAME +if [ -d "$MTMOD_UNZ_NAME" ]; then + rm -Rf "$MTMOD_UNZ_NAME" +fi +if [ -f "$MTMOD_DL_ZIP" ]; then + rm "$MTMOD_DL_ZIP" +fi +if [ -f "$MTMOD_SRC_ZIP" ]; then + rm "$MTMOD_SRC_ZIP" +fi +wget https://github.com/Napiophelios/LapisLazuli/archive/master.zip +mv "$MTMOD_DL_ZIP" "$MTMOD_SRC_ZIP" +unzip "$MTMOD_SRC_ZIP" +sudo mv $MTMOD_UNZ_NAME "$MTMOD_DEST_PATH" +if [ ! -d "$MTMOD_DEST_PATH" ]; then + echo "ERROR: failed to unzip $MTMOD_DEST_PATH, so cannot continue." + exit 1 +fi + +#cd "$HOME/Downloads" +#MTMOD_DL_ZIP=master.zip +#MTMOD_SRC_ZIP=helicopter.zip +#MTMOD_UNZ_NAME=helicopter-master +#MTMOD_DEST_NAME=helicopter +#if [ -f "$MTMOD_DL_ZIP" ]; then +# rm "$MTMOD_DL_ZIP" +#fi +#if [ -f "$MTMOD_SRC_ZIP" ]; then +# rm "$MTMOD_SRC_ZIP" +#fi +#wget https://github.com/SokolovPavel/helicopter/archive/master.zip +#mv "$MTMOD_DL_ZIP" "$MTMOD_SRC_ZIP" +#unzip "$MTMOD_SRC_ZIP" +#sudo mv "$MTMOD_UNZ_NAME" "$MT_MYGAME_MODS_PATH/$MTMOD_DEST_NAME" +#UNINSTALL since crashes 0.4.13 git 2016-02: +#sudo mv "$MT_MYGAME_MODS_PATH/$MTMOD_DEST_NAME" "$MTMOD_UNZ_NAME" + +MTMOD_DL_ZIP=master.zip +MTMOD_SRC_ZIP=biome_lib.zip +MTMOD_UNZ_NAME=biome_lib-master +MTMOD_DEST_NAME=biome_lib +MTMOD_DEST_PATH=$MT_MYGAME_MODS_PATH/$MTMOD_DEST_NAME +if [ -d "$MTMOD_UNZ_NAME" ]; then + rm -Rf "$MTMOD_UNZ_NAME" +fi +if [ -f "$MTMOD_DL_ZIP" ]; then + rm "$MTMOD_DL_ZIP" +fi +if [ -f "$MTMOD_SRC_ZIP" ]; then + rm "$MTMOD_SRC_ZIP" +fi +wget https://github.com/VanessaE/biome_lib/archive/master.zip +mv $MTMOD_DL_ZIP "$MTMOD_SRC_ZIP" +unzip "$MTMOD_SRC_ZIP" +sudo mv $MTMOD_UNZ_NAME "$MTMOD_DEST_PATH" +if [ ! -d "$MTMOD_DEST_PATH" ]; then + echo "ERROR: failed to unzip $MTMOD_DEST_PATH, so cannot continue." + exit 1 +fi + + +MTMOD_DL_ZIP=master.zip +MTMOD_SRC_ZIP=moretrees.zip +MTMOD_UNZ_NAME=moretrees-master +MTMOD_DEST_NAME=moretrees +MTMOD_DEST_PATH=$MT_MYGAME_MODS_PATH/$MTMOD_DEST_NAME +if [ -d "$MTMOD_UNZ_NAME" ]; then + rm -Rf "$MTMOD_UNZ_NAME" +fi +if [ -f "$MTMOD_DL_ZIP" ]; then + rm "$MTMOD_DL_ZIP" +fi +if [ -f "$MTMOD_SRC_ZIP" ]; then + rm "$MTMOD_SRC_ZIP" +fi +wget https://github.com/VanessaE/moretrees/archive/master.zip +mv $MTMOD_DL_ZIP "$MTMOD_SRC_ZIP" +unzip "$MTMOD_SRC_ZIP" +sudo mv $MTMOD_UNZ_NAME "$MTMOD_DEST_PATH" +if [ ! -d "$MTMOD_DEST_PATH" ]; then + echo "ERROR: failed to unzip $MTMOD_DEST_PATH, so cannot continue." + exit 1 +fi + + +MTMOD_DL_ZIP=master.zip +MTMOD_SRC_ZIP=minetest-3d_armor.zip +MTMOD_UNZ_NAME=minetest-3d_armor-master +MTMOD_DEST_NAME=3d_armor +MTMOD_DEST_PATH=$MT_MYGAME_MODS_PATH/$MTMOD_DEST_NAME +if [ -d "$MTMOD_UNZ_NAME" ]; then + rm -Rf "$MTMOD_UNZ_NAME" +fi +if [ -f "$MTMOD_DL_ZIP" ]; then + rm "$MTMOD_DL_ZIP" +fi +if [ -f "$MTMOD_SRC_ZIP" ]; then + rm "$MTMOD_SRC_ZIP" +fi +wget https://github.com/stujones11/minetest-3d_armor/archive/master.zip +mv $MTMOD_DL_ZIP "$MTMOD_SRC_ZIP" +unzip "$MTMOD_SRC_ZIP" +sudo mv $MTMOD_UNZ_NAME "$MTMOD_DEST_PATH" +if [ ! -d "$MTMOD_DEST_PATH" ]; then + echo "ERROR: failed to unzip $MTMOD_DEST_PATH, so cannot continue." + exit 1 +fi +#mv minetest-3d_armor-master minetest-3d_armor_MODPACK +#sudo mv minetest-3d_armor_MODPACK/wieldview $MT_MYGAME_MODS_PATH/wieldview +#sudo mv minetest-3d_armor_MODPACK/3d_armor $MT_MYGAME_MODS_PATH/3d_armor +#sudo mv minetest-3d_armor_MODPACK/shields $MT_MYGAME_MODS_PATH/shields +#echo "load_mod_wieldview = true" >> $MT_MYWORLD_DIR/world.mt +echo "load_mod_3d_armor = true" >> $MT_MYWORLD_DIR/world.mt +#echo "load_mod_shields = true" >> $MT_MYWORLD_DIR/world.mt +#echo "load_mod_technic_armor = false" >> $MT_MYWORLD_DIR/world.mt + +MTMOD_DL_ZIP=master.zip +MTMOD_SRC_ZIP=caverealms.zip +MTMOD_UNZ_NAME=minetest-caverealms-master +MTMOD_DEST_NAME=caverealms +MTMOD_DEST_PATH=$MT_MYGAME_MODS_PATH/$MTMOD_DEST_NAME +if [ -d "$MTMOD_UNZ_NAME" ]; then + rm -Rf "$MTMOD_UNZ_NAME" +fi +if [ -f "$MTMOD_DL_ZIP" ]; then + rm "$MTMOD_DL_ZIP" +fi +if [ -f "$MTMOD_SRC_ZIP" ]; then + rm "$MTMOD_SRC_ZIP" +fi +wget https://github.com/HeroOfTheWinds/minetest-caverealms/archive/master.zip +mv $MTMOD_DL_ZIP "$MTMOD_SRC_ZIP" +unzip "$MTMOD_SRC_ZIP" +sudo mv $MTMOD_UNZ_NAME "$MTMOD_DEST_PATH" +if [ ! -d "$MTMOD_DEST_PATH" ]; then + echo "ERROR: failed to unzip $MTMOD_DEST_PATH, so cannot continue." + exit 1 +fi + +#if [ -f "master.zip" ]; then + #rm master.zip +#fi +#wget https://github.com/Splizard/minetest-mod-snow/archive/master.zip +#mv master.zip snow.zip +#unzip snow.zip +#mv minetest-mod-snow-master snow +#sudo mv snow "$MT_MYGAME_MODS_PATH/snow" +# (since snow prevents server 0.4.13 git 2016-02-16 from starting): +#sudo mv $MT_MYGAME_MODS_PATH/snow $HOME/Downloads/snow + +MTMOD_DL_ZIP=master.zip +MTMOD_SRC_ZIP=moreores.zip +MTMOD_UNZ_NAME=moreores-master +MTMOD_DEST_NAME=moreores +MTMOD_DEST_PATH=$MT_MYGAME_MODS_PATH/$MTMOD_DEST_NAME +if [ -d "$MTMOD_UNZ_NAME" ]; then + rm -Rf "$MTMOD_UNZ_NAME" +fi +if [ -f "$MTMOD_DL_ZIP" ]; then + rm "$MTMOD_DL_ZIP" +fi +if [ -f "$MTMOD_SRC_ZIP" ]; then + rm "$MTMOD_SRC_ZIP" +fi +wget https://github.com/Calinou/moreores/archive/master.zip +mv $MTMOD_DL_ZIP "$MTMOD_SRC_ZIP" +unzip "$MTMOD_SRC_ZIP" +sudo mv $MTMOD_UNZ_NAME "$MTMOD_DEST_PATH" +if [ ! -d "$MTMOD_DEST_PATH" ]; then + echo "ERROR: failed to unzip $MTMOD_DEST_PATH, so cannot continue." + exit 1 +fi + +MTMOD_DL_ZIP=master.zip +MTMOD_SRC_ZIP=sprint.zip +MTMOD_UNZ_NAME=sprint-master +MTMOD_DEST_NAME=sprint +MTMOD_DEST_PATH=$MT_MYGAME_MODS_PATH/$MTMOD_DEST_NAME +if [ -d "$MTMOD_UNZ_NAME" ]; then + rm -Rf "$MTMOD_UNZ_NAME" +fi +if [ -f "$MTMOD_DL_ZIP" ]; then + rm "$MTMOD_DL_ZIP" +fi +if [ -f "$MTMOD_SRC_ZIP" ]; then + rm "$MTMOD_SRC_ZIP" +fi +# sprint https://forum.minetest.net/viewtopic.php?f=9&t=9650 +wget https://github.com/GunshipPenguin/sprint/archive/master.zip +mv $MTMOD_DL_ZIP "$MTMOD_SRC_ZIP" +unzip "$MTMOD_SRC_ZIP" +sudo mv $MTMOD_UNZ_NAME "$MTMOD_DEST_PATH" +if [ ! -d "$MTMOD_DEST_PATH" ]; then + echo "ERROR: failed to unzip $MTMOD_DEST_PATH, so cannot continue." + exit 1 +fi + +#the following is NOT needed, since one of the mods above adds the home gui and home permission (but no /home or /sethome command) +#if [ -f "master.zip" ]; then + #rm master.zip +#fi +#wget https://github.com/cornernote/minetest-home_gui/archive/master.zip +#mv master.zip minetest-home_gui.zip +#unzip minetest-home_gui.zip +#sudo mv minetest-home_gui-master/home_gui "$MT_MYGAME_MODS_PATH/home_gui" + +#echo "snow:snow 255 255 255" >> $HOME/minetest/util/colors.txt +#echo "snow:snow_block 255 255 255" >> $HOME/minetest/util/colors.txt +#echo "snow:ice 144 217 234" >> $HOME/minetest/util/colors.txt + +#sh chunkymap/install-ubuntu.sh + +cd "$HOME/Downloads" +#does NOT have a zip extension when downloaded via wget: +MTMOD_DL_ZIP=master +MTMOD_SRC_ZIP=mesecons_modpack.zip +MTMOD_UNZ_NAME=Jeija-minetest-mod-mesecons-* +MTMOD_DEST_NAME=mesecons +MTMOD_DEST_PATH=$MT_MYGAME_MODS_PATH/$MTMOD_DEST_NAME +#if [ -d "$MTMOD_UNZ_NAME" ]; then +rm -Rf $MTMOD_UNZ_NAME +#fi +if [ -f "$MTMOD_DL_ZIP" ]; then + rm "$MTMOD_DL_ZIP" +fi +if [ -f "$MTMOD_SRC_ZIP" ]; then + rm "$MTMOD_SRC_ZIP" +fi +wget https://github.com/Jeija/minetest-mod-mesecons/zipball/master +mv master mesecons_modpack.zip +unzip mesecons_modpack.zip +sudo mv -f $MTMOD_UNZ_NAME "$MTMOD_DEST_PATH" +if [ ! -d "$MTMOD_DEST_PATH" ]; then + echo "ERROR: failed to create $MTMOD_DEST_PATH, so cannot continue." + exit 1 +fi +#cd Jeija-minetest-mod-mesecons-* +#sudo mv -f mesecons* "$MT_MYGAME_MODS_PATH/" + +############ REQUIRES MESECONS ############ +cd "$HOME/Downloads" +MTMOD_DL_ZIP=master.zip +MTMOD_SRC_ZIP=boost_cart.zip +MTMOD_UNZ_NAME=boost_cart-master +MTMOD_DEST_NAME=boost_cart +MTMOD_DEST_PATH=$MT_MYGAME_MODS_PATH/$MTMOD_DEST_NAME +#if [ -d "$MTMOD_UNZ_NAME" ]; then +rm -Rf $MTMOD_UNZ_NAME +#fi +if [ -f "$MTMOD_DL_ZIP" ]; then + rm "$MTMOD_DL_ZIP" +fi +if [ -f "$MTMOD_SRC_ZIP" ]; then + rm "$MTMOD_SRC_ZIP" +fi +wget https://github.com/SmallJoker/boost_cart/archive/master.zip +mv $MTMOD_DL_ZIP "$MTMOD_SRC_ZIP" +unzip "$MTMOD_SRC_ZIP" +#https://forum.minetest.net/viewtopic.php?f=11&t=10172&hilit=boost+cart +sudo mv $MTMOD_UNZ_NAME "$MTMOD_DEST_PATH" +if [ ! -d "$MTMOD_DEST_PATH" ]; then + echo "ERROR: failed to unzip $MTMOD_DEST_PATH, so cannot continue." + exit 1 +fi + +cd "$HOME/Downloads" +#MTMOD_DL_ZIP=archive.zip +MTMOD_DL_ZIP=master.zip +#MTMOD_SRC_ZIP=throwing_Echoes91.zip +MTMOD_SRC_ZIP=throwing_MinetestForFun.zip +MTMOD_UNZ_NAME=server-minetestforfun-master/mods/throwing +MTMOD_DEST_NAME=throwing +MTMOD_DEST_PATH=$MT_MYGAME_MODS_PATH/$MTMOD_DEST_NAME +if [ -d "$MTMOD_DEST_PATH" ]; then + echo "Removing old version of throwing..." + sudo rm -Rf $MTMOD_DEST_PATH +fi +echo "Installing MinetestForFun's PvP fork of Echoes91's (NOT Echoes91's Throwing enhanced NOT PilzAdam's NOT Jeija's) Throwing " +if [ -f "throwing_Echoes91.zip" ]; then + rm throwing_Echoes91.zip +fi +#if [ -d "$MTMOD_UNZ_NAME" ]; then +rm -Rf $MTMOD_UNZ_NAME +#fi +if [ -f "$MTMOD_DL_ZIP" ]; then + rm "$MTMOD_DL_ZIP" +fi +if [ -f "$MTMOD_SRC_ZIP" ]; then + rm "$MTMOD_SRC_ZIP" +fi +#wget https://github.com/PilzAdam/throwing/zipball/master +#wget https://gitlab.com/echoes91/throwing/repository/archive.zip +wget https://github.com/MinetestForFun/server-minetestforfun/archive/master.zip +mv $MTMOD_DL_ZIP "$MTMOD_SRC_ZIP" +unzip "$MTMOD_SRC_ZIP" +sudo mv $MTMOD_UNZ_NAME "$MTMOD_DEST_PATH" +if [ ! -d "$MTMOD_DEST_PATH" ]; then + echo "ERROR: failed to unzip $MTMOD_DEST_PATH, so cannot continue." + exit 1 +fi + +cd "$HOME/Downloads" +#MTMOD_DL_ZIP=* +MTMOD_SRC_ZIP=tsm_mines.zip +MTMOD_UNZ_NAME=tsm_mines-* +MTMOD_DEST_NAME=tsm_mines +MTMOD_DEST_PATH=$MT_MYGAME_MODS_PATH/$MTMOD_DEST_NAME +if [ -d tsm_mines ]; then + rm -Rf tsm_mines +fi +if [ -f tsm_mines.zip ]; then + rm tsm_mines.zip +fi +if [ -d tsm_mines_zipped ]; then + rm -Rf tsm_mines_zipped +fi +if [ ! -d tsm_mines_zipped ]; then + mkdir tsm_mines_zipped +fi +cd tsm_mines_zipped +wget http://repo.or.cz/w/tsm_mines.git/snapshot/7ff7f5c24c05b463ecfbf80cbd5e8f6f4a4f4520.zip +unzip * +sudo mv $MTMOD_UNZ_NAME "$MTMOD_DEST_PATH" +if [ ! -d "$MTMOD_DEST_PATH" ]; then + echo "ERROR: failed to unzip $MTMOD_DEST_PATH, so cannot continue." + exit 1 +fi + +cd "$HOME/Downloads" +#MTMOD_DL_ZIP=* +MTMOD_SRC_ZIP=tsm_railcorridors.zip +MTMOD_UNZ_NAME=tsm_railcorridors-* +MTMOD_DEST_NAME=tsm_railcorridors +MTMOD_DEST_PATH=$MT_MYGAME_MODS_PATH/$MTMOD_DEST_NAME +if [ -d $MTMOD_DEST_NAME ]; then + rm -Rf $MTMOD_DEST_NAME +fi +if [ -f $MTMOD_SRC_ZIP ]; then + rm $MTMOD_SRC_ZIP +fi +if [ -d tsm_railcorridors_zipped ]; then + rm -Rf tsm_railcorridors_zipped +fi +if [ ! -d tsm_railcorridors_zipped ]; then + mkdir tsm_railcorridors_zipped +fi +cd "tsm_railcorridors_zipped" +wget http://repo.or.cz/w/RailCorridors/tsm_railcorridors.git/snapshot/7fab088e813b777ceddaa56fc980ccc55b0b3f01.zip +unzip * +sudo mv $MTMOD_UNZ_NAME "$MTMOD_DEST_PATH" +if [ ! -d "$MTMOD_DEST_PATH" ]; then + echo "ERROR: failed to unzip $MTMOD_DEST_PATH, so cannot continue." + exit 1 +fi + +cd "$HOME/Downloads" +MTMOD_DL_ZIP=master.zip +MTMOD_SRC_ZIP=fishing_Minetestforfun.zip +MTMOD_UNZ_NAME=fishing-master +MTMOD_DEST_NAME=fishing +MTMOD_DEST_PATH=$MT_MYGAME_MODS_PATH/$MTMOD_DEST_NAME +echo "Installing Minetestforfun's (NOT wulfsdad's) fishing " +echo "Installing Minetestforfun's (NOT wulfsdad's) fishing " >> $MTMOD_SRC_ZIP.txt +#if [ -d "$MTMOD_UNZ_NAME" ]; then +rm -Rf $MTMOD_UNZ_NAME +#fi +if [ -f $MTMOD_DL_ZIP ]; then + rm $MTMOD_DL_ZIP +fi +if [ -f $MTMOD_SRC_ZIP ]; then + rm $MTMOD_SRC_ZIP +fi +wget https://github.com/MinetestForFun/fishing/archive/master.zip +mv $MTMOD_DL_ZIP $MTMOD_SRC_ZIP +unzip $MTMOD_SRC_ZIP +sudo mv $MTMOD_UNZ_NAME "$MTMOD_DEST_PATH" +if [ ! -d "$MTMOD_DEST_PATH" ]; then + echo "ERROR: failed to unzip $MTMOD_DEST_PATH, so cannot continue." + exit 1 +fi + +cd "$HOME/Downloads" +MTMOD_DL_ZIP=master.zip +MTMOD_SRC_ZIP=compassgps.zip +MTMOD_UNZ_NAME=compassgps-master +MTMOD_DEST_NAME=compassgps +MTMOD_DEST_PATH=$MT_MYGAME_MODS_PATH/$MTMOD_DEST_NAME +echo "Installing Kilarin's compassgps (NOT TeTpaAka, nor Echo, nor PilzAdam compass) " +echo "Installing Kilarin's compassgps (NOT TeTpaAka, nor Echo, nor PilzAdam compass) " >> $MTMOD_SRC_ZIP.txt +#if [ -d "$MTMOD_UNZ_NAME" ]; then +rm -Rf $MTMOD_UNZ_NAME +#fi +if [ -f $MTMOD_DL_ZIP ]; then + rm $MTMOD_DL_ZIP +fi +if [ -f $MTMOD_SRC_ZIP ]; then + rm $MTMOD_SRC_ZIP +fi +wget https://github.com/Kilarin/compassgps/archive/master.zip +mv $MTMOD_DL_ZIP $MTMOD_SRC_ZIP +unzip $MTMOD_SRC_ZIP +sudo mv $MTMOD_UNZ_NAME "$MTMOD_DEST_PATH" +if [ ! -d "$MTMOD_DEST_PATH" ]; then + echo "ERROR: failed to unzip $MTMOD_DEST_PATH, so cannot continue." + exit 1 +fi + +MTMOD_DL_ZIP=master.zip +MTMOD_SRC_ZIP=whitelist.zip +MTMOD_UNZ_NAME=whitelist-master +MTMOD_DEST_NAME=whitelist +MTMOD_DEST_PATH=$MT_MYGAME_MODS_PATH/$MTMOD_DEST_NAME +echo "Installing ShadowNinja's whitelist " +echo "Installing ShadowNinja's whitelist " >> $MTMOD_SRC_ZIP.txt +#if [ -d "$MTMOD_UNZ_NAME" ]; then +rm -Rf $MTMOD_UNZ_NAME +#fi +if [ -f $MTMOD_DL_ZIP ]; then + rm $MTMOD_DL_ZIP +fi +if [ -f $MTMOD_SRC_ZIP ]; then + rm $MTMOD_SRC_ZIP +fi +wget https://github.com/ShadowNinja/whitelist/archive/master.zip +mv $MTMOD_DL_ZIP "$MTMOD_SRC_ZIP" +unzip "$MTMOD_SRC_ZIP" +sudo mv $MTMOD_UNZ_NAME "$MTMOD_DEST_PATH" +if [ ! -d "$MTMOD_DEST_PATH" ]; then + echo "ERROR: failed to unzip $MTMOD_DEST_PATH, so cannot continue." + exit 1 +fi + +#if [ -f playereffects_Wuzzy.zip ]; then +# rm playereffects_Wuzzy.zip +#fi +#if [ -f "3b860c74ae9803f9a979b12c6f6beb74f96ae62c.zip" ]; then +# rm "3b860c74ae9803f9a979b12c6f6beb74f96ae62c.zip" +#fi +#if [ -d "minetest_playereffects-3b860c7" ]; then +# rm -Rf minetest_playereffects-3b860c7 +#fi +#cd "$HOME/Downloads" +#wget http://repo.or.cz/minetest_playereffects.git/snapshot/3b860c74ae9803f9a979b12c6f6beb74f96ae62c.zip +#mv "3b860c74ae9803f9a979b12c6f6beb74f96ae62c.zip" playereffects_Wuzzy.zip +#unzip playereffects_Wuzzy.zip +#sudo mv minetest_playereffects* "$MT_MYGAME_MODS_PATH/playereffects" + +#Byakuren. . + +MTMOD_DL_ZIP=master.zip +MTMOD_SRC_ZIP=monoidal_effects.zip +MTMOD_UNZ_NAME=monoidal_effects-master +MTMOD_DEST_NAME=monoidal_effects +MTMOD_DEST_PATH=$MT_MYGAME_MODS_PATH/$MTMOD_DEST_NAME +#if [ -d "$MTMOD_UNZ_NAME" ]; then +rm -Rf $MTMOD_UNZ_NAME +#fi +if [ -f $MTMOD_DL_ZIP ]; then + rm $MTMOD_DL_ZIP +fi +if [ -f $MTMOD_SRC_ZIP ]; then + rm $MTMOD_SRC_ZIP +fi +wget https://github.com/minetest-mods/monoidal_effects/archive/master.zip +mv $MTMOD_DL_ZIP $MTMOD_SRC_ZIP +unzip $MTMOD_SRC_ZIP +sudo mv $MTMOD_UNZ_NAME "$MTMOD_DEST_PATH" +if [ ! -d "$MTMOD_DEST_PATH" ]; then + echo "ERROR: failed to unzip $MTMOD_DEST_PATH, so cannot continue." + exit 1 +fi +if [ ! -d "$MTMOD_DEST_PATH" ]; then + echo "ERROR: failed to unzip $MTMOD_DEST_PATH, so cannot continue." + exit 1 +fi + +cd "$HOME/Downloads" +MTMOD_DL_ZIP=master +MTMOD_SRC_ZIP=worldedit.zip +MTMOD_UNZ_NAME=Uberi-Minetest-WorldEdit-* +MTMOD_DEST_NAME=worldedit +MTMOD_DEST_PATH=$MT_MYGAME_MODS_PATH/$MTMOD_DEST_NAME +echo "Installing sfan5's " +echo "Installing sfan5's " >> $MTMOD_SRC_ZIP.txt +if [ -f $MTMOD_DL_ZIP ]; then + rm $MTMOD_DL_ZIP +fi +if [ -f $MTMOD_SRC_ZIP ]; then + rm $MTMOD_SRC_ZIP +fi +rm -Rvf $MTMOD_UNZ_NAME +wget https://github.com/Uberi/MineTest-WorldEdit/zipball/master +mv $MTMOD_DL_ZIP "$MTMOD_SRC_ZIP" +unzip "$MTMOD_SRC_ZIP" +sudo mv -f $MTMOD_UNZ_NAME "$MTMOD_DEST_PATH" +if [ ! -d "$MTMOD_DEST_PATH" ]; then + echo "ERROR: failed to unzip $MTMOD_DEST_PATH, so cannot continue." + exit 1 +fi + + +cd "$HOME/Downloads" +MTMOD_DL_ZIP=master.zip +MTMOD_SRC_ZIP=u_skins.zip +MTMOD_UNZ_NAME=minetest-u_skinsdb-master +MTMOD_DEST_NAME=u_skins +MTMOD_DEST_PATH=$MT_MYGAME_MODS_PATH/$MTMOD_DEST_NAME +if [ -f $MTMOD_DL_ZIP ]; then + rm $MTMOD_DL_ZIP +fi +if [ -f $MTMOD_SRC_ZIP ]; then + rm $MTMOD_SRC_ZIP +fi +rm -Rvf $MTMOD_UNZ_NAME +#NOTE: a skin database is at http://minetest.fensta.bplaced.net/ +#Krock's (NOT dmonty's) u_skins (u_skins is a skin GUI that works with unified_inventory, whereas other skin GUIs often use inventory++) +wget https://github.com/SmallJoker/minetest-u_skinsdb/archive/master.zip +mv $MTMOD_DL_ZIP "$MTMOD_SRC_ZIP" +unzip "$MTMOD_SRC_ZIP" +sudo mv -f $MTMOD_UNZ_NAME "$MTMOD_DEST_PATH" +if [ ! -d "$MTMOD_DEST_PATH" ]; then + echo "ERROR: failed to unzip $MTMOD_DEST_PATH, so cannot continue." + exit 1 +fi + +cd "$HOME/Downloads" +MTMOD_DL_ZIP=teleporter_badCommand_jkedit.zip +MTMOD_SRC_ZIP=teleporter.zip +MTMOD_UNZ_NAME=teleporter-master/teleporter +MTMOD_DEST_NAME=teleporter +MTMOD_DEST_PATH=$MT_MYGAME_MODS_PATH/$MTMOD_DEST_NAME +echo "Installing TenPlus1's (NOT Bad_Command_'s) teleporter " +echo "Installing TenPlus1's (NOT Bad_Command_'s) teleporter " >> $MTMOD_SRC_ZIP.txt +if [ -d "teleporter-master" ]; then + rm -Rf "teleporter-master" +fi +#if [ -d "$MTMOD_UNZ_NAME" ]; then +rm -Rf $MTMOD_UNZ_NAME +#fi +if [ -f $MTMOD_DL_ZIP ]; then + rm $MTMOD_DL_ZIP +fi +if [ -f $MTMOD_SRC_ZIP ]; then + rm $MTMOD_SRC_ZIP +fi +#wget https://github.com/Bad-Command/teleporter/archive/master.zip +#TODO: +MTMOD_UNZ_NAME=teleporter +wget http://axlemedia.net/abiyahh/users/TenPlus1/downloads/teleporter_badCommand_jkedit.zip +mv $MTMOD_DL_ZIP $MTMOD_SRC_ZIP +unzip $MTMOD_SRC_ZIP +sudo mv $MTMOD_UNZ_NAME "$MTMOD_DEST_PATH" +if [ ! -d "$MTMOD_DEST_PATH" ]; then + echo "ERROR: failed to unzip $MTMOD_DEST_PATH, so cannot continue." + #exit 1 +fi + +rm -Rf teleporter-master +echo "teleport_perms_to_build = false" >> "$MT_MYWORLD_DIR/world.mt" +#When true, a player has to have the teleport permission to build a teleporter. When false, anyone can build a new teleporter. +echo "teleport_perms_to_configure = false" >> "$MT_MYWORLD_DIR/world.mt" +#When true, a player has to have the teleport permission to configure a teleporter. Players can still build teleporters without this, however the teleporter will be locked to the default location. +echo "teleport_requires_pairing = true" >> "$MT_MYWORLD_DIR/world.mt" +#When true, a teleporter can only be configured to teleport to a location near an existing teleporter. This prevents players from pointing teleporters in to unexplored terrain. +echo "teleport_pairing_check_radius = 2" >> "$MT_MYWORLD_DIR/world.mt" +#Specifies the size of the volume to scan when looking for a paired teleporter. Do not set this to a large value; the number of nodes scanned increases by a power of 3. +echo "teleport_default_coordinates = 0,0,0" >> "$MT_MYWORLD_DIR/world.mt" +#Allows for the default coordinates for new a teleporter to be specified. This is useful when players can build new teleporters, but can't configure them. + +echo "" +echo "" +echo "" +echo "#### $MT_MYWORLD_DIR/world.mt: ####" +cat "$MT_MYWORLD_DIR/world.mt" +echo "### end $MT_MYWORLD_DIR/world.mt ##" +echo "" +echo "" +echo "" +echo "Remember, if you are using Better HUD + Hunger, add the values for the new meat to hunger.lua" +echo "--see " +echo "" +echo "NOW MAKE SURE YOU EDIT $MT_MYGAME_MODS_PATH/protector/init.lua near line 325 to block comment ( --[[ then afterward --]]) the on_rightclick registration (since protection block right-clicked by its owner crashes server)" +echo "Then make sure you login, REMEMBERING to put a password in second box, then logout then:" +echo " nano $MT_MYWORLD_DIR/players/username where username is YOUR username, give yourself the following permissions to edit areas, edit protector blocks (and other protector nodes), and do other things: areas,delprotect,home,noclip,fly,rollback,settime,teleport,bring,fast,password,give,ban,privs,kick,worldedit" +echo " bring: allows to you teleport other players" +echo " ban: allows /ban ip and /unban ip (and /whitelist add player and /whitelist remove player commands if whitelist mod is installed)" +echo " kick: allows /kick player" +echo " privs: allows grant and revoke commands" +echo " delprotect: circumvents protector blocks, including allowing removing them" +echo "" +echo "Also remember to:" +echo " nano $MT_MYGAME_MODS_PATH/teleporter/config.lua" +echo " #then change:" +echo " teleporter.requires_pairing = true" +echo " #otherwise people can type any coordinates for destination (approaching infinite distance)!" +echo "" diff --git a/etc/change_world_name_manually_first/mts-ENLIVEN b/etc/change_world_name_manually_first/mts-ENLIVEN new file mode 100644 index 0000000..e69c1d7 --- /dev/null +++ b/etc/change_world_name_manually_first/mts-ENLIVEN @@ -0,0 +1,8 @@ +#!/bin/sh +#BROKEN: screen -t MinetestServer minetestserver --gameid minetest_next --draworigin --drawplayers --world FCAWorldMTNext +#BROKEN: screen -t MinetestServer minetestserver --gameid ENLIVEN --worldname FCAGameAWorld +#NOTE: if only title is set, screen -x must be used to resume, so use -S to resume with -r +#screen -S MinetestServer minetestserver --gameid ENLIVEN --worldname FCAGameAWorld +#screen -S MinetestServer /home/owner/minetest/bin/minetestserver --gameid ENLIVEN --worldname FCAGameAWorld +screen -S MinetestServer $HOME/minetest/bin/minetestserver --gameid ENLIVEN --worldname FCAGameAWorld + diff --git a/etc/change_world_name_manually_first/mts-ENLIVEN.old b/etc/change_world_name_manually_first/mts-ENLIVEN.old new file mode 100644 index 0000000..a9190f0 --- /dev/null +++ b/etc/change_world_name_manually_first/mts-ENLIVEN.old @@ -0,0 +1,3 @@ +#!/bin/sh +#BROKEN: screen -t MinetestServer minetestserver --gameid minetest_next --draworigin --drawplayers --world FCAWorldMTNext +screen -t MinetestServer minetestserver --gameid ENLIVEN --worldname FCAGameAWorld \ No newline at end of file diff --git a/etc/change_world_name_manually_first/nightly-sudoer-script b/etc/change_world_name_manually_first/nightly-sudoer-script new file mode 100644 index 0000000..c6d3628 --- /dev/null +++ b/etc/change_world_name_manually_first/nightly-sudoer-script @@ -0,0 +1,8 @@ +#!/bin/sh +#run this as sudoer +killall --signal SIGINT minetestserver +sudo python chunkymap/singleimage.py +./archive-mts-debug +./backup-mts-world +./mts-ENLIVEN +#su - owner /home/owner/mts-ENLIVEN diff --git a/etc/chat-history-mts b/etc/chat-history-mts new file mode 100644 index 0000000..bc2363a --- /dev/null +++ b/etc/chat-history-mts @@ -0,0 +1,2 @@ +#!/bin/sh +grep $HOME/.minetest/debug.txt | grep CHAT diff --git a/etc/debugging/rm-minetest_game-mods-from-ENLIVEN b/etc/debugging/rm-minetest_game-mods-from-ENLIVEN new file mode 100644 index 0000000..a3695dc --- /dev/null +++ b/etc/debugging/rm-minetest_game-mods-from-ENLIVEN @@ -0,0 +1,29 @@ +#!/bin/sh +USR_SHARE_MINETEST=/usr/share/games/minetest +#IF git version is installed: +if [ -d "/usr/local/share/minetest" ]; then + USR_SHARE_MINETEST=/usr/local/share/minetest +fi +#UNUSED (unknown use): MT_GAMES_DIR=$HOME/.minetest/mods +#intentionally skip the slash in the following line since $USR_SHARE_MINETEST already starts with one: +MT_BACKUP_GAMES_DIR=$HOME/Backup$USR_SHARE_MINETEST/games +MT_GAMES_DIR=$USR_SHARE_MINETEST/games +MT_MYGAME_NAME=ENLIVEN +MT_MYGAME_DIR=$MT_GAMES_DIR/$MT_MYGAME_NAME +MT_MYGAME_MODDIR=$MT_MYGAME_DIR/mods +MT_MYWORLD_NAME=FCAGameAWorld +MT_MYWORLD_DIR=$HOME/.minetest/worlds/$MT_MYWORLD_NAME +#sudo mkdir "$MT_MYGAME_DIR" + +if [ -d "$MT_MYGAME_DIR/mods" ]; then + cd "$MT_MYGAME_DIR/mods" + MT_VANILLA_PATH="$USR_SHARE_MINETEST/games/minetest_game" + + MT_VANILLA_MODS_PATH=$MT_VANILLA_PATH/mods + if [ ! -d "$MT_VANILLA_MODS_PATH" ]; then + echo "missing $MT_VANILLA_MODS_PATH" + else + ls "$MT_VANILLA_MODS_PATH" | xargs rm -Rf + #ls "$MT_VANILLA_MODS_PATH" | xargs echo + fi +fi diff --git a/etc/debugging/yelby b/etc/debugging/yelby new file mode 100644 index 0000000..48cac20 --- /dev/null +++ b/etc/debugging/yelby @@ -0,0 +1,93 @@ +breath = 11 +hp = 20 +name = yelby +pitch = 12.09 +position = (-3364.43,175,526.13) +version = 1 +yaw = 93.43 +PlayerArgsEnd +List main 32 +Width 0 +Item default:sword_diamond +Item default:pick_diamond +Item mobs_animal:kitten +Item default:sign_wall_wood 2 +Empty +Empty +Item compassgps:b6 +Item farming:bread 74 +Empty +Empty +Empty +Empty +Empty +Empty +Empty +Empty +Empty +Empty +Empty +Empty +Empty +Empty +Empty +Empty +Empty +Empty +Empty +Empty +Empty +Empty +Empty +Empty +EndInventoryList +List craft 9 +Width 3 +Empty +Empty +Empty +Empty +Empty +Empty +Empty +Empty +Empty +EndInventoryList +List craftpreview 1 +Width 0 +Empty +EndInventoryList +List craftresult 1 +Width 0 +Empty +EndInventoryList +List bag1 1 +Width 0 +Empty +EndInventoryList +List bag2 1 +Width 0 +Empty +EndInventoryList +List bag3 1 +Width 0 +Empty +EndInventoryList +List bag4 1 +Width 0 +Empty +EndInventoryList +List armor 6 +Width 0 +Item 3d_armor:helmet_diamond 1 1600 +Item 3d_armor:chestplate_diamond 1 1600 +Empty +Item 3d_armor:leggings_diamond 1 1600 +Item shields:shield_diamond 1 1600 +Item 3d_armor:boots_diamond 1 1600 +EndInventoryList +List hunger 1 +Width 0 +Item : 16 +EndInventoryList +EndInventory diff --git a/etc/du-show-big b/etc/du-show-big new file mode 100644 index 0000000..3bbf72a --- /dev/null +++ b/etc/du-show-big @@ -0,0 +1,7 @@ +#!/bin/sh +#du -hsx * | sort -rh | head -10 + +#including hidden, but excluding . and ..: +du -hsx .[^.]* * | sort -rh | head -10 + +#see also /var/lib/logrotate for possible HUGE files if logrotate malfunctions diff --git a/etc/game-install-enliven-testing.sh b/etc/game-install-enliven-testing.sh new file mode 100644 index 0000000..ab4015b --- /dev/null +++ b/etc/game-install-enliven-testing.sh @@ -0,0 +1,270 @@ +echo "Installing Enliven TESTING patch (run this after game-install-enliven.sh)" +echo "* You have to manually paste the environment variable settings from the beginning of game-install-enliven.sh here, so you have them." +echo "* Only install these mods if you know what you are doing! These mods may become part of enliven later, but are not thoroughly tested for stability and compatibility. Thanks, expertmm." +echo "Known issues:" +echo "* advanced_npc: 0.4.15 git (Jan 2017) has error with advanced_npc even with secure.enable_security = false ()" +echo "* torches: removes ceiling torches" + +#TODO: +# * possibly add aliases for mobf_traders--Sokomine seems to indicate that this worldgen mod spawns the villagers manually: https://github.com/Sokomine/mg_villages/issues/5 +# * add splash icon AND splash background for Enliven subgame +# * clicking barrel just rotates it (destroying watever you had left in it) +# * try https://github.com/Sokomine/mines_with_shafts and see if has treasure +# * try https://github.com/Sokomine/village_gambit additional village type for mg_villages +# * merge /home and unifiedinventory home (and make both require home priv) + +#TODO for enliven main branch: +# * shift click to pull out maximum number of items you can create (such as multiple stacks of stairs from wood) +# * kick players at certain time intervals (if play span when logged in is not current play span, then kick) such as for schools +# * remove recipe for flint&steel (obsidian shard+Wrought Iron Ingot [default:steel_ingot]) +# * detect whether tnt is disabled, and make obtaining it obtain a note or something (or somehow disable spawning of item in rail corridor chests where I found some) +# * rename minetest-chunkymap to minetestoffline or something +# * add recommended minetest.conf settings (provide python script to test, requiring minetestoffline) +# * analyze game-install-enliven-testing-FULLDEBUG.txt +# * possibly disable fire:flint_and_steel usage other than fake fire (fake fire fork used is in homedecor_modpack) +# * make spawners have drops -- similar drops as [cme] creatures:*_spawner +# * test whether abandoned mines will still be littered with empty chests if CHESTS_GENERATE or SPAWNERS_GENERATE instead of both are on in settings.txt in spawners mod folder (mine chests had stuff before adding spawners mod [mobs mod had been added]) +# * make bones write where&whose bones were placed to log (see "dungeon spawner placed at" in spawners for lua example) +# * resolve mg_villages error: +#2017-01-30 03:08:37: ERROR[Main]: ServerError: AsyncErr: ServerThread::run Lua: Runtime error from mod 'default' in callback item_OnPlace(): ...e/minetest/games/enliven/mods/mg_villages/protection.lua:215: attempt to concatenate field 'mts_path' (a nil value) +#2017-01-30 03:08:37: ERROR[Main]: stack traceback: +#2017-01-30 03:08:37: ERROR[Main]: ...e/minetest/games/enliven/mods/mg_villages/protection.lua:215: in function 'on_rightclick' +#2017-01-30 03:08:37: ERROR[Main]: ...ocal/share/minetest/games/enliven/mods/default/torch.lua:67: in function <...ocal/share/minetest/games/enliven/mods/default/#torch.lua:61> +#2017-01-30 03:08:37: ACTION[Server]: singleplayer leaves game. List of players: +#2017-01-30 03:08:37: ACTION[Main]: [fishing] Server shuts down. saving trophies table +# * resolve issue where signslib uses small Helvetica Narrow font even if extrafonts is used properly by 31px/* (largest) being copied to signslib/textures/ (see below) +# * check whether special_picks large picks can break protection +# * change uses of maxwear=x to uses=1/x as per minetest server startup warnings: plantlife_modpack/vines/shear.lua and worldedit_commands/wand.lua +# * sometimes sorting compassgps by location crashes (only on the included user file named yelby in the etc folder) + +#used by mg_villages fork by Sokomine +cd $HOME/Downloads +MTMOD_DL_ZIP=master.zip +MTMOD_SRC_ZIP=handle_schematics.zip +MTMOD_UNZ_NAME=handle_schematics-master +MTMOD_DEST_NAME=handle_schematics +MTMOD_DEST_PATH=$MT_MYGAME_MODS_PATH/$MTMOD_DEST_NAME +#if [ -d "$MTMOD_UNZ_NAME" ]; then +rm -Rf $MTMOD_UNZ_NAME +#fi +if [ -f $MTMOD_DL_ZIP ]; then + rm -f $MTMOD_DL_ZIP +fi +if [ -f $MTMOD_SRC_ZIP ]; then + rm -f $MTMOD_SRC_ZIP +fi +if [ -d "$MTMOD_DEST_PATH" ]; then + sudo rm -Rf "$MTMOD_DEST_PATH" +fi +wget https://github.com/Sokomine/handle_schematics/archive/master.zip +mv $MTMOD_DL_ZIP "$MTMOD_SRC_ZIP" +unzip "$MTMOD_SRC_ZIP" +sudo mv $MTMOD_UNZ_NAME "$MTMOD_DEST_PATH" +if [ ! -d "$MTMOD_DEST_PATH" ]; then + echo "ERROR: failed to unzip $MTMOD_DEST_PATH, so cannot continue." + exit 1 +fi + +cd $HOME/Downloads +MTMOD_DL_ZIP=master.zip +MTMOD_SRC_ZIP=torches.zip +MTMOD_UNZ_NAME=torches-master +MTMOD_DEST_NAME=torches +MTMOD_DEST_PATH=$MT_MYGAME_MODS_PATH/$MTMOD_DEST_NAME +#if [ -d "$MTMOD_UNZ_NAME" ]; then +rm -Rf $MTMOD_UNZ_NAME +#fi +if [ -f $MTMOD_DL_ZIP ]; then + rm -f $MTMOD_DL_ZIP +fi +if [ -f $MTMOD_SRC_ZIP ]; then + rm -f $MTMOD_SRC_ZIP +fi +if [ -d "$MTMOD_DEST_PATH" ]; then + sudo rm -Rf "$MTMOD_DEST_PATH" +fi +wget https://github.com/BlockMen/torches/archive/master.zip +mv $MTMOD_DL_ZIP "$MTMOD_SRC_ZIP" +unzip "$MTMOD_SRC_ZIP" +sudo mv $MTMOD_UNZ_NAME "$MTMOD_DEST_PATH" +if [ ! -d "$MTMOD_DEST_PATH" ]; then + echo "ERROR: failed to unzip $MTMOD_DEST_PATH, so cannot continue." + exit 1 +fi + + + + + +cd $HOME/Downloads +MTMOD_DL_ZIP=master.zip +MTMOD_SRC_ZIP=moresnow.zip +MTMOD_UNZ_NAME=moresnow-master +MTMOD_DEST_NAME=moresnow +MTMOD_DEST_PATH=$MT_MYGAME_MODS_PATH/$MTMOD_DEST_NAME +#if [ -d "$MTMOD_UNZ_NAME" ]; then +rm -Rf $MTMOD_UNZ_NAME +#fi +if [ -f $MTMOD_DL_ZIP ]; then + rm -f $MTMOD_DL_ZIP +fi +if [ -f $MTMOD_SRC_ZIP ]; then + rm -f $MTMOD_SRC_ZIP +fi +if [ -d "$MTMOD_DEST_PATH" ]; then + sudo rm -Rf "$MTMOD_DEST_PATH" +fi +wget https://github.com/Sokomine/moresnow/archive/master.zip +mv $MTMOD_DL_ZIP "$MTMOD_SRC_ZIP" +unzip "$MTMOD_SRC_ZIP" +sudo mv $MTMOD_UNZ_NAME "$MTMOD_DEST_PATH" +if [ ! -d "$MTMOD_DEST_PATH" ]; then + echo "ERROR: failed to unzip $MTMOD_DEST_PATH, so cannot continue." + exit 1 +fi + + + +echo "Installing adrido's (NOT MasterGollum's which is incompatible with moreblocks) darkage..." +#linked from MasterGollum's: https://forum.minetest.net/viewtopic.php?id=3213 +cd $HOME/Downloads +MTMOD_DL_ZIP=master.zip +MTMOD_SRC_ZIP=darkage.zip +MTMOD_UNZ_NAME=darkage-master +MTMOD_DEST_NAME=darkage +MTMOD_DEST_PATH=$MT_MYGAME_MODS_PATH/$MTMOD_DEST_NAME +#if [ -d "$MTMOD_UNZ_NAME" ]; then +rm -Rf $MTMOD_UNZ_NAME +#fi +if [ -f $MTMOD_DL_ZIP ]; then + rm -f $MTMOD_DL_ZIP +fi +if [ -f $MTMOD_SRC_ZIP ]; then + rm -f $MTMOD_SRC_ZIP +fi +if [ -d "$MTMOD_DEST_PATH" ]; then + sudo rm -Rf "$MTMOD_DEST_PATH" +fi +wget https://github.com/adrido/darkage/archive/master.zip +mv $MTMOD_DL_ZIP "$MTMOD_SRC_ZIP" +unzip "$MTMOD_SRC_ZIP" +sudo mv $MTMOD_UNZ_NAME "$MTMOD_DEST_PATH" +if [ ! -d "$MTMOD_DEST_PATH" ]; then + echo "ERROR: failed to unzip $MTMOD_DEST_PATH, so cannot continue." + exit 1 +fi + +cd $HOME/Downloads +MTMOD_DL_ZIP=master.zip +MTMOD_SRC_ZIP=cottages.zip +MTMOD_UNZ_NAME=cottages-master +MTMOD_DEST_NAME=cottages +MTMOD_DEST_PATH=$MT_MYGAME_MODS_PATH/$MTMOD_DEST_NAME +#if [ -d "$MTMOD_UNZ_NAME" ]; then +rm -Rf $MTMOD_UNZ_NAME +#fi +if [ -f $MTMOD_DL_ZIP ]; then + rm -f $MTMOD_DL_ZIP +fi +if [ -f $MTMOD_SRC_ZIP ]; then + rm -f $MTMOD_SRC_ZIP +fi +if [ -d "$MTMOD_DEST_PATH" ]; then + sudo rm -Rf "$MTMOD_DEST_PATH" +fi +wget https://github.com/Sokomine/cottages/archive/master.zip +mv $MTMOD_DL_ZIP "$MTMOD_SRC_ZIP" +unzip "$MTMOD_SRC_ZIP" +sudo mv $MTMOD_UNZ_NAME "$MTMOD_DEST_PATH" +if [ ! -d "$MTMOD_DEST_PATH" ]; then + echo "ERROR: failed to unzip $MTMOD_DEST_PATH, so cannot continue." + exit 1 +fi + + +#forum post (Sokomine's mg_villages provides villages for all mapgens and is based on is fork of Nores mg mapgen): https://forum.minetest.net/viewtopic.php?f=9&t=13116 +cd $HOME/Downloads +MTMOD_DL_ZIP=master.zip +MTMOD_SRC_ZIP=mg_villages.zip +MTMOD_UNZ_NAME=mg_villages-master +MTMOD_DEST_NAME=mg_villages +MTMOD_DEST_PATH=$MT_MYGAME_MODS_PATH/$MTMOD_DEST_NAME +#if [ -d "$MTMOD_UNZ_NAME" ]; then +rm -Rf $MTMOD_UNZ_NAME +#fi +if [ -f $MTMOD_DL_ZIP ]; then + rm -f $MTMOD_DL_ZIP +fi +if [ -f $MTMOD_SRC_ZIP ]; then + rm -f $MTMOD_SRC_ZIP +fi +if [ -d "$MTMOD_DEST_PATH" ]; then + sudo rm -Rf "$MTMOD_DEST_PATH" +fi +wget https://github.com/Sokomine/mg_villages/archive/master.zip +mv $MTMOD_DL_ZIP "$MTMOD_SRC_ZIP" +unzip "$MTMOD_SRC_ZIP" +sudo mv $MTMOD_UNZ_NAME "$MTMOD_DEST_PATH" +if [ ! -d "$MTMOD_DEST_PATH" ]; then + echo "ERROR: failed to unzip $MTMOD_DEST_PATH, so cannot continue." + exit 1 +fi + + +cd $HOME/Downloads +MTMOD_DL_ZIP=master.zip +MTMOD_SRC_ZIP=advanced_npc.zip +MTMOD_UNZ_NAME=advanced_npc-master +MTMOD_DEST_NAME=advanced_npc +MTMOD_DEST_PATH=$MT_MYGAME_MODS_PATH/$MTMOD_DEST_NAME +#if [ -d "$MTMOD_UNZ_NAME" ]; then +rm -Rf $MTMOD_UNZ_NAME +#fi +if [ -f $MTMOD_DL_ZIP ]; then + rm -f $MTMOD_DL_ZIP +fi +if [ -f $MTMOD_SRC_ZIP ]; then + rm -f $MTMOD_SRC_ZIP +fi +if [ -d "$MTMOD_DEST_PATH" ]; then + sudo rm -Rf "$MTMOD_DEST_PATH" +fi +wget https://github.com/hkzorman/advanced_npc/archive/master.zip +mv $MTMOD_DL_ZIP "$MTMOD_SRC_ZIP" +unzip "$MTMOD_SRC_ZIP" +sudo mv $MTMOD_UNZ_NAME "$MTMOD_DEST_PATH" +if [ ! -d "$MTMOD_DEST_PATH" ]; then + echo "ERROR: failed to unzip $MTMOD_DEST_PATH, so cannot continue." + exit 1 +fi + + +#forum post (special_picks by cx384): https://forum.minetest.net/viewtopic.php?f=11&t=9574 +cd $HOME/Downloads +MTMOD_DL_ZIP=master.zip +MTMOD_SRC_ZIP=special_picks.zip +MTMOD_UNZ_NAME=special_picks-master +MTMOD_DEST_NAME=special_picks +MTMOD_DEST_PATH=$MT_MYGAME_MODS_PATH/$MTMOD_DEST_NAME +#if [ -d "$MTMOD_UNZ_NAME" ]; then +rm -Rf $MTMOD_UNZ_NAME +#fi +if [ -f $MTMOD_DL_ZIP ]; then + rm -f $MTMOD_DL_ZIP +fi +if [ -f $MTMOD_SRC_ZIP ]; then + rm -f $MTMOD_SRC_ZIP +fi +if [ -d "$MTMOD_DEST_PATH" ]; then + sudo rm -Rf "$MTMOD_DEST_PATH" +fi +wget https://github.com/cx384/special_picks/archive/master.zip +mv $MTMOD_DL_ZIP "$MTMOD_SRC_ZIP" +unzip "$MTMOD_SRC_ZIP" +sudo mv $MTMOD_UNZ_NAME "$MTMOD_DEST_PATH" +if [ ! -d "$MTMOD_DEST_PATH" ]; then + echo "ERROR: failed to unzip $MTMOD_DEST_PATH, so cannot continue." + exit 1 +fi + + diff --git a/etc/minetestserver-install-git-ENABLE_REDIS b/etc/minetestserver-install-git-ENABLE_REDIS new file mode 100644 index 0000000..0e7e15e --- /dev/null +++ b/etc/minetestserver-install-git-ENABLE_REDIS @@ -0,0 +1,19 @@ +#sudo apt-get install libncurses5-dev libgettextpo-dev doxygen libspatialindex-dev lua-redis-dev gettext + +sudo apt-get install build-essential cmake git libirrlicht-dev libbz2-dev libgettextpo-dev libfreetype6-dev libpng12-dev libjpeg8-dev libxxf86vm-dev libgl1-mesa-dev libsqlite3-dev libogg-dev libvorbis-dev libopenal-dev libhiredis-dev libcurl3-dev +#above is from http://dev.minetest.net/Compiling_Minetest#Compiling_on_GNU.2FLinux + +#as per : +sudo add-apt-repository ppa:chris-lea/redis-server +sudo apt-get update +sudo apt-get install redis-server + + +#if you skip the above, the below says missing: GetText, Curses, ncurses, Redis, SpatialIndex, Doxygen +#cd "$HOME" #done below by parameterless "cd" command +sudo apt-get install -y git build-essential libirrlicht-dev libgettextpo0 libfreetype6-dev cmake libbz2-dev libpng12-dev libjpeg8-dev libxxf86vm-dev libgl1-mesa-dev libsqlite3-dev libogg-dev libvorbis-dev libopenal-dev libcurl4-openssl-dev libluajit-5.1-dev liblua5.1-0-dev libleveldb-dev; cd; git clone https://github.com/minetest/minetest.git; cd minetest/games; git clone https://github.com/minetest/minetest_game.git; cd ..; cmake . -DENABLE_GETTEXT=1 -DENABLE_FREETYPE=1 -DENABLE_LEVELDB=1 -DENABLE_REDIS=1 -DBUILD_SERVER=TRUE -DBUILD_CLIENT=FALSE; make -j$(nproc); sudo make install; +# minetest; +echo -e "\n\n\e[1;33mYou can run Minetest Server by typing \"minetestserver\" in a terminal.\e[0m" +echo "Remember to add requirepass to /etc/redis/redis.conf -- a long password since redis is fast and can be bruteforced quickly" +# based on https://forum.minetest.net/viewtopic.php?f=42&t=3837 (below) +# sudo apt-get install -y git build-essential libirrlicht-dev libgettextpo0 libfreetype6-dev cmake libbz2-dev libpng12-dev libjpeg8-dev libxxf86vm-dev libgl1-mesa-dev libsqlite3-dev libogg-dev libvorbis-dev libopenal-dev libcurl4-openssl-dev libluajit-5.1-dev liblua5.1-0-dev libleveldb-dev; cd; git clone https://github.com/minetest/minetest.git; cd minetest/games; git clone https://github.com/minetest/minetest_game.git; cd ..; cmake . -DENABLE_GETTEXT=1 -DENABLE_FREETYPE=1 -DENABLE_LEVELDB=1 -DENABLE_REDIS=1; make -j$(nproc); sudo make install; minetest; echo -e "\n\n\e[1;33mYou can run Minetest again by typing \"minetest\" in a terminal or selecting it in an applications menu.\nYou can install mods in ~/.minetest/mods, too.\e[0m" \ No newline at end of file diff --git a/etc/minetestserver-install-git-ENABLE_REDIS.old b/etc/minetestserver-install-git-ENABLE_REDIS.old new file mode 100644 index 0000000..0e7e15e --- /dev/null +++ b/etc/minetestserver-install-git-ENABLE_REDIS.old @@ -0,0 +1,19 @@ +#sudo apt-get install libncurses5-dev libgettextpo-dev doxygen libspatialindex-dev lua-redis-dev gettext + +sudo apt-get install build-essential cmake git libirrlicht-dev libbz2-dev libgettextpo-dev libfreetype6-dev libpng12-dev libjpeg8-dev libxxf86vm-dev libgl1-mesa-dev libsqlite3-dev libogg-dev libvorbis-dev libopenal-dev libhiredis-dev libcurl3-dev +#above is from http://dev.minetest.net/Compiling_Minetest#Compiling_on_GNU.2FLinux + +#as per : +sudo add-apt-repository ppa:chris-lea/redis-server +sudo apt-get update +sudo apt-get install redis-server + + +#if you skip the above, the below says missing: GetText, Curses, ncurses, Redis, SpatialIndex, Doxygen +#cd "$HOME" #done below by parameterless "cd" command +sudo apt-get install -y git build-essential libirrlicht-dev libgettextpo0 libfreetype6-dev cmake libbz2-dev libpng12-dev libjpeg8-dev libxxf86vm-dev libgl1-mesa-dev libsqlite3-dev libogg-dev libvorbis-dev libopenal-dev libcurl4-openssl-dev libluajit-5.1-dev liblua5.1-0-dev libleveldb-dev; cd; git clone https://github.com/minetest/minetest.git; cd minetest/games; git clone https://github.com/minetest/minetest_game.git; cd ..; cmake . -DENABLE_GETTEXT=1 -DENABLE_FREETYPE=1 -DENABLE_LEVELDB=1 -DENABLE_REDIS=1 -DBUILD_SERVER=TRUE -DBUILD_CLIENT=FALSE; make -j$(nproc); sudo make install; +# minetest; +echo -e "\n\n\e[1;33mYou can run Minetest Server by typing \"minetestserver\" in a terminal.\e[0m" +echo "Remember to add requirepass to /etc/redis/redis.conf -- a long password since redis is fast and can be bruteforced quickly" +# based on https://forum.minetest.net/viewtopic.php?f=42&t=3837 (below) +# sudo apt-get install -y git build-essential libirrlicht-dev libgettextpo0 libfreetype6-dev cmake libbz2-dev libpng12-dev libjpeg8-dev libxxf86vm-dev libgl1-mesa-dev libsqlite3-dev libogg-dev libvorbis-dev libopenal-dev libcurl4-openssl-dev libluajit-5.1-dev liblua5.1-0-dev libleveldb-dev; cd; git clone https://github.com/minetest/minetest.git; cd minetest/games; git clone https://github.com/minetest/minetest_game.git; cd ..; cmake . -DENABLE_GETTEXT=1 -DENABLE_FREETYPE=1 -DENABLE_LEVELDB=1 -DENABLE_REDIS=1; make -j$(nproc); sudo make install; minetest; echo -e "\n\n\e[1;33mYou can run Minetest again by typing \"minetest\" in a terminal or selecting it in an applications menu.\nYou can install mods in ~/.minetest/mods, too.\e[0m" \ No newline at end of file diff --git a/etc/mounter b/etc/mounter new file mode 100644 index 0000000..a480af2 --- /dev/null +++ b/etc/mounter @@ -0,0 +1,9 @@ +#!/bin/sh +mountpoint=/media/flash +if [ ! -d "$mountpoint" ]; then + sudo mkdir "$mountpoint" + sudo mount /dev/sdb1 "$mountpoint" + df -H +else + echo "FAILED since already mounted at $mountpoint" +fi diff --git a/etc/network/Logon/Logon (change this link to point to your policy GUID).lnk b/etc/network/Logon/Logon (change this link to point to your policy GUID).lnk new file mode 100644 index 0000000..ea84ad1 Binary files /dev/null and b/etc/network/Logon/Logon (change this link to point to your policy GUID).lnk differ diff --git a/etc/network/Logon/minetest_userscript_localENLIVEN_server_only.vbs b/etc/network/Logon/minetest_userscript_localENLIVEN_server_only.vbs new file mode 100644 index 0000000..fd22a3d --- /dev/null +++ b/etc/network/Logon/minetest_userscript_localENLIVEN_server_only.vbs @@ -0,0 +1,121 @@ +On Error Resume Next + +Set objFSO = CreateObject("Scripting.FileSystemObject") +' How to write file +Minetest_folder_path = "C:\games\Minetest" +If objFSO.FolderExists(Minetest_folder_path) Then + outFile = Minetest_folder_path & "\minetest.conf" + If objFSO.FileExists(outFile) Then + objFSO.DeleteFile(outFile) + End If + If Err.Number <> 0 Then + MsgBox "ERROR deleting file: " & Err.Description + Err.Clear + End If + Set objFile = objFSO.CreateTextFile(outFile,True) + If Err.Number <> 0 Then + MsgBox "ERROR opening " & outFile & " for writing: " & Err.Description + Err.Clear + End If + objFile.Write "address = localENLIVEN" & vbCrLf + objFile.Write "maintab_LAST = multiplayer" & vbCrLf + objFile.Write "menu_last_game = minetest" & vbCrLf + strUserName = CreateObject("WScript.Network").UserName + If Err.Number <> 0 Then + MsgBox "ERROR getting username: " & Err.Description + Err.Clear + End If + strMinetestUser = strUserName + If strUserName = "jgustafson" Then + Set wshShell = CreateObject( "WScript.Shell" ) + strComputerName = wshShell.ExpandEnvironmentStrings( "%COMPUTERNAME%" ) + If Err.Number <> 0 Then + MsgBox "ERROR getting COMPUTERNAME: " & Err.Description + Err.Clear + End If + strSuffix = strComputerName + iDelimA = InStr(1,strSuffix,"-",vbTextCompare) + If iDelimA > 0 Then + iDelimB = InStr(iDelimA+1,strSuffix,"-",vbTextCompare) + If iDelimB > 0 Then + 'MsgBox "iDelimA:" & iDelimA & " iDelimB:" & iDelimB + 'MsgBox "Mid(strSuffix,1,iDelimA):" & Mid(strSuffix,1,iDelimA) & " Mid(strSuffix,iDelimB+1):" & Mid(strSuffix,iDelimB+1) + strSuffix = Mid(strSuffix,1,iDelimA) & Mid(strSuffix,iDelimB+1) + Else + strSuffix = Mid(strSuffix,iDelimA) + End If + End If + If Err.Number <> 0 Then + MsgBox "ERROR truncating suffix: " & Err.Description + Err.Clear + End If + iMineTestUserNameMaxLen = 19 + strMinetestUser = strUserName & "-" & strSuffix + If Len(strMinetestUser) > iMineTestUserNameMaxLen Then + ' this cuts of the beginning, so operate on strSuffix but use difference of Len of strMinetestUser + strSuffix = Mid(strSuffix, Len(strMinetestUser)-iMineTestUserNameMaxLen+1) + End If + strMinetestUser = strUserName & "-" & strSuffix + If Err.Number <> 0 Then + MsgBox "ERROR concatenating: " & Err.Description + Err.Clear + End If + End If + 'see more settings above + objFile.Write "name = " & strMinetestUser & vbCrLf + objFile.Write "remote_port = 30000" & vbCrLf + objFile.Write "server_dedicated = false" & vbCrLf + objFile.Write "mg_name = v7" & vbCrLf + objFile.Write "creative_mode = false" & vbCrLf + objFile.Write "enable_damage = true" & vbCrLf + objFile.Write "server_announce = false" & vbCrLf + objFile.Write "cinematic = true" & vbCrLf + objFile.Write "cinematic_camera_smoothing = 0.7" & vbCrLf + + objFile.Write "serverlist_file = favoriteservers.txt" & vbCrLf + objFile.Write "font_size = 22" & vbCrLf + objFile.Write "font_shadow = 1" & vbCrLf + objFile.Write "mono_font_size = 22" & vbCrLf + objFile.Write "fallback_font_size = 22" & vbCrLf + objFile.Write "fallback_font_shadow = 1" & vbCrLf + objFile.Write "public_serverlist = false" & vbCrLf + objFile.Write "serverlist_url = localhost" & vbCrLf 'intentional + objFile.Write "font_shadow_alpha = 255" & vbCrLf + objFile.Write "fallback_font_shadow_alpha = 255" & vbCrLf + objFile.Write "connected_glass = true" & vbCrLf + objFile.Write "smooth_lighting = true" & vbCrLf + objFile.Write "enable_clouds = true" & vbCrLf + objFile.Write "enable_3d_clouds = true" & vbCrLf + objFile.Write vbCrLf + objFile.Write "anisotropic_filter = true" & vbCrLf + objFile.Write "texture_clean_transparent = true" & vbCrLf + objFile.Write "#texture_min_size = 64" & vbCrLf + objFile.Write "enable_shaders = true" & vbCrLf + objFile.Write "tone_mapping = true" & vbCrLf + objFile.Write "enable_bumpmapping = true" & vbCrLf + objFile.Write "#as of 0.4.15 dev Jan 2017, generate_normalmaps leaves tiny steps outside of each pixel and the pixels themselves are flat" & vbCrLf + objFile.Write "#generate_normalmaps = true" & vbCrLf + objFile.Write "enable_waving_water = true" & vbCrLf + objFile.Write "water_wave_height = 1.0" & vbCrLf + objFile.Write "water_wave_length = 20.0" & vbCrLf + objFile.Write "water_wave_speed = 5.0" & vbCrLf + objFile.Write "enable_waving_leaves = true" & vbCrLf + objFile.Write "enable_waving_plants = true" & vbCrLf + objFile.Write "pause_fps_max = 20" & vbCrLf + objFile.Write "vsync = true" & vbCrLf + 'objFile.Write "display_gamma = 2.2" & vbCrLf + objFile.Write "video_driver = opengl" & vbCrLf + objFile.Write "cloud_height = 120" & vbCrLf + objFile.Write "cloud_radius = 12" & vbCrLf + objFile.Write "enable_minimap = true" & vbCrLf + objFile.Write "minimap_shape_round = true" & vbCrLf + objFile.Write "directional_colored_fog = true" & vbCrLf + objFile.Write "ambient_occlusion_gamma = 2.2" & vbCrLf + objFile.Write "inventory_items_animations = true" & vbCrLf + objFile.Write "menu_clouds = true" & vbCrLf + + + objFile.Close + + +End If \ No newline at end of file diff --git a/etc/stop-mts b/etc/stop-mts new file mode 100644 index 0000000..1c0630d --- /dev/null +++ b/etc/stop-mts @@ -0,0 +1,20 @@ +#!/bin/sh +MTS_HAYSTACK_PATH=/tmp/mts_haystack +# the space in the sed param means search for a space. The result is all characters before the space. +ps -e | grep minetestserver | sed 's/ .*//' > "$MTS_HAYSTACK_PATH" +#ps -e | grep minetestserver > "$MTS_HAYSTACK_PATH" +# as per TheOther1. linuxquestions.org. +# . +# 20 Jan 2004. 19 Feb 2016. +a=0 +while read line +do a=$(($a+1)); +pid=$line +#echo $pid +#echo $line | sed 's/ .*//' +kill -TERM $pid +done < "$MTS_HAYSTACK_PATH" +echo "Final line count is: $a"; +rm "$MTS_HAYSTACK_PATH" +#TODO someday (?): +# ssh hostname 'kill -TERM $pid' diff --git a/etc/unmounter b/etc/unmounter new file mode 100644 index 0000000..6642247 --- /dev/null +++ b/etc/unmounter @@ -0,0 +1,9 @@ +#!/bin/sh +mountpoint=/media/flash +if [ -d /media/flash ]; then + sudo umount /media/flash + #ok since does NOT remove unless empty: + sudo rmdir "$mountpoint" +else +echo "Nothing to do: nothing was mounted at $mountpoint" +fi diff --git a/etc/unused/minetest-install VERY OLD release package (DO NOT USE).sh b/etc/unused/minetest-install VERY OLD release package (DO NOT USE).sh new file mode 100644 index 0000000..e261ff1 --- /dev/null +++ b/etc/unused/minetest-install VERY OLD release package (DO NOT USE).sh @@ -0,0 +1,7 @@ +#!/bin/sh +#deb http://ppa.launchpad.net/minetestdevs/stable/ubuntu trusty main +#deb-src http://ppa.launchpad.net/minetestdevs/stable/ubuntu trusty main +sudo add-apt-repository ppa:minetestdevs/stable +sudo apt-get update +sudo apt-get install minetest-server +sudo ufw allow 30000 \ No newline at end of file diff --git a/etc/unused/minetestserver-install-git (NO REDIS).old b/etc/unused/minetestserver-install-git (NO REDIS).old new file mode 100644 index 0000000..aa26c69 --- /dev/null +++ b/etc/unused/minetestserver-install-git (NO REDIS).old @@ -0,0 +1,6 @@ +sudo apt-get install -y git build-essential libirrlicht-dev libgettextpo0 libfreetype6-dev cmake libbz2-dev libpng12-dev libjpeg8-dev libxxf86vm-dev libgl1-mesa-dev libsqlite3-dev libogg-dev libvorbis-dev libopenal-dev libcurl4-openssl-dev libluajit-5.1-dev liblua5.1-0-dev libleveldb-dev; cd; git clone https://github.com/minetest/minetest.git; cd minetest/games; git clone https://github.com/minetest/minetest_game.git; cd ..; cmake . -DENABLE_GETTEXT=1 -DENABLE_FREETYPE=1 -DENABLE_LEVELDB=1 -DBUILD_SERVER=TRUE -DBUILD_CLIENT=FALSE; make -j$(nproc); sudo make install; +# minetest; +echo -e "\n\n\e[1;33mYou can run Minetest Server by typing \"minetestserver\" in a terminal.\e[0m" + +# based on https://forum.minetest.net/viewtopic.php?f=42&t=3837 (below) +# sudo apt-get install -y git build-essential libirrlicht-dev libgettextpo0 libfreetype6-dev cmake libbz2-dev libpng12-dev libjpeg8-dev libxxf86vm-dev libgl1-mesa-dev libsqlite3-dev libogg-dev libvorbis-dev libopenal-dev libcurl4-openssl-dev libluajit-5.1-dev liblua5.1-0-dev libleveldb-dev; cd; git clone https://github.com/minetest/minetest.git; cd minetest/games; git clone https://github.com/minetest/minetest_game.git; cd ..; cmake . -DENABLE_GETTEXT=1 -DENABLE_FREETYPE=1 -DENABLE_LEVELDB=1; make -j$(nproc); sudo make install; minetest; echo -e "\n\n\e[1;33mYou can run Minetest again by typing \"minetest\" in a terminal or selecting it in an applications menu.\nYou can install mods in ~/.minetest/mods, too.\e[0m" \ No newline at end of file diff --git a/etc/unused/minetestserver-install-git (NO redis).sh b/etc/unused/minetestserver-install-git (NO redis).sh new file mode 100644 index 0000000..91a9d80 --- /dev/null +++ b/etc/unused/minetestserver-install-git (NO redis).sh @@ -0,0 +1,14 @@ +#remove non-git version first: +echo "Removing the non-git (packaged) version first..." +echo "If you want to install the client on your server (not normal practice), change -DBUILD_CLIENT=FALSE to -DBUILD_CLIENT=TRUE before continuing this script." +sudo apt-get remove minetest-server +sudo apt-get remove minetest + +sudo apt-get install libncurses5-dev libgettextpo-dev doxygen libspatialindex-dev +#if you skip the above, the below says missing: GetText, Curses, ncurses, Redis, SpatialIndex, Doxygen +sudo apt-get install -y git build-essential libirrlicht-dev libgettextpo0 libfreetype6-dev cmake libbz2-dev libpng12-dev libjpeg8-dev libxxf86vm-dev libgl1-mesa-dev libsqlite3-dev libogg-dev libvorbis-dev libopenal-dev libcurl4-openssl-dev libluajit-5.1-dev liblua5.1-0-dev libleveldb-dev; cd; git clone https://github.com/minetest/minetest.git; cd minetest/games; git clone https://github.com/minetest/minetest_game.git; cd ..; cmake . -DENABLE_GETTEXT=1 -DENABLE_FREETYPE=1 -DENABLE_LEVELDB=1 -DBUILD_SERVER=TRUE -DBUILD_CLIENT=FALSE; make -j$(nproc); sudo make install; +# minetest; +echo -e "\n\n\e[1;33mYou can run Minetest Server by typing \"minetestserver\" in a terminal.\e[0m" + +# based on https://forum.minetest.net/viewtopic.php?f=42&t=3837 (below) +# sudo apt-get install -y git build-essential libirrlicht-dev libgettextpo0 libfreetype6-dev cmake libbz2-dev libpng12-dev libjpeg8-dev libxxf86vm-dev libgl1-mesa-dev libsqlite3-dev libogg-dev libvorbis-dev libopenal-dev libcurl4-openssl-dev libluajit-5.1-dev liblua5.1-0-dev libleveldb-dev; cd; git clone https://github.com/minetest/minetest.git; cd minetest/games; git clone https://github.com/minetest/minetest_game.git; cd ..; cmake . -DENABLE_GETTEXT=1 -DENABLE_FREETYPE=1 -DENABLE_LEVELDB=1; make -j$(nproc); sudo make install; minetest; echo -e "\n\n\e[1;33mYou can run Minetest again by typing \"minetest\" in a terminal or selecting it in an applications menu.\nYou can install mods in ~/.minetest/mods, too.\e[0m" \ No newline at end of file diff --git a/etc/unused/minetestserver-update-from-git.sh b/etc/unused/minetestserver-update-from-git.sh new file mode 100644 index 0000000..c31377c --- /dev/null +++ b/etc/unused/minetestserver-update-from-git.sh @@ -0,0 +1,10 @@ +#!/bin/sh +cd +cd minetest; sudo git pull; sudo make -j$(nproc) +#cd games; sudo git pull; sudo make -j$(nproc) +#git config global user.email "tertiary@axlemedia.net" +#git config global user.name "Expert Multimedia" +sudo git pull https://github.com/minetest/minetest_game.git +#sudo git fetch +#sudo git checkout HEAD games/minetest_game +#sudo make install \ No newline at end of file diff --git a/etc/unused/throwing-change-to-Echoes91.sh b/etc/unused/throwing-change-to-Echoes91.sh new file mode 100644 index 0000000..1c96859 --- /dev/null +++ b/etc/unused/throwing-change-to-Echoes91.sh @@ -0,0 +1,63 @@ +#!/bin/sh + +#First make sure all folders in $HOME/.minetest are created (I am not sure whether this is required!): +# minetestserver +# Mods were found at https://forum.minetest.net/viewforum.php?f=11 + + +# * Git version uses /home/*/minetest/games and /usr/local/share/minetest/games but the latter is used for minetestserver (minetest-server package) + + +#(Ubuntu 14.04 Trusty Tahr Server) folders were found using: +# cd / +# sudo find -name 'worlds' (worlds folder is in $HOME/.minetest) +# sudo find -name 'minimal' (stable build [such as 0.4.9 games folder is /usr/share/games/minetest/games, but git version games folder is /usr/local/share/minetest/games) + +#NOTE: minetest mods are ALWAYS ONLY installed on server + +USR_SHARE_MINETEST=/usr/share/games/minetest +#IF git version is installed: +if [ -d "/usr/local/share/minetest" ]; then + USR_SHARE_MINETEST=/usr/local/share/minetest +fi +#UNUSED (unknown use): MT_GAMES_DIR=$HOME/.minetest/mods +#intentionally skip the slash in the following line since $USR_SHARE_MINETEST already starts with one: +MT_BACKUP_GAMES_DIR=$HOME/Backup$USR_SHARE_MINETEST/games +MT_GAMES_DIR=$USR_SHARE_MINETEST/games +MT_MYGAME_NAME=ENLIVEN +MT_MYGAME_DIR=$MT_GAMES_DIR/$MT_MYGAME_NAME +#formerly MT_MYGAME_MODDIR: +MT_MYGAME_MODS_PATH=$MT_MYGAME_DIR/mods +MT_MYWORLD_NAME=FCAGameAWorld +MT_MYWORLD_DIR=$HOME/.minetest/worlds/$MT_MYWORLD_NAME + + +cd "$HOME/Downloads" +MTMOD_DL_ZIP=archive.zip +MTMOD_SRC_ZIP=throwing_Echoes91.zip +MTMOD_UNZ_NAME=throwing-master-* +MTMOD_DEST_NAME=throwing +MTMOD_DEST_PATH=$MT_MYGAME_MODS_PATH/$MTMOD_DEST_NAME +if [ -d "$MTMOD_DEST_PATH" ]; then + echo "Removing old version of throwing..." + sudo rm -Rf $MTMOD_DEST_PATH +fi +echo "Installing Echoes91's (NOT PilzAdam's NOT Jeija's) Throwing enhanced " +#if [ -d "$MTMOD_UNZ_NAME" ]; then +rm -Rf $MTMOD_UNZ_NAME +#fi +if [ -f "$MTMOD_DL_ZIP" ]; then + rm "$MTMOD_DL_ZIP" +fi +if [ -f "$MTMOD_SRC_ZIP" ]; then + rm "$MTMOD_SRC_ZIP" +fi +#wget https://github.com/PilzAdam/throwing/zipball/master +wget https://gitlab.com/echoes91/throwing/repository/archive.zip +mv $MTMOD_DL_ZIP "$MTMOD_SRC_ZIP" +unzip "$MTMOD_SRC_ZIP" +sudo mv $MTMOD_UNZ_NAME "$MTMOD_DEST_PATH" +if [ ! -d "$MTMOD_DEST_PATH" ]; then + echo "ERROR: failed to unzip $MTMOD_DEST_PATH, so cannot continue." + exit 1 +fi \ No newline at end of file diff --git a/etc/update-minetest_game-mods-in-ENLIVEN b/etc/update-minetest_game-mods-in-ENLIVEN new file mode 100644 index 0000000..0631da3 --- /dev/null +++ b/etc/update-minetest_game-mods-in-ENLIVEN @@ -0,0 +1,2 @@ +#!/bin/sh +sudo cp -Rf $HOME/minetest/games/minetest_game/mods/* /usr/local/share/minetest/games/ENLIVEN/mods/ diff --git a/games/enliven/minetest.conf.enliven b/games/enliven/minetest.conf.enliven new file mode 100644 index 0000000..961ed01 --- /dev/null +++ b/games/enliven/minetest.conf.enliven @@ -0,0 +1,14 @@ +protector_radius = 7 +protector_pvp = true +protector_pvp_spawn = 10 +protector_drop = true +protector_hurt = 1 + +default_privs = interact,shout,home +max_users = 50 +motd = "Actions and chat messages are logged. Visit website for recipes and live map." +disallow_empty_passwords = true + +#not all settings can be changed in this minetest.conf (see +#minetest.conf.example in THIS folder) some settings can only be changed +#in client's local copy of minetest.conf (see login scripts on network) diff --git a/minetest.conf b/minetest.conf new file mode 100644 index 0000000..4be9b6f --- /dev/null +++ b/minetest.conf @@ -0,0 +1,77 @@ +# In case user of an Enliven server wants to start their own server via the graphical user interface: +protector_radius = 7 +protector_pvp = true +protector_pvp_spawn = 10 +protector_drop = true +protector_hurt = 1 + +default_privs = interact,shout,home +max_users = 50 +motd = "Actions and chat messages are logged. Visit website for recipes and live map if available, otherwise see http://wiki.minetest.net/Main_Page and https://github.com/minetest-technic/technic/wiki" +disallow_empty_passwords = true + +# Client configuration for improved graphics: + + +# address = fcalocal +# maintab_LAST = singleplayer +# menu_last_game = ENLIVEN +# name = +remote_port = 30000 +server_dedicated = false +mg_name = v7 +creative_mode = false +enable_damage = true +server_announce = false +cinematic = true +cinematic_camera_smoothing = 0.7 +serverlist_file = favoriteservers.txt +font_size = 22 +font_shadow = 1 +mono_font_size = 22 +fallback_font_size = 22 +fallback_font_shadow = 1 +# public_serverlist = false +enable_local_map_saving = true +public_serverlist = true +enable_remote_media_server = true +serverlist_url = servers.minetest.net +font_shadow_alpha = 255 +fallback_font_shadow_alpha = 255 +connected_glass = true +smooth_lighting = true +enable_clouds = true +enable_3d_clouds = true + +anisotropic_filter = true +texture_clean_transparent = true +#texture_min_size = 64 +enable_shaders = true +tone_mapping = true +enable_bumpmapping = true +#generate_normalmaps = true +enable_waving_water = true +water_wave_height = 1.0 +water_wave_length = 20.0 +water_wave_speed = 5.0 +enable_waving_leaves = true +enable_waving_plants = true +pause_fps_max = 20 +vsync = true +video_driver = opengl +cloud_height = 120 +cloud_radius = 12 +enable_minimap = true +minimap_shape_round = true +directional_colored_fog = true +ambient_occlusion_gamma = 2.2 +inventory_items_animations = true +menu_clouds = true +fast_move = true +free_move = true +noclip = true +fixed_map_seed = Enliven20170203v7 +mainmenu_last_selected_world = 2 +selected_world_path = C:\games\Minetest\bin\..\worlds\charredplanet +wieldview_node_tiles = false +wieldview_update_time = 2