zhad3 / zrenderer

A renderer for Ragnarok Online sprites

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Feature Request: Use RobeTopLayer Table

alisonrag opened this issue · comments

in data/luafiles514/lua files/datainfo/spriterobename.lub the RobeTopLayer define robes that will be rendered at the top:
image

this robe should be at top and not be covered by the helmt

commented

Could you confirm this with the official client?

luckily i have these 2 visuals in game haha

bRO client. this was reported by: Asheraf f(hercWS dev), same behavior in kRO

image

image

if u want to test some output i did a visual simulator:
http://visualrag.herokuapp.com/

commented

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

commented

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.
isTopLayerGarment

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
commented

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
commented

I'd place the IsIgnoredRidingState, IsHelmRobe and GetLayerPriority in a separate ticket. Closing this one as the RobeTopLayer is now supported.