Ren'Py Gripes

In this forum we discuss the future of Ren'Py, both bug fixes and longer-term development. Pre-releases are announced and discussed here.
Message
Author
User avatar
SypherZent
Veteran
Posts: 361
Joined: Fri Sep 02, 2016 3:14 am
Completed: Multiverse Heroes, Space Hamster in Turmoil
Location: Puerto Rico
Contact:

Re: Ren'Py Gripes

#496 Post by SypherZent »

Hmm, that is odd. I've had this game in development for about 6 months, and it only broke during this update.
I don't know why I decided to test it again, since I've tested the demo over 5-6 times with each character, but something told me to try.

Perhaps it is the way I am defining the doppelganger character?
I have it defined with 'default' at top of script, as so:

Code: Select all

default doppelganger = Character("Pirate")
However, during the course of the gameplay, I change it with:

Code: Select all

$ doppelganger = Character("New Name Here")
However, note that doppelganger isn't the only character this happens with.
I have another character variable which I do not change in the script, for the narrator, and it also occurs with that menu.

Code: Select all

                menu:
                    n "[char_selected] found Left Arm Pete's gun.\nWhat should [char_selected] do?"

                    "Give him back his gun.":
                        jump give_gun
                    "Shoot him with his gun.":
                        jump shoot_gun
And this character, I don't use 'default', I use 'define' to create the variable at the top of the script, because this one never changes.

Code: Select all

define n = Character("Narrator")
Both of these are broken.
Only menus where I exclude the character entirely, are working.
The others have the 'say' screen disappear, leaving only the 'choice' screen.

Also, I'm not using jump for the menu options, I'm writing the text right in the same blocks.

Anything I can adjust to get this working again? The reason I say that the update broke it, is because I've done extensive testing, and I haven't changed this game's code since March. The second screen (with character 'n') works fine in the official trailer that is on Steam, too. But, that same screen from the trailer is broken now, in my build, and I haven't touched the code since then. The demo has been ready, pending voice acting, but now it's not ready anymore. I haven't edited 'choice' nor 'say' screens, either. Even the UI artwork for dialogue is still vanilla.

Hope this can be fixed, or maybe something I overlooked. Thanks.

Edit: I did forget to mention. The 'say' screen actually comes up for a split second with the choices, but it closes itself before the player is even able to read it, leaving just the 'choice' screen.
Creator of Multiverse Heroes & Space Hamster in Turmoil

Want me to code your game?
Check my services thread!

User avatar
PyTom
Ren'Py Creator
Posts: 16088
Joined: Mon Feb 02, 2004 10:58 am
Completed: Moonlight Walks
Projects: Ren'Py
IRC Nick: renpytom
Github: renpytom
itch: renpytom
Location: Kings Park, NY
Contact:

Re: Ren'Py Gripes

#497 Post by PyTom »

Please produce a small demo that shows the problems. I can't really diagnose it via the forums, without seeing the problem in action. What's more, generally the process of producing the demo will point to what the problem is, making it easy for us to fix it. Basically, I need a full script file that - with nothing else - produces the problem.
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom
Software > Drama • https://www.patreon.com/renpytom

User avatar
Kia
Eileen-Class Veteran
Posts: 1037
Joined: Fri Aug 01, 2014 7:49 am
Deviantart: KiaAzad
Discord: Kia#6810
Contact:

Re: Ren'Py Gripes

#498 Post by Kia »

SypherZent wrote: Wed May 29, 2019 12:43 pm

Code: Select all

$ doppelganger = Character("New Name Here")
I think it's better if you change the name this way:

Code: Select all

$ doppelganger.name = "new name"

User avatar
SypherZent
Veteran
Posts: 361
Joined: Fri Sep 02, 2016 3:14 am
Completed: Multiverse Heroes, Space Hamster in Turmoil
Location: Puerto Rico
Contact:

Re: Ren'Py Gripes

#499 Post by SypherZent »

I just created a new script, with SpriteManager and all of the parameters that I have in my game script.
The error does not occur.

