Skip to content

Add Nuke Wars Baikal Map - #2306

Merged
evanpelle merged 3 commits into
openfrontio:mainfrom
Duwibi:BaikalNukeWars
Oct 29, 2025
Merged

evanpelle merged 3 commits into
openfrontio:mainfrom
Duwibi:BaikalNukeWars

Conversation

@Duwibi

@Duwibi Duwibi commented Oct 26, 2025 •

Copy link
Copy Markdown
Contributor

Description:

This PR adds the Nuke Wars Baikal map (more balanced out than the original). This is made for the upcoming Nuke Wars gamemode.

Please complete the following:

  • I have added screenshots for all UI updates
  • I process any text displayed to the user through translateText() and I've added it to the en.json file
  • I have added relevant tests to the test directory
  • I confirm I have thoroughly tested these changes and take full responsibility for any bugs introduced

Please put your Discord username so you can be contacted if a bug or regression is found:

DISCORD_USERNAME
Nikola123

@Duwibi
Duwibi requested a review from a team as a code owner October 26, 2025 22:39
@CLAassistant

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@Duwibi Duwibi added the Maps A new map, or adjustments to an existing map itself, its json, etc, label Oct 26, 2025
@Duwibi Duwibi added this to the v27 milestone Oct 26, 2025
@coderabbitai

coderabbitai Bot commented Oct 26, 2025 •

Copy link
Copy Markdown
Contributor

Walkthrough

A new map "Baikal (Nuke Wars)" is registered: static asset and manifest files were added, and corresponding entries were added to map generation, localization, client descriptions, configuration, and core game enums/categories.

Changes

Cohort / File(s) Summary
Map Assets and Manifest
map-generator/assets/maps/baikalnukewars/info.json, resources/maps/baikalnukewars/manifest.json
Added static map metadata and manifest describing name, dimensions (2500×1564 base; 16x/4x variants), and land tile counts; nations array is empty.
Map Generator Registration
map-generator/main.go
Added "baikalnukewars" to the list of maps processed by the generator.
Localization
resources/lang/en.json
Added "baikalnukewars": "Baikal (Nuke Wars)" under the map section (adjusted surrounding JSON punctuation).
Client Map Descriptions
src/client/components/Maps.ts
Added BaikalNukeWars: "Baikal (Nuke Wars)" to exported MapDescription.
Game Configuration
src/core/configuration/DefaultConfig.ts
Added GameMapType.BaikalNukeWars to numPlayersConfig with values [100, 70, 50].
Game Core Types
src/core/game/Game.ts
Added BaikalNukeWars = "Baikal (Nuke Wars)" to GameMapType and included it in mapCategories.fantasy.

Sequence Diagram(s)

sequenceDiagram
  autonumber
  participant Assets as Map Assets (`info.json`, `manifest.json`)
  participant Generator as Map Generator (`map-generator/main.go`)
  participant Core as Game Core (`Game.ts`, `DefaultConfig.ts`)
  participant Client as Client UI (`Maps.ts`, `en.json`)

  Note over Assets,Generator: New asset + manifest added
  Assets->>Generator: Registered map key `baikalnukewars`
  Generator->>Core: Map key included in generation/output
  Core->>Client: GameMapType & config propagated
  Client->>Client: MapDescription + localization updated
  Note right of Client: UI can display new map name
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

  • Verify naming consistency: baikalnukewars (files/asset keys) vs BaikalNukeWars (TS identifiers) vs display string.
  • Check JSON syntax in resources/lang/en.json after insertion.
  • Confirm manifest dimensions and tile counts match expected generation outputs.

Possibly related PRs

  • Add Achiran #2280 — Adds a new map with matching edits to map-generator, localization, client MapDescription, DefaultConfig, and Game.ts.
  • Add Japan map #2106 — Similar code-level changes to register a new map across assets, manifests, and code.
  • Add Montreal #2081 — Adds a map with parallel updates to enums, descriptions, config, and localization.

Suggested reviewers

  • evanpelle
  • TheGiraffe3
  • scottanderson

Poem

🗺️ A frozen plain in pixels wakes,
Baikal's field for daring stakes,
New manifest and names align,
Maps registered — ready to confine,
Let generals test their lucky fates.

Pre-merge checks

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (2 passed)
Check name Status Explanation
Title Check ✅ Passed The pull request title "Add Nuke Wars Baikal Map" accurately summarizes the primary change in the changeset. The modifications across multiple files—including asset configuration, language translations, map component definitions, game type enumerations, and game configuration—all converge on a single objective: adding a new map variant called "Baikal (Nuke Wars)" to the application. The title is concise, specific, and clearly communicates what was added without being vague or generic.
Description Check ✅ Passed The pull request description is directly related to the changeset. It explains that the PR adds the Nuke Wars Baikal map, describes it as "more balanced out than the original," and contextualizes the addition as supporting the upcoming Nuke Wars gamemode. The description includes a completed checklist covering screenshots, user-facing text translations, tests, and testing verification, along with contributor contact information. All of these elements align with and support the changes made throughout the codebase.

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between b2f9242 and d2d0517.

