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 Help. Savage Worlds:counting Raises

Hello all, Savage Worlds has the mechanic that every 4 over a target number count as a raise and with it have certain effects. This is especially important for determining wounds vs toughness during combat. Would it be possible to create an API script that works with the Savage Worlds dice mechanics? I imagine setting up a macro that references character sheet entries for rolling dice and would ask for the Target Number to achieve. The result would tell me the dice cumulative result as well as the number of raises achieved in comparison to the TN. I am sadly no programmer and have no clue how to do this so any help would be appreciated.  
1377862084
Lithl
Pro
Sheet Author
API Scripter
How is the target number defined? Is it something mostly static (Exalted uses 7 in almost every situation), is it based on some value of the attacker or target (such as DCs in D&D), or is it chosen mostly arbitrarily by the gm (as in WoD)?
A bit of all of this. Base is usually 4 for normal tasks, but in fighting it is the parry value from the enemy and for wound the toughness level of the enemy. Toughness and Parry are derived attributes from Character stats and equipment. That information could be included in the character sheet in theory. Alternatively a query popup asking for Target number Input would be needed I guess.
It's entirely possible, however it would take into account a few different factors. The first is that all tokens are representing a character in the journal with an attribute, or the vital stat(s) in question are placed in bars on the token itself. The other thing is having to tell the system exactly what you plan on it doing. so if you're (and forgive me, I don't know the savage world's system) attacking a creature and it's parrying, you'd need to set up the script to draw an attribute "parry" from the char sheet/bar, and send a chat command like !melee attack. API is great, but it can't read your mind, which means for systems with very complicated mechanics, you need very specific code.
Well, I would be happy with a function that would allow me to include it in a specific roll. These macros ask me for input and to keep it simple I would like a function I could call that would ask the user to input the TN. It then would process the dicerolls against the TN after exploding dice and modifiers are calculated. I was hoping I could keep the normal macro functions and simply add something like QueryTN into the macro and then the API would look for the Function QueryTN and act accordingly (Taking the dice result and calculating how often it is 4 over the TN). That would allow me to continue refining macros and pulling in certain values from a sheet. Sorry, I am not a programmer and not a natvie speaker, sometimes I have a hard time getting information across. As an example of a roll I would macro it so the roll would take the value of "Fighting" from the sheet as a dicetype (from 4,6,8,10,12) to roll together with the d6 Wild Die. At the end I append the query that pops up and asks me for the TN. Then it rolls.&nbsp;TN is 7 and we roll a 12 the result would be a success with 1 Raise (7+4=11) In this post are the most common dice rolls made in Savage Worlds, maybe it helps.&nbsp;&nbsp; <a href="https://app.roll20.net/forum/post/287162/#post-287370" rel="nofollow">https://app.roll20.net/forum/post/287162/#post-287370</a>
1377912267

Edited 1378365025
Lithl
Pro
Sheet Author
API Scripter
Here's my swing at the problem. Usage: type !rc roll | target and the script will output an inline roll, the target number, and the number of raises. Example: !rc 2d12+d6|7 Yields something like: Roll: [20], Target: 7, Raises: 3 You can even use a query, for example: !rc 2d12+d6|?{Target|7} You'll get a popup asking for the target, with a default value of 7. I was testing my script with the rolls d12+d6 and 2d12+d6. I'm not certain if it will work with the full intricacies of the Roll20 dice roller, but it should work for the basics. Line 8 of the script defines the variable raise_count.OUTPUT_FORMAT . Change the value of this string if you want to change how the output looks. <a href="https://gist.github.com/Lithl/6395653" rel="nofollow">https://gist.github.com/Lithl/6395653</a>
hey there, sorry for being so late, I was away for a bit. I will test this our soon, thank you for your quick reply, I did not think it would be answered so fast.