Hotfixing bugs while waiting for 1.38
Posted: Fri May 07, 2021 3:13 pm
A player on the Steam forum asked me if it was possible to fix the bugs on his side. The answer is usually yes for bugs that ask only for a surgical edit in the gameplay code.
First thing, first, the gameplay, UI, AI code is all set in text files named BSF files. They are in Data\scripts or Data\UI for the most part. I strongly advise using Notepad++ for its extended search functions and additional functionalities.
I believe these modifications are sufficient to fix 2 bugs namely:
Conversion issue
in region.bsf, function Region_Population_PickOne
if (socialClassID >= 1000 && temp != Population_GetSocialClass(popID))
instead of
if (socialClassID > 1000 && temp != Population_GetSocialClass(popID))
No legacy modifier applied
in faction.bsf, function Faction_Politic_LegacyModChange
Add in a new line
modifier = Faction_GetAllModifiersLevel(factionID, MOD_EFFECT_LEGACY_BONUS, MOD_EFFECT_LEGACY_PENALTY);
Just after the declaration " int modifier;"
First thing, first, the gameplay, UI, AI code is all set in text files named BSF files. They are in Data\scripts or Data\UI for the most part. I strongly advise using Notepad++ for its extended search functions and additional functionalities.
I believe these modifications are sufficient to fix 2 bugs namely:
Conversion issue
in region.bsf, function Region_Population_PickOne
if (socialClassID >= 1000 && temp != Population_GetSocialClass(popID))
instead of
if (socialClassID > 1000 && temp != Population_GetSocialClass(popID))
No legacy modifier applied
in faction.bsf, function Faction_Politic_LegacyModChange
Add in a new line
modifier = Faction_GetAllModifiersLevel(factionID, MOD_EFFECT_LEGACY_BONUS, MOD_EFFECT_LEGACY_PENALTY);
Just after the declaration " int modifier;"