Showing Cropped characters with Transforms; hit-and-miss results?

Discuss how to use the Ren'Py engine to create visual novels and story-based games. New releases are announced in this section.
Forum rules
This is the right place for Ren'Py help. Please ask one question per thread, use a descriptive subject like 'NotFound error in option.rpy' , and include all the relevant information - especially any relevant code and traceback messages. Use the code tag to format scripts.
Post Reply
Message
Author
017Bluefield
Regular
Posts: 93
Joined: Mon Dec 30, 2013 1:55 am
Projects: Project Bluefield - Origins
Organization: Autumn Rain
Deviantart: playerzero17
itch: autumn-rain
Contact:

Showing Cropped characters with Transforms; hit-and-miss results?

#1 Post by 017Bluefield »

I'm trying to use Crop()-ed images when displaying characters (the character-maker software I'm using currently doesn't allow cropped exports). Now I've tried making Crop()-ed character images appear at different transforms, and I noticed that they don't appear at the transforms I made myself.

Code: Select all

    ## Transforms: left and right (preset)
    show wakana at left with dissolve
    pause 1.0
    show nagi at right with dissolve
    pause 1.0
    hide wakana with dissolve
    pause 1.0
    hide nagi with dissolve
    pause 1.0
    
    ## User-made transforms: left_side and right_side
    show wakana at left_side with dissolve
    pause 1.0
    show nagi at right_side with dissolve
    pause 1.0
    hide wakana with dissolve
    pause 1.0
    hide nagi with dissolve
    pause 1.0
    
    ## Transforms: center (preset)
    show wakana at center with dissolve
    pause 1.0
    hide wakana with dissolve
    pause 1.0
    show nagi at center with dissolve
    pause 1.0
    hide nagi with dissolve
    pause 1.0
Results:
  • left/right: These work
  • left_side/right_side: These don't work
  • center: This works
Custom transforms:

Code: Select all

    transform left_side:
        pos (0.3,1.0) xanchor (0.3)
    transform right_side:
        pos (0.7,1.0) xanchor (0.7)
Image code:

Code: Select all

    image wakana = Crop((190,251,257,640), "Wakana.png")
    image nagi = Crop((140,252,359,650), "Nagi.png")

User avatar
Remix
Eileen-Class Veteran
Posts: 1628
Joined: Tue May 30, 2017 6:10 am
Completed: None... yet (as I'm still looking for an artist)
Projects: An un-named anime based trainer game
Contact:

Re: Showing Cropped characters with Transforms; hit-and-miss results?

#2 Post by Remix »

Is it a size/anchor issue? I mean, does it seem the anchor might be interpreting the uncropped size rather than cropped?

Suggest:
image wakana = Composite( (257,640), (0,0), Crop((190,251,257,640), "Wakana.png") )
Frameworks & Scriptlets:

017Bluefield
Regular
Posts: 93
Joined: Mon Dec 30, 2013 1:55 am
Projects: Project Bluefield - Origins
Organization: Autumn Rain
Deviantart: playerzero17
itch: autumn-rain
Contact:

Re: Showing Cropped characters with Transforms; hit-and-miss results?

#3 Post by 017Bluefield »

Remix wrote: Sat Sep 29, 2018 8:24 am Is it a size/anchor issue? I mean, does it seem the anchor might be interpreting the uncropped size rather than cropped?

Suggest:

Code: Select all

image wakana = Composite( (257,640), (0,0), Crop((190,251,257,640), "Wakana.png") )
I'll see if that's the problem...

Post Reply

Who is online

Users browsing this forum: No registered users