[FIXED] Z error bug

Here we stuff all the bugs we've managed to squash/squish/squelch.
Ghostwolf
UOX3 Novice
Posts: 73
Joined: Mon Feb 11, 2008 9:41 am
Location: Hanging Around
Has thanked: 0
Been thanked: 0
Contact:

Z error bug

Post 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
User avatar
Xuri
Site Admin
Posts: 3704
Joined: Mon Jun 02, 2003 9:11 am
Location: Norway
Has thanked: 48 times
Been thanked: 8 times
Contact:

Post by Xuri »

I can verify this in client 6.0.12.4 as well, btw.
-= Ho Eyo He Hum =-
Grimson
Developer
Posts: 802
Joined: Sat Jun 04, 2005 1:52 am
Location: Germany
Has thanked: 0
Been thanked: 0

Post 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)
User avatar
Xuri
Site Admin
Posts: 3704
Joined: Mon Jun 02, 2003 9:11 am
Location: Norway
Has thanked: 48 times
Been thanked: 8 times
Contact:

Post 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 :P
Try 'go 960 759 0 for Yew Crypts.
-= Ho Eyo He Hum =-
Ghostwolf
UOX3 Novice
Posts: 73
Joined: Mon Feb 11, 2008 9:41 am
Location: Hanging Around
Has thanked: 0
Been thanked: 0
Contact:

Post by Ghostwolf »

My bad, I copied the wrong coords I put in a txt file but the problem is still the same there.
Puck
UOX3 Novice
Posts: 72
Joined: Sat Jan 23, 2010 3:22 pm
Has thanked: 0
Been thanked: 0

Post 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 :P ) 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?
giwo
Developer
Posts: 1780
Joined: Fri Jun 18, 2004 4:17 pm
Location: California
Has thanked: 0
Been thanked: 0

Post by giwo »

Walking has always been the suck in UOX. I blame the OSI client.
dragon slayer
UOX3 Guru
Posts: 776
Joined: Thu Dec 21, 2006 7:37 am
Has thanked: 4 times
Been thanked: 26 times

Post 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
dragon slayer
UOX3 Guru
Posts: 776
Joined: Thu Dec 21, 2006 7:37 am
Has thanked: 4 times
Been thanked: 26 times

Post 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.
xantier
UOX3 Novice
Posts: 58
Joined: Tue Dec 20, 2011 6:51 am
Has thanked: 0
Been thanked: 0

Post by xantier »

no it doesn't fix. i will simply implement runuo's walking code.
dragon slayer
UOX3 Guru
Posts: 776
Joined: Thu Dec 21, 2006 7:37 am
Has thanked: 4 times
Been thanked: 26 times

Post 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
xantier
UOX3 Novice
Posts: 58
Joined: Tue Dec 20, 2011 6:51 am
Has thanked: 0
Been thanked: 0

Post by xantier »

i will try to do my best
User avatar
Xuri
Site Admin
Posts: 3704
Joined: Mon Jun 02, 2003 9:11 am
Location: Norway
Has thanked: 48 times
Been thanked: 8 times
Contact:

Post 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.
-= Ho Eyo He Hum =-
xantier
UOX3 Novice
Posts: 58
Joined: Tue Dec 20, 2011 6:51 am
Has thanked: 0
Been thanked: 0

Post 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 ?
xantier
UOX3 Novice
Posts: 58
Joined: Tue Dec 20, 2011 6:51 am
Has thanked: 0
Been thanked: 0

Post 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.
xantier
UOX3 Novice
Posts: 58
Joined: Tue Dec 20, 2011 6:51 am
Has thanked: 0
Been thanked: 0

Post 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.
User avatar
Xuri
Site Admin
Posts: 3704
Joined: Mon Jun 02, 2003 9:11 am
Location: Norway
Has thanked: 48 times
Been thanked: 8 times
Contact:

Post 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.
-= Ho Eyo He Hum =-
xantier
UOX3 Novice
Posts: 58
Joined: Tue Dec 20, 2011 6:51 am
Has thanked: 0
Been thanked: 0

Post 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.
Attachments
source.zip
I think these are the files that i changed. Tell me if you get some errors.
(24.07 KiB) Downloaded 227 times
xantier
UOX3 Novice
Posts: 58
Joined: Tue Dec 20, 2011 6:51 am
Has thanked: 0
Been thanked: 0

Post by xantier »

wow npcs have some pathfinding problems and that crashes my client. and some warnings on console. something's wrong with pathfinding
User avatar
Xuri
Site Admin
Posts: 3704
Joined: Mon Jun 02, 2003 9:11 am
Location: Norway
Has thanked: 48 times
Been thanked: 8 times
Contact:

Post 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.
-= Ho Eyo He Hum =-
Locked