Go Back   EQEmulator Home > EQEmulator Forums > Development > Development::Development

Development::Development Forum for development topics and for those interested in EQEMu development. (Not a support forum)

Reply
 
Thread Tools Display Modes
  #1  
Old 12-07-2007, 09:32 PM
Derision
Developer
 
Join Date: Feb 2004
Location: UK
Posts: 1,540
Default

Quote:
Originally Posted by moydock View Post
So what if you forced the z coord of the waypoint a mob is headed to always be the highest point in the zone. Then they wouldn't go through hills and the z-fix already in place would keep them on the ground. Would that work?
The first problem I see with that is zones with multiple ground levels, e.g. dungeons, or Kelethin, with the city in the trees.

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.
Reply With Quote
  #2  
Old 12-17-2007, 01:45 PM
Angelox
AX Classic Developer
 
Join Date: May 2006
Location: filler
Posts: 2,049
Default

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
Reply With Quote
  #3  
Old 12-18-2007, 09:07 AM
Derision
Developer
 
Join Date: Feb 2004
Location: UK
Posts: 1,540
Default

Quote:
Originally Posted by Angelox View Post
If you go to the small isle in the middle, you can follow the roamers into the water and watch them hop
I see what you mean. I tried a few tweaks without much success. Even if I did tweak the code to stop the hopping, as it stands, the code would keep the mob at the surface of the water, or make it follow the contours of the bottom of the lake. Although the client knows when a player is underwater, I don't believe the server can tell (from a few quick greps for the words water/air/drowning etc.)

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.
Reply With Quote
  #4  
Old 12-18-2007, 10:38 AM
Angelox
AX Classic Developer
 
Join Date: May 2006
Location: filler
Posts: 2,049
Default

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).
Reply With Quote
  #5  
Old 12-18-2007, 10:56 AM
Derision
Developer
 
Join Date: Feb 2004
Location: UK
Posts: 1,540
Default

Quote:
Originally Posted by Angelox View Post
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).
I am fairly sure that there is code in the client that 'knows' that an NPC is in water and turns on the swimming animation, rather than the server telling it. If this is the case, I don't know whether there is some information in the zone S3D/EQG file that the client uses, or whether the client has some hard-coded information.

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.
Reply With Quote
  #6  
Old 12-19-2007, 04:05 AM
Cripp's Avatar
Cripp
Discordant
 
Join Date: Oct 2003
Location: The Shire
Posts: 474
Default

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)
__________________
Nug Blazers - ServerOP / founder
^^comming... later!

www.nugblazers.com
Reply With Quote
  #7  
Old 12-19-2007, 04:19 AM
cavedude's Avatar
cavedude
The PEQ Dude
 
Join Date: Apr 2003
Location: -
Posts: 1,988
Default

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.
Reply With Quote
  #8  
Old 12-23-2007, 08:50 AM
Derision
Developer
 
Join Date: Feb 2004
Location: UK
Posts: 1,540
Default

Quote:
Originally Posted by Angelox View Post
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.
I only just realised what a problem pathing in water was, even without the BestZ code. I.e. the client appears to make all the mobs sink to the bottom of the water. You can see this in powater at -232.25,-699.5,-98.125 ... mobs being put in a particular spot by the server, then sinking, and then popping up again when the server sends the next movement update.

I added an extra field to the Mob class, inWater, initialised to false. In the waypoint movement routine, I put a check to see if the mob is underwater and it wasn't previosly (Mob->inWater==false). If this is the case, it puts flymode 1 on the mob and sets Mob->inWater=true.

Likewise if the mob is not in water when it was on the last check, it turns the flymode off.

This seems to help in Powater and Kedge. The mobs hop once after the zone is loaded until they pass through the waypoint routine the first time, and then they swim as they should without the client making them sink. It won't help with static mobs which aren't on grids. They will just spawn and fall to the bottom and stay there. I guess I could put some code in the NPC spawn routine to check if they are in water and turn the flymode 1 on at that point. This would work for the static spawns and stop the initial hop for the wanderers.

I don't know whether there is any downside to doing this. Needs more testing. I wonder how the live servers handle it?
Reply With Quote
  #9  
Old 12-23-2007, 10:17 AM
Derision
Developer
 
Join Date: Feb 2004
Location: UK
Posts: 1,540
Default

I had a PM about when I am going to release these changes I have been working on. I will put something out this week. It may not be in a form that is ready for merging into CVS, but at least it will give people who are interested a chance to test the changes and report on any issues etc.
Reply With Quote
  #10  
Old 12-23-2007, 08:09 PM
KLS
Administrator
 
Join Date: Sep 2006
Posts: 1,348
Default

If a solution like this were to come into usage I think we'd need to inevitably figure out how to create a water map from an .EQG file too.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

   

All times are GMT -4. The time now is 10:53 PM.


 

Everquest is a registered trademark of Daybreak Game Company LLC.
EQEmulator is not associated or affiliated in any way with Daybreak Game Company LLC.
Except where otherwise noted, this site is licensed under a Creative Commons License.
       
Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3