Say you add a choice to an earlier section of the game about whether or not to eat cheesecake, and you refer to that choice later. It breaks the save when the save was made after that choice, because the playthrough didn’t take that choice into account.
Adding a default (default eatcheesecake = True) makes the game assume the choice was made and lets it continue on without causing an error message every time that variable is referred to.
So easy enough in a story based VN, but still doesn’t solve everything in a sandbox game, like in Fattening Career or Weighting Game.
Adding new variables is easy thanks to default. But getting them in the right state is harder as @expandinguniversegam says. There are some guides available, but the official documentation isn’t the best. Other options are after_load, lazy initialization using hasattr or defaulting to None so a boolean (or similar) actually has three states: True, False, and None. Worst case you can just prompt the player. This is what I did when the veils setting was added to Tramp.
For classes you can add/alter/remove attributes if you need to in after_load or use lazy initialization.
What is much harder is refactoring code: removing (or renaming) an old label will kill a save that was made beyond that label and before the next one. Moving which file a label is defined in can also cause issues. Recovery is a “best-effort” and sometimes RenPy just can’t do it.
The consistent updates make having my saves wiped off the face of the earth worth it, because the game is good enough to justify playing it over again.
@debuwu Sorry to hear that you have some issues in the game.
In order to figure out what the issue is I would need to have some more information.
Could you describe why you are unable to buy chocolates?
Do you mean the fattening packages at Bonnie her shop?
Did you continue an old save or start a new one?