If you're having trouble or run into any bugs with the code, post a comment here! I will try to get back to you within a few days.
Visually construct character expressions to paste into script · By
Hi! Thank you so much for creating this tool! I'm not sure if this is user error on my part (and sorry if so), but when I copied the folder into my game and ran the launcher, it threw this error:
I'm sorry, but errors were detected in your script. Please correct the errors listed below, and try again. File "game/image_tools/image_attributes_tool.rpy", line 803: keyword argument 'align' is incompatible with 'xpos'. ypos sprt.SPACER*3 align (0.0, 0.0) ^ Ren'Py Version: Ren'Py 8.1.3.23091805 Mon Sep 25 11:13:23 2023
If I comment out
ypos sprt.SPACER*3 align (0.0, 0.0)
in image_attributes_tool.rpy (line 803), it runs just fine. I'm pretty new at ren'py (&python) so I'm not really sure what can be done to fix this.
Oh no worries! Thank you for bringing it to my attention. You can change it to
ypos sprt.SPACER*3 anchor (0.0, 0.0)
to make the issue go away - it's a developer warning since align technically also tries to set ypos. It's due to a config value called check_conflicting_properties introduced in the most recent Ren'Py version - you can also disable it with
define config.check_conflicting_properties = False
to avoid these sorts of errors, though I'll also update the code to avoid that issue.
Heeeey, i have a bunch of suggestions, feel free to add them or not.
>A way to hide the group menu and show the sprite in fullscreen. Often I'm using your tool to check if I forgot to draw an arm variant for some clothes, so what I like to do is just take a screenshot of the sprite, draw over it in Photoshop the sleeves it's missing and export the image that I add over it in the layered image lol. But sometimes the arm is cropped out. Also maybe being able to change the background color?
>This one is probably hard to implement, but I like opening your tool when writing dialogues when I'm not sure which expression to use (I have it on a keyshortcut). So when you open the menu, it would be great if it could update the sprite with the attributes of the currently shown tag lol (if it's actually being shown). So when I open up I can see instantly my sprite and the different options without having to manually clean and choose all the attributes.
Have a great day!
Hi there, this is really embarrassing, but I'm a noob and can't figure out how to make images show at all. I tried using the image tags I've defined and called in script.rpy, but that didn't work. The tutorial just says to enter tags, so I'm kind of at a loss. Sorry if I missed something incredibly obvious, that's definitely possible. Thanks for any help you can provide.
Edit: Sorry, forgot to mention that I got it working in the Attributes tool, but for some reason it doesn't work in the Layered Image tool.
The layered image visualizer has a stricter requirement than the attributes tool - namely, that the image needs to be a layered image. So, specifically, you need a declaration like layeredimage eileen standing: and then you could type in eileen standing to the visualizer to adjust it. It is not sufficient to have image eileen standing = "..." or similar. If you aren't sure what layered images are, you can read more about them in the docs: https://www.renpy.org/doc/html/layeredimage.html#layered-images
If you're still having trouble, feel free to post your layered image declaration and the results of typing in that name to the tool and I'll see what I can do to help!
Hi, I keep having a python error that bricks the entire plugin until I delete the game project's cache. It happens if I click the "multiple" button and my filenames have underscore in them (eileen_m_smile.png)
RecursionError: maximum recursion depth exceeded while calling a Python object
It would be good to explain the different folder/file structures you are supporting and the different filenames you expect to work with your scripts. The absolute ideal scenario would be to have an example sprite + layeredimage provided, which I believe would be a fair request for a paid plugin. You could for example use the Agustina sprite.
You could also mention that the sprite's layeredimage and every attribute need to be manually declared in advance ("group outfit auto" doesn't seem to work). I wouldn't have known from the itch description, only by reading this thread and getting errors I learned of this.
Hello! I'll need you to be more specific about the errors you're encountering; the layered image tool is set up to work with basically any layered image declaration as it only checks the LayeredImage object after Ren'Py has already handled all the groups and such. I tested it with the following code:
layeredimage august: always "august_base" group outfit auto group eyes auto: attribute open default group eyebrows auto: attribute normal default group mouth auto: attribute smile default group glasses auto group emotion auto
and had no issues using it in the tool. These filenames have underscores in them also (august_eyebrows_frown.png and so on), so the file naming is not inherently a problem. The intention is that the tool supports as many layered image declarations as possible, which is why there are not limits listed on the itch page.
I managed to solve the recursion error. It was a layer that was incorrectly called in code ("august base" instead of the correct "august_base" when the filename was "august_base.png"). The same error also appeared in-game when the sprite was called. Solving this error also made layer groups declared with "auto" appear.
That said, if the error appears once it still bricks your layeredimage tool until the game's persistent data is removed. It would be great if there was some kind of error message but the tool doesn't get bricked, as this kind of slipups is probably a common occurence during the dev process.
Is it possible that your attributes do not have `default` attributes set up, such that `show tau` with no additional attributes would show nothing at all? That's an issue with the crop tool, as it only uses the provided image tag (e.g. `tau`) for cropping purposes. Your layered images should always have sensible `default` attributes set if they're required (e.g. a default mouth attribute because the character should always have a mouth). It looks to me in the screenshot like if you don't have a `tbase` attribute set, the sprite simply doesn't have a base at all and is made up of the hair/arms/expression parts, which supports this. You can set up attributes with the `default` keyword e.g.
group tbase auto: attribute casual default
Oh my gosh, thank you so much for telling me about this! You see, I had been working with pre-rendered sprites for so long that layered images are still new to me. I knew it was something on my end, but I was able to implement a default attribute set. Thank you very much for your help! You've done a great job with all these tools, and I feel like I've been able to do a lot more creative things in my game thanks to them.