This came up in the 3.3.0 Hobbit Rogue / Death thread: the suggestion that you might be able to gradually genocide an entire monster race by killing its members. So I figured I'd toss up some ideas on how this could work. Don't take this to mean that I'm volunteering to implement it though; I just thought it was a neat idea that could stand to be fleshed out a bit.
What we want is twofold: first, it should be possible to extinct a race by killing enough of its members. Second, the probability of a race being generated should be a function of its population -- as you kill more of the race, it becomes increasingly less likely that you'll stumble across its members.
Let's suppose that each monster race has a total population, a maximum population, and a "fecundity" rating that drives how quickly the race replenishes itself. Replenishment happens every 10k game turns (as with store refreshes) -- each replenishment, the population is increased by a percentage, up to the maximum population. For example, a race of population 1000 with fecundity 5% would get a new population of 1000 * 1.05 = 1050. Of course population goes down every time you kill a member of the race.
When we want to decide which monsters we should generate, we do what I tend to think of as a "weighted number line allocation" but which almost certainly has a better name. First we find all the monsters that are native to the desired depth. Let's say they're the Snaga (population 400), Novice Warrior (population 200), and Hippogriff (population 50). Thus we assign blocks on the number line to each race: the snagas get 0-400, the novice warriors 400-600, and the hippogriffs 600-650. Then we generate a random number from 0 to 650, and generate a monster or group of monsters of the corresponding type. Functionally this means that snagas are eight times more likely to be placed than hippogriffs are, and twice as likely as novice warriors.
We can make a first pass at deriving these values by analyzing the records in monster.txt. Monsters that appear in large groups can be presumed to have a somewhat larger initial population and a high fecundity. Monsters that are listed as common (the "rarity" field, second field on the W line) have high initial population. And of course, monsters that breed explosively have high fecundity. In fact, we can generally assume that explosive breeders have a fixed population for purposes of determining allocation -- it should be impossible to extinct them.
I propose that the current "rarity" field in the monster record be replaced by these values -- initial population and fecundity. We can presume that maximum population is some fixed multiplier of the initial population -- possibly 1 (i.e. all populations start out "fully stocked").
The way I've written this, I suspect what would happen when you reach a new depth is that first you'd start encountering lots of group monsters, since they'd have the population bonus needed to ensure placement. As you kill off the groups, their populations decline, and the less populous monsters start showing up more. Eventually you should theoretically reach some vaguely steady state, where the player kills some of race A, it stops being generated so often, it gets a chance to replenish, it starts showing up more, so it gets killed again, etc.
Either that, or replenishment happens too slowly to keep up with the player's kill rate, and eventually you kill everything at your local depth. But it'd be difficult to specifically try to extinct a single race through dungeon crawling, since you need that race to be generated in order to kill it, and its generation chance goes down as its population does. You have to drive down the populations of every native race in order to flush your real target out of hiding. Alternately, you could abuse summoning spells; they should pull a valid target so long as one exists. So if you really wanted to extinct all of the hounds, say, you could scum Dwar (who has a summon-hounds spell) and kill all his summons. Eventually he'd run out of valid targets.
Conveniently, if you ignore a specific race and kill everything else, then that race becomes more common by default. Have fun with those time hounds!
What we want is twofold: first, it should be possible to extinct a race by killing enough of its members. Second, the probability of a race being generated should be a function of its population -- as you kill more of the race, it becomes increasingly less likely that you'll stumble across its members.
Let's suppose that each monster race has a total population, a maximum population, and a "fecundity" rating that drives how quickly the race replenishes itself. Replenishment happens every 10k game turns (as with store refreshes) -- each replenishment, the population is increased by a percentage, up to the maximum population. For example, a race of population 1000 with fecundity 5% would get a new population of 1000 * 1.05 = 1050. Of course population goes down every time you kill a member of the race.
When we want to decide which monsters we should generate, we do what I tend to think of as a "weighted number line allocation" but which almost certainly has a better name. First we find all the monsters that are native to the desired depth. Let's say they're the Snaga (population 400), Novice Warrior (population 200), and Hippogriff (population 50). Thus we assign blocks on the number line to each race: the snagas get 0-400, the novice warriors 400-600, and the hippogriffs 600-650. Then we generate a random number from 0 to 650, and generate a monster or group of monsters of the corresponding type. Functionally this means that snagas are eight times more likely to be placed than hippogriffs are, and twice as likely as novice warriors.
We can make a first pass at deriving these values by analyzing the records in monster.txt. Monsters that appear in large groups can be presumed to have a somewhat larger initial population and a high fecundity. Monsters that are listed as common (the "rarity" field, second field on the W line) have high initial population. And of course, monsters that breed explosively have high fecundity. In fact, we can generally assume that explosive breeders have a fixed population for purposes of determining allocation -- it should be impossible to extinct them.
I propose that the current "rarity" field in the monster record be replaced by these values -- initial population and fecundity. We can presume that maximum population is some fixed multiplier of the initial population -- possibly 1 (i.e. all populations start out "fully stocked").
The way I've written this, I suspect what would happen when you reach a new depth is that first you'd start encountering lots of group monsters, since they'd have the population bonus needed to ensure placement. As you kill off the groups, their populations decline, and the less populous monsters start showing up more. Eventually you should theoretically reach some vaguely steady state, where the player kills some of race A, it stops being generated so often, it gets a chance to replenish, it starts showing up more, so it gets killed again, etc.
Either that, or replenishment happens too slowly to keep up with the player's kill rate, and eventually you kill everything at your local depth. But it'd be difficult to specifically try to extinct a single race through dungeon crawling, since you need that race to be generated in order to kill it, and its generation chance goes down as its population does. You have to drive down the populations of every native race in order to flush your real target out of hiding. Alternately, you could abuse summoning spells; they should pull a valid target so long as one exists. So if you really wanted to extinct all of the hounds, say, you could scum Dwar (who has a summon-hounds spell) and kill all his summons. Eventually he'd run out of valid targets.
Conveniently, if you ignore a specific race and kill everything else, then that race becomes more common by default. Have fun with those time hounds!
Comment