Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines
(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? ;-;

(+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