NPC Headaches...

Forum where anything UOX3-related goes - including, but not limited to: newbie-support, ideas, general questions, comments, etc and-so-forth.
Post Reply
arfon
UOX3 Neophyte
Posts: 35
Joined: Tue Sep 06, 2005 9:36 pm
Location: Texas
Has thanked: 0
Been thanked: 0

NPC Headaches...

Post by arfon »

Q1:
I know this is a very old issue (spanning several different emus) but, what is the OFFICIAL UOX3 fix for NPCs walking on tables and such?

Many years ago when I ran WP, their fix was to cover the tables with invisible walls to prevent this but, all those extra objects just slows down the server.

Q2:
I noticed that NPCs aren't opening doors and going through them. What's the fix?[/b]
Sydius
UOX3 Apprentice
Posts: 171
Joined: Thu Mar 25, 2004 3:22 am
Has thanked: 0
Been thanked: 0

Post by Sydius »

I fixed both of those issues in my version based off an old version of UOX… Neither were very difficult changes, though I do not know if the same would be true about today’s code.

The door opening thing was very easy – took maybe an hour to fix the code, but I had to add another variable to each and every NPC that I wanted to have the ability to open doors… Otherwise, bunnies would open doors! Sounds like a job for Xuri, if giwo can fix the code.

I do not remember for sure, but I think I made the path-finding algorithm ignore doors if the NPC had a “could open doors” flag sat, and then, whenever a door was blocking the NPC from walking (in the walking code), it would be opened. Simple enough.

As for tables… That is a height issue – I fixed it by having a way to over-ride the default height of items – this also fixed the broken ladders.
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 »

Hm. I notice that all the tables/display cases have the "Block"-flag set in tiledata.mul - so I assume checking that before letting the NPCs walk might do the trick - though that'd mean UOX3 would check it on every NPC for every single step they take. Not sure if there's much overhead involved in that or not.
-= Ho Eyo He Hum =-
giwo
Developer
Posts: 1780
Joined: Fri Jun 18, 2004 4:17 pm
Location: California
Has thanked: 0
Been thanked: 0

Post by giwo »

We do quite alot of tile checking in the walk functions, so I don't see a reason we couldn't check a block flag. The real question is how accurate the block flag is.
Scott
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 »

Hm. Useful now would be a tool which allowed me to run through tiledata.mul and create a list of all items which have some specified flags/bits/whatever they are - in this case the "Block"-one.

Checking such a list would be much easier than go through each and every object in the tiledata manually to see if there are any items which should be walkable but still have the block-flag set. :P
-= Ho Eyo He Hum =-
arfon
UOX3 Neophyte
Posts: 35
Joined: Tue Sep 06, 2005 9:36 pm
Location: Texas
Has thanked: 0
Been thanked: 0

Post by arfon »

Instead of a new tool (which will become outdated) why not just have the startup run a script to check the flags and make a file?
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 »

Unsure what you mean by that, exactly. Please elaborate. :)
-= Ho Eyo He Hum =-
Post Reply