Page 1 of 1
How to configure the default ruleset? (Freeciv-2.6.2.1-gtk3 for Windows)
Posted: Sat Dec 12, 2020 1:57 pm
by eglur
Hi all,
This is my first post, sorry if it's off topic, in the wrong place, or too outdated to be answered.
But I'm having problems setting the default ruleset.
I am trying to configure the game so when I click
Start New Game, the
Ruleset option will be set to
civ2civ3.
I am using
Freeciv-2.6.2.1-gtk3, downloaded from
freeciv.org, installed on
Windows 10 with the default options.
I tried to change the line in
C:\Program Files (x86)\Freeciv-2.6.2.1-gtk3\data\default.serv
from
to
I start the game by clicking on the shortcut created by the installer, whose destination is
Code: Select all
"C:\Program Files (x86)\Freeciv-2.6.2.1-gtk3\freeciv-gtk3.cmd" en_US
But when I close all the instances of Freeciv, open a new one using the link above, and click on
Start New Game,
Ruleset is set to
default.
If I run
I get the output
Code: Select all
/show: Current ruleset directory is classic
If I click on
Start, the game starts with the "classic" ruleset.
Am I doing something wrong?
Thanks!
Re: How to configure the default ruleset? (Freeciv-2.6.2.1-gtk3 for Windows)
Posted: Sat Dec 12, 2020 6:07 pm
by cazfi
The default ruleset the server starts with is within the binary itself.
I have not tested it, but maybe you can set the shortcut to give started client the "-r <.serv -file>" commandline parameter, and to write .serv file you want.
Code: Select all
> freeciv-gtk3 --help
Encodings: Data=UTF-8, Local=UTF-8, Internal=UTF-8
Usage: freeciv-gtk3 [option ...]
Valid option are:
-A, --Announce PROTO Announce game in LAN using protocol PROTO (IPv4/IPv6/none)
-a, --autoconnect Skip connect dialog
-d, --debug NUM Set debug log level (0 to 4, or 4:file1,min,max:...)
-F, --Fatal [SIGNAL] Raise a signal on failed assertion
-f, --file FILE Load saved game FILE
-H, --Hackless Do not request hack access to local, but not spawned, server
-h, --help Print a summary of the options
-l, --log FILE Use FILE as logfile (spawned server also uses this)
-M, --Meta HOST Connect to the metaserver at HOST
-m, --music FILE Read music tags from FILE
-n, --name NAME Use NAME as username on server
-P, --Plugin PLUGIN Use PLUGIN for sound output [sdl, none]
-p, --port PORT Connect to server port PORT (usually with -a)
-r, --read FILE Read startup script FILE (for spawned server only)
-S, --Sound FILE Read sound tags from FILE
-s, --server HOST Connect to the server at HOST (usually with -a)
-t, --tiles FILE Use data file FILE.tilespec for tiles
-v, --version Print the version number
-w, --warnings Warn about deprecated modpack constructs
-- Pass any following options to the UI.
Try "freeciv-gtk3 -- --help" for more.
Report bugs at https://www.freelists.org/list/freeciv-dev
Re: How to configure the default ruleset? (Freeciv-2.6.2.1-gtk3 for Windows)
Posted: Sun Dec 13, 2020 11:59 am
by eglur
Thanks for the reply!
I tried running the commands
Code: Select all
C:\Program Files (x86)\Freeciv-2.6.2.1-gtk3>freeciv-mp-gtk3 --help
C:\Program Files (x86)\Freeciv-2.6.2.1-gtk3>freeciv-mp-gtk3 -r foo.serv
and the variations
Code: Select all
C:\Program Files (x86)\Freeciv-2.6.2.1-gtk3>freeciv-mp-gtk3.exe --help
C:\Program Files (x86)\Freeciv-2.6.2.1-gtk3>freeciv-mp-gtk3.exe -r foo.serv
C:\Program Files (x86)\Freeciv-2.6.2.1-gtk3>freeciv-mp-gtk3 -h
C:\Program Files (x86)\Freeciv-2.6.2.1-gtk3>freeciv-mp-gtk3 /?
C:\Program Files (x86)\Freeciv-2.6.2.1-gtk3>freeciv-mp-gtk3.exe -h
C:\Program Files (x86)\Freeciv-2.6.2.1-gtk3>freeciv-mp-gtk3.exe /?
But they don't give any output, and the program does not start either.
I'm guessing the Windows version has been so lonely that it didn't learn how to communicate properly yet?
As a workaround, what I'm doing for now is
Start New Game
Run the server commands—I'm practicing the beginning of the game for "civ2civ3", so I need:
Code: Select all
/read civ2civ3
/set minplayers 1
/set aifill 1
Then I save it with
Now, every time I want a new game, I just load
foo.serv that it contains the setup I need (and allows for optionaly picking a nation).
Re: How to configure the default ruleset? (Freeciv-2.6.2.1-gtk3 for Windows)
Posted: Sun Dec 13, 2020 12:26 pm
by cazfi
eglur wrote:I tried running the commands
Code: Select all
C:\Program Files (x86)\Freeciv-2.6.2.1-gtk3>freeciv-mp-gtk3 --help
C:\Program Files (x86)\Freeciv-2.6.2.1-gtk3>freeciv-mp-gtk3 -r foo.serv
That's freeciv
mod
pack installer, not the client.
eglur wrote:But they don't give any output, and the program does not start either.
I'm guessing the Windows version has been so lonely that it didn't learn how to communicate properly yet?

Yeah, Windows client detach from the console or something, so its output is not visible. As a workaround you can direct logging output to a file with "-l <filename>" parameter. Be sure to give a path to which you have write permissions (you can't write the logfile to the freeciv installation directory)
eglur wrote:
Then I save it with
That creates a savegame called foo.serv.sav, not a script file foo.serv.
The commands meant for writing and loading script files are ''write'' and ''read''.
Code: Select all
> /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
Re: How to configure the default ruleset? (Freeciv-2.6.2.1-gtk3 for Windows)
Posted: Sun Dec 13, 2020 4:06 pm
by eglur
cazfi wrote:
That's freeciv modpack installer, not the client.
My bad!
cazfi wrote:
[...] you can direct logging output to a file with "-l <filename>" parameter. Be sure to give a path to which you have write permissions (you can't write the logfile to the freeciv installation directory)
After testing the logging functionality with success (the remark about permission was really helpful here, thanks!), I could debug my way into creating a ".serv" file with the proper syntax and have it also properly processed.
Now I could successfully configure the default ruleset to "civ2civ3", and also set it up for single player. Thank you very much for your help!
As an aside, TBH your post just woke me up from a recent rabbit hole I went in: thinking about contributing, I compiled the dev version inside a vm and was testing it... Turns out I now
really want that elephant!
