Project

Profile

Help

HostedRedmine.com has moved to the Planio platform. All logins and passwords remained the same. All users will be able to login and use Redmine just as before. Read more...

Bug #767130

Scenario start year ignored unless scenario contains saved players

Added by Jacob Nevins about 3 years ago. Updated about 2 years ago.

Status:
Closed
Priority:
Normal
Category:
General
Sprint/Milestone:
Start date:
Due date:
% Done:

0%

Estimated time:

Description

The editor invites scenario authors to set the game year among other scenario properties. However, it is ignored on game load, unless the save file also contains players.

However, in practice it gets ignored unless players are also saved. game.info.is_new_game is set based on absence of game.save_players in the savegame; and if set, srv_ready() does "game.info.year = game.server.start_year", which comes from the ruleset.

Our supplied Iberian Peninsula scenario attempts to start at -2000, but it is ignored due to this behaviour. (Found when testing the iso Iberian scenario in task #767082.)

Not sure what to do. Allowing scenario authors to set start year probably requires an explicit override, because it comes from the ruleset, and at some point scenarios won't be ruleset-specific. Or we could just document the current behaviour in an editor tooltip.


Related issues

Related to Freeciv - Task #767082: Refresh old isometric maps and put them on modpack serverClosed

<a title="Actions" class="icon-only icon-actions js-contextmenu" href="#">Actions</a>
Related to Freeciv - Bug #820731: Scorelog module does not respect ruleset set game start yearClosed

<a title="Actions" class="icon-only icon-actions js-contextmenu" href="#">Actions</a>
Blocks Freeciv - Task #656467: S3_0 network protocol freeze (npf)Closed2020-03-072020-03-07

<a title="Actions" class="icon-only icon-actions js-contextmenu" href="#">Actions</a>

History

#1 Updated by Jacob Nevins about 3 years ago

  • Related to Task #767082: Refresh old isometric maps and put them on modpack server added

#2 Updated by Jacob Nevins about 3 years ago

Noticed in passing: log_civ_score_now() tests game.info.year against the hardcoded GAME_START_YEAR, not the ruleset value. That should probably be replaced with something more robust. Probably in its own ticket.

#3 Updated by Marko Lindqvist almost 3 years ago

I would even consider removing editor support for setting the start year completely. Even if the start year gets set by the scenario file, it's still ruleset that drives it forward. Together they can lead to weird results.
The given -2000 start year is 2000 years later than the start year assumed by the ruleset. Calendar then goes forward with the same speed (as its increment is based on turn, not year) as usually, meaning the 2000 year difference compared to regular game is true for all turns. Game probably ends at around year 4000 instead of 2000.

#4 Updated by Marko Lindqvist about 2 years ago

  • Blocks Task #656467: S3_0 network protocol freeze (npf) added

#5 Updated by Marko Lindqvist about 2 years ago

Attached patches remove game start year setting support from the editor.

#6 Updated by Marko Lindqvist about 2 years ago

Jacob Nevins wrote:

Noticed in passing: log_civ_score_now() tests game.info.year against the hardcoded GAME_START_YEAR, not the ruleset value. That should probably be replaced with something more robust. Probably in its own ticket.

-> Bug #820731

#7 Updated by Marko Lindqvist about 2 years ago

  • Status changed from Resolved to Closed
  • Assignee set to Marko Lindqvist

#8 Updated by Jacob Nevins almost 2 years ago

  • Related to Bug #820731: Scorelog module does not respect ruleset set game start year added

Also available in: Atom PDF