Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reduce group spawn of wild animals. #25792

Merged
merged 2 commits into from Sep 30, 2018
Merged

Conversation

Vasyan2006
Copy link
Contributor

Summary

SUMMARY: Balance "Reduce group spawn of wild animals."

Purpose of change

Forests and swamps are overpopulated with wild animals. Such high concentration of predators and preys is possible only in controlled conditions like ZOO. Most wild animals must avoid humans and run away before contact.
As the result hunting is trivial and finding fresh steak is not a problem.

Describe the solution

Decrease spawn of common animals in forests and swamps.
It will decrease chances to meet a group of earth animals and their zombified versions. Ants, triffids and jabberwocks will not be changed.

Additional context

As a long-term idea I want to see animal groups to move similar to hordes, but they will avoid noises instead of being atracted to. Characters with high survival skill will be able to see them on overmap view.

@FulcrumA
Copy link
Contributor

I will have to see how well this PR will work in practice though I do like the idea, as well as the one you have for future additions, as per additional notes. I think doing it like quest markers upon an attempt to track an animal/pack rather than making it like hordes would be better, but that's a discussion for when you'll get to it.

@Marrim
Copy link
Contributor

Marrim commented Sep 23, 2018

I agree there is a lot that could be improved, but reducing spawn rate is a good measure in the meantime.

@Robik81
Copy link
Contributor

Robik81 commented Sep 23, 2018

While it might be that wild spawn is too high, I don't like dropping it to 1/10th of current spawn rate.

What's wrong with reducing it to 1/2 first and see how that works? Why such drastic change? Or should I take the name of your branch "no-meat" as a hint what is true intent here?

@FulcrumA
Copy link
Contributor

A good point raised, barring the personal jab at the end - 1/10 may be a bit excessive, slightly less extreme change gradually adjusted till it'll be 'just right' may be safer.

@Vasyan2006
Copy link
Contributor Author

"no-meat" means that a character without survival skills and propper infrastructure will barely be able to get fresh meat, until he will occasionally kill a moose with his deathmobile or a pack of wolves will find his base. I want hunting to be more similar to Unreal World, where it takes few days to track a deer, but his meat will be enought for a season. Trapping, for example, is one of the most important skills for surviving, but is useless as long as we have annoying animals everywhere.
Disclaimer: Most of these are just ideas and will not be implemented in near future.

@Robik81
Copy link
Contributor

Robik81 commented Sep 23, 2018

Most of these are just ideas and will not be implemented in near future.

Great, how about nerfing current spawns after these ideas are implemented. Not the other way around.

Not to mention that it is currently not possible to sneak upon non aggressive animals. That should be implemented first as well.

@tinukedaya
Copy link
Contributor

I like the general idea, as I do not like the overall amount of wildlife either, but I have to agree it's done the wrong way around... There should first be a way to reliably track and hunt the game, before you reduce it this much...

@Marrim
Copy link
Contributor

Marrim commented Sep 23, 2018

I dunno, 1/10th seems about right as right now you can't cross between two cities without getting attacked by coyotes repeatedly and having to kill 15-20 of them.

No need for hunting, the meat will come to you just two steps away from your base.

@FulcrumA
Copy link
Contributor

FulcrumA commented Sep 23, 2018

No need for hunting, the meat will come to you just two steps away from your base.

Here it may be more of an AI behavior than animal abundance. Plus, I've noticed far fewer animals in forests than in swamps so cutting it all to 1/10th all across the board no matter the initial group size may be indeed a bit too crude measure.

@TechyBen
Copy link
Contributor

Only seems to be a swamp spawn problem IMO too. Not seen in game numbers, but certain swamp tiles do seem to get a monster splosion (lore/gameplay challenge?), whereas forests just get normal spawn numbers. Swamps also get normal spawns, but there is certainly something causing the occasional epic battle of wildlife!

@kevingranade
Copy link
Member

This needs a goal for what density of animals there should be, moving from one person's "seems ok to me" to another person's "seems ok to me" doesn't help us.

@Marrim
Copy link
Contributor

Marrim commented Sep 24, 2018

I don't have a source specifically for New England but density could be estimated from an average size of territory a pack (or a solitary animal) defends.

Encyclopedia Britannica:

The size of coyote territories varies among habitats and also depends on its abundance of prey. Most territories, however, range from 10 to 40 square km (4 to 15 square miles).

Westernwildlife.org:

The home range of a female black bear is typically 2.5 to 10 square miles (6.4-25.9 square kilometers). Male black bears range over much larger areas and home ranges are 10 to 59 square miles (26-152 square kilometers). Female black bears generally will not share their territory with other females, but the ranges of several males may overlap with hers.

Wolfworlds:

By nature wolves are very territorial animals. They can have a home range from 33 to 6,200 km2 but it depends on the type of wolf and where they reside. On average it is about 35 km2. This is quite a bit of territory for a single wolf pack to take over. That is why many of them overlap with others.

How much square kilometers/miles is one map tile?

@dissociativity
Copy link
Contributor

dissociativity commented Sep 25, 2018

Given that we have breeding and similar in now, this makes perfect sense to rebalance things around it.
Forest and Field animal levels do however feel about right, it's only really swamp that's very problematic.

Another idea just to throw out there:
Wolf packs should be treated similarly to hordes and be able to move across the overmap if they aren't already, however without the noise attraction side-effects that come with.

@kevingranade
Copy link
Member

How much square kilometers/miles is one map tile?

One house-sized area, which is one symbol/tile on the overmap view is about 24mx24m.

@Marrim
Copy link
Contributor

Marrim commented Sep 25, 2018

And a single overmap region is 180x180 of these, meaning it is a square of 4320 meters, or about 18,6 square kilometers. Which seems to suggest that a 180x180 region should contain about one wolf pack, one coyote pack, and 3-4 bears.

@Robik81
Copy link
Contributor

Robik81 commented Sep 25, 2018

How does this fit with city density in the area though?

Cities are much smaller than RL, and their distances are much closer. Condensed, if you will.

I am not sure if it does make sense to pull one aspect (animal density) and change that to RL value while ignoring the rest.

@Marrim
Copy link
Contributor

Marrim commented Sep 25, 2018

Prey animals, in general, are more densely-packed than predators. This abstract offers some insight into how big a moose's home range is:
https://doi.org/10.2307/1382483
I understand that home ranges may overlap to a degree, so I'd say it's anywhere from 1 to 6 moose per overmap region.

@Marrim
Copy link
Contributor

Marrim commented Sep 25, 2018

I've always imagined those "cities" were not really cities, but minor settlements and cottage groups.

The whole overmap looks like a suburban (big city size) or rural (small city size) settled area to me. I have never been to New England, of course, but where I live it's pretty common to see small groups of cottages every 5-10 km, denser along the highways, railroads and rivers.

If these are condensed, then not by much.

Though it does surprise me that one tile is only 1 meter wide. I mean, I can cover more than 1 meter in 6 seconds.

@Marrim
Copy link
Contributor

Marrim commented Sep 25, 2018

I propose that we work off the travel times, e.g. a pedestrian covers 4320 tiles in ~26000 seconds, so if we assume 1 meter per second then we should calculate wildlife densities as they would be for 26x26 km square overmaps.

That would suggest 20-30 predator packs (wolf, coyote) and 40-60 of each large solitary animal (moose, bear) per full overmap square.

However, this does not yet help work out what numbers should be in the json. E.g. I need to know what exactly the following line means:

"spawns": { "group": "GROUP_FOREST", "population": [ 0, 1 ], "chance": 80 },

UPD: okay I think I understand how it works, so gimme a day or two and I'll do the math and post my findings. (In the name of !!SCIENCE!!)

@Robik81
Copy link
Contributor

Robik81 commented Sep 25, 2018

I've always imagined those "cities" were not really cities, but minor settlements and cottage groups.

How would you explain the size of the farm then? Average USA farm is 442 acres, or 1.8 km^2. So it should be 56x56 map tiles... but it is not.

@Marrim
Copy link
Contributor

Marrim commented Sep 25, 2018

See above, I suggest that we work from travel times instead -- the farm, incidentally, would be about the right size then.

@Robik81
Copy link
Contributor

Robik81 commented Sep 25, 2018

See above, I suggest that we work from travel times instead

So, condensation factor of 6 based of travel times then? Sounds reasonable to me, this is something that Kevin should approve of first though.

@Vasyan2006
Copy link
Contributor Author

Discussions about how large is one tile never ends good. It has size from 0.5 to 25 meters, depends on measurment system. For example a pedestrian walks 1 tile per 6 second and a car at 16 km/h rides 1 tile every 6 seconds.

26x26 km square overmaps sounds good, but recalculating animal spawn to this size will (probably) reduce overall population even more then by 10.

@Marrim
Copy link
Contributor

Marrim commented Sep 25, 2018

Which is fine as long as the numbers have a basis.

@kevingranade
Copy link
Member

Cities are much smaller than RL, and their distances are much closer. Condensed, if you will.

I've always imagined those "cities" were not really cities, but minor settlements and cottage groups.

I agree, we simply dont have "cities".

I mean, I can cover more than 1 meter in 6 seconds.

Scale was never really considered, I want to shrink turn length to 1 second, which rationalizes move speed and walking distances nicely.

