Game changes after start

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

Game changes after start

Postby Corbeau » Thu Mar 01, 2018 10:57 am

I'm curious, is there any, and I literally mean ANY way to change the ruleset and server settings after a game has started?

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

Re: Game changes after start

Postby cazfi » Thu Mar 01, 2018 1:44 pm

Most server settings are changeable after game has started.

Ruleset can be changed only by savegame editing.

User avatar
Corbeau
Elite
Posts: 904
Joined: Mon Jan 13, 2014 11:13 pm

Re: Game changes after start

Postby Corbeau » Thu Mar 01, 2018 6:44 pm

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?

User avatar
Caedo
Elite
Posts: 465
Joined: Sun Feb 10, 2013 10:21 pm
Location: Stuttgart, Germany

Re: Game changes after start

Postby Caedo » Thu Mar 01, 2018 8:23 pm

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.
~S.C. L.

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

Re: Game changes after start

Postby dunnoob » Sat Mar 03, 2018 10:26 am

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: 904
Joined: Mon Jan 13, 2014 11:13 pm

Re: Game changes after start

Postby Corbeau » Sat Mar 03, 2018 10:33 am

Can you clarify, please?

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

Re: Game changes after start

Postby cazfi » Sat Mar 03, 2018 10:50 am

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: 326
Joined: Mon Dec 23, 2013 3:13 am
Location: Hamburg
Contact:

Re: Game changes after start

Postby dunnoob » Sat Mar 03, 2018 10:51 am

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: 904
Joined: Mon Jan 13, 2014 11:13 pm

Re: Game changes after start

Postby Corbeau » Sat Mar 03, 2018 4:23 pm

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?

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

Re: Game changes after start

Postby cazfi » Sat Mar 03, 2018 4:33 pm

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.