Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

WZ How does smap + vslot + z work?

Newbie Spellweaver
Joined
Feb 5, 2018
Messages
7
Reaction score
0
I am working on a v75 avatar renderer and I'm stuck on how these three things work. I know it has something to do with hiding body parts, but I'm not 100% certain how hidden body parts are determined.

For example, if you wear a Zakum Helmet (1002357) with hair Black Rebel (30020) and your stance is "stand1", hairOverHead will be hidden. Look at Zakum Helmet (Character.wz/Cap/01002357/info/vslot) the value is "CpH1H2H3H4H5HfHsHbAe". And defautl/default/z is "capBelowAccessory". Now if you look at Base.wz/smap/capBelowAccessory the value is "CpHdH1H2H3H4H5H6HsHfHbAfAyAsAe". Additionally, if you look at Character.wz/Hair/00030020/info/vslot the value is "H1H2H3H4H5H6HfHsHb" and default/hairOverHead/z is "hairOverHead". How are these values used to determine that hairOverHead is invisible?

As another example, if you wear a Jousting Helmet (1002023), both the character's head and earring will be hidden. Now if you take a look at Character.wz/Cap/01002023/info/vslot the value is "CpHdH1H2H3H5HfHsFcAfAyAsAfAe" and default/default/z is "cap". Then look at Base.wz/smap/cap... the value is "CpHdH1H2H3H4H5H6HsHfHbAfAyAsAe". I just don't understand how these values are parsed so that the head AND earring will not be rendered.

I know this is a very specific and targeted question, but I'm stuck here and would like to consult the experts on RZ. Any help is appreciated.
 
Newbie Spellweaver
Joined
Sep 5, 2015
Messages
14
Reaction score
3
So this blurs the lines of WZ editing and client-side stuff and I haven't touched WZ's in a while but I'll throw you a bone since no one else has replied.

The simplest way to look at this is by breaking it down. First off, z is telling the client how layers should be ordered. This is an important distinction - z is not just telling the client what to render, but more importantly what order to render them in. Instead of using numbers like the x,y coords, they name the layers of the character zmap and tell the client what order to stack them, basically. This is where smap.img comes in -- if you think of z's as ingredients, smap is the recipe book. Each string is either a premade recipe or abbreviation for the ingredients. vslot is the z value for the item when you view it on yourself in the equipment tab or someone inspects you (iirc).

So the jumbled value you're seeing in vslot and z is the order of layering. Think photoshop layers.

For example, I'll break down your two items:

For the Zakum Helm:
The vslot is an entirely different z, we don't care about that unless you want to see what it looks like in the equipment panel.
For stand1, we get UOL'd to default/default/z, which is capBelowAccessory.
So we reference our handy dandy smap.img to find the "recipe", which is "CpHdH1H2H3H4H5H6HsHfHbAfAyAsAe".
Now we break down that recipe using the smap strings to get our z layers.
Front to Back in descending order:
Cp - cap
Hd - head
H1 - hairOverHead
H2 - hair
H3 - backHair
H4 - backHairBelowCapWide
H5 - backHairBelowCapNarrow
H6 - backHairBelowCap
Hs - hairShade
Hf - backHairBelowHead
Hb - hairBelowBody
Af - accessoryFace
Ay - accessoryEye
As - accessoryEyeShadow
Ae - accessoryEar

Now because of the way these are loaded, we can see that hairOverHead is actually layered behind the head, thus making it seem as if it is not being rendered. However, it's just being rendered behind the head layer. This is a clever way to hide the layer without having to tell the client to not render it.


