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

Difference between revisions of "Script:Rollable Table Macros"

From Roll20 Wiki

Jump to: navigation, search
(Created page with "{{script overview |name=Rollable Table Macros |author={{user profile|880239|Nathanael W}} |version=1.0 |lastmodified=2017-04-26 |code=RollableTableMacros |dependencies=none |c...")
 
m (Changelog)
 
(5 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 +
{{revdate}}{{stub}}{{main|API:Script Index}}
 
{{script overview
 
{{script overview
 
|name=Rollable Table Macros
 
|name=Rollable Table Macros
 
|author={{user profile|880239|Nathanael W}}
 
|author={{user profile|880239|Nathanael W}}
|version=1.0
+
|version=1.1
|lastmodified=2017-04-26
+
|lastmodified=2017-05-22
 
|code=RollableTableMacros
 
|code=RollableTableMacros
 
|dependencies=none
 
|dependencies=none
 
|conflicts=none}}
 
|conflicts=none}}
  
This is a simple script that allows you to execute chat commands with a rollable table. Basically, this script will select an item on a table as normal, but instead of displaying the result as a rollable table result, it enters the title of the table item into the chat. This allows you to use things like inline rolls and macros.
+
This is a simple script that allows you to execute chat commands with a [[Rollable table|rollable table]]. Basically, this script will select an item on a table as normal, but instead of displaying the result as a rollable table result, it enters the title of the table item into the {{Text Chat}}. This allows you to use things like [[Inline Rolls|inline rolls]] and [[macros]].
  
 
== Syntax ==
 
== Syntax ==
 +
{{apiboxRec}}
 
{{syntaxbox top|Example|nocat=true}}
 
{{syntaxbox top|Example|nocat=true}}
 
{{API command|rtm table-name}}<br>
 
{{API command|rtm table-name}}<br>
Line 18: Line 20:
  
 
== Installation and Configuration ==
 
== Installation and Configuration ==
Copy the script's code, available from the menu on the right and stored at Roll20's [https://github.com/Roll20/roll20-api-scripts API GitHub Repository]. Paste the code into a new script in your campaign's [[API:Use_Guide#The_Script_Editor|API Script Editor]]. Save the new script and it will be available inside your campaign.
+
The API is avaiable in the One-Click install menu in Roll20.
 +
 
 +
Or install manually: Copy the script's code, available from the menu on the right and stored at Roll20's [https://github.com/Roll20/roll20-api-scripts API GitHub Repository]. Paste the code into a new script in your campaign's [[API:Use_Guide#The_Script_Editor|API Script Editor]]. Save the new script and it will be available inside your campaign.
  
 
== Script Use ==
 
== Script Use ==
Simply type {{API command|rtm table-name}} and the script will select an item from the specified table (respecting item weight as usual). The name of the item will be entered into the chat, and any commands/rolls will be run as normal. An exception is roll queries, which are not supported at this time.
+
Simply type <code>!rtm table-name</code> and the script will select an item from the specified table (respecting item weight as usual). The name of the item will be entered into the chat, and any commands/rolls will be run as normal. An exception is roll queries, which are not supported at this time.
  
By default, the 'from' or 'speaking as' of the chat messages will be the formated name of the table (example: wild-magic-surge becomes Wild Magic Surge). However, you can specify your own names by including it after the table name in the command (example: {{API command|rtm table-name Message As}}). Alternatively, {{API command|rtm table-name myself}} will set the speaking as to whichever player entered the command.
+
By default, the 'from' or 'speaking as' of the chat messages will be the formated name of the table (example: wild-magic-surge becomes Wild Magic Surge). However, you can specify your own names by including it after the table name in the command (example: <code>!rtm table-name Message As</code>). Alternatively, <code>!rtm table-name myself</code> will set the speaking as to whichever player entered the command.
  
 
== Changelog ==
 
== Changelog ==
 +
{{changelog version|1.1|2017-05-22|* update}}
 
{{changelog version|1.0|2017-04-26|* Release}}
 
{{changelog version|1.0|2017-04-26|* Release}}
 +
2024/2/17- functionally not working, perhaps needs an update - "!rtm table-name" isn't outputting anything to chat (tested with own tables)
 +
 +
=Related Pages=
 +
* [[Rollable Tables]]
 +
* {{Text Chat}}
 +
* [[Complete Guide to Macros & Rolls]]

Latest revision as of 02:38, 18 February 2024

Main Page: API:Script Index

API ScriptAuthor: Nathanael W
Version: 1.1
Last Modified: 2017-05-22
Code: RollableTableMacros
Dependencies: none
Conflicts: none

This is a simple script that allows you to execute chat commands with a rollable table. Basically, this script will select an item on a table as normal, but instead of displaying the result as a rollable table result, it enters the title of the table item into the q Text Chat. This allows you to use things like inline rolls and macros.

Contents

[edit] Syntax

!rtm table-name
!rtm table-name Message As
!rtm table-name myself

[edit] Installation and Configuration

The API is avaiable in the One-Click install menu in Roll20.

Or install manually: Copy the script's code, available from the menu on the right and stored at Roll20's API GitHub Repository. Paste the code into a new script in your campaign's API Script Editor. Save the new script and it will be available inside your campaign.

[edit] Script Use

Simply type !rtm table-name and the script will select an item from the specified table (respecting item weight as usual). The name of the item will be entered into the chat, and any commands/rolls will be run as normal. An exception is roll queries, which are not supported at this time.

By default, the 'from' or 'speaking as' of the chat messages will be the formated name of the table (example: wild-magic-surge becomes Wild Magic Surge). However, you can specify your own names by including it after the table name in the command (example: !rtm table-name Message As). Alternatively, !rtm table-name myself will set the speaking as to whichever player entered the command.

[edit] Changelog

v1.1 (2017-05-22)

  • update


v1.0 (2017-04-26)

  • Release


2024/2/17- functionally not working, perhaps needs an update - "!rtm table-name" isn't outputting anything to chat (tested with own tables)

[edit] Related Pages