[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)
JoinUO Forums • View topic - Colors
Page 1 of 2

Colors

PostPosted: Tue Sep 07, 2010 3:03 pm
by roguan

Re: Colors

PostPosted: Wed Sep 08, 2010 8:34 pm
by Batlin
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 7025 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 7025 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 7025 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).

Re: Colors

PostPosted: Wed Sep 08, 2010 9:06 pm
by roguan
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!

Re: Colors

PostPosted: Wed Sep 08, 2010 9:53 pm
by Batlin

Re: Colors

PostPosted: Thu Sep 09, 2010 1:45 pm
by Derrick
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.

Re: Colors

PostPosted: Thu Sep 09, 2010 10:52 pm
by Batlin

Re: Colors

PostPosted: Thu Sep 09, 2010 11:33 pm
by roguan

Re: Colors

PostPosted: Fri Sep 10, 2010 1:58 pm
by Derrick
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?

Re: Colors

PostPosted: Fri Sep 10, 2010 7:08 pm
by roguan
Confirmed. Female Jewelers are the only NPC's I've seen with this faulty equip code.

Image
Image
Image

Re: Colors

PostPosted: Sat Sep 11, 2010 2:29 am
by Kaivan