Default Settings

Can't beat the AI? Is it too tame? Discuss the best strategies!
User avatar
Arbogast
Elite
Posts: 412
Joined: Tue Jul 16, 2013 9:09 am
Location: France

Re: Default Settings

Postby Arbogast » Tue Aug 05, 2014 4:56 pm

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...

cazfi
Elite
Posts: 1701
Joined: Tue Jan 29, 2013 6:54 pm

Re: Default Settings

Postby cazfi » Tue Aug 05, 2014 5:49 pm

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.

User avatar
Arbogast
Elite
Posts: 412
Joined: Tue Jul 16, 2013 9:09 am
Location: France

Re: Default Settings

Postby Arbogast » Wed Aug 06, 2014 2:07 pm

Right Cazfi, but the ruleset is already declared in the LAST line. :roll:

User avatar
Nimrod
Posts: 21
Joined: Wed Jul 02, 2014 2:18 pm
Location: Montreal, Canada

Re: Default Settings

Postby Nimrod » Wed Aug 06, 2014 2:43 pm

Cool, looks like everything is under control here :)
=======
Nimmy
=======

cazfi
Elite
Posts: 1701
Joined: Tue Jan 29, 2013 6:54 pm

Re: Default Settings

Postby cazfi » Wed Aug 06, 2014 4:37 pm

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.

User avatar
Arbogast
Elite
Posts: 412
Joined: Tue Jul 16, 2013 9:09 am
Location: France

Re: Default Settings

Postby Arbogast » Thu Aug 07, 2014 2:22 pm

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?

cazfi
Elite
Posts: 1701
Joined: Tue Jan 29, 2013 6:54 pm

Re: Default Settings

Postby cazfi » Thu Aug 07, 2014 5:47 pm

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.

User avatar
Arbogast
Elite
Posts: 412
Joined: Tue Jul 16, 2013 9:09 am
Location: France

Re: Default Settings

Postby Arbogast » Fri Aug 08, 2014 3:02 pm

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.

KTPtheKing
Posts: 1
Joined: Tue Jun 21, 2016 9:14 am

Re: Default Settings

Postby KTPtheKing » Tue Jun 21, 2016 9:15 am

There's one thing I don't understand... How do you create the .serv file?

User avatar
dunnoob
Elite
Posts: 326
Joined: Mon Dec 23, 2013 3:13 am
Location: Hamburg
Contact:

Re: Default Settings

Postby dunnoob » Tue Jun 21, 2016 12:06 pm

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