[solved] SideImage... seriously, how can this be so complicated?

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
Errilhl
Regular
Posts: 150
Joined: Wed Nov 08, 2017 4:32 pm
Projects: HSS
Contact:

[solved] SideImage... seriously, how can this be so complicated?

#1 Post by Errilhl » Mon Nov 20, 2017 6:51 pm

Okay, I'm trying to wrap my head around showing a character image when they're speaking, which seems to be a seriously complicated thing to do... (why?)...

Okay. I have this defined:

Code: Select all

define fS = Character("[fSinput]", window_left_padding=600, image="images/jshoulders")
In the images/-folder, I have two different images defined:
side jshoulders.png
jshoulders.png
(who in their right mind thought that having space-delimited "tags" was a good idea on any system?)

And in the screens.rpy, I have the following before a statement made by the character:

Code: Select all

show side jshoulders
In the say-screen in screens.rpy I have the following:

Code: Select all

    if not renpy.variant("small"):
        add SideImage() xalign 0.5 xpos 1450 yalign 1.0 ypos 1080
However - no matter how I define this, the image that gets loaded ALWAYS sits in the center of the screen, behind the dialogue-box. Also, the actual text in the dialogue box is being moved, so something is doing that (I assume it is the line in say-screen that does that).

Here's a screenshot of how it looks:
screenshot0001.png
So, what am I doing wrong, where can I find examples and code that actually work, and is not deprecated and/or useless? (Sorry for being a bit crass, it's just... this should be as simple as defining an image in the Character-class, or similar, which then should automatically be present unless you don't want it to be)
Last edited by Errilhl on Mon Nov 20, 2017 7:58 pm, edited 1 time in total.
Currently working on: Image

User avatar
Imperf3kt
Eileen-Class Veteran
Posts: 1034
Joined: Mon Dec 14, 2015 5:05 am
Location: Your monitor
Contact:

Re: SideImage... seriously, how can this be so complicated?

#2 Post by Imperf3kt » Mon Nov 20, 2017 7:22 pm

Did you read the documentation properly?

Do it this way:

Code: Select all

define fS = Character("[fSinput]", window_left_padding=600, image="jshoulders")

image side jshoulders = "jshoulders.png"
Now whenever you type jS "I'm talking.", the image will appear automatically.
Image

Warning: May contain trace amounts of gratuitous plot.

Errilhl
Regular
Posts: 150
Joined: Wed Nov 08, 2017 4:32 pm
Projects: HSS
Contact:

Re: SideImage... seriously, how can this be so complicated?

#3 Post by Errilhl » Mon Nov 20, 2017 7:51 pm

Well... a minor improvement, at least. That gives me this:
screenshot0002.png
Ah, nevermind, had to remove the show-statement. However, the alignment of the side-image... is off, to say the least. How do I modify its placement on the screen? The left-padding in the define doesn't seem to do anything (I tried changing it)

Ah, nevermind again! That was of course caused by the definition of SideImage() in screens.rpy. Modifying that, after the SideImage() actually started working was a lot better :) Now, I just need to get over the automatic naming/fetching stuff, and see how it works if I add more images into the mix.
Currently working on: Image

Errilhl
Regular
Posts: 150
Joined: Wed Nov 08, 2017 4:32 pm
Projects: HSS
Contact:

Re: [solved] SideImage... seriously, how can this be so complicated?

#4 Post by Errilhl » Mon Nov 20, 2017 8:04 pm

Oh, btw - I did read the documentation. The examples leaves a bit to be desired ;) https://www.renpy.org/doc/html/side_image.html
Currently working on: Image

User avatar
Imperf3kt
Eileen-Class Veteran
Posts: 1034
Joined: Mon Dec 14, 2015 5:05 am
Location: Your monitor
Contact:

Re: [solved] SideImage... seriously, how can this be so complicated?

#5 Post by Imperf3kt » Mon Nov 20, 2017 9:29 pm

I suppose the examples could use a bit of refining.
Glad you got it sorted.
Image

Warning: May contain trace amounts of gratuitous plot.

Errilhl
Regular
Posts: 150
Joined: Wed Nov 08, 2017 4:32 pm
Projects: HSS
Contact:

Re: [solved] SideImage... seriously, how can this be so complicated?

#6 Post by Errilhl » Mon Nov 20, 2017 9:49 pm

Yeah... a bit clearer wording, not to mention examples that actually work (by all means, what you said is there, it's just not obvious, at least not to me, that that is what you need to do to make it work). Thanks for your help :)
Currently working on: Image

Human Bolt Diary
Regular
Posts: 58
Joined: Fri Oct 11, 2013 12:46 am
Contact:

Re: [solved] SideImage... seriously, how can this be so complicated?

#7 Post by Human Bolt Diary » Mon Nov 20, 2017 10:54 pm

The documentation has a 100% working example. Of course, you need to provide your own images.

If you feel the documentation did not describe Side Images in a way you found understandable, I encourage you to edit the docs with your own description and submit it as a Pull Request. Or, if you're less comfortable with git, file an issue with the suggested changes.

Errilhl
Regular
Posts: 150
Joined: Wed Nov 08, 2017 4:32 pm
Projects: HSS
Contact:

Re: [solved] SideImage... seriously, how can this be so complicated?

#8 Post by Errilhl » Tue Nov 21, 2017 11:52 am

I might do that, eventually - but not right now. I have more than enough to do with just making the game I'm currently making :)
Currently working on: Image

Post Reply

Who is online

Users browsing this forum: No registered users