Content: Slate Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate Marble
Background: Slate Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate Marble
Pattern: Blank Waves Notes Sharp Wood Rockface Leather Honey Vertical Triangles
Welcome to TerraFirmaCraft Forums

Register now to gain access to all of our features. Once registered and logged in, you will be able to contribute to this site by submitting your own content or replying to existing content. You'll be able to customize your profile, receive reputation points as a reward for submitting content, while also communicating with other members via your own private inbox, plus much more! This message will be removed once you have signed in.

  • Announcements

    • Crysyn

      Only help if you can be helpful

      Hey All, A topic has come up of late in the IRC channel in regards to the general feel of the forums and the community that supports them. Things have progressed further than I would have liked with out this being addressed more publicly because I would much rather have snubbed this out sooner rather than later.. but I have been busy. Here is the general rule I would like people to follow: Wheaton's Law "Don't be a dick." Those of you from the IRC channel know that this is the only rule I ask people in there to follow and we generally have a good and lively time chatting about all manner of things. This is basic rule that just about everyone understands and I am going to expand it to the forums from here moving forward. If you can not help people in a helpful and polite manner then I simply ask you to stop. Now I generally take a back seat to moderating the forums as I like to participate in the suggestions forum fairly heavily at times and would rather do so as a forums user than a moderator. But I am also fairly well known for being the person who constantly puts their foot down and so I am stepping up and doing so on here. If you find yourself unable to respond to a message politely then I ask that you do not respond. This mostly focuses on the increasing level of hostility found within the Suggestion forum as well as the Server forum. I do not care if this is the 30th some odd time you have seen someone make the same suggestion. Or even if the new post on an older topic is one entry above the old one. I expect the members of this forum to respond politely to the user, new or old, and point to the older topic if it applies and even go the extra step to suggest they either add in new information or to summarize the outcome of the previous discussion based upon the new post's entry into it. That is what we are here for, that is why I close most topics instead of deleting them, so that they can be found and referenced down the road. The next topic is the slew of derailment attempts I have seen as of late. If you want to have fun and joke around that is what the off topic forum is for and pretty much anything goes there. I do not expect to read a suggestion thread and have to go through 3 pages of image memes people have shot back and forth. Quite simply this is a waste of my time to read and then have to clean up. Now for the summary. I am going to start taking a more active role, especially in policing the suggestion forum, and handing out warn levels to people whom I see doing this. These will be indiscriminate and applied not to just the first person who derails or is impolite on a topic or response, but to everyone whom follows the lead of that person. As I do not like doing things with out giving you all warning this post shall serve as that warning. If you have a desire to bring this topic up with me then I invite you to do so on the IRC channel. Lets raise the level of quality and grow the community. Let us not descend into the quality often found on the minecraft or league of legend forums. There is simply no need for that here. Be passionate about things, just do not be abusive.
    • Kittychanley

      Offline Servers

      Recently I've seen a few server listings showing up on the first page of the Servers forum that have been closed for an extended period of time, but have recently gotten a reply from a new member who didn't realize the server is offline. To help prevent this from happening in the future, it would be greatly appreciated if you could use the report function on the original post of any servers that have been confirmed as offline, so that the topic may be locked. If you are the admin of a server and plan on taking the server offline, please use the report function on the original post of your topic to let the TFC Staff know that the topic should be locked. If you are the admin of a server that has a locked topic, and would wish to bring the server back online, please use the report function on the original post of the topic to let the TFC Staff know that the topic should be unlocked. As always, please remember to follow rule #3 of the servers forum and update your topic title to contain the version of TFC that the server is currently running. You can do so by editing the OP, and then clicking on "Use Full Editor."
Therighthon

Animal Spawning Mechanics

14 posts in this topic

 

It seems pretty likely at this point that TFC2 will feature lots of animals. And, to do justice to this, I feel like there should be a better system in place than the Vanilla system of spawning animals once and that being all you get.

Basic Principle:

