Closed ReneeIbeji closed 1 month ago
Yeah I've noticed this and I'm not sure how they fill in properly. Some items straight up work and others don't. If there's something I'm doing wrong when adding new assets I'd like to know so I can correct these problems in the future. Maybe it is just the code, though.
The other thought I had is that it is related to only handling the top most layer listed, in the first frame, and with many of the assets I'm adding having multiple layers, if its not in the first frame of the first layer it won't show up.
What I found was with most items it was the layer issue.
The preview image is taken from the items preview-row (which is by default 10 and only defined in 4 sheet definitions) multiplied by 64 (the universal frame size) and takes a 64 by 64 image from that point so on the normal sprite sheet, it ends up using the 1st sprite on the 11th row of the sprite sheet.
I've found that the preview image being blank has two causes:
"name": "Recurve",
"type_name": "weapon",
"preview_row": 17,
I've already implemented the code needed to display all layers of an item as the preview image in my own fork of the project on git hub and will just submit it as a pull request.
For the second issue, it mainly seems to impact weapons as they don't seem to follow the standard format of all the other spreadsheets, so just try setting the preview_row attribute in those items definition files with the steps above to try and get them to show. Just comment if you have any questions.
For the case where there just so happens to not be anything in that particular sprite frame, try changing the preview row attribute to the row number of a row that does have something in that frame.
Doesn't look too bad, but I do see a few areas where there's a problem. This is the big one I'm seeing:
It seems that the layering maybe isn't taking into account the z-index properly? Because these hairstyles are a mixmatch of having the correct layering and incorrect layering.
Its not a big deal, just something to note.
The wings look excellent now, it was really annoying not being able to see the wings in the previews:
Yeah fixed the layering issue, was just using the wrong value for the first layers zpos, should be fixed now! Edit: there might still be some issues still testing
There seems to be an issue in the order of when the images are loaded, so sometimes the top layer is drawn first before the bottom layer, will try to look into it.
OK, I think the problems solved now, just had to make sure all the layers of the item are loaded before drawing them onto the page in the correct order
Just comment if you notice anything
Yup, there we go, that looks better!
I don't think it looks very great having the foreground laying over the background without the body in the middle, but at least having it layered correctly makes it look a lot better so you have the front of the hair in front of the back and properly see the bangs and everything. Not much we can do about the hair, but this layering REALLY fixes up assets like the wings and tails!
Preview images for some items (e.g. wings) appear to be blank.
I've partially fixed the issue in my own fork of the repository by drawing all the layers of the item in order of their z position instead of drawing just the first layer. This seems to fix most of the issues.
However, there still seems to be some issues framing and viability with particular item previews like some of the weapons.