#41117: Savegame handling for counters Open Date: 2021-01-07 23:00 Last Update: 2021-12-09 04:27 URL for this Ticket: https://osdn.net//projects/freeciv/ticket/41117 RSS feed for this Ticket: https://osdn.net/ticket/ticket_rss.php?group_id=12505&tid=41117 --------------------------------------------------------------------- Last Changes/Comment on this Ticket: 2021-12-09 04:27 Updated by: cazfi Comment: Reply To cazfi Next step would be to save the counter value for each city. We need that even for the minimal patch to push to the repository - in it's current form it creates inconsistent savegames in that the "city_counters_order_size" claim there to be 1 counter saved for each city, but actually no counters are saved. It's probably cleanest to save them in a new "counters" section, as vectors where first element is the city id (in case of city counters), and rest are counter values: c0000=100,1,... c0001=101,1,... c0002=102,2,... I'm open to different savegame format, if someone has a better idea. --------------------------------------------------------------------- Ticket Status: Reporter: cazfi Owner: (None) Type: Patches Status: Open Priority: 5 - Medium MileStone: 3.2.0 Component: General Severity: 5 - Medium Resolution: None --------------------------------------------------------------------- Ticket details: Save and load counter information. This require saving the order (counters_order), and the city counter values. It might make sense to save city_counters_order instead of order of global counters list - this is to be decided. Should also save boolean indicator that the freeciv revision doing the saving has hardcoded_counters. There's no need to read it yet, but it's there in the savegame for the benefit of the future freeciv revisions loading it. -- Ticket information of Freeciv project Freeciv Project is hosted on OSDN Project URL: https://osdn.net/projects/freeciv/ OSDN: https://osdn.net URL for this Ticket: https://osdn.net/projects/freeciv/ticket/41117 RSS feed for this Ticket: https://osdn.net/ticket/ticket_rss.php?group_id=12505&tid=41117