Request for information surrounding complex monster behaviors

Discussion on running your own board and editing MajorMUD.
Post Reply
cuckoorules
Posts: 88
Joined: Fri Mar 30, 2012 9:38 pm

Request for information surrounding complex monster behaviors

Post by cuckoorules »

I apologize in advance if this information exists in other threads, but I didn't see anything concise that touched on all of the topics. A little personal background, I've been doing maintenance/fixing up some MudRev dats for about 5 years now to help me learn my way through editing and how everything works (I also have a formal programming background). I'm now at the point where most of the "problems" are fixed and I'm finally ready to venture forward into adding new content. I'm very much comfortable and familiar with different abilities, spells, items, textblocks, yada, yada.. but what I have not touched hardly at all (other than fixing or tweaking a few) is MONSTERS.

I understand how to set up monster attacks and the basics, but what I'm interested in is more of the complex behaviors such as groups, spawning, type, etc.

Here are the group options provided in NMR:
Lair
Wanderer
NPC
Living
Random
Guard
{Group #}
Arena
Angel
Quest
Other

I'm guessing that most if not all of these have hidden/special functions.
I've been told that the Wanderer group will roam across groups, but as I understand it no monster will ever cross a map.
Lair is for spawning monsters, but you can also have a placed NPC so why is there also an NPC group?
I've been told Angel will despawn if they lose their target, though the targetting algorithm is something else I know nothing about.
Guard causes monsters to attack evil players no matter what, even if they are set to alignments such as Neutral or Good that would otherwise typically not attack an evil player. Also causes the weird pacing behavior.
I know nothing about the others nor whether what I stated above is accurate.

We also have Type:
Solo
Follower
Leader
Stationary (this one is pretty obvious)

I assume Follower and Leader have to do with when the leader follows a player the followers follow that leader monster, if its in the same group maybe? but that's a complete guess. Anyone know how this actually works? I'm thinking of warlock bandits and the such with the example I just painted.

Also, if you know anything about maximum MR on a monster and if the Antimagic allows it to increase beyond typical max like for a Witchie or if there are limitations, that'd be good to know. Similarly, with BSDef, is there some sort of rough formula here that if you know a players BSAccu you can figure out what you would want to use as a BSDef value to make it reasonable hard to hit? If anyone can shine any insight around that at all, also appreciated.

Can you do anything with the create spell beyond summon other monsters? I tried and wasn't having much luck. Just curious if anyone succeeded.

I've noticed some things like healing spells on monsters have no impact if added as a between round spell but if you add a healing spell as an "attack" spell for the monster, it actually does heal the monster. Does anyone have information around what sorts of things do/don't work in the between rounds spells for monsters buffing themselves? I suspect a lot of it has just been for show, as dark priest is an example of a stock monster with a between round heal that would have never been doing anything ever but adding some dynamics to the game.

I also read in another thread that monsters only check to remove spells every 6 rounds, can anyone confirm this is accurate?

I can confirm via testing that a monster will not swing at a single player more than 6x in a round even if it possesses the energy to continue swinging (if that is the only player in the room), however if a second player enters the room, the monster effectively gets a second round of 6 more swings that seem to actually almost process as a separate round (it has the option to change target, or swing 6 more times at the player who couldn't have been swung at 12 times until the 2nd player entered the room.... this monster does have 2000 energy/rnd, so that could be coming into play here and I believe it's typo Solo.

This gets into monster targeting. Does anyone have ANY information on how it works? I've heard rumors about charm having some impact, etc. Obviously most monsters you can attack-last and they will allow you to tank, however the weird dynamic behavior above somewhat allows you to create monsters that circumvent this in a very spam-riddled way. Another thing I noticed is that it seems that you can only have a monster protected by one other monster. I tried making a monster guarded by 2 other monsters and it actually caused it to stop working entirely.

Finally, getting into adding the monsters to the rooms themselves....

What is the Delay for? Does anyone know if there is any way to semi-control the "random" spawns in an area?

For Room Type:

What is Arena? Does it do anything? (The Arenas are actually Collisseum)
Same thing about Hotel, Jail, Library. Do these have ANY known function?

Also, has anyone experimented with trying to spawn monsters inside an Arena (Collisseum)? I know obviously a placed NPC or textblock summons would work, but curious if you can get actual monster areas to happen in an Arena setting, similar to maybe some sort of Quest tournament area or something.

Mostly on a tangent here but is there any information on how heavily your illumination affects your accuracy? Is there a cap or is it just diminished rewards or is it just a flat penalty for dimly lit, cannot see, etc? I know some monsters use Illu -9999 (aged earth dragon blind globe), so I'm guessing it's some tiered system or a flat penalty like the encumberances.

Also, what causes monster loading? There are monsters like hanging tree that most people don't even know have 4 spawn rooms, but he seems to almost exclusively spawn in the same room every time. However, if you lower the regen and kill him more often, he'll start showing up in the less known rooms. Similarly, other monsters on MudRev have special NPC rooms but spawn as part of "normal" rooms instead. Is it because those room#s load first? Any theories here? It's fairly consistent that they're almost always in one spot versus another -- even with "roaming" NPCs (where they have multiple placed locations but limit 1 monster) -- they seem to have a "favorite" spot.. i.e. something gets hit first in the database and says yep they are gunna load in this room since it's available and since it always processes the same order? Also, does anyone have any clue how the game tracks limited monsters with respawn times that have a limit > 1? (Scarecrow)

Anything else I missed that you think will be helpful to me or ANYONE trying to decipher all of these complex behaviors and actually design something instead of just jamming stuff in blindly, just say it, ask it, let's build this thread up from what we do know! If you've heard something but aren't SURE, please try to state as such, since it's still helpful to know the theories and what might be worth testing.
Last edited by cuckoorules on Sun Jan 22, 2017 10:03 pm, edited 1 time in total.


User avatar
syntax
Site Admin
Posts: 517
Joined: Tue Jun 02, 2009 10:02 am

Re: Request for information surrounding complex monster behaviors

Post by syntax »

Unfortunately I have nothing to help you as most of what I remember is more speculation at this point.


User avatar
BearFather
Posts: 652
Joined: Sun Feb 09, 2014 6:27 pm
Location: Portland, OR
Contact:

Re: Request for information surrounding complex monster behaviors

Post by BearFather »

Well here are my thoughts, mostly from playing and observing I'm way too lazy to do actual testing. So if I say something that is utterly wrong tell me so I can adjust my memory. Now a lot of knowledge is from 15+ yrs ago when I actually played and studied the game.

NPC group they will be non hostile and won't attack. Almost sure they can't be attacked.

The Solo group are actually harder then normal mobs of the same stats. Not sure why just what I have noticed, a lot stock boss's have solo as there type. The leader and follower effect targeting as in the followers tend to attack what the leader is attacking(this is total just from watching no hard facts, please correct if wrong).

BSDef if I can remember right its bsacc-bsdef+roll=bs chance.

I know I have used between rounds to fire a textblock to spawn mobs and have done spells like knockdown and chain lightning, great way to give a fuck you to the players.

I believe they check every 3-4 rnds not 6. But might be wrong there was a discussion recently about this, thought on here but I know for sure it was also discussed on FB, good luck searching.

I remember a discussion about mob targeting couple years back and It was almost completely random, the attack-last is the only thing that influenced it. And only a small percent really.

The delay for rooms is the respawn delay for that area if it's a control room. So if set to 5, means the area has a 5 min delay, so after you kill all mobs(max) it wont respond till 5 min after the timer was triggered. And the control room is what starts the timer for the most part. It gets real complicated with the control room and timers. Cause the killing the mob also effects the timer also how many have been spawned effects it blah blah blah.

Shit I saw one forum post on another forum once that explained it but room light effects accuracy. And it goes with the room is dimly lit and what not. So being completely blacked out is a bad thing for your accuracy, of course I dont remember the numbers. Almost wanted to say it was a set number you loose or gain like the party ranking.

Mobs will spawn near where you are, and since mega takes you to that one hanging tree spot he's there, and since it's more active around that area up top he's more likely to spawn there...but if you were to goto one of the 4 spots he would spawn there if not already spawned. And as far as "roaming" mobs it's about what area, and believe the lower number effects how the game parses it, but really on how it's connected really to the room that triggered the spawn. So mobs tend to spawn in the same few rooms cause that the area that's more traveled, like mamba he spawns up by the tree a lot cause that's where people are.

Like I said most my shit is from just playing the game and knowing stats and watching outcomes. Before I quit 15 yrs ago I knew a lot about the stats and not the mechanics of the code. I knew what numbers where and watched the outcome and the differences. We didn't have fancy tools like nightmare(damn whipper snappers), so it was a lot of theories, that I have backed up since starting to edit.

Ok I'm high and done rambling now.


DeathCow
Posts: 14
Joined: Tue Aug 07, 2012 12:58 am

Re: Request for information surrounding complex monster behaviors

Post by DeathCow »

This is a stupidly long post, so I'm just gonna answer it a chunk at a time, sorry if I miss some call back to an earlier section, but its much easier to answer 1 question at a time.
cuckoorules wrote:
I'm guessing that most if not all of these have hidden/special functions.
Some of them do, but most of them were just named for organizational purposes.
I've been told that the Wanderer group will roam across groups, but as I understand it no monster will ever cross a map.
Its probable that wanderer is intended to roam, its also possible since no monster was ever added to the group, the code for that function doesn't exist. Either test it or don't use wanderer
Lair is for spawning monsters, but you can also have a placed NPC so why is there also an NPC group?
The room type and monster type for Lair are different things. Long ago 'lair rooms' worked differently the lair group was used to make monsters roam a section of map labeled as a lair.
I've been told Angel will despawn if they lose their target, though the targetting algorithm is something else I know nothing about.
Angel monsters will despawn, yes. If they have no target when their hp tick occurs they will despawn.
Guard causes monsters to attack evil players no matter what, even if they are set to alignments such as Neutral or Good that would otherwise typically not attack an evil player. Also causes the weird pacing behavior.
The pacing behavior is based on the guard group and the patrolable bitmask
We also have Type:
Solo
Follower
Leader
Stationary (this one is pretty obvious)
This only effects how monsters move. A solo monster rolls his follow rate alone. A Leader rolls his attempt alone. A follower will roll his attempt alone, unless there is a leader in the room. If there is a leader a follower will not roll and will only follow if the leader does, and will always follow if he does. Stationary never makes a follow roll.
Also, if you know anything about maximum MR on a monster and if the Antimagic allows it to increase beyond typical max like for a Witchie or if there are limitations, that'd be good to know. Similarly, with BSDef, is there some sort of rough formula here that if you know a players BSAccu you can figure out what you would want to use as a BSDef value to make it reasonable hard to hit? If anyone can shine any insight around that at all, also appreciated.
BSdef is used instead of perception for monsters.
Can you do anything with the create spell beyond summon other monsters? I tried and wasn't having much luck. Just curious if anyone succeeded.
What?
I've noticed some things like healing spells on monsters have no impact if added as a between round spell but if you add a healing spell as an "attack" spell for the monster, it actually does heal the monster. Does anyone have information around what sorts of things do/don't work in the between rounds spells for monsters buffing themselves? I suspect a lot of it has just been for show, as dark priest is an example of a stock monster with a between round heal that would have never been doing anything ever but adding some dynamics to the game.
Healing spells work, they just don't work how you'd like them too. A monsters hp total is only updated during the combat round, or once every 6 rounds during a heal tick.
I also read in another thread that monsters only check to remove spells every 6 rounds, can anyone confirm this is accurate?
Yes monsters only update their spell effects when they are considered active(a player is in the 'area') and when their hp tick occurs.
I can confirm via testing that a monster will not swing at a single player more than 6x in a round even if it possesses the energy to continue swinging (if that is the only player in the room), however if a second player enters the room, the monster effectively gets a second round of 6 more swings that seem to actually almost process as a separate round (it has the option to change target, or swing 6 more times at the player who couldn't have been swung at 12 times until the 2nd player entered the room.... this monster does have 2000 energy/rnd, so that could be coming into play here and I believe it's typo Solo.
Monsters and players(players have an additional 5 swing max hardcoded in 1.1a) max at 6 swings per 1000 available nrg. Monsters have a sub routine called like Mob_can_attack that fires when movement occurs in the same second as a combat round. This routine takes place outside of a normal combat round, and it generally looks similar to regular combat, it only fires for the oldest living monster in the room.
This gets into monster targeting. Does anyone have ANY information on how it works? I've heard rumors about charm having some impact, etc. Obviously most monsters you can attack-last and they will allow you to tank, however the weird dynamic behavior above somewhat allows you to create monsters that circumvent this in a very spam-riddled way. Another thing I noticed is that it seems that you can only have a monster protected by one other monster. I tried making a monster guarded by 2 other monsters and it actually caused it to stop working entirely.
Monsters that are generated by a room pick their target when they are attacked. So the *last* person to attack will always be the target. However room generated monsters will also pick a target when their hp tick occurs, You can circumvent this 'random' element by spamming "A" and 'reattacking' after the HP tick and before the combat round fires. Monsters spawned by a spell always pick the target of the spell as their initial target. In many cases this is the party leader since he's the first one in the room. This type monster will pick a new target when his target 'moves' or 'dies' or when they have their hp tick. Sys_gotos mess with the moves, stupid negative hps mess with the 'dies'. And yes, monsters are only guarded by the first monster listed.

Finally, getting into adding the monsters to the rooms themselves....
What is the Delay for? Does anyone know if there is any way to semi-control the "random" spawns in an area?
Delay is a number of minutes it takes for a room to spawn a monster, Its used used in conjunction with control rooms.

What is Arena? Does it do anything? (The Arenas are actually Collisseum)
The new haven arena, or the small golems in early 1.0 are an example of this
Same thing about Hotel, Jail, Library. Do these have ANY known function?
these do nothing
Also, has anyone experimented with trying to spawn monsters inside an Arena (Collisseum)? I know obviously a placed NPC or textblock summons would work, but curious if you can get actual monster areas to happen in an Arena setting, similar to maybe some sort of Quest tournament area or something.
You'd be better off using a textblock like the invasions for such a thing. monster spawning works like a 'normal' type room in collisseum.
Mostly on a tangent here but is there any information on how heavily your illumination affects your accuracy? Is there a cap or is it just diminished rewards or is it just a flat penalty for dimly lit, cannot see, etc? I know some monsters use Illu -9999 (aged earth dragon blind globe), so I'm guessing it's some tiered system or a flat penalty like the encumberances.
You have -3 acc for dim, and an additional -1 each stage of lightning. At +5000 illu I think you get -20 acc. there is a large chunk of code, mostly unused for blindingly bright areas.
Also, what causes monster loading? There are monsters like hanging tree that most people don't even know have 4 spawn rooms, but he seems to almost exclusively spawn in the same room every time. However, if you lower the regen and kill him more often, he'll start showing up in the less known rooms. Similarly, other monsters on MudRev have special NPC rooms but spawn as part of "normal" rooms instead. Is it because those room#s load first? Any theories here? It's fairly consistent that they're almost always in one spot versus another -- even with "roaming" NPCs (where they have multiple placed locations but limit 1 monster) -- they seem to have a "favorite" spot.. i.e. something gets hit first in the database and says yep they are gunna load in this room since it's available and since it always processes the same order? Also, does anyone have any clue how the game tracks limited monsters with respawn times that have a limit > 1? (Scarecrow)
Monsters will spawn if they can when you enter a room. If cleanup spawns them, it will spawn them in the lowest record number because it starts at room 1 then room 2.. and cycles through them. as for scarecrows Monsters are kept in the active monster database until they are over written.


cuckoorules
Posts: 88
Joined: Fri Mar 30, 2012 9:38 pm

Re: Request for information surrounding complex monster behaviors

Post by cuckoorules »

Its probable that wanderer is intended to roam, its also possible since no monster was ever added to the group, the code for that function doesn't exist. Either test it or don't use wanderer
I had thought that Shrefwan the Alchemist was coded this way (and he is) but the entire area is coded as group Wanderer also, so you're right. It may just be another label. However, Shrefwan has a 0% follow rate and has moved one room outside of his lair, meaning that he definitely is doing some form of Wandering. Other monsters in the Wanderer group in the same area that DO have a follow rate follow as expected, and their "wandering" may be unnoticed. I am fairly certain monsters won't cross maps, even if the same monster exists on the next map and it is configured the same. I can confirm this from experience. This was likely because maps generally were used for new modules, which wouldn't much make sense to have monsters follow you into a module they previously didn't even exist in.

So really it seems like the only known special behaviors are for Angel (despawning which seems to be used for summoned monsters like greater hellion, etc) and Guard which will always attack evil players no matter what and can be used to cause the obnoxious pacing behavior.
This only effects how monsters move. A solo monster rolls his follow rate alone. A Leader rolls his attempt alone. A follower will roll his attempt alone, unless there is a leader in the room. If there is a leader a follower will not roll and will only follow if the leader does, and will always follow if he does. Stationary never makes a follow roll.
Any idea what the implications would be of having multiple Leaders in the same area? Or just don't do it/test it? (feel free to shout examples of this if someone knows of one)
BSdef is used instead of perception for monsters.
Do you know anything about perceptions other functions (if any)? I am curious if it ties into Accuracy at all, as it seems that would make sense to me. Accuracy itself should probably be a separate thread. Maybe I'll make one. There's a whole lot to that and I'd like to gather information on that as well, since there is also a secondary defense I understand very little about.
Can you do anything with the create spell beyond summon other monsters? I tried and wasn't having much luck. Just curious if anyone succeeded.
To elaborate on my original query, what I meant was I've only seen the Create Spell when a monster spawns used for summoning additional monsters or poisoning/casting a duration damage spell on the monster. Is there any way to re-route this to target at the player and fire a textblock to look for items in the room or anything like that? Obviously monsters weren't built to be able to process textblocks, so you can't just fire a textblock at a monster on a spell, even if the textblock pertains to checking things in the room. Was just curious if anyone had used this for ANYTHING beyond summons and making monsters auto-die after a duration of time via various methods.
Healing spells work, they just don't work how you'd like them too. A monsters hp total is only updated during the combat round, or once every 6 rounds during a heal tick.
I disagree with this, but I may be wrong. I had a whole adventure trying to make an invincible practice dummy and adding a 9999 heal between rounds seemed to have absolutely no impact, whereas adding that spell as a combat spell during the round worked fine, with the caveat that no spell cast message is displayed since it is a self spell being cast on a monster. It does heal though confirmedly. I am skeptical that between-round healing EVER takes effect on a monster, even in a delayed fashion. Feel free to dispute if you think I'm wrong, but this is something I worked on for a long time.
Monsters and players(players have an additional 5 swing max hardcoded in 1.1a) max at 6 swings per 1000 available nrg. Monsters have a sub routine called like Mob_can_attack that fires when movement occurs in the same second as a combat round. This routine takes place outside of a normal combat round, and it generally looks similar to regular combat, it only fires for the oldest living monster in the room.
I can confirm at least using a mudrev DLL that you can use EnergyLevel +200 to add a 6th swing back to players. I do not know if any special dll changes or anything were necessary for this. It is on a mystic spell and I have seen it work with my own eyes. I have not tried to extend the 6th player swing elsewhere to any thorough degree. The spell is called mystical fury and should exist in any copy of mudrev dats should you or anyone else be curious. I also noticed that monsters with more than 1000 energy/rnd seem to also get to use their between round spells multiple times when you add the extra players, so as I mentioned it truly appears like they're processing entire extra rounds, but with a limitation based on how many players are in the room. Very curious what would happen with strange numbers of energy/round like 1333 or something and between round spells, where every 3 rounds you get a 2nd between round spell cast? Possibly some dynamics here that haven't been explored deeply. Monster dragoon emissary on mudrev has 3000 energy/rnd and casts only one spell between rounds. When you go in with a party, you can see it doing the between round spell 3 times, but it's a healing spell...which has no impact as mentioned above since it's between rounds :)
Monsters that are generated by a room pick their target when they are attacked. So the *last* person to attack will always be the target. However room generated monsters will also pick a target when their hp tick occurs, You can circumvent this 'random' element by spamming "A" and 'reattacking' after the HP tick and before the combat round fires. Monsters spawned by a spell always pick the target of the spell as their initial target. In many cases this is the party leader since he's the first one in the room. This type monster will pick a new target when his target 'moves' or 'dies' or when they have their hp tick. Sys_gotos mess with the moves, stupid negative hps mess with the 'dies'. And yes, monsters are only guarded by the first monster listed.
Any confirmation or denial about the influence of Charm or is that purely rumor or you just simply aren't sure one way or the other?
You have -3 acc for dim, and an additional -1 each stage of lightning. At +5000 illu I think you get -20 acc. there is a large chunk of code, mostly unused for blindingly bright areas.
Yes, I stumbled upon the BlindingLight ability which I thought I could hijack for a quest ability or some such thing as it appeared to be functionless, but it does indeed cause players to go blind when large areas of RoomIllu are present. I've tested it myself with the Sunstones on mudrev that give +500 RoomIllu and I think as soon as like 3 players were in TS, the player with that ability went blind. It was totally bizarre and puzzling and I just stopped using the ability. I suppose they were going to maybe work on areas that are HIGHLY illuminated and cause you to go blind anyways, perhaps that ability was also some remnant of whatever idea they were toying with. There is some functionality existent here if anyone wants to try to somehow use it for something. I couldn't think how it would be useful since you could just make a user blind using normal conventions (blind or -illu).

Does having positive illu give any accuracy BONUSES, or is it simply avoiding the penalties from room light?
Monsters will spawn if they can when you enter a room. If cleanup spawns them, it will spawn them in the lowest record number because it starts at room 1 then room 2.. and cycles through them. as for scarecrows Monsters are kept in the active monster database until they are over written.
This seems to make sense. I also noticed since writing this some of the most predictable areas for "roaming" bosses were just designed incorrectly on mudrev and each room has a placed NPC of that monster (and just lots of options) rather than being a portion of the possible monsters to spawn in that room as just "regular" monsters. Other areas where it was done as a spawn of the actual room and not with placed NPCs all over seem to function in a more "random" fashion as I believe was intended. As for the Scarecrow example, I realized someone had edited his game limit to 4 on mudrev and that was not a "stock" thing. It did appear to be semi-functional but I would say generally speaking it is difficult to manage and seemed a little wonky and is easier to just make multiple 1hr regen bosses that are identical probably, if you needed to accomplish something like that.


I had also asked if you knew if the monsters have a MR cap similar to players, and again similar to players if the AntiMagic ability somewhat/entirely lifts this cap?

Lastly, I'd love to chat with you/run some queries by you about what you know about accuracy vs defense and secondary defense, but perhaps that should be a separate thread as there's a lot covered here already. Also, thank you as you already answered a ton of things and reminded me of a few I already knew but had forgotten. And now it's in writing :)


Post Reply