Announcement: Be excellent to each other.


Caravel Forum : Caravel Boards : General : Monster Movement Clarification
Page 1 of 3
23
New Topic New Poll Post Reply
Poster Message
masonjason
Level: Smiter
Avatar
Rank Points: 349
Registered: 12-29-2003
IP: Logged
icon Monster Movement Clarification (0)  
Most of us know the general rules for the behaviour of the monsters in DROD, but I for one have always been curious about the details. So, if it's convenient, I'd like someone who knows to answer the following questions.

Roaches: What criteria do they use for deciding which square is closest to Beethro? What are their directional preferences?

Queens: Same as above, plus: how do they move when brained? Why are they so unpredictable?

Wraithwings: What exactly are their conditions for attacking?

Snakes: These are really unpredictable. Any explanation of how they decide where to go would be welcome.

Goblins: They can find their way around some obstacles unbrained, but how is this determined?

Brains: How and why does a brain mean different monster movement in open spaces?

If anyone else has any questions to add to this, feel free. Thanks.

____________________________
Eighty people came to the bazaar.
03-12-2004 at 11:00 PM
View Profile Send Private Message to User Visit Homepage Show all user's posts This architect's holds Quote Reply
The_Red_Hawk
Level: Smitemaster
Rank Points: 783
Registered: 09-02-2003
IP: Logged
icon Re: Monster Movement Clarification (+3)  
masonjason wrote:
Most of us know the general rules for the behaviour of the monsters in DROD, but I for one have always been curious about the details. So, if it's convenient, I'd like someone who knows to answer the following questions.


I'll try to answer as best as I can, but I'm sure that there are others who could explain it better.

Roaches: What criteria do they use for deciding which square is closest to Beethro? What are their directional preferences?


Non-brained, they move diagonally until they are horizontal or vertical to him, then go straight. Brained, they do the opposite - go horizontal, then move diagonally for him. However, this changes as necessary when obstacles are in the way.

Queens: Same as above, plus: how do they move when brained? Why are they so unpredictable?


The non-brained part that they simply move diagonally away. However, brained, I have no clue. They do seem to move to places where they can produce the most offspring, though.

Wraithwings: What exactly are their conditions for attacking?


A solitary one will never attack. They only move closer if there is another of at least equal distance away from Beethro coming from an opposite direction. I don't know the specifics, though.

Snakes: These are really unpredictable. Any explanation of how they decide where to go would be welcome.


They usually head towards Beethro, but since they move only horizontally and vertically, they alternate their preferences. For five turns it will move horizontally, then the next five it will move vertically towards Beethro. When brained, they alternate every turn. If Beethro is directly behind its head, it goes straight, because it doesn't know which way to turn. However, sometimes a serpent will turn away, and I don't know why.

Goblins: They can find their way around some obstacles unbrained, but how is this determined?


I think they can only be one-square obstacles, but I'm not sure.

Brains: How and why does a brain mean different monster movement in open spaces?


See the description for roach behaviour.

If you already know this, sorry, but that's the best I can do. Hope this helps.

____________________________
Slashing, whirling, diving, twirling,
Snapping, turning, rising, swirling,
Screeching, flipping, gliding, sliding,
The red hawk's dance of death.

.....the king of the skies.....
03-12-2004 at 11:21 PM
View Profile Send Private Message to User Send Email to User Show all user's posts This architect's holds Quote Reply
swann_88
Level: Delver
Avatar
Rank Points: 87
Registered: 06-29-2003
IP: Logged
icon Re: Monster Movement Clarification (+1)  
only a minor amendment from me
wraithwings will move closer if there is another wraithwing already closer or equal distance in any of the 8 possible directions not just opposite when directly opposite the game seems to miscalculate by one square a wraithwing 2 squares away on the left can bring one on the right within 1 square of beethro

as for the queens I really wish I could figure out where the brains make them stop they seem to stop them where they can generate the most roaches up to a certain total per spawn (30?)
then left them run off to corners as long as that total is maintained
03-13-2004 at 12:22 AM
View Profile Send Private Message to User Show all user's posts Quote Reply
bibelot
Level: Smiter
Rank Points: 322
Registered: 07-11-2003
IP: Logged
icon Re: Monster Movement Clarification (+12)  
Here's how nonbrained monster movement works:

Monsters in a given room do not move simultaneously; there is a set order in which they move. Monsters that have not been spawned move in the order that they were placed when the room was created. Monsters that have been spawned move after all monsters that have not been spawned and move in the order that they were created. (More about this below.) Mimic placement occurs at the end of the turn, growth of tar immediately before that. Mimics move in the order they are placed, and they always move after Beethro but before other monsters. Invisibility goes into and out of effect before monster movement.

Roaches, spiders, tar babies, awoken evil eyes:

These monsters determine which of the eight adjoining squares is closest to Beethro and attempt to move there. If that square is inaccessible and the move was horizontal, the monster does nothing; if the move was diagonal, however, the monster will try to move vertically closer to Beethro and then horizontally closer. If neither is possible, the monster does nothing.

Roach queens:

Queens determine which of the eight adjoining squares is closest to Beethro and attempt to move in the opposite direction; if it is blocked, she will try to move vertically away. If she cannot, then she tries horizontally away, and if she cannot, she does nothing. On her spawning turn, she also lays eggs on every blank square in each of the eight directions from her in the order of NW, N, NE, W, E, SW, S, SE (this is the order in which the roaches will hatch and move; they will be fully hatched on their fifth turn on the screen and move the turn after that.) A roach queen will not spawn if she cannot smell Beethro after she moves.

