Completely disable rollback

Discuss how to use the Ren'Py engine to create visual novels and story-based games. New releases are announced in this section.
Forum rules
This is the right place for Ren'Py help. Please ask one question per thread, use a descriptive subject like 'NotFound error in option.rpy' , and include all the relevant information - especially any relevant code and traceback messages. Use the code tag to format scripts.
Post Reply
Message
Author
User avatar
Enerccio
Miko-Class Veteran
Posts: 616
Joined: Thu Oct 26, 2006 4:23 pm
Projects: My Teacher; Songs of Araiah; Something new; Possible Cross Bomber?
Location: Slovakia, Kosice
Contact:

Completely disable rollback

#1 Post by Enerccio » Wed Nov 16, 2016 3:29 pm

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)
Image
http://www.bishojo.tk is technically ONLINE!
Songs of Araiah promo: http://www.youtube.com/watch?v=CalchucuoDU

User avatar
Ocelot
Miko-Class Veteran
Posts: 849
Joined: Tue Aug 23, 2016 10:35 am
Skype: miinipaa
Contact:

Re: Completely disable rollback

#2 Post by Ocelot » Wed Nov 16, 2016 3:43 pm

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.
< < insert Rick Cook quote here > >

User avatar
Enerccio
Miko-Class Veteran
Posts: 616
Joined: Thu Oct 26, 2006 4:23 pm
Projects: My Teacher; Songs of Araiah; Something new; Possible Cross Bomber?
Location: Slovakia, Kosice
Contact:

Re: Completely disable rollback

#3 Post by Enerccio » Wed Nov 16, 2016 3:45 pm

yeah exactly that is not useful, since you would have to call this at every interaction though or disable it for whole game
Image
http://www.bishojo.tk is technically ONLINE!
Songs of Araiah promo: http://www.youtube.com/watch?v=CalchucuoDU

Nero
Veteran
Posts: 237
Joined: Tue Aug 09, 2016 2:59 pm
Contact:

Re: Completely disable rollback

#4 Post by Nero » Wed Nov 16, 2016 3:51 pm

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.

Code: Select all

$ config.rollback_enabled = False

User avatar
Enerccio
Miko-Class Veteran
Posts: 616
Joined: Thu Oct 26, 2006 4:23 pm
Projects: My Teacher; Songs of Araiah; Something new; Possible Cross Bomber?
Location: Slovakia, Kosice
Contact:

Re: Completely disable rollback

#5 Post by Enerccio » Wed Nov 16, 2016 4:31 pm

so renpy actually dynamically checks config.rollback_enabled? cool to know
Image
http://www.bishojo.tk is technically ONLINE!
Songs of Araiah promo: http://www.youtube.com/watch?v=CalchucuoDU

User avatar
papiersam
Veteran
Posts: 231
Joined: Fri Aug 12, 2016 2:24 pm
Completed: Gem Hunt Beta, 1/Probably, Animunch
Projects: The Panda Who Dreamed
Contact:

Re: Completely disable rollback

#6 Post by papiersam » Wed Nov 16, 2016 7:12 pm

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.

User avatar
PyTom
Ren'Py Creator
Posts: 15497
Joined: Mon Feb 02, 2004 10:58 am
Completed: Moonlight Walks
Projects: Ren'Py
IRC Nick: renpytom
Github: renpytom
itch: renpytom
Location: Kings Park, NY
Contact:

Re: Completely disable rollback

#7 Post by PyTom » Wed Nov 16, 2016 8:29 pm

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.
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom
"Silly and fun things are important." - Elon Musk
Software > Drama • https://www.patreon.com/renpytom

User avatar
Enerccio
Miko-Class Veteran
Posts: 616
Joined: Thu Oct 26, 2006 4:23 pm
Projects: My Teacher; Songs of Araiah; Something new; Possible Cross Bomber?
Location: Slovakia, Kosice
Contact:

Re: Completely disable rollback

#8 Post by Enerccio » Thu Nov 17, 2016 12:34 am

thanks pytom, that was it, Can it be done from python code?
Image
http://www.bishojo.tk is technically ONLINE!
Songs of Araiah promo: http://www.youtube.com/watch?v=CalchucuoDU

User avatar
PyTom
Ren'Py Creator
Posts: 15497
Joined: Mon Feb 02, 2004 10:58 am
Completed: Moonlight Walks
Projects: Ren'Py
IRC Nick: renpytom
Github: renpytom
itch: renpytom
Location: Kings Park, NY
Contact:

Re: Completely disable rollback

#9 Post by PyTom » Thu Nov 17, 2016 12:53 am

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.
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom
"Silly and fun things are important." - Elon Musk
Software > Drama • https://www.patreon.com/renpytom

User avatar
Enerccio
Miko-Class Veteran
Posts: 616
Joined: Thu Oct 26, 2006 4:23 pm
Projects: My Teacher; Songs of Araiah; Something new; Possible Cross Bomber?
Location: Slovakia, Kosice
Contact:

Re: Completely disable rollback

#10 Post by Enerccio » Thu Nov 17, 2016 11:10 am

what if I want to access it from outside python code from some imported module?
Image
http://www.bishojo.tk is technically ONLINE!
Songs of Araiah promo: http://www.youtube.com/watch?v=CalchucuoDU

User avatar
PyTom
Ren'Py Creator
Posts: 15497
Joined: Mon Feb 02, 2004 10:58 am
Completed: Moonlight Walks
Projects: Ren'Py
IRC Nick: renpytom
Github: renpytom
itch: renpytom
Location: Kings Park, NY
Contact:

Re: Completely disable rollback

#11 Post by PyTom » Fri Nov 18, 2016 2:11 am

You can do:

import renpy.store

and then

renpy.store._rollback = ...
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom
"Silly and fun things are important." - Elon Musk
Software > Drama • https://www.patreon.com/renpytom

User avatar
Enerccio
Miko-Class Veteran
Posts: 616
Joined: Thu Oct 26, 2006 4:23 pm
Projects: My Teacher; Songs of Araiah; Something new; Possible Cross Bomber?
Location: Slovakia, Kosice
Contact:

Re: Completely disable rollback

#12 Post by Enerccio » Fri Nov 18, 2016 2:51 pm

thanks a lot!
Image
http://www.bishojo.tk is technically ONLINE!
Songs of Araiah promo: http://www.youtube.com/watch?v=CalchucuoDU

Post Reply

Who is online

Users browsing this forum: No registered users