(Go back to Class Editor ) This help topic is Open Game Content, and is licensed for public use under the terms of the Open Gaming License v1.0a .
In this tab you can enter custom VBScript code that will change the way your class will be applied. For general information about using VBScript in DM Genie, see the following sections:
Class script code is executed after all other regular class leveling effects have been calculated. This includes added hit die, changes to size due to monster advancement, etc.
Much as in feats, several objects are accessible when executing the class script. Cr is the PC as it will be returned. OldCr is the PC before leveling (the saved backup copy which is used when selecting Undo). cRace is the PC's race object. And as always, func is used for general functions (see Scripting – func Object ).
PrevLevel is the level the PC had before leveling. AddedLevel is the number of levels added. Automatic indicates whether the leveling was manually done or done automatically (for now, automatic is usually False, though later versions might have it set True). If Automatic is true, do not prompt the user, use Msgbox, or add information to the combat log.
There is a huge variety of effects you can automate using class scripting. For example, you could:
- Make a class which doesn't gain a hit die on each level (by removing previously given HD).
- Handle a different way to calculate spell slots.
- Give special abilities or feats to the PC but based on certain conditions (minimum ability scores, etc.)