With this in mind, I propose that there should be an island-based system for spawning wild animals. Essentially, when an island generates it would generate a list of species that can spawn on that island, based on climate zones, and probably some randomization. Then, based on the numbers of hexes meeting certain requirements (altitude, tree cover etc.) it would determine how many of each species of herbivore it could support. Then, based on that, it would look at a food web to see how many of each species of predator the prey population could support. This should probably be made to favor a larger number of predators than would be realistic, because otherwise we would never see any predators. The island would then generate with the correct number of animals spread across it, with some bias for various locations based on the type of animal (i.e. bears could be more likely to spawn near rivers and fish from them (which would be really cool)). Then, if the count of the animals becomes unbalanced, due to the player hunting, or predators killing prey animals the population could regenerate through random spawns. (Alternatively, animals could start to reproduce when the balance was messed up, but because of the limitations of chunks loading and unloading, and the likelihood of animals being separated from mates, this probably wouldn't work.) This system would ensure that an island will never be over hunted, and that you will never be able to completely clear an area of bears etc.


For Example:

Disclaimer: All numbers and animals used in this are examples, and wouldn't be used in a final plan, as the animals may/may not be included and may/may not actually spawn temperately

Step 1: An island generates with a temperate climate, and flat terrain. The list of animals that can spawn on such islands includes bears, deer, sheep, cows, boars, bison, goats, cougarswolves, squirrels, rats and raccoons.

Step 2: A randomizer determines that only sheep, bison, goats, cougars, wolves, squirrels and raccoons can spawn on the island, making sure to choose at least one large predator, and a few large herbivores and decoration animals.

Step 3: The island has 307 land hexes. Each bison needs 20 hexes, while sheep and goats only need 8 hexes a piece. Each type of animal is allocated 102 land hexes. As such, the island can support 12 sheep, 12 goats and 5 bison.

Step 4: Each wolf needs 4 prey animals, and each cougar needs 10 prey animals. The island can support a total of 27 prey animals. Thus, there are 13 prey animals available for each, meaning the island can support 1 cougar and 3 wolves.

Step 5: The animals spawn in the island with the world generation, with reasonable spacing between the groups. Squirrels and Raccoons spawn and despawn similarly to most hostile mobs in vanilla, and could be kept from despawning by players by some method like the nametag.

Now that the island has generated, say that the player hunts down and kills a bison. Now that there are only 4 bison, a 5th bison will be able to spawn. Because animals generally spawn in herds, the game could either spawn it with a herd, impregnate a bison at random, or wait until more are killed and form a new herd. If a cougar or wolf kills a sheep or goat, the process would be much the same. Now, say that the player successfully domesticates two sheep, and begins to breed them. Soon, the player ends up with 7 captive sheep, bringing the island's total population up to 10 sheep. Now when the wild sheep are killed off, they do not respawn in the wild and eventually only the domesticated sheep are left, but there are now 20 sheep, far more than the island would normally support.

At this point, I am not sure what should happen, but there are a few options.

- A: Nothing would happen aside from no more sheep spawns.

- B: As the number of sheep reaches the island limit, they begin to use up the hexes allocated to the bison and goats, causing them to stop spawning.

- C: As the population of sheep increases, the island becomes able to support more cougars.

So what I am asking with this, is should the actions of the player influence the balance of the environment? I am personally all for that idea, because it is always cool when actions like that mess with the environment, but it would mean the population capacity for each type of animal would have to be dynamic, rather than being calculated once when the island was generated.

 

Anyway, I have typed now for long enough, and would like to know what you guys think and hear some other ideas.

 

EDIT: Also, I meant to put this under suggestions. let me see if I can move it or not…

Edited by Therighthon
1

Share this post


Link to post
Share on other sites

well, I like the idea.  I don't know if it's feasible but I like it. 

1

Share this post


Link to post
Share on other sites

I prefer the A-option, as the preys are captive, but the wild sheeps should not stop spawning, as the captive sheeps are feed by players and the wild food in the island does not decrease.

 

And i prefer the spawning alternatives, not impregnating.

And if the last animal is a male or there are no more animals, the population of the animal will disappear, giving space to preys and predators of other species.

 

And, IMPORTANT, a specie cannot spawn with only 1 animal.

0

Share this post


Link to post
Share on other sites

I don't see any reason why animals "in captivity" should affect the wild population in any way, shape, or form whatever.  They are then no longer part of that biosphere.

0

Share this post


Link to post
Share on other sites
8 hours ago, ChunkHunter said:

I don't see any reason why animals "in captivity" should affect the wild population in any way, shape, or form whatever.  They are then no longer part of that biosphere.

I agree. 

The only other thing that could be considered would be a developed chunk. So when counting the chunks, any chunk with buildings should be removed from the total.

After all it makes no sense to have wild animals spawning in the middle of a town.

0

Share this post


Link to post
Share on other sites

I might add, that with regard to the player breeding lots of animals, option C would be best, and moreover they should spawn often in the vicinity of the player's animals. This should also be true of crops.   This would be a direct difficulty mechanic.  So the player has a lot of poultry?  weasels spawn more often, and try to kill the chickens.   larger animals, you get wolves, big cats, and other predators.   Bears too maybe.  If the player has a bunch of crops, then raccoons, deer, and pigs start appearing and attempting to attack the crops.  The more of these things the player has, the more predators and crop hasslers appear. 

Depending on difficulty desired, maybe a simple fence stops most of these.  Or maybe it doesn't, and the player must employ a variety of counter-meatures.   Weaseles and raccoons can just walk through a split rail fence (if code feasible).  So the player must construct wicker fence panels (made from sticks) or simply build a 2-high wall of solid blocks around the chickens.  Deer can jump 3 high, so the player has to build an extra-tall fence to keep them out.   Bears can break through wood fence, so a stone fence is needed.  And if all else fails, guard animals (finally a use for wolves).

So I think there should be a game challenge spawning aspect, that is separate from any natural ecosystem mechanic.  These challenge spawned creatures might be different in that if they reach their target and kill a few animals or destroy a lot of crops, they then despawn.  Or if they can't get to their target for a certain amount of time, again, they despawn.  At least, the non-violent ones.  If a bear gets in and kills the player's guard animals, and starts killing livestock, maybe it won't go away on it's own and the player has to deal with it.

The notion of wild animals respawning on their own to keep a balance, is fun, but I wonder how that would affect the challenge level of the game, in terms of the player being able to always hunt for food.  If hunting were made harder, so that non-breedable prey animals flee if the player gets within a certain range and isn't sneaking, that would probably help balance the situation.

1

Share this post


Link to post
Share on other sites
1 hour ago, Darmo said:

I might add, that with regard to the player breeding lots of animals, option C would be best, and moreover they should spawn often in the vicinity of the player's animals. This should also be true of crops.   This would be a direct difficulty mechanic.  So the player has a lot of poultry?  weasels spawn more often, and try to kill the chickens.   larger animals, you get wolves, big cats, and other predators.   Bears too maybe.  If the player has a bunch of crops, then raccoons, deer, and pigs start appearing and attempting to attack the crops.  The more of these things the player has, the more predators and crop hasslers appear. 

Depending on difficulty desired, maybe a simple fence stops most of these.  Or maybe it doesn't, and the player must employ a variety of counter-meatures.   Weaseles and raccoons can just walk through a split rail fence (if code feasible).  So the player must construct wicker fence panels (made from sticks) or simply build a 2-high wall of solid blocks around the chickens.  Deer can jump 3 high, so the player has to build an extra-tall fence to keep them out.   Bears can break through wood fence, so a stone fence is needed.  And if all else fails, guard animals (finally a use for wolves).

So I think there should be a game challenge spawning aspect, that is separate from any natural ecosystem mechanic.  These challenge spawned creatures might be different in that if they reach their target and kill a few animals or destroy a lot of crops, they then despawn.  Or if they can't get to their target for a certain amount of time, again, they despawn.  At least, the non-violent ones.  If a bear gets in and kills the player's guard animals, and starts killing livestock, maybe it won't go away on it's own and the player has to deal with it.

The notion of wild animals respawning on their own to keep a balance, is fun, but I wonder how that would affect the challenge level of the game, in terms of the player being able to always hunt for food.  If hunting were made harder, so that non-breedable prey animals flee if the player gets within a certain range and isn't sneaking, that would probably help balance the situation.

Yeah, hunting would have to be rebalanced. They could always just make it so that the animals drop less food.

I like the idea of having to keep animals away from crops and animals. Crops should probably be made easier to protect, with stuff like scarecrows because otherwise it would get really annoying. So, while protecting animals would be more dynamic and unpredictable because it relies on AI, defending crops would be more predictable and systematic, similar to support beams. I really like the idea of having sheep dogs though. That would be super cool.

0

Share this post


Link to post
Share on other sites

I think that ideally it would be a scaling system.  So if the player is in the stone age  and has like, 5 maize plants, the game goes easy on them and doesn't hassle them.   But if the player is going bonkers with their farms and has 150 planted crops in one hex, up the difficulty and bring in some hassling animals.  The more crops (or animals) the greater the chance.   So ideally you're only becoming annoying when the player already probably has a lot of crops/animals anyway.   And if the hasslers despawn after destroying X crop blocks or animals, you can control the damage.  Each hassler will reduce the total crops by no more than a certain amount, so as not to wipe out the player's stuff in one shot.  This in turn reduces the chance of the next one spawning.

If the chance is based on crops per hex, it could encourage the player to spread their fields out a bit, reducing the chance for each field  (or pen of animals) to be hassled.  Or it could just be based on a single block check that scans for crops/animals in a 5 block or whatever radius, and depending on the count, maybe gets hassled.  Where the hasslers spawn might be tricky.  If fences are used as a defense, you don't want the hassler spawning within the fence - that's cheating.  That might limit the enclosure size.  If it got too large, the check might not realize there's a fence, and spawn the hassler inside.

I hope I'm not hijacking your thread Therighthon.  Your macro idea of island-wide spawning I like, and don't have a lot to suggest, especially given my lack of knowledge of the code possibilities.  I might suggest that aside form picking from the 3 categories you suggested, maybe there should also be only 1 production animal of each type.  So an island might only have 1 certain wool producing animal, or milk producer.  If some animals produced more than a given commodity than others, then one island might have a really good milk producer, but poor wool production.  Another might have both be not great producers, and another might be have really good ones.  I guess some could be absent altogether.  It just might make the islands have different characters, rather than each one being the same animals in different skins.

0

Share this post


Link to post
Share on other sites

I like the way you think Darmo, my only point is that TFC needs a better Spawning system..

Using Just Another Spawner and Mob Properties I was able to make a server where no mobs spawn over artificial blocks. So in the case mobs only spawn over Dirt, grass, or raw stone. Mobs never spawn over wood blocks, smooth stone, bricks etc.

This would make it so mobs spawn outside of the player buildings, but the player still needs to build fences and walls to protect his base.

My point is that as much as I like your idea of having more wolves spawning because the player has a huge sheep herd, the wolves should not spawn inside the sheep pen.

0

Share this post


Link to post
Share on other sites

Good news, as far as the macro spawning this is sort of how it already works!

  • Each animal has a habitable climate zone.
  • Each island selects several species (iirc its small random number)
  • The animal spawner then queues X number of each creature to spawn on the island in groups of Y to Z where X, Y, and Z are arbitrarily controlled numbers based upon our own balancing choices.
  • When animals are killed, they subtact from the population pool for that animal type.
  • As long as the population pool is not emptied, the spawner will queue up more of that animal to spawn in an appropriate hex.
  • When the island ticks, it will replenish the population pool over time.
  • Killing or in any way altering(taming or moving an animal via portal) will cause it to leave the population pool for that island.

I'm still making up my mind about extinction or not. We'll leave it in for now and see how it plays out.

 

2

Share this post


Link to post
Share on other sites

Would love to see that when you kill an animal, a baby animal spawns in the same location of a grown wild animal of its specie, or even better, a random female gets impregnated, as Therigthon said. You can just kill all the grown ups, because the little babys would be an easy prey for other animals + you cant kill  all the females of the island. Also, if only females can get impregnated IF a male is within a 50 block radius, you couldn't kill all the males. 

0

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now