Create your AI Cum Slut -70% for Mother's Day
x

Ren'Py Problem with Ren'Py side images.

UncommonRole

Newbie
Jan 4, 2021
49
22
Although it’s one of the first things I learned and have used over 70 times already, now, for some reason, I’m having trouble with side images. What’s happening is that this new character, named "Jack", never shows the side image, and it also doesn’t apply the change in name text size to fit the textbox and the color.

Code:
define arisa = Character("{size=-10}Arisa \"No jokes\"{/size}", image="arisa", color ="#8b0a1c")
define cyntx = Character("Cynthyatrix", image="cynthyatrix", color="#cbb439")
define jack = Character("{size=-10}Awesome Jack{/size}", image="awesome_jack", color ="#bb8be2")
I’ve already checked the avatar, format, name, and size are correct, and I have no idea what the heck else to do.

I’ve also noticed that, for some reason, the colors or sizes of other characters aren’t updating when I make changes. I have a feeling I must’ve messed with something I shouldn’t have, but I have no idea what it could be.


1743944694498.png


1743944741399.png

Thanks in advance, everyone!
 

anne O'nymous

I'm not grumpy, I'm just coded that way.
Modder
Donor
Respected User
Jun 10, 2017
11,785
18,244
Code:
define arisa = Character("{size=-10}Arisa \"No jokes\"{/size}", image="arisa", color ="#8b0a1c")
define cyntx = Character("Cynthyatrix", image="cynthyatrix", color="#cbb439")
define jack = Character("{size=-10}Awesome Jack{/size}", image="awesome_jack", color ="#bb8be2")
While technically not wrong, the size (and in fact any styling elements) shouldn't be part of the name of the character. This being due to the fact that it will be stored in the name attribute of the character object, and mess with everything is you use something like:
Python:
label whatever:
    mc "And then, [girlA.name] said that I'm too dumb for her. Can you imagine that?"
You should pass the values as argument when creating the character object, using the who_ prefix for that; passing an absolute value:
define jack = Character( "Awesome Jack", who_size=40, [...] )
Alternatively you can use the who_prefix and who_suffix arguments for that if really you need a relative value:
define jack = Character( "Awesome Jack", who_prefix="{size=-10}", who_suffix="{/size}", [...] )


I’ve already checked the avatar, format, name, and size are correct, and I have no idea what the heck else to do.
Haven't you forgot to define the side image?
image side awesome_jack = "whatever image that is the default one"
 

Turning Tricks

Rendering Fantasies
Game Developer
Apr 9, 2022
1,682
3,138
Although it’s one of the first things I learned and have used over 70 times already, now, for some reason, I’m having trouble with side images. What’s happening is that this new character, named "Jack", never shows the side image, and it also doesn’t apply the change in name text size to fit the textbox and the color.

Code:
define arisa = Character("{size=-10}Arisa \"No jokes\"{/size}", image="arisa", color ="#8b0a1c")
define cyntx = Character("Cynthyatrix", image="cynthyatrix", color="#cbb439")
define jack = Character("{size=-10}Awesome Jack{/size}", image="awesome_jack", color ="#bb8be2")
I’ve already checked the avatar, format, name, and size are correct, and I have no idea what the heck else to do.

I’ve also noticed that, for some reason, the colors or sizes of other characters aren’t updating when I make changes. I have a feeling I must’ve messed with something I shouldn’t have, but I have no idea what it could be.


View attachment 4719341


View attachment 4719344

Thanks in advance, everyone!
Can you show what the code is for that dialogue example you are showing?

At first glance, the basic character define seems okay, but side images won't work unless they are properly named in your images directory. For example, for that screencap above, you might have this...

jack "Me cago en dios, porque no dunciona????!!!!"

so the side image should be a PNG or Webp image (with Alpha) and it should be small enough to fit (mine are 300 x 300 pixels, for example) and saved as that and not saved full screen, and the file name should be something like ...

"images/side awesome_jack.png"

