Can Change from Class

Can Change to Class




These hooks are each called once for each class in the class database when a character chooses 'Change Class' in the training hall. The hooks is provided with the character context and the class context (the class name). The hook should return the string 'Y' if the change is allowed. Any other return value will allow the class to be listed.


If multiple scripts are provided (via multiple Special Abilities) then it is the job of the scripts to work out a plan of coordination. Hook Parameter[0] is initially set to the empty string and is set to the return value of each script that executes. Other hook parameters are initially set to empty strings and are not modified by the engine between multiple script executions. Multiple scripts within a single class will not be executed in any particular order.


In the future, the search order for these scripts might be expanded to include, for example, the character. This would allow the designer to modify class changing abilities to a character during play.



CanChangeFromClass

Search order

Parameters

Result

A return value of anything except “Y” will remove the possibility of making this change.

Context





CanChangeToClass

Search order

Parameters

Result

A return value of anything except “Y” will remove this class as a possibility.

Context

Example

To allow a fighter to change classes if his strength is greater than 12 you might attach a Special Ability named 'CCFighter' to the class 'Fighter'. Then you would provide the following script to the Special Ability 'CCFighter':

script: “CanChangeFromClass”

$IF (GET_CHAR_LIMITED_STR($IndexOf($CharacterContext())) ># 12)

{

$RETURN "Y";

};