I am a brand new linux admin with a brand new linux server that I'm trying to use to host a game for some friends. I have a couple of questions.
First of all, it seems like the set of command line parameters you might pass to the game the first time you run it are different from the arguments you need to pass when restarting a process for a game already in progress. For example, I am trying to start a new game using the following script (based heavily on Gandalf's work)
Code:
#!/bin/sh
GAME=RYA-Middle-Age
PORT=3540
ERA=2
cd /home/dom3/dominions3
DIR=~/dominions3/savedgames/$GAME
touch $DIR/$GAME.log
touch $DIR/$GAME.err
nohup ~/dominions3/dom3 \
--statfile \
--scoredump \
--tcpserver --port $PORT \
--hours 24 \
--quickhost \
--uploadmaxp 4 \
--diffai `echo $RANDOM%94|bc` \
--diffai `echo $RANDOM%94|bc` \
--diffai `echo $RANDOM%94|bc` \
--diffai `echo $RANDOM%94|bc` \
--diffai `echo $RANDOM%94|bc` \
--diffai `echo $RANDOM%94|bc` \
--diffai `echo $RANDOM%94|bc` \
--diffai `echo $RANDOM%94|bc` \
--diffai `echo $RANDOM%94|bc` \
--mapfile glory_multiplayer.map \
--indepstr 6 \
--masterpass masterblaster \
--renaming \
--era $ERA \
--textonly \
$GAME \
>>$DIR/$GAME.log 2>>$DIR/$GAME.err &
Let me start at the beginning. This script is supposed to start a game with 9 random computer opponents. It doesn't, it starts a game with some number of random opponents less than 9. Now I'm assuming that's because I'm getting random numbers that do not match the nations available for that era. I took the number 94 from a script of G's, but it seems pretty high to me, are there really 94 different nations? Also, there only seem to be about 15 to 20 available for any given era, is there a way to know what Nation IDs are available for what era? Or better yet, has anyone ever mapped out the Nations to IDs?
Next question. If I simulate disaster by rebooting the server, when this script runs on startup it usually fails to restart the game, producing an error message about a bad computer opponent. It seems that on the second start it re-rolled all the random numbers (which you might expect since that's what it was told to do). This seems to imply that you do not need all the initial parameters to restart a game than you do to initialize a game. Does anyone know what parameters you need and which ones you don't?
Any help is appreciated.
Thanks,
Akela