I'm not against scaling this based on move speed. Amount of ground covered in a day is a major limiter on hunting effectiveness. If we later adjust effective move speed, we can adjust densities again then.

How would you explain the size of the farm then?

Large features are not scaled properly, in large part because they're harder to make, and the game engine doesnt support them well.

Overall I'm fine in principle with taking real life population densities as a goal, if that makes hunting tedious or prohibitively difficult, then we might not jump straight to that density, but instead go part of the way there and look into adding features that bring player time investment and resource balance to where it should be.

@Robik81
Copy link
Contributor

Robik81 commented Sep 26, 2018

I just realized that we can't take RL density value of specific animal, like wolf, and use it in the game, but rather density of animal class, because we don't have every animal represented in game. This would lead to lower than RL wildlife animal density otherwise.

@Vasyan2006
Copy link
Contributor Author

If we assume one overmap (180x180 chunks) to be 26x26 square kilometers, the area of one chunk will be 20k square meters.
If average home range for one moose is 20 km2 or 20M m2, the probability to have it in one chunk will be 0.001 or 0.1%.

Average ingame chance to get a moose from GROUP_FOREST monstergroup (total freq for all mooses) is 15/1000 or 1.5%, where 1000 is a default monster frequency from mongroup.cpp.
Probability to get 0 or 1 forest monstergroup on a chunk is 80% (from overmap_terrain.json), or 40% to get 1 monstergroup.
So Schroedinger's Moose can exist inside a chunk with probability 0.015*0.4=0.006 or 0.6%.

This gives moose reduction ratio 6, as it was suggested before.
For a simplicity we can assume 20 km2 as default home range for bears, coyotes and wolves, and reduce spawn chance from 80% to 80/6=13% for all animals.

Any thoughts?

@Marrim
Copy link
Contributor

Marrim commented Sep 26, 2018

For comparison: a realistic scale (overmaps at 4320m x 4320m, or about 18,6 square kilometers) would require reduction by a factor of 216, not 6.

But 6 would be a good start. Seriously, wildlife is so plentiful currently that it shatters suspension of disbelief.

UPD:
Having 1-meter tiles that take 6 game seconds to traverse makes your in-game travel 1/6th from being completely to scale. Therefore prey encounters should be 6 times more frequent compared to realistic frequency. So that brings us to 36x reduction from current values (0,016% for a moose).

@Vasyan2006
Copy link
Contributor Author

@Marrim
20 km2 home range for a moose is from your link above. It is written it is from 13.7 km2 for females to 25.9 km2 for males. Sweden moose can have different behaviour compare to north american, but untill someone will bring new data this evaluation looks good.
Another thing is season migration and increasing home range during winter (can be modelled by setting specific season in monstergroup settings).

@Vasyan2006
Copy link
Contributor Author

Average animal spawn rate is decreased by a factor of 6, as discussed above. In this case most animals will have 20 km2 home area. More precise tuning can be done later by edit monster groups.

@zheele
Copy link

zheele commented Sep 29, 2018

It can be detrimental to use home range as a measurement for animal density as this does not take into account pack/herd size and overlap between home areas. It would be better to use density numbers as a measurement as they already include these considerations.

Sweden for example has one of the strongest moose populations in the world with about 1.2 moose per square kilometer of forest (source). Canada has a lot lower numbers at 0.267 moose per square kilometer of forest even though they both have the same home range. The reason given in the linked article is that the prevelence of predators is different between the different countries.

Given that one chunk is roughly 20k m2 or 0.02 km2; a swedish moose density would be 1.2 * 0.02 = 0.024 or 2.4%, a canadian moose density would be 0.2677 * 0.02 = 0.00535 or 0,54% (closer to the suggested number above).

Density numbers from the above referenced article (translated from moose per milion hectares to mose per km2):

Country Mose/km2 Spawn chance
Sweden 1.2068 2.4%
Norway 1.2000 2.4%
Finland 0.5227 1.05%
Canada 0.2677 0.54%
Alaska 0.1550 0.31%
Russia 0.0803 0.16%

@kevingranade
Copy link
Member

Good discussion everyone, I'm convinced this is a good first step.

@kevingranade kevingranade merged commit 3f74301 into CleverRaven:master Sep 30, 2018
@Vasyan2006 Vasyan2006 deleted the no-meat branch September 30, 2018 10:59
@Vasyan2006
Copy link
Contributor Author

@zheele
You are right, using animal density is more precise, compare to home ranges. While average number of animals looks better now, woods are still overpopulated with wolves and coyotes, specially because they are spawn in packs instead of single animals. And as I saw in briefly review of moose and deer distributions, their initial number was fine, so this decreasing is representing their avoidance behaviour.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

9 participants