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

Animal Breeding Rate Adjusted to Season Length & Dog breeding delay increased to more accurate numbers #25368

Conversation

TimPollard
Copy link
Contributor

@TimPollard TimPollard commented Sep 5, 2018

Summary

SUMMARY: Bugfixes "Slows dog reproduction to realistic levels and makes reproduction rate adjust based on season length"

Purpose of change

Helps with, but doesn't completely fix, the various issues related to puppy overpopulation, such as: #25289, #25302, and #24852. (Especially with long season lengths.)

Describe the solution

Uses calendar::season_ratio() to adjust baby_timer. baby_timer is now number of days on a 91 day season (364 days) to match up with the grow times for plants.

All animals have had their baby_timer multiplied by 6.5 so that it will produce the same results on 14 day seasons as it used to, but slower reproduction on longer seasons.

The exception is dogs which have had their baby_timer increased as follows:

The baby_timer had been set for dogs to be equivalent of just over 2/3 of a season, which is the correct pregnancy period (~62 days in the real world), but didn't take into account the fact that dogs can only get pregnant when in heat, which only happens a couple of times a year typically.

Searching on the internet suggests and average of seven months between heats, with smaller dogs having heats more regularly, and larger dogs less regularly.

Values have been adjusted to 272 days for most breeds to represent seven months plus 62 days, while smaller breeds have been set to 240 days, and larger breeds to 300 or 320.

Describe alternatives you've considered

baby_timer could have been left adjusted to 14 day seasons, which simplifies the code very slightly, but results in absurdities like 36 litters of puppies every year on 91 day seasons.

It seems more sensible to have it adjust based on season length.

Additional context

These links provide some real world values for dog reproduction:

http://animalpetdoctor.homestead.com/reproduction.html

https://www.vetwest.com.au/pet-library/reproduction-in-dogs-season-heat-oestrus-pregnancy-tests

Animal reproduction used to be balanced for 14 day seasons, which
resulted in absurdities for longer season lengths. For example dogs
that produced 36 litters a year on 91 day season lengths.

baby_timer is now the number of days if the player is using a 91 day
season length, and is then adjusted based on the actual season
length.
The baby_timer had been set for dogs to be equivalent of just over
2/3 of a season, which is the correct pregnancy period (~62 days in the
real world), but didn't take into account the fact that dogs can only
get pregnant when in heat, which only happens a couple of times a year
typically.

Searching on the internet suggests and average of seven months
between heats, with smaller dogs having heats more regularly, and
larger dogs less regularly.

Values have been adjusted to 272 days for most breeds to represent
seven months plus 62 days, while smaller breeds have been set to 240
days, and larger breeds to 300 or 320.

This will help a bit with some of the puppy explosion tickets.

references CleverRaven#25289
references CleverRaven#25302
references CleverRaven#24852
@cainiaowu
Copy link
Contributor

It wont hurt to add some details about this into various .md files.

@nexusmrsep
Copy link
Contributor

There was a discussion recently on Discord dev channel and I believe it was said that this shoudn't be adjusted to seasons length. Perhaps it should be adjusted to RL scale and abstracted from chosen in game seasons, since by what I understand here shorter seasons mean more dogs and longer seasons mean less dogs.

@mlangsdorf mlangsdorf added <Bugfix> This is a fix for a bug (or closes open issue) [C++] Changes (can be) made in C++. Previously named `Code` [JSON] Changes (can be) made in JSON Spawn Creatures, items, vehicles, locations appearing on map labels Sep 5, 2018
@kevingranade
Copy link
Member

kevingranade commented Sep 6, 2018 via email

@TimPollard
Copy link
Contributor Author

TimPollard commented Sep 6, 2018

Yeah, this would result in larger numbers of dogs (and all other animals that reproduce) in short seasons. (Or perhaps more accurately, less dogs in longer seasons)

My reasoning was that not adjusting them for season length results in either only one litter every 4-5 years on 14 day seasons (if we adjusted to real-world values), or eight litters a year for 91 day seasons (if we adjusted for 14 day seasons), both of which seem wrong, and probably annoying if you're actually trying to breed some sort of animal.

I suppose keeping it consistent is better from a balance perspective though.

I'd still like to increase the baby_timer for dogs so that it takes into account the delay due to bitches only coming into season approximately twice a year.

Would I be correct in assuming that it would be best to adjust them for 14 day seasons? (~42 days rather than the 10 they are now)

@Robik81
Copy link
Contributor

Robik81 commented Sep 6, 2018

Nothing should be scaling with season length.

Do I interpret it correctly that season is base time unit. Everything should be defined as x per season?

If an animal has litter 0.5 per season, it means it has litter 1x in 28 days in default season length and 1x 180 days in 90 days season length. And it is not scaling because it is constant against the season unit?

@kevingranade
Copy link
Member

Would I be correct in assuming that it would be best to adjust them for 14 day seasons?

Adjust for real world season lengths.

Do I interpret it correctly that season is base time unit. Everything should be defined as x per season?

No, I mean durations should take the same number of days as they do in the real world and completely ignore the season length option.

@Robik81
Copy link
Contributor

Robik81 commented Sep 6, 2018

No, I mean durations should take the same number of days as they do in the real world and completely ignore the season length option.

Not sure if it is such a good idea... for example, spring wheat takes 4 real months from planting to harvest, lets say 120 real days. If would take over 8 seasons / 2 game years on default settings from planting to harvest.

TimPollard added a commit to TimPollard/Cataclysm-DDA that referenced this pull request Sep 7, 2018
On discussion with Kevin Grande on GitHub the preference is to adjust
the breeding rates to real world values.

Previously dogs had litters every 10 days, but in the real world
bitches only go into heat an average of once every seven months, and
then require another two months for the pregnancy, or roughly 270 days
total.

Smaller breeds have more regular, but smaller litters, and larger
breeds less often but larger litters.

references CleverRaven#25368
@TimPollard
Copy link
Contributor Author

Yeah this would be a problem for farming, especially since realistically a lot of crops would die when it gets colder. It probably doesn't matter as much for animals though.

I believe the farming code currently decreases time to harvest, but also harvest size based on season length.

@paulenka-aleh
Copy link

Does it make sense to have seasons of 14 days long at all especially by default?

@kevingranade
Copy link
Member

Does it make sense to have seasons of 14 days long at all especially by default?

Nope

@DracoGriffin
Copy link
Contributor

@kevingranade With the new seasons of 91 days, I think season scaling could be a suitable mechanism now for those that choose to play on different season lengths (like those that might cling to 14 days or otherwise). At least instead of the weirdness of (for example) plants dying in winter (based on reverted #24291 which might eventually return) / lasting for years or suggestions of "play on default 91 days", there is some acquiescence of normality supplied with the season scaling. It wouldn't affect anything on default (as most things are already based on 90/91 day seasons), and reduce potential issues/complaints in the future. Then at least any "weirdness" that might occur with shortened/variant season lengths can be met with "designed with 90/91 day seasons, so play default or accept the quirks".

Secondly, I think this PR should probably be split up between the season scaling mechanism and animal reproduction days (those could be ported over to #25423) especially with both PRs having very similar changes to dog reproduction values.

@kevingranade
Copy link
Member

With the new seasons of 91 days, I think season scaling could be a suitable mechanism now for those that choose to play on different season lengths

It absolutely should not. What we really care about is population growth or maturation rate per day, it makes no sense to link it to season length.

@DracoGriffin
Copy link
Contributor

All of the other (other than dog) animal reproduction values probably should be ported and merged, otherwise they are still based off of the 14-day season length.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
<Bugfix> This is a fix for a bug (or closes open issue) [C++] Changes (can be) made in C++. Previously named `Code` [JSON] Changes (can be) made in JSON Spawn Creatures, items, vehicles, locations appearing on map
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants