Description
During the independence declaration dialog, the player is prompted to
customize several things about their new nation — including a custom
flag design and a name for their citizens (e.g. "Haitian citizens").
None of these customizations appear to carry over into gameplay after
independence is won:
- The custom flag is not saved or shown in the Foreign Affairs report.
- Units continue to display their pre-independence unit type names
(e.g. "FreeColonist") instead of the custom citizen name chosen
during declaration.
- Enemy/rival units also retain their original colonial-power naming
(e.g. "French continental cavalry") even after the player has won
the war of independence against them.
Steps to Reproduce
- Play to the point where independence can be declared.
- In the declaration dialog, design a custom flag and enter a custom
name for citizens (e.g. "Haitian citizens").
- Confirm the declaration and win the war of independence.
- Observe:
- Foreign Affairs report still shows the old colonial flag.
- Your own units are still labeled "FreeColonist" rather than the
chosen citizen name.
- Defeated/rival units are still labeled with their original
colonial designation (e.g. "French continental cavalry").
Expected Behavior
Once independence is declared (and/or won), the custom flag and
citizen naming chosen by the player should be reflected everywhere
the nation and its units are displayed — Foreign Affairs report, unit
labels/tooltips, combat logs, etc.
Actual Behavior
All of these revert to or remain on the original colonial-era values;
none of the independence-time customization persists.
Technical Notes
ReportForeignAffairPanel.java (~line 88) renders the flag via
lib.getScaledNationImage(enemy.getNation()), which always resolves
to the original colonial Nation.
ConfirmDeclarationDialog.java builds a Flag object for preview,
but getResponse() only returns nation name and country name — the
flag design itself is discarded when the dialog closes.
- Unit labels likely pull their display name from the base unit type
(UnitType) or Nation/NationType rather than checking
Player.isIndependent() and any custom naming field — this would
need similar investigation in the unit-rendering/label code
(likely under client/gui/) and in Nation/NationType.
- A proper fix likely needs a single underlying mechanism: persist
the player's independence-time customizations (flag design, citizen
name) on Player/ServerPlayer, and have all relevant display code
(flags, unit labels, reports) check for and use them when
isIndependent() is true.
Environment
- FreeCol version/branch: 1.2.0
- OS: Windows 10