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

What can resolve in a rollable table?

I have a pass/fail rollable table that presents "Success" when the tables resolves to 1 and "Fail" when the table resolves to 0. I am trying to pass something like this through the rollable table:  [[ 1t[ [[1d20 + @{target|t1|npc_str_save}>?{DC}]] ] ]] It selects the target and brings up the query just fine (and the roll within resolves).  Unfortunately the rollable table seems to break.  I have tried various raw HTML replacements, but cannot seem to get that to work. Something like this shows up in the chat no matter what I try to do: [[ 1t[ 9 Any help is appreciated!
You've got extra spaces in your macro: [[ 1t[[[1d20 + @{target|t1|npc_str_save}>?{DC}]]] ]] An inline rollable table is called with [[ 1t[TABLENAME] ]]. You can't have a space between the 1t[ and the TABLENAME and the closing ].
I see what you are saying.  However, when I do that it does not resolve the "@{target". It asks for a target, asks the query then never resolves the target
1706840265

Edited 1706888384
GiGs
Pro
Sheet Author
API Scripter
In my experience, trying to construct the name of a table like that never works. Inline rolls have extra characters that aren't visable to users but are visible to the computer parser, and that means your table name never matches the result of a roll.
Well, I was able to get this to work but it only shows successes.&nbsp; I will have to noodle this more tomorrow [[1t[[[1t[[1d20 + @{target|t1|npc_str_save}&gt;?{DC}]]]]]]] For some reason the inner rolltable result always comes out to 1. This is what my chat looks like now (ha ha): <span class="inlinerollresult showtip tipsy-n-right" original-title="Rolling 1t[1] = ( SUCCESS! )" style="box-sizing: content-box; background-color: var(--primary-dark); border: 2px solid var(--primary-dark); padding: 0px 3px; font-weight: bold; cursor: help; font-size: 1.1em;">SUCCESS! <span class="inlinerollresult showtip tipsy-n-right" original-title="Rolling 1t[1] = ( SUCCESS! )" style="box-sizing: content-box; background-color: var(--primary-dark); border: 2px solid var(--primary-dark); padding: 0px 3px; font-weight: bold; cursor: help; font-size: 1.1em;">SUCCESS! <span class="inlinerollresult showtip tipsy-n-right" original-title="Rolling 1t[1] = ( SUCCESS! )" style="box-sizing: content-box; background-color: var(--primary-dark); border: 2px solid var(--primary-dark); padding: 0px 3px; font-weight: bold; cursor: help; font-size: 1.1em;">SUCCESS! <span class="inlinerollresult showtip tipsy-n-right" original-title="Rolling 1t[1] = ( SUCCESS! )" style="box-sizing: content-box; background-color: var(--primary-dark); border: 2px solid var(--primary-dark); padding: 0px 3px; font-weight: bold; cursor: help; font-size: 1.1em;">SUCCESS!
1706878440
GiGs
Pro
Sheet Author
API Scripter
When a roll always resolves to 1 every time, that means the roll isn't working. It does seem like your table name is being recognised, but the behind-the-scenes roll isnt recognised.
GiGs said: When a roll always resolves to 1 every time, that means the roll isn't working. It does seem like your table name is being recognised, but the behind-the-scenes roll isnt recognised. I think you are correct.&nbsp; I think the query and the target are just not the way to go there.&nbsp; Maybe I need to drop the idea of a rollable table:&nbsp; This is essentially what I am trying to do. What I have: What I would like: To add a Pass/Fail output based on the DC that is listed in the title. Anyone have any thoughts on how to get that?
1706888251

Edited 1706888283
GiGs
Pro
Sheet Author
API Scripter
If you want it to show the text output Success/Fail based on a roll, I don't think this is possible without a mod script or custom character sheet (both of which require the game creator to have a Pro subscription). If you are okay with showing a number 1 for success, and a number 0 for fail, that is possible with basic dice macros (and it looks like you know how to do that).
GiGs said: If you want it to show the text output Success/Fail based on a roll, I don't think this is possible without a mod script or custom character sheet (both of which require the game creator to have a Pro subscription). If you are okay with showing a number 1 for success, and a number 0 for fail, that is possible with basic dice macros (and it looks like you know how to do that). I appreciate it.&nbsp; I think I am going to leave it like this for now because I don't want the output to confuse the players.
1706899232
Gold
Forum Champion
GiGs said: If you are okay with showing a number 1 for success, and a number 0 for fail, that is possible with basic dice macros (and it looks like you know how to do that). A trick I found, if you do the "1 for success, 0 for fail" method..... you can apply CS and CF (critical success and critical failure) to the dice code, thus making it so that "1" is a GREEN success, and 0 is a RED failure. The color coding can help with recognizing success vs failure.&nbsp;
1706900874
GiGs
Pro
Sheet Author
API Scripter
That's a nice idea Gold.
Gold said: GiGs said: If you are okay with showing a number 1 for success, and a number 0 for fail, that is possible with basic dice macros (and it looks like you know how to do that). A trick I found, if you do the "1 for success, 0 for fail" method..... you can apply CS and CF (critical success and critical failure) to the dice code, thus making it so that "1" is a GREEN success, and 0 is a RED failure. The color coding can help with recognizing success vs failure.&nbsp; Something I will definitely consider.&nbsp; Thank you
Well, if anyone is interested, I was able to get it to work (though not perfectly).&nbsp; The re-use roll trick came in clutch once again. Here is the snip of code that matters: ?{What Type?|STR, [[[[1t[[[{1d20+@{target|t1|npc_str_save}&amp;rcub;&gt;?{What DC?&amp;rcub;]]]]]]] &amp;{template:default&amp;rcub; {{name=The Target Attempts to Make Their STR Save! DC:?{What DC?&amp;rcub;&amp;rcub;&amp;rcub; &amp;lcub;&amp;lcub;@{target|t1|token_name}= $[[0]] $[[1]] &amp;rcub;&amp;rcub;| DEX...CON...etc. }} The UNDERLINE/ITALICS &nbsp;is just a continuation of the macro for the different type of saving throws The BOLD is the roll table call, however I just put it into the double square brackets to get it to execute as a roll. The BOLD/UNDERLINE &nbsp;is just calling for the results of the rolls.&nbsp; $[[0]] is just the success/fail roll inside the roll table call while the $[[1]] is the actual result from the roll table Here is what it looks like in the chat, but obviously the $[[0]] can be removed to get the cleaner look. Cleaner Look: Biggest Caveat: I don't quite know how I would get the original roll(STR saving throw in this case) into the output.&nbsp; Oh well, I guess my players will just have to be super cynical when the monsters succeed on their saves :-)