More than one bonus to build, (xml programmers)

Riker13

King
Joined
Nov 9, 2001
Messages
859
Location
UK
If I wanted to have say IRON and COAL as the bonus type, and then oil as the prereqbonus, how would I do this?



In the unitinfos.xml

<BonusType>IRON</BonusType>
<PrereqBonuses>
<BonusType>BONUS_OIL</BonusType>
<BonusType>NONE</BonusType>
<BonusType>NONE</BonusType>
<BonusType>NONE</BonusType>
</PrereqBonuses>

Regards

Riker13 :crazyeye:
 
Riker13 said:
If I wanted to have say IRON and COAL as the bonus type, and then oil as the prereqbonus, how would I do this?



In the unitinfos.xml

<BonusType>IRON</BonusType>
<PrereqBonuses>
<BonusType>BONUS_OIL</BonusType>
<BonusType>NONE</BonusType>
<BonusType>NONE</BonusType>
<BonusType>NONE</BonusType>
</PrereqBonuses>

Regards

Riker13 :crazyeye:


I don't quite get your question but if your looking to edit the bonuses you should be looking in

Firaxis/Civ4/Assets/Terrain/Civ4BonusInfo
and

Firaxis/Civ4/Assets/Terrain/Civ4BonusClassInfo

Unless I misunderstood your question look here to edit them.
 
Riker13 said:
If I wanted to have say IRON and COAL as the bonus type, and then oil as the prereqbonus, how would I do this?



In the unitinfos.xml

<BonusType>IRON</BonusType>
<PrereqBonuses>
<BonusType>BONUS_OIL</BonusType>
<BonusType>NONE</BonusType>
<BonusType>NONE</BonusType>
<BonusType>NONE</BonusType>
</PrereqBonuses>

Regards

Riker13 :crazyeye:


I am pretty sure that would require an SDK and XML scheama change. The former would allow the AND attribute to bonuses, as vanilla let you do this with one only and the latter would essentially allow for reading multiple resources from the unitinfo.xml.
 
OCEDIUS, ah thought that might be the case, oh well I suppose I must learn how to program in C++ :sad:

Many Thanks

Riker13 :crazyeye:
 
Riker13,

I already do this in my composite mod... since this has now been asked for multiple times I will extract the code for it from the composite mod and release it as a component, ok?
 
Back
Top Bottom