View Full Version : Eusebius Live Animals


Eusebius
Sep 24, 2006, 08:44 PM
Eusebius Live Animals

DOWNLOAD LINK:
http://forums.civfanatics.com/downloads.php?do=file&id=2866

Update: April 24, 2007. Updated mod so that it is fully Warlords 2.08 compliant; there were a few things out of date.

What the Mod Does…
It starts to implement an ecology model where animal bonuses (deer, fur, horse, sheep, etc.) walk around, breed and are hunted. One of the things I like is that cities tend to experience a ‘boom’ when they get hunting and then a ‘bust’ when all the animals are gone. This seems rather realistic to me and begins to have the kind of feel I am looking for.

In relase 0.20, there are also bonuses for predators: lion, wolf, panther and bear.

This is a mod component, not a full mod. I have developed it as an experiment. I make no claims about game balance. In fact I am hoping to hear from people who play around with it! Please post your experiences.

This component will form a major part of an upcoming pre-history mod I am working on which will integrate pre-history into ordinary Civ IV Warlords games.

Thanks for your feedback,
Eusebius
October 31, 2006


At the Start of Every Game Turn…
1. There is a chance that all unworked animal plots will spawn an animal unit. The frequency of this is roughly based on the animal’s life span. The animal will usually be a barbarian, but if the plot is owned by a player who has Animal Husbandry, the animal unit will be owned by that player. Predator units will only be spawned if there is no predator in a one square radius.
2. If a plot is being worked and the player has Hunting, there is a chance that the animal will be hunted, which means that the animal bonus is destroyed and food (and sometimes gold) are added to the nearest city. There are several conditions why this may happen…
 The city is starving and has no food reserve.
 The player does not yet have Animal Husbandry.
 The animal cannot be domesticated (deer, fur-bearing animals) and the player does not yet have Monarchy. (With Monarchy it is possible to have royal preserves where animals are not over-hunted by growing cities.)

AI Controlled animal units will…
1. Deer units will pillage farms. This intended to represent animals, birds and insects destroying crops.
2. Settle down on the first suitable terrain they wander into. (Plot receives bonus; unit is removed.)
3. When a predator (lion, wolf, etc.) wanders into a plot, it will destroy the animal bonus of prey animals.
4. If a predator unit (or an AI controlled military unit) is adjacent to a prey, it will enter that square and kill the prey.
5. If a predator unit (or an AI controlled military unit) is adjacent to a plot with a prey animal bonus, it will enter that plot.

Other Changes…
1. Elephant/Ivory now uses pasture rather than camp. The rationale is that all domesticatable animals now use pasture and all wild animals use camp.
2. Camps are now enabled with Animal Husbandry, but they are only rarely useful until Monarchy because the city will probably just hunt your animal bonus to death. However, you might want a camp to reach a bonus outside of your city radius.
3. Horses are now visible at the beginning of the game. (No more pretending not to see those big four-legged animals walking around.)
4. With Animal Husbandry, cities that have access to animal resources can build animal units of those types. (This represents importing a new species by trade.) Human players can direct those animal units to any plot and press a button causing them to settle there. The animal will essentially “build” its own pasture as well.
5. If you have Animal Husbandry and defeat a domesticatable animal, the animal becomes one of your units. (The animal changes allegiance.)
6. Barbarian (non-animal) units will destroy the animal bonus of a plot if they are strong enough.
7. When pastures or camps are pillaged, the animal bonus is destroyed too.
8. Scouts and Explorers can now attack, but not capture cities. Great suggestion from GeoModder: “It is annoying that the scout cannot enter plots occupied with "barbarian" animal units. I recommend giving that unit an attacking role in this mod component.”


CREDITS
I wanted to be sure to give my thanks for the Unit Allegiance Mod v0.4 By Snaitf and Supported By The Lopez.

Eusebius
Sep 24, 2006, 08:48 PM
Oh, I have two questions for graphics-savvy types.

1.) The new animal unites (sheep, horse, etc.) show up as shadows in Civopedia. Any way to fix that?

2.) Is there any way to get the unit pictures to "walk around" the way the bonus tiles do?

Thanks,
Eusebius

Ket
Sep 24, 2006, 08:58 PM
Absolutely Fascinating....

Jeckel
Sep 24, 2006, 09:27 PM
Yes, this is quite interesting, i will definetly look through it. :)

TheLopez
Sep 24, 2006, 10:09 PM
Very interesting, how about some screenshots?

tlucky4life
Sep 24, 2006, 10:30 PM
Very Interesting, has the opputunity to open the game up.

