Changes to monster spawning (Complete)

I plan on making the following changes to monster spawning in the near future, in regards primarily to dynamic spawns:

These changes, from the public point of view, primarily effect the format of the mongroups.json file.

Done:
Rename the “multiplier:” attribute as “cost_multiplier”.
Add the “pack:” attribute, which takes an array of the form [x,y], where, when this creature spawns, it spawns in groups of minimum size x and maximum size y. This behaviour will be given to things like wolves and some new monsters.
Add the “conditions_required:” attribute, which can be given a value or array of values, including “DAY”, “NIGHT”, “TWILIGHT”, “DUSK”, “DAWN”, and the seasons. When calculating spawns, the game will check to see if the condition matches, and if not, it will skip this spawn line in the same way it does for spawns before the appear date or after the disappear date. This will allow for the introduction of nocturnal, diurnal, and twilight animals, and enemies that are more common during certain conditions.
Add the “appears:” attribute, which adds a time delay before which these critters will not appear, in days. The earliest a creature will appear is the day of the given value, with zero being the first day. This will be used for the various zombified animals, which will only begin to appear over time. Since you can have multiple entries per animal, with their own delays, this allows for a gradual fade in of certain zombie types. When going through the spawn list, creatures that should not yet “appear” are simple skipped and do not prevent spawns like the current difficulty check.
Add the “disappears:” attribute, which works like the appears attribute but sets the last day on which this spawn is valid instead of the first. Days beyond this value have this spawn line skipped.

I like the sound of this, even gives the option of having generic zeds spawn in “packs” later in the game… (or in packs in large buildings, EG Sporting arenas, prisons, etc)

Rename: OK
Pack: Will each member of the pack affect the multiplier, or is a pack the fundamental unit?
Appears: Can also be used for the conglomerate critters (Hulk, Jabberwock, etc) since those ought to take a little while to get themselves together.
Disappears: Only use I can think of for this would be seasonal, and that doesn’t seem like it would work. Does Blob infestation block critter reproduction? Otherwise, critters should be around indefinitely.

Conditions: This came up earlier. I have a bit of a problem with critters existing, for the player’s purposes, only when that critter is in its ideal conditions–would prefer to be able to get lucky/determined and catch a nocturnal critter in daylight, etc. Understood that such isn’t a particularly easy programming task though.

The pack is the fundamental unit. And only happens in dynamic spawn anyway, where the cost_multiplier is already ignored.

Dissappears is meant to work in conjunction with appears - as animals are replaced with their zombified counterparts, the natural versions of the animals should become less common, losing most of there spawn instances. This is practically required - in order to add spawns, spawns have to be reduced in another group. This just lets the player choose which groups.

Conditions can be stacked just like appears and disappears, and yes, there should be a rare chance of encountering every creature in that spawn group regardless of condition, but that can be represented by having two entries, one much rarer than the other and without any conditions. It’s actually quite easy to do that way.

Tags for season specific spawns?

Hibernating bears? :smiley:

I love the outline!

This would be good to add to conditions, thanks!

great idea.

wouldn’t anything kids of ‘ideas’ be best discussed in suggestions? more people might see it to comment.

Nah, it’s here because I plan on actually finishing implementing it this week and have, in fact, already started. Suggestions is mostly for “stuff you want other people to do”, this is specifically “something I am doing that I would like feedback on”.

This sounds better than the concept of the ‘difficulty’ counter, which isn’t very helpful (you can still encounter zombie hulks, master zombies, etc on day 1). Phasing out regular enemies for zombified ones, and steadily stronger monsters, should help keep the late-game fresh and interesting, as suddenly you have fewer critters around to cook and eat (unless you have mad Survival skill).

The thing is, this only works for dynamic spawn, which I’d really like to get rid of, long with all the silliness like noise-based spawning and monsters that appear and disappear based on player presence :stuck_out_tongue:

For example, with the new fungal mass spreading thing, it very strongly highlights the reality bubble, because a fungal spire near you develops much faster than one you don’t interact with.

[quote=“Kevin Granade, post:12, topic:3530”]The thing is, this only works for dynamic spawn, which I’d really like to get rid of, long with all the silliness like noise-based spawning and monsters that appear and disappear based on player presence :stuck_out_tongue:

For example, with the new fungal mass spreading thing, it very strongly highlights the reality bubble, because a fungal spire near you develops much faster than one you don’t interact with.[/quote]
Agreed. I’d much rather start to replace some of the wildlife dynamic spawning completely with static things. Basically the new system would work like this:

  1. Set packs of monsters are spawned just like zombies are.
  2. Every season or so the game rolls for new monster packs based on current nearby populations. More population = more new packs, and gives us a general “reproduction” system. This also means that a player could deplete all the animals in an area by slaughtering them and all nearby ones.

I could see tying in a conversion range though. This would be a number of days (start/end range) that over the course of which the game starts to convert random packs from x monster into y monster. Maybe tie this with a start/stop values as well, so you could have something like “starting at day 5 convert a percentage of packs of X monster into packs of Y monster, stopping on day 10 having converted 50% of packs”.

Also I’d like to see switching the current mechanism from a X in 1000 to a straight relative system (similar to the one DF uses). This would remove the ‘default’ monster thing completely, remove the limits on the total amount of frequency you can have in a group (right now if the frequencies of a mongroup add up to greater then 1000 the end monsters will never be spawned) and is much easier to visualize then the current system (saying a hulk is 20 times as rare as a zombie is much easier to weigh in many people’s minds then saying "hulks have a 1/1000 chance and zombies have a [1000 - hulk chance - necro chance - …]/1000 chance.

Btw, the best place in the code for population changes to be made seems to be in submap load. While loading the submap you can check the last updated timestamp for the submap, and update all the map entities for the elapsed time. This is the general system for everything, rot, population growth, plant growth, etc. Also should be able to plug fungal terrain spread into it, as well as seasonal stuff like snow cover, etc.

Most of the changes I’m making, if not all of them, could easily be information carried over to other spawn methodologies with a slight altering of implementation. Others would still basically work as-is.

Pack spawn definitions are now waiting in a PR, will hopefully be mainlined soon.

can we add that some monsters are more likely to chase in packs. one easy strategy is to lure a few monsters a way and kill them. i can see doing this with ‘dumb’ zombies, but wolves, bees, ants, would probably go after you as a group. Id also like a variable that would draw them back to a group. could be configurable. this would be a hardercore mode since the strategy of ‘draw a few out’ would be alot harder.

Actually that’s really easy, you just make them want to follow each other with a low priority, so if one of them spots the player and wanders over, the others will follow, since they can see the first one, THEN they’ll get pulled to where they can see the player and go on the attack.

I’m planning on making this happen a little bit with zombies by making them be silent when they’re standing around, but moan or growl sometimes when they’re going after a target. The noise will attract others just a little bit, so they’ll pack up, but only a little bit. With wolves it would make sense for them to move closer to another wolf any time they’re further away than some threshold and not otherwise occupied. You could still maybe pull the pack by distracting them from two directions at once, but it’s be quite difficult.

Fantastic Idea!!! If I could interject something about classic zombie mode (which would work in normal as well), it might be good at this juncture to add ‘decayed’ (or adjective for badly damaged) zombies which wouldn’t alert others, whereas more un-damaged ones would. This would add a bit of variation and almost a bit of stealth play if the player could turn zombies (by dealing a certain amount of damage) into damaged zombies to stop them alerting others? This could be on a gradient system, where completely ‘healthy’ zombies could be moaning and groaning all over the place, whereas the more damaged they got, the quieter they were?

how about we combine static and non-static spawns. noise used to be more important and zombies spawned on noise. noise isnt that important anymore. Here is a link to a suggestion i made on noise.

http://smf.cataclysmdda.com/index.php?topic=3778.0