Loading saved options

Various topics about the game, the website, or anything else Freeciv related that doesn't fit elsewhere.
arvedui78
Posts: 2
Joined: Fri May 22, 2020 12:50 am

Loading saved options

Postby arvedui78 » Fri May 22, 2020 12:58 am

Hi, I have been toying with freeciv on my own for a couple of years, and I am finally really getting into it. My favorite client is Qt. But for the love of my pinky toe, there is one thing I do not manage to figure: how do I load up a previously set configuration for my options, so that I don't have to scan all the options to leave everything how I like? Things like initial units, military settings, minimum distance between cities, etc. Thanks!

User avatar
Dino the Dinosore
Veteran
Posts: 56
Joined: Sun Dec 31, 2017 3:41 am

Re: Loading saved options

Postby Dino the Dinosore » Sat May 23, 2020 3:04 am

You can edit the "games.ruleset" file contained in the folder with the name of the ruleset you're using. At the bottom of the file there's a section that looks like -

Code: Select all

set =
    { "name", "value", "lock"
      "size", 5, FALSE
      "aifill", 6, FALSE
      "animals", 0, TRUE
      "startunits", "cwx", FALSE
      "disasters", 10, FALSE
      "migration", TRUE, FALSE
      ...

(This is my own custom version.) You can add whatever you want, need to know what "name"s are valid and what they mean. "startunits" is the answer for one of your prefs. If you run ./freeciv-server from a command line, > help options will show the "name"s and e.g. > help startunits explains that option.

arvedui78
Posts: 2
Joined: Fri May 22, 2020 12:50 am

Re: Loading saved options

Postby arvedui78 » Sat May 23, 2020 5:12 am

Thank you very much for the answer. I think I understand, but this is a little too much for my poor me... :D I noticed that, in random maps (not scenarios), if I don't change the ruleset, it will keep my previous settings, so at least there's that for me. I was hoping that there would be an interface to set up various "rules" and then load them at will, easily. But thank you, anyway!

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

Re: Loading saved options

Postby cazfi » Mon May 25, 2020 2:38 pm

Maybe it's of use to you that you can save current server options to a file with /write <filename>, and read them with /read <filename> server commands you can enter client chatline.
> help write
Command: write - Write current settings as server commands to file.
Synopsis: write <file-name>
Level: hack
> help read
Command: read - Process server commands from file.
Synopsis: read <file-name>
Level: ctrl