Yield From Combat Mod (BTS 3.19)

stolenrays

Deity
Joined
Aug 2, 2009
Messages
2,061
Yield From Combat Mod v1.3

When an enemy unit is defeated, a specified amount of :food:, :espionage:, :gold:, :science:, :hammers:, or :culture: is deposited in your nearest city. One commerce is chosen at random from the different commerces a particular unit can give.

  1. :food: deposited to a nearby city if an animal is defeated.
  2. :hammers: are deposited if a unit is defeated.
  3. Gives the killer's owner an amount of :gold:.
  4. Gives the killer's owner :science: towards one of the prerequisite techs of the killed unit.Example: If your forces kill a Tank, but you can't currently build Tanks, you'll get :science: towards either Industrialism or Rifling.
  5. Deposits an amount of :culture: in your nearest city.
  6. Gives the killer's owner an amount of :espionage: units against the killed unit's owner.

The modification was only to a 7 C++ files. The Mod includes the Changed C++ files plus a working mod. Enjoy.

-----Game Play-----
-:food:, :espionage:, :gold:, :science:, :hammers:, or :culture: Yields are given to cities after an enemy unit (including air units) is killed.
-An alert message & landmark notification appear if a Yield is gained.

-----Note to Modmakers-----
-In the SDK files I have added Yield From Combat Mod START and Yield From Combat Mod END in all of the places that changes to the original files were made.
-Certain Leader Traits modify the Yield gained after combat.
-New XML tags:
CIV4UnitInfos.xml
Spoiler :
<YieldsFromKill>
<CommercesFromKill>

CIV4TraitInfos.xml
Spoiler :
<BaseYieldFromUnits> - gives at least this much yield from ALL killed units.
<YieldFromUnitModifiers> - modifies how much yield you get from a particular
unit based on the unit's default yields from kill.
<BaseCommerceFromUnits> - gives at least this much commerce from ALL killed
units.
<CommerceFromUnitModifiers> - modifies how much commerce you get from a
particular unit based on the unit's default commerces from kill.


--Future Plans----
-Add yield given in civiliopedia for units

-----Version History-----
Spoiler :

Version 1.3
-Added Missing TraitInfos.xml file
-Added Concept Text
-Added Readme & Changelog Texts

Version 1.2
-Add a Checkbox
-Debug
-Merge Test of Time Changes
-Commerce/Yield Change for Traits Gametext fixed
-Base Commerce/Yield for Traits Gametext fixed

Version 1.1
-Updated to BTS 3.19

Version 1.0
Original Dom Pedro II Mod
Original Food From Animals Download


Download
 

Attachments

  • YieldFromCombat.jpg
    YieldFromCombat.jpg
    161.8 KB · Views: 407
I'm having trouble with this mod. What is the intended ratio of kills to yields? Are all defeated units intended to yield something, or is it a rare event? I have started several games while running this mod and I have never witnessed a gain of food, hammers, or coins. Do barbarian animals count? I have so far only killed barbarian animals, so if they are excluded that would explain my problem.
 
I deleted the folder, unzipped it again from the source file, and ran it again. It seems to be working now. I even merged it with your multiple research mod! Thanks!
 
I've successfully merged the additions from Test of Time.

However, The text that displays with trait information is a bit messed up. I'm hoping someone may offer to help out. I am decent at programming, but don't know all the syntax for displaying text in C++ yet.

Let me know if you are interested.
 
Nope, its for this one. The option to turn Yield from Combat on and off is placed in the Options menu in civ. So its togglable in midgame. Imho something like this should be Start Game option, not Mid Game switchable ;)

Thanks for clarifying. I'm not sure that I have the option on my menu anywhere, will check again later and confirm.
 
Top Bottom