Ren'Py Where Is Ren’Py Rollback Length Defined?

Apr 9, 2019
190
278
I've been trying to increase the rollback length but I cannot find the file within which the variables are supposedly defined. I was under the impression it was defined in options.rpy (which I cannot find at all), has this been changed in recent versions?
 

Winterfire

Forum Fanatic
Respected User
Game Developer
Sep 27, 2018
5,497
8,035
config.py, but I wouldn't edit it from there. It's better to edit it from within your project, along the rest of the config settings.
 

anne O'nymous

I'm not grumpy, I'm just coded that way.
Modder
Donor
Respected User
Jun 10, 2017
10,957
16,190
config.py, but I wouldn't edit it from there. It's better to edit it from within your project, along the rest of the config settings.
Hmm, I guess that he was more interested by "in what variable" ;)

And the answer is .
 
  • Like
Reactions: Winterfire

Winterfire

Forum Fanatic
Respected User
Game Developer
Sep 27, 2018
5,497
8,035
Hmm, I guess that he was more interested by "in what variable" ;)

And the answer is .
My bad, I am still sleepy so I answered the question literally x) also misread, and was under the impression that he knew already, but didn't find it anymore.

It should be both:
config.rollback_length
config.hard_rollback_limit

Both accepting an int as value, I wouldn't set it higher than 50, which shouldn't be too different from the default of 40 if I recall correctly.
The more you increase this value, the bigger save files will get.
 

anne O'nymous

I'm not grumpy, I'm just coded that way.
Modder
Donor
Respected User
Jun 10, 2017
10,957
16,190
Alas, that did not work.
It works, changing the config.hard_rollback_limit really and effectively change the rollback length.
And I'm not saying "it's what the doc say", but "it's what happened when I tried right after you wrote your message".
Assumed that you don't go further than the 128 that is the full maximal length (see below).


It should be both:
config.rollback_length
config.hard_rollback_limit
Yes and no.
config.rollback_length is more specific, and generally larger than config.hard_rollback_limit. It's use to limit the size of the rollback stack, more than the number of step you can rollback too ; but well, also a yes since its value need to be at least equal to config.hard_rollback_limit.


[...] I wouldn't set it higher than 50, which shouldn't be too different from the default of 40 if I recall correctly.
It's been a long time (at least the version 7.0.0) that the default value have been passed to 100 (and 128 for rollback_length).
 

Winterfire

Forum Fanatic
Respected User
Game Developer
Sep 27, 2018
5,497
8,035
It's been a long time (at least the version 7.0.0) that the default value have been passed to 100 (and 128 for rollback_length).
Oh wow, can't say I agree with that change. 100 is a lot.
Normally you'd be using rollback as a convenient way to undo a mistake if you forgot to save during a choice, or didn't think it was meaningful, so around 50 rollbacks are more than enough for that.
For all the rest there's a log system, so I can't imagine why anyone would want more than around 50, let alone more than 100.
 

anne O'nymous

I'm not grumpy, I'm just coded that way.
Modder
Donor
Respected User
Jun 10, 2017
10,957
16,190
Oh wow, can't say I agree with that change. 100 is a lot.
Totally agree with you.


[...] so around 50 rollbacks are more than enough for that.
The default was 30 for a long time, and there's still many games that still have it even while using now a 7.5.x or 8.x version, because they started before the change. And honestly I rarely felt limited by that.
I mean, if you need more than 30 steps to understand that it's not the choice you wanted to pick, then the game isn't good enough and personally I don't play it.
 
  • Like
Reactions: Winterfire