Quote:
The code does already try and compensate for a small movement under the ground. If it can't find a BestZ on the first attempt, it bumps the mob up by 10 Z units and tries again. The amount it tries to move the mob up on the second attempt (10 units) is not currently configurable by the rules system. I'll see if tuning this number (increasing it) helps with the steep hill problem. This would be a less CPU intensive solution then my previous thought, and if it works, we could make this a configurable parameter in the rules system. |
This is a great Improvement over what we had -
It always seemed to me there were much more "hoppers" when the grids were packet spawned, than when I laid them out my self. On thing still remains, is the water hoppers - a good example is in Dagnor's Cauldron, where there are many surface swimmers, all will bounce up and down constantly. If you go to the small isle in the middle, you can follow the roamers into the water and watch them hop |
Quote:
A more complete solution would be to add an extra table to the database. Each row would contain the zone number and the co-ordinates of a 3D cube defining underwater areas (with multiple rows for zones with multiple distinct areas of water). This should allow the BestZ code to quickly check if the mob is underwater and not force it to the bottom or top of the water. I will experiment with this if I have some free time over the holidays. |
Cavedude had mentioned one temporary solution was to give the swimmers the levitation spell - This keeps them steady at what ever grid they are on. Problem is these mobs in Cauldron go in and out of water, so they float on land, and it doesn't look right.
What I'm thinking is. what code is related to levitate? maybe make an "in water" exception and apply what ever it is that removes the "gravity" in Levitate, while swimming. There must be some code that tells the NPC he is in water and this puts him in "swim-mode" (they start swimming while in water). Maybe you can exploit this and use it to eliminate the hopping too (while in swim mode, don't use Z coord). |
Quote:
Maybe I'll try making a zone with Windcatcher's OpenZone with some areas of water and see if the client detects when a player is underwater. If it does, then there must be some information in the S3D that I can extract and use. |
ive also noticed that mobs that stand on docks or in little huts are pulled through and stuck to the actual ground so they either under water or there head is sticking through the floor...
im possibly gona try and add a way to disable fixZ for selected NPCs as for water hopping... could check if NPC is in water or not(if possible).. and if its in water walk in a straight line.. (maybe, just an idea) |
I think an ignorefixz column or something such would be a good addition to npc_types. I too, have found that mobs get glued to the ground when they should be on rocks, huts, chairs, etc. This column would allow us to place exceptions on a per mob basis. The initial setup would be nuts of course, but once most of those mobs are corrected everything will look a lot better. Better yet, the column could be put in spawn2, so any mob that has those spawn points will be effected.
As for mobs in the water... there currently is no way for us to tell where water exists in the map. That's why you can fish anywhere in a zone, and why we can't keep fish from leaving ponds and such. However, if a way of determining where water is can be found, that would enable us to correct fishing, prevent fish and the like from leaving water, and help prevent the hopping under water and/or sticking to the bottom if fixedz is enabled. |
heres what i came up with today...
Code:
--- mob.h 2007/12/17 02:26:10 1.25 Code:
--- npc.cpp 2007/12/17 02:26:10 1.20 Code:
--- npc.h 2007/12/17 02:26:10 1.15 Code:
--- spawn2.cpp 2006/11/01 20:36:21 1.3 Code:
--- spawn2.h 2006/06/20 02:36:21 1.2 Code:
--- waypoints.cpp 2007/12/01 18:11:14 1.7 let me know :) EDIT:: forgot.. you have to add column in spawn2 table... fixZ tinyint[4] 0 no null default 1 |
Sweet! I'll try this out on my test box when I get home.
|
Mental note to install EQ at work for "testing".
|
Quote:
http://www.eqemulator.net/forums/sho...highlight=.wld Which talks about how water/lava region information is stored in the zone S3D file. Maybe with this, along with the OpenZone source code, and the .WLD reference linked here: http://www.eqemulator.net/forums/sho...highlight=.wld I might be able to figure out how to extract this information from the S3D into a format that can be loaded and used in the emulator. I'll give it a shot. |
Or instead of doing it right you could hack the solution. "Fix it quick now so we can fix it again later", that's always been my motto:
Apply fixz code only to mobs whose previous position conformed to the fixz code. IE, mobs that start on the ground stay on the ground. Mobs that start out on rocks or swimming are left alone. Okay, I'll shut up now. Oh, and awesome work. |
did a little more testing.. and i guess my little fix can only disable fixZ for the whole zone because...
float newz = zone->map->FindBestZ(n, dest, NULL, NULL); ...it loads the bestZ for the whole zone not just the mob i guess.. gonna try it with FixZWhenLoading disables and on SendTo/onWayPoints enabled.. might have to add a few more checks in waypoints.cpp too.. ill keep posted. |
ahh found way to make it work..
waypoints.cpp.. Code:
--- waypoints.cpp 2007/12/01 18:11:14 1.7 edit: untested as of now... going to test now will edit with results. edit2: just tested with similar results... gona mess around till i get something working then ill post =D edit3: kinda stumped :( edited all posts to what im working with currently(changed all boolean to sint, etc.).. im a noob haxor, someone help me out :P |
This is great work and all but I think it is distracting from what should really be developed, a pathing function. Fixing the z is just a temporary fix. We need proper pathing. When we do we will throw away all these fixes. And throwing away all of those man-hours makes for a lot of these: <insert tear emoticon here (no tear emoticon is maybe even sadder /tear)>
I am working on a couple pathing algorithms and am wondering if anyone has done some work on this already? I'm using 2 strategies to reduce the complexity of the pathing algorithm: (1) weighing node paths based on location between point a and b. (2) reducing the data set by pathing between the larger map subspaces then fine tuning the path. The 3d rendering on page1 shows the triangles in the map to be grouped into larger square regions. You can build paths based on these larger square regions first by drawing a line between persuer and persuant than dropping it onto the map. Then building a path inside each square from entry to exit point. This is really succesful for maps that dont require much pathing such as the karanas. But it has troubles in dungeons, where pathing is actually needed. I'm still looking at possible ways to break maps up into smaller 3d spaces that make sense as a graph. This will have to be done when a zone loads, since it is sucks the life force from any cpu. The first time a zone loads this 3d map could be generated and saved for future use. My problem is this next step is like... a lot of work. I'm wondering if it wouldn't be better to just build path maps by hand. Or be lazy and have zones listen to player movements and mutate pathing maps from those coordinates. Either way, this is problem #1 in the emulator and should get more attention. |
All times are GMT -4. The time now is 10:38 AM. |
Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.