Skip to content

Adds Map of Vietnam#4592

Open
crunchybbb2 wants to merge 6 commits into
openfrontio:mainfrom
crunchybbb2:vietnam
Open

Adds Map of Vietnam#4592
crunchybbb2 wants to merge 6 commits into
openfrontio:mainfrom
crunchybbb2:vietnam

Conversation

@crunchybbb2

@crunchybbb2 crunchybbb2 commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

Before opening a PR: discuss new features on Discord first, and file bugs or small improvements as issues. You must be assigned to an approved issue — unsolicited PRs will be auto-closed.

Add approved & assigned issue number here:

Resolves #4591 (issue number)

Description:

  • long skinny map for the Vietnam War simulation and the Vietnamese audience in the game. Uses impassable terrain. Nations are provinces that existed in the 60s-70s . Additionals are modern provinces.
  • 15 nations
  • 62 including additional
  • 2 Teams spawns, teams are divided on the 17th Parallel dividing North And South Vietnam during the war
  • More chance to be a 2 team game
  • Unfortunately the nations names do not have vietnamese accent markers because it breaks the game

"height": 3560,
"num_land_tiles": 1504115,
"width": 1976


image Screenshot 2026-07-12 205333

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

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

DISCORD_USERNAME crunchybbbbb

@coderabbitai

coderabbitai Bot commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 80d79fd2-d504-4db1-86f9-bccd24e5caca

📥 Commits

Reviewing files that changed from the base of the PR and between a05f235 and 7ed6f51.

⛔ Files ignored due to path filters (4)
  • map-generator/assets/maps/vietnam/image.png is excluded by !**/*.png
  • resources/maps/vietnam/map.bin is excluded by !**/*.bin
  • resources/maps/vietnam/map16x.bin is excluded by !**/*.bin
  • resources/maps/vietnam/map4x.bin is excluded by !**/*.bin
📒 Files selected for processing (2)
  • resources/maps/vietnam/manifest.json
  • resources/maps/vietnam/thumbnail.webp
🚧 Files skipped from review as they are similar to previous changes (2)
  • resources/maps/vietnam/thumbnail.webp
  • resources/maps/vietnam/manifest.json

Walkthrough

Adds the Vietnam map with region metadata, team spawn areas, dimensions, thumbnail, English localization, and registration in the generated game map list.

Changes

Vietnam map

Layer / File(s) Summary
Vietnam map metadata and assets
map-generator/assets/maps/vietnam/info.json, resources/maps/vietnam/manifest.json, resources/maps/vietnam/thumbnail.webp
Defines Vietnam’s regions, coordinates, map dimensions, multiplayer settings, team spawn areas, and thumbnail asset.
Vietnam localization key
resources/lang/en.json
Adds the map.vietnam English localization entry.
Game map registration
src/core/game/Maps.gen.ts
Adds the vietnam map type and registers its map metadata, categories, translation key, and team settings.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Possibly related PRs

Suggested labels: Maps

Suggested reviewers: evanpelle, flopinguin

Poem