Wraithwings:

Wraithwings do not know the Pythagorean theorem; they determine distance by taking the maximum of horizontal and vertical distance. On a wraithwing's turn, it first calculates the distance from itself to Beethro, call it d. If d>5, it will move closer to Beethro like a roach. If d is at most 5, however, it will look at all the other wraithwings in the room. For each such wraithwing, it calculates that wraithwing's distance from Beethro, call it d2, and that wraithwing's distance from itself, call it d3. If for some other wraithwing, the absolute value of d-d2 is at most 2 and d3 is at least 3, it will attack Beethro like a roach. Otherwise, if d=5 it will freeze, and if d<5 it will flee like a roach queen.

Serpents:

A serpent first checks to see if Beethro is directly in front of or behind its head. If he is, the serpent continues moving in that direction. It also has an internal counter; the first five turns it prefers horizontal movement, the next five it prefers vertical, and then this repeats. The serpent picks a square into which it wants to move; if it is thinking horizontally, then it picks which of the two squares horizontally adjacent to its head is closer to Beethro. If it is in the same vertical column as Beethro, it picks which of the two vertical squares adjacent to its head is closer to Beethro. Note that the square it picks may be occupied by a wall or the serpent's own body. If it is thinking vertically, it does the same thing but looks at the vertical squares first, then the horizontal squares. The serpent then tries to move into the square that it has picked. If that square is blocked, the serpent tries to move N, then E, then S, then W. If it can't move into any of those squares, its tail shrinks by one square. Serpents will always try to move unless its head is outside of smelling range when Beethro is invisible, in which case it will only move if a brain is within smelling range of Beethro.

Goblins:

Goblins calculate distance using the Pythagorean Theorem. When deciding to move, they assign a score to each of the eight adjacent squares that it can enter. The highest number goes to a square that contains Beethro. The lowest number goes to any other square that is adjacent to the sword. Any other squares are assigned numbers in terms of their distance from Beethro; closer squares get higher numbers. The goblin then picks its movement square as follows. It keeps a running tally of the square with the highest score that it has found and goes through the squares in the order NW, N, NE, W, its own square, E, SW, S, SE. If the square it is looking at has a score that is strictly better than the best score so far, that square becomes the square with the best score. The goblin then moves in the best direction.

Tar mothers:

Tar mothers do not move (except blinking and getting scared.) The spawning of tar goes as follows. At the end of any spawning turn for the tar mother, any blank square (or trapdoor, open door, checkpoint, or sword) that is adjacent in one of the eight directions to a square that has tar will be filled with either tar or a tar baby the following turn (unless a tar baby would be formed under a sword, in which case it is immediately killed.) Tar blobs will form in those squares in which it can be part of a 2x2 square of tar; all other tar squares will turn into tar babies. A tar square can be stabbed if it is a side of a 2x3 block of tar, and the other square orthogonally adjacent to it is empty. The room squares are ordered from left to right across the top row, then left to right across the second row, down to the bottom row. When tar is stabbed (possibly by multiple swords), the game records which squares have been legally stabbed and are to be removed. Then, in reverse order in which the stabs were made (which is dependent on mimic order), that square is removed and tar babies are formed. Immediately after the removal of a stabbed tar square, the babies resulting from that stab are added in their order according to room position. On the other hand, when babies are formed from a tar mother spawn at the end of a turn, the babies are added in reverse order with respect to room position.

Brains, sleeping evil eyes:

They don't move.

[Edited by bibelot on 03-14-2004 at 07:25 PM GMT]
03-13-2004 at 01:13 AM
View Profile Send Private Message to User Show all user's posts This architect's holds Quote Reply
TripleM
Level: Smitemaster
Rank Points: 1373
Registered: 02-05-2003
IP: Logged
icon Re: Monster Movement Clarification (0)  
One more question about order of things moving being when they are placed in the room - see Ricky's dungeon, 2S2W.
If I hit the bottom right orb with a mimic the instant I place the mimic, the roach doesn't move. However, if I place the mimic then hit the orb at least one move later, the roach moves that exact move. I got slightly confused by that.
03-13-2004 at 03:06 AM
View Profile Send Private Message to User Show all user's posts Quote Reply
The_Red_Hawk
Level: Smitemaster
Rank Points: 783
Registered: 09-02-2003
IP: Logged
icon Re: Monster Movement Clarification (0)  
That sounds like a bug. I'll let someone else have the final word on that though.

____________________________
Slashing, whirling, diving, twirling,
Snapping, turning, rising, swirling,
Screeching, flipping, gliding, sliding,
The red hawk's dance of death.

.....the king of the skies.....
03-13-2004 at 03:08 AM
View Profile Send Private Message to User Send Email to User Show all user's posts This architect's holds Quote Reply
bibelot
Level: Smiter
Rank Points: 322
Registered: 07-11-2003
IP: Logged
icon Re: Monster Movement Clarification (+1)  
TripleM wrote:
If I hit the bottom right orb with a mimic the instant I place the mimic, the roach doesn't move. However, if I place the mimic then hit the orb at least one move later, the roach moves that exact move. I got slightly confused by that.

That's because mimic placement occurs after monster movement (including tar growth), even though mimic movement occurs before monster movement.
03-13-2004 at 03:09 AM
View Profile Send Private Message to User Show all user's posts This architect's holds Quote Reply
bibelot
Level: Smiter
Rank Points: 322
Registered: 07-11-2003
IP: Logged
icon Re: Monster Movement Clarification (+6)  
Brained movement:

When a brain is in the room, it generates a path map for the entire room recursively by calculating the distance from Beethro in terms of the minimum number of moves it would take to reach him. When calculating this distance, the brain treats as obstacles any room objects that a roach could not step onto, such as walls, closed doors, orbs, etc., as well as all arrows regardless of direction (we'll call these things "visible obstacles".) It does not take into account the location of enemies (even, say, sleeping eyes or brains), mimics, or swords (we'll call these "invisible obstacles".) If a brain cannot find a path from a monster to Beethro, the monster acts as unbrained. Lastly, if a brain is within smelling range of Beethro when he is invisible, all monsters in the room will act as if brained.

Roaches:

For a roach (and any other creature that moves like them), the brain considers the nine squares in the 3x3 square surrounding the roach that do not contain visible obstacles. It then sorts them first in order of distance, and then, within a given distance by: first, squares which are an orthogonal move (either vertically or horizontally) away in order of room position, then the square that the roach is sitting on, and then the diagonal moves in terms of room position. The brain then orders the roach to move to the first square on the list; if it can't do so (because it hits an invisible obstacle,) it tries the second, and so on. If the brain does not give the roach an order, or if it orders it not to move, then the roach's own instinct kicks in and it tries to move towards Beethro as if it were unbrained. It's not hard to concoct situations in which roaches do strange things when brained.

Roach queens:

For a roach queen, the brain looks at the first move that it would try giving to the roach queen if she were a roach (this is never standing still.) The brain then orders the queen to move in the opposite direction with a small exception; if the queen would have been told to move vertically, it orders the queen to move diagonally vertically and towards the vertical line passing through the center of the room, and if the queen would have been told to move horizontally, it orders the queen to move diagonally horizontally and towards the horizontal line passing through the center of the room. The queen then tries to move in the direction suggested by the brain (this will always be diagonally); if it can't, then it tries to move in the closest vertical direction, and then it tries the closest horizontal direction. If the brain cannot sense a path from the queen to Beethro, the queen's own instincts kick in and she flees as if she were nonbrained.

Wraithwings:

Wraithwings use similar rules when brained as unbrained. If the wraithwing calculates itself to be more than five squares from Beethro (that is, if the maximum vertical or horizontal distance from Beethro is at least five), the wraithwing will attack like a brained roach. If the distance is at most five, it will do a search for other wraithwings as before, using its own notion of distance. If it decides to attack, it attacks like a brained roach, and if it decides to flee, it flees like a brained roach queen, except without the movement toward the center of the room.

Serpents:

A brain directs a serpent in the same way that it directs a roach, except at any given time the brain ranks only the three plausible moves; the serpent then tries these moves until it finds one that it can do, otherwise it shrinks. If the brain cannot find a path from the serpent's head to Beethro, the serpent moves as unbrained, but note that this path is determined by the path map and thus does not account for the fact that serpents cannot move diagonally.

Goblins:

Brained goblins move the same way unbrained goblins do, except that they calculate distance differently. If there is no visible path to Beethro or the square is within two squares from Beethro (according to the brain), then distance is calculated as normal. Otherwise, distance is calculated in terms of brained distance, with a preference towards nondiagonal moves.

I've also found that sometimes when running a room with brained goblins, they will act differently even when I haven't changed anything. Sometimes they'll move onto force arrows if it would be faster than going around them, but sometimes they don't. I seem to remember there being a problem with inconsistencies in the movements of brained goblins before, so this is pretty weird.

[Edited by bibelot on 03-14-2004 at 07:23 PM GMT]
03-14-2004 at 08:56 AM
View Profile Send Private Message to User Show all user's posts This architect's holds Quote Reply
masonjason
Level: Smiter
Avatar
Rank Points: 349
Registered: 12-29-2003
IP: Logged
icon Re: Monster Movement Clarification (0)  
Cool, thanks.
Just one more question: if an unbrained snake is out of smelling range, how does it move?

____________________________
Eighty people came to the bazaar.
03-14-2004 at 09:55 AM
View Profile Send Private Message to User Visit Homepage Show all user's posts This architect's holds Quote Reply
The_Red_Hawk
Level: Smitemaster
Rank Points: 783
Registered: 09-02-2003
IP: Logged
icon Re: Monster Movement Clarification (0)  
You mean when Beethro has an invisibility potion?

There's been a lot of talk about this. Apparently the serpent goes into a frenzy seeing/smelling Beethro and so must move, but otherwise stops.

____________________________
Slashing, whirling, diving, twirling,
Snapping, turning, rising, swirling,
Screeching, flipping, gliding, sliding,
The red hawk's dance of death.

.....the king of the skies.....
03-14-2004 at 02:18 PM
View Profile Send Private Message to User Send Email to User Show all user's posts This architect's holds Quote Reply
masonjason
Level: Smiter
Avatar
Rank Points: 349
Registered: 12-29-2003
IP: Logged
icon Re: Monster Movement Clarification (0)  
No.
bibelot wrote:
Serpents:

A serpent first checks to see if Beethro is directly in front of or behind its head. If he is, the serpent continues moving in that direction. It also has an internal counter; the first five turns it prefers horizontal movement, the next five it prefers vertical, and then this repeats. The serpent picks a square into which it wants to move; if it is thinking horizontally, then it picks which of the two squares horizontally adjacent to its head is closer to Beethro. If it is in the same vertical column as Beethro, it picks which of the two vertical squares adjacent to its head is closer to Beethro. Note that the square it picks may be occupied by a wall or the serpent's own body. If it is thinking vertically, it does the same thing but looks at the vertical squares first, then the horizontal squares. The serpent then tries to move into the square that it has picked. If that square is blocked, the serpent tries to move N, then E, then S, then W. If it can't move into any of those squares, its tail shrinks by one square. A serpent will try to move if its head is within smelling range.

[Edited by bibelot on 03-14-2004 at 08:57 AM GMT]
Correct me if I'm wrong, Bibelot, but doesn't that imply that smelling range makes a difference even if you don't have an invisibility potion?
If not, what's going on when you're not invisible but the snake just moves around in an oddly-shaped path, ignoring you?

____________________________
Eighty people came to the bazaar.
03-14-2004 at 02:52 PM
View Profile Send Private Message to User Visit Homepage Show all user's posts This architect's holds Quote Reply
Koro
Level: Delver
Avatar
Rank Points: 74
Registered: 01-16-2004
IP: Logged
icon Re: Monster Movement Clarification (0)  
Hey bibelot, since you appear to be making the definitive guide, perhaps you can clarify a couple more points that I am fairly clear on, but having trouble articulating in technical if-then statements to myself, and append them to your ever-growing document. First, brained creatures and force arrows. Second, a brained snake's apparrent regard for self preservation, even when it can't reach Beethro. So far this thread has been mui interesante. I never knew about serpent's internal five move counter. It would be cool to see a hold that requires some sort of knowledge of this.

____________________________
Vectors are pretty cool, they take your mind off of girls.
03-14-2004 at 03:05 PM
View Profile Send Private Message to User Send Email to User Visit Homepage Show all user's posts Quote Reply
The_Red_Hawk
Level: Smitemaster
Rank Points: 783
Registered: 09-02-2003
IP: Logged
icon Re: Monster Movement Clarification (+1)  
Actually, it's been specified that it's a very bad idea to make a hold that relies on monster movement patterns.

____________________________
Slashing, whirling, diving, twirling,
Snapping, turning, rising, swirling,
Screeching, flipping, gliding, sliding,
The red hawk's dance of death.

.....the king of the skies.....
03-14-2004 at 03:18 PM
View Profile Send Private Message to User Send Email to User Show all user's posts This architect's holds Quote Reply
eytanz
Level: Smitemaster
Avatar
Rank Points: 2708
Registered: 02-05-2003
IP: Logged
icon Re: Monster Movement Clarification (0)  
To elaborate on what Red_Hawk just said, obviously a lot of holds rely on monster movement patterns in a good way - most wraithwing/goblin rooms fall into this catagory. The problem with snakes are that it's is extremely difficult to be able to predict future snake movements, even if you know the movement pattern perfectly.

That's not to say that there aren't already holds which rely on this - many holds, including Dugan's Dungeons, have rooms where you need to get a snake trapped somewhere in the corner of a room or something like that where it's not just a matter of lining up the snake and standing on the other side of the trap - all these rooms basically rely on the snake's movement pattern (though they are solvable by persistance even if you can't calculate the snake's path).

Personally, I hate these rooms with a passion.

____________________________
I got my avatar back! Yay!
03-14-2004 at 03:28 PM
View Profile Send Private Message to User Show all user's posts This architect's holds Quote Reply
bibelot
Level: Smiter
Rank Points: 322
Registered: 07-11-2003
IP: Logged
icon Re: Monster Movement Clarification (0)  
I should clarify a few points: if Beethro is invisible, monsters do nothing if they are outside of smelling range, unless a brain is within smelling range, in which case all monsters move as brained. My point with serpents was just that its head and not just some part of its body must be within smelling range to sense Beethro.

As for brained creatures and force arrows:
The brain treats all force arrows as walls, therefore it will not guide any creature to pass through a force arrow. This doesn't mean that the creatures will not pass through force arrows. There are situations where a brain will not tell the roach to go anywhere, and the roach will then move towards Beethro and move through a force arrow. I think I'll put up some examples of weird behavior later to clarify this.

There's also a weird thing with goblins and arrows that seems like a bug; I'll enter a report.

As for brained snakes:
They don't try to preserve themselves even when they can't reach Beethro (try it).

[Edited by bibelot on 03-14-2004 at 10:10 PM GMT]
03-14-2004 at 07:22 PM
View Profile Send Private Message to User Show all user's posts This architect's holds Quote Reply
Mikko
Level: Master Delver
Rank Points: 276
Registered: 02-04-2003
IP: Logged
icon Re: Monster Movement Clarification (0)  
A couple of additions to bibelot's excellent posts:

Brains consider Serpents, apart from their heads, as obstacles and will guide monsters around them.

