Tool Ren'Py Extended Variable Viewer 3.00.04 - For walkthrough authors, game authors and modders

5.00 star(s) 6 Votes

Twistty

The Happy Beaver
Donor
Respected User
Former Staff
Sep 9, 2016
4,389
39,123
So, yeah, sorry for the (once again) delay. I'll come back to coding, because I really like doing it, because I'm bored as fuck when I don't do it, and because I feel like I'm betraying everyone, both here and at work. But right now my brain wouldn't follow, and apparently my body too.
So, it will need the time that I achieve to change my bad habits, find good ones, and also find a new pace of life. Something that isn't necessarily easy when your job imply to stay sit and you suffer from chronicle insomnia, but I'll succeed, so yeah, just a question of time.

TL;DR: It's never too late to have a more healthy life... I hope.
Wishing you all the best, and thanks for your personal update.

Quote " find a new pace of life" - that might be the hardest part?
But - It opens yourself up to new experiences, and new opportunities (that are very unexpected, at times) - as I had to do the same thing, a few years ago.

You are one of the best "teachers" - I have encountered on F95.
Do things at your own pace, this is just a website, real life should always come first.
 

yoyomistro

Engaged Member
Jan 15, 2017
2,918
3,838
[sorry if my English is worse than usual]



Well, it's why I name the things, and give a bit of explanation regarding how I fixed the issue, when I face such circumstances. As you seen by yourself, there's no universal solution, so with a bit of search people found how I did it for my own issue, what give them a lead for their own one.


This being said, I'm sorry but I don't know when the next update will happen; to be totally exact, what I don't really know is when I'll be able to code again... And I guess that it need a bit of context, so:

Having the full August month as holiday, and knowing it since a long time, we achieved my children and myself, to pass two weeks together. Parents of adults know that it tend to be a luxury, so we jumped on the occasion.
Then mid August, back at home, no works in view, I started to works full time on my own projects when, well, frankly I'm not sure what happened. Saying that I felt like a car that ran out of fuel is probably the closest. So, direction my doctor and... Well, the good news is that I've no illness, but the bad news is that I'm not in good health either.
From what I understood, my body reacted like a weaned drug addict that would return to his demons where he left them. So, still as I understood it, I avoided a burnout because I took those two weeks doing nothing, what made my body fail prematurely :/

What lead to my current condition, I'm on meds for a undetermined period of times, and forbidden to code; well, strictly it's not what the doc said, but I need to think as less as possible, what mean the same. But anyway, the meds prevent me to think so...
And for once I'll listen attentively to my doc because, hmm, well, I guess he found the rights words for me, I quote: "Of course you live that way since forever, but you're not 20 anymore, you're 53. So, in your current condition, if you had to fight against a sparrow that suffer from anaemia, it's on him that I would bet."

So, yeah, sorry for the (once again) delay. I'll come back to coding, because I really like doing it, because I'm bored as fuck when I don't do it, and because I feel like I'm betraying everyone, both here and at work. But right now my brain wouldn't follow, and apparently my body too.
So, it will need the time that I achieve to change my bad habits, find good ones, and also find a new pace of life. Something that isn't necessarily easy when your job imply to stay sit and you suffer from chronicle insomnia, but I'll succeed, so yeah, just a question of time.

TL;DR: It's never too late to have a more healty life... I hope.
Glad you had some time with your kids, and I guess it's a good thing it ended up sparking a chance to monitor your health. You're the most helpful technical person on here, and I hope you can keep doing what you love for many years. You're right, it's never too late to turn your health around. Try some new food, take up yoga, maybe drink some nettle tea lol. I know how hard it can be to change habits to improve your health, but hopefully this wake-up call makes the process easier for you.
 

FaceCrap

Active Member
Oct 1, 2020
952
690
TL;DR: It's never too late to have a more healty life... I hope.
NEVER, EVER apologize for that. It's THE most important thing,

"if you had to fight against a sparrow that suffer from anaemia, it's on him that I would bet."

I must say, your physician sure does have a way with words. But it does indicate the seriousness of the situation.

Take very good care of yourself.
 

yoyomistro

Engaged Member
Jan 15, 2017
2,918
3,838
NEVER, EVER apologize for that. It's THE most important thing,

"if you had to fight against a sparrow that suffer from anaemia, it's on him that I would bet."

I must say, your physician sure does have a way with words. But it does indicate the seriousness of the situation.

Take very good care of yourself.
You know, I didn't really stop to think about that line with how heavy the rest of the post was. That's a hell of a doctor lol.
 

Daiqvist

Newbie
Jul 20, 2018
25
23
[sorry if my English is worse than usual]



Well, it's why I name the things, and give a bit of explanation regarding how I fixed the issue, when I face such circumstances. As you seen by yourself, there's no universal solution, so with a bit of search people found how I did it for my own issue, what give them a lead for their own one.


This being said, I'm sorry but I don't know when the next update will happen; to be totally exact, what I don't really know is when I'll be able to code again... And I guess that it need a bit of context, so:

Having the full August month as holiday, and knowing it since a long time, we achieved my children and myself, to pass two weeks together. Parents of adults know that it tend to be a luxury, so we jumped on the occasion.
Then mid August, back at home, no works in view, I started to works full time on my own projects when, well, frankly I'm not sure what happened. Saying that I felt like a car that ran out of fuel is probably the closest. So, direction my doctor and... Well, the good news is that I've no illness, but the bad news is that I'm not in good health either.
From what I understood, my body reacted like a weaned drug addict that would return to his demons where he left them. So, still as I understood it, I avoided a burnout because I took those two weeks doing nothing, what made my body fail prematurely :/

What lead to my current condition, I'm on meds for a undetermined period of times, and forbidden to code; well, strictly it's not what the doc said, but I need to think as less as possible, what mean the same. But anyway, the meds prevent me to think so...
And for once I'll listen attentively to my doc because, hmm, well, I guess he found the rights words for me, I quote: "Of course you live that way since forever, but you're not 20 anymore, you're 53. So, in your current condition, if you had to fight against a sparrow that suffer from anaemia, it's on him that I would bet."

So, yeah, sorry for the (once again) delay. I'll come back to coding, because I really like doing it, because I'm bored as fuck when I don't do it, and because I feel like I'm betraying everyone, both here and at work. But right now my brain wouldn't follow, and apparently my body too.
So, it will need the time that I achieve to change my bad habits, find good ones, and also find a new pace of life. Something that isn't necessarily easy when your job imply to stay sit and you suffer from chronicle insomnia, but I'll succeed, so yeah, just a question of time.

TL;DR: It's never too late to have a more healty life... I hope.
You are indeed one of the best "teachers" here. I have understood a lot about renpy and I am now able to fix my own little things thanks to your explanations (I'm sorry I don't interact a lot here because I'm not confident enough with my english).

I really, really, hope you get at your best (even if you don't write code here anymore) because health is the first thing to achieve everything else.
All the best and.. hope to see your posts again!
 

anne O'nymous

I'm not grumpy, I'm just coded that way.
Modder
Donor
Respected User
Jun 10, 2017
10,694
15,710
NEVER, EVER apologize for that. It's THE most important thing,
One don't prevent the second.
I'm from the generation stuck between the "men are strong indestructible entities that should never fail others" era and the "men are human beings like any others" one. What mean that I know that caring about myself is important and, despite what it looks like, between my mental health issues and the death of my wife, I did it not so badly. But in the same time there's still that little voice in my head saying that I'm a guy and therefore must not fail others, whatever it cost.

A balance hard to find and that I clearly have to redefine.


I must say, your physician sure does have a way with words. But it does indicate the seriousness of the situation.
I'm pretty sure that he practiced it many time and that, once at home, he proudly said to his wife that he finally achieved to place it.
What I mean is that he's my doctor since a bit more than 20 years, and I'm a jerk as patient. He show me age and said more than once that I should do more of this and be less like that, what I answered to with "yeah" but never really cared to do. Finally, what he predicted happened, and he hit the nail with a perfect punchline to be sure that this time I listen more attentively ; what worked.

But, while the situation is effectively serious, as I said I'm not ill or whatever, just in a too bad shape, both physically and mentally. So, it's not something that can't be changed, and not only it's my intent to change it, but I already started to do it.
 

FaceCrap

Active Member
Oct 1, 2020
952
690
In the meantime, I'm trying to figure what I did wrong, because even though I don't get an exception anymore in Sunshine Love. The ipatches also don't do what they're supposed to do.
 
  • Thinking Face
Reactions: Twistty

anne O'nymous

I'm not grumpy, I'm just coded that way.
Modder
Donor
Respected User
Jun 10, 2017
10,694
15,710
In the meantime, I'm trying to figure what I did wrong, because even though I don't get an exception anymore in Sunshine Love. The ipatches also don't do what they're supposed to do.
Meds don't permit you to really help on this, but I can still give some advice:

  1. Is the sequence correct ?
    Things must happen in a given order to works.
    The class have to be defined by the game in order to be tweaked or overwrote, and the tweak/override must happen before the very first use of the said class.
  2. Is the modification the right answer for each issue ?
    There's nothing universal, alas. Therefore, a fix that works for one doesn't necessarily works for another.
  3. Is the code for each entities correct for this use ?
    By example, before I was betrayed by myself, I found that my hook code, or more precisely the code I hook with it, have a design flaw since years.
    Callbacks don't necessarily change the date used as parameters (It's the case for the label tracing), they also don't necessarily return something, and what they return isn't necessarily what you have to pass as parameter to the next entry in the hook.
    In years of use the current designed was working fine, except with one recent game. So, the problem you face don't necessarily come from the problem you fixed, but from a code that you expect as being correct; that can be my code, the code from the game, or the one from any other mod involved.


And also, don't hesitate to rely on a approach.

As stupid as it can looks at first, explaining to someone (human or not, alive or not) what you try to do really works. I don't count the number of time I annoyed my wife telling her what I was trying to do, just to stop mid way with a, "yeah, no, I'm just an idiot", because doing it I found where was the code/design flaw. Same with my cat after her death, and with a stuffed toy now that he goes to live with her.
The way our brain works when we just think about something isn't the same than when we explain it out loud. When it's just in our head, our thoughts are like, "I'll do it that way", but unlike when we try to explain to someone, "that way" is never really addressed. It's an intuition more than a knowledge, so we don't perceive the flaw that hide in it.

Plus, like we try to explain the problem to someone that don't know, nor really understand, what we talk about, we need to goes more in the details, to really explain step by step, what force us to focus on each one of those steps. Reason why even at works people use something like a rubber duck, and not talk to a co-worker during a break.
To a co-worker, you would say something like "I hook my code between this and that". To a rubber duck you need to explain what your code do, what "hook" mean, what your code expect as entry, what he get as entry, what he return and what the next code expect as entry. And like the issue is generally somewhere on one of those points, you find it.
 
  • Like
Reactions: yoyomistro

FaceCrap

Active Member
Oct 1, 2020
952
690
What mean that I know that caring about myself is important and, despite what it looks like, between my mental health issues and the death of my wife, I did it not so badly.
Oh shoot! This comes a bit too close to home. And I now know the place you're in coz I lost mine too very unexpected, been together for almost 40 years (I'm 67 myself) and even though it's now almost 5 years, I'm still trying to get out of that hole...

And as for the other bit. I gave up, it's a mine field trying to get it to work with my own mods and things like UCD/URM. All of which use label_overrides.
 
  • Sad
Reactions: yoyomistro

FaceCrap

Active Member
Oct 1, 2020
952
690
Is the sequence correct ?
Quick update.

This one set me on the right track. Since I always have a highly customized version of PenfoldMole's transparent Text Box Mod, 0x52's Universal Ren'Py Mod and ZLZK's Universal Choice Descriptor loaded, all of which use label_override at some point, it was a bit of a puzzle to find the correct sequence.

And where I initially used a slightly changed copy of the fix included in AONfixes to prevent name conflicts, after finding the correct sequence I discovered even this wasn't needed.

Weirder still, I was prepping to create replacement ipatch.rpa files for upload in 0x52's URM thread and was testing to make sure that worked but forgot to add the viewer in the test folder, it only had URM added... and much to my surprise the game launched and the ipatch was activated... so it seems that just changing the init python statements to change the sequence was enough.

In short, it works! Thank you very much for the pointer.
 
Last edited:
  • Like
Reactions: Twistty

yoyomistro

Engaged Member
Jan 15, 2017
2,918
3,838
One don't prevent the second.
I'm from the generation stuck between the "men are strong indestructible entities that should never fail others" era and the "men are human beings like any others" one. What mean that I know that caring about myself is important and, despite what it looks like, between my mental health issues and the death of my wife, I did it not so badly. But in the same time there's still that little voice in my head saying that I'm a guy and therefore must not fail others, whatever it cost.

A balance hard to find and that I clearly have to redefine.




I'm pretty sure that he practiced it many time and that, once at home, he proudly said to his wife that he finally achieved to place it.
What I mean is that he's my doctor since a bit more than 20 years, and I'm a jerk as patient. He show me age and said more than once that I should do more of this and be less like that, what I answered to with "yeah" but never really cared to do. Finally, what he predicted happened, and he hit the nail with a perfect punchline to be sure that this time I listen more attentively ; what worked.

But, while the situation is effectively serious, as I said I'm not ill or whatever, just in a too bad shape, both physically and mentally. So, it's not something that can't be changed, and not only it's my intent to change it, but I already started to do it.
Damn, didn't know your wife and cat had passed as well. Hope you have someone to help you through as you're making health changes. But yea your doc was probably really pleased with himself dropping that line, lol.

More on topic, I always vacillate on whether to use label overrides or not when I'm modding, 1. cuz I always forget the syntax for them, and I don't have a template. I've seen them implemented a few different ways and IDK which is best. 2. If the dev makes major changes, it ruins the point of using them in the first place, I still would end up having to do a ton of work to fix my mod anyway. 3. Text replace for lines usually gets the job done, it's easier to replace lines than implement new label jumps. 4. If the dev corrects a bunch of typos, I'd have to move the new text over to my label overrides, which again is another point for text replacement.

The main reason why I'd want to learn to use them effectively is to do path merges, since I don't like playing games more than once. What I usually do is just put the label jumps in the game files themselves, but that means I have to do a bunch of work in WinMerge for games with a bunch of different paths or two heavily divergent paths each release, which is annoying...
 

anne O'nymous

I'm not grumpy, I'm just coded that way.
Modder
Donor
Respected User
Jun 10, 2017
10,694
15,710
Hope you have someone to help you through as you're making health changes.
I have. Children are a bit far, but they stay in touch with me, as well as my boss and co-workers. One of the junior is even unwittingly funny, trying to making me feel better by showing that he take seriously the fact that he's now responsible for the tests writing, while doing his best to not make me feel useless. To summarize, each time we talk it looks like, "you see, we can still works at 100% without you... this doesn't mean that I took your place, we have to be at 200%... but not you, you need to take it easy... not that you're old..."
He probably play a big part in the fact that I take all this not so badly ;)


1. cuz I always forget the syntax for them, and I don't have a template. I've seen them implemented a few different ways and IDK which is best.
There's no "best" here, it all depend on the context.
It's like for transportation devices. What is "best" ? A sport car ? A family car ? A bicycle ? If you want to impress girls, the first is the answer. But if what you want is just buy some bread, the last one would be way better. And for a holiday trip with you wife, two kids and pets, there will be nothing better than the second.


2. If the dev makes major changes, it ruins the point of using them in the first place, I still would end up having to do a ton of work to fix my mod anyway.
Yes, but it's "if the dev makes major changes". If he don't, what will be the cases for most of the code, in most of the updates, you'll have nothing to do.
This being opposed to a more invasive way to mod, that would need that you copy/past your changes every time there's an update. So, in the end, even if there's changes time to time, it would still be easier and faster to rely on label overrides.


3. Text replace for lines usually gets the job done, it's easier to replace lines than implement new label jumps.
4. If the dev corrects a bunch of typos, I'd have to move the new text over to my label overrides, which again is another point for text replacement.
Totally agree. But label overrides can help you organize all this.

/!\ wrote on the fly, with a half working brain /!\
Python:
# What apply to "start" label.
default linesOverrided = { [...] }

init python:
    config.label_overrides["label1"] = "label1_modded"
    config.label_overrides["label1_OUT"] = "label1"

label label1_modded:
    # What apply to "label1" label.
    $ linesOverrided = { [...] }
    jump label1_OUT
side note:
So far, Ren'Py do not validate the content of config.label_overrides. Therefore you can use label that do not exist at all, like the "label1_OUT" in my example. Ren'Py will find it in config.label_overrides, change the name of the label accordingly, and like it's an existing label, will branch to it.


With this, you don't hijack the game flow, but hook in top of the label. Ren'Py flow become this:
  • [previous label]
  • label1_modded
  • label1

And doing so, if a line have change in whatever label, you know precisely where to find it in your own code, it will be in the same label with the "_modded" suffix.
This also permit to keep linesOverrided as small as possible. Strictly speaking it don't impact the performances, but it's always a good practice to have as less data as possible.


The main reason why I'd want to learn to use them effectively is to do path merges, since I don't like playing games more than once. What I usually do is just put the label jumps in the game files themselves, but that means I have to do a bunch of work in WinMerge for games with a bunch of different paths or two heavily divergent paths each release, which is annoying...
Hmm... there's many way for devs to do this, but for modders, if it rely on jump, there's an easy way to fix this.
Let's say that you've this as original code:
Python:
label whatever:
    [...]
    menu:
        "pass the night with Anna.":
            jump anna_night
        "Go to the coffeeshop to flirt with the barista."
            jump coffeeshop
        "Meet Sarah in the park."
            jump sarah_park

label anna_night:
    [...]
    jump next_scene

label coffeeshop:
    [...]
    jump next_scene

label sarah_park:
    [...]
    jump next_scene

label next_scene:
    [...]
What you can do is something like:
/!\ wrote on the fly, with a half working brain /!\
Python:
# intentionally left blank.
default labelsStates = {}

init python:
    config.label_overrides["next_scene"] = "next_scene_hub"
    config.label_overrides["next_scene_OUT"] = "next_scene"

label next_scene_hub:
    #  You never been there yet.
    #  This mean that you come from "anna_night" label, jump to the second scene.
    if not "next_scene" in labelStates:
        $ labelStates["next_scene"] = 1
        [Place here the variables changes that possibly happen in the menu]
        jump coffeeshop

    #  You've been there before, but only once. Time to jump to the third scene.
    elif labelStates["next_scene"] = 1
        $ labelStates["next_scene"] = 2
        [Place here the variables changes that possibly happen in the menu]
        jump sarah_park

    #  You've seen all the scenes, time to get back to the normal flow.
    else:
        jump next_scene_OUT
It will not apply to every games, because it need for each scene to have its own label. But when it's the case, then it will works all the time, whatever how many changes there's in each label.
You only have to ensure that the variables changes haven't been updated, and that the name of the label they all branch to is still the same.

As for games where the scenes are directly embedded in the menu, there's still something you can do to limits your work.
The game will looks like this:
Python:
label whatever:
    [...]

    menu:
        "pass the night with Anna.":
            [the scene]
        "Go to the coffeeshop to flirt with the barista."
            [the scene]
        "Meet Sarah in the park."
            [the scene]

    [...]
You'll have to do two things. Firstly a small update in the original code:
/!\ wrote on the fly, with a half working brain /!\
Python:
label whatever:
    [...]

    # Add an implicit jump to make label overrides possible.
    # I used a sub label (the leading dot), but it's not mandatory.
    jump .selectionMenu

    # Explicitly give a label to the menu, once again to make label overrides possible.
    menu .selectionMenu:
        "pass the night with Anna.":
            [the scene]
        "Go to the coffeeshop to flirt with the barista."
            [the scene]
        "Meet Sarah in the park."
            [the scene]

    # Give a label to the following common part, because you need to find your way back.
    # Once again I used a sub label, but it's not mandatory.
    label .continue
    [...]
Then your mod will looks like:
/!\ wrote on the fly, with a half working brain /!\
Python:
init python:
    config.label_overrides["whatever.selectionMenu"] = whatever_modded

label whatever_modded:
    [scene with Anna]
    [scene with the barista]
    [scene with Sarah]
    # Return to the common flow
    jump whatever.continue
You'll still have changes to make on the original code with every updates, but it's small changes that will apply whatever have changed in the said original code. As long as the dev do not totally remove the menu, it will works.
You'll still have to update your code if he change something in one of the three scenes, but that's all you'll have to do. As long as the changes happen outside of those three scenes, it will not matters because the modded version use the original code for this.



Oh god, what I love thinking about code... A chance it was still something basic, it needed more time that I thought, but yeah, what a pleasant feeling that thinking and still being fine right after it.
Thanks a lot, seriously.
 

yoyomistro

Engaged Member
Jan 15, 2017
2,918
3,838
I have. Children are a bit far, but they stay in touch with me, as well as my boss and co-workers. One of the junior is even unwittingly funny, trying to making me feel better by showing that he take seriously the fact that he's now responsible for the tests writing, while doing his best to not make me feel useless. To summarize, each time we talk it looks like, "you see, we can still works at 100% without you... this doesn't mean that I took your place, we have to be at 200%... but not you, you need to take it easy... not that you're old..."
He probably play a big part in the fact that I take all this not so badly ;)




There's no "best" here, it all depend on the context.
It's like for transportation devices. What is "best" ? A sport car ? A family car ? A bicycle ? If you want to impress girls, the first is the answer. But if what you want is just buy some bread, the last one would be way better. And for a holiday trip with you wife, two kids and pets, there will be nothing better than the second.




Yes, but it's "if the dev makes major changes". If he don't, what will be the cases for most of the code, in most of the updates, you'll have nothing to do.
This being opposed to a more invasive way to mod, that would need that you copy/past your changes every time there's an update. So, in the end, even if there's changes time to time, it would still be easier and faster to rely on label overrides.




Totally agree. But label overrides can help you organize all this.

/!\ wrote on the fly, with a half working brain /!\
Python:
# What apply to "start" label.
default linesOverrided = { [...] }

init python:
    config.label_overrides["label1"] = "label1_modded"
    config.label_overrides["label1_OUT"] = "label1"

label label1_modded:
    # What apply to "label1" label.
    $ linesOverrided = { [...] }
    jump label1_OUT
side note:
So far, Ren'Py do not validate the content of config.label_overrides. Therefore you can use label that do not exist at all, like the "label1_OUT" in my example. Ren'Py will find it in config.label_overrides, change the name of the label accordingly, and like it's an existing label, will branch to it.


With this, you don't hijack the game flow, but hook in top of the label. Ren'Py flow become this:
  • [previous label]
  • label1_modded
  • label1

And doing so, if a line have change in whatever label, you know precisely where to find it in your own code, it will be in the same label with the "_modded" suffix.
This also permit to keep linesOverrided as small as possible. Strictly speaking it don't impact the performances, but it's always a good practice to have as less data as possible.




Hmm... there's many way for devs to do this, but for modders, if it rely on jump, there's an easy way to fix this.
Let's say that you've this as original code:
Python:
label whatever:
    [...]
    menu:
        "pass the night with Anna.":
            jump anna_night
        "Go to the coffeeshop to flirt with the barista."
            jump coffeeshop
        "Meet Sarah in the park."
            jump sarah_park

label anna_night:
    [...]
    jump next_scene

label coffeeshop:
    [...]
    jump next_scene

label sarah_park:
    [...]
    jump next_scene

label next_scene:
    [...]
What you can do is something like:
/!\ wrote on the fly, with a half working brain /!\
Python:
# intentionally left blank.
default labelsStates = {}

init python:
    config.label_overrides["next_scene"] = "next_scene_hub"
    config.label_overrides["next_scene_OUT"] = "next_scene"

label next_scene_hub:
    #  You never been there yet.
    #  This mean that you come from "anna_night" label, jump to the second scene.
    if not "next_scene" in labelStates:
        $ labelStates["next_scene"] = 1
        [Place here the variables changes that possibly happen in the menu]
        jump coffeeshop

    #  You've been there before, but only once. Time to jump to the third scene.
    elif labelStates["next_scene"] = 1
        $ labelStates["next_scene"] = 2
        [Place here the variables changes that possibly happen in the menu]
        jump sarah_park

    #  You've seen all the scenes, time to get back to the normal flow.
    else:
        jump next_scene_OUT
It will not apply to every games, because it need for each scene to have its own label. But when it's the case, then it will works all the time, whatever how many changes there's in each label.
You only have to ensure that the variables changes haven't been updated, and that the name of the label they all branch to is still the same.

As for games where the scenes are directly embedded in the menu, there's still something you can do to limits your work.
The game will looks like this:
Python:
label whatever:
    [...]

    menu:
        "pass the night with Anna.":
            [the scene]
        "Go to the coffeeshop to flirt with the barista."
            [the scene]
        "Meet Sarah in the park."
            [the scene]

    [...]
You'll have to do two things. Firstly a small update in the original code:
/!\ wrote on the fly, with a half working brain /!\
Python:
label whatever:
    [...]

    # Add an implicit jump to make label overrides possible.
    # I used a sub label (the leading dot), but it's not mandatory.
    jump .selectionMenu

    # Explicitly give a label to the menu, once again to make label overrides possible.
    menu .selectionMenu:
        "pass the night with Anna.":
            [the scene]
        "Go to the coffeeshop to flirt with the barista."
            [the scene]
        "Meet Sarah in the park."
            [the scene]

    # Give a label to the following common part, because you need to find your way back.
    # Once again I used a sub label, but it's not mandatory.
    label .continue
    [...]
Then your mod will looks like:
/!\ wrote on the fly, with a half working brain /!\
Python:
init python:
    config.label_overrides["whatever.selectionMenu"] = whatever_modded

label whatever_modded:
    [scene with Anna]
    [scene with the barista]
    [scene with Sarah]
    # Return to the common flow
    jump whatever.continue
You'll still have changes to make on the original code with every updates, but it's small changes that will apply whatever have changed in the said original code. As long as the dev do not totally remove the menu, it will works.
You'll still have to update your code if he change something in one of the three scenes, but that's all you'll have to do. As long as the changes happen outside of those three scenes, it will not matters because the modded version use the original code for this.



Oh god, what I love thinking about code... A chance it was still something basic, it needed more time that I thought, but yeah, what a pleasant feeling that thinking and still being fine right after it.
Thanks a lot, seriously.
Incredible, thanks for such a comprehensive answer, will definitely be referring to this post a ton in the future. Glad you're taking things in stride and that people around you are keeping you in good humor =P.
 
  • Hey there
Reactions: Twistty
5.00 star(s) 6 Votes