Seems this error only occurs for my game, which wasn't coded on the most updated Ren'Py, since I started it months ago.
Nothing is different, in terms of the say / choice screens, either. I matched everything perfectly.
I have even set the layers exactly as I have them in my game.

But, as you realize, this doesn't help me at all.

This isn't the first time the dialogue breaks on a Ren'Py update for me, either.
My first release from last year, has the character names offset differently than I originally defined them, when I open it in Ren'Py launcher now.
Seems like some screens get wacky for my games when I update Ren'Py.

Still, these are very trivial issues that are easily resolved.
Basically, it'll be faster to just create my own choice/say screens, than to continue to try and reproduce the issue with a new script.

Sorry that I cannot help to pinpoint the issue with a new script, but I'm not financially stable currently.
I can't afford to dedicate much time on time on trial & error, especially when I already have a working solution (coding my own choice screen and not using 'menu').

And thanks, Kia. I'd try what you mentioned, but it's also happening with a character I never redefine.
Still, will keep that in mind for future reference.

In any case thanks for taking the time, and sorry for any inconvenience.

Edit to Add: I should note that the game I'm making isn't a Visual Novel. I'm using a lot of custom Python, especially for screens (not using Screen Language at all for the production in question, every screen is a python class). I don't think Ren'Py should be exclusively for Visual Novels, lol. It's capable of so much more. In any case, this issue probably won't affect many others, if any at all. So, in my case, it's much easier if I just make custom screens for the say/choice, as well.
Creator of Multiverse Heroes & Space Hamster in Turmoil

Want me to code your game?
Check my services thread!

User avatar
Matalla
Veteran
Posts: 202
Joined: Wed Mar 06, 2019 6:22 pm
Completed: Max Power and the Egyptian Beetle Case, The Candidate, The Last Hope, El cajón del viejo escritorio, Clementina y la luna roja, Caught in Orbit, Dirty Business Ep 0, Medianoche de nuevo, The Lost Smile
itch: matalla-interactive
Location: Spain
Contact:

Re: Ren'Py Gripes

#500 Post by Matalla »

I have two things I'd like to comment:

First, translating my game from spanish to english is driving me crazy. When I first generated the translations, all default messages dissapeared in the english version (the ones from notify or confirm screens, for instance; skipping, are you sure you want to quit, all that stuff). I thought that as they are the default messages, they would be in place, but they weren't.

Upon further investigation, I discovered some files named 'common' with all the stuff missing in the tl/english/ folder where the rest of the translated scripts were. I guess to be translated from english... to english. At that point I was half crazy and had nothing to lose, so I just deleted them. Well, that worked. But anytime I have to make a minimal change in the original script (I tested throughly before start the translation, but there is always some small typo or something), I have to regenerate the translations for renpy to recognize the new dialogue and those files reappear again.

It's not a big deal, but it would be nice that renpy wouldn't generate those files when the translated language is english.

The other thing it bothers me, I guess it doesn't matter for most of the users, but due to how I use renpy it does to me (I don't use sprites and rely for certain scenes in a visual narration style). For example:

Code: Select all

    scene wide_shot
    
    "I was finally left alone"

    pause 2
    
    scene close_shot_clock

    pause 3

    scene door_shot

    pause 1

    scene close_shot_face

    "Then, I had an unexpected visit"
If I do something like this, if the user clicks anytime between the first text and the second, it would jump straight to that last one, ignoring the images in between. If I get rid of the number in the pause, then it will go to the next image, so that's good. But sometimes I need to use the timing. And, in both cases, if I go back using rollback, it goes to the first text, skipping all in between. So in these cases I sometimes have to stick a nasty $ _dismiss_pause = False in there to protect the flow I intended.

I guess this won't be a priority, since the number of people affected would be very low (perhaps only me), but it would be nice to have a method to have renpy treat the images as it does with text (only in what's related to advancing the story, rollback and these kind of things). Maybe something like scene <some keyword here> name of image? I don't know, I have no clue about this. Maybe it isn't even posible.

So anyway, thanks for hearing me out and thanks for the outstanding job.
Comunidad Ren'Py en español (Discord)
Honest Critique

Nekto_K
Newbie
Posts: 3
Joined: Fri Dec 29, 2017 12:29 am
Contact:

Re: Ren'Py Gripes

#501 Post by Nekto_K »

Hello. I don't know how to realize several textboxes NOT simualtenously. Example:
1) show phraseX of Character1
pause
2) show phraseY of Character2 (phraseX of Character1 is still showing)
pause
3) replace phraseX of Character1 with phraseZ (phraseY of Character2 is still showing)
pause
4) hide phraseY of Character2 (phraseZ of Character1 is still showing)
and so on.

I was thinking about (multiple=х), but they all showing simualtenously, and tags like {w} doesn't work with it.
I was thinking about ParameterizedText for each phrase, but this is a little troubled when there is a hundreds phrases with different styles.

What's your advice?

User avatar
SypherZent
Veteran
Posts: 361
Joined: Fri Sep 02, 2016 3:14 am
Completed: Multiverse Heroes, Space Hamster in Turmoil
Location: Puerto Rico
Contact:

Re: Ren'Py Gripes

#502 Post by SypherZent »

I recently posted here in Ren'Py Gripes regarding a glitch where choice screens would cause the text part to disappear.
It would leave only the options displayed.

I'm happy to say that the latest release version of Ren'Py fixed the issue!
So, just wanted to give thanks for that. :)
Creator of Multiverse Heroes & Space Hamster in Turmoil

Want me to code your game?
Check my services thread!

User avatar
plaster
Regular
Posts: 89
Joined: Thu Jul 11, 2013 1:03 am
Tumblr: plasterbrain
Soundcloud: plasterbrain
Location: Chicago
Contact:

Re: Ren'Py Gripes

#503 Post by plaster »

It'd be nice to be able to add comments that the Ren'Py linter could interpret to ignore certain lines. 😌

User avatar
Kia
Eileen-Class Veteran
Posts: 1037
Joined: Fri Aug 01, 2014 7:49 am
Deviantart: KiaAzad
Discord: Kia#6810
Contact:

Re: Ren'Py Gripes

#504 Post by Kia »

one thing that always bothered me is the extra steps of writing style prefixes in using size_group
for some cases it would be much easier if we could use size group on the spot like:

Code: Select all

vbox:
    size_group "mm"
    textbutton _("Start Game") action Start()
    textbutton _("Load Game") action ShowMenu("load")
    textbutton _("Preferences") action ShowMenu("preferences")
    textbutton _("Help") action Help()
    textbutton _("Quit") action Quit(confirm=False)

User avatar
PyTom
Ren'Py Creator
Posts: 16088
Joined: Mon Feb 02, 2004 10:58 am
Completed: Moonlight Walks
Projects: Ren'Py
IRC Nick: renpytom
Github: renpytom
itch: renpytom
Location: Kings Park, NY
Contact:

Re: Ren'Py Gripes

#505 Post by PyTom »

Kia >>> That's basically what style_prefix is for.
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom
Software > Drama • https://www.patreon.com/renpytom

User avatar
Kia
Eileen-Class Veteran
Posts: 1037
Joined: Fri Aug 01, 2014 7:49 am
Deviantart: KiaAzad
Discord: Kia#6810
Contact:

Re: Ren'Py Gripes

#506 Post by Kia »

PyTom wrote: Sun Sep 08, 2019 12:32 am Kia >>> That's basically what style_prefix is for.
Well, you know me, I'm lazy and if something saves me from writing two extra lines I'll go for it. :mrgreen:
I was about to suggest one line styling too:

Code: Select all

vbox:
    group_style button_xsize 100 button_text_size 40 margins 20,20
    textbutton _("Start Game") action Start()
    textbutton _("Load Game") action ShowMenu("load")
    textbutton _("Preferences") action ShowMenu("preferences")
    textbutton _("Help") action Help()
    textbutton _("Quit") action Quit(confirm=False)
but I guess that would be a long shot as well

strayerror
Regular
Posts: 159
Joined: Fri Jan 04, 2019 3:44 pm
Contact:

Re: Ren'Py Gripes

#507 Post by strayerror »

Text with slow_cps True/slow_abortable True behaves differently to what text on load.

