Bugt or Feature in StandardMobBrain.cs

Discussions on various DOL development features

Moderator: Support Team

Bugt or Feature in StandardMobBrain.cs

Postby Coldpack » Tue Mar 04, 2014 6:38 am

While doing some playing around with the current SVN trunk, I was having problems with mobs in DF aggroing through the floor. Ive seen this on some other servers recently as well. Checking into the code in StandardMobBrain.cs, i see that CheckNPCAggro sets the ignoreZ when calling GetNPCPlayersInRadius conditional on if it is a dungeon region or now. However CheckPlayerAggro simply just ignores the Z axis. Is this as intended, or a bug? Perhaps setting the ignoreZ flag with the same type of conditional as used in CheckNPCAggro would work here?

CheckNPCAggro()
foreach (GameNPC npc in Body.GetNPCsInRadius((ushort)AggroRange, Body.CurrentRegion.IsDungeon ? false : true))

But the CheckPlayerAggro() just sets it to true.
foreach (GamePlayer player in Body.GetPlayersInRadius((ushort)AggroRange, true))


-- ColdPack (Pflegen in the old days)
Coldpack
DOL Guest
 
Posts: 1
Joined: Tue Mar 04, 2014 6:29 am

Re: Bugt or Feature in StandardMobBrain.cs

Postby Leodagan » Wed Mar 05, 2014 5:25 pm

This seems pretty wrong...

I should say even in open world there is no reason to ignore Z on aggro check (it will just boost a little bit the aggro range when player is on lower or higher ground than the mob checking him...)

Removing the Z checks could be seen as casting a "pillar" zone of aggro while using Z checks casts a "bubble" zone check !

If you want to try editing this and report some test it could be nice to change this check to a "ignoreZ = false" for both...
User avatar
Leodagan
Developer
 
Posts: 1350
Joined: Tue May 01, 2012 9:30 am
Website: https://daoc.freyad.net
Location: Lyon

Re: Bugt or Feature in StandardMobBrain.cs

Postby Dinberg » Sun Mar 23, 2014 8:39 pm

Hmm, this shouldn't be a problem anyway because the mob brain should be using los checks for aggro. How about checking the line of sight checks are enabled for mob aggro? I think its a server property now
The Marvelous Contraption begins to stir...
User avatar
Dinberg
Inactive Staff Member
 
Posts: 4695
Joined: Sat Mar 10, 2007 9:47 am
Yahoo Messenger: dinberg_darktouch
Location: Jordheim

Re: Bugt or Feature in StandardMobBrain.cs

Postby Leodagan » Mon Mar 24, 2014 9:49 am

LoS checks can fail...

When a single player is entering some area, all LoS checks could be targeted using only this one player, there are some threshold in the StandardMobBrain to lower the rate of LoS checks, and If I remember right, if no player is available to cast a check the methods and functions act as the check was true ! (but if a LoS check overwrite a previous check, then it returns a false check before casting the new one)

This should have very low chance to happen, but with no Z checks in dungeons, an unusual amount of Mobs could ask for a LoS check when the player is in the aggro "pillar"
User avatar
Leodagan
Developer
 
Posts: 1350
Joined: Tue May 01, 2012 9:30 am
Website: https://daoc.freyad.net
Location: Lyon

Re: Bugt or Feature in StandardMobBrain.cs

Postby Tolakram » Mon Mar 24, 2014 11:18 am

Regardless of what works better the primary issue is no server side mapping. In some level dungeons not ignoring Z will work, but in dungeons like DF with a lot of sloping corridors this will not work. Generally the aggro radius in dungeons is set very small so that you don't aggro through the walls and the floor.
- Mark
User avatar
Tolakram
Storm / Storm-D2 Admin
 
Posts: 9189
Joined: Tue Jun 13, 2006 1:49 am
Location: Kentucky, USA

Re: Bugt or Feature in StandardMobBrain.cs

Postby Leodagan » Mon Mar 24, 2014 1:16 pm

Uthgard may have some experiment of server side mapping, as they're testing Pathing Algorithms...

these experiments could lead to be able to cast "LoS" on server side (at least for simple matters like having a wall/floor between a mob and a player), dungeons are pretty hard to map with no geometry knowledge as they are mainly made of meshes with rotation.

I don't know if they intend to share the pathing algorithm, but I'll gladly use the server-side geometry !
User avatar
Leodagan
Developer
 
Posts: 1350
Joined: Tue May 01, 2012 9:30 am
Website: https://daoc.freyad.net
Location: Lyon

Re: Bugt or Feature in StandardMobBrain.cs

Postby geshi » Tue Mar 25, 2014 11:52 am

Uthgard may have some experiment of server side mapping, as they're testing Pathing Algorithms...

these experiments could lead to be able to cast "LoS" on server side (at least for simple matters like having a wall/floor between a mob and a player), dungeons are pretty hard to map with no geometry knowledge as they are mainly made of meshes with rotation.

I don't know if they intend to share the pathing algorithm, but I'll gladly use the server-side geometry !
Aren't they using mobs to create path points? or did I read wrong....
geshi
Contributor
 
Posts: 1826
Joined: Tue Oct 21, 2008 9:16 pm

Re: Bugt or Feature in StandardMobBrain.cs

Postby Leodagan » Tue Mar 25, 2014 4:47 pm

I don't see anything in their news related to using mob as path point, even if this could be an idea to get some collection of "valid coordinates"...

Seeing the video we can see that most mobs are walking edge of the walls and some of them stopping when "hitting" a wall, if this doesn't use geometry data, it's really impressive :p
User avatar
Leodagan
Developer
 
Posts: 1350
Joined: Tue May 01, 2012 9:30 am
Website: https://daoc.freyad.net
Location: Lyon

Re: Bugt or Feature in StandardMobBrain.cs

Postby geshi » Wed Mar 26, 2014 12:24 pm

I don't see anything in their news related to using mob as path point, even if this could be an idea to get some collection of "valid coordinates"...

Seeing the video we can see that most mobs are walking edge of the walls and some of them stopping when "hitting" a wall, if this doesn't use geometry data, it's really impressive :p
http://www.uthgard.net/forum/viewtopic.php?t=33468 "We’ve been playing around with the thought of pathing monsters for a long time but never finished implementing it during the lifetime of Uthgard v1. " maybe I'm misunderstanding what they're saying.. also look at the image and it shows a few monsters casting an effect and a few monsters following the path created.

To me, using mobs for path points makes the most sense as you can edit them ingame etc... I also don't think it would be too difficult to implement.
geshi
Contributor
 
Posts: 1826
Joined: Tue Oct 21, 2008 9:16 pm

Re: Bugt or Feature in StandardMobBrain.cs

Postby Metty » Wed Mar 26, 2014 6:04 pm

No, navmeshes (ground-polygons, basically) are auto-generated from the .nifs (except for some manual editing that is required to make ladders *really* fit onto the nif mesh, since the client is very picky about where a mob has to be for the climbing animation to show); doing it by hand would have been way too much work.

We drop the collision meshes after the navmesh is generated though, so not using it for LOS. Could potentially be done with an efficient oct-tree impl though.
Metty
DOL Enthusiast
 
Posts: 284
Joined: Sat Jan 28, 2006 3:39 pm


Return to “%s” DOL Development Discussion

Who is online

Users browsing this forum: No registered users and 1 guest