Scrolls are also considered as visible obstacles by brains. If Beethro (it has to be Beethro and not a mimic) steps on a visible obstacle, then a Brain will no longer consider it an obstacle. Even if it is a trap door that Beethro has collapsed or an arrow pointing in the opposite direction to what the monster is going or if the monster is a Serpent. If there is a wall with a gap cointaining one of these obstacles and Beethro walks over it, then a Brain will try to direct monsters through the impassable gap rather than around the wall.
03-15-2004 at 02:03 PM
View Profile Send Email to User Show all user's posts Quote Reply
eytanz
Level: Smitemaster
Avatar
Rank Points: 2708
Registered: 02-05-2003
IP: Logged
icon Re: Monster Movement Clarification (0)  
Mikko wrote:
A couple of additions to bibelot's excellent posts:

Brains consider Serpents, apart from their heads, as obstacles and will guide monsters around them.
True.

Scrolls are also considered as visible obstacles by brains.

Also true, and a cause of several weird behaviors.

If Beethro (it has to be Beethro and not a mimic) steps on a visible obstacle, then a Brain will no longer consider it an obstacle. Even if it is a trap door that Beethro has collapsed or an arrow pointing in the opposite direction to what the monster is going or if the monster is a Serpent. If there is a wall with a gap cointaining one of these obstacles and Beethro walks over it, then a Brain will try to direct monsters through the impassable gap rather than around the wall.

True - except for the collapsed trap door part; brains will try to direct monsters (inc. snakes) though arrows (regardless of their direction) and scrolls if Beethro has stepped on them at any point in the past, but not over collapsed trapdoors.

[Edited by eytanz on 03-15-2004 at 04:41 PM GMT]

____________________________
I got my avatar back! Yay!
03-15-2004 at 04:40 PM
View Profile Send Private Message to User Show all user's posts This architect's holds Quote Reply
Mikko
Level: Master Delver
Rank Points: 276
Registered: 02-04-2003
IP: Logged

File: Temporary rooms.hold (628 bytes)
Downloaded 164 times.
License: Other
From: Unspecified
icon Re: Monster Movement Clarification (+2)  
Brains do direct monsters over collapsed trapdoors if there was a visible obstacle on it. Here is a room that demonstrates it.
03-15-2004 at 06:37 PM
View Profile Send Email to User Show all user's posts Quote Reply
eytanz
Level: Smitemaster
Avatar
Rank Points: 2708
Registered: 02-05-2003
IP: Logged
icon Re: Monster Movement Clarification (0)  
Oh - that's interesting.

I misunderstood your original text, I thought you considered the pits created by trapdoors to be an obstacle that is ignored because Beethro was once in the square.

The fact that the presence of an obstacle overrides the presence of a pit seems like a bug to me... I wonder if it could be fixed or whether anything depends on it.

____________________________
I got my avatar back! Yay!
03-15-2004 at 08:26 PM
View Profile Send Private Message to User Show all user's posts This architect's holds Quote Reply
Jatopian
Level: Smitemaster
Rank Points: 1842
Registered: 07-31-2005
IP: Logged
icon Re: Monster Movement Clarification (0)  
:wizard True Resurrection!
I'm reviving this thread because unless I missed it, no one has definitively defined monster movement for anything that didn't appear in Architect's Edition. I would appreciate it if anyone who understands any other monster's behavior to post an explanation. I would like to call on our source-divers and sundry wise folk to make bibelot proud.

