Ren'py -- make side image the same as the main image?

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
User avatar
SuperbowserX
Veteran
Posts: 270
Joined: Sat Jan 07, 2017 3:09 pm
Contact:

Ren'py -- make side image the same as the main image?

#1 Post by SuperbowserX »

The way my game plays, the side image and the main image are the same (except I use a modifier to boost the size of the main image and shrink the side image). Since it would save a lot of code; is there anyway I can set the side image to be recognized as the main image by the say statement?

User avatar
SuperbowserX
Veteran
Posts: 270
Joined: Sat Jan 07, 2017 3:09 pm
Contact:

Re: Ren'py -- make side image the same as the main image?

#2 Post by SuperbowserX »

Anyone know if there's a way to tweak the say screen to do this?

User avatar
Divona
Miko-Class Veteran
Posts: 678
Joined: Sun Jun 05, 2016 8:29 pm
Completed: The Falconers: Moonlight
Organization: Bionic Penguin
itch: bionicpenguin
Contact:

Re: Ren'py -- make side image the same as the main image?

#3 Post by Divona »

That is the first thing explained in the documentation "Side Image". All you have to do is to define main image, and the side image as the main image with transforms to shrunk and position the main image as side.
Completed:
Image

User avatar
SuperbowserX
Veteran
Posts: 270
Joined: Sat Jan 07, 2017 3:09 pm
Contact:

Re: Ren'py -- make side image the same as the main image?

#4 Post by SuperbowserX »

I was referring to a way to reduce this:

Code: Select all

        image derek happy = "sprites/c1/derek/happy.png"
        image derek angry = "sprites/c1/derek/angry.png"
        image derek neutral = "sprites/c1/derek/neutral.png"
        image derek sad = "sprites/c1/derek/sad.png"

        image side derek happy = "sprites/c1/derek/happy.png"
        image side derek angry = "sprites/c1/derek/angry.png"
        image side derek neutral = "sprites/c1/derek/neutral.png"
        image side derek sad = "sprites/c1/derek/sad.png"
to this:

Code: Select all

        image derek happy = "sprites/c1/derek/happy.png"
        image derek angry = "sprites/c1/derek/angry.png"
        image derek neutral = "sprites/c1/derek/neutral.png"
        image derek sad = "sprites/c1/derek/sad.png"
It would save a lot of time.

I know it's not what you recommended but I tried to do

Code: Select all

define config.side_image_prefix_tag = ""
at the top of the page but that didn't work. Any other ideas for how I can do this?

Currently, my say screen's side image part is liek this:

Code: Select all

add SideImage() xalign 0.085 yalign 0.9
Is there a way I can replace the SideImage() function with a way that just finds the image independent of the side tag?

User avatar
trooper6
Lemma-Class Veteran
Posts: 3712
Joined: Sat Jul 09, 2011 10:33 pm
Projects: A Close Shave
Location: Medford, MA
Contact:

Re: Ren'py -- make side image the same as the main image?

#5 Post by trooper6 »

SuperbowserX wrote: Is there a way I can replace the SideImage() function with a way that just finds the image independent of the side tag?
Not that I know of. However...
SuperbowserX wrote:I was referring to a way to reduce this:

Code: Select all

        image derek happy = "sprites/c1/derek/happy.png"
        image derek angry = "sprites/c1/derek/angry.png"
        image derek neutral = "sprites/c1/derek/neutral.png"
        image derek sad = "sprites/c1/derek/sad.png"

        image side derek happy = "sprites/c1/derek/happy.png"
        image side derek angry = "sprites/c1/derek/angry.png"
        image side derek neutral = "sprites/c1/derek/neutral.png"
        image side derek sad = "sprites/c1/derek/sad.png"
to this:

Code: Select all

        image derek happy = "sprites/c1/derek/happy.png"
        image derek angry = "sprites/c1/derek/angry.png"
        image derek neutral = "sprites/c1/derek/neutral.png"
        image derek sad = "sprites/c1/derek/sad.png"
It would save a lot of time.
Perhaps you don't realize that if you name your files correctly, you don't have to define them at all, right? That is does it automatically for you?

Change the names of your derek images to (and make sure your sprites file is inside the images file):

Code: Select all

"images/sprites/c1/derek/derek happy.png"
"images/sprites/c1/derek/derek angry.png"
"images/sprites/c1/derek/derek neutral.png"
"images/sprites/c1/derek/derek sad.png"
If you change the names like I explained, then you don't need any image statements for your main derek images at all.
So what about the side images? The side images are also automatically generated. If you prioritize not writing things twice over the size of your game, all you have to do is make a second copy of your main derek images and insert the word "side" into their filename like so and make sure your side file is somewhere insides your images file:

Code: Select all

"images/sprites/side/c1/derek/side derek happy.png"
"images/sprites/side/c1/derek/side derek angry.png"
"images/sprites/side/c1/derek/side derek neutral.png"
"images/sprites/side/c1/derek/side derek sad.png"
If you set up your file names and file paths properly, you don't have to define your images by hand at all.
A Close Shave:
*Last Thing Done (Aug 17): Finished coding emotions and camera for 4/10 main labels.
*Currently Doing: Coding of emotions and camera for the labels--On 5/10
*First Next thing to do: Code in all CG and special animation stuff
*Next Next thing to do: Set up film animation
*Other Thing to Do: Do SFX and Score (maybe think about eye blinks?)
Check out My Clock Cookbook Recipe: http://lemmasoft.renai.us/forums/viewto ... 51&t=21978

Post Reply

Who is online

Users browsing this forum: No registered users