Welcome Guest [Log In] [Register]
Welcome to Zoo Tycoon 2 Designing Centre (ZTDC). We hope you enjoy your visit.


You're currently viewing our forum as a guest. This means you are limited to certain areas of the board and there are some features you can't use. If you join our community, you'll be able to access member-only sections, and use many member-only features such as customizing your profile, sending personal messages, and voting in polls. Registration is simple, fast, and completely free.


Join our community!


If you're already a member please log in to your account to access all of our features:

Username:   Password:
Add Reply
More Accurate Number Of Babies For Dinosaurs
Topic Started: Nov 26 2007, 09:04 PM (647 Views)
goldenpuon
New Member
Now that EA has been released, has anyone figured out how to make dinosaurs have more than abies at a time? Also, the coding for # of eggs/offspring is similar to the dinosaurs on flamingos from earlier expansions. The flamingo only has 1 egg at a time but I know that they have more than 1 sometimes in the wild. How would I change that?

Dino coding for offspring is something like this:

BFBehSpawn spawnEntity="AnkylosaurusNest_Egg" spawnRelation="child" subjectNode="Floor" fadeInPeriod="1" randomPosOffset="1" spawnInTA="true"/>
<BFBehScript context="behavior" file="scripts/justgavebirth.lua" function="justgavebirth"/>
</behaviors>
</FinishAnkylosaurusNest>
<HatchEgg>
<subjects>
<AnkylosaurusNest_Egg/>
</subjects>
<behaviors>
<BFBehRandomSet minPlays="3" maxPlays="7">
<randomSets>
<SpawnF weight="50"/>
<SpawnM weight="50"/>
</randomSets>
</BFBehRandomSet>
</behaviors>
</HatchEgg>
<HatchEgg>
<subjects>

The flamingo's goes like this,

<LayEgg>
<subjects>
<FlamingoGreater_Adult_F/>
</subjects>
<behaviors>
<BFBehSpawn spawnEntity="FlamingoGreater_Egg" spawnRelation="child" subjectNode="Floor" fadeInPeriod="1" randomPosOffset="1" spawnInTA="true"/>
<BFBehScript context="behavior" file="scripts/justgavebirth.lua" function="justgavebirth"/>
</behaviors>
</LayEgg>
<HatchEgg>
<subjects>
<FlamingoGreater_Egg/>
</subjects>
<behaviors>
<BFBehRandomSet minPlays="1" maxPlays="1">
<randomSets>
<SpawnF weight="50"/>
<SpawnM weight="50"/>
</randomSets>
</BFBehRandomSet>
</behaviors>
</HatchEgg>
<IdleEgg>
<subjects>
<FlamingoGreater_Egg/>

I would usually just change minPlays and maxPlays to change the amount of offspring but that doesn't seem to work here and I don't want to risk messing up the coding.
Offline Profile Quote Post Goto Top
 
kangorilaphant
Member Avatar

Expert
Change the numbers in the line
<BFBehRandomSet minPlays="1" maxPlays="1">

minPlays is the miniumm number of babies

maxPlays is the maximum

You can change it to whatever you want as long as the Maximumm number is higher than the minimum. So if you put it as
<BFBehRandomSet minPlays="1" maxPlays="4">
It would lay anything between 1 and 4 eggs, bui most likely 2 or 3. You could change it to
<BFBehRandomSet minPlays="1" maxPlays="100">
But it would take ages and you don't really want to be stuck with 50-100 baby flamingos, so don't make the number too high.
Kangorilaphant's Forum is no more... Out of the Ashes comes...


Posted Image
^ CLICK ME! ^
Offline Profile Quote Post Goto Top
 
goldenpuon
New Member
Thanks for your help. Sadly though, changing minPlays and maxPlays has never really worked for me with the flamingos. That's why I included the extra bit of coding which, strangely, in the flamingo has min/maxPlays after BFBehSpawn spawnEntity (I made it bold below.) I've seen that most animals (except some of the egg-layers) when coding for more babies do not have BFBehSpawn spawnEntity or the extra bit of coding that follows before the typical min/maxpLays. That is my main problem. How do I make an animal have more offspring with the BFBehSpawn spawnEntity before the min/maxPlays? Sorry for the confusion.
LayEgg>
<subjects>
<FlamingoGreater_Adult_F/>
</subjects>
<behaviors>
<BFBehSpawn spawnEntity="FlamingoGreater_Egg" spawnRelation="child" subjectNode="Floor" fadeInPeriod="1" randomPosOffset="1" spawnInTA="true"/>
<BFBehScript context="behavior" file="scripts/justgavebirth.lua" function="justgavebirth"/>

</behaviors>
</LayEgg>
<HatchEgg>
<subjects>
<FlamingoGreater_Egg/>
</subjects>
<behaviors>
<BFBehRandomSet minPlays="1" maxPlays="1">
<randomSets>
<SpawnF weight="50"/>
<SpawnM weight="50"/>
</randomSets>
</BFBehRandomSet>
Offline Profile Quote Post Goto Top
 
kangorilaphant
Member Avatar

Expert
That has nothing to do with the number of eggs a flamingo will lay. You cant change it so a flamingo will lay more eggs.

Your problem is most likely that the edited file is being overwritten. If you edited the file in the main ai folder, it will overwritten by blue fangs updated files in x_100_000 and smilar folders.

you need to save the edited file in a new z2f file this folder structure:

ai\Tasks\animals

You need to name the z2f something like zz_flamingoeggs so it will overwrite all the files found in other folders, alternatively you could edit the flamingo files found in x200_100.z2f\AI\Tasks\animals

I also recommend you put the minpays to 2 so you can test if it has worked, after all it may of worked last time but simply only layed 1 egg because that was the minpays amount.
Kangorilaphant's Forum is no more... Out of the Ashes comes...


Posted Image
^ CLICK ME! ^
Offline Profile Quote Post Goto Top
 
goldenpuon
New Member
Thank you. I'll be sure to try it that way! I'll let you know if it works!

Edit: Unfortunately, it did not work. :( I double checked the folders and stuff to make sure I renamed everything correctly. The flamingo laid one egg. Any suggestions?
Offline Profile Quote Post Goto Top
 
« Previous Topic · Animal Coding Help · Next Topic »
Add Reply