Unit Gain Gold From Kills?

mjdgoldeneye

Chieftain
Joined
Sep 1, 2007
Messages
18
I want a unique unit I have to gain X gold from kills (for testing, X = 10 for now), similar to what the finisher for the Honor track provides.

I set the following in the unit XML:
Code:
<Unit_YieldFromKills>
  <Row>
    <UnitType>UNIT_AURICAN_RANSACKER</UnitType>
    <YieldType>YIELD_GOLD</YieldType>
    <Yield>10</Yield>
  </Row>
</Unit_YieldFromKills>

The mod works fine, the unit builds fine, and everything else about the unit is correct, but the above doesn't seem to have any effect.

Note that I don't believe any other unit in the game actually uses the Unit_YieldFromKills tag, so it may not have any effect in game. It's definitely defined in the schema, though.

Also, after thinking about it, I'm not sure what Yield From Kills is actually supposed to do. "Yield" usually refers to what terrain tiles output. I can't refer to another unit because none of them have it. Does anyone know what the above is supposed to do?

Finally, if the above is totally wrong, how would I allow my unit to gain gold from killing units? Would I need to mess with Lua scripts?
 
Try:

Code:
<Unit_YieldFromKills>
  <Row>
    <UnitType>UNIT_AURICAN_RANSACKER</UnitType>
    <YieldType>YIELD_GOLD</YieldType>
    <Yield>[B]100[/B]</Yield>
  </Row>
</Unit_YieldFromKills>

It definitely works. The Pictish Warrior uses it for Faith and I've used it in one of my mods for Gold, too.
 
Try:

Code:
<Unit_YieldFromKills>
  <Row>
    <UnitType>UNIT_AURICAN_RANSACKER</UnitType>
    <YieldType>YIELD_GOLD</YieldType>
    <Yield>[B]100[/B]</Yield>
  </Row>
</Unit_YieldFromKills>

It definitely works. The Pictish Warrior uses it for Faith and I've used it in one of my mods for Gold, too.

Yea, I looked in the Units XML for vanilla and BNW, but not G&K, so I missed Pictish Warrior. "Yield" here apparently means "% of enemy's strength in whatever yield you choose" because the Civ V XML tag names are so descriptive and well documented. :lol:

I assume that if I kill a Brute, I'm getting < 1 Gold, so it's not giving me anything.

Thanks for your help.
 
Back
Top Bottom