What's the XML tag for no unit support cost?

Craig_Sutter

Deity
Joined
Aug 13, 2002
Messages
2,773
Location
Calgary, Canada
I want to create a unit that doesn't have maintenance/support costs.

Here are the entries that may be relevant in the unitinfo file...

<bRivalTerritory>0</bRivalTerritory>
<bMilitaryHappiness>1</bMilitaryHappiness>
<bMilitarySupport>1</bMilitarySupport>
<bMilitaryProduction>1</bMilitaryProduction>

I suspect the bMilitarySupport to be the tag I need to change. The problem is, should the entry be 0 or -1? The civpedia doesn't tell me if a unit has no support costs or not, so I don't know if I'm getting the results I want if I change the values.

Or is it another tag?

Sorry for the question, but the Civ4Wiki is down, and so I can't go to my usual source for XML info.
 
I want to create a unit that doesn't have maintenance/support costs.

Here are the entries that may be relevant in the unitinfo file...

<bRivalTerritory>0</bRivalTerritory>
<bMilitaryHappiness>1</bMilitaryHappiness>
<bMilitarySupport>1</bMilitarySupport>
<bMilitaryProduction>1</bMilitaryProduction>

I suspect the bMilitarySupport to be the tag I need to change. The problem is, should the entry be 0 or -1? The civpedia doesn't tell me if a unit has no support costs or not, so I don't know if I'm getting the results I want if I change the values.

Or is it another tag?

Sorry for the question, but the Civ4Wiki is down, and so I can't go to my usual source for XML info.

I was wondering the same thing. What about making the support cost greater than 1 gold per turn? What tag do you go for that?
 
If you notice those tags start with 'b', this means they are a boolean value and their valid values are 0 for False and 1 for True.

I don't think there is a way to make a unit completly free of support cost. If the tag bMilitarySupport if set to 1 then you will have to pay support for the unit all the time. If it is set to 0 you only have to pay support for units that are outside your national borders. :)
 
<iExtraCost>2</iExtraCost>

this will make the unit cost 2 gpt independent of normal support costs. For example, if you have free support for 10 military units, and the only units you have are 11 of the above, the support cost will be: (11-10)*1 + 10*2 = 21 gpt. Note that the "*1" can be changed as well in civics (<iGoldPerUnit>1</iGoldPerUnit>).

How many free units is determined by civics:
<iBaseFreeUnits>25</iBaseFreeUnits>
<iBaseFreeMilitaryUnits>12</iBaseFreeMilitaryUnits>

So having this civic gives 25 free units (any type of unit), but only 12 military units (<bMilitarySupport>1</bMilitarySupport>). Civics are cumulative.


That said, I don't know how to make a specific unit be ignored by the support cost model.
 
<iExtraCost>2</iExtraCost>

this will make the unit cost 2 gpt independent of normal support costs. For example, if you have free support for 10 military units, and the only units you have are 11 of the above, the support cost will be: (11-10)*1 + 10*2 = 21 gpt. Note that the "*1" can be changed as well in civics (<iGoldPerUnit>1</iGoldPerUnit>).

How many free units is determined by civics:
<iBaseFreeUnits>25</iBaseFreeUnits>
<iBaseFreeMilitaryUnits>12</iBaseFreeMilitaryUnits>

So having this civic gives 25 free units (any type of unit), but only 12 military units (<bMilitarySupport>1</bMilitarySupport>). Civics are cumulative.


That said, I don't know how to make a specific unit be ignored by the support cost model.
Shouldn't it be (11-10)*1 + 11*2 = 23 gpt then?
Hm anyway a negative value for extracosts wouldn't work either here:(
 
Is there a way to have differing gold costs for different types of units. In the modern era, a carrier should cost way more than a destroyer.
 
not late at all! i always wondered if that worked... but i never tested it empirically

usted es muy requetesimpatico, chinchin x
 
I've never tried it, but according to the modiki it's not possible to send the extra cost entry to negative and have the unit produce gold instead of costing upkeep.
 
It is proven. All units count for maintenance, so with "<iExtraCost> -1 </ iExtraCost>" Is canceled. As long as they are within their borders.

"<bMilitarySupport> 1 </ bMilitarySupport>" Does not influence maintenance.
 
Last edited:
Back
Top Bottom