Game changes after start

Contribute, display and discuss rulesets and modpacks for use in Freeciv here.
Post Reply
User avatar
Corbeau
Elite
Posts: 1291
Joined: Mon Jan 13, 2014 11:13 pm

Game changes after start

Post by Corbeau »

I'm curious, is there any, and I literally mean ANY way to change the ruleset and server settings after a game has started?
--
* Freeciv LongTurn, a community of one-turn-per-day players and developers
* LongTurn Blog - information nexus with stuff and stuff and stuff
* Longturn Discord server; real-time chatting, discussing, quarrelling, trolling, gaslighting...
cazfi
Elite
Posts: 3077
Joined: Tue Jan 29, 2013 6:54 pm

Re: Game changes after start

Post by cazfi »

Most server settings are changeable after game has started.

Ruleset can be changed only by savegame editing.
User avatar
Corbeau
Elite
Posts: 1291
Joined: Mon Jan 13, 2014 11:13 pm

Re: Game changes after start

Post by Corbeau »

Ok, I just checked. Save file is full of maps and the only reference to rulesets is the rulesetdir line which simply refers to ruleset files.

So, what I gather from this is that you can edit maps through save file (if you are absolutely sure what you're doing), but to change the ruleset in the middle of the game, all you need to do is simply reload the save file with the changed ruleset (and hope the changes won't crash the game). Am I correct?
--
* Freeciv LongTurn, a community of one-turn-per-day players and developers
* LongTurn Blog - information nexus with stuff and stuff and stuff
* Longturn Discord server; real-time chatting, discussing, quarrelling, trolling, gaslighting...
User avatar
Alien Valkyrie
Elite
Posts: 513
Joined: Sun Feb 10, 2013 10:21 pm
Location: Stuttgart, Germany

Re: Game changes after start

Post by Alien Valkyrie »

Yes. You do, however, also have to make sure the rulesets use compatible names (or, if given, rule_names) for everything, otherwise it will crash your game. That said, the supplied rulesets use the same names for (I think) everything shared between them.
~ AVL
User avatar
dunnoob
Elite
Posts: 327
Joined: Mon Dec 23, 2013 3:13 am
Location: Hamburg
Contact:

Re: Game changes after start

Post by dunnoob »

Corbeau wrote: you can edit maps through save file (if you are absolutely sure what you're doing), but to change the ruleset in the middle of the game, all you need to do is simply reload the save file with the changed ruleset (and hope the changes won't crash the game). Am I correct?
Not exactly, e.g., it won't work if the number of bases is different, and it cannot work if the terrains / buildings / units / ... are different.
User avatar
Corbeau
Elite
Posts: 1291
Joined: Mon Jan 13, 2014 11:13 pm

Re: Game changes after start

Post by Corbeau »

Can you clarify, please?
--
* Freeciv LongTurn, a community of one-turn-per-day players and developers
* LongTurn Blog - information nexus with stuff and stuff and stuff
* Longturn Discord server; real-time chatting, discussing, quarrelling, trolling, gaslighting...
cazfi
Elite
Posts: 3077
Joined: Tue Jan 29, 2013 6:54 pm

Re: Game changes after start

Post by cazfi »

Definitely changing the ruleset definition in a savegame is not supported feature. If it breaks, you get to keep all the pieces.

Obviously things do break if the savegame uses terrains/units/techs/.... that the ruleset you switch to does not provide.
User avatar
dunnoob
Elite
Posts: 327
Joined: Mon Dec 23, 2013 3:13 am
Location: Hamburg
Contact:

Re: Game changes after start

Post by dunnoob »

Corbeau wrote:Can you clarify, please?
Classic has 4 bases (fortress, buoy, airbase, ruins), Radius has 5 (additional marina), I can't switch from classic to radius or v.v., there's a built-in plausibility check. Internally almost everything has numbers, and the, say, classic building #3 could be completely different from civ2civ3 building #3, even if they have the same number of buildings.

What you can do is to switch to a newer version of the same ruleset while playing, just save + quit + tweak ruleset + load + continue with tweaked ruleset.
User avatar
Corbeau
Elite
Posts: 1291
Joined: Mon Jan 13, 2014 11:13 pm

Re: Game changes after start

Post by Corbeau »

dunnoob wrote:
Corbeau wrote:Can you clarify, please?
Classic has 4 bases (fortress, buoy, airbase, ruins), Radius has 5 (additional marina), I can't switch from classic to radius or v.v., there's a built-in plausibility check. Internally almost everything has numbers, and the, say, classic building #3 could be completely different from civ2civ3 building #3, even if they have the same number of buildings.

What you can do is to switch to a newer version of the same ruleset while playing, just save + quit + tweak ruleset + load + continue with tweaked ruleset.
Yes, that's what I had in mind. Of course, making drastic changes wouln't make any sense, but adding stuff or fixing some misfeature or changing a number for some effect would be acceptable, I assume. I'm not talking about removing Temple in Turn 50 and adding some other building, but, for example, adding some new building and/or unit that nobody built at the moment of change (technology needed not yet discovered).

Also, this could probably be a more complex issue: adding new players?

Also, increasing the size of the map by adding, say, 20 new columns.

By what I saw looking at savegames, it's a tricky business, but with enough trial and error maybe it's possible. Unless there is some hard-coded mechanism that is preventing it?
--
* Freeciv LongTurn, a community of one-turn-per-day players and developers
* LongTurn Blog - information nexus with stuff and stuff and stuff
* Longturn Discord server; real-time chatting, discussing, quarrelling, trolling, gaslighting...
cazfi
Elite
Posts: 3077
Joined: Tue Jan 29, 2013 6:54 pm

Re: Game changes after start

Post by cazfi »

dunnoob wrote:
Corbeau wrote:Can you clarify, please?
Classic has 4 bases (fortress, buoy, airbase, ruins), Radius has 5 (additional marina), I can't switch from classic to radius or v.v., there's a built-in plausibility check.
I remember that there was an issue like that, but are you saying it's still not fixed? We don't have ticket about it in hrm. (Was this something that we lost track of when gna went down)
dunnoob wrote:classic building #3 could be completely different from civ2civ3 building #3, even if they have the same number of buildings.
That's exactly why "rule_name" exist for most ruleset objects.
Post Reply