The space between "side" and the character name is required.

and for other sides (to convey emotions, for example) , you just add the descripter after the character name (with a space), like so ...

"images/side awesome_jack.png" is called by jack "blah, blah ..." - Neutral side image

"images/side awesome_jack angry.png" is called by jack angry "blah, blah ..."

"images/side awesome_jack sad.png" is called by jack sad "blah, blah ..."

Haven't you forgot to define the side image?
image side awesome_jack = "whatever image that is the default one"
That's actually something that is kind of confusing, because I have never had to declare any side images in my VN's. And I have never had an error because of that. AFAIK, Ren'py scans your game directory and automatically creates a pool of image attributes from any image with a 'side' tag.

So, for example, if you declare jack with an image tag like ...

jack = Character("Awesome Jack", image="awesome_jack")

... and you only have one side image for them, then the pool will only have one entry - "awesome_jack" and will use any image named that with a corresponding side tag. ("images/side awesome_jack.png")

When you have multiple tags for that same character, then Ren'py tries to find the best match and if it can't find an exact image that matches that, then it uses the top one from the pool. So if you did this ...

jack frustrated "blah, blah ..."

... but you didn't include a "images/side awesome_jack frustrated.png" image, then Ren'py would default to the "images/side awesome_jack.png"


In the Ren'py DOCS on the subject, they do show examples of declaring side images, but I believe that's just to give example to how it resolves conflicts. In any case, I doubt it would hurt to decalre side images, but I've never ran into an error not declaring them - YET - and I'm on Ren'py 8.3.1 right now. I have had regular game images go from working fine one release, to not being found in an updated version and then I had to declare them. So I basically declare all images now, except the main scene ones, because that would be just silly having to declare a few thousand more images.

In any case, to the OP's original problem, I suspect it's probably an improperly saved image (like it is saved full screen, but it needs to be small) or there might not be a space between 'side' and the image file name. Another possibility I have seen is that the dev put the side images in the GUI folder, which definitely would require them to be declared, because Ren'py will look in the IMAGES folder for them by default, not the GUI.

EDIT: Just thought of one other possible thing that could cause this... When making major changes to the code, such as adding defines and new variables, it's always a good idea to Force a Recompile via the SDK menu.
 
Last edited:

anne O'nymous

I'm not grumpy, I'm just coded that way.
Modder
Donor
Respected User
Jun 10, 2017
11,785
18,244
That's actually something that is kind of confusing, because I have never had to declare any side images in my VN's. And I have never had an error because of that. AFAIK, Ren'py scans your game directory and automatically creates a pool of image attributes from any image with a 'side' tag.
What only works if the images (as on the hard drive) are named "side [WHATEVER]", because Ren'Py will then automatically declare then correctly. But one can perfectly have name just "[WHATEVER]", and still want to use them as side image. In which case you'll have to declare them explicitly.
And it's more frequent than it seem since something like "images/side/girlA/side girlA smilling.jpg" would be a bit redundant. This while having them all mixed with the other image is a bit messy.

Personally I'm tempted to advice for an explicit declaration, especially when you works only punctually on your game, because it's really easy to forget that the image name need the said "side" prefix.


When you have multiple tags for that same character, then Ren'py tries to find the best match and if it can't find an exact image that matches that, then it uses the top one from the pool. So if you did this ...
What is Ren'Py's behavior for absolutely all images.


In any case, to the OP's original problem, I suspect it's probably an improperly saved image (like it is saved as full screen, but it needs to be small)
Ren'Py do not care about this. Give it a side image three time bigger than the screen, and he will still display it as side image, and at its actual resolution.


or there might no be a space between side and the image file name. Another possibility I have seen done is that the devs put the side images in the GUI folder, which definitely would require them to be declared, because Ren'py will look in the IMAGES folder for them by default, not the GUI.
Or... he just named it "awesome_jack.ext", forgetting that all the other are named "side [whatever].ext"... Something that would be far to be new.
 

UncommonRole

Newbie
Jan 4, 2021
49
22
Hi again anne O'nymous and Turning Tricks . Sorry for taking so long to reply, but I’ve had two horrible days at work. Anyway, I’ve tried several of the things you suggested and nothing seems to work.

I'm interested in the part about changing the size like you said, but I don't know how to do it properly—I used the same code, but it doesn't work.

And here's the folder with the rest of the side images: they all follow the same pattern—"side" first, space, then the name, in .webp format, small sizes...

1744123739022.png

I've done this with at least 40 characters and it's the first time it fails. Also, the weird thing, as I mentioned, is that when I try to change anything else for other characters, those changes aren't applied either. I tried changing the color, for example, and nothing happens. I also did the "force recompile" thing—I already tried that before opening the thread, and it doesn’t work.
 

anne O'nymous

I'm not grumpy, I'm just coded that way.
Modder
Donor
Respected User
Jun 10, 2017
11,785
18,244
I've done this with at least 40 characters and it's the first time it fails. Also, the weird thing, as I mentioned, is that when I try to change anything else for other characters, those changes aren't applied either.
Hmm... what happen if you do:
Python:
label start:
    show side awesome_jack
Does the image is shown?
 

anne O'nymous

I'm not grumpy, I'm just coded that way.
Modder
Donor
Respected User
Jun 10, 2017
11,785
18,244
As you can see, the avatar appears in the center of the scene :rolleyes:
So, the image exist and is recognized by Ren'Py as having for name what is expected for the side image. What mean that the error come from somewhere else than the Character creation; what tend to already be confirmed by the other issues you have.

Have you (or a code you use) changed (or edited) the ADVCharacter class?

For the side image, you can try by replacing the "_" by a space (both in Ren'Py code and directly on the image name), or at last resort remove the "awesome_" part. There's a possibility that it works. But the fact that design modification for the character do not works anymore is clearly something that can't happen without a code directly breaking the Ren'Py core.
 

79flavors

Well-Known Member
Respected User
Jun 14, 2018
1,639
2,306
anne O'nymous As you can see, the avatar appears in the center of the scene :rolleyes:

That's because you've used without saying you wanted the image anywhere else.

By default, show will show any new image over the top of any existing images, positioned at the bottom of the screen in the center. Which is what you are seeing.

Meanwhile, I've written a small test script using a couple of your side images.
If you want to play it (and see the code), it's available here:


The main thing with side images is that if you have a an character definition with image="xyz", then you also need a displayable for side xyz.
You can code that yourself, like:

Python:
define a = Character("Arisa", image="xyz", color ="#8b0a1c")

image side xyz="side arisa.png"

A reminder, that RenPy will automatically create displayables for all valid images within the \images folder and subfolders. So if your side image file for Cynthya is named side cynthya.png. Then you don't need to explicitly define it, as long as your character definition says image="cynthya". (That is, the character definition will look for a displayable called side cynthya which RenPy will have autocreated for you).

The example game above has all three combinations I could think of used. (An explicit image, an implicit one and one where the name of the side image is completely unrelated to anything except the image= parameter of the character definition.

I even threw in a couple of examples of moving images around using show and transitions.

The only other thing that came to mind is that Android doesn't show side images, due to a bit of code that reads:

Python:
    if not renpy.variant("small"):
        add SideImage() xalign 0.0 yalign 1.0
Probably doesn't matter. But in the unlikely event of you developing and testing on Android, I'll throw that one in too.


Edit: I hadn't noticed you'd already had this working. Most of my post probably isn't much use to you.
But by the same measure, nothing you've posted would explain the problem. "I changed something" isn't really much for us to go on.
Consider doing a build of the game and upload it somewhere the rest of us can download it and look at your actual code, rather than guessing what you might have changed.
 
Last edited:

Turning Tricks

Rendering Fantasies
Game Developer
Apr 9, 2022
1,682
3,138
Based on the fact that you had it working for 40 characters before this and that you proved Re'py recognizes the side in your simple test, I almost wonder if you may have a corrupt core file for the Ren'py SDK.

Not sure if doing a build and testing that would work... or you could reinstall the Ren'py SDK. You don't need to update the version, as they do keep an archive of past versions.

I guess we should ask what version your project is? If you started with an older version of Ren'py, and you recently upgraded, that might cause some incompatibilities. I did a quick search of the docs and found this one from version 7.4 ...

Ren'Py will now only show side images if with at least one attribute in addition to the image tag. To disable this, use:

define config.side_image_requires_attributes = False
 

79flavors

Well-Known Member
Respected User
Jun 14, 2018
1,639
2,306
I've done this with at least 40 characters and it's the first time it fails. Also, the weird thing, as I mentioned, is that when I try to change anything else for other characters, those changes aren't applied either. I tried changing the color, for example, and nothing happens. I also did the "force recompile" thing—I already tried that before opening the thread, and it doesn’t work.

Is your game in a state where you can [BUILD] a version of it?
So far you've effectively said "it used to work", "I changed something" and "it doesn't work now".
But none of your posts really go into enough detail about your code to diagnose it.

If you can build a copy of the game and temporarily upload it somewhere - you could post the link to it here (or via PMs if you'd prefer) and we could download it and have a look at what you are ACTUALLY doing, rather than what we think you are doing.

Otherwise, we're left making best guesses.
 

UncommonRole

Newbie
Jan 4, 2021
49
22
Hi everyone. I tried creating a new character and had no issues. But I still can’t modify the old ones. I’ve changed names and colors, but the changes don’t apply—they seem locked somehow. The new character, however, works just fine.

To answer all your questions:

I haven’t changed the ADVCharacter class.
I removed the dash and changed the image name to something else, but Jack’s still doesn’t work.
I updated Ren’Py, but that didn’t help either. I started this game a year and a half ago, so the engine version has definitely changed since then.
I reinstalled the SDK, but that didn’t fix it either.

I’ve got a demo of the game on Steam, and that version didn’t have this bug. If needed, I can upload a build of the current version I’m working on so you can check it out.

Done!

 
  • Like
Reactions: 79flavors

79flavors

Well-Known Member
Respected User
Jun 14, 2018
1,639
2,306
But I still can’t modify the old ones. I’ve changed names and colors, but the changes don’t apply—they seem locked somehow.

First: Try starting a new game rather than loading a save file. If that behaves differently, then my second guess is likely true.

Second: Did you ever have character definitions like : default arisa = Character(...) or $ arisa = Character(...)? Or did you ever have code like $ arisa = renpy.input("What is her name?").

define variables aren't permanent. They are set as your game starts and disappear when the game ends. In other computer languages, they'd probably be called "static" or "constant" values. Their values are only ever changed directly by the programmer.

default variables are stored in the save files. When you load a save, their values are overwritten by the value from the save file. Their values are frequently changed by player actions. Any variable changed while the game is running will behave like it's a default variable.

If at any stage, you accidently caused the value of those variables to be changed while the game is running, they would have been saved to the save file. Even if they were created using define. Then every time in the future when you load a save file, it replaces the value you've coded with the value from the save file.

I can't currently download your game. But that's my best guess without looking at the code. (ie. the code will look fine and work for me... because I'm not using your save files).

If that does turn out to be the case, it's fixable. But let's figure that bit out before offering solutions to guesses.
 

79flavors

Well-Known Member
Respected User
Jun 14, 2018
1,639
2,306
First: Try starting a new game rather than loading a save file. If that behaves differently, then my second guess is likely true.

Second: Did you ever have character definitions like : default arisa = Character(...) or $ arisa = Character(...)? Or did you ever have code like $ arisa = renpy.input("What is her name?").

Okay. I just started a new game and the side images are showing fine.
Looking at your code, you have two red flags for me:

Python:
default n = Character(None, color="#F13E18", what_color="#c9b7ae", what_italic=True)
default p = Character("[mc]", image="mc", color="#113cb1")

That makes me think that at some point in the past, other character definitions also used default.
Any saved games from that period, will use the character definition as it existed when the save file was written.

In addition, you're going to have all the same issues with p and n.

So now the question is what did those definition look like at the time(s) you've released the game to the public. You mentioned a Steam release. Was that a single release? Or a series of updates?
Have you released the game anywhere else? (I don't see it here on F95 for example).

Option 1: The Steam release(s) included default Character() definitions.
All those players save files are going to cause you issues.

Option 2: It was a temporary thing and ONLY YOU have save files that include default Character() definitions.
Nice and easy. Just delete your save files and replay the game with new saves.

You at least need to fix those two lines first though.

Python:
define n = Character(None, color="#F13E18", what_color="#c9b7ae", what_italic=True)
define p = Character("[mc]", image="mc", color="#113cb1")

It is possible to correct the save files, even if the Steam players have save files which use the wrong definition.

Alternatively, you could rename the Character() objects. It'd be messy. But at least it would bypass the incorrect definitions being loaded from save files.

Hopefully this is just a "developer" problem and end users haven't used that code. But if they have, come back to us and we'll see if we can figure out a way to either fix it or work around it.
 

UncommonRole

Newbie
Jan 4, 2021
49
22
First: Try starting a new game rather than loading a save file. If that behaves differently, then my second guess is likely true.
Yes! It worked. I started a new game and skipped ahead to the part I was working on, and now everything I modified shows up (colors, sizes, the avatar...).

1744305065916.png

Yes, some time ago you helped me solve another issue right here because I was mixing defaults and defines (I was using them to set hints, but the game wouldn’t show them in real time because I was using defines).

I have the demo, but it's almost two hours of gameplay, so there are a lot of variables and it would be a problem if the saved games didn’t work properly. What a headache... Okay, so when a variable only needs to be changed by me, as the developer, I should use define, whereas for the rest of the variables that the player might interact with, I should use default? Man, I’m so confused with this topic.

Anyway, thank you so much! Seriously, I’ve been a bit foggy over this for a few days and barely worked on the project, but now I can see the light at the end of the tunnel again :giggle::giggle:
 

anne O'nymous

I'm not grumpy, I'm just coded that way.
Modder
Donor
Respected User
Jun 10, 2017
11,785
18,244
Second: Did you ever have character definitions like : default arisa = Character(...) or $ arisa = Character(...)? Or did you ever have code like $ arisa = renpy.input("What is her name?").
Gosh! I've been misled by the code in OP, that show defined character, haven't thought that they could have been defaulted in a prior build.
 

79flavors

Well-Known Member
Respected User
Jun 14, 2018
1,639
2,306
Okay, so when a variable only needs to be changed by me, as the developer, I should use define, whereas for the rest of the variables that the player might interact with, I should use default?

Pretty much that, yes.

The way, I understand it is that each variable (all variables) have a flag which says "this needs to included in the save file".
Any time the script changes the value of a variable while the game is running, that flag is set.
But for the majority of things that never change, that flag remains set to false.
This meant that save files only included variables the player's choices had set the flag... all good and quite efficient.

Except... originally, when a game ran - the player might not change a specific value and so that variable wouldn't be included in the save file. You'd end up with some variables (the updated ones) on the save file and some not. Occasionally this led to game breaking errors. Developer had to work quite hard to break things... but they managed it.

So along came default. Added much later, it effectively set the "save this variable" to be true from the start.
It makes things much simpler. Anything with default is expected to be on the save file, anything with define isn't.

The problem you have run into is that once something is on the save file, it's going to overwrite any other version. Even if you've since changed it to a define.

By far is easiest way to think about it is that everything should be define, except when it shouldn't.
And the "shouldn't" is pretty much because there's a line in your code that changes it's value. $ var1 = "test", $ var2 += 1... anything like that.

I'm not sure if explaining all that will solve your confusion or add to it.

Now, let's see if we can fix things for you...
 
  • Like
Reactions: UncommonRole

79flavors

Well-Known Member
Respected User
Jun 14, 2018
1,639
2,306
I can think of a number of solutions. Problem is they each have their advantages and disadvantages.

Solution 1: Unlink the existing saves to your next release...

Within your options.rpy file, change the line that says define config.save_directory = "...". It's usually your project name and a random number. Just change the random number.

On PC at least, whenever you do a save - the save file is put both in the \game\saves\ folder AND a common folder within the Windows APPDATA folders. This means that when a player installs a new version, that new version can synchronize it's save files with the ones stored in the APPDATA folders and everything can continue normally.
But if you change the name of APPDATA folder (the config.save_directory), you break that connection. A new version of the game's save folder will be empty and so will the (new) APPDATA version.

The player won't see their previous saves. But in the process, they'll lose all those Character() definitions that are incorrectly stored in the save file.

Players who manually copy their save files across will lose the portraits when they load those saves. But that's on them.

I'm unsure what Steam does though. If it keeps the game in the same folder when there is an updated release, that will keep the existing \game\saves\ folder and you're back to square 1. Changing config.save_directory won't break the connection to the old saves.


Solution 2: Change the variable names used for your Character() definitions...

This one is a LOT of work. But guarantees the fewest problems (for the player).

You already have code like:

Python:
define arisa = Character("{size=-10}Arisa \"No jokes\"{/size}", image="arisa", color ="#8b0a1c")
define cyntx = Character("Cynthyatrix", image="cynthyatrix", color="#cbb439")
define jack = Character("{size=-10}Awesome Jack{/size}", image="awesome_jack", color ="#bb8be2")

default n = Character(None, color="#F13E18", what_color="#c9b7ae", what_italic=True)
default p = Character("[mc]", image="mc", color="#113cb1")

Change ALL of these to something new (and unique).

Python:
define a = Character("{size=-10}Arisa \"No jokes\"{/size}", image="arisa", color ="#8b0a1c")
define c = Character("Cynthyatrix", image="cynthyatrix", color="#cbb439")
define j = Character("{size=-10}Awesome Jack{/size}", image="awesome_jack", color ="#bb8be2")

define narrator = Character(None, color="#F13E18", what_color="#c9b7ae", what_italic=True)
define pc = Character("[mc]", image="mc", color="#113cb1")

The new names must be unique (within your game).
btw, narrator is a special character name within RenPy. It is used any time you have a line of dialogue, but no specific character speaking it.

Now the "hard work" bit... Every single line of dialogue needs changing to match the new id.

I've chosen to change the majority of names to single characters. That won't always be possible. But it's a good start.
I've chosen to change p to pc for example. I'd normally have picked mc, but you've already use that for the player's name. So I went with "pc" (for "player character").

There will still be a variable called arisa within certain player's save files. But your game will no longer use it. It's new name of a is created using define and so the link to the bad data is broken.

Player's may have issues with save files not being able to match up the correct line when loading. In my experience RenPy is good at working around this one - but I may be wrong and players will instead see the dreaded "Exception: Couldn't find a place to stop rolling back. Perhaps the script has changed in an incompatible way?"
At which point your only real option is a disclaimer to the effect of "Saves up to version x.xx may be incompatible with the current game."

You can't even do a "change all" within your editor because you frequently use names like "arisa" in multiple ways within your code. That is... doing change all "arisa" to "a" might fix all your dialogue lines, but break something else.
I've done it before. But you have to be ridiculously careful. Or you have to do them all manually.
As I say... "A LOT of work".


Option 3: Remove the variables from the save files.

Okay. I sort of know how to do this one. But not fully.
I know something that should get you 80% the way to a solution, but I'm going to rely on someone like anne O'nymous to step in and fix the code I'm mostly guessing at.

The basic idea that there is a called label after_load():. Anytime you load a save file, if you have an after_load label, that code will be called. It's designed to allow the developer to fix errors in save files before they impact the player.

Firstly, default variables are kept with another variable called store. RenPy does this for you automatically, so you don't generally need to think about it... except on occasions like now...

So I'm imaging some code like this:

Python:
label after_load():

    if hasattr("store", "arisa") == True:
        $ delattr("store", "arisa")
        $ arisa = Character("Arisa \"No jokes\"", image="arisa", color ="#8b0a1c", who_size=10)

    return

DON'T USE THAT CODE BTW.

I'm imagining a number of problems (I can't currently test this code).

Firstly, I'm not sure if a variable created with define is already kept in the store. I'm hoping that only variables from the save file are held with in the store, but I'm not able to test that right now.

Secondly, the game still needs an arisa Character() object to work. So deleting the value isn't enough. Which is why the next line creates a new definition using the updated/correct details. Except, I'm 99% sure that new definition will be included in the next save file. Which kinda defeats the object of what I was trying to do.
Maybe that's good enough. Maybe just replacing one broken Character() definition with the correct Character() definition on the save files is enough (in which case the delattr() line probably isn't needed).
What I can't think of is a solution that creates a new variable that is practically the same as if it had been created using define (that is, NOT saved the next time the player saves a game).


There's a solution in here somewhere. Probably some variation on #3 (and maybe #1 too). It's just quite there yet.
 
  • Like
Reactions: UncommonRole

anne O'nymous

I'm not grumpy, I'm just coded that way.
Modder
Donor
Respected User
Jun 10, 2017
11,785
18,244
Option 3: Remove the variables from the save files.
It's the best option, but as you defined it it wouldn't works.

delattr works at Python level only. At Ren'Py level the variable still exist, it's just that it will be given as value a token value that mean "have been deleted". Therefore, with your code recreating the variable right after, it would have no effect.


What need to be done is to remove the variable from the set telling Ren'Py what variables have to be saved.
By default this is enough, the variable will continue to exist like all defined variables do; therefore until you quit the game (not return to the main menu, but fully quit). Then, next time you launch the game, it's the value coming from the define declaration that will be used.

But in the present case, I guess that he want the changes to apply right from the starts, so the variables need to be tweaked a bit prior to the remove.

Python:
label after_load:

    #  Give the new values to the characters that need it.
    #  Recreating the whole ADVCharacter object is the easiest way to do.
    $ arisa = Character( [...] )
    $ cyntx = Character( [...] )
    $ jack = Character( [...] )

    #  Do not pollute, keep those variables private to the label.
    $ renpy.dynamic( "charList", "curName" )
    #  Define all variables to turn none savable.
    $ charList = [ "arisa", "cyntx", "jack" [...] ]

    #  For all the name defined.
    while charList:
        #  Get the next name
        $ curName = charList.pop()
        #  and if it's in the list of variable that need to be saved
        if curName in renpy.python.store_dicts["store"].ever_been_changed:
            #  remove it from the list.
            renpy.python.store_dicts["store"].ever_been_changed.remove( curName )

    return
Now the characters have their new values, and will not be saved. Therefore next time someone will launch the game, they'll use the arguments in the define declaration, even if they changed since the previous update.

Edit: Oops, sorry for the horrible presentation.
 
Last edited:

UncommonRole

Newbie
Jan 4, 2021
49
22
By far is easiest way to think about it is that everything should be define, except when it shouldn't.
And the "shouldn't" is pretty much because there's a line in your code that changes it's value. $ var1 = "test", $ var2 += 1... anything like that.

I'm not sure if explaining all that will solve your confusion or add to it.

Noted, I hope I don’t mess this up again, it’s already the second time... :cry:

Yeah, it’s all pretty confusing for me, I’ve never done any programming before and I have a hard time following the thread. I’ll keep running tests to see how I can fix it... What a mess... :rolleyes: