Author Topic: Monster rework  (Read 1143 times)


  • Developer
  • *****
  • Posts: 1540
Monster rework
« on: June 26, 2017, 02:15:25 AM »
It is fairly clear that the code in OBLIGE for adding monsters into maps is not working that well, not doing the things that people expect.

So I've decided to tackle this problem now, rather than make another WIP package (actually it would have been a release candidate).

To be honest, I don't really know how the monsters can be used better.  So this thread can discuss some ideas.  I really would like a kind of scientific and objective way to evaluate how the monsters are used, so that one can say "oh yes, in this map XXX is right and ZZZ is wrong".

Notes on current systems:

(1) there is a planning process which decides, before any maps are made, which monsters will appear in which levels, and what boss fights to use on what levels.  I think it is a good system, which won't need radical changes, but does need some work.

(2) monsters are currently divided into "boss" and "non-boss" types.  The boss monsters are limited in how they are used, currently they never get used as "fodder" monsters (used freely in rooms), nor get used in cages or traps -- so that is a limitation that should be removed (assuming user settings allow maps to reach a certain toughness).

(3) each room gets a small palette of monsters for general use (generally 1 to 3, can be more, it depends on room size and user settings).

The good aspect of the small palette is that you don't end up with nearly every room having every type of monster (which in early versions of OBLIGE would happen after a certain point in a megawad).  So in theory each room can be a different experience.

The bad aspect is that selecting monsters for the palette is very random, and hence you can get the same monster being used in many rooms in a row.  Also, you can also get a rare monster appearing (by chance) more often than they should, making the whole room way too tough (or way too easy).

(4) Density : after selecting the room palette, the quantity of each monster is chosen.  Each monster has a "density" value, designed to keep the numbers of that monster high or low (relative to other monsters).  Say the "Imp" has density of 1, and the room may fit 30 imps.  The "Zombie" has a higher density, so when used in that room you may get 45 zombies.  When used together, you would get 15 imps and 23 zombies. The "Archvile" had* a very low density like 0.15, i.e. for every 6 imps you would get one archvile.  With a room with just imps and archviles, you would get 26 imps and 4 archviles.

* the archvile is now a boss monster, so is never used in rooms like that anymore

This density system does work fairly well, but tends to fail when all the monsters in the room have a low density, which can lead to a room with too many cacodemons, hell knights or chaingunners in a room.

(5) Cages and Traps : these choose another small monster palette, trying hard to avoid monsters which are already used in the room.  I think the current code for cages and traps is working fairly well and it does not need major changes.

(6) Boss fights : these are planned in advance of making maps, and use both "boss" monsters and non-boss monsters to give each level as set of boss encounters.  The toughest encounter is generally used for the exit room, and less tough encounters are used for other important rooms (mainly rooms containing a key).

Some levels are marked as being close to the end of an episode or end of the game, and for these the biggest baddest bosses are assigned (the Cyberdemon and Spider Mastermind).  But the way this is coded is kinda hacky and needs a rethink.

While this boss system works pretty well, it has some problems.  One problem is that a fairly lesser monster, like a Chaingunner, may be chosen as the end-of-level boss, but then used elsewhere in the level as "fodder", which means when you meet that monster in the exit room then it does not feel like a special encounter.


  • Developer
  • *****
  • Posts: 1540
Re: Monster rework
« Reply #1 on: June 26, 2017, 03:08:09 AM »
Notes on user settings:

(1) quantity is a separate setting to quality (strength) of the monsters.  I always thought this separation is reasonable, but now I'm not so sure.

For example, 12 hell knights is certainly tougher than 12 zombies, but if all you have is a shotgun then killing 12 hell knights is much more tedious compared to the zombies.  Hell knights are also bigger, so a room with 12 of them has less space for the player to move around than a room with 12 zombies.

The code (in V7 and earlier) basically chooses an absolute number of monsters to add into a room, ignoring the monsters' size and their health and the damage they can do.  This is probably a fundamentally wrong way to go about it (although the "density" field of monsters does help).

A much earlier version of OBLIGE, one of the 0.xx versions I think, used a system of giving each room a "toughness" quota.  Monsters were chosen and added to meet the toughness assigned to a room.  I'm sure this system had its own problems (hence why I changed it), but I don't remember exactly what they were.

There was also code to estimate how long it would take to kill a monster (with the player's current weapon set) and it would skip that monster if the time was too long, or reduce the numbers if the time was close to being too long.  Hmmm actually that still exists, but is only affecting the density calculation atm (possibly part of the reason why the density system seems to break now and then).

(2) the new "Bosses" setting -- not sure this was a good idea, as mentioned previously the monsters are currently segregated into boss and non-boss, but that needs to change and hence this setting may not make sense later on.  Though I guess the concept of boss fights will still be used, and this can be used control them (make them harder or easier).  Yet, it would be weird to have maps with very tough monsters everywhere but walk-in-the-park boss fights.

(3) Ramp Up : a good idea I think, no real issues with it

(4) Monster Control module.  Being able to control the quantities of individual monsters is nice, and I will certainly keep it.  Though it does raise some problems.

Firstly, the "level" field of monsters is used to control when to introduce monsters, naturally tougher monsters should appear later on than the easy ones.  But if a user sets a monster to be "Heaps" or "INSANE" then I reckon they will expect to see that monster earlier on -- so the module resets the "level" to 1 for settings that increase the amount.  Not ideal, but probably good enough.

Worse problem was that various bits of code was using the "level" value as an indication of the strength of the monster.  So when the level field got reset to 1, suddenly those bits of code were treating that monster as a weak one.  I have since found and fixed those bits of code, but it sucks to not have that nice number to indicate the relative rank of the monsters.

The Monster Control module also disables some other aspects of monster information, such as the minimum weapon needed.  That is something that needs a review.  I would probably go so far as to say the option names "Heaps" and "INSANE" give users an unreasonable expectation, and probably need to rename them.

(5) the "CRAZY" strength setting -- I really wonder if this is worth keeping.  The idea is simple enough, allow any monsters anywhere, but it does not seem worth having if it produces maps that are essentially unplayable.

(6) the "NUTS!" quantity setting -- it was useful for debugging, looking for places where monsters overlapped level geometry or each other -- but otherwise it is basically a joke / gimmick, and one I'm not sure it is worth keeping.


  • Posts: 64
Re: Monster rework
« Reply #2 on: June 26, 2017, 04:15:04 AM »
It's a tough situation as every player has different needs. I for example always go with massive maps with "hordes" of "weak" enemies and tons of open areas* and maximum altitude changes, so I mostly get a metric ton of former humans, imps and demon, with stuff like cacos, hell nobles and the occasional mancubus or revenant to spice things up. Within those settings, I'm generally satisfied with the results from 6.x onwards, 7.55 included.

However, those settings are right for me because I have played enough Oblige maps (and touched the sources in more than one occasion). However, some people are going to pick similar settings even in vanilla out of bravado or, interestingly, lack of estimates.

This brings me to a certain issue, that the "less, more, heaps, ..., mix it up" settings are kind of nebulous for someone who hasn't dived into the guts of Oblige like you, Glaice or myself, so I theorize they are causing a bit of confusion for casual users. I think you are doing a good job when it comes to estimating monster counts and ammo/health to fight them with relative comfort, but you probably already heard something on the lines of "I made a map with hordes of monsters and it's too hard!", which means people are expecting something else from the settings they willingly chose. Perhaps changing the option names to a numerical approximation, or adding a little display with estimated counts could help them realize the folly of their actions :P

In terms of bosses, I personally prefer maps full of grunts and difficult fights near the exit. It's only logical. Having cyberdemons everywhere building up to a mastermind boss fight would be kind of ridiculous, wouldn't it?

As for crazy/nuts monster settings, I think they got its place for certain users. If you don't feel like having it as a core option perhaps you could make them modules. You got to keep in mind that while vanilla maps have its place and are still fun on their own, a lot of users use Oblige for mods. (every time I hear of Oblige outside Doomworld it's about people using them with DoomRPG, DRL Arsenal, Brutal Doom and several other gameplay-changing mods). It makes sense if you think about it. A lot of gameplay mods add loot, money or collectibles that make random maps much more alluring than man-made maps which you can just memorize, taking away from the feeling of exploration as well.
I know, vanilla maps still have an audience, but even in the audience that only plays vanilla/boom maps, there is still a wide variety of tastes (the ones that prefer slaughterwads, the ones that prefer more classic maps, et cetera.)

Anyway I digress. In short it's not really possible to satisfy everyone, but it's perhaps possible to give them more clear, easier to understand control of what they are doing so they can figure out the exact amounts without trial and error. I think you are doing a great job about things, and a lot of people is getting drawn to Oblige even if they don't post here. It's just a matter of tweaking things a little bit.

*As I often talk about I really like urban-type areas. While 7.x does away with sub-rooms making it look less like building-like, but still kinda works. Amusingly, of all man-made maps, it's still an absurd minority, only next to jungle and island/beach maps.


  • Posts: 4
Re: Monster rework
« Reply #3 on: June 26, 2017, 06:45:44 AM »
I only have a couple comments/questions on this.

I agree that the less, more, heaps, are a little confusing. The descriptions should maybe show an actual numerical value to give you a better clue what it means.

Since you have removed the coop/single player option, are there extra monsters spawning when playing an oblige map in cooperative?


  • Posts: 111
Re: Monster rework
« Reply #4 on: June 26, 2017, 08:16:56 AM »
Here's a catch 22 as I see it; If you consider that OBLIGE accounts for enough ammo for each monster encounter (as per fight.lua and user settings), but zombies always drop ammo, then it's going to be a balance between working on the monster distribution vs. weapon and ammo placement, while still accounting for zombies. This also brings the question "Should OBLIGE bother adding the shotgun or chaingun instead of other weapons, except for in the start room?"

Now as for boss monsters, I think every fifth level could be a special type of situation, level 5 being an exception by just adding an extra horde of weaker or a few tough/hard types. Then you can consider arch viles, then masterminds and cybers or any combination thereof after that.

Now as for both scenarios, I do miss the entirety of the level being big enough for a cyberdemon to stalk you all the way back to the start room. Can you make special accommodations to the ceiling and door height to consider this for a level featuring the cyberdemon?


  • Contributor
  • *****
  • Posts: 1259
  • Veteran OBLIGE modder
Re: Monster rework
« Reply #5 on: June 26, 2017, 02:49:13 PM »
I would make up if dropping "Nuts!" to increase "Hordes" difficulty in defs.lua slightly (2.5 to 3.0) to make up for that. This is what I do to have a reasonable enemy population per level.


  • Posts: 235
Re: Monster rework
« Reply #6 on: June 26, 2017, 11:30:24 PM »
If I understand correctly, there are two issues:

1. Getting default enemy generation working as well as it can.

2. Creating an intuitive way of customising enemy generation, that produces the expected result.

One thing I have noticed is that peoples desires when it comes enemy generation falls into a few categories.
Lots of small dudes.
A mix of different scenarios (default I guess).
Tough maps with loads of monster.
Slower creepier maps.
An unending war that probably can't be won.

So maybe including a bunch of presets (which are already on other threads (though I guess they would be out dated with a new system)), and maybe an advanced button hiding all those many delicious controls.

So as for monster usage, there are two approaches I can think of.

1. A statistical approach examining the clustering patterns of enemies on human made maps.

2. Coming up with a bunch of roles that enemies are to perform, figure out where to place enemies to perform that role, and choose which enemies can perform what roles. Finally figure out when and where a particular role should be used.

Some roles are relatively straight forward, like prevent the player running through the whole map. Some roles are more subtle like cross attacking, flanking, sniping or adding projectiles into a fight (kind of fire for effect artillery type effect).  (ok I'm rambling)

In general I think the current system is fine at placing enemies. The problem with "enemy type amounts" sound like it has a lot to do with code irregularities rather than anything else.

About bosses being smaller or equal to fodder. Bosses should always be calculated relative to fodder, so maybe a finer scale of bossness (bossiness?) should be used like 0 for a pistol dude to 10 for cyberdemon. If there are no viable boss choices (either because the only bosses tougher than the fodder are not available yet, or fodder is cyberdemons and archviles), then it generates a higher than usual amount of those enemies relative to current amount.

Also, if they are not already, the bosses, and traps around important items should be linked. By which I mean the boss can spawn from the trap. In fact I think this is the way it should often be done, with closet traps being favoured in early maps and teleports in later maps.

Not sure if any of that was helpful.


  • Doom Kitty
  • Posts: 78
Re: Monster rework
« Reply #7 on: June 27, 2017, 01:27:50 PM »
I agree that the less, more, heaps, are a little confusing. The descriptions should maybe show an actual numerical value to give you a better clue what it means.

Some program GUIs have tooltips that pop up if the cursor is hovered over an option. I think it would be helpful if there was something like this on the monster quantity settings where if I selected "more" the pop-up might then display something brief like "300-400/normal size maps". Actually there are other settings in the Oblige GUI that could benefit from such informative tooltips as well, but I don't know anything about how difficult it might be to incorporate such things.


  • Developer
  • *****
  • Posts: 1540
Re: Monster rework
« Reply #8 on: June 27, 2017, 08:58:42 PM »
Thanks everyone for your thoughts, they have been helpful :)

