how to move side image from behind the dialogue box to the front

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
Grumpy
Newbie
Posts: 18
Joined: Tue Mar 10, 2020 4:30 pm
Contact:

how to move side image from behind the dialogue box to the front

#1 Post by Grumpy »

Hello again, I managed to fix the image dimensions to an acceptable ratio but when i use them they end behind the dialogue box. According to the documentation the side images should always display to the front by default so im bamboozled as i didnt change anything. I have latest renpy and using jedit.

Any idea what i m doing wrong? At first i thought the problem was that i made the image transparent.But i used another one and the same thing happens. :?

tldr how to bring joker costume in front of dialogue window
Attachments
wtf.jpg
wtf.jpg (22.11 KiB) Viewed 550 times

User avatar
gas
Miko-Class Veteran
Posts: 842
Joined: Mon Jan 26, 2009 7:21 pm
Contact:

Re: how to move side image from behind the dialogue box to the front

#2 Post by gas »

You probably added some kind of strange function/callback and these are not counted as side images anymore, but normal images (I guess it was for that change size issue).
What exactly you did (w code, please).
If you want to debate on a reply I gave to your posts, please QUOTE ME or i'll not be notified about. << now red so probably you'll see it.

10 ? "RENPY"
20 GOTO 10

RUN

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: how to move side image from behind the dialogue box to the front

#3 Post by Remix »

Likely you've changed screens.rpy > screen say

Components of the screen are drawn in the order they are written...

Code: Select all


screen say(who, what):
    style_prefix "say"
    
    # An image here is behind everything

    window:
        id "window"

        ## If you add an image here it will appear behind the text and namebox

        if who is not None:

            window:
                id "namebox"
                style "namebox"
                text who id "who"

        text what id "what"

        ## Images added here or below and outside the window: container appear in front

    # The default one is here

    if not renpy.variant("small"):
        add SideImage() xalign 0.0 yalign 1.0
Frameworks & Scriptlets:

Grumpy
Newbie
Posts: 18
Joined: Tue Mar 10, 2020 4:30 pm
Contact:

Re: how to move side image from behind the dialogue box to the front

#4 Post by Grumpy »

Hey, my part of the renpy screens looks like this
screen say(who, what):
style_prefix "say"

window:
id "window"

if who is not None:

window:
id "namebox"
style "namebox"
text who id "who"

text what id "what"


## If there's a side image, display it above the text. Do not display on the
## phone variant - there's no room.
if not renpy.variant("small"):
add SideImage() xalign 0.0 yalign 1.0


## Make the namebox available for styling through the Character object.
init python:
config.character_id_prefixes.append('namebox')

As for the resize i did it with gimp,just cropped the image till it got smaller so as to not mess with renpy.Heres my code for the sideimage
image p happy = "side_herohappy1d.png"
and later down the line i say
show p happy at left

btw everything i write is in the scripts tab of jedit,am i supposed to write-declare images in the image section?

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: how to move side image from behind the dialogue box to the front

#5 Post by Remix »

That is NOT a side image

Just define it as

image side p happy = "side_herohappy1d.png"
# note the 'side' in there

and do not show it... it will automatically appear if the attribute is set

You could likely do with reading (or re-reading) about side images:
https://renpy.org/doc/html/side_image.html
Frameworks & Scriptlets:

Grumpy
Newbie
Posts: 18
Joined: Tue Mar 10, 2020 4:30 pm
Contact:

Re: how to move side image from behind the dialogue box to the front

#6 Post by Grumpy »

adding side in there i get this now which i dont even find in my images folder oO and its still behind the dialogue box.edit to say i found this image in where my renpy program is installed in the common folder in placeholders.no idea why it pops in my game :?:
Attachments
4433.jpg
Last edited by Grumpy on Fri Mar 13, 2020 1:49 pm, edited 1 time in total.

rayminator
Miko-Class Veteran
Posts: 793
Joined: Fri Feb 09, 2018 12:05 am
Location: Canada
Contact:

Re: how to move side image from behind the dialogue box to the front

#7 Post by rayminator »

this the proper way to make a side image

Code: Select all

define b = Character("Kira", image="kira")

image side kira = "images/char/kira.png"
if you want to use a large image you need to change this to large

Code: Select all

if not renpy.variant("small"): to if not renpy.variant("large"):

Grumpy
Newbie
Posts: 18
Joined: Tue Mar 10, 2020 4:30 pm
Contact:

Re: how to move side image from behind the dialogue box to the front

#8 Post by Grumpy »

Finally found it,at least it works for me. What i did was "show p happy at left onlayer overlay"

Now my image is indeed ontop of the dialogue box. I tried to declare a new layer but either the documentation is too old or jedit just doesent let you change it. So if anyone is using jedit and wants image of hero to be in front of dialogue box this above method works

Post Reply

Who is online

Users browsing this forum: DewyNebula