Log in

View Full Version : Feature Suggestion: fix for aggro through walls


Hooke
08-04-2003, 07:50 PM
Before I start, let me just say that I'm not a programmer, so try to be kind.

As it stands now, dungeons are pretty much unplayable in the emulator due to the fact that the server doesn't see zone geometry such as walls, and only calculates whether or not a mob aggroes on the player based on their respective xyz coords. This causes mobs to jump players through walls, making it nearly impossible to play through a dungeon, especially a layered one.

I was thinking about a possible solution that didn't involve the server actually using a 3d model of the zone and collision detection, as that would for sure be too costly resource-wise. What I came up with is this:

Why not have a grid (or series of grids) of waypoints that covers the entire (indoor) zone, separate from the grids currently used to do pathing now. Unlike the grids used now, which cover a limited area and are just meant for a single npc, these grids would cover all the area in an indoor zone that a mob could move over. These waypoints could be stored in the db.

When a zone boots, the server could "snap" all mobs to the nearest waypoint on the Big Grid (tm) for all aggro check purposes. As a client moves through the zone, the server could also "snap" him/her to the nearest waypoint on the Big Grid. When checking for aggro, the server wouldn't just do it based on xyz coords, but rather on the amount of PATH on the Big Grid between them, based on their respective nearest waypoints, which the server has snapped them to.

Once aggro has occurred, the mob would follow the Big Grid to the waypoint nearest the player and then proceed towards them in a straight line from there. The Big Grid could also be used to easily implement fleeing mobs, which is another aspect the emu currently lacks. Other checks, such as whether to have a mob buff another mob, could also be done through the Big Grid, so that a level 6 mob standing next to a wall that happens to have a level 30 mob on the other side of it won't get level 30 buffs and rip apart the surprised level 6 player who attacks it.

Waypoints for the Big Grid could be added the same way pathing is currently done: by a GM character in game. Yes, it would be relatively labor-intensive, but really no more than pathing is now, considering it only needs to be done for indoor zones.

So devs, let me know what you think. Could this be done, or would it be too difficult to implement? Or use too many resources on the server side? Obviously I'm just throwing out a very rough idea that I came up with in about 20 minutes and if it were ever used it would probably have to be refined to some extent, but is the principle behind it, using a path to check aggro, feasible?

Anyhow, like I said, I'm no programmer, so if this is totally unworkable for some reason, that's why :wink:. Just something I wanted to throw out there for consideration.

Merth
08-05-2003, 01:50 AM
I think this sort of thing is an excellent idea. There are many common industry standard algorithms that could be employed to achieve something like this.

Unfortunately, I'm not able to pursue it at this time. I'm too busy with other parts of the emulator. Perhaps once 0.5.0 is more functional, I'll look into this.

devn00b
08-05-2003, 06:18 AM
This has been talked about before and thrown to the wayside.

to load a 3d model of the zone into memory would take too much ram. while it might solve the problem of agro through walls it would double or triple the ram needed to run a server. not to mention the cpu time needed to load them as somone is zoning in.

somone tryed it...cant remember who..but was a huge failure.

The waypoint idea is good...but who is gonna go through each zone and set this up.

what about peeps with custom db's?

Hooke
08-05-2003, 09:42 AM
I'm glad to see there is some positive response to this.

Merth, I understand that the devs are all busy just getting the basic features in 0.5.0 working and of course that takes precedence over this. Just suggesting it as something that could be used to solve a major and long-standing issue with the emu, perhaps when 0.5.0 is at or near the point that 0.4.4 is at right now.

/dev/n00b, I realize that to load a 3d model on the server side would be way too costly in terms of memory, especially with multiple zones running on a single machine, which is why I suggested the waypoint system.

Regarding who would set it up, tcsmyworld, myself, and several others are currently working on a DB built off of Drawde's final 1.1 that contains moving NPCs done with the current grid system. I'm almost sure that, if the Big Grid or something similar were to be implemented, the team wouldn't mind also putting that in, as it falls under the category of pathing. Speaking from experience, pathing dungeons is actually extremely simple and quick compared to hilly outdoor zones, and I'm willing to bet that in most dungeons a Big Grid could be constructed in something like 6 - 8 hours.

For those with custom DBs, well, when they decided to go to a custom DB they really made a choice to give up the support they would get with a more common one such as Drawde's or Telmet's in favor of greater customization. In doing that they put the burden of updating on themselves, and I don't see the construction of Big Grids to be any different than when Drawde/Telmet releases an updated DB with more spawns that those with custom DBs don't have access to. It's just a trade off.

I'm happy to know that something like this would be possible and I really think it would contribute a huge amount to the emu. As I said before, getting 0.5.0 back to where 0.4.4 was is definitely more important, but I hope you guys keep this in mind when it comes time to fix aggro through walls.

devn00b
08-05-2003, 01:39 PM
For those with custom DBs, well, when they decided to go to a custom DB they really made a choice to give up the support they would get with a more common one such as Drawde's or Telmet's in favor of greater customization. In doing that they put the burden of updating on themselves, and I don't see the construction of Big Grids to be any different than when Drawde/Telmet releases an updated DB with more spawns that those with custom DBs don't have access to. It's just a trade off.

Okay so what you are saying is " fix it for me " and screw everyone else? im 100% oposed to anything that will work for some peeps and not for others because they chose a db that isnt standard. Such as the Guildwars db that I created. Eqemu is all about customization. I find it odd that i have no problems with guk/solb ect for mobs aggroing through walls. you use drawde's db then your problem might be that you dont have aggroradius set correctly and its too large so they attach through walls.

I think there has to be a better way. NOT db dependant.

Hooke
08-05-2003, 02:57 PM
Okay so what you are saying is " fix it for me " and screw everyone else? im 100% oposed to anything that will work for some peeps and not for others

I don't understand how you got that from my post. I'm saying put the feature in and let people implement it in their own DBs as they will. It will "work" for anybody who takes the time to go through the zones and put the grids in. All I was saying was simply that if you use a custom DB, such as guildwars, that you would need to do it yourself.

I don't see how this is any different than pathing in it's current form, which must be done by hand for each DB, and I don't see anyone getting angry over that. If anything, actually, it might even be possible to port Big Grid info between DBs, because, unlike pathing currently, it wouldn't be tied to spawn group ID#'s (or NPC ID#'s, not sure which), which are DB dependent, but rather to zones themselves. This would mean that only people who have actually made custom zones would need to do it for themselves. But this is all just speculation on my part. I'm sorry if you took my post to be selfish; that's not how it was meant at all and I hope I've cleared up what I was trying to say.

I find it odd that i have no problems with guk/solb ect for mobs aggroing through walls. you use drawde's db then your problem might be that you dont have aggroradius set correctly and its too large so they attach through walls.

I don't think this is the problem, as aggro radius as it's currently set on Drawde's actually seems like it's on the low side, if anything. If you want a good example in sol b, go into the tunnel above the stone spider room and turn your gm status off. If you are KoS to LDCs you will have the entire room below on you in a couple of seconds. There are numerous other instances that you'll find if you go through the zone with gm status off and KoS to mobs. We haven't redone lguk yet so I can't speak for it, but several places stick out in my mind as spots where through-wall aggro would almost definitely occur.

I think there has to be a better way. NOT db dependant.

It's quite possible that there is. Like I said in my first post, this is simply something I'm putting out there for consideration; a fix to a problem that has bothered me for awhile. I'm not a programmer and therefore can't assess whether or not other options are available or even if this could be done.

Trumpcard
08-06-2003, 12:48 AM
I agree with what you are saying Hooke... dev, I think you might have misunderstood something he's saying.

It is pretty much identical to how pathing is implemented...

Its a good idea, but probably one that none of us will be able to work on at least until 0.5.0 has caught up with 0.4.4 in functionality...

devn00b
08-06-2003, 05:16 AM
yeah i read it wrong...reading and posting when in a nyquilled out state is not a good idea *mental note made*. been realy sick last 3 days sorry.