Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

Image Tools for Ren'Py

Preview and test character expressions and more · By Feniks

Need Support? Post here! Sticky

A topic by Feniks created Aug 27, 2023 Views: 339 Replies: 6
Viewing posts 1 to 4
Developer

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.

(1 edit)

It's pretty nice and useful.  Especially if I wanna check quickly if there's any graphical error. I just wished the viewport on the right was as flexible as the one for the Image Attributes Tool (where you could zoom/dezoom/move around the sprite). As of now it's displaying the sprite twice, which can waste quite a bit of space (especially if you're trying to see the whole body). Maybe only keep one view (where you can zoom/dezoom) would be nicer.

Also personal preference but I'd rather when I click on a group, it replaces everything with the current group, than adding it to the current stack (maybe if you right click it, it could have this additional functionality?). Because I have a lot of attribute so I end up hiding/showing everytime I want to see a different group.

(4 edits)

Mhh also I guess it has the issue where you can have conflicting attributes in the viewport.

For example if you have 

layeredimage alice:
    group outfit: 
        attribute outfit_secretary
        attribute outfit_punk
    group accessories:
        attribute outfit_secretary:
            "glasses"

Then in your editor, we could select outfit_punk from the outfit group, but we could also select outfit_secretary from the accessories group. So both outfit_punk and outfit_secretary are on the tag.

If you tried that ingame it would throw an error, the two attributes are mutually exclusive (and rightfully so).
But that seems like an annoying bug to resolve lol, it's really because somehow, add "alice outfit_secretary outfit_punk" in a screen is valid, but "show alice outfit_secretary outfit_punk" is not valid in a label? I'm not sure I get it either.

It's not really a big deal for me, but I might as well write it down.

Developer

Thank you for the suggestions; I'll keep them in mind for future updates.

(2 edits)

Hey Fen, is there an example of implementing the "short_forms" functionality from the image tools? I have my attributes ready to go,

 show luke auto_mouth_scared brows_scared eyes_scared 

and I want to shorten it to 

show luke scared_e

As of now, I've  set up my layeredimage like so, separating each major part of the character's sprite in order to allow for different combinations of eyes/mouths/eyebrows:

layeredimage luke:
    at sprite_highlight('luke')
    yoffset 10
    format_function EasyBlinkFormat(
        no_blink_attrs=["closed_e"], which_group=["eyes"],
        numbered=False, reverse=True,
        mid_eye_frames=["easy_blink/Lucas/Act1/eyes/eyes neutral_mid@2.png",
            "easy_blink/Lucas/Act1/eyes/eyes neutral_closed@2.png"],
        blink_framerate=0.05)
    group base: ## The Body/pose.
        attribute coat_and_bag "easy_blink/Lucas/Act1/bases/Luke_Base withcoat@2.png" default
    group mouth:
        
        ## MOUTH Neutral         attribute auto_mouth_neutral ConditionSwitch(             "speaking_char == 'luke'", "easy_blink/Lucas/Act1/mouth/mouth neutral_open@2.png",             "True", "easy_blink/Lucas/Act1/mouth/mouth neutral_closed@2.png"             ) default         attribute mouth_neutral_closed "easy_blink/Lucas/Act1/mouth/mouth neutral_closed@2.png"         ## MOUTH Scared/Startled         attribute auto_mouth_scared ConditionSwitch(             "speaking_char == 'luke'", "easy_blink/Lucas/Act1/mouth/mouth scared_open@2.png",             "True", "easy_blink/Lucas/Act1/mouth/mouth scared_closed@2.png"             )         attribute mouth_scared_closed "easy_blink/Lucas/Act1/mouth/mouth scared_closed@2.png"    
    group eyebrows:         ## EYEBROWS Neutral         attribute brows_neutral "easy_blink/Lucas/Act1/eyebrows/eyebrows neutral@2.png" default         ## EYEBROWS Scared         attribute brows_scared "easy_blink/Lucas/Act1/eyebrows/eyebrows scared@2.png"     group eyes:         ## EYES Neutral         attribute eyes_neutral "easy_blink/Lucas/Act1/eyes/eyes neutral_open@2.png" default         # attribute closed_e "easy_blink/Lucas/Act1/Lucas-Act1 eyes_closed.png"         ## EYES Scared         attribute eyes_scared dict(path="easy_blink/Lucas/Act1/eyes/eyes scared_open@2.png",             mid_eye_frames=["easy_blink/Lucas/Act1/eyes/eyes scared_mid@2.png", "easy_blink/Lucas/Act1/eyes/eyes scared_closed@2.png"])

How would I go about achieving that? ;-;

Developer(+1)

Hey there! Are you familiar with config.adjust_attributes? That's what I'm referring to with short forms. My EasyRenPyGUI template comes with an optional file that has some sample code which you might find helpful, and links to one of Tom's articles on the topic: https://github.com/shawna-p/EasyRenPyGui/blob/main/game/optional%20files/adjust_...

Basically you'd use that to set up your short forms like

define config.adjust_attributes["luke"] = Aliases(
    scared_e="auto_mouth_scared brows_scared eyes_scared"
)

Then you can use the Short Forms tab in the image attributes tool to enter "scared_e" to make it available to the tool, and/or add it to the SHORT_FORMS set at the start of image_tool_common.rpy and reset persistent.

Hope that helps!

(+1)

Fen! You are! INCREDIBLE! ;_; <3

Thank you so much for your time and expertise--this is such a great help! <3