I will make some replies later, for now I need to concentrate on sorting out the new algorithm for monster selection and quantities.

Current thoughts:

(1) Each room gets a "hp-limit" and "dmg-limit".  The sum of the HP of all monsters used in that room won't exceed the hp-limit, and sum of damage of those monsters won't exceed the dmg-limit.

OPEN QUESTION: whether cages take part in those limits or not.

Traps will not take part, since they are generally like a secondary battle that occurs after you've dealt with all the normal monsters in the room.

(2) the Quantity setting in the GUI controls the hp-limit of rooms, and the Strength setting controls the dmg-limit.  Plus some other factors, of course, like size of the room, the chosen "pressure" of the room, and the ramping up over an episode or game.

(3) remove the "prob" field of monsters, but keep and use the "density" field.  So the Monster Control module only sets the density value (at the moment it sets both "prob" and "density").

This density value will be applied to the equation in (1), basically we don't sum the raw health or damage of monsters, but instead divide those fields by the monster's density.  Hence a higher density allows the monster to be used more, a lower density causes it to be used less.

(4) the "CRAZY" strength setting basically means using all of the monsters freely, which is what happens once the game has ramped up to a certain point.  So that setting can be replaced by a "NONE" Ramp-Up setting.

(5) the room palettes will be larger and will specify more detail about how much to use each monster.  The code already has such a system for the "zone palettes" -- so that code will be repurposed for rooms and the zone palettes will go away.

(6) the roles of monsters will be made clearer and it will be explicitly planned how they change over a megawad.  For example, on "weak" strength setting the Cyberdemon may only stay as "end-of-game boss" and hence only be used once.  Whereas on the "tough" setting the Cyberdemon might start being an "end-of-level boss" and eventually become "fodder" and used freely in rooms (albeit rarely on default settings).

OPEN QUESTION: whether high-tier monsters like Archviles and Cyberdemons can be used in cages and traps *before* they become fodder.

P.S. I think this "role" concept is actually just a degree of bossyness.  So probably have a "boss_level" value with the following values:

9 = End of Game boss
8 = End of Episode boss
7 = End of Level boss
6 = Key guarder
5 = Switch guarder
4 = Item guarder
3 = Fodder, but fairly restricted
2 = Fodder, slightly restricted
1 = Fodder, unrestricted

The effective boss level would decrease over the course of a megawad.  On tough settings, even the Spider Mastermind could reach level 1 (unrestricted), but normal settings would only go down one or two steps (to level 8 or 7).

P.P.S. could also say that a monster at one boss level *can* be used at a higher level, but require double the amount.  E.g. when Archvile has become a Switch Guarder, must use two Archviles as a Key Guarder and four of them as a End-of-Level Boss.


  • Contributor
  • *****
  • Posts: 1259
  • Veteran OBLIGE modder
Re: Monster rework
« Reply #9 on: June 27, 2017, 09:28:36 PM »
Using Archviles in those square cages in the room can make them a priority target, especially when there's other monsters being used. Providing there is other cover besides around a corner, this can work well.

The Cyberdemon could start being used as occasional fodder after a certain level (maybe 13-14?), providing there's enough ammo to dispatch it and not getting trapped (IE at a key door blocking progress). Having him with groups of mid and higher tier enemies (Barons, Knights, Mancubi, Arachs, Revenants, etc) can guarantee infighting and making it easier for the player for those playing with higher monster counts such as myself.

The Mastermind just needs sufficient room to maneuver and could be a great guard monster, providing the player can BFG/rocket her to oblivion or getting infighting going.


  • Developer
  • *****
  • Posts: 1540
Re: Monster rework
« Reply #10 on: June 28, 2017, 02:46:25 AM »
Thoughts on Cages and Traps:

(1) Cages are essentially part of the battle taking place in a room, hence should be included in the HP and DMG limits.  So those limits will be higher in a room with cages than in the same room without the cages.

(2) Main difference between caged monsters and free-roaming ones is that the monsters in cages have limited mobility, they cannot walk/fly to where the player is and the player can never go where the monsters are.  Hence monsters with only a melee attack (like Demons) cannot be used in cages.

So putting boss-tier monsters in a cage is theoretically always a viable thing to do.  I think the main issue is that the boss-tier monster is like a focal point / highlight of the room, hence its cage needs to be placed in an appropriate spot (like in the middle of a large-ish unmissable area, near the thing guarded).  But caging a boss-tier monster does seem to diminish it, so such usage should not be too common.

(3) Traps probably need to differentiate between part of the room's battle, or a secondary battle.  You can imagine some room with no (or minimal) enemies in it, but then heaps of monsters pour in once you've picked up that key.  So in that case the trap is definitely primary.

When the object was guarded by some boss-like monsters, and the trap releases some fodder, then that trap is secondary and should be treated separately.  Also traps that back-fill monsters in a previous room are definitely secondary.

(4) Primary traps may contain the boss monster(s) for the room.  This may work best for traps that are triggered on the way to getting the item or pressing the switch.  Again such a situation should not be overused.

Secondary traps probably should never contain the boss/guard monsters of a room.  Though conceivably you could release the same kind of boss for the back-fill situation (where a player must backtrack through a room).


  • Doom Kitty
  • Posts: 78
Re: Monster rework
« Reply #11 on: June 28, 2017, 06:42:45 AM »
I think these all will be good changes. One of the things I find most impressive about Oblige (aside from the fact that it draws up maps better than some humans) is the fact that it offers users the ability to fine-tune generated maps to their skill level and prefered playing style. Making the monster options even more defined will be definite progress. Andrew, you're obviously an experienced player so I'm sure we can trust your judgement on these things.


  • Posts: 235
Re: Monster rework
« Reply #12 on: June 28, 2017, 01:55:41 PM »
That all sounds very sensible. Is it worth adding a bit to the hp-limit for the number of enemies in a room, as most weapons can hit and pass through multiple enemies, or is that too fine a detail.

Also you mentioned a none option for ramping. Does that mean that currently, steeper ramping reduces the early difficulty. I just assumed that it made the end harder.

As for putting top tier monsters in cages. Well I'm not the biggest fan of cage monster, but, it might be cool to have different cage prefabs for bosses. I like the idea of a large mid room cage (Silence of the lambs style), but maybe either with a trap release that can release the monster, or have the key or switch in the cage with the monster and have a switch to open the cage. Generally if I can help it, I avoid killing cage monsters (especially non-hit-scan monsters with high hp) and saving my ammo (and time), so if you put a cyberdemon in a cage, it will have to be well placed, to make it's more dangerous to ignore than kill.

If quantity controls hp-limit and strength controls dmg-limit, I'm not sure its possible to make a small dude filled wad. In fact these settings will control fight length and enemy burst damage potential.

So, low-hp, low-dmg will create low numbers of weak enemies. ok
High-hp, low-dmg will use lots of demons I guess, or few cacodemons, possibly rooms full of pistol guys, and defiantly some pain elementals.
Low-hp, high-dmg will create moderate levels of chaingunners, shotgun guys, occasional revenants ect.

Actually I think its fine, I'm trying to think of a popular style/combo of enemies that you just couldn't get from this system. Maybe there might need to be a control for the general number of monsters used, maybe not. I do think a system like this might improve the variety of fights without getting anything stupid.


  • Posts: 235
Re: Monster rework
« Reply #13 on: June 28, 2017, 09:09:20 PM »
Ok I just had a thought. The HP-limit/DMG-limit is a (probably) great way to control enemy usage internally, but I don't think they make ideal controls for the user.

Lets put the enemies in some (what-I-think-off-the-top-of-my-head are) useful categories.

Weak Squishies :
Pistol and shotgun guys, imps, lost souls. Maybe demons.

Dangerous Squishies :
Shotgun guy (again), chaingunner

Heavies :
Cacodemon, knight, baron, mancubus, revenant, arachno-thing. Demons (maybe again).

Unfair b***s**** (which is why I love Doom) :
Archvile, pain elemental, cyberdemon, mastermind.

I guess these might be the general categorise of enemies that people might want to control (other than specific enemy hate). And the most user-friendly choices would be :

A lot per map
A few per map
In most maps
Few times per episode
Once per episode
A few

It would probably be necessary to separate cyberdemons and masterminds from archviles and pain elementals. Those options are probably too specific.


  • Contributor
  • *****
  • Posts: 1259
  • Veteran OBLIGE modder
Re: Monster rework
« Reply #14 on: June 28, 2017, 10:38:55 PM »
I'd put the Barons and two bosses in the super-heavy category between heavies and unfair bullshit.