-
Notifications
You must be signed in to change notification settings - Fork 68
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Faction Heroes are created without an origin country #1140
Labels
Comments
Iridar
added a commit
to Iridar/X2WOTCCommunityHighlander
that referenced
this issue
Apr 3, 2022
Iridar
pushed a commit
that referenced
this issue
May 21, 2023
…n heroes default to USA names" This reverts commit 025aa11.
The merged PR turned out to be buggy, reopening. |
Iridar
added a commit
to Iridar/X2WOTCCommunityHighlander
that referenced
this issue
May 21, 2023
Iridar
pushed a commit
to Iridar/X2WOTCCommunityHighlander
that referenced
this issue
May 21, 2023
Iridar
pushed a commit
to Iridar/X2WOTCCommunityHighlander
that referenced
this issue
May 21, 2023
Iridar
pushed a commit
to Iridar/X2WOTCCommunityHighlander
that referenced
this issue
May 21, 2023
Iridar
pushed a commit
to Iridar/X2WOTCCommunityHighlander
that referenced
this issue
May 21, 2023
…and update docs
Iridar
pushed a commit
that referenced
this issue
May 21, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The Problem
Without Highlander, Reapers and Templars roll a random country for the purposes of name and biography, just like for regular soldiers, and then their country gets overridden to their faction countries for the sake of country flag.
With Highlander, Reapers and Templars are generated with their faction countries right away, so their names default to USA names, and their biography is missing a country name entirely, presumably because their faction countries do not have a localized name.
The Suspect
#783 added faction hero XGCharacterGenerator classes into Highlander, and adjusted their logic slightly so that the new DLC hook,
ModifyGeneratedUnitAppearance
, can work more consistently.For example, for Reapers, the following code:
was replaced with
The overall idea of the refactor was to move calling
super.CreateTSoldier()
to the very end of the function, so thatModifyGeneratedUnitAppearance
, which is called at the very end ofXGCharacterGenerator::CreateTSoldier()
, has the final say on the properties of the generated soldier.This had the assumption that
super.CreateTSoldier()
would callSetCountry()
, which in the case of Reaper character generator was changed to:This assumption has missed the fact that
XGCharacterGenerator::CreateTSoldier()
setsBioCountryName = kSoldier.nmCountry;
, which at that time and place would be the randomly generated country.The original
XGCharacterGenerator_Reaper::CreateTSoldier()
would overridekSoldier.nmCountry
later, but it would not affect theBioCountryName
.With the Highlander changes, the
BioCountryName
is set to faction country, creating the problem.The text was updated successfully, but these errors were encountered: