Summary: multiplayer ruleset: Savegames not portable against
ruleset changes due to saved script variables
Submitted by: jtn
Submitted on: Sat 18 Oct 2014 12:53:59 BST
Severity: 3 - Normal
Priority: 5 - Normal
Assigned to: None
Discussion Lock: Any
Operating System: None
In a savegame of the multiplayer ruleset, the following state is saved:
This hardcodes numeric indexes of ruleset objects from the currently loaded
ruleset. If the ruleset is rearranged so that objects have different indices,
this bypasses the usual savegame compatibility arrangements for that.
Probably the script should just look these up on demand; I can't see any
impact other than performance, and a minor one at that.
(I wasn't sure whether file-scope variable assignments might be re-evaluated
at savegame load. It seems they aren't; I guess they're evaluated at ruleset
load and then stomped by anything in the savegame. If I save a game and then
jtn: 'lua cmd log.normal((find.building_type("Darwin's Voyage")).id)'
jtn: 'lua cmd log.normal(darw_id)'
Reply to this item at:
Message sent via/by Gna!
Freeciv-dev mailing list