Specific point A to point B pathing for mobs

Post Reply
User avatar
BlockStar
Member
Posts: 23
Joined: Thu Jun 11, 2020 22:14
Location: The Dirty South

Specific point A to point B pathing for mobs

by BlockStar » Post

Hello,

Just started using Minetest a few days ago. I'd like to have a stealth element where the player would have to sneak past guards. Instead of the guards just randomly wondering around as mobs generally do, I want the guards to take fixed routes, so that the player would have to time things right (like every stealth game). So the pathing would need to be something like:

move to coordinates 1 2 3
wait 3 seconds
look west
wait 3 seconds
look south
wait 3 seconds
move to coordinates 4 5 6
wait 3 seconds
look east
wait 3 seconds
look south
wait 3 seconds
repeat

I also would need the guards to not detect the player unless the player is in their line-of-vision. It seems like hostile mobs generally detect a player whenever they are within a few blocks of the mob, even with their backs turned (which makes me wonder what the point of "sneaking" is. Maybe PVP?).

Anyway, I was looking at the api in Mobs Redo, and apparently the pathfinding feature doesn't provide for this, it's simply 1 or 2 (pathing to the player or breaking certain nodes).

Can someone recommend a mob api that is suited to what I'm trying to do? I mean, maybe Mobs Redo would be fine, I just have no idea how to do it, since it's not addressed in the documentation.

Thanks!

Eran
Member
Posts: 123
Joined: Fri May 03, 2019 16:46

Re: Specific point A to point B pathing for mobs

by Eran » Post

mobkit probably suits your needs fairly well. It has a queue system that you could use for patrolling and it's also more modular than mobs_redo so you get full control about how the mob behaves.
You probably will have to code some custom behaviour functions though.

Sokomine
Member
Posts: 4170
Joined: Sun Sep 09, 2012 17:31
GitHub: Sokomine

Re: Specific point A to point B pathing for mobs

by Sokomine » Post

The by now rather old npcf mod has guards that can be lured to certain points and patrol between them. The mod is rather old and doesn't have many modern features. Socerykid wrote a mod that focusses on the mob's senses and may be more what you're looking for.

In geneal...sneaking does have its uses in MT :-) Just not for sneaking past any hostile mobs. In the past, sneak elevators where a popular way of travelling upward and down. Sneak is still a way to cling to an edge of your platform without falling down. Or to break your fall in some cases. Just...not to be confused with conventional sneaking :-)
A list of my mods can be found here.

User avatar
sorcerykid
Member
Posts: 1462
Joined: Fri Aug 26, 2016 15:36
GitHub: sorcerykid
In-game: Nemo
Location: Illinois, USA

Re: Specific point A to point B pathing for mobs

by sorcerykid » Post

My Avatars mod provides for multiple waypoint types, including patrol points (both direct and and random), look points, and flee points, all of which can be either scripted or edited directly in-game using a visual tool similar to WorldEdit. Also AI can have multiple sensory capabilities (sight, sound, and even smell) which can be fine tuned to allow for a stealth game mechanic via integration with my Axon mod. In fact the impetus for creating Avatars was because I'm working on a port of Thief: The Dark Project to Minetest).

You can see a demo of the waypoints feature of Avatars here:
https://vimeo.com/324076654

Although I haven't released Avatars yet, a scaled down adaptation is available as part of my Mobs Lite mod: https://github.com/sorcerykid/mobs/wiki

User avatar
BlockStar
Member
Posts: 23
Joined: Thu Jun 11, 2020 22:14
Location: The Dirty South

Re: Specific point A to point B pathing for mobs

by BlockStar » Post

Ahhh, Thief: The Dark Project you say? One of my all-time favorite games. Very cool.

I was hoping for some way to work sound into the sneaking process, but I hadn't even considered smell. That opens up some interesting possibilities. It would be great for guard dogs, or even regular guards if you had just, say, crawled through a sewer.

This is good news, and I will definitely start experimenting with your mods. I really appreciate you letting me know. Thanks!

User avatar
sorcerykid
Member
Posts: 1462
Joined: Fri Aug 26, 2016 15:36
GitHub: sorcerykid
In-game: Nemo
Location: Illinois, USA

Re: Specific point A to point B pathing for mobs

by sorcerykid » Post

Niice, I'm glad to meet another fan of the series :)

An alpha version of Avatars should be ready for testing within the next few months. In the meantime, Mobs Lite provides several of the key features of Avatars (like sensory capabilities and alertness states), so people can get their feet wet in the meantime. I will look into porting over the waypoints as well, since there is interest.

Btw, since you like Thief, you might find this video entertaining. It's a fully-fledged adaptation of the "sources and receptrons" feature of the Dark Engine in Minetest :D

https://vimeo.com/420666141

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest