Difference between revisions of "Script:Ammo"
From Roll20 Wiki
Michael H. (Talk | contribs) |
Michael H. (Talk | contribs) |
||
Line 9: | Line 9: | ||
Ammo provides inventory management for ammunition stored in a character attribute. If the adjustment would change the attribute to be below 0 or above it's maximum value, a warning will be issued and the attribute will not be changed. | Ammo provides inventory management for ammunition stored in a character attribute. If the adjustment would change the attribute to be below 0 or above it's maximum value, a warning will be issued and the attribute will not be changed. | ||
− | '''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.'' | + | :'''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. | |
− | + | :::{| class="wikitable" | |
− | + | |- | |
− | + | ! Parameters !! Description | |
− | + | |- | |
− | + | | '''id''' || ''The id of the character which has the attribute. You can pass this along with @{selected|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. | ||
+ | :::{| class="wikitable" | ||
+ | |- | ||
+ | ! 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}'' | ||
<br clear="all"> | <br clear="all"> | ||
Revision as of 21:45, 27 March 2015
API ScriptAuthor: Aaron C. M.
Version: 0.22
Last Modified: 2015-02-18
Code: Ammo
Dependencies: IsGM
Conflicts: None
Version: 0.22
Last Modified: 2015-02-18
Code: Ammo
Dependencies: IsGM
Conflicts: None
This article is a stub. |
Ammo provides inventory management for ammunition stored in a character attribute. If the adjustment would change the attribute to be below 0 or above it's maximum value, a warning will be issued and the attribute will not be changed.
- 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