[GS] [SOLVED] How to get the unique builder to be able to build industry (with monopoly) without breaking the mod when monopoly mode isn't on?

vibach

Chieftain
Joined
May 18, 2023
Messages
6
So I had the code below to get it to be able to build improvements that a normal builder can
SQL:
INSERT INTO Improvement_ValidBuildUnits
        (ImprovementType,    UnitType)
SELECT    ImprovementType,    'UNIT_BC_WORKER'
FROM    Improvement_ValidBuildUnits
WHERE    UnitType = 'UNIT_BUILDER';
Now it provided me pretty much every single improvements that a normal builder can build (with all of the normal restrictions as well), however when I started playing monopoly mode, Industry cannot be built by this unique unit, now I manually adds it in separately, but this method break the mod when I am not playing monopoly mode (since industry doesn't exist as an improvement there). Any suggestions?
 
XML:
    <Criteria id="GameMode_Monopolies">
      <ConfigurationValueMatches>
        <ConfigurationId>GAMEMODE_MONOPOLIES</ConfigurationId>
        <Group>Game</Group>
        <Value>1</Value>
      </ConfigurationValueMatches>
    </Criteria>
Copying the format from Byzantine dlc mod info with the help of modbuddy resolved this issue, just add the code below into a separate file that is only updated into the database when the criteria triggers.
SQL:
INSERT INTO Improvement_ValidBuildUnits
        (ImprovementType,            UnitType        )
VALUES    ('IMPROVEMENT_INDUSTRY',    'UNIT_BC_WORKER');
 
Top Bottom