Character Vault
Any Concept / Any System
Compendium
Your System Come To Life
Roll20 for Android
Streamlined for your Tablet
Roll20 for iPad
Streamlined for your Tablet

Personal tools

Script:Ammo

From Roll20 Wiki

Revision as of 18:22, 21 December 2020 by Andreas J. (Talk | contribs)

Jump to: navigation, search
API ScriptAuthor: Aaron C. M.
Version: 0.22
Last Modified: 2015-02-18
Code: Ammo
Dependencies: IsGM
Conflicts: None


Ammo provides inventory management for ammunition stored in a character attribute. If the adjustment would change the attribute to be below 0 or above its maximum value, a warning will be issued and the attribute will not be changed.

Script is sheet-agnostic, and can be made to work with any system.

Note: As the GM, bounds will not be enforced for you. You will be whispered the warnings, but the operation will succeed. You will also be told the previous and current state in case you want to revert the change.

Commands

!ammo [id] [attribute] [amount]
This command requires 3 parameters to process correctly, as shown above.
Parameters Description
id token_id} and the character id will be pulled from represents field of the token.
attribute The name of the attribute representing ammunition. (note: you will have to add an attribute manually to your character sheet that can be referenced by this script.)
amount The change to apply to the current quantity of ammo. Use negative numbers to decrease the amount, and possitive numbers to increase it.
!get-represents [token_id]
This command will show the character id for the supplied token id, or will list the character ids for all the selected tokens if more than one is selected.
Parameter Description
token_id* The id of the token to catch and process to return its linked character sheet ID to chat.
* this is usually supplied with @{selected|token_id}


Changelog

v0.22 (2015-02-18)

  • -


v0.21 (2015-02-18)

  • -


v0.2 (2015-02-01)

  • Release