I can make it load a corrected timetable for the main-menu, but loading a savegame will reset it back to the broken table.
That isn't a problem. Just use the after_load label to check if the table is broke, and correct it if it's the case. Take a look
You must be registered to see the links
if you need more information.
add checks for patches at key-points in the scripts (start/after_load)
You can already patch without any change to the code. Like the patch become useless with the next update, just use
You must be registered to see the links
to insert your correction before
start and
after_load, or to replace it, according of the problem you need to patch.
So, if it's just an addition, patch.rpy :
Code:
init python:
config.label_overrides["start"] = "patchedStart"
config.label_overrides["outStart"] = "start"
config.label_overrides["after_load"] = "patchedAfterLoad"
config.label_overrides["outAfterLoad"] = "after_load"
label patchedStart:
[...]
jump outStart
label outStart:
pass
label patchedAfterLoad:
[...]
jump outAfterLoad:
label outAfterLoad:
pass
Ren'py will execute
patchedStart, then
start. Same for
after_load.
Side note: the "out..." labels don't even need to exist, but it's better this way.
And if you need to change something defined in the label, patch.rpy :
Code:
init python:
config.label_overrides["start"] = "patchedStart"
config.label_overrides["after_load"] = "patchedAfterLoad"
label patchedStart:
[copy what's in the actual start label, obviously with the correction]
label afterLoad:
[copy what's in the actual after_load label, obviously with the correction]
Ren'py will execute
patchedStart instead of
start. Same for
after_load.
Note that the same thing apply for any label. If there's a breaking typo in, let's say the label "heyItsFunHere", just make a patch that will replace it. Like, here again, the patch become useless with the next update, it will works fine :
Code:
init python:
config.label_overrides["heyItsFunHere"] = "patchedHeyItsFunHere"
label patchedHeyItsFunHere:
[copy what's in the actualheyItsFunHere label, with the correction]
And if it's a variable declaration missing at the start of a label (by example), use the insertion method.