Interkarma / daggerfall-unity

Open source recreation of Daggerfall in the Unity engine
http://www.dfworkshop.net
MIT License
2.73k stars 331 forks source link

Clothed Paperdoll base does not respect XML scaling. #2568

Open Carnimec opened 9 months ago

Carnimec commented 9 months ago

While you can scale any aspect of a paperdoll utilising XMLs, changing the scale of the base body for the clothed paperdoll causes issues when it tries to render either half of the clothed paperdoll over the nude one. Images: https://i.postimg.cc/85K0rBBB/unknown2.png https://i.postimg.cc/Pxr7xFZ5/unknown.png

It seems like the hardcoded values for the dimensions and where to split the nude paperdoll over the clothed one are what is causing this issue.

KABoissonneault commented 9 months ago

Can you provide the textures and XMLs that reproduce the issue, so we can test?

The hardcoded values mentioned in this issue are here btw: https://github.com/Interkarma/daggerfall-unity/tree/master/Assets/Scripts/Game/UserInterface/PaperDoll.cs https://github.com/Interkarma/daggerfall-unity/tree/master/Assets/Scripts/Game/Utility/PaperDollRenderer.cs

Note the paperDollWidth, paperDollHeight, and waistHeight. PaperDollRenderer uses the hardcoded waist height to cut the paperdoll in two. I don't think it accounts for rescaling in any case

Carnimec commented 9 months ago

Here are the files for a male wood elf with one sprite washed out so changes are more visible. The textures are two pixels taller and positioned two pixels higher in this change.

bodytextures.zip