rollback

hotcajunmale

Member
Oct 25, 2018
158
26
i am trying to add rollback to a game. I downloaded a unren ultrahack i was told how to install it and add it, can i still can not get it to work. any help would be greatly appreciated.
 

Winterfire

Forum Fanatic
Respected User
Game Developer
Sep 27, 2018
5,842
8,507



-edit-
It's not guaranteed your game has that setting in script.rpy. It could be in the whole project, so you're better off searching for those lines while searching the whole project, which is possible in pretty much any software, including Notepad++.
 

anne O'nymous

I'm not grumpy, I'm just coded that way.
Modder
Donor
Respected User
Jun 10, 2017
11,803
18,281
-edit-
It's not guaranteed your game has that setting in script.rpy. It could be in the whole project, so you're better off searching for those lines while searching the whole project, which is possible in pretty much any software, including Notepad++.
He don't even have to bother with this.


First, creating a "rollbackRestore.rpy" file:
Python:
init 1000 python:
    config.rollback_enabled = True
    config.rollback_length = 50
    config.hard_rollback_limit = 50

    def block_rollbackTWEAKED():
        pass

    renpy.block_rollback = block_rollbackTWEAKED
Then, dropping the file in the directory named "game", where the rpy/rpyc/rpa files are located, should be enough for 99% of the games.


This being said, nowadays it's exceptional that a dev mess with the rollback without reason.
Most of the time, it's done to counter a bug that the dev haven't been able to fix. Like by example those who've message discussions embedded a screen, and trigger the whole discussion with a single show screen, or things worse than this.
Therefore, restoring the rollback then using it can highly broke the game.
 
  • Like
Reactions: Winterfire

Penumbral Evanescence

|☽◯☾| Somnium of the Night ✧ Bête Noire
Moderator
GFX Designer
Donor
Jul 16, 2021
3,329
11,751
Therefore, restoring the rollback then using it can highly broke the game.
Yeah, true. I think it also has something to do with the sequencing of events. Or classification of characters too, I think? Like for example, if we have let's say an option to apply a nickname to a named character in a given game, and then in a future version of the game we try to do a rollback, the nickname having not been applied would cause like some type of missing name error violation in the script or flag that would break the game if we try to enable roll back like that.