See this:
whoward69's what ModBuddy setting for what file types tutorial
- You haven't given your mod any actions to perform with the XML file, so nothing is going to happen.
- You have a wrong type of designation here:
Code:
<GameData>
<Units>
<Update>
<Where Unit="UNIT_CROSSBOWMAN"/>
<Set ObsoleteTech="TECH_DYNAMITE"/>
</Update>
</Units>
<Unit_ClassUpgrades>
[COLOR="Red"] <Update>
<Where UnitType="UNIT_GATLINGGUN"/>
<Set UnitType="UNIT_ARTILLERY"/>
</Update>[/COLOR]
</Unit_ClassUpgrades>
</GameData
The way the
<Unit_ClassUpgrades> table works is that for each
<Row> within it, you specify a unit that will be upgraded at some point in the game via the
<UnitType>column, and the CLASS of unit it will upgrade to via the
<UnitClassType> column. So if I want to alter the Crossbowmen to Artillery instead of Gatling Guns, I need:
Code:
<Unit_ClassUpgrades>
<Update>
<Where UnitType="UNIT_CROSSBOWMAN"/>
<Set UnitClassType="UNITCLASS_ARTILLERY"/>
</Update>
</Unit_ClassUpgrades>
Remember also that to keep everything balanced you would also need to have an update specifying
UNIT_CHINESE_CHUKONU and
UNIT_ENGLISH_LONGBOWMAN in the
<Where UnitType="UNIT_X"/>. Also, these three units have a
<GoodyHutUpgradeUnitClass>UNITCLASS_GATLINGGUN</GoodyHutUpgradeUnitClass> column stated for them within the
<Units> table, so you would need to decide if you wanted to alter that as well. And you would need to make an
<Update> under
<Units> to include the change for
<ObsoleteTech> for the
UNIT_CHINESE_CHUKONU and
UNIT_ENGLISH_LONGBOWMAN. If I wanted to do all of this, I would actuyally do it like this:
Code:
<GameData>
<Units>
[COLOR="Green"] <Update>
<Where Class="UNITCLASS_CROSSBOWMAN"/>
<Set ObsoleteTech="TECH_DYNAMITE" GoodyHutUpgradeUnitClass="UNITCLASS_ARTILLERY" />
</Update>[/COLOR]
</Units>
<Unit_ClassUpgrades>
[COLOR="Red"][B] <Update>
<Where UnitClassType="UNITCLASS_GATLINGGUN"/>
<Set UnitClassType="UNITCLASS_ARTILLERY"/>
</Update>[/B][/COLOR]
</Unit_ClassUpgrades>
</GameData>
- The Dark Green lines for the <Units> update tells the game that everywhere within the <Units> table that it sees a unit belonging to the Crossbowman Class of units, change the info for that unit to ObsoleteTech="TECH_DYNAMITE" and GoodyHutUpgradeUnitClass="UNITCLASS_ARTILLERY".
- The Bolded Red lines for the <Unit_ClassUpgrades> update tells the game that everywhere within the <Unit_ClassUpgrades> table that it sees a <Row> that will upgrade a unit to the UNITCLASS_GATLINGGUN Class of units, change the info for that unit to UNITCLASS_ARTILLERY.