SAVE/RESTORE issue preventing continuation of game

So recently I’ve run into a bit of a serious issue that I can’t seem to find a way to solve despite numerous attempts at a work around; when using the restore command to restore a game the description of the room the player was in when saving does not display, making actually playing the game an impossibility (since it relies on hyperlinks and buttons to reach the level of complexity said game entails so without the room description there isn’t much that can be done).

I’ve tried worming my way around it with truth states and alternative commands for saving, as well as commands to display the room description at game start - however nothing seems to be fixing this issue. I’d greatly appreciate any help this community could provide!

Also; Obligatory ‘sorry if this is already answered/easily accessible’. I’ve tried looking through the documentation to find stuff but seem to be coming up short. I don’t remember having this problem in the past with other - smaller - projects made in inform. Once more, any help would be appreciated greatly.

This is code that I am using in my project that allows me to have certain actions take place after Save/Load.
I found it somewhere on this forum.

I think this is all you’ll need:

restore the game rule response (B) is “[post-restore routine]”;

To say post-restore routine:
        [put code here that should be displayed after restore, for example...]
       try looking;

I have this towards the top of my code, just under the “Includes”.
Not sure if it’s position is important, but i’ll mention it anyway.

1 Like

That seems to have worked! I didn’t even know you could do something like that. I had been attempting to use truth states that fired when I did an alternative save-action and all sorts of stuff (inform apparently considers that ‘out of game’ and forbade it). Thanks a bunch! You are awesome!

Glad it worked! :+1:

It’s worth mentioning as well you can also do the same thing for saving.

save the game rule response (B) is “[post-save routine]”;

To say post-save routine:
      [custom code here for what happens after successful save]

In my case, I have a save that returns to Game Menu after.

1 Like

Very nice. I assume this is also something that can be adapted to really any pre-defined action inform as well? Useful for when it is being too obstinate about its built-in commands.

This is a way to add extra behavior to out-of-world actions that normally just print a message.

(For normal actions you can write an After or Report rule. Or, to change the action entirely, an Instead rule.)