Search found 2400 matches

by Ocelot
Thu Apr 18, 2024 3:05 am
Forum: Ren'Py Questions and Announcements
Topic: Problems updating certain projects to Renpy 8 from Renpy ~7.5
Replies: 4
Views: 113

Re: Problems updating certain projects to Renpy 8 from Renpy ~7.5

Just don't sort lists containing unsortable things.
by Ocelot
Wed Apr 17, 2024 2:02 am
Forum: Ren'Py Questions and Announcements
Topic: Problems updating certain projects to Renpy 8 from Renpy ~7.5
Replies: 4
Views: 113

Re: Problems updating certain projects to Renpy 8 from Renpy ~7.5

1) you are trying to sort a list containing dictionaries. To do that Python applies operator < to dictionaries. Support for dict comparison was experimental and undocumented (read: should not be used) in Python2 and was completely removed in Python 3. 2) I am not sure there, but it could be constant...
by Ocelot
Tue Apr 16, 2024 2:04 pm
Forum: Ren'Py Questions and Announcements
Topic: set_queue_empty_callback behavior
Replies: 3
Views: 145

Re: set_queue_empty_callback behavior

YOu almost got it, but instead of playing sound in callback, queue it to play right after current sound instead.
by Ocelot
Mon Apr 15, 2024 2:01 pm
Forum: Ren'Py Questions and Announcements
Topic: set_queue_empty_callback behavior
Replies: 3
Views: 145

Re: set_queue_empty_callback behavior

Note that empty queue callback is called when the queue becomes empty, i. e. when the last song starts playing, not when it finishes. https://www.renpy.org/doc/html/audio.html#renpy.music.set_queue_empty_callback renpy.music.set_queue_empty_callback(callback, channel='music') This sets a callback th...
by Ocelot
Sat Apr 13, 2024 4:09 pm
Forum: Ren'Py Questions and Announcements
Topic: Making fading popups in a screen [SOLVED]
Replies: 4
Views: 201

Re: Making fading popups in a screen

1) Nothing after return is executed. 2) Even if would, your use of renpy.pause is likely to cause interaction withing interaction error 3) popup_cant_go = False creates a local variable which is instantly destroyed in this case. It odes not modyfy anything. Your best bet is to show a custom screen w...
by Ocelot
Sat Apr 13, 2024 6:59 am
Forum: Ren'Py Questions and Announcements
Topic: Empty textbox shows up while using renpy.pause()
Replies: 5
Views: 333

Re: Empty textbox shows up while using renpy.pause()

Imperf3kt wrote: Sat Apr 13, 2024 6:31 am I wasn't aware Ren'Py said that when you tried to install Atom. I have never had an issue with it myself. YMMV I guess.
It is this problem. Quite a few people in Discord and several on forums complained the exact same thing happened to them.
https://github.com/atom/atom/issues/11406
by Ocelot
Wed Apr 10, 2024 4:42 pm
Forum: Ren'Py Questions and Announcements
Topic: [Solved!] Name Generator generating twice?
Replies: 5
Views: 252

Re: Name Generator generating twice?

Screens should not have any side effects in their code. Screen code is run multiple times during prediction and every time screen refreshes (basically, when anything happens) and can be executed with any parameters, including those you never tried to pass. In short, move random name generation and e...
by Ocelot
Wed Apr 10, 2024 4:26 pm
Forum: Ren'Py Questions and Announcements
Topic: Screen parameters not clearing properly
Replies: 2
Views: 107

Re: Screen parameters not clearing properly

Screens should not have any side effects in their code. Screen code is run multiple times during prediction and every time screen refreshes (basically, when anything happens) and can be executed with any parameters, including those you never tried to pass.
by Ocelot
Wed Apr 10, 2024 8:52 am
Forum: Ren'Py Questions and Announcements
Topic: [Solved] Game doesn't save dictionary changes.
Replies: 2
Views: 104

Re: [HELP] Game doesn't save dictionary changes.

https://www.renpy.org/doc/html/save_load_rollback.html The Python state consists of the variables in the store that have changed since the game began, and all objects reachable from those variables. Note that it's the change to the variables that matters – changes to fields in objects will not cause...
by Ocelot
Tue Apr 09, 2024 3:08 am
Forum: Ren'Py Questions and Announcements
Topic: [SOLVED] Autosave & Autoload only once?
Replies: 2
Views: 199

Re: Autosave & Autoload only once?

Something like:

Code: Select all

label main_menu:
    if persistent.scary_thing:
        $ renpy.run( Start('scary_label') )
    else:
        show screen main_menu
        pause
    return
Then you could turn off flag in the scary_label.
by Ocelot
Tue Apr 09, 2024 3:04 am
Forum: Ren'Py Questions and Announcements
Topic: Render button with transform
Replies: 2
Views: 176

Re: Render button with transform

I am not completely sure how the first piece ofcode works, but you can wrap child in transform you need: # at the end of init self.child = Transform(child=self.child, matrixcolor=TintMatrix(self.current_text_color)) If you want to constantly chnage text color and make it reflect on text, then replac...
by Ocelot
Thu Apr 04, 2024 12:40 am
Forum: Ren'Py Questions and Announcements
Topic: [SOLVED] How to define persistable objects?
Replies: 4
Views: 152

Re: How to define persistable objects?

As persistent data is loaded before init python blocks are run, persistent data should only contain types that are native to Python or Ren'Py. Alternatively, classes that are defined in python early blocks can be used, provided those classes can be pickled and implement equality. My approach in sim...
by Ocelot
Sun Mar 31, 2024 5:16 pm
Forum: Ren'Py Questions and Announcements
Topic: KeyError: 'retain' when calling say with name argument
Replies: 4
Views: 163

Re: KeyError: 'retain' when calling say with name argument

I'm actually not sure what you are doing here. What is this "character" object you are using and why? https://www.renpy.org/doc/html/dialogue.html#the-character-store Are you trying to load save and getting this error afterwards? If so, then default is the problem. Character objects are n...
by Ocelot
Sun Mar 31, 2024 12:19 pm
Forum: Ren'Py Questions and Announcements
Topic: Animated imagebutton in main menu[sloved]
Replies: 3
Views: 243

Re: Animated imagebutton in main menu

Button without any actions will not receive any events. If you want hover events to work, you need to provide an action. You can use a built-in action which does not do anything, called NullAction()
by Ocelot
Sat Mar 30, 2024 3:15 pm
Forum: Ren'Py Questions and Announcements
Topic: how to make a loading screen where the player is reminded of what happened at a previous point in the plot?
Replies: 2
Views: 144

Re: how to make a loading screen where the player is reminded of what happened at a previous point in the plot?

Always have data you want to show after loading up to date in your game, and then use after_load special label to show some screens telling player what happened before. https://www.renpy.org/doc/html/label.html#special-labels Example: default happened_before = ["you have started the game"]...