yairm210/Unciv

Start new game issues - e.g. Map Type selection sometimes fails

krijnsent opened this issue · 1 comments

Is there an existing issue for this?

  • I have searched the existing issues

Game Version

4.11.5

Describe the bug

Map Type selection sometimes fails, see steps to reproduce and these 2 examples.
A bit more extensive: the Start New Game screen seems to misfire on several occasions:

  • install REKMOD
  • start a Vanilla game with a Generated map
  • from in the game, select New Game
  • REKMOD is default selected (instead of settings that were used to start the Vanilla game)

Follow up of that example:

  • start a game with REKMOD & Custom Earth XL Map
  • from in the game, go for Start New game
  • select Vanilla & Map Type Generated
  • from the game go again for Start New game
  • notice that REKMOD seems to be the base ruleset, switch that back to Vanilla
  • start game -> ERROR: It looks like we can't make a map with the parameters you requested.

Steps to Reproduce

  1. Install REKMOD
  2. Select Map Type Custom & True Earth XL Map
  3. Start the game, you start on an earth map
  4. In the game, click on Start New Game
  5. In the menu select "Generated" Map Type
  6. Start the game, the game will still start on the Earth XL Map, not on a generated one (I recognize the starting positions from the Earth XL Map)

Screenshots

No response

Link to save file

No response

Operating System

Windows

Additional Information

I often restart a game because I e.g. forgot to change a setting/switch on an extension, it's rather annoying that quite often those settings get thrown away when you directly go for New Game from inside the game.

Update to 4.11.6 - oops, wait, the PR you need is still open. But yes it'll likely be in 4.11.6.

It involves the game checking available maps for ones "edited" recently - and regrettably mod install/update will set fresh timestamps on mod files, so maps of recently touched mods count. Then such maps are "offered" and a map selection triggers copying the mod selection the map author stored with the map...
That and there was a sync condition where the UI reflected the state of a different MapParameters object than what was actually used.

So there.

There's still room for improvement, but not enough energy to work on it. Namely - mod compatibility and missing mods, mods containing maps flagging different mods (should probably be checked in validator and only mods marked as required allowed) and a few other loopholes.