____________________________
DROD has some really great music.
Make your pressure plates 3.0 style!
DROD architecture idea generator
09-04-2007 at 12:55 AM
View Profile Send Private Message to User Show all user's posts This architect's holds Quote Reply
coppro
Level: Smitemaster
Rank Points: 1308
Registered: 11-24-2005
IP: Logged
icon Re: Monster Movement Clarification (0)  
Aumtlich behave like sworded goblins, except that if they are next to Beethro and can't get to him, they'll move around him as if he were a normal obstacle in the way (in case he's on a force arrow pointing at the Aumtlich).
Rock Giants use the same behavior as a goblin, with the Aumtlich's extra movement to get to Beethro when it's right next to him.
Adders work like other serpents.
Skippers behave either like seep or roaches, I can't remember which.
Gel babies are like rock golems.
09-04-2007 at 04:01 AM
View Profile Show all user's posts Quote Reply
calamarain
Level: Smitemaster
Avatar
Rank Points: 933
Registered: 03-25-2007
IP: Logged
icon Re: Monster Movement Clarification (0)  
Stalwarts move like guards, but with the important difference that Stalwarts move first, monsters second. This means that guards can usually slaughter Stalwarts.

____________________________
My Holds
Click here to view the secret text

09-04-2007 at 05:09 AM
View Profile Send Private Message to User Send Email to User Show all user's posts This architect's holds Quote Reply
TFMurphy
Level: Smitemaster
Rank Points: 3117
Registered: 06-11-2007
IP: Logged
icon Monster Movement Clarification (3.1 Update) (+13)  
Yes, this is one of the threads that has a permanent bookmark in my folder. But anyways, if you insist, I'll quickly go over the main types of movement.

As I've said elsewhere, there's three main types of movement, with two of them having an additional variant. These are as following:

Direct: Used by Golems, Wubbas, Gel Babies and Fegundos.
Beeline (Normal): Default movement, used by Roaches and many other monsters.
Beeline (Smart): Used by Seep.
Flexible (Normal): Used by Guards.
Flexible (Flank): Used by Rock Giants and Aumtlich.

Note that Wraithwings and Roach Queens use the above movement types in different ways, and Goblins don't use any of the above at all. bibelot's already explained these three monsters in great detail.

Normal Movement AI

Beeline has already been explained by bibelot very well under Roach movement. Smart Beelining is a variant, however, that differs only when a diagonal movement is required but is blocked. Instead of preferring vertical movement, the monster will prefer to move in the direction that reduces the longest orthogonal distance. For example, if a Seep's target is 10 South and 3 East of it, and it cannot move SE, then it will prefer to move S because the vertical distance is greater than the horizontal distance. If both orthogonal distances are the same, then vertical preference wins out.

Direct decides which direction is best as usual - however, if that direction is blocked, then no movement is made. This prevents sliding along walls when the monster wishes to make a diagonal movement.

Flexible does everything that Smart Beeline does, but it differs when the monster wishes to make an orthogonal movement (non-diagonal) but is blocked. In this case, it checks the two diagonal squares adjacent to its required movement, and sees which of those is possible. If any is possible, then it will take that direction instead, effectively sidestepping the obstacle. For horizontal movement, the monster will prefer stepping to the North of obstacles rather than South, and for vertical movement, the monster will prefer stepping to the West of obstacles rather than East.

Finally, Flexible Flanking differs from normal Flexible movement when the monster is right next to its target. Normally, Flexible movement will not try to sidestep if it wishes to make an orthogonal movement onto the target but is blocked. However, a Flank will allow the monster to use the sidestepping rules even when directly next to the target. This allows it to sidestep things like Force Arrows and attempt to approach the target from a different direction. Note that the North and West preferences still matter here, so it'd be difficult for a monster to flank to the South, for example.

===

Brained Movement AI

Again, bibelot has explained brained movement excellently for Beelining. Flexible movement uses brained movement identically to Beelining.

Direct movement and Seep have exceptions, however. Direct movement will fail to move at all if the first path given to them via the brain sends them into a brain-invisible obstacle. They will not check any of the other alternative paths the brain might have for them.

And Seep were *supposed* to not move at all if all of the "best" paths the brain gave them were blocked by brain-invisible objects. However, this doesn't seem to work - instead, they'll go back to their Smart Beelining behaviour, even if it would technically take them farther from their target.

Also, Seep and Water Skippers have an additional feature with brains, in that they consider each movement over a square they shouldn't be able to move over worth 1001 moves, rather than be completely impassible. This means that they'll head for squares that minimize the distance over obstacles. Furthermore, they ignore routes over walls/water that are not connected to their segment, treating them as additional obstacles. The consequence of this is that they'll head for the squares within their connected segment that minimizes the distance between them and their target. I don't believe it's possible to create a non-obstacle path that has over 1001 squares in it, so there shouldn't be any problems there with them favoring a path through obstacles rather than a really long windy connected path.

===

Monster Movement Order

In general, monsters move in the order they were placed or spawned. However, there are tiers in which certain monster groups move before or after others. Here's the order:

Player
Mimics, Decoys and Clones
Fegundos
Stalwarts
Slayers
Guards
Default Monsters (includes Halph)
Citizens
Characters

===

Potions

Only humans may move over potions. Goblins are not considered humans. Water Skippers and Seep may move on top of a potion when attacking a target.

===

Now for individual monster quirks from non-AE monsters.

Water Skipper: They may move onto any square that doesn't contain either a Wall or a Door *IF* there is a target on the square they wish to kill. They respect Force Arrows and Orthosquares while doing this... but they can still move onto Pits, Obstacles, Potions, Lights, etc, providing the target is also on said obstacle.

Water Skipper Nests: Every 10 turns, if there's a visible target in the room, they spawn a single Water Skipper on an empty Water square surrounding them. The square chosen must be water, and must not contain any standard obstacle or the player. The square chosen will be the one closest to the nearest target. If the Water Skipper Nest is brain-controlled, then it will use the brain's distance to decide. Otherwise, it uses the Pythagorean theorem. In the case of ties, priority is given in the order of NW, N, NE, W, E, SW, S, SE.

Rattlesnakes: Moves exactly like Serpents, except that it can also move over Scrolls and Force Arrows (providing the arrow does not block the direction). If their tail moves onto a sword after movement, then it is automatically stabbed. This only occurs once per Rattlesnake movement, but extra stabs are possible on sword-wielders' turns.

Adder: Moves exactly like Rattlesnakes. They do not consider small monsters to be obstacles and will eat them instead - the only exception there are NPCs with the Invulnerable imperative. They may also eat tarstuff providing it is a piece not vulnerable to stabbing. If they eat something, they grow by one square. An Adder moving onto a sword does not take damage - damage is only done on the sword-wielders' turns. Finally, an Adder that is trapped will shrink if one of the possible squares it could've moved to contains an Adder piece (either its own or another Adder).

Seep: Uses Smart Beelining and can move through walls and doors only. They can attack targets outside of walls but die immediately afterwards. Like Water Skippers, they only care about Force Arrows and Orthosquares blocking movement if they can attack a target next to them. Finally, if caught outside a wall, they die.

Fegundo: These don't move until a Power Token has been activated. At that point, they use Direct movement in the direction that the player is currently facing, providing they can either see or smell the player. If an obstacle is in the way and an Arrow or Orthosquare isn't preventing movement in that direction, then the Fegundo explodes in a 3x3 square, turning into Fegundo Ashes. Exceptions are the player and Stalwarts: they will instead just kill them without exploding. Fegundos killed by an explosion turn into ash as well. Fegundos are immune to swords.

Fegundo Ashes: After 5 turns, these revive into Fegundos. Fegundo Ashes are vulnerable to being killed in many ways, including swords, explosions and falling into water or pits.

Rock Giants: Use Flanking Flexible movement. They pick their target first, choosing whoever is closest to the exact center of the Rock Giant. After choosing a target, they are considered to occupy the square closest to their target using the Pythagorean theorem (for example, if their target is to the SE, then the front of the Rock Giant is now also to the SE). Ties between the four pieces aren't possible in this case. All movement the Giant makes must be possible for all four pieces it has.

Rock Golems, Wubba and Gel Babies: All these move using Direct movement, with no real quirks. Naturally, Rock Golems turn into rubble when stabbed, Wubbas are immune to swords, and Gel Babies have no extra exceptions.

Aumtlich: These use Flanking Flexible movement. They always wish to face their target. An Aumtlich will face orthogonally if the distance in one of the orthogonal directions is greater than twice the distance than the other orthogonal direction: for example, if the target is 5 North and 2 West from the Aumtlich, then the Aumtlich will face North (since it's over twice as large than the West distance), instead of Northwest. If they are not facing the direction they want, they will turn towards that direction, preferring to turn clockwise instead of anti-clockwise if both take the same amount of time. An Aumtlich will only freeze something at the end of every turn. An Aumtlich gaze will also damage Cracked Orbs and destroy Broken Orbs (both on Full Turns only) and light fuses (on half turns as well). If an Aumtlich gazes into a mirror, it will freeze itself.

Guard: If their sword is within 1 square of their target, they will make whatever possible move to get their sword on top of the target first, preferring to move rather than rotate if both are possible killing moves.

Otherwise, if they are not close to their target, they will advance. Guards use Flexible movement but do not Flank (they don't need to), but they are also always considered brained. Obviously, if they cannot find a path to the player via brained movement, they will default to Flexible movement. In the case of closer alternate targets, they obviously cannot use brained movement against them, and so will just use Flexible movement. Like Aumtlich, a Guard always want to face their target, but unlike Aumtlich, Guards will do killing moves if close enough as explained in the previous paragraph. Guards will do their utmost to not stab any other Guard, Slayer or Bomb, but they will not care about stabbing any other monsters. If the Guard has its sword sheathed, then it will automatically turn in the direction it moves.

On oremites, Guards will no longer wish to face their target, and will just take the path (brained or unbrained depending) to their target via the quickest means possible. Since they do not have an unsheathed sword on oremites, they will turn automatically when they move. They will also understand whether any move either onto or off of oremites may or may not stab something they don't wish to kill and adjust their moves accordingly.

The exception to the above understand of oremites is when they believe they can kill their target on the next move: at this close juncture, their repeated training kicks in and they attempt a killing move as if they had an unsheathed sword. On oremites, this move will invariably miss, and can be taken advantage of.

Stalwarts: Much too complex to explain in full here, so I'll just point at the relevant topic. No, they're not *quite* "just like Guards except Stalwarts move first". And also no, guards don't "usually slaughter Stalwarts" - Guards versus Stalwarts is usually a parity problem, so it generally falls down to how far the two began apart.

Slayer, Halph: Both of these are also very very complex, so I'll make a seperate topic for them if I get some time.

===

I think that's everything. Apologies if I missed something - if I have, mention it and I'll see what I can do.

[Last edited by TFMurphy at 08-08-2008 05:03 AM]
09-04-2007 at 06:26 AM
View Profile Send Private Message to User Show all user's posts This architect's holds Quote Reply
Dolan42
Level: Master Delver
Avatar
Rank Points: 195
Registered: 04-14-2006
IP: Logged
icon Re: Monster Movement Clarification (0)  
TFMurphy wrote:
A lot of useful information
As usual very informative. :)

____________________________
-D
"To understand recursion you must first understand recursion."
09-04-2007 at 06:45 AM
View Profile Send Private Message to User Send Email to User Show all user's posts Quote Reply
Syntax
Level: Smitemaster
Rank Points: 1218
Registered: 05-12-2005
IP: Logged
icon Re: Monster Movement Clarification (0)  
Ezlo? This has to be published somewhere... :)
09-04-2007 at 06:52 AM
View Profile Send Private Message to User Show all user's posts Quote Reply
RoboBob3000
Level: Smitemaster
Avatar
Rank Points: 1978
Registered: 10-23-2003
IP: Logged
icon Re: Monster Movement Clarification (0)  
Excellent work! A post for the ages.

For completion's sake, could you also add in monster movement information in relation to door toggles, tarstuff growth/breakdown (briar too), token toggles, explosions, and any other environmental stuff that could have an effect?

____________________________
http://beepsandbloops.wordpress.com/
09-04-2007 at 08:04 AM
View Profile Send Private Message to User Show all user's posts This architect's holds Quote Reply
Briareos
Level: Smitemaster
Avatar
Rank Points: 3516
Registered: 08-07-2005
IP: Logged
icon Re: Monster Movement Clarification (0)  
RoboBob3000 wrote:
Excellent work! A post for the ages.
Is it just me, or does that cry "STICKY!1!eleven" in bolded, 72pt letters? :fun

____________________________
"I'm not anti-anything, I'm anti-everything, it fits better." - Sole
R.I.P. Robert Feldhoff (1962-2009) :(
09-04-2007 at 09:13 AM
View Profile Send Private Message to User Send Email to User Visit Homepage Show all user's posts Quote Reply
calamarain
Level: Smitemaster
Avatar
Rank Points: 933
Registered: 03-25-2007
IP: Logged
icon Re: Monster Movement Clarification (0)  
Briareos wrote:
RoboBob3000 wrote:
Excellent work! A post for the ages.
Is it just me, or does that cry "STICKY!1!eleven" in bolded, 72pt letters? :fun
Yeah, it should be made Sticky. It's worth the 10 mod points its got!

____________________________
My Holds
Click here to view the secret text

09-04-2007 at 02:56 PM
View Profile Send Private Message to User Send Email to User Show all user's posts This architect's holds Quote Reply
TFMurphy
Level: Smitemaster
Rank Points: 3117
Registered: 06-11-2007
IP: Logged
icon Re: Monster Movement Clarification (3.1 Update) (+3)  
RoboBob3000 wrote:
Excellent work! A post for the ages.

For completion's sake, could you also add in monster movement information in relation to door toggles, tarstuff growth/breakdown (briar too), token toggles, explosions, and any other environmental stuff that could have an effect?

Hmmm. Well, monster movement basically happens immediately, starting with how the player moved and going straight through all the monsters. After that, the rest of the turn can be processed, which is basically the following:

* Any monsters falling off a platform now die - this is actually first done after Double (Mimic/Clone/Decoy) movement, but it's done again after all of the rest of the monsters have moved
* Tarstuff is destroyed through any sword stabs, allowing for simultaneous removal
* Unsupported Bridges fall
* Fuses burn (Full Turn Only)
* Briar grows (Full Turn Only)
* Seep outside walls die
* Tarstuff grows - first Tar, then Mud, then Gel; but babies are only spawned after all stable tarstuff has finished growing for the turn (Every 30 Turns)
* Pressure Plates that were depressed but no longer have weight on them now pop up again (Full Turn Only)
* Aumtlich Gazes take effect
* Player can get an extra sword hit now if he ended his turn with his sword sheathed, but an event afterwards gave him his sword back
* Checkpoint save occurs if possible
* Green Doors toggle if room is conquered
* Any characters still waiting on cue events that happened after they'd moved now recognise that the events have occurred, and will move on to the next script command on next turn

Just about everything else basically happens during the movement of whatever monster is currently being looked at: Orbs are activated immediately when hit, Red and Black Doors activate as soon as the last trapdoor/tarstuff is removed, Explosions occur immediately (however, all connected explosions must finish before any orbs they activate will trigger), and so forth.

Double placement is its own self-contained turn that happens after *everything* here - once placed, the new Mimic/Decoy/Clone immediately does various appropriate things (activates orbs and tokens, stabs tarstuff, etc), and then the whole list of things I noted above happens again as if it were a half-turn.

EDIT: Regarding the extra sword hit when the player gets his sword back during a turn - this is actually a very specific case. Disarm Token touched by Mimics don't count for this (you'll get your sword back, but you won't get an extra sword hit). However, if you were standing on Oremites and something happened to clear the Oremites during the turn (like, say, a Builder), then you'll get the extra sword hit. Also note that this happens after Pressure Plates pop up, so there's an extra little quirk that can happen there where the pressure plate doesn't pop up at the end of a full turn.

[Last edited by TFMurphy at 08-03-2008 06:13 AM : Updated slightly for new turn order in 3.2]
09-04-2007 at 06:30 PM
View Profile Send Private Message to User Show all user's posts This architect's holds Quote Reply
Jatopian
Level: Smitemaster
Rank Points: 1842
Registered: 07-31-2005
IP: Logged
icon Re: Monster Movement Clarification (+1)  
That's... great. Wow.

I hate to be such a bother, but could someone help me list what aumtlich beams do? I know of:
- prevent Beethro/Stalwart/mimic it hits from moving to another square
- reflect back from mirrors & perpendicular weapons to freeze the aumtlich completely
- crack uncracked orbs
- break cracked orbs
- light fuse ends
Do they latch on to clones, decoys, or mimics and head for them as they do Beethro and Stalwarts?

____________________________
DROD has some really great music.
Make your pressure plates 3.0 style!
DROD architecture idea generator

[Last edited by Jatopian at 09-05-2007 03:25 AM : ty Chaco, Rabscuttle, Syntax]
09-04-2007 at 11:38 PM
View Profile Send Private Message to User Show all user's posts This architect's holds Quote Reply
Page 1 of 3
23
New Topic New Poll Post Reply
Caravel Forum : Caravel Boards : General : Monster Movement Clarification
Surf To:


Forum Rules:
Can I post a new topic? No
Can I reply? No
Can I read? Yes
HTML Enabled? No
UBBC Enabled? Yes
Words Filter Enable? No

Contact Us | CaravelGames.com

Powered by: tForum tForumHacks Edition b0.98.8
Originally created by Toan Huynh (Copyright © 2000)
Enhanced by the tForumHacks team and the Caravel team.