Fake ending module

This forum is the place to learn about and discuss ADRIFT 5. Feel free to mention any bugs you find here, but please also add these to the Bugs & Enhancements list.

Please also refer to the ADRIFT 5 Wiki for more information.
Post Reply
User avatar
Denk
Posts: 1003
Joined: Mon Feb 22, 2016 6:21 pm
Points: 346
Location: Hjørring, Denmark

Fake ending module

Post by Denk »

Summary: You may replace the action [End the game][In Defeat] with [Run Task][Fake Ending]. Then "undo" and "restore" will work without breaking the game. However, you must make the task "Fake Ending" a stop control in all relevant events and walks. And you must ensure that the task "Default response in fake ending" has 1st priority.
-------------------------------------------------
It is known, that events and walks sometimes can break if the player "undo" or "restore" a saved game. Until this gets fixed, there is a workaround.It turns out, that the problem only occurs when the game is set to end with an action ("End game in Defeat" or "End game in victory" or "End game without a fuss").

Thus, the problem can be avoided by applying a "fake" ending, i.e. have tasks etc. that behave as if the game was over. When the player encounters the fake ending, the game will not break if the player types "undo" or "restore".

This was discovered in the thread "Overriding the UNDO command?". As it turns out, you don't even have to override the "undo" command to avoid the problem. You just have to apply a fake ending instead of the action: [End the game][In Defeat]

Then "undo" and "restore" will work without problems.

As some may find it difficult(?) I have made a very small module "Fake Ending Module": https://www.adrift.co/game/1630.

If you import the module, all you have to do is to replace the action [End the game][In Defeat] with [Run Task][Fake Ending] in all relevant tasks.However, the author must ensure that events and walks do not disturb the fake ending. Thus, in all relevant events and walks, the task "Fake Ending" must be used as stop control. Also, the author must ensure that the task "Default response in fake ending" has higher priority than other tasks, i.e. 1st priority. It has 1st priority, to begin with, but if the author makes another task 1st priority, this will change. It is thus the responsibility of the author to ensure, that no event or walk interfere while the fake ending is running.

If anyone finds this useful, It could be included in the next release of Combined Library. The authors don't have to use it, just because it is there.
Last edited by Denk on Thu Jul 29, 2021 4:33 pm, edited 3 times in total.
----------------------------------------------------------------------
The Bash Saga:
1. The Dragon Diamond 2. The Way Home 3. Stone of Wisdom
----------------------------------------------------------------------
User avatar
Lazzah
Moderator
Posts: 2524
Joined: Thu Mar 31, 2011 5:54 am
Points: 100
Location: Clacton-on-Sea, Essex
Contact:

Re: Fake ending module?

Post by Lazzah »

That's brilliant Denk, thank you so much! :claps: :yeah: :D :bravo: :Thanks:
Visit "Larry's ADRIFT Text Adventures" at http://LarrysAdriftTextAdventures.co.uk
User avatar
Denk
Posts: 1003
Joined: Mon Feb 22, 2016 6:21 pm
Points: 346
Location: Hjørring, Denmark

Re: Fake ending module?

Post by Denk »

Lazzah wrote: Sun Jul 25, 2021 11:19 am That's brilliant Denk, thank you so much! :claps: :yeah: :D :bravo: :Thanks:
Hi Lazzah, I modified the summary at the top. Please be aware that you have to make the task "fake ending" a stop control in all relevant events and walks to avoid interference during the fake ending.
----------------------------------------------------------------------
The Bash Saga:
1. The Dragon Diamond 2. The Way Home 3. Stone of Wisdom
----------------------------------------------------------------------
User avatar
Denk
Posts: 1003
Joined: Mon Feb 22, 2016 6:21 pm
Points: 346
Location: Hjørring, Denmark

Re: Fake ending module?

Post by Denk »

I have just fixed an issue (thanks to Lazzah for reporting it), which made the fake ending appear different, depending on a Runner setting. The new version is in the same place: https://www.adrift.co/game/1630
----------------------------------------------------------------------
The Bash Saga:
1. The Dragon Diamond 2. The Way Home 3. Stone of Wisdom
----------------------------------------------------------------------
Post Reply