• Tutorials

  • Home
  • KnowableSpells

    This hook is called when the player is asked to select the initial spell complement for a newly created character or when the character increases his level and might be eligible to add spell to his list of 'Knowable' spells.

    This hook is called for every defined spell. That can be a lot of spells so you probably don't want your scripts to be very long.

    First we call the 'Class' scripts. If the result is an empty string then we call any 'Spell' scripts.

    The final script result is examined and if it is non-empty then it is used as the percentage chance of success. For example, if the result is “85”, then the spell acquisition will succeed 85 times out of 100. Your script should probably contain something like this:

    if ( hookParameter[8] > hookParameter[7] ) probability = 100

    If the final result is empty, then the chance of success will be 100 percent. If the final result is zero, then the spell is not displayed.

    Parameters

    Parameter [5] = character's INT value.
    Parameter [6] = spell's level.

    Context

    Class of created character
    Spell
    Character