I have a custom say screen upon which I display the what text alongside subtitles -- this is used to show characters speaking a different language to those around them. When loading a save made mid-dialogue however, the what text appears fully displayed while the subtitle (using the show styles) plays out the typewriter animation again. It'd be great if the slow-styled text could skip the animation in the same way as the what text. Thanks for reading!

P.S. If a skip finishes on such a say statement, the same problem occurs; what text is rendered immediately and the subs play catch-up.

Example:

Code: Select all

define config.default_text_cps = 12

screen say(who, what, subs=None):
    style_prefix 'say'
    window:
        id 'window'
        has vbox
        text what id 'what'
        text subs id 'subs' slow_abortable True slow_cps True color '777'

label start:
    'If you Shift+R now, this text will be displayed immedately!' (
        show_subs='However this text will display one character at a time.')
    return

User avatar
Kia
Eileen-Class Veteran
Posts: 1037
Joined: Fri Aug 01, 2014 7:49 am
Deviantart: KiaAzad
Discord: Kia#6810
Contact:

Re: Ren'Py Gripes

#508 Post by Kia »

one of the things that grinds my gears is the fact that I have to calculate the frame size for the box that I want to wrap at a certain number, it would be great if we had an option for the box to wrap every x childs
instead of:

Code: Select all

frame:
    xsize 308
    hbox:
        spacing 4 box_wrap_spacing 4 box_wrap True
        for i in range(10):
            button:
                xysize 100,100
we could use:

Code: Select all

frame:
    hbox:
        spacing 4 box_wrap_spacing 4 box_wrap 3
        for i in range(10):
            button:
                xysize 100,100
this can save lots of times if we can change the spacing and or margins without worrying about calculating the size of the frame.

strayerror
Regular
Posts: 159
Joined: Fri Jan 04, 2019 3:44 pm
Contact:

Re: Ren'Py Gripes

#509 Post by strayerror »

We have the behind keyword for repositioning a layer further back from the screen than it started, but there's no way to easily achieve the inverse when dealing with multiple layers. For example if we have four sprites: A, B, C and D; displayed in that order, then to move B in front of C, we need to know that the layer above C is D and use behind D. Worse then is wanting to move A in front of D, which not only relies on us knowing that D is top-most, but also then hiding and showing A in the same frame to force it to the front (which also results is layered image attributes being forgotten!)

While zorder exists, it's use appears actively discouraged in the docs, and it's not really much better either in readability or in so much that there's still a requirement to mentally track which order the layers are in so the correct zorder value can be used.

Introducing a pair of complementary keywords like above and below (synonym for current behind - because the opposite of behind doesn't really lend itself to a naturally predictable keyword see P.S. below) would give more flexibility to these sort of sprite updates and allow intent to clearly be seen in the code, in contrast to needing to backtrack to find and mentally calculate the current layer order and/or zorder values to inform the operation you wish to achieve.

P.S. I found another sub-gripe :P In the example, show B behind D does not actually work as B is already "behind" D, so it stays where it is, also behind C. This is another good reason for the introduction of above/below, as below would have different semantics to behind, forcing the sprite directly below the target, rather than taking anywhere behind as good enough.

User avatar
Milkymalk
Miko-Class Veteran
Posts: 753
Joined: Wed Nov 23, 2011 5:30 pm
Completed: Don't Look (AGS game)
Projects: KANPEKI! ★Perfect Play★
Organization: Crappy White Wings
Location: Germany
Contact:

Re: Ren'Py Gripes

#510 Post by Milkymalk »

It'd be nice if we could have a "hold" keyword for buttons:

Code: Select all

button idle "button.png" action ACTION_1 hold ACTION_2 delay SECONDS repeat_delay SECONDS
This button would execute ACTION_1 when clicked, but when you hold the button for delay seconds, it would run ACTION_2 every repeat_delay seconds. ACTION_2 is by default the same as ACTION_1.
Crappy White Wings (currently quite inactive)
Working on: KANPEKI!
(On Hold: New Eden, Imperial Sea, Pure Light)

Post Reply

Who is online

Users browsing this forum: No registered users