Deleting entries

Slowpoke

The Mad Modder
Joined
Sep 30, 2010
Messages
1,321
I'm really having trouble with this :/ Kael's quide shows an example of deleting an object, but I can't seem to delete other parts of a row. E.g. This isn't working:

<GameData>
<Unit_ResourceQuantityRequirements>
<Update>
<Delete ResourceType="RESOURCE_IRON"/>
<Where UnitType ="UNIT_CATAPULT"/>
</Update>
</Unit_ResourceQuantityRequirements>
</GameData>

for:

- <Row>
<UnitType>UNIT_CATAPULT</UnitType>
<ResourceType>RESOURCE_IRON</ResourceType>
</Row>

I've tried SQL and I can't seem to do anything that works. What do I need to change?

Edit: Please someone help, I plan on doing several deletions like this. If everything is in fact fine here, can someone confirm it?
 
I dont think you can mix deletes and updates. In fact, if I get it correctly, you'd need to simply remove the Catapulr entry in the proper field.

Code:
<Unit_ResourceQuantityRequirements>
            <Delete UnitType="UNIT_CATAPULT"/>
</Unit_ResourceQuantityRequirements>

This should do the trick by simply removing the Catapult resource requirement
 
AH THANK YOU! That worked :) Deletions were confusing me, I thought if you deleted the UNIT_CATAPULT it was completely deleting the entire unit. Thanks!
 
If you would write:

Code:
<Unit>
    <Delete UnitType="UNIT_CATAPULT"/>
</Unit>

It would indeed delete the whole unit. Deletion is relative to the entry, so with 1st code I gave you, you'd only delete catapult in <Unit_ResourceQuantityRequirements>, while with this last code, if you delete Catapult in <Unit> section, well the thing is gone;)
 
What about deleting city name? I try to remove New York from the american city list with this code:

<Civilization_CityNames>
<Delete CityName="TXT_KEY_CITY_NAME_NEW_YORK"/>
</Civilization_CityNames>


but it doesn't work, anyone have an idea?
 
If that ain't working, my suggestion would be to delete America*, copy paste their city name list, and just remove New York. Do you understand?

* Only from the city name list! Don't delete the civilization!
 
Ok I found the problem, some stupid name changing that I did mess up everything.

Thanks anyway for the idea.
 
Back
Top Bottom