With the Jousting Helmet:
This time, lets act like we actually do want to see the vslot, because we want to see the order it's layered in the equipment panel.
This vslot doesn't use a premade "recipe" string instead it throws the ingredients together on its own.
However it still uses the same ingredient abbreviations so we can still interpret it using smap.
The vslot is: CpHdH1H2H3H5HfHsFcAfAyAsAfAe
Breaking that down the same as before:
Cp - cap
Hd - head
H1 - hairOverHead
H2 - hair
H3 - backHair
H5 - backHairBelowCapNarrow
Hf - backHairBelowHead
Hs - hairShade
Fc - face
Hb - hairBelowBody
Af - accessoryFace
Ay - accessoryEye
As - accessoryEyeShadow
Af - accessoryFace (not sure why Af is twice :shrug:; may be typo, wz's are known for them)
Ae - accessoryEar

Here we can again see that instead of not rendering the head and earrings (head and accessoryEar) they are layered underneath the helmet.
You can however, note the disappearance of some of the previous layers like "H4 - backHairBelowCapWide" which means these won't be loaded.
I'm assuming this is only done when, like in this case, wide hairs would show even under the helmet, which is of course not the intended look.

At least that's what I make of it as an old WZ editor. Hopefully this makes sense to you and gives you some idea on how to approach your issue.
 
Last edited:
Upvote 0
Newbie Spellweaver
Joined
Feb 5, 2018
Messages
7
Reaction score
0
@xrandox

That doesn't seem to be correct.

To test your hypothesis, I changed hairOverHead to a 200x38 box for the sake of having a large and obvious image for testing.

Before:
yask1ak - How does smap + vslot + z work? - RaGEZONE Forums


After:
nzCMICN - How does smap + vslot + z work? - RaGEZONE Forums


After that, I went into the game on a character before putting on a ZHelm. As you would expect, the red box is very wide and visible:
tTaZM6a - How does smap + vslot + z work? - RaGEZONE Forums


Now, if I equip the ZHelm, by your logic, hairOverHead (the red box) won't be deleted; it will be put to a lower layer. Therefore, the red box should still be visible. This is what actually happens when the ZHelm is equipped:
7C2iRJs - How does smap + vslot + z work? - RaGEZONE Forums


hairOverHead does get deleted, otherwise it should still be visible.
 

Attachments

You must be registered for see attachments list
Upvote 0
Junior Spellweaver
Joined
Sep 16, 2017
Messages
156
Reaction score
36
I've never been into equipment WZ editing, however, by the looks of it, I believe this could be a possible answer:

- zmap.img is the list of every node ordered by visibility, from most visible to least (much like Photoshop layers). Note that HaRepacker may order this list alphabetically; to see the correct ordering, you can export zmap.img as XML and open it in a web browser.

- The z property of items takes care of drawing each character sprite piece in the correct layering order.

- The vslot property, in the info node, determines which single slots will be covered by your item.

If we consider the Zakum Helmet example, we notice how the item occupies CpH1H2H3H4H5HfHsHbAe, which means that any other item that is supposed to occupy those slots will instead be "overwritten" by the zhelm.


I'm not sure what smap.img is used for, however.
 
Upvote 0
Experienced Elementalist
Joined
Feb 15, 2010
Messages
201
Reaction score
296
Cp,CpH5 - no delete
CpH1H5 - delete hairOverHead
CpH1H2H3H4H5HfHsHbAe (or CpHdH1H2H3H4H5H6HsHfHbAfAyAsAe) -delete all

I use above simple rules for my own custom client.That almost suitable for 99% of equip.
 
Upvote 0
Newbie Spellweaver
Joined
Sep 5, 2015
Messages
14
Reaction score
3
@xrandox
That doesn't seem to be correct.

Apologies for answering without actually testing, I just CBA to get in game anymore ^^; I agree with Pipo's thoughts though.

If we consider the Zakum Helmet example, we notice how the item occupies CpH1H2H3H4H5HfHsHbAe, which means that any other item that is supposed to occupy those slots will instead be "overwritten" by the zhelm.
The z value being the layers the item "overwrites" makes the most sense.

@caltech Try removing H1 from zhelm and your box should show through.

I'm not sure what smap.img is used for, however

I"m pretty sure smap.img is just the reference strings for zmap.img, not sure about that though -shrug-
 
Upvote 0
Newbie Spellweaver
Joined
Feb 5, 2018
Messages
7
Reaction score
0
Okay, so after some extensive trial and error, my findings seem to confirm that there is in fact a relationship between smap, vslot, and z. However, I am not sure what that relationship is. Take ZHelm (1002357) and Black Rebel (30020) as test subjects. Without changing anything, equipping the ZHelm hides the image at 30020/default/hair.

Now consider what happens when one of these changes occurs:

delete H2 from 30020/info/vslot => 30020/default/hair is visible
change 30020/default/hair/z to cape => 30020/default/hair is visible
change 30020/default/hair/z to accessoryEar => 30020/default/hair is visible
change 30020/default/hair/z to armOverHair => 30020/default/hair is visible
change 30020/default/hair/z to backCap => 30020/default/hair is invisible (but this causes 30020/default/hairBelowBody to be visible)
delete H2 from 1002357/info/vslot => 30020/default/hair is visible
change 1002357/default/default/z to mailArmOverHair => 30020/default/hair is visible
change 1002357/default/default/z to accessoryEar => 30020/default/hair is visible
change 1002357/default/default/z to cape => 30020/default/hair is visible
change 1002357/default/default/z to hair => 30020/default/hair is invisible
change 1002357/default/default/z to backCap => 30020/default/hair is invisible
change smap/hair to H1 => 30020/default/hair is invisible
change smap/hair to Bd => 30020/default/hair is visible
change smap/hair to Ae => 30020/default/hair is visible
change smap/hair to As => 30020/default/hair is visible
change smap/hair to Cp => 30020/default/hair is visible
change smap/hair to CpH1 => 30020/default/hair is invisible
change smap/hair to CpH1H2 => 30020/default/hair is invisible
change smap/hair to H1H2 => 30020/default/hair is invisible
 
Upvote 0
Newbie Spellweaver
Joined
Feb 5, 2018
Messages
7
Reaction score
0
Interestingly, it seems that islot is also relevant.

Originally, 1002357/info/islot is Cp and 30020/info/islot is Hr. This causes all hair frames (hairOverHead, hair, hairBelowBody, hairShade) to be hidden.

But if you swap those islot values, i.e. 1002357/info/islot=Hr and 30020/info/islot=Cp, then the ZHelm is not rendered but all hair frames are.
 
Upvote 0
Back
Top