Goddamn wonky
Delete function. Doesn't seem to work even remotely right if used like Kael suggests in his Modder's Guide. I was trying to remove the now-unused UNIT_BARBARIAN_(unit) types, and I had restricted the deletion to the <Units> table, so I believe that was causing the crash (I think the references in other tables, like Unit_AITypes and the like, weren't pleased).
That's fixed, but now I can't remove the default Brute (my Brute is slightly modded, using a different type name, and is obsoleted by Civil Service). There's two Brute entries on the Civilopedia, and it's cramping things, at least aesthetically.
The code on this file didn't work:
Code:
<GameData>
<!--<Units>
<Update>
<Where Type="UNIT_BARBARIAN_WARRIOR"/>
<Set Cost="-1"/>
</Update>
<Update>
<Where Type="UNIT_BARBARIAN_WARRIOR"/>
<Set>
<ShowInPedia>false</ShowInPedia>
</Set>
</Update>
<Update>
<Where Type="UNIT_BARBARIAN_ARCHER"/>
<Set Cost="-1"/>
</Update>
<Update>
<Where Type="UNIT_BARBARIAN_SPEARMAN"/>
<Set Cost="-1"/>
</Update>
<Update>
<Where Type="UNIT_BARBARIAN_SWORDSMAN"/>
<Set Cost="-1"/>
</Update>
</Units>-->
<Delete Type="UNIT_BARBARIAN_WARRIOR"/>
<Delete Type="UNIT_BARBARIAN_ARCHER"/>
<Delete Type="UNIT_BARBARIAN_SPEARMAN"/>
<Delete Type="UNIT_BARBARIAN_SWORDSMAN"/>
</GameData>
The first section is commented out because I was switching between variations of the
Update function and variations of the cursed
Delete one. Maybe I have to use that last one in every table UNIT_BARBARIAN_XXXX appears, focusing neither on <Units> alone nor being vague and not specifying any table, like I last tried.
I'll upload version 2 once I manage to sort this out. Comments and thoughts appreciated, as always.