Deletion attempt causing error?

Iconian

Chieftain
Joined
May 16, 2021
Messages
73
I'm struggling to understand deletions.

The Database.log file gave me this error:

[423270.625] Database::XMLSerializer (Units/Units1.xml): <Update> element requires a child <Set> element.


After looking around, my guess is that it's because I don't have "Set' included where I'm trying to delete stuff, such as this:


<Update>
<Where UnitType="UNIT_POLISH_WINGED_HUSSAR"/>
<Delete PromotionType="PROMOTION_NO_DEFENSIVE_BONUSES"/>
</Update>



So what would be the right way to remove such a promotion as this?
 
Interesting . . . thank you for that, but in this case I'm only trying to delete one specific instance of this promotion, on the Winged Hussar.

If I put this in:


<Unit_FreePromotions>
<Delete UnitType="UNIT_POLISH_WINGED_HUSSAR" PromotionType="PROMOTION_NO_DEFENSIVE_BONUSES"/>
</Unit_FreePromotions>

Won't that delete all promotions from the Winged Hussar?

I'm feeling really confused about how delete in particular works, and that cheat sheet doesn't really explain it . . .
 
From that cheat sheet
Code:
<!-- You can specify as many conditions as you want -->
            <Delete R="1" G="1"/>
So this Delete command would only delete the one and only row from the table wherein the two conditions are matched
Code:
<Delete UnitType="UNIT_POLISH_WINGED_HUSSAR" PromotionType="PROMOTION_NO_DEFENSIVE_BONUSES"/>
This Delete command would remove every row that has UNIT_POLISH_WINGED_HUSSAR as the UnitType :
Code:
<Delete UnitType="UNIT_POLISH_WINGED_HUSSAR" />
This Delete command would literally empty everything from the table since there is no condition stated for matching what ought to be deleted from the table
Code:
<Delete />
 
Ok, thank you, I think I understand it now. Such modding idiosyncrasies don't make it that easy to do some things. I wonder why Firaxis didn't just build a user-friendly in-game tool to select the settings you want for units and make new units and things?
 
Top Bottom