Script:Conditions
From Roll20 Wiki
Version: 0.5
Last Modified: 2015-07-23
Code: Conditions
Dependencies: None
Conflicts: None
Conditions tracks attribute-modifying conditions on characters. It allows the user to define named conditions consisting of sets of attribute modifiers, or to apply simple anonymous modifications to any attribute.
It is recommended that this script be used in conjunction with the CommandShell module, which will improve output formatting and command discovery, and will enable whitespace in condition descriptions.
Contents |
Syntax
!condition help [command]
!condition create <name> [options]
!condition copy <condition> <name> [options]
!condition rename <old name> <new name>
!condition edit <name> [options]
!condition delete <name>
!condition list [name]
!condition icons
!condition addeffect <condition> <attribute> <effect> [options]
!condition editeffect <condition> <attribute> <effect> [options]
!condition removeeffect <condition> <attribute>
!condition aply <condition> [options]
!condition remove <condition> [options]
!condition applyanon <attribute> <effect> [options]
!condition removeanon <attribute> [effect index] [options]
!condition clear [options]
!condition active [options]
!condition attrs [options]
Formally:
S
→ conditioncommand
arguments
command
→ help
command
→ create
command
→ copy
command
→ rename
command
→ edit
command
→ delete
command
→ list
command
→ icons
command
→ addeffect
command
→ editeffect
command
→ removeeffect
command
→ apply
command
→ remove
command
→ applyanon
command
→ removeanon
command
→ clear
command
→ active
command
→ attrs
arguments
→ ε
arguments
→ stringarguments
arguments
→option
arguments
option
→ -string
option
→ --string
option
→ -string string
option
→ --string string
Parameter | Values |
---|---|
command | Command (create, copy, rename, edit, delete, list, icons, addeffect, editeffect, removeeffect, apply, remove, applyanon, removeanon, clear, active, or attrs) for which to display command-specific help. |
name, condition, old name, new name | Name of condition which will be affected by command. |
attribute | Name of character attribute modified by the effect. |
effect | Effect to apply to attribute.
Effects are divided into several types. Each type of effect stacks with all other effect types. The effect types are listed here, in the order in which they are applied:
|
options | !condition create , !condition copy , and !condition edit accept the following options:
|
Usage Notes
Modifications made to attributes which have active effects will modify the base value, automatically causing the attribute's effective value to be recomputed. For example, if a character has a "Strength" attribute with a value of 20, and a "Strength +4" effect is applied, the character journal will show a value of 24. If the value in the character journal is manually set to 21, Conditions will use 21 as the new base, recompute the value, and update the journal to show the new value of 25.
Examples
- !condition create Entangled -i cobweb
- Creates a new condition named "Entangled" which will use the "cobweb" icon.
- !condition edit Entangled -d "Target's movement is being impeded"
- Adds a description for the "Entangled" condition. NOTE: Quoted arguments require the CommandShell module.
- !condition addeffect Entangled Speed / 2
- The "Entangled" condition will halve affected characters' "Speed" attribute.
- !condition addeffect Entangled Dexterity < 8
- Characters effected by the "Entangled" condition will have their "Dexterity" attribute capped at 8.
- !condition apply Entangled
- With one or more tokens selected, will apply the "Entangled" effect to each character represented by a selected token.
- !condition apply -c 'Bob "Spider Food" Jones' Entangled
- Applies the "Entangled" effect to a single character. NOTE: Quoted arguments require the CommandShell module.
- !condition applyanon -c Speedy Speed +50% -s enhancement
- Applies an anonymous 50% boost to the "Speed" attribute of all characters named "Speedy". The bonus will not stack with other bonuses in the "enhancement" stacking class.
Changelog
v0.5 (2015-07-23)
- Add support for inline rolls in arguments
v0.4 (2015-07-07)
- Fix display of condition descriptions
v0.3 (2015-07-06)
- Clear status icons when clearing all conditions
v0.2 (2015-07-04)
- Fix -c arg handling.
- List each anonymous condition with its index so it's easier to remove the right one.
v0.1 (2015-07-02)
- Initial release