The Script Editor
DM Genie features a powerful script editor in which you can code your
feats, classes, etc. If you have used integrated development
environments such as Visual Studio before, these features will be
familiar to you. Auto-complete and syntax hints help both novice and
advanced programmers work faster and better.
Context-Sensitive Help: Shift-F1
You can quickly open the DM Genie help
file to the
correct spot by placing your cursor on a member of an object and
pressing Shift+F1.
For example, pressing shift-F1 on the text "Cr.AddModifier" would bring
you to the AddModifier
help topic
in the Creature object information file. Note that for context
sensitive help to work, the object name should end in one of
the Recognized
Object Names. If Shift-F1 brings you to this page, then either the object name or its member is not recognized!
Auto-Complete
Like most modern programming
environments, the DM
Genie script editor has an Auto-Complete feature. Simply type in the
name of an object using the naming convention
and enter a dot (.) as you normally would to specify a member of that
object. You will be presented with a list of all available members and
functions for this object. You can type in the first few letters to
automatically find the function you are looking for, and then press
Space, Enter or open a bracket, and the name will be automatically
filled out for you. You can also scroll down the list and select a
member name this way. Press Escape to remove the auto-completion
listbox.
Syntax Highlighting
If you check the Highlight Syntax box,
your code
will be colored according to the program syntax, making it easier to
read. This can be slow for very large blocks of code, and so you can
disable it.
Syntax Hint and Help
After you have entered the name of a
recognized
object member or function, a text box will appear underneath your line
giving you the function's declaration - that is, the parameters to fill
and their type. The parameter you are currently entering will be
highlighted in bold.
Optional parameters are presented in [square brackets] - to skip an
optional parameter you must still put in a comma. For most
members, you will also see one line of help
which quickly describes the use of that variable or function. Press
Shift-F1 to get more information from the help file.
Recognized
Object Names
In order for the auto-completion, syntax hint and
context-sensitive help features to work, the script editor must be able
to determine the class of the object under the cursor. To do this, DM
Genie matches the end
of the name of the object to to the name of the class, or an
abbreviation of it:
Creature: All
object names ending in Cr,
Creat or Creature
Attack: All
object names ending in Att,
Attack or Attacks
Race: All
object names ending in Race
LastDamage: All
object names ending in Damage,
LastDamage
Item: All
object names ending in It,
Item
Skill: All
object names ending in Skill
Spell: All
object names ending in Spell
Feat: All
object names ending in Feat
For example, all of the following names will be known to be a Creature object: Cr, OldCr, NewCreature, TheCreat.
If you follow this naming convention, all the advanced editor features
will work for you.
Documentation for DM Genie and Player Genie, page Script_Editor. Copyright © Mad Scientist Studios, 2006.
Help Contents | DM Genie home page
Click here if you cannot see the table of contents on the left