version 1 by Victor Gijsbers

  • Home page
  • Beginning
  • Previous
  • Next

  • Section: Using Permadeath

    In order to use Permadeath, you need to include the extension and then define a "File of Adventurers". This file must have a name that is unique to your game. It will be used to store information about save games, and you do not want other people's games to interfere with yours! Please note that deleting this file will make all the user's saves useless, so you might want to warn him or her against this.

        Include Permadeath by Victor Gijsbers.
        The File of Adventurers is called "EdenSaves".

    Additionally, you ought to ensure that whenever the player character dies, you "permanently kill the player". This will make the previous save unusable.

        After eating the apple:
            say "It was poisonous. You have died...";
            permanently kill the player;
            end the story saying "Be more careful next time!".

    Permadeath also allows you to define conditions under which normal saving is possible. For instance, if you have a city and a monster-infested dungeon beneath it, you might want to allow the player to make normal saves in the city. These could then be restored at any time, even if the player later dies in the dungeon. Whether the player can save safely, or whether permadeath mode is turned on, is decided by the "safe saving allowed rules", which default to "rule fails". If you want to allow safe saving in the Church, say, simply state:

        A safe saving allowed rule (this is the you can save in the church rule):
            if the player is enclosed by the Church:
                rule succeeds.

    Finally, in order to use this extension you need to have installed the Default Messages extension by Ron Newcomb; and you need to compile your game to Glulx, since z-code doesn't allow the use of external files.