-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Add animal spawn setting. #28349
Add animal spawn setting. #28349
Conversation
spawn_density = get_option< float >( "SPAWN_DENSITY" ); | ||
} | ||
|
||
// Apply a multipler to the number of monsters for really high densities. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// Apply a multipler to the number of monsters for really high densities. | |
// Apply a multiplier to the number of monsters for really high densities. |
|
||
// Apply a multipler to the number of monsters for really high densities. | ||
float odds_after_density = spawns.chance * spawn_density; | ||
float max_odds = 100 - ( 100 - spawns.chance ) / 2; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could be const
.
density_multiplier = 1.0f * odds_after_density / max_odds; | ||
odds_after_density = max_odds; | ||
} | ||
int spawn_count = roll_remainder( density_multiplier ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could be const
.
@@ -1703,7 +1703,12 @@ void options_manager::add_options_world_default() | |||
); | |||
|
|||
add( "SPAWN_DENSITY", "world_default", translate_marker( "Spawn rate scaling factor" ), | |||
translate_marker( "A scaling factor that determines density of monster spawns." ), | |||
translate_marker( "A scaling factor that determines density of monster spawns (except animals)." ), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
translate_marker( "A scaling factor that determines density of monster spawns (except animals)." ), | |
translate_marker( "A scaling factor that determines density of monster spawns (except for animals)." ), |
{ | ||
"type": "EXTERNAL_OPTION", | ||
"name": "DISABLE_SWAMP_CLASH", | ||
"info": "Disable monster clashes on swamps.", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add some more info on what "monster clashes on swamp" is.
); | ||
|
||
add( "SPAWN_ANIMAL_DENSITY", "world_default", translate_marker( "Animal spawn rate scaling factor" ), | ||
translate_marker( "A scaling factor that determines density of wild, formerly domesticated and mutated animal spawns." ), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
translate_marker( "A scaling factor that determines density of wild, formerly domesticated and mutated animal spawns." ), | |
translate_marker( "A scaling factor that determines density of wild, formerly domesticated and mutated animals spawns." ), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That one's actually correct as a singular
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Enumeration of 1) wild, 2) formerly domesticated, and 3) mutated should be "animal"?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"animal spawn" is kinda treated as one thing in this case so the plural would be "animal spawns." Also it just sounds right to me.
Either that or add an apostrophe: "animal's spawns" but that's a little awkward.
"monsters" : [ | ||
{ "monster" : "mon_duck", "freq" : 50, "cost_multiplier" : 0 } | ||
] | ||
},{ | ||
"type":"monstergroup", | ||
"name" : "GROUP_POND_FISH", | ||
"default" : "mon_null", | ||
"is_animal" : true, | ||
"monsters" : [ | ||
{ "monster" : "mon_duck", "freq" : 50, "cost_multiplier" : 0 }, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess this is an error here: duck shouldn't belong to GROUP_POND_FISH
.
Please move this to a hidden option and add it as a mod. The options list
is already way too big and tweaking natural animal spawns isn't something
we should be suggesting that players should typically adjust.
|
And now I am getting |
Will reopen it shortly. |
Summary
SUMMARY: Features "Add animal spawn setting."
Purpose of change
Zombies are main enemies and partially loot source while animals are main meat source.
Increasing monster spawn will increase game difficulty but also increase food abundance, so separate spawn setting is required for better balancing.
Describe the solution
"is_animal" : true
to some json monster groups, these groups will use new spawn rate. Other groups will use base scaling factor.Additional context
There are 2 different code parts which choose monsters from the group, probably they must be merged somehow.