Machiavelli24
Mod creator
- Joined
- May 9, 2012
- Messages
- 818
There is a consistent issue with COLONIST_ENGINEERS, SPACECRAFT_FUSION_REACTOR & CARGO_WEAPONRY. The UI does not seem to read in the modified text strings and instead uses the base game's description and short description.

In the picture you can see Sqlite showing that the Fusion Reactor text and Weaponry text has been changed. But in game they will have the non-modded text. I put a print statement in the UI and it generated this:
For some reason Engineers, Reactor and Weaponry aren't grabbing the text that matches the database. Mercenaries and Ultrasonic are untouched which is why they are using the base game strings.
Here is the first part of the function from AdvancedSetup.lua. The added debug statement is in blue:
It is very odd that these 3 things are treated differently. SinglePlayer.lua seems to call out these three choices as the default set for first time users, but the Lua doesn't seem to do anything. But it could mean there is some kind of hard coding in the C++. Has anyone dealt with this issue and know how to resolve it?

In the picture you can see Sqlite showing that the Fusion Reactor text and Weaponry text has been changed. But in game they will have the non-modded text. I put a print statement in the UI and it generated this:
Code:
[10487.650] AdvancedSetup: EOE debug repop AdvancedSetup: ID: 0 ShortDes: TXT_KEY_EOE_COLONIST_SCIENCE_SHORT Des: TXT_KEY_EOE_COLONIST_SCIENCE
[10487.650] AdvancedSetup: EOE debug repop AdvancedSetup: ID: 1 ShortDes: TXT_KEY_EOE_COLONIST_FOOD_SHORT Des: TXT_KEY_EOE_COLONIST_FOOD
[10487.650] AdvancedSetup: EOE debug repop AdvancedSetup: ID: 2 ShortDes: TXT_KEY_EOE_COLONIST_ENERGY_SHORT Des: TXT_KEY_EOE_COLONIST_ENERGY
[COLOR="Red"][10487.650] AdvancedSetup: EOE debug repop AdvancedSetup: ID: 3 ShortDes: TXT_KEY_COLONIST_ENGINEERS_SHORT Des: TXT_KEY_COLONIST_ENGINEERS[/COLOR]
[10487.650] AdvancedSetup: EOE debug repop AdvancedSetup: ID: 4 ShortDes: TXT_KEY_EOE_COLONIST_CULTURE_SHORT Des: TXT_KEY_EOE_COLONIST_CULTURE
[10487.650] AdvancedSetup: EOE debug repop AdvancedSetup: ID: 5 ShortDes: TXT_KEY_EOE_COLONIST_CAPITAL_SHORT Des: TXT_KEY_EOE_COLONIST_CAPITAL
[10487.650] AdvancedSetup: EOE debug repop AdvancedSetup: ID: 6 ShortDes: TXT_KEY_COLONIST_MERCENARIES_SHORT Des: TXT_KEY_COLONIST_MERCENARIES
[10487.650] AdvancedSetup: EOE debug repop AdvancedSetup: ID: 0 ShortDes: TXT_KEY_EOE_SPACECRAFT_COAST_SHORT Des: TXT_KEY_EOE_SPACECRAFT_COAST
[10487.650] AdvancedSetup: EOE debug repop AdvancedSetup: ID: 1 ShortDes: TXT_KEY_EOE_SPACECRAFT_THRUSTERS_SHORT Des: TXT_KEY_EOE_SPACECRAFT_THRUSTERS
[10487.650] AdvancedSetup: EOE debug repop AdvancedSetup: ID: 2 ShortDes: TXT_KEY_EOE_SPACECRAFT_GEOTHERMAL_SHORT Des: TXT_KEY_EOE_SPACECRAFT_GEOTHERMAL
[COLOR="Red"][10487.650] AdvancedSetup: EOE debug repop AdvancedSetup: ID: 3 ShortDes: TXT_KEY_SPACECRAFT_FUSION_REACTOR_SHORT Des: TXT_KEY_SPACECRAFT_FUSION_REACTOR[/COLOR]
[10487.650] AdvancedSetup: EOE debug repop AdvancedSetup: ID: 4 ShortDes: TXT_KEY_EOE_SPACECRAFT_ALIEN_SHORT Des: TXT_KEY_EOE_SPACECRAFT_ALIEN
[10487.650] AdvancedSetup: EOE debug repop AdvancedSetup: ID: 5 ShortDes: TXT_KEY_EOE_SPACECRAFT_PETROLEUM_SHORT Des: TXT_KEY_EOE_SPACECRAFT_PETROLEUM
[10487.650] AdvancedSetup: EOE debug repop AdvancedSetup: ID: 6 ShortDes: TXT_KEY_EOE_SPACECRAFT_ARTIFACT_SHORT Des: TXT_KEY_EOE_SPACECRAFT_ARTIFACT
[10487.666] AdvancedSetup: EOE debug repop AdvancedSetup: ID: 0 ShortDes: TXT_KEY_EOE_CARGO_FOOD_SHORT Des: TXT_KEY_EOE_CARGO_FOOD
[10487.666] AdvancedSetup: EOE debug repop AdvancedSetup: ID: 1 ShortDes: TXT_KEY_EOE_CARGO_SCIENCE_SHORT Des: TXT_KEY_EOE_CARGO_SCIENCE
[10487.666] AdvancedSetup: EOE debug repop AdvancedSetup: ID: 2 ShortDes: TXT_KEY_EOE_CARGO_PRODUCTION_SHORT Des: TXT_KEY_EOE_CARGO_PRODUCTION
[COLOR="Red"][10487.666] AdvancedSetup: EOE debug repop AdvancedSetup: ID: 3 ShortDes: TXT_KEY_CARGO_WEAPONRY_SHORT Des: TXT_KEY_CARGO_WEAPONRY[/COLOR]
[10487.666] AdvancedSetup: EOE debug repop AdvancedSetup: ID: 4 ShortDes: TXT_KEY_EOE_CARGO_CAPITAL_SHORT Des: TXT_KEY_EOE_CARGO_CAPITAL
[10487.666] AdvancedSetup: EOE debug repop AdvancedSetup: ID: 5 ShortDes: TXT_KEY_EOE_CARGO_CULTURE_SHORT Des: TXT_KEY_EOE_CARGO_CULTURE
[10487.666] AdvancedSetup: EOE debug repop AdvancedSetup: ID: 6 ShortDes: TXT_KEY_CARGO_ULTRASONIC_EMITTER_SHORT Des: TXT_KEY_CARGO_ULTRASONIC_EMITTER
For some reason Engineers, Reactor and Weaponry aren't grabbing the text that matches the database. Mercenaries and Ultrasonic are untouched which is why they are using the base game strings.
Here is the first part of the function from AdvancedSetup.lua. The added debug statement is in blue:
Code:
["SeededStart"] = {
FullSync = function()
local PullDown = {};
pullDown = Controls.SelectColonists;
pullDown:ClearEntries();
local controlTable = {};
pullDown:BuildEntry( "InstanceOne", controlTable );
controlTable.Button:LocalizeAndSetText( Locale.ConvertTextKey("TXT_KEY_RANDOM") );
controlTable.Button:SetVoid1( -2 );
for colonist in GameInfo.Colonists() do
local available = false;
--debug stuff
[COLOR="Blue"]print("EOE debug repop AdvancedSetup: ID: " .. tostring(colonist.ID) .. " ShortDes: " .. tostring(colonist.ShortDescription) .. " Des: " .. tostring(colonist.Description));[/COLOR]
-- Unlocked through Firaxis Live?
if (colonist.FiraxisLiveUnlockKey ~= nil) then
local value = FiraxisLive.GetKeyValue(colonist.FiraxisLiveUnlockKey);
available = (value ~= 0);
else
available = true;
end
if ( available ) then
local controlTable = {};
pullDown:BuildEntry( "InstanceOne", controlTable );
controlTable.Button:LocalizeAndSetText( colonist.ShortDescription );
controlTable.Button:SetToolTipString( Locale.ConvertTextKey(colonist.Description) );
controlTable.Button:SetVoid1( colonist.ID );
end
end
pullDown:CalculateInternals();
pullDown:RegisterSelectionCallback( function(id)
PreGame.SetLoadoutColonist(LoadoutUtils.GetPlayerID(), id);
PerformPartialSync();
end);
It is very odd that these 3 things are treated differently. SinglePlayer.lua seems to call out these three choices as the default set for first time users, but the Lua doesn't seem to do anything. But it could mean there is some kind of hard coding in the C++. Has anyone dealt with this issue and know how to resolve it?