Jump to content

Map reset help for a linux n00b?


Azerik

Recommended Posts

Ok, back in the day command line was all I had to work with, so the idea of using the command line doesn't scare me.

 

That said, I am still a noob at linux (other than general principles that have carried through from DOS).  I did NOT set up the server I am responsible for, but the economy update is finally the time to start our map over again.

 

Assuming that I have a server running currently and correctly on linux, what would I need to do to start a new map with a specific seed and a non-standard path?

 

If needed I am comfortable editing scripts to accomplish the desired ends.  Any help with this would be greatly appreciated by both me and my players.

 

TIA

Link to comment
Share on other sites

Assuming that I have a server running currently and correctly on linux, what would I need to do to start a new map with a specific seed and a non-standard path?

 

This is what I have for my server running on CentOS7. I've got Avorion installed to /home/avserv along with steamcmd, both in the home directory of my user avserv. You'll need to change the paths to wherever you have steamcmd and Avorion installed if you use these.

 

To install or update the game to that path I run serverupdate.sh which is a simple script:

#!/bin/sh
cd /home/avserv/
./steamcmd.sh +runscript update_server.txt

 

and update_server.txt is:

@ShutdownOnFailedCommand 1
login anonymous
force_install_dir /home/avserv
app_update 565060
quit

 

The force_install_dir is what tells steamcmd to use a non-standard path.  I believe you need to supply that path each time you update as well so I went ahead and just tossed everything into a script to make it easier to run. If you don't already know, you need to do

chmod +x serverupdate.sh

and then you run it same as any other script

./serverupdate.sh

And to create those files you can do

vim serverupdate.sh

etc.

 

For the seed, I think you can set it by editing the server.sh script used to launch the server, just add --seed SomeSeed to the end of the launch command. I'm assuming this works like we think it works, I've never actually made two galaxies with the same seed and checked them.

Link to comment
Share on other sites

Thank you.  This makes my path clear.

 

Edit: Will the server care if you start it every time with the --seed?  Or should that only be for the initial startup?

 

Ok, the more I think about this the more questions I have.  Here is the script I'm working with (slightly anonymized).  It has been working great.  In preparation for this adventure I made a new directory and copied in the blacklist, admin.xml, server.ini and all the other relevant things I want to carry over (ignoring the players and sectors directories and other stuff specific to the map).  I altered the server.ini with the new seed I wanted.  I then copied the script currently in use and altered it to match the new path(s), and added the --seed option.

 

If I am correct in my thinking, I should just need to execute this new version of the startup script (below) instead of the old one.  That sound about right?  Will it generate the new map?

 

while true
do
/opt/steamcmd/steamcmd.sh +login anonymous +force_install_dir /opt/avorion +app_update 565060 validate +quit validate +quit

cp linux64/steamclient.so ./steamclient.so

cp -Rf /opt/avorionworld/ServerName/ModInstall/* /opt/avorion
cp /opt/avorionworld/ServerName/serverlog*.txt /opt/avorionworld/ServerName/Log_Backup/

bin/AvorionServer --galaxy-name ServerName --datapath /opt/avorionworld --public true --listed true --same-start-sector false --admin Admin'sSteamID --seed GalaxySeed
echo "If you want to completely stop the server process now, press Ctrl+C before
the time is up!"
echo "Rebooting in:"
for i in 5 4 3 2 1
do
echo "$i..."
sleep 1
done
echo "Rebooting now!"
done

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...