
Hey Guys, I have been on temporary roll20 hiatus (very saddening) and it looks like my API's have not made the cut for the API repository. Nevertheless, I am back and would like to give them somewhat of a bump in-case they are useful for fellow dungeoneers. API 1. Summon Monster (Improved) This API is built onto Brandon's summoning script . I've edited and improved on this with the help of Brian. You will find it to be perfect for Druids and Summoners or anyone who can summon monsters really! I have also just added a functionality that will allow players to light torches for illumination. Usage: 1. Select token you want the monster to appear next to. 2. In chat, type "!summon (name of monster) (number to summon)" without brackets or quotation marks. 3. By default the monster will take up a 5x5 ft square (medium or small creature). To summon larger creatures add a letter to the end of the message: F= Fine, D = Diminutive, T= Tiny, L = large, H = Huge, G = Gargantuan, C = Colossal, cust = customised size (this tag must be followed by two numbers, see examples). 4. You can also summon a torch that will give 40 ft of vision with 20 ft of dim light (torch must be in the name). NB. The name of the monster must be in a journal entry under "Characters" and the character image must be the token image you wish to use (marketplace images do not work). If that character has an HP and AC attribute it will automatically allocate them to the red and blue token bar respectively. This API works well in conjunction with the Monster Importer (see below) which I have only tweaked and cannot claim credit for. Examples: 1. !summon torch 2. !summon eagle 3. !summon eagle 2 4. !summon eagle 1d3 5. !summon eagle 1d3+1 6. !summon cave troll 1d3+1 H 7. !summon flaming sphere cust 140 140 NB. When making a custom size, every 70 = 1 square. Please find the Summon Monters API here: <a href="https://gist.github.com/9544706.git" rel="nofollow">https://gist.github.com/9544706.git</a>
API 2. Temporary Stat Adjuster This API will allow you to quickly determine any Ability Score damage or gain and will calculate the modifier decrease or increase and reflect this in temporary adjustment to HP (if CON damage). This code does not work for Character Sheets. Just make sure your attribute tags are the same as the following Hit points = HP Hit dice = HD Constitution score = constitution Constitution modifier = con You can change these in the script under tagHP, tagHD etc. but just make sure they are the same in the script and in your character sheet on roll20. You may also hide all the chat output from your players by editing "hiddenOutput = false;" to "hiddenOutput = true;" without quotation marks. How it works: There are four functions to this API 1. Straight stat modifier - !stat HP 10 This will either add or subtract a specific value, or dice roll, to or from the attribute. eg. Add 15 or 3d5 temporary hitpoints or 1 temporary AC. 2. Ability Score + ability score modifier calculator and editor - !ability constitution 4 This will change an ability score eg. Dexterity and calculate the change in modifier using (Ability Score - 10)/2 rounding down. This function can also store the modifier to the character if you choose (see example macros). 3. Temporary hit point calculator and editor - !ability constitution 4 con If you specify the character Hit Dice (total level) and Hit Points (health) as attributes AND edit the code in the "Edit Here" section to match these attributes. The code will calculate the total temporary current and max hitpoints gained or lost due to constitution damage. (This is only called if "con" is present in your attribute). 4. Stat Resetter - !resetStats This function will reset the characters stat to their original thus removing the temporary modifiers. This is done by taking the Max attribute value and equating it to the current. Usage: 1. Select token that to have their stats or ability scores modified. 2. Either type in chat or add the following to a macro: "!stat [name of stat] [number or roll]" or "!ability [name of ability] [number or roll] [name of modifier(OPTIONAL)]" (without quotation marks and square brackets). 3. The name of the stat/ability must be in the tokens attribute. 4. To reset stats type !resetStats to reset all OR !resetStats [name of stat 1] [name of stat 2] .... etc (current value attributes will be reset to max value). Examples 1. !stat hp 1d5 2. !ability constitution -4 3. !ability constitution 1d4 CON 4. !resetStats You can really get creative with the macros for this API, here's one that I use: /emas @{selected|character_name} takes ?{how much?} damage to ?{What ability?}! !ability ?{What ability?} ?{how much?} ?{modifier?} ***This allows you to specify any type of stat damage as a GM and as long as you're selecting the player's token it will take it from their character. You can type 1d4 in the ?{how much?} prompt or specify a flat damage.*** nb. This code does not take inline roles (omit the [[ ]] around your roll eg. [[1d4]] becomes 1d4). Also, this code does not work for the in-game Character Sheets. Please find the Stat Adjuster API here: <a href="https://gist.github.com/GM-King/10621769" rel="nofollow">https://gist.github.com/GM-King/10621769</a>
API 3. Ammo Tracker This is a small API that will subtract 1 (arrow, wand charge, bolt, bullet, flaming javelin +1) and whisper the GM with how many are left. Usage: 1. Select token that is firing their ranged weapon or wand. 2. Either type in chat or add the following to a macro: "!ammo [name of ammo]" or "!charges [name of spell]" (without quotation marks and square brackets). 3. The name of the ammo/wand spell must be a tokens character sheet attribute. Examples 3. !ammo arrows 2. !charges magic missiles Please find the ammo tracker here: <a href="https://gist.github.com/GM-King/9776048" rel="nofollow">https://gist.github.com/GM-King/9776048</a>
Finally, I hope these APIs are useful. Please don't hesitate to contact me regarding bugs or functionality. Good Luck, GM-King