[BNW] How to disable a unit for my custom Civilization

kawaiicakes

Chieftain
Joined
Nov 2, 2024
Messages
3
Genuinely pleased to see that this forum is still kicking even in this year.

How would I go about disabling a unit for a Civ; specifically the one I'm making right now?


Context:
  • The Republican Guard replaces the Musketman but should not be rendered obsolete until Replaceable Parts is discovered.
  • I want to prevent the players of this Civ from being able to construct the Rifleman.
  • Not sure if this actually makes any difference since the bulk of this work would probably be taking place inside of XML files, but I am not working in Modbuddy. I have resorted to using source control and manually creating/editing XML files in VSCode and will not be downloading copies of the Visual Studio 2010 Isolated Shell Redistributable given how the copies are distributed by admittedly suspicious third-party vendors. I do not have the time to check the binaries of those downloads myself.
 
If you want there's a safe mirror for the Visual Studio 2010 on civfanatics here.

As to disabling a unit for your Civ, it's like when you add a unique unit with the difference that you don't specify any UnitType.

XML:
<Civilization_UnitClassOverrides>
    <Row>
        <CivilizationType>CIVILIZATION_YOURCIV</CivilizationType>
        <UnitClassType>UNITCLASS_RIFLEMAN</UnitClassType>
    </Row>
</Civilization_UnitClassOverrides>
 
If you want there's a safe mirror for the Visual Studio 2010 on civfanatics here.

As to disabling a unit for your Civ, it's like when you add a unique unit with the difference that you don't specify any UnitType.

XML:
<Civilization_UnitClassOverrides>
    <Row>
        <CivilizationType>CIVILIZATION_YOURCIV</CivilizationType>
        <UnitClassType>UNITCLASS_RIFLEMAN</UnitClassType>
    </Row>
</Civilization_UnitClassOverrides>
That worked wonders, thank you!
 
Top Bottom