📒 Files selected for processing (2)
  • map-generator/assets/maps/baikalnukewars/info.json (1 hunks)
  • resources/maps/baikalnukewars/manifest.json (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • map-generator/assets/maps/baikalnukewars/info.json
🔇 Additional comments (1)
resources/maps/baikalnukewars/manifest.json (1)

1-19: Well-structured manifest with correct scaling and naming.

The manifest is correctly formed and consistent with the map feature. The scaling is accurate across all resolution levels (4x and 2x downscales), and the tile counts are consistent with expected efficiency. The name "Baikal (Nuke Wars)" matches the related code changes, and the empty nations array aligns with the Nuke Wars gamemode design discussed in the PR.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 91f1748 and b2f9242.

⛔ Files ignored due to path filters (4)
  • map-generator/assets/maps/baikalnukewars/image.png is excluded by !**/*.png
  • resources/maps/baikalnukewars/map.bin is excluded by !**/*.bin
  • resources/maps/baikalnukewars/map16x.bin is excluded by !**/*.bin
  • resources/maps/baikalnukewars/map4x.bin is excluded by !**/*.bin
📒 Files selected for processing (7)
  • map-generator/assets/maps/baikalnukewars/info.json (1 hunks)
  • map-generator/main.go (1 hunks)
  • resources/lang/en.json (1 hunks)
  • resources/maps/baikalnukewars/manifest.json (1 hunks)
  • src/client/components/Maps.ts (1 hunks)
  • src/core/configuration/DefaultConfig.ts (1 hunks)
  • src/core/game/Game.ts (2 hunks)
🔇 Additional comments (7)
src/client/components/Maps.ts (1)

40-40: LGTM! Map description entry added correctly.

The new BaikalNukeWars entry follows the existing pattern and maintains alphabetical ordering.

src/core/game/Game.ts (1)

99-99: Enum member added correctly.

The new BaikalNukeWars enum member follows the existing pattern and maintains alphabetical ordering.

src/core/configuration/DefaultConfig.ts (1)

53-53: LGTM! Player configuration added correctly.

The new configuration entry mirrors the original Baikal map with [100, 70, 50] player counts, which is appropriate if the map dimensions are similar. The alphabetical ordering is maintained.

map-generator/main.go (1)

21-21: LGTM! Map generator entry added correctly.

The new entry follows the existing pattern and maintains alphabetical ordering. This will enable the map generation pipeline to process the Baikal Nuke Wars map assets.

map-generator/assets/maps/baikalnukewars/info.json (1)

2-2: Name field matches internal name convention.

The "name": "Baikal" field here matches the manifest and likely represents the internal/base map name, while "Baikal (Nuke Wars)" is the user-facing display name. This is consistent with how the system separates internal identifiers from localized display strings.

resources/lang/en.json (1)

197-198: LGTM! Translation entry added correctly.

The new translation key follows the naming convention (lowercase, no spaces) and the display value "Baikal (Nuke Wars)" is consistent with the TypeScript enum and client descriptions. The alphabetical ordering is maintained.

resources/maps/baikalnukewars/manifest.json (1)

17-17: Update the manifest name field to distinguish the map variant.

The verification confirms both maps use "name": "Baikal". While maps are indexed by directory path, having identical names for different map variants risks confusion in UI display, logs, or user-facing content. The codebase shows this pattern elsewhere (two "Europe" variants also share a name).

Update resources/maps/baikalnukewars/manifest.json to use "name": "Baikal (Nuke Wars)" to match how the map is displayed throughout the codebase and ensure each map variant has a unique, descriptive identifier.

Comment thread src/core/game/Game.ts Resolved
@TheGiraffe3

Copy link
Copy Markdown
Member

I think it would be better to have Nuke Wars turn off nations, as opposed to creating a whole new map for it. The only difference I see from the normal Baikal map is the lack of nations.

@Duwibi

Duwibi commented Oct 27, 2025

Copy link
Copy Markdown
Contributor Author

I think it would be better to have Nuke Wars turn off nations, as opposed to creating a whole new map for it. The only difference I see from the normal Baikal map is the lack of nations.

Have you taken a look at the map? This totally rebalances it so both sides and far more equal in tile numbers 😅. The lack of nations is just one of many things

@TheGiraffe3

Copy link
Copy Markdown
Member

Oh yeah, I see now. I hadn't made a comparison before, just skimmed it over. It's been too long since I played the Baikal map, apparently.

@evanpelle
evanpelle merged commit fbb818b into openfrontio:main Oct 29, 2025
1 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Maps A new map, or adjustments to an existing map itself, its json, etc,

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants