Repository navigation
Add a View World Settings popup to the Map menu - #1073
Conversation
Persist the world settings used to generate a map so they can be shown in-game. Display Custom for scenario maps whose dimensions differ from their base world size.
|
Getting the world parameters into the save file seems like a useful thing. I'm less convinced about the usefulness of the UI display, but that seems harmless enough. I do object to introducing a whole new |
|
sounds good. The main reason for this feature is I see on reddit people posting great starting locations, etc, and everyone always asks for the seed information. this way we can make it easy for them to get it and share with others. I will work on de-duping the functionality between WorldCharacteristics and WorldSettings. |
Remove the duplicate WorldSettings DTO and use WorldCharacteristics as the serializable settings object. Move map-generation-only data into MapGeneratorData, keep the seed and barbarian activity in their existing save fields, and display unknown values for saves that predate the settings.
|
I removed the duplicate WorldSettings class and made WorldCharacteristics the serialized settings object, moving map-generation-only fields like terrain types, resources, government, and max ranks into a new MapGeneratorData. The seed and barbarian activity now come from the existing SaveGame fields so there's only one source of truth. I also made older saves without these settings show Unknown instead of misleading defaults, and added tests for persistence and scenario imports. |
Replace the MapGenerator inheritance of WorldCharacteristics with a MapGeneratorData wrapper that holds the shared settings plus the generation-only fields. Rename the generator parameter to mapGeneratorData and space out the setting construction in PlayerSetup.
|
LGTM. Clashing with the previous merge. |
…ttings-view # Conflicts: # C7/Game_EmitMessages.cs # C7Engine/MapGenerator.cs
Summary
Adds a View World Settings option to the in-game Map menu. The new popup
shows the settings used to generate the current world:
The popup has a Back button that returns to the Map menu.


Details
and are available for games imported from Civ3
.savand.biqfiles.WSIZentry are displayed asSize: Custom.0 = 80%,1 = 70%,2 = 60%) to the engine'sOceanCoveragevalues.SaveGame.Seed/GameData.seedfield, which stores the resolved random seed rather than-1.Testing
dotnet build C7/C7.sln— 0 errorsdotnet test C7/C7.sln— 219 passed, 16 skippeddotnet format C7/C7.sln whitespace --verify-no-changes— cleanCustomwhere map dimensions differ fromthe referenced standard size.