Roll20 uses cookies to improve your experience on our site. Cookies enable you to enjoy certain features, social sharing functionality, and tailor message and display ads to your interests on our site and others. They also help us understand how our site is being used. By continuing to use our site, you consent to our use of cookies. Update your cookie preferences .
×
Create a free account

[Script] Marvel Super Heroes RPG Universal Table

1427490258

Edited 1434054625
This is my first try at writing an API script, so my apologies if I missed anything. I didn't see that anyone had a script yet for this (though I might have missed it). This is fairly basic, but I think it gives the right results. Also, I welcome any suggestions to tune up the code or if there is some formatting that you think might make it more readable. Hopefully someone will find this useful! Many thanks to The Aaron for the excellent suggestions. Instructions: Chat message should be formatted as: !ut &lt;rank name&gt; &lt;column shift number&gt; &lt;attack type&gt; Rank names should have no spaces (ex: Shift 0 becomes Shift0 or Shift-0, Class 3000 is Class3000 or CL3000) Positive column shifts should have no + in front (ex: +2 column shift would be just 2, -3 column shift would be -3) EDIT: Added functionality for attack types. Use !help to see a listing of abbreviations. EDIT 2: Fixed an issue with the script where you could get an error if the column shift dropped the column below Shift 0 or above Beyond. It should now stop at those two points. Also added use of the default roll template to style rolls. If you dislike the look of it, you can comment those lines out and uncomment the lines below. You can now use !help to get reminders of how to use the script in the chat window, use !attack for a listing of the abbreviations of the attack types, and use !example to get examples of how to type out your rolls. EDIT 3: Adjusted the script so it should now work with the community sheet for MarvelSH. You can reference the attributes in a character sheet's ability section and it should work correctly. I also adjusted the script so there is now the option to use the Default Roll Template to format the rolls or have no roll template. There's a third option for a Marvel Themed Roll Template that doesn't currently work with the character sheet (since there's no roll template there yet). Something like: !ut @{VFighting} ?{Column Shift|0} ?{Attack Type} --id:@{character_id} This will roll whatever rank name is in the Fighting attribute and query for column shift and attack type while adding the character's name if you are using the roll template. And for powers: !ut @{repeating_powers_0_fighting_value} ?{Column Shift|0} ?{Attack Type} --id:@{character_id} This will roll the first listed power for the character and query for column shift and attack type while adding the character's name if you are using the roll template. EDIT 4: Added options for roll names and character id. Added abbreviations for the Rank Names. Added a "help.txt" file. Help File <a href="https://github.com/madartiste/roll20-api-scripts/blob/master/Universal%20Table%20Roller/help.txt" rel="nofollow">https://github.com/madartiste/roll20-api-scripts/blob/master/Universal%20Table%20Roller/help.txt</a> Script File <a href="https://github.com/madartiste/roll20-api-scripts/blob/master/Universal%20Table%20Roller/Universal%20Table%20Roller.js" rel="nofollow">https://github.com/madartiste/roll20-api-scripts/blob/master/Universal%20Table%20Roller/Universal%20Table%20Roller.js</a>
1427498802
The Aaron
Pro
API Scripter
Yeah! Contrats on the script Sarah!
Thanks, Aaron! I still have some improvements I want to make. I'd like to add the option to note what type of attack (if it is one) and call up the appropriate extra results (such as stun, slam, etc.). I'll have to ponder on that, but I have some ideas.