[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4712: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3842)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4714: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3842)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4715: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3842)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4716: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3842)
Colors | JoinUO Forums

Colors

The UO "Demo" is a slightly modified OSI UO Server and Client which was bundled on the Ultima Online Second Age retail CD. This forum seeks to reveal it's mysteries.

Posts: 18
Joined: Tue Sep 07, 2010 1:57 pm
PostPosted: Tue Sep 07, 2010 3:03 pm

Site Admin
Posts: 372
Joined: Wed Apr 08, 2009 6:35 am
PostPosted: Wed Sep 08, 2010 8:34 pm
I believe the colors for sandals are black because of what you said and have a hue of 0 send to the client.

I used some breakpoint to track the creation of the sandals (type=5901 or 0x170D):
CreateObject (AX==0x170D).jpg
CreateObject (AX==0x170D).jpg (117.68 KiB) Viewed 8463 times


And I used hardware breakpoints to track where the hue variable is accessed in memory:
Hardware Breakpoint.jpg
Hardware Breakpoint.jpg (150.55 KiB) Viewed 8463 times


Result: the hue was never written to, so it remained 0 all the time.

Next: I used the LOGFILE option of uodemo+ to track the messages send from the server to the client:
Razor Log.jpg
Razor Log.jpg (25.52 KiB) Viewed 8463 times
As you can see on that screenshot, the hue is 00 00, which resembles the memory layout of the sandal server-side. So the client is drawing the sandal with a hue of 0. You can refer to for the 0x2E packet layout.

Some sandals do spawn with a color, but they are part of the random_shoes definition (5901 & 5903).
<Derrick> RunUO AI is kind of a functional prototype, which i have hacked into something resembling OSI behavior, but only by complitcating everything

Posts: 18
Joined: Tue Sep 07, 2010 1:57 pm
PostPosted: Wed Sep 08, 2010 9:06 pm
Wow, thank you. This is really helping me understand the flow of things in the dissassembly.

But, this case whence the hue is never modified, does this then imply that sandals are always black upon creation? Where would "choice" of hue take place, for example the range applied to the random_shoes aggregate?
It's much more difficult to find these things without the function labels in place =/

Thanks!

Site Admin
Posts: 372
Joined: Wed Apr 08, 2009 6:35 am
PostPosted: Wed Sep 08, 2010 9:53 pm
<Derrick> RunUO AI is kind of a functional prototype, which i have hacked into something resembling OSI behavior, but only by complitcating everything

Site Admin
Posts: 455
Joined: Tue Jun 17, 2008 2:33 pm
PostPosted: Thu Sep 09, 2010 1:45 pm
Hue zero is always the default unhued graphic; so for sandals, hue zero is brown as that's their natural unhued color.

However it looks like NEUTRAL_COLORS is the key here.

RANDOM_SHOES { 5903 1 5901 1 }
NEUTRAL_COLORS 1801 1887

There is definitely one hue in NEUTRAL_COLORS, 1881 which looks pretty darn black to me when applied to sandals; I suspect this is the source of the black sandals on weavers. This gives a weaver a 1 in 174 chance of spawning sandals in a particular hue, although there may be one or two other hues in the color set that players may have called black.

True Black, usually hue 1 does seem to be used for beggar sandals, although it's some pretty unusual syntax, I'd like to verify this via the Demo if we can spawn a few beggars there it should be pretty revealing.

Thanks much for this thread.

Site Admin
Posts: 372
Joined: Wed Apr 08, 2009 6:35 am
PostPosted: Thu Sep 09, 2010 10:52 pm
Attachments
Black NPC with 1881 hued sandals.png
Black NPC with 1881 hued sandals.png (88.89 KiB) Viewed 8451 times
Beggar Fest.png
Beggar Fest.png (243.31 KiB) Viewed 8451 times
3 beggars, 1 with sandals, hue=0.png
3 beggars, 1 with sandals, hue=0.png (244.31 KiB) Viewed 8451 times
<Derrick> RunUO AI is kind of a functional prototype, which i have hacked into something resembling OSI behavior, but only by complitcating everything

Posts: 18
Joined: Tue Sep 07, 2010 1:57 pm
PostPosted: Thu Sep 09, 2010 11:33 pm

Site Admin
Posts: 455
Joined: Tue Jun 17, 2008 2:33 pm
PostPosted: Fri Sep 10, 2010 1:58 pm
Wow, I missed that entirely, I even copied that equipment line into a comment in my own soure code yesterday and didn't notice neutral_shoes. Thanks!

Can you verify that those are coming out as Hue=1?

Posts: 18
Joined: Tue Sep 07, 2010 1:57 pm
PostPosted: Fri Sep 10, 2010 7:08 pm
Confirmed. Female Jewelers are the only NPC's I've seen with this faulty equip code.

Image
Image
Image

Posts: 17
Joined: Thu Apr 23, 2009 1:27 am
PostPosted: Sat Sep 11, 2010 2:29 am
Attachments
blacksandals3.PNG
blacksandals3.PNG (321.78 KiB) Viewed 8438 times
blacksandals2.PNG
blacksandals2.PNG (334.51 KiB) Viewed 8438 times
blacksandals.PNG
blacksandals.PNG (316.67 KiB) Viewed 8438 times
Next

Return to UO Demo

Who is online

Users browsing this forum: No registered users and 0 guests

cron