Difference between revisions of "Script:Dice in the Vineyard"
From Roll20 Wiki
(Created page with "{{script overview |name=DiceInTheVineyard |author={{user profile|503018|manveti}} |version=0.1 |lastmodified=2015-04-09}} '''Dice in the Vineyard''' is a dice tracker for Dog...") |
Andreas J. (Talk | contribs) m (suppress category) |
||
(4 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
− | + | #Redirect[[API:Script Index]] | |
+ | <!-- Don't delete redirect, help center links to this page even though API have been removed | ||
+ | [[Category:Discontinued API Scripts]] --> | ||
+ | |||
+ | script overview | ||
|name=DiceInTheVineyard | |name=DiceInTheVineyard | ||
|author={{user profile|503018|manveti}} | |author={{user profile|503018|manveti}} | ||
|version=0.1 | |version=0.1 | ||
− | |lastmodified=2015-04-09 | + | |lastmodified=2015-04-09 |
'''Dice in the Vineyard''' is a dice tracker for Dogs in the Vineyard. It creates poker-chip-styled tokens for each roll and stacks them on the tabletop in areas set aside for each character. During play, players can spend roll tokens, roll in additional tokens, and request chip counts for any character in play. | '''Dice in the Vineyard''' is a dice tracker for Dogs in the Vineyard. It creates poker-chip-styled tokens for each roll and stacks them on the tabletop in areas set aside for each character. During play, players can spend roll tokens, roll in additional tokens, and request chip counts for any character in play. | ||
Line 17: | Line 21: | ||
=== Syntax === | === Syntax === | ||
+ | <!-- suppress coategry | ||
+ | |||
{{syntaxbox top|DiceInTheVineyard|formal=true}} | {{syntaxbox top|DiceInTheVineyard|formal=true}} | ||
− | {{API command|ditv}} {{API parameter|name=subcommand}} {{API parameter|name= | + | {{API command|ditv}} {{API parameter|name=subcommand}} {{API parameter|name=parameters|optional=true}}<br> |
{{Formal API command| | {{Formal API command| | ||
{{token|S}} {{rarr}} ditv {{token|subcommand|-}} | {{token|S}} {{rarr}} ditv {{token|subcommand|-}} | ||
Line 44: | Line 50: | ||
* '''setimage''': Set the image URL for a specified chip value | * '''setimage''': Set the image URL for a specified chip value | ||
* '''images''': Display a table of all chip images, including the default image which will be substituted in for any chip without a defined image}} | * '''images''': Display a table of all chip images, including the default image which will be substituted in for any chip without a defined image}} | ||
− | {{param description|name= | + | {{param description|name=parameters|value=Some subcommands require additional parameters: |
* '''add''': Requires the new character's name and X and Y coordinates. Coordinates are given in squares, starting at 0 in the top left. This subcommand also accepts an optional COLOR argument, which will be used to border the character's area (default is #FFFF00). If provided, it must be an HTML-style RGB string (e.g. "#60A0FF"). | * '''add''': Requires the new character's name and X and Y coordinates. Coordinates are given in squares, starting at 0 in the top left. This subcommand also accepts an optional COLOR argument, which will be used to border the character's area (default is #FFFF00). If provided, it must be an HTML-style RGB string (e.g. "#60A0FF"). | ||
* '''remove''': Requires the name of the character to be removed. | * '''remove''': Requires the name of the character to be removed. | ||
Line 51: | Line 57: | ||
* '''count''': Requires the name of the character whose chips are to be counted. | * '''count''': Requires the name of the character whose chips are to be counted. | ||
* '''setimage''': Requires the chip value whose image is to be set. If a URL is passed in as a second argument, it will be used; otherwise, the currently selected token's image will be used.}} | * '''setimage''': Requires the chip value whose image is to be set. If a URL is passed in as a second argument, it will be used; otherwise, the currently selected token's image will be used.}} | ||
− | + | {{param description bottom}} | |
+ | --> | ||
=== Changelog === | === Changelog === | ||
{{changelog version|0.1|2015-04-09|* Initial release}} | {{changelog version|0.1|2015-04-09|* Initial release}} |
Latest revision as of 19:53, 20 September 2021
- RedirectAPI:Script Index
script overview |name=DiceInTheVineyard |author=manveti |version=0.1 |lastmodified=2015-04-09
Dice in the Vineyard is a dice tracker for Dogs in the Vineyard. It creates poker-chip-styled tokens for each roll and stacks them on the tabletop in areas set aside for each character. During play, players can spend roll tokens, roll in additional tokens, and request chip counts for any character in play.
It is recommended that this script be used in conjunction with the CommandShell module, which will improve output formatting and command discovery.
[edit] Using Dice in the Vineyard
Before using Dice in the Vineyard, it is recommended that image URLs be set for each chip value. These can be set in the script in the DEFAULT_URLS
dictionary or within the game via the setimage subcommand (described below). For best results, use a PNG with transparency, so that chips will stack appropriately. You may wish to set the CHIP_HEIGHT
parameter, which defines the height, in pixels, of the side of the chip (i.e. additional chips will be placed this many pixels above the chip beneath them in order to create a stacking effect). Any chip without a specific image set will use GENERIC_URL
and will use a status icon to display its value.
Each character to be tracked must have space allocated on the tabletop for its chips. This can be accomplished via the add subcommand, which will allocate an area starting at the specified square and extending six squares right and four squares down (this can be altered by changing the values of BOX_WIDTH
and BOX_HEIGHT
, but should always be at least two wide and a multiple of two tall, and should have a total area of at least 24 squares). A 2x2 area in the top left will be reserved for the character token and for chip tokens to be played; ten 1x2 areas will be used for stacking chips of each value 1-10.
[edit] Syntax
[edit] Changelog
v0.1 (2015-04-09)
- Initial release