Feature Request: Use RobeTopLayer Table
alisonrag opened this issue · comments
Could you confirm this with the official client?
if u want to test some output i did a visual simulator:
http://visualrag.herokuapp.com/
Alright thank you. I saw that the client references the lua function but I wasn't sure whether it was really being used and in which context.
I can add this though I am not sure what "top layer" really means. It just means above headgears? Or does it also mean above weapon and shield? To me it seems to be in conflict with the other function "_New_DrawOnTop" which determines whether it is being drawn infront of the body or behind it.
Asheraf:
If i remember correctly the top layer for robes is the same as the weight in layer priority
except it's specialized for the garment slot
the default weights are
TB_Layer_Priority = {Default_Mid = 100, Default_Top = 200, Default_Bottom = 300, Default_Robe = 400 }
and based on either the default values or the overrides it can pick what to draw first
I am not sure what weight shields and weapons have as that is still hardcoded and if I remember we had a nemo patch which would make shields draw on top
which means by default they dont
less priority is first rendered:
so means by default first draw mid, then top, then bottom and the last is robe
Currently the TB_Layer_Priority
is not being utilized. Headgear order is being determined by the request order (--headgear=1,2,3
)
Please check the following image for the correct behaviour. I currently do not have time to investigate the IsRobeTop
call in the client. How I implemented it locally: If DrawOnTop
returns true then check if IsRobeTop
is true. If so, draw the garment above the headgears. If IsRobeTop
is false then draw it underneath the headgears. And if DrawOnTop
is false then draw it underneath the body.
I do not have the Charcoal hat and neither garment with id 98. The Garment for the Cat has id 25 for me:
for n in {0..7};
do
./bin/zrenderer --job=4075 --garment=25 --action=$n --headdir=straight --headgear=1884,0,25
done
I have added the code which produces the above sorting. I still need to investigate the usage for headgears. E.g. if they call the lua functions IsIgnoredRidingState
, IsHelmRobe
and GetLayerPriority
.
tip for IsIgnoredRidingState
from asheraf:
there is also other rendering options related to this
for example there is the IsIgnoredRidingState option
which makes the item not render on riding sprites
I'd place the IsIgnoredRidingState
, IsHelmRobe
and GetLayerPriority
in a separate ticket. Closing this one as the RobeTopLayer
is now supported.