Page 1 of 1
Completely disable rollback
Posted: Wed Nov 16, 2016 3:29 pm
by Enerccio
How do you disable(enable) rollback? I don't mean block_rollback() but completely disable that feature (say, during a combat done in renpy, rollback is a terrible option)
Re: Completely disable rollback
Posted: Wed Nov 16, 2016 3:43 pm
by Ocelot
https://www.renpy.org/doc/html/save_loa ... g-rollback
It is possible to disable rollback in part or in full. If rollback is not wanted at all, it can simply be turned off through the config.rollback_enabled option.
Re: Completely disable rollback
Posted: Wed Nov 16, 2016 3:45 pm
by Enerccio
yeah exactly that is not useful, since you would have to call this at every interaction though or disable it for whole game
Re: Completely disable rollback
Posted: Wed Nov 16, 2016 3:51 pm
by Nero
You can do it easily just place this line at the start of your game. And if you want it enabled back just set it to True.
Re: Completely disable rollback
Posted: Wed Nov 16, 2016 4:31 pm
by Enerccio
so renpy actually dynamically checks config.rollback_enabled? cool to know
Re: Completely disable rollback
Posted: Wed Nov 16, 2016 7:12 pm
by papiersam
so renpy actually dynamically checks config.rollback_enabled?
No, I don't think so. rollblock_enable probably acts as a flag that is checked at program startup, rather than dynamically. But that's just an assumption.
Re: Completely disable rollback
Posted: Wed Nov 16, 2016 8:29 pm
by PyTom
I don't recommend changing config variables while the game is running, since they're not updated when a game is loaded.
Instead, consider controlling the _rollback variable.
Re: Completely disable rollback
Posted: Thu Nov 17, 2016 12:34 am
by Enerccio
thanks pytom, that was it, Can it be done from python code?
Re: Completely disable rollback
Posted: Thu Nov 17, 2016 12:53 am
by PyTom
Yes, it's just a normal python variable. You can do things like setting it from python code. If you want to control it from inside a function, be sure to set the function global.
Re: Completely disable rollback
Posted: Thu Nov 17, 2016 11:10 am
by Enerccio
what if I want to access it from outside python code from some imported module?
Re: Completely disable rollback
Posted: Fri Nov 18, 2016 2:11 am
by PyTom
You can do:
import renpy.store
and then
renpy.store._rollback = ...
Re: Completely disable rollback
Posted: Fri Nov 18, 2016 2:51 pm
by Enerccio
thanks a lot!