Page 1 of 2
Z error bug
Posted: Sun Mar 15, 2009 1:39 am
by Ghostwolf
I've been running into a problem when accessing basements and underground places like Yew crypts. When I try to go down my character bounces back to the 1st floor unable to access the lower floors. I tested different things but found something odd that the Z level never changes
Yew Crypts
2676 2276 -20
If you go down the stairs your at the same Z level you were at the top. Also it screws up npc path finding if you teleport off the stairs
Art Gallery Next to Brit bank
1440 1660 10
Z level never changes
The Salty Dog
1616 1576 0
Z never changes
Jhelom Library
1377 3768 0
Same here
Other places effected
all entrances to Jhelom fighting pit
Buccaneer's den caverns
So far I have yet to find an underground spot that isn't effected.
Running latest release using 4.0.3e client
Posted: Sun Mar 15, 2009 3:16 am
by Xuri
I can verify this in client 6.0.12.4 as well, btw.
Posted: Sun Mar 15, 2009 10:42 am
by Grimson
Might be related to this change:
7/27/2008 - Xuri
Increased MAX_Z_LEVITATE from 10 to 15 to better deal with moving on uneven terrain (like in T2A)
Posted: Sun Mar 15, 2009 2:55 pm
by Xuri
Related, possibly. But I still experience the same issues after changing it back to 10.
EDIT: Btw, Ghostwolf: The coordinates you list for Yew Crypts actually go to the caves underneath Bucc's Den

Try 'go 960 759 0 for Yew Crypts.
Posted: Sun Mar 15, 2009 8:00 pm
by Ghostwolf
My bad, I copied the wrong coords I put in a txt file but the problem is still the same there.
Posted: Wed Feb 03, 2010 3:06 am
by Puck
Grimson wrote:Might be related to this change:
7/27/2008 - Xuri
Increased MAX_Z_LEVITATE from 10 to 15 to better deal with moving on uneven terrain (like in T2A)
I too have those problems described by ghostwolf for instance when entering the britain sewers or sometimes even just when exiting a guardhouse. Would it be possible (or rather: can I bother somebody to do it for me

) to revert that change, just to do some testing?
Maybe a bandaid solution like ... set the value to 12 just to have a look here and there and see if it still shoots you through the ceiling like you're supermario on mushrooms?
Posted: Sat Feb 06, 2010 1:34 am
by giwo
Walking has always been the suck in UOX. I blame the OSI client.
Re: Z error bug
Posted: Sun Dec 25, 2011 6:36 am
by dragon slayer
I think i have fixed this z bug hahaha
change this line
#define MAX_ITEM_Z_INFLUENCE 10
to
#define MAX_ITEM_Z_INFLUENCE 20
LOl if any tile is at a z level 10 it hits the chars head makes him teleport back hole reason things are being blocked on other stairs that have shit in the way
I hope this fixes the z bug thanks all
Re: Z error bug
Posted: Tue Dec 27, 2011 8:15 am
by dragon slayer
Bump any one confirm my fix if it worked or not. Because i still can't get the source to compile for me.
Re: Z error bug
Posted: Tue Dec 27, 2011 7:47 pm
by xantier
no it doesn't fix. i will simply implement runuo's walking code.
Re: Z error bug
Posted: Tue Dec 27, 2011 9:49 pm
by dragon slayer
If you get walking to work really good you should send your work to xuri love to see new dev on this project.

I'm just a js guy good at making js scripts maybe one day il be good enough to work on c++ lol
Re: Z error bug
Posted: Wed Dec 28, 2011 9:11 pm
by xantier
i will try to do my best
Re: Z error bug
Posted: Wed Dec 28, 2011 11:11 pm
by Xuri
One of the problems with walking in UO is that there are a lot of special cases to mind, because the world-design isn't coherent from one location to another. Some examples of things to check for:
- Walking up/down different types of ladders of different sizes, both dynamic and static objects, where the various parts of the ladders (top/middle/bottom) might be offset slightly from one location to another.
- Walking up/down different types of stairs, both dynamic and static objects, where the blocks of stair are offset differently from one location to another.
- Walking up/down stairs/ladders inside multis (player houses).
- Walking up/down hills in the landscape. What works in Britannia might not work in the Lost Lands (T2A), which has very varied and seemingly random terrain-elevation, compared to the mostly flat old world.
- Walking onto/off planks on boats
- What about speedhacking? How do we determine whether or not any given player is moving faster than he's supposed to? Movement speeds are partially determined by the speed at which the movement-animations are playing in the client. Speed up the client, and you will move faster if the server allows for that.
- Making sure the walking code works for both players and NPCs
And with the latter comes a new bunch of things to take into consideration, like:
- NPC pathfinding for all the above cases
- NPC pathfinding around other NPCs
- NPC pathfinding around dynamic/static objects
- NPC pathfinding when fleeing from combat
- Updating NPC pathfinding when the conditions for pathfinding change on the fly (object suddenly blocks path, target has moved, etc)
- Should NPCs be allowed to "cut corners", to better keep up with players?
- What about player pets that are following the player around?
Getting the walking code right is unfortunately not an easy task, and in UOX3's case, it has been unattended for many years, as there have not been a whole lot of people with enough free time and will to take on the huge task that is making this part of the code work flawlessly.
Re: Z error bug
Posted: Fri Dec 30, 2011 2:01 am
by xantier
i finally implemented runuo z check but there are still bugs at some places. maybe could it be about mulhandler class ? perhaps it reads something wrong about stairs ?
Re: Z error bug
Posted: Fri Dec 30, 2011 2:51 am
by xantier
i am sure that the problem is about reading mulfiles or corrupted mulfiles. especially places with "wooden boards" are ignored, z not checked.. i couldnt figure out why yet. i gotta sleep, i will take a look tomorrow.
Re: Z error bug
Posted: Mon Jan 02, 2012 7:46 pm
by xantier
I have completely removed Z problems by implementing RUO's walking code. I tried every location you have mentioned above. I keep trying everywhere. I don't know how to post walkcheck code because i have added a few funcs and i don't use cvs.
Re: Z error bug
Posted: Tue Jan 03, 2012 6:01 am
by Xuri
Interesting! Does it still support the flying/swimming-creatures that is in current UOX3 walking code? You can zip up the affected files and attach them to a post on the forums, btw.
Re: Z error bug
Posted: Tue Jan 03, 2012 6:12 am
by xantier
actually there is no special walking code for flying creatures but swimming ones. because only swimming creatures can walk on the surfaces those block and are wet. uox3 emulator is a bit out of standards, i couldn't find CAN flags for creatures. there is something like IsWater but i couldn't find something like CanWalk so that i could check if the npc can also walk on the earth even it is a sea monster.
Re: Z error bug
Posted: Tue Jan 03, 2012 6:48 am
by xantier
wow npcs have some pathfinding problems and that crashes my client. and some warnings on console. something's wrong with pathfinding
Re: Z error bug
Posted: Tue Jan 03, 2012 7:59 am
by Xuri
Try removing the (temporary, for experimental build purposes) code I put into bool cMovement::AdvancedPathfinding() in movement.cpp in an attempt to stop NPCs from queuing up in a line to attack you, and see if that changes anything.