• Tutorials

  • Home
  • $GET_SPELLBOOK

    DungeonCraft Help Home

    $GET_SPELLBOOK(actor, delimiters);


    Returns a string describing what the player would see if he were to select "Memorize" during the game. The string is divided on four levels and the 'delimiters' define the characters that are used to divide the string. The default delimiters are "!@#$' if none (or too few) are specified.

    In the examples below we assume that you wrote:
    "$GET_SPELLBOOK($CharacterContext(),"*");
    The resulting string is a 'delimited string' (Change this link when we create a "Delimited Strings" page!). It contains a sub-string for each spell 'school'. Currently there are two spell schools: MagicUser and Cleric. And, in the example, the strings will be delimited by the character '*'. So the resulting string will be:
    *school0string*school1String
    Each of the 'school' strings contains a sub-string for each spell level. In our example, the sub-strings will be delimited by the character '$'. So, the sub-string for a single school will look like this:
    $level1string$level2string$level3string$level4string$level5string
    and so on for each possible spell level.
    #3#spell1#spell2#spell3
    And so on for each spell.

    The 'Spell' substrings themselves contain sub-strings, separated in our example by the character '@'. Each spell sub-string has three sub-strings: The name of the spell, the selected count for the spell, and the memorized count for the spell. For example:
    @Fireball@1@0