Making patches for games

ZLZK

Member
Modder
Jul 2, 2017
295
806
Firstly, because it literally hijack Ren'Py mid-process.
With config.label_overrides, Ren'Py is told to branch to a label, and before doing this it will look if there's a redirection defined. But here, Ren'Py will be already entering into the label when you'll order him to go to another label. It will break nothing, but it's not clean at all.
config.label_overrides happens before config.label_callback.
So it's redirected before, and with renpy.jump inside callback, it's redirected after as well.

What "jump" ? The statement or the python equivalent ? And what don't works with it ?
Never mind, abnormal argument was blocking jump.

And that's all. There's no "pre_label" or whatever.
That was just me making things up, since I didn't look into code.


Taking above into account, this makes config.label_overrides to work with labels without explicit jump.
Python:
init 1699 python hide:

    def new_label_callback(label, abnormal):
        if not abnormal:
            renpy.jump(label)
          
    if config.label_callback:
        old_label_callback = config.label_callback
      
        def chained_label_callback(label, abnormal):
            old_label_callback(label, abnormal)
            new_label_callback(label, abnormal)
          
        config.label_callback = chained_label_callback
    else:
        config.label_callback = new_label_callback
 
Last edited:

anne O'nymous

I'm not grumpy, I'm just coded that way.
Modder
Donor
Respected User
Jun 10, 2017
11,041
16,361
config.label_overrides happens before config.label_callback.
So it's redirected before, and with renpy.jump inside callback, it's redirected after as well.
What doesn't matters since the callback is precisely here for the cases that can not be covered by config.label_overrides. In the same time, if what you want is only to redirect the flow, or if your mod provide a variety of range, you will benefit from the possible redirection over the destination label.


Taking above into account, this makes config.label_overrides to work with labels without explicit jump.
What was the question asked, and answered...
 
  • Like
Reactions: simple_human

simple_human

Newbie
Dec 2, 2018
83
3,483
Hi everyone!!!

Is there anyone familiar with the Godot engine?

I made a patch for a game on the Ren'Py engine, but the game was switched to Godot. There's already someone who , but I want to understand how to do it myself.

Here is the . The problem is, I don't know what to do, where to put it, how to put it, or how it works. If it's not too much trouble, could someone please write a step-by-step guide on what to do?
 
Last edited: