[SDK MODCOMP] Food From Animals

Dom Pedro II

Modder For Life
Joined
Apr 3, 2002
Messages
6,811
Location
Exit 16, New Jersey
Food From Animals

File: [BTS] Food From Animals (1.99 MB)

What it does:

The title is a little misleading. This can actually applied to any unit and refers to any yield (the Yield called Commerce doesn't count) but you can make it so that when you kill a unit, it will deposit the specified amount of food or production in your nearest city.

NEW!
This mod now includes Commerces! One commerce is chosen at random from the different commerces a particular unit can give.

Gold
Gives the killer's owner an amount of gold.

Research
Gives the killer's owner research 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 research towards either Industrialism or Rifling.

Culture
Deposits an amount of culture in your nearest city.

Espionage
Gives the killer's owner an amount of espionage units against the killed unit's owner.

NEW!

Works for shot down air units now!

New XML tags:

CIV4UnitInfos.xml

<YieldsFromKill>
<CommercesFromKill>

CIV4TraitInfos.xml

<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.
 
Heh.... I can see a cannibalism mod coming out of this! :lol:

You laugh, but I'm planning on making a leader trait feature that gives X Yield regardless of what the unit is supposed to give for food just specifically to have a civ of carnivorous animals that eat their enemies, and another civ of monkies who get 1 Hammer from all kills... the trait for them will be called Scavenger :)
 
I like it. I will use it, I think
Thanks

P.S. I not understand only file structure: Food From Animals/Food From Animals/Assets...
I´m not programmer. How I can paste it to the my mod, please?
 
I like it. I will use it, I think
Thanks

P.S. I not understand only file structure: Food From Animals/Food From Animals/Assets...
I´m not programmer. How I can paste it to the my mod, please?

Sorry about that... you have to do it like this: MODS/Food From Animals/Assets.

There's too many file folders in my zip.

As for "pasting" it into your mod... if the mod uses other SDK mods, then you'll need to copy and paste the new code in my mod into the source files of the DLL file you're already using. If you're not using another CvGameCoreDLL file, then you can just use the one included with this mod.
 
Yes, thanks. If I good understand, if I will be use 2 SDK mods, I must request somebody for combination of two libraries?
 
Very good idea, i think that i will developp a similar system for my mod. And it must be simple to do. Thx a lot ;-)
 
This is a really cool idea. Great job!
 
Very good idea, i think that i will developp a similar system for my mod. And it must be simple to do. Thx a lot ;-)

Well, feel free to build on what I've already done... I'm not opposed to modded mods :)

Mylon said:
This is a pretty interesting idea, actually. I can see getting hammers for kills made in your own territory from scavenging parts and such. This would be a small reprieve for a civ that is under attack.

This is also a very interesting idea. It would be fairly simple to limit it to giving hammers if the victorious unit is in its own territory.
 
Or automatically give hammers to the nearest city of the same country as where the battle took place.

Except that would give hammers to the enemy cities even when their units are the ones that lose.
 
Except that would give hammers to the enemy cities even when their units are the ones that lose.

They get a few hammers, but you're taking their city anyway, so what does it matter?

That is, if you can afford to be on their turf fighting them, then you can afford to give them a couple hammers when one your units dies.
 
I'm also planning to add a very similar feature when pillaging tiles... so in addition to gold, you'll also get the food and hammer value of the pillaged improvement sent back to your city (unless it's commerce since that's not accumulated like food and production).
 
Hi,

Your mod is great. Exactly what i was looking for. :woohoo:

I am definitely gonna use your mod as a basis for my own mod. :goodjob:

Unfortunately i get some bugs, merging your mod and dale's combat mod. (unit symblos staying grey sometimes, however. I just merged the sources and compiled, just like a big SDK-newbie)
I think it's because Dale's-Mod is written for Version 3.02.
But it's no real issue right now. My mod wont be ready before the final patch anyway.



Cant wait to see the next Version of your mod. :)
 
Indeed, would be nice to see this, too.

There are XML-values for Food, Hammers and Gold.

But Gold isn't working for me. :confused:
 
I am currently working on a mod and would like to use this component (with proper credits of course!). Looks very good so far! Congrats! :)
 
Instead of food, could it also be made to get other benefits for killing your enemies, like gold?

It could be made to do this. It currently doesn't have the ability to do that though. There'd be plenty of good reasons to have this though... I mean, you might want to have units that give gold upon killing them for lots of reasons. I'll look into this.

Indeed, would be nice to see this, too.

There are XML-values for Food, Hammers and Gold.

But Gold isn't working for me. :confused:

The last one is for the Yield Type called Commerce. This should not be confused with the Commerce Type called Gold.

I am currently working on a mod and would like to use this component (with proper credits of course!). Looks very good so far! Congrats! :)

Great! I'm always glad to see people make use of the tools I provide :)
 
Back
Top Bottom