How do I disable a unit or building

gwillewyn

Chieftain
Joined
Dec 16, 2016
Messages
7
I want to disable spies and espionage completely. I've looked for a mod, but can't find any.
I imagine the easiest way is to just disable the spy unit, but I can't figure out how. Using XML I should be able to change the properties, right? I thought of setting the price to 100 million or something like that, but I couldn't get that to work either.
Do I need to use SQL?

Any suggestions on where to start?
 
Last edited:
Try:

Code:
DELETE FROM Units
WHERE UnitType = 'UNIT_SPY';

Don't know if that'll cause any issues. Can see how it might with things that call the spy, though.
 
I found these bits of code in some of the DLCs:
Code:
    <!-- Delete base game data that is irrelevant to the scenario.-->
    <Types>
        <!-- Policies-->
        <Delete Type="POLICY_NUCLEAR_ESPIONAGE"/>
        <!-- Unit Operations -->
        <Delete Type="UNITOPERATION_SPY_COUNTERSPY"/>
        <Delete Type="UNITOPERATION_SPY_DISRUPT_ROCKETRY"/>
        <Delete Type="UNITOPERATION_SPY_GAIN_SOURCES"/>
        <Delete Type="UNITOPERATION_SPY_GREAT_WORK_HEIST"/>
        <Delete Type="UNITOPERATION_SPY_LISTENING_POST"/>
        <Delete Type="UNITOPERATION_SPY_RECRUIT_PARTISANS"/>
        <Delete Type="UNITOPERATION_SPY_SABOTAGE_PRODUCTION"/>
        <Delete Type="UNITOPERATION_SPY_SIPHON_FUNDS"/>
        <Delete Type="UNITOPERATION_SPY_STEAL_TECH_BOOST"/>
        <Delete Type="UNITOPERATION_SPY_TRAVEL_NEW_CITY"/>
        <!-- Units -->
        <Delete Type="UNIT_SPY"/>
    </Types>

But they don't work on their own. How do I get them to override the game files?
 
Back
Top Bottom