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

Modiphius 2d20 variant Target Number System

I noticed a couple of posts that talked about it not being possible to make dice work the way they do in Modiphius' 2d20 system, but they were all at least a few years old, so I was wondering if it's been added. The gist of it: Player rolls 2 to 5 20-sided dice. For every number below  a certain number, they get 2 successes. For the same  die, for every number below  a higher number they get one success, and for every number above  a certain number (most often meaning only on a 20) they get a "complication". The target numbers change based on which skills/attributes/focus' you're using. I've seen two workarounds. One, the one used in the existing 2d20 character sheets, is to highlight a critical successes in green and make the player/gm add the extra success themselves and in blue on a complication. The other, by Silvyre, works by html replacement. As such, while amazing that it works around the issue, it's a little finicky and doesn't display cleanly.  So, is there an integrated way to do this? If not, is there any way to request it?
1580141321

Edited 1580144774
GiGs
Pro
Sheet Author
API Scripter
There's no better way than the two youve described, unless you use a custom API script (as a pro user, if you're the GM this is an option). Can you link silvyre's method? I'm interested to see how that works?
Luckily, I am &nbsp;the GM and am more than willing to use custom API scripts...just don't know how. Here's Silvyre's original post about it:&nbsp;<a href="https://app.roll20.net/forum/permalink/5873574/" rel="nofollow">https://app.roll20.net/forum/permalink/5873574/</a>
1580145019
GiGs
Pro
Sheet Author
API Scripter
Thanks. I can create that script, but I'm a little fuzzy on how the roll works. What are the two target numbers? It sounds very familiar, though. i may have answered a question for a very similar system before.
That would be so awesome :D If possible, I'd like to be able to integrate it into a sheet (it's for a beta of a new 2d20 game so I can't use an existing sheet, which is also why I'm being vague and general in my description, sorry). The game system has 6 Attributes, plus a bunch of skills. To get the target numbers, you add two together. So, for instance, Strength + Melee Strength = 7 Melee = 3 TN for Crit = 3 TN for success = 7+3 TN for Complication = 20 So a roll of 1,2, or 3 gives 2 successes, a roll of 4-10 gives 1 success, anything 11 - 19 is no successes, and a 20 is a complication. That's the gist of the 2d20 system. Specific games have variations on that core setup but that's the important part.
1580146453
GiGs
Pro
Sheet Author
API Scripter
For the Crit, do you pick a specific score, or is the lowest of the two scores? Integrating into a character sheet is trickier. If it's something you want to share on the repository for others to use, it cant use an API script by default. It might be possible through the rolltemplate route, but that requires completely different code. If another sheet already does it or something similar, it would be easier to copy the code from there and tweak it if needed. Can you name the sheets that do it already?
It's always the "skill" score, which is almost always the lower but the important thing is that it be that specific value rather than it being the lower of the two necessarily. Wasn't planning to put it on the repo. Just for use in my game, though I'm sure others would appreciate it if it were available widely.&nbsp; There aren't any that do it the way it's "supposed" to. Just ones that highlight low values in green and have the player add the extra success. Here's the one I've been tweaking:&nbsp; <a href="https://github.com/GrumpyOldDM/roll20-character-sheets/tree/master/conan-2d20" rel="nofollow">https://github.com/GrumpyOldDM/roll20-character-sheets/tree/master/conan-2d20</a>
In the conan one, it has attributes, expertise, and focus. It uses attribute+expertise for the 1 success value, and focus for the 2 success one. The one I'm playing is slightly &nbsp;different in that it has attribute + skill for the 1 success value, and just skill for the 2 success one, instead of having a seperate "focus" stat.
1580147372
Kraynic
Pro
Sheet Author
After a quick look at github, there is a Star Trek Adventures 2d20 that has a roll template and sheet worker setup.&nbsp; Since I'm not any sort of expert on sheet workers, I didn't look things over to see what everything did, but that might be a sheet to draw inspiration from.
In my custom version of it, I changed it to work the right way for the system I'm playing. Giving this result: &lt;tr&gt;&lt;td style=width:120px&gt;Athletics&lt;td&gt;Rank&lt;input style=width:60px type="text" name="attr_Athletics_Rank" value = "0"/&gt;&lt;td&gt;Modifier&lt;input style=width:60px type="text" name="attr_Athletics_Modifier" value = "0"&gt;&lt;td&gt;&lt;button type='roll' name='roll_skill' value='/me rolls [[ ?{Dice|2}d20sacs&lt;@{Atheletics_Rank}cf20&lt;[[@{Strength}+@{Athletics_Rank}+@{Athletics_Modifier}]]]] Athletics skill.'&gt;&lt;/button&gt;&lt;/td&gt; The atheletics_modifier part is something I added in case there's a custome modifier but most of the time it would just be str+athletics.
I'll check that one out. Thanks.
That's an interesting one. Instead of trying to create something that adds up successes for you, it just shows the results for each die: Control: 6 Conn: 4 Successes: <span class="inlinerollresult showtip tipsy-n-right" original-title=" Rolling {{ceil(((4+6)-d20cf>20cs<4+1e-2)/((4+6)-4)),{2}}kl1,{0}}kh1 = {{ceil(((4+6)-( 9 )+0.01)/((4+6)-4))+{2}}+{0}}" style="box-sizing: content-box; border: 2px solid rgb(153, 153, 204); padding: 0px 3px; cursor: help; font-size: 1.1em; display: inline-block; min-width: 1.5em; text-align: center;">1 <span class="inlinerollresult showtip tipsy-n-right fullcrit" original-title=" Rolling {{ceil(((4+6)-d20cf>20cs<4+1e-2)/((4+6)-4)),{2}}kl1,{0}}kh1 = {{ceil(((4+6)-( 3 )+0.01)/((4+6)-4))+{2}}+{0}}" style="box-sizing: content-box; background-color: rgb(63, 179, 21); border: 2px solid rgb(153, 153, 204); padding: 0px 3px; cursor: help; font-size: 1.1em; display: inline-block; min-width: 1.5em; text-align: center;">2 <span class="inlinerollresult showtip tipsy-n-right fullfail" original-title=" Rolling {{ceil(((4+6)-d20cf>20cs<4+1e-2)/((4+6)-4)),{2}}kl1,{0}}kh1 = {{ceil(((4+6)-( 20 )+0.01)/((4+6)-4))+{2}}+{0}}" style="box-sizing: content-box; background-color: rgb(204, 0, 0); border: 2px solid rgb(153, 153, 204); padding: 0px 3px; cursor: help; font-size: 1.1em; display: inline-block; min-width: 1.5em; text-align: center;">0 Kinda like it better than the way the one I'm using works. Not sure if it'll be easy to convert over, though, since the star trek one only has six skills and the one I'm playing has 17 but I'll have to dig into it and see how it works to find out.
Not 100% following what that does but I think &nbsp;it has each button include 530 &nbsp;different checks, for a 6x6 selection of options. Since the one I'm trying to use has 6x 17 &nbsp;that's probably not workable. Though, tbf, each skill really only works with 1-2 attributes tops so that number is likely significantly lower.
I do like the way it displays results, but I imagine that's the easiest part to modify.
1580153838
GiGs
Pro
Sheet Author
API Scripter
If its just for your own use it will be a lot easier to use the API approach. Is that okay?
Yep, that's fine.
1580166130

Edited 1580166166
GiGs
Pro
Sheet Author
API Scripter
I just realised I dont know what happens when you roll more than 2 dice. How do you dice which die to compare for the Crit, and which dice to use as the total? Do you always use the two lowest dice? Is it possible to roll less than 2 dice, and what happens then?
Every die is used for everything and you can have between 2 and 5 d20s. Never less than 2, never more than 5. If you roll more than 2 then each one still has the same comparison done. Here's an example: Attribute: 6 Skill :3 Dice Rolled: 4 Results : 3, 9, 14, 20 The 3 is a "crit" and counts as 2 successes. The 9 is a "success" and counts as 1 success. The 14 is a failure and does nothing. The 20 is a "complication". It does not count as a success, causes additional problems. However, if those same 4 gave a result of 3, 4, 7, and 9 it would count as 5 successes (2 for the 3, one for each of the others). If they gave results of 15, 16, 16, and 19 then it would count as no successes and no complications.
1580171017

Edited 1580171348
GiGs
Pro
Sheet Author
API Scripter
An, interesting - not what I was expecting at all. So if you rolled 1,2,3,4 with Skill 3 and Attribute 6, you would have 7 successes? Also, when you get a complication, do you need to report how many you got, or just that something happened?
Yep not like any system I've used before, and yeah, you would need to know how many complications. That way things can get really &nbsp;complicated :D
1580179996
GiGs
Pro
Sheet Author
API Scripter
I had answered a question like this before, so just needed to tweak an earlier script first created by The Aaron, then modified by me. Copy the script at the end of this post into your API Scripts page, and make a macro or button using the following layout: !modroll [[nd20]] attribute_name|attribute_value skill_name|skill_value optional_label Some example rolls - the last one is cribbed from your button example in an earlier post: !modroll [[3d20]] Strength|7 Athletics|3 Frodo makes a roll !modroll [[?{Dice|2}d20]] ?{StatName}|?{StatValue|1} ?{SkillName|?{SkillValue|1} A title goes here !modroll&nbsp;[[?{Dice|2}d20]]&nbsp;Strength|@{Strength}&nbsp;Athletics|[[@{Athletics_Rank}+@{Athletics_Modifier}]]&nbsp;Athletics&nbsp;Roll It uses the default template to print out, and will only show the complications count if a complication is rolled. If you want to copy the rolltemplate from that start trek sheet, adding it to your sheet, it will be pretty easy to adapt the output. Heres the script. // wait till the ready event before registering a chat handler on('ready', () =&gt; { // register a function to run for chat messages on('chat:message', (msg_orig) =&gt; { // make sure the message is an api command, then verify it starts with !modroll if ('api' === msg_orig.type &amp;&amp; /^!modroll\b/i.test(msg_orig.content)) { function processInlinerolls(msg) { if (_.has(msg, 'inlinerolls')) { return _.chain(msg.inlinerolls) .reduce(function(previous, current, index) { previous['$[[' + index + ']]'] = current.results.total || 0; return previous; },{}) .reduce(function(previous, current, index) { return previous.replace(index, current); }, msg.content) .value(); } else { return msg.content; } } const msg = processInlinerolls(msg_orig); const template = (labels, dice, hits, complications) =&gt; `&amp;{template:default} {{name=${labels.label}}} {{${labels.statname}=${labels.statvalue} }} {{${labels.skillname}=${labels.skillvalue} }} {{dice=${dice.join('-')} }} {{successes=${hits}}} ${complications ? `{{complications=${complications}}}` : ''}`; // break into an array of arguments on spaces log(msg); const args = msg.split(/\s+/); //const const labels = {}; const stat = args[2].split('|') || []; const skill = args[3].split('|') || []; if(stat.length &lt; 2 || skill.length &lt; 2) { sendChat('ModRoll',`Check your ${stat.length &lt; 2 ? `stat` : `skill`} parameter; it isn't formatted correctly.`); return; } labels.statname = stat[0]; labels.statvalue = parseInt(stat[1]) || 0; labels.skillname = skill[0] labels.skillvalue = parseInt(skill[1]) || 0; labels.label = args.slice(4).join(' ') || ''; if(labels.statvalue &lt;= 0 || labels.skillvalue &lt; 2) { sendChat('ModRoll',`Check your ${labels.statvalue === 0 ? `stat` : `skill`} value.`); return; } const success = labels.skillvalue + labels.statvalue; const complication = 20; // accumulators for successes, crits, and complications let hits = 0; let complications = 0; let dice = []; // walk the inline roll structure grabbing the dice and comparing vs success and crit (msg_orig.inlinerolls || []).forEach(r =&gt; { ((r.results || {}).rolls || []).forEach(r2 =&gt; { (r2.results || []).forEach(r3 =&gt; { hits += ((r3.v || 0) &lt;= success ? 1 : 0); hits += ((r3.v || 0) &lt;= labels.skillvalue ? 1 : 0); // only adding 1 here, because it gets the success bonus as well. complications += ((r3.v || 0) &gt;= complication ? 1 : 0); dice.push(r3.v || 0); }); }); }); dice.sort((a, b) =&gt; a - b); // output the rolls, and hits sendChat('', template(labels,dice,hits,complications)); } }); });
You're awesome! Thank you! I'll give it a try when I get home.&nbsp;