• Tutorials

  • Home
  • GPDL Game Variables

    DungeonCraft Help Home

    There are some variables associated with the game as a whole. Game version is an example. All of the variables are available to the GPDL program. Some of the variables can be modified. Each variable has one function to access the value of the variable and, if the variable is modifiable, one function to set the value.

    All the functions are of the same form:

    To access a variable:

       $GET_GAME_xxxxxx();

    To set the value of a variable:

       $SET_GAME_xxxxxx(value);

    In both cases, the xxxxxx is the name of the particular variable of interest In the $SET_GAME_xxxxxx functions, the value parameter will be assigned to the game's variable if it is a legal value. You cannot set the games's version to "sin(x)", for example. The GPDL conversion of strings to numbers follows the general rules (See Data Type Conversions)

    Following is a list of all the $GET and $SET functions associated with the game. The type of value is one of the following:

    String - Such as a name.

    Integer - Such as an age

    Float - A 'real' number such as 3.14159

    Each entry in the table also indicates whether the variable can be modified with the corresponding $SET_GAME_xxxxx function.

     Function name        data type  Settable?
     -------------        ---------  ---------
      $GET_GAME_CURRLEVEL    Integer    No
      $GET_GAME_VERSION      FLOAT      No