[Done for V0.39] Making monsters follow a pre-defined path

Messages are moved here (should anyone ever want to see them again) once they are no longer applicable to the current version (e.g. suggestions that have been implemented or bugs that have been fixed).

Moderator: George Gilbert

Forum rules
Please read the Forum rules and policies before posting. You may Image to help finance the hosting costs of this forum.
Post Reply
User avatar
copperman
Um Master
Posts: 476
Joined: Thu Aug 29, 2002 12:49 pm
Location: UK

[Done for V0.39] Making monsters follow a pre-defined path

Post by copperman »

Not directly associated with attack/sense abilities but something that appears to be needed in some way.

A FLOORITEM_PATH could be handy.
Give each a number 0 to last one. 0 is the starting point adn would require to be triggered to initiate the path sequence.
Give each tile a direction to tell the pathed monster which way to face from this tile to the next in the sequence. Overriding normal forward facing walking.
Give each tile a time, the time it takes to arrive at the next tile. (either have a wait or use multiple tiles in one space)

Path Item 0 would require a monster (pref cloned) which would appear at path 0 when triggered.
Paths could be places adjacent:

Code: Select all

0X000000
00000000
00000000
00000000
00000000
0X00X000
00000000
0000X000
making for "lower strain" on the engine.

Could be used to script events such as guards running for reinforcements or a guide to show you to a location.

Some of this can be done with lots of telepoters and monsters with altered facing images, but I think some sort of dedicated pathing system might be more appropriate now.
Something for the future that has actually arrived. :D
Don't be scene or herd!
User avatar
beowuuf
Archmastiff
Posts: 20686
Joined: Sat Sep 16, 2000 2:00 pm
Location: Basingstoke, UK

Post by beowuuf »

I already indicated in a previous post a suggestion for makign a NPC be able to walk, with a convert to adjacent - this would be better than path, since a)it's a designer thing not soemthign the engine needs complex code for, while being flexible, and b) you can map out a general behaviour - an NPC shopper won't always follow one path, and c) its a general convert you could use for anything

Simple mechanics are always best I feel as they can be used for a wide variety of things and then can be used as building blocks for complex components.
User avatar
mikko
Craftsman
Posts: 102
Joined: Sun Jan 15, 2006 2:42 pm
Location: Helsinki, Finland

Post by mikko »

If there already is a path finding algorith for the monsters, then you would just need a way to specify waypoints that the creatures should follow. They would then just automagically select a suitable path and be off. And they would not get stuck somewhere because of a closed door or open pit if there was an alternate route to the target tile. To hardcode a certain route, you could just put waypoints to every tile on the way..

Of course, if there is no path finding implemented in the engine, it might be easier to leave such things completely for the dungeon designer to figure out. But surely there must be.. ? :roll:
User avatar
copperman
Um Master
Posts: 476
Joined: Thu Aug 29, 2002 12:49 pm
Location: UK

Post by copperman »

The waypount idea is kinda what I have in mind. Making sure a path is clear would be down to the designer, monsters should simply walk from one to the next waiting if specified.
Don't be scene or herd!
User avatar
Ameena
Wordweaver, Murafu Maker
Posts: 7571
Joined: Mon Mar 24, 2003 6:25 pm
Location: Here, where I am sitting!
Contact:

Post by Ameena »

Yeah then you could have a monster patrolling a corridor and try to sneak past when it's down the other end or something :).
______________________________________________
Ameena, self-declared Wordweaver, Beastmaker, Thoughtbringer, and great smegger of dungeon editing!
User avatar
copperman
Um Master
Posts: 476
Joined: Thu Aug 29, 2002 12:49 pm
Location: UK

Post by copperman »

yes thats one example, or a neutral moster that guides the party around someplace maybe.
Don't be scene or herd!
User avatar
George Gilbert
Dungeon Master
Posts: 3022
Joined: Mon Sep 25, 2000 11:04 am
Location: London, England
Contact:

Post by George Gilbert »

This can now be done in V0.39 by cunning use of the movement / rotation actions to force a monster to go in the direction you want it to!
User avatar
copperman
Um Master
Posts: 476
Joined: Thu Aug 29, 2002 12:49 pm
Location: UK

Post by copperman »

Splendid, yeay for enhanced "dungeon mechanics" :D
Don't be scene or herd!
User avatar
George Gilbert
Dungeon Master
Posts: 3022
Joined: Mon Sep 25, 2000 11:04 am
Location: London, England
Contact:

Post by George Gilbert »

BTW - I've put an example of a monster patrolling an area into the example dungeons so you can see how it can be done.
Post Reply