Roamty
Sep 25, 2006, 03:22 AM
Question is this needed if you have these as Units CIV4FormationInfos


<UnitType>UNIT_LION</UnitType>
<UnitType>UNIT_BEAR</UnitType>
<UnitType>UNIT_WOLF</UnitType>
<UnitType>UNIT_PANTHER</UnitType>
<UnitType>UNIT_SHEEP</UnitType>
<UnitType>UNIT_PIG</UnitType>
<UnitType>UNIT_HORSE</UnitType>
<UnitType>UNIT_IVORY</UnitType>
<UnitType>UNIT_COW</UnitType>
<UnitType>UNIT_DEER</UnitType>
<UnitType>UNIT_FUR</UnitType>

woodelf
Sep 25, 2006, 05:22 AM
This sounds really cool. I can't wait to see how it plays out and then see it get implemented into other mods.

Zuul
Sep 25, 2006, 08:06 AM
I wanted this for a long time :).

Also wanted different sizes of animal herds, that can spawn new units, and form camps (cave lions and such). Also wild animals to be frightened off by hostile units.

Naokaukodem
Sep 29, 2006, 06:15 AM
Too bad it's not for Civ4 vanilla.

GeoModder
Oct 01, 2006, 03:26 AM
Tested it a bit.
The excess gold bug appeared the moment animal-resources within my citycross were "hunted". This same bug also seems to decrease the labslider down by 10% every turn.
Except for a wolf, I haven't seen a single wild animal on a whole continent. Sheep and deer were spawned at a tremendous rate in a remote corner of the continent. My guess is that the spawning points of those hunted animals block the appearance of the normal hunting animals.
It is annoying that the scout cannot enter plots occupied with "barbarian" animal units. I recommend giving that unit an attacking role in this mod component.
I also recommend that scouts/hunters/warriors who "overwhelm" an animal unit let it change allegiance, so the animal unit could be brought back to a citycross and put to use.
A check should be implemented that spawned animal units do not "settle" on the first good spot for them. Instead, the check could look around if not a another animal resource is within 3-4 plots or so and forbid to settle if this is the case. This will spread those animals out more nicely, and it simulates that limited food resources for wildlife prohibits an excess of them.

O yes, for this prehistoric mod you're talking about: do you plan to make it an era before the ancient era begins, with a starting date 10000bc or something? And have you thought of using the barbarian hut graphics for those first "cities"? Would look more in line I think.

Prestidigitator
Oct 01, 2006, 08:52 AM
Wow! this all sounds too good to be true :thumbsup:, I've always yearned for such a thing in Civ3, Good job Eusebius :goodjob:!

Eusebius
Oct 02, 2006, 05:34 PM
GeoModder, just wanted to thank you for that thoughtful feedback. I will be taking most of your suggestions.

Eusebius

GeoModder
Oct 04, 2006, 07:49 AM
np, glad to be of help. :)

gordonthewhale
Nov 02, 2006, 10:47 AM
I haven't tested the new release yet, but in the previous version, the animals were still not allowed to enter a player's territory. This makes the "deer-eat-farms" element somewhat beside the point.

gordonthewhale
Nov 04, 2006, 12:39 PM
Interesting gameplay issue: overwriting invisible bonuses. If you have (for instance) a sheep unit, and you're going to settle it down and make a new resource, you may inadvertently settle it on top of a Uranium or Oil, and be really sad not to have it later in the game. On the other hand, if the game won't let you settle the animal down because of the uranium, then you've gotten a clue to the location of an undiscovered bonus.

I've finished an initial version of my agriculture mod, which lets workers produce domestic plants & animals, but I haven't solved this problem to my satisfaction.

Another gameplay issue is that any civilization with access to these resources can aquire an essentially infinite number of them to trade to other civilizations, and the AI especially may not understand how to deal with this. Resource trades are generally made on an extended per-turn basis, but if the resource can be duplicated, it makes more sense to trade it for cash or techs up front, since the deal will rapidly become useless as the receiving nation creates a domestic supply.

It might be a partial solution to create a new improvement for each animal (I've done this already in my mod) which is created when you settle an animal, and which looks like the original improvement, but does not actually have a bonus under it. This would fix the overwriting of other unseen bonuses, and reduce the total number of resources available to trade. However, it would lead to strange situations in which a country which aquired sheep through trade, built many sheep pastures, but then lost the trade deal would be unable to build any more pastures, despite the obvious presence of sheep in the country.

Fierabras
Mar 26, 2007, 04:04 PM
O yes, for this prehistoric mod you're talking about: do you plan to make it an era before the ancient era begins, with a starting date 10000bc or something? And have you thought of using the barbarian hut graphics for those first "cities"? Would look more in line I think.

I just started working on a pre-era mod (6000-4000 BC) called Stone Age (actually late Stone Age, Neolithicum). I am trying to get the tech tree balanced for this prehistoric era, but it is not easy. I have some interesting ideas (animals play a more important role), but I am quite new to extensive modding.

Eusebius, if you would like some help with your mod, send me a PM.

Eusebius
Mar 27, 2007, 08:02 AM
I just started working on a pre-era mod (6000-4000 BC) called Stone Age (actually late Stone Age, Neolithicum). I am trying to get the tech tree balanced for this prehistoric era, but it is not easy. I have some interesting ideas (animals play a more important role), but I am quite new to extensive modding.

Eusebius, if you would like some help with your mod, send me a PM.

My ideas went along the lines of extending a current game back a bit further and then continuing on with the normal civ tech tree. At this point, I am working on a Starcraft mod and don't know if I will ever get back to that idea.

However, I am planning on updating this component for Warlords 2.08 very soon and you would be welcome to utilize it. I rather like the way it plays out.

Eusebius

Eusebius
Apr 24, 2007, 08:23 AM
Update: April 24, 2007. Updated mod so that it is fully Warlords 2.08 compliant; there were a few things out of date.

Eusebius

strategyonly
Apr 26, 2007, 08:28 AM
What portion of this in python is for making the animals come into YOUR territory?

Eusebius
Apr 26, 2007, 11:08 AM
What portion of this in python is for making the animals come into YOUR territory?

It isn't in Python. It is the bAnimals XML flag in the UnitInfos file. If that is set to 1/true, then they won't enter your territory. I set it to 0/false for all animals.

Eusebius

strategyonly
Apr 26, 2007, 11:37 AM
It isn't in Python. It is the bAnimals XML flag in the UnitInfos file. If that is set to 1/true, then they won't enter your territory. I set it to 0/false for all animals.

Eusebius

But what if you only want the "captured" animals to enter your territory, not the barbarian ones?

Eusebius
Apr 27, 2007, 02:47 PM
But what if you only want the "captured" animals to enter your territory, not the barbarian ones?

Short of SDK modding, I don't think that is possible. I wasn't willing to go to that much effort, but if you are then please post how you did it. [Stopped typing for a minute there to take a quick look at the SDK and it wasn't immediately obvious to me how one would go about this. Unfortunately, there doesn't seem to be a 'SetAnimal' function to go with 'IsAnimal' even at the C++ level.]

I suppose you could gimmick something up in Python, but I have personally found unit movement in Python to be pretty complicated.

The only other thing I can think of is to duplicate all the animal unit entries in XML. One set would have bAnimal set to true and would be created as Barbarian units. The other set would have it as false and would be the ones created when captured or produced from your lands. That is probably how I would approach it.

Eusebius

Dom Pedro II
Apr 27, 2007, 02:50 PM
It's actually not a hard change to make in the SDK to either make a "setAnimal" function or to simply alter the check that permits animals into your borders. Basically, it would be that if the unit was an Animal AND a Barbarian, it wouldn't be allowed inside borders.

strategyonly
Apr 27, 2007, 03:17 PM
I had this done with CvUnit:
if (isAnimal())
if (isAnimal() && isBarbarian())

but i cant get a new dll to work correctly?

I tried the complier with no success!
Is there any other way??

Dom Pedro II
Apr 27, 2007, 03:52 PM
Is the problem that you can't get this particular DLL to compile correctly or you can't get even get an unaltered one to compile?

strategyonly
Apr 27, 2007, 05:19 PM
Dont know for sure, but i went thru the tutorial and thought i did it correctly, (about fifteen times) and when i put the dll in the MOD it did nothing to change, still cant get the animals to enter my territory after i capture them?

I had these three done, but i just cant get them to work??:mad:

GoodGame
Nov 23, 2007, 10:44 AM
Anyone updating this for BTS 3.13?

PotatoSamurai
Nov 23, 2007, 02:35 PM
Anyone updating this for BTS 3.13?

http://forums.civfanatics.com/uploads/124958/scruffy.jpg
Second.

Eusebius
Nov 26, 2007, 01:17 PM
Hey folks, thanks for the interest. My job situation is not permitting me to get into BtS modding, but I would be happy to support anyone else who wanted to take this on. Shouldn't be too tough. The bulk of the work was in Python which should transfer fairly well.

Eusebius