Vietnam joins the map parade,
With regions marked and teams arrayed.
A thumbnail shines, coordinates align,
Localization makes the title fine.
New paths await across the terrain.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Linked Issues check ❓ Inconclusive Most objectives are reflected, but impassable terrain cannot be verified because resources/maps/vietnam/map.bin was excluded by the path filter. Review resources/maps/vietnam/map.bin (excluded by !**/*.bin) to confirm the terrain is impassable and the map matches issue #4591.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly states the main change: adding the Vietnam map.
Description check ✅ Passed The description matches the map addition and Vietnam-focused gameplay details in the changeset.
Out of Scope Changes check ✅ Passed The changes stay focused on the Vietnam map assets, localization, and generated map entry.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

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.

@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: 3

🧹 Nitpick comments (1)
src/core/game/Maps.gen.ts (1)

106-106: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Use UpperCamelCase for the vietnam enum key and MapInfo id.

All other GameMapType enum keys use UpperCamelCase (e.g., Achiran, AmazonRiver, Venice). The vietnam key should be Vietnam, and the MapInfo id should be "Vietnam" per the interface comment: "GameMapType enum key — the UpperCamelCase folder name." This is downstream of the name: "vietnam" issue in info.json — fixing the name there to "Vietnam" and regenerating would propagate the correction.

Based on learnings from PR 4408, per-map test updates are not required for generated map registry additions.

♻️ Proposed fix
-  vietnam = "vietnam", // map-generator/assets/maps/vietnam/info.json
+  Vietnam = "Vietnam", // map-generator/assets/maps/vietnam/info.json
   {
-    id: "vietnam",
-    type: GameMapType.vietnam,
+    id: "Vietnam",
+    type: GameMapType.Vietnam,
     translationKey: "map.vietnam",
     categories: ["new", "countries", "asia"],
     multiplayerFrequency: 4,
     specialTeamCount: 2,
   },

Also applies to: 897-904

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/core/game/Maps.gen.ts` at line 106, Update the generated map metadata so
the GameMapType enum entry and corresponding MapInfo id use UpperCamelCase:
rename the vietnam key to Vietnam and set its id to "Vietnam". Also update the
source map info name to "Vietnam" and regenerate the affected map registry
entries, without adding per-map test changes.

Source: Learnings

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@map-generator/assets/maps/vietnam/info.json`:
- Line 96: Update the province name value in the Vietnam map metadata from “An
GIang” to “An Giang,” preserving all other fields unchanged.
- Around line 104-105: Update the map name value in the Vietnam map metadata
from lowercase to “Vietnam”, preserving the existing id. Regenerate the
dependent GameMapType entry in Maps.gen.ts and the English localization display
value so both use the capitalized name consistently.

In `@resources/lang/en.json`:
- Line 1020: Update the "vietnam" map localization entry in the language
resource so its display value is capitalized as "Vietnam", while preserving the
lowercase key matching the map ID.

---

Nitpick comments:
In `@src/core/game/Maps.gen.ts`:
- Line 106: Update the generated map metadata so the GameMapType enum entry and
corresponding MapInfo id use UpperCamelCase: rename the vietnam key to Vietnam
and set its id to "Vietnam". Also update the source map info name to "Vietnam"
and regenerate the affected map registry entries, without adding per-map test
changes.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 6fc3c160-182e-4c3b-aadb-525fb03b06b2

📥 Commits

Reviewing files that changed from the base of the PR and between e57939a and a05f235.

⛔ Files ignored due to path filters (4)
  • map-generator/assets/maps/vietnam/image.png is excluded by !**/*.png
  • resources/maps/vietnam/map.bin is excluded by !**/*.bin
  • resources/maps/vietnam/map16x.bin is excluded by !**/*.bin
  • resources/maps/vietnam/map4x.bin is excluded by !**/*.bin
📒 Files selected for processing (5)
  • map-generator/assets/maps/vietnam/info.json
  • resources/lang/en.json
  • resources/maps/vietnam/manifest.json
  • resources/maps/vietnam/thumbnail.webp
  • src/core/game/Maps.gen.ts

{
"coordinates": [898, 3175],
"flag": "South Vietnam",
"name": "An GIang"

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.

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Fix "An GIang" capitalization typo.

The province name should be "An Giang" (lowercase 'g'). "GIang" is not a correct spelling of any Vietnamese province.

💚 Proposed fix
-      "name": "An GIang"
+      "name": "An Giang"
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
"name": "An GIang"
"name": "An Giang"
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@map-generator/assets/maps/vietnam/info.json` at line 96, Update the province
name value in the Vietnam map metadata from “An GIang” to “An Giang,” preserving
all other fields unchanged.

Comment on lines +104 to +105
"id": "vietnam",
"name": "vietnam",

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.

📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Capitalize the map name to "Vietnam".

All other maps use properly capitalized name values (e.g., "Africa", "Amazon River", "Korea"). The lowercase "vietnam" is inconsistent and cascades into the GameMapType enum key in Maps.gen.ts, which should be UpperCamelCase (Vietnam), and the localization display value in en.json.

💚 Proposed fix
-  "name": "vietnam",
+  "name": "Vietnam",
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
"id": "vietnam",
"name": "vietnam",
"id": "vietnam",
"name": "Vietnam",
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@map-generator/assets/maps/vietnam/info.json` around lines 104 - 105, Update
the map name value in the Vietnam map metadata from lowercase to “Vietnam”,
preserving the existing id. Regenerate the dependent GameMapType entry in
Maps.gen.ts and the English localization display value so both use the
capitalized name consistently.

Comment thread resources/lang/en.json
"twolakes": "Two Lakes",
"unitedstates": "United States",
"venice": "Venice",
"vietnam": "vietnam",

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.

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Capitalize the map display name to "Vietnam".

All other map entries use properly capitalized display names (e.g., "Africa", "Korea", "Venice"). The value "vietnam" will appear lowercase in the map picker UI. The key "vietnam" is correct (it matches the map id), but the value should be "Vietnam".

💚 Proposed fix
-    "vietnam": "vietnam",
+    "vietnam": "Vietnam",
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
"vietnam": "vietnam",
"vietnam": "Vietnam",
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@resources/lang/en.json` at line 1020, Update the "vietnam" map localization
entry in the language resource so its display value is capitalized as "Vietnam",
while preserving the lowercase key matching the map ID.

@github-project-automation github-project-automation Bot moved this from Triage to Development in OpenFront Release Management Jul 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Development

Development

Successfully merging this pull request may close these issues.

Adds Vietnam Map (With impassable terrain)

1 participant