D20PRO - Feature Library

Overview

The Feature Library is a collection of abilities and capabilities which help to flush out a creatures actions during game play. Spells, Special Abilties and Traits are common concepts in RPGs which can be definied through the Feature Library.

The Host (GM) housed the core Feature Library, however, players can create new features and/or modify features attached to their character during usage.

The current implementation of features does not allow the Player to create new features directly on their character. This capability will be added as we flush out more of the Feature Library in the up coming releases.

Additionally, the current version does not attach to attacks, only spells and special abilities. The result is spells which use a touch attack are not handled for initial resolution (did you hit) at this time.

Node Types

JavaScript and custom markup in Value Nodes

Value Nodes in the flow view of a given Feature support JavaScript, either directly or through the /res/scripts drop folder. JavaScript support allows for a wide range of actions to be defined and managed dynamically.

Additionally, there are two custom call wrappers which allow for parsing complex values. These are func() and dice(). func() is used when you need to make JavaScript calls inside of dice algebra. dice() is used to express dice algebra equations from things as simple 1d4+1 to more complexe concepts (wip -- parse is not fully live yet).

Common script calls from a value node are things like:

10+featureLevel()+spellcastingClassAbilityMod()
dice(4d8)
dice(func(Math.Ceil(casterLevel(), 10))d6)

Spells

Special Abilities

Traits

JS Script reference

Defined Creature Models

the calls below are direct access to the java game objects for CreatureTemplate and Features. These items will require further documentation to enable maximal usage. Ideally these elements are used in JavaScripts used to extend the Feature Library and not in the feature directly (see Default Scripts below)

  • caster - supplies access to . for the CreatureTemplate of the caster.
  • target - supplies access to . for the CreatureTemplate of the target.
  • feature - supplies access to the . for the current feature.

Default Scripts

  • casterHP()
  • casterTotalLevels() - note, likely replace this with a casterHD() call instead - returns the total hitdice of the caster.
  • featureLevel() - returns the level of the current feature.
  • featureName() - returns the name of the current feature.
  • getClassLevelFromReapplyNode() - returns the total level of the casting class or classes if stacking is enabled (utility method used in spellcastingClassLevel() method).
  • spellcastingClassAbilityMod() - returns the ability modifier for the primary casting class.
  • spellcastingClassLevel() - returns the casters class level for the spell being cast. If stacking is enabled in the multiply/repeat node, this value will be the stacked level of valid classes for the spell.
  • targetHP() - returns the current hit point total of the target.
  • targetTotalLevels() - note, likely replace this with a targetHD() call instead - returns the total hitdice of the target.

Tutorial 1 -- lets make a Fireball

  • Open the Library and click the Feature Library button (last button on the right).
  • Click Create from the menu across the bottom of the panel.
  • Click the edit icon on the far Right of the new Feature to open the Node view.
  • Expand the window size of the Node view to taste.
  • Change the name of the new Feature to Fireball -- note, capitalization matching is currently required.
  • Change the Publisher to 3.5 SRD (our reference for this example).
  • Change the Type to Spell.
  • In the default Value Node, put 3 for a Level 3 spell.
  • Drag the default Value Node (Feature Level) down toward the bottom of the window. this will resize the window and grant you more room to work with. Eventually, we will remove the autosizing and replace this with scroll wheel sizing options.
  • Once you have enough room to work with, click the top most Input on the Root Feature Node to add an Effect Node. Clicking on an Input will automatically generate a new Node of the correct type attacked to the clicked Input.
  • For an instant effect like Fireball, you DO NOT need to set a trigger event in the Effect Node.
  • Ensure that Apply Immediately is checked in the Effect Node.
  • Click the top most input of the new Effect Node to create a Modify Target node.
  • Set the Modify Target to HP.
  • Set the Modify Type to Fire.
  • Click the input of the Modify Target node to add a Value node.
  • In the new Value node, type dice(1d6) -- this represents the increment dice for a the variable damage of our Fireball.
  • Click the second input on the Effect node to add a Save Type.
  • Set the Save Type to Primary -- we will define the actual saving throw in a few moments.
  • Next click the third input on the Effect node to add a Multiply Effect node. This node type is used to repeat or multiply the value of the Modify Target by class levels and/or a factor value.
  • Set the Apply Type to Multiply in the Multiply Effect node.
  • Set the Classes to All by clicking on the combo box and placing a check next to All.
  • You can leave the Value per level at a factor of 1.0 for this spell.
  • Now set the Apply at level values to include the range of 1 - 10 (1st through 10th level). To do this click on the Apply at level combo box area and then check the levels 1, 2, 3, 4, 5, .. 10.
  • We will not be setting the final input on the Effect node for this spell. This last input is applying status markers.
  • Next we will ad the Map Template by clicking on the next input of the Feature Node.
  • Our Fireball will use the Default values of the Map Template node. Click the input of the Map Template node to add a Color node.
  • Set the color a value you like. Note, you may have to edit the color a second time to add an opacity value. Opacity can only be set from the Custom Color panel at this time. We are working to remove this limitation.
  • The third input of the Feature node is Duration. As the duration of Fireball is instant, we will not need this node.
  • Clicking on the fourth input of the Feature node will add a Saving Throw node.
  • The type should already be set to Primary. This should match the Save Type indicated in the Effects child node Save Type.
  • Set the Throw to Ref and the Saved to Half.
  • Now click the input for the Saving Throw node. This will add a value node to the chain.
  • In this new Value node, we are going to add a script to handle variable spell DCs.
  • Type the following into the Saving Throw's Value node: 10+featureLevel()+spellcastingClassAbilityMod() You should have seen auto-complete text when you started typing featureLevel() as well as spellcastingClassAbilityMod(). The auto-complete helps to keep the commands organized and allows for complex operations to be summarized as a single statement.

For example, spellcastingClassAbilityMod() runs a check to see if stacking is enabled in the Multiply Effect node, and if it is AND the caster has more than one class which match the Classes criteria of the Multiply Effect node, the total of these class levels will be returned; otherwise, the class level of the casting class is returned from the caster instead.

  • Okay, that's it! Click Save from the left hand menu and you're new Fireball spell should be listed in the Feature Library.

To use the Fireball, place a check infront of the entry in the Feature Library.

© Mesa Mundi Inc. 2016