Script Doc

Warning

This section is not for the novice, you can damage your data by incorrect usage.

This just a stub of information as a skeleton framework for Doc'ing. It is currently a WIP at this time.

Creature Template

Creature Template

Feature

Feature

Feature Trigger

Feature Trigger

Generic Trait

Generic Trait

Generic Trait ByNameComparator

Generic Trait By Name Comparator

Pool

Pool

new section

Javascript D20PRO specific methods and variables

In the script library editor, you can use the following additional bindings to access content from inside D20PRO's engine as native javascript:

console -- root class with subcommands -- controls the console view for the instance. this can be used to force zoom levels, token selection, token visibility, toggle fog of war and so on.

map -- root class with subcommands -- provides access to all things related to the current map. Be careful with this as the target map can change while the decision window is open.

mapView -- root class with subcommands -- provides access to the map view controller. offers a lot of the same functionality as the console, but with specific focus on the maps.

role -- string value -- returns the currently assigned role for the script executer (usually the GM). Options are "GM" or "Player".

gamelog -- root class with subcommands -- provides access to the game log for building entries and posting new logs.

feature -- root class with subcommands -- provides access to the parent feature/spell which called the script.

caster -- root class with subcommands -- provides access to the casters creature template data.

casterInPlay -- root class with subcommands -- provides access to the casters creature data as it related to the specific token on the map. "InPlay" data adds to the creature template data with things like location, tethers, statuses and more.

classBinder -- root class with subcommands -- this one provides access to the creature class library and lets you pull base data from class/creature templates for comparison to caster/target data. light -- root class with subcommands -- provides access to the lighting mechanics allowing for programmatic creation of lights and control over existing lights.

target -- root class with subcommands -- provides access to the target's creature class template data.

targets -- array of target -- provides access to a list of all targets in the current selection. Can be iterated over to provide specific access to array elements identicial to the above "target" type.

time -- root class with subcommands -- provides access to the games time controls for round, minute, hour, day, month, etc.

gameLogToken -- root class with subcommands -- helper class used to build new game log tokens which are valid when published from scripts.

as a GM you have access to the following additional commands <<

channels -- root class with subcommands -- usage of this class is required to publish game log entries/tokens built with the above game log classes. Channels can also be used to force a programmatic "broadcast" of the game state.

gameNative -- root class with subcommands -- access the underlying game state. Exposed for power users but not suggested as you can easily break your campaign with this one.

maps -- array of maps -- this provides easy access to the stack of open maps. Use this to help manage things like teleportation between maps or auto-map switching.

when an effect is in play (already cast) the following become available <<

effect -- root class with subcommands -- provides access to the current effect node and it's children. This allows direct manipulation of effect value nodes and other settings programmatically.

mult -- root class with subcommands -- provides access to the active effects multiply/repeat settings and the node associated with those settings.

classLevel -- utility -- returns the current classLevel of a cast effect. This does not include the casting class details, just the level that it was cast at.