Skip to content

Add a View World Settings popup to the Map menu - #1073

Merged
ajhalme merged 4 commits into
C7-Game:Developmentfrom
Billytifft:billy/world-settings-view
Nov 14, 2026
Merged

ajhalme merged 4 commits into
C7-Game:Developmentfrom
Billytifft:billy/world-settings-view

Conversation

@Billytifft

@Billytifft Billytifft commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

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:

  • Size
  • Landform
  • Ocean Coverage
  • Climate
  • Temperature
  • Age
  • Seed

The popup has a Back button that returns to the Map menu.
Screenshot 2026-10-26 at 12 33 26 PM
Screenshot 2026-10-26 at 12 33 52 PM

Details

  • World settings are persisted in the save format so they survive save/load
    and are available for games imported from Civ3 .sav and .biq files.
  • Scenario maps that use non-standard dimensions relative to their base
    WSIZ entry are displayed as Size: Custom.
  • Ocean coverage is mapped from Civ3's index values (0 = 80%, 1 = 70%,
    2 = 60%) to the engine's OceanCoverage values.
  • The seed is read from the existing top-level SaveGame.Seed /
    GameData.seed field, which stores the resolved random seed rather than
    -1.

Testing

  • dotnet build C7/C7.sln — 0 errors
  • dotnet test C7/C7.sln — 219 passed, 16 skipped
  • dotnet format C7/C7.sln whitespace --verify-no-changes — clean
  • Verified scenario imports display Custom where map dimensions differ from
    the referenced standard size.

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.
@Billytifft
Billytifft marked this pull request as ready for review October 26, 2026 18:40
@ajhalme

ajhalme commented Nov 12, 2026

Copy link
Copy Markdown
Contributor

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 WorldSettings class just for this, when WorldCharacteristics exists alongside the map generator and covers almost all of the same data. We should combine the two, or rather simplify WorldCharacteristics so it can be easily used and serialised directly. The extra fields like terrainTypes currently in WorldCharacteristics probably belong in the map generator anyway.

@Billytifft

Copy link
Copy Markdown
Contributor Author

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.
@Billytifft

Copy link
Copy Markdown
Contributor Author

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.

Comment thread C7Engine/MapGenerator.cs Resolved
Comment thread C7/UIElements/NewGame/PlayerSetup.cs Resolved
Comment thread C7Engine/MapGenerator.cs Resolved
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.
@ajhalme

ajhalme commented Nov 13, 2026

Copy link
Copy Markdown
Contributor

LGTM. Clashing with the previous merge.

…ttings-view

# Conflicts:
#	C7/Game_EmitMessages.cs
#	C7Engine/MapGenerator.cs
@ajhalme
ajhalme merged commit 1016e76 into C7-Game:Development Nov 14, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants