This is a basic guide to the configuration representation of various objects in MagicSpells. By no means is this guaranteed to be complete but rather a quick reference on how to put together common details.
The vector format is x,y,z
where each letter may be replaced with a double
value.
The TargetBooleanState format is just a string which represents a 3 outcome type boolean state, on
, off
, and toggle
.
The SpellFilter format is a configuration section which may contain any of the following:
spells
accepts a list of the internal spell names to explicitly allow.denied-spells
accepts a list of the internal spell names to explicitly deny.spell-tags
accepts a list of strings to indicate spell tags to look for and allow.denied-spell-tags
accepts a list of strings to indicate which spell tags to look for and deny.
Spells are checked against the options in this order.
- If none of the options are defined, it allows all spells to pass through it.
- If
spells
is defined and contains the spell being checked, the spell is allowed through the filter. - If
denied-spells
is defined and contains the spell being checked, the spell is not allowed through the filter. - If
denied-spell-tags
is defined and the spell being checked contains a tag that is denied, the spell is not allowed through the filter. - If
spell-tags
is defined and the spell being checked contains a tag in this collection, the spell is allowed through the filter. - If none of these have applied, a default handling is applied. The default handling is determined as follows:
- If
spells
orspell-tags
are defined, the default action is to block the spell when being checked. - If the previous has not applied, then if
denied-spells
ordenied-spell-tags
is defined, the default action is to allow the checked spell through the filter. - If a default result has not been determined from the 2 above rules, the filter has no fields defined and is treated as being an open filter, meaning that it allows all spells to pass through it.
- If
prompt-type
accepts astring
and will fail if not set. Current valid values areregex
fixed-set
enum
In addition to any additional options specified by the format of the specific prompt type.
- Everything that MagicPromptResponder has
regexp
accepts astring
and fails if not set to a valid regular expression.prompt-text
accepts astring
to use as the prompt's message to the player.
- Everything that MagicPromptResponder has
options
accepts alist
of strings and fails if not set.prompt-text
accepts astring
to use as the prompt's message to the player.
- Everything that MagicPromptResponder has
enum-class
accepts astring
of the class to load the value options from.prompt-text
accepts astring
to use as the prompt's message to the player.
variable-name
accepts astring
of the variable name to save the validated prompt response to.
prefix
accepts astring
and defaults to nothing.local-echo
accepts aboolean
and defaults totrue
.first-prompt
accepts aconfiguration section
inprompt
format.timeout-seconds
accepts aninteger
and defaults to30
.escape-sequence
accepts astring
and defaults to nothing.