Page 2 of 3

Re: Default Settings

Posted: Tue Aug 05, 2014 4:56 pm
by Arbogast
Ha, ha! Très bien le français!
But I'm more comfortable in English... long story.
Back to my thread: My .serv and .rc files are in their default places "c:\Documents and Settings\...\Application Data\.freeciv\" and "c:\Documents and Settings\...\Application Data\" respectively. Are you suggesting to copy them into the "c:\program files\Freeciv-2.4.2-gtk2\data"?
Freeciv doesn't seem to have any problem reading the .serv file there and the .rc file seems to be read properly too.

Anyway, I found an answer about the glitch: If you chose the ruleset FIRST, and THEN "/read my_settings.serv" all falls in place. What I was doing wrong NOT choosing the ruleset, any ruleset.

Merci beacoup anyway...

Re: Default Settings

Posted: Tue Aug 05, 2014 5:49 pm
by cazfi
Note that .serv file is just a list of server commands to execute as if they were typed to the server console (even recursive "read" command works). If you always want to use the same ruleset, you can put "rulesetdir <favoriteruleset>" -command to the beginning of the file.

Re: Default Settings

Posted: Wed Aug 06, 2014 2:07 pm
by Arbogast
Right Cazfi, but the ruleset is already declared in the LAST line. :roll:

Re: Default Settings

Posted: Wed Aug 06, 2014 2:43 pm
by Nimrod
Cool, looks like everything is under control here :)

Re: Default Settings

Posted: Wed Aug 06, 2014 4:37 pm
by cazfi
Arbogast wrote:Right Cazfi, but the ruleset is already declared in the LAST line. :roll:
Now bug #22447 - having it executed last means that settings get reseted back to their default values.

Re: Default Settings

Posted: Thu Aug 07, 2014 2:22 pm
by Arbogast
Ahhh... I opened a can of worms I guess.
So my ruleset begins like this:
#FREECIV SERVER COMMAND FILE, version 2.4.1
# These are server options saved from a running freeciv-server.
cmdlevel basic new
cmdlevel basic first
Hard
metapatches
set aifill "6"
etc...
So, should I move the line "rulesetdir <favoriteruleset>" to the top, above the "cmdlevel..." line?

Re: Default Settings

Posted: Thu Aug 07, 2014 5:47 pm
by cazfi
Arbogast wrote:So, should I move the line "rulesetdir <favoriteruleset>" to the top, above the "cmdlevel..." line?
Yes, that's how the fixed freeciv writes it.

Re: Default Settings

Posted: Fri Aug 08, 2014 3:02 pm
by Arbogast
Looks like the problems are not over. :evil:
I tried Cazfi's suggestion of putting the ruleset declaration at the beginning of the .serv file.
So I opened the 2.5.0beta1-GTK2, changed the default ruleset to classic, THEN /read my .serv file (with civ2civ3 ruleset) and the server read it but the Chat window didn't get updated. However, launching the game everything seemed OK.

Re: Default Settings

Posted: Tue Jun 21, 2016 9:15 am
by KTPtheKing
There's one thing I don't understand... How do you create the .serv file?

Re: Default Settings

Posted: Tue Jun 21, 2016 12:06 pm
by dunnoob
KTPtheKing wrote:There's one thing I don't understand... How do you create the .serv file?
On a windows command line:

Code: Select all

echo rulesetdir civ2civ3>%APPDATA%\.freeciv\2.5\my_rules.serv
That creates a one-liner my_rules.serv for 2.5 setting ruleset directory civ2civ3, a 100% pointless exercise, you can simply use the shipped civ2civ3.serv. :P

But you'll see that clients will offer my_rules as ruleset, and client option -r my_rules could also work: The client just passes all options it doesn't handle directly to the started server, and rules are the business of the server. OTOH soundset, music plugin, and tileset are the business of the client, the server doesn't care about it.

It starts to get interesting if you add more commands after rulesetdir whatever, e,g., hard to get slightly less stupid AIs (default is easy IIRC.) Actually hard (etc.) would also work before changing the rulesetdir, but all set commands must come after rulesetdir, because a new ruleset forgets all old settings.

On other platforms (not Windows or OS/2) use ~/.freeciv/2.5/my_rules.serv instead of %APPDATA%\.freeciv\2.5\my_rules.serv