openly-retro / stellaris-machine-robot-expansion

Continuation of XVCV's "Machine & Robot Expansion" mod
https://steamcommunity.com/sharedfiles/filedetails/?id=3163759042
2 stars 2 forks source link

Stellaris base tooltip key word order randomly wont match the trait modifier word order #48

Closed openly-retro closed 8 months ago

openly-retro commented 8 months ago

Another "WTAF" --

example: the localisation trait key for the trait modifier, species_leader_exp_gain is not actually mod_species_leader_exp_gain but MOD_LEADER_SPECIES_EXP_GAIN

Note that "leader" and "species" have been swapped around.

Absolutely un-f*cking reliable base game data.

Shroud Almighty.. this is a hell of a doozy.

Generally, there is a pattern to this mind-flaying experience. It is generally the first two words that have been reversed.

Another example is for science_ship_survey_speed which should be mod_science_ship_survey_speed but in fact is MOD_SHIP_SCIENCE_SURVEY_SPEED (and in uppercase, too.. shudder)

So, one possible approach...

  1. harvest all.. I mean ALL from expansions, etc, everything.. all trait modifiers from the base game
  2. search the entire base Stellaris localisation file folder for a case-insensitive match for the modifier in the "sane word order" then search for the "reversed word order" pattern, and if we get a hit on either one, store the result
  3. make one huge mapping table with the sane version as the key and the "insane" stellaris version on the right
  4. release it to the community
openly-retro commented 8 months ago

The solution I came up with is good enough for now.