Skip to content

More random nation names 😄#3486

Merged
evanpelle merged 1 commit intomainfrom
more-random-nation-names
Mar 21, 2026
Merged

More random nation names 😄#3486
evanpelle merged 1 commit intomainfrom
more-random-nation-names

Conversation

@FloPinguin
Copy link
Contributor

Description:

Extend NationCreation for a bit more variety :D

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:

FloPinguin

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Mar 21, 2026

Walkthrough

Expanded nation name generation vocabulary by adding new adjective templates, organizational suffixes, and noun entries. Updated pluralization logic to include irregular forms via a new SPECIAL_PLURALS mapping while maintaining existing rule-based patterns.

Changes

Cohort / File(s) Summary
Nation Name Generation System
src/core/game/NationCreation.ts
Expanded NAME_TEMPLATES with new adjectives (e.g., "Slightly Damp", "Weaponized") and organizational suffixes (e.g., "Syndicate", "Federation"), removed multiple prior sci-fi variants. Grew NOUNS vocabulary. Added SPECIAL_PLURALS mapping for irregular forms (Cactus→Cacti, Octopus→Octopi, Enderman→Endermen) and updated pluralize() to prioritize special rules.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

🌍 From "Damp" to "Weaponized" dreams,
Nations bloom with creative schemes,
Octopi and Cacti dance in sync,
No longer plurals on the brink,
Your naming engine's now complete!

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ 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%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title 'More random nation names' clearly and directly describes the main change—expanding nation-name templates and nouns in NationCreation.ts to provide greater variety.
Description check ✅ Passed The description is related to the changeset, explaining the intent to extend NationCreation for more variety and confirming testing, screenshots, and translations were completed.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


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.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

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

595-603: Consider clarifying the duplicate noun approach.

The duplicate entries for "Fullsender", "Mito", and "Mitochondria" appear to be intentional weighting to increase their selection probability. This works but could be clearer.

💡 Optional: Make weighting more explicit

Add a comment to clarify intent:

+ // Weighted entries (duplicated to increase selection probability)
  "Fullsender",
  "Fullsender",
  "Fullsender",
  "Mito",
  "Mito",
  "Mito",
  "Mitochondria",
  "Mitochondria",
  "Mitochondria",

Or consider a future refactor to use a weighted random selection structure if more weighted nouns are added.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/core/game/NationCreation.ts` around lines 595 - 603, The repeated entries
"Fullsender", "Mito", and "Mitochondria" in the noun list inside
NationCreation.ts are being used as an implicit weighting mechanism; please add
a short clarifying comment above that array (the noun list used by the
nation-name generator) stating that duplicates are intentional for weighting,
and optionally note a TODO to replace this with an explicit weighted structure
(e.g., a {word,weight} list or weightedRandom helper) if more weighted nouns are
expected in the future so other devs understand the intent.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@src/core/game/NationCreation.ts`:
- Around line 595-603: The repeated entries "Fullsender", "Mito", and
"Mitochondria" in the noun list inside NationCreation.ts are being used as an
implicit weighting mechanism; please add a short clarifying comment above that
array (the noun list used by the nation-name generator) stating that duplicates
are intentional for weighting, and optionally note a TODO to replace this with
an explicit weighted structure (e.g., a {word,weight} list or weightedRandom
helper) if more weighted nouns are expected in the future so other devs
understand the intent.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 170fd037-aa85-42a3-b16f-a8a46b1a5335

📥 Commits

Reviewing files that changed from the base of the PR and between 837458c and 8971955.

📒 Files selected for processing (1)
  • src/core/game/NationCreation.ts

@github-project-automation github-project-automation bot moved this from Triage to Final Review in OpenFront Release Management Mar 21, 2026
@evanpelle evanpelle added this to the v31 milestone Mar 21, 2026
@evanpelle evanpelle merged commit 95cdd3b into main Mar 21, 2026
13 of 14 checks passed
@evanpelle evanpelle deleted the more-random-nation-names branch March 21, 2026 21:36
@github-project-automation github-project-automation bot moved this from Final Review to Complete in OpenFront Release Management Mar 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Complete

Development

Successfully merging this pull request may close these issues.

2 participants