1. We have added a Gift Upgrades feature that allows you to gift an account upgrade to another member, just in time for the holiday season. You can see the gift option when going to the Account Upgrades screen, or on any user profile screen.
    Dismiss Notice

Eusebius Live Animals

Discussion in 'Civ4 - Mod Components' started by Eusebius, Sep 24, 2006.

  1. Eusebius

    Eusebius Chieftain

    Joined:
    Feb 11, 2006
    Messages:
    242
    Location:
    Hopewell, NJ, USA
    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
     
  2. strategyonly

    strategyonly C2C Supreme Commander

    Joined:
    Mar 13, 2006
    Messages:
    20,445
    Gender:
    Male
    Location:
    MN
    But what if you only want the "captured" animals to enter your territory, not the barbarian ones?
     
  3. Eusebius

    Eusebius Chieftain

    Joined:
    Feb 11, 2006
    Messages:
    242
    Location:
    Hopewell, NJ, USA
    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
     
  4. Dom Pedro II

    Dom Pedro II Modder For Life

    Joined:
    Apr 3, 2002
    Messages:
    6,811
    Location:
    Exit 16, New Jersey
    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.
     
  5. strategyonly

    strategyonly C2C Supreme Commander

    Joined:
    Mar 13, 2006
    Messages:
    20,445
    Gender:
    Male
    Location:
    MN
    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??
     
  6. Dom Pedro II

    Dom Pedro II Modder For Life

    Joined:
    Apr 3, 2002
    Messages:
    6,811
    Location:
    Exit 16, New Jersey
    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?
     
  7. strategyonly

    strategyonly C2C Supreme Commander

    Joined:
    Mar 13, 2006
    Messages:
    20,445
    Gender:
    Male
    Location:
    MN
    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:
     
  8. GoodGame

    GoodGame Red, White, & Blue, baby!

    Joined:
    Dec 17, 2004
    Messages:
    13,725
    Anyone updating this for BTS 3.13?
     
  9. PotatoSamurai

    PotatoSamurai ChooseReligion enthusiast

    Joined:
    Aug 27, 2007
    Messages:
    168
    Location:
    Acworth, GA

    Second.
     
  10. Eusebius

    Eusebius Chieftain

    Joined:
    Feb 11, 2006
    Messages:
    242
    Location:
    Hopewell, NJ, USA
    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
     

Share This Page