Problems with images and Dynamic Characters...

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
MystikGaming
Newbie
Posts: 4
Joined: Wed Jul 25, 2018 7:03 pm
Projects: Akai Ito - The Red String of Destiny
Organization: Night Shift Studios
Location: Argentina
Contact:

Problems with images and Dynamic Characters...

#1 Post by MystikGaming »

Well, the problem seems to be simple but I can't make it work.

The situation is the next. I want to make like the DDLC system to show an expression calling it in the same dialog line:

Code: Select all

#This is the example of DDLC

show monika 1b zorder 3 at f11
m "How are you?"
m 1a "Are you ok?" #This is what I'm referring to.

clearly having in definitions.rpy the image stated as 1a, for example:

Code: Select all

#In definitions.rpy

image monika 1a = im.Composite((960,960), (0,0), "monika/1a.jpg) #And keeps going doing the Composite of the expression
So, I used it in my code, aplying these Composite with my characters and making the DynamicCharacters

Code: Select all

#In definitions.rpy
default m_name= "Masamune"
define mas = DynamicCharacter(m_name, image=masamune)

image masamune_scared = "masamune_scared.png"
image masamune 1a = im.Composite((960,960),(0,0), "images/masamune/1a.jpg", ...) #Same as here, all the different parts of the face, etc.

#and later in the Script:
show masamune_scared zorder 3 at f11
mas "OMG!"
mas 1a "I didn't know about that."
But it doesn't show the image 1a. This is a problem because if I use the "old school" way (using hide and show) It is not smooth, even i can see the gap where it hide the last picture and shows the new one. Please I need help in this.
Also, if I didn't make the Character a DynamicCharacter, Ren'py sends error because the Composite is not stated in any reference (masamune).

Thanks for Reading!

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: Problems with images and Dynamic Characters...

#2 Post by trooper6 »

I don't think you need a Dynamic Character at all.

You can just do:

Code: Select all

default m_name = "Masamune"
image mas = Character("[m_name]", image="masamune")
Note the image is a string, so has to be in quotes.

And for your images rather than composites, you may want to use the new LayeredImage system.
Here is an article about Layered Images from PyTom: https://patreon.renpy.org/layeredimage-conversion.html
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

MystikGaming
Newbie
Posts: 4
Joined: Wed Jul 25, 2018 7:03 pm
Projects: Akai Ito - The Red String of Destiny
Organization: Night Shift Studios
Location: Argentina
Contact:

Re: Problems with images and Dynamic Characters...

#3 Post by MystikGaming »

trooper6 wrote: Wed Feb 06, 2019 1:20 am I don't think you need a Dynamic Character at all.

You can just do:

Code: Select all

default m_name = "Masamune"
image mas = Character("[m_name]", image="masamune")
Note the image is a string, so has to be in quotes.

And for your images rather than composites, you may want to use the new LayeredImage system.
Here is an article about Layered Images from PyTom: https://patreon.renpy.org/layeredimage-conversion.html
Wow, I can't believe that simple it was. Thank you very much. I was stuck because of that.

Thank you. Very much.

About the LayeredImages, I have Ren'py 6.99.4.13, so I can't use it xD Also, I got used to use Composites. But It never happened this problem.

Anyway, Thank You again.

Post Reply

Who is online

Users browsing this forum: Bing [Bot]