Problem changing siege weapons

Slowpoke

The Mad Modder
Joined
Sep 30, 2010
Messages
1,321
Probably a simple problem but I can't see what I'm doing wrong here. Basically I'm changing the "must_set_up" promotion, which only siege weapons have, to add +1 range and +50% city attack. I've tried this in xml:

<GameData>
<UnitPromotions>
<Row>
<Type>PROMOTION_MUST_SET_UP</Type>
<RangeChange>1</RangeChange>
<CityAttack>50</CityAttack>
</Row>
</UnitPromotions>
</GameData>

That didn't work so I tried this in sql:

UPDATE UnitPromotions SET 'RangeChange' = 1 WHERE Type IN ("MUST_SET_UP");
UPDATE UnitPromotions SET 'CityAttack' = 50 WHERE Type IN ("MUST_SET_UP");

Which didn't work either :(
 
You should use <Update> <Where> and <Set> tags for modifying existing stuff. In your case:

Code:
<GameData>
    <UnitPromotions>
          <Update>
              <Where Type="PROMOTION_MUST_SET_UP">
              <Set RangeChange="1">
          </Update>

          <Update>
              <Where Type="PROMOTION_MUST_SET_UP">
              <Set CityAttack="50">
          </Update>
    </UnitPromotions>
</GameData>
 
Code:
<GameData>
    <UnitPromotions>
          <Update>
              <Where Type="PROMOTION_MUST_SET_UP"/>
              <Set RangeChange="1" CityAttack="50"/>
          </Update>          
    </UnitPromotions>
</GameData>

the word is you can do this as well, but i haven't tried yet to know for sure.

edit, fixed some missing /'s
 
Back
Top Bottom