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

Button in "name" box of a rollable table

Related to this post :&nbsp; <a href="https://app.roll20.net/forum/post/11116213/rollable-table-question/?pageforid=11116213#post-11116213" rel="nofollow">https://app.roll20.net/forum/post/11116213/rollable-table-question/?pageforid=11116213#post-11116213</a> I'd like to know if some people have been able to create a button in the "name" field of an object in a rollable table.&nbsp; I tried a few construction but it doesn't seem to work. any idea if even possible ?
1664449334
timmaugh
Pro
API Scripter
Yes... I stumbled on this a while back. Let me dig that up...
1664455267
timmaugh
Pro
API Scripter
Ok, so typically (as I understand things) you can't have a button in a table using Roll20 Chat Galactic Standard... but you can do it with ZeroFrame. I've tested these formations of standard button syntax in a table: TYPE | SYNTAX IN TABLE ================================================= Ability | [Label](~Kokoro|1d10) Macro | [Label](!&amp;#13;#TokenMod_Fetch_POC) Script | [Label](!0) The only trick at that point is to unwrap your chat command using ZeroFrame's {&amp;simple} syntax, which dumps out the result of the metascript processing to the chat as a new message. So write your template as you normally would, but then start it with a bang ( ! ) and include a {&amp;simple} . Here's an example using this in a roll template the way you want to (imagining the table was named TableOfButtons )... that would look like this: !&amp;{template:default}{{name=Table Buttons Proof of Concept}}{{Effect=[[1t[TableOfButtons]]]}} {&amp;simple} And the output of each kind. To demonstrate that they all work, I clicked on the "Script" button (it runs the !0 command to get the ZeroFrame config panel).
1664455279

Edited 1664456478
if you find a solution for a Macro launch or for a Api script launch that'd be wonderful EDIT : Ah you answered at the same time as my posting... Gonna give it a try EDIT 2 :&nbsp; Here's the output i get if i insert a table object named :&nbsp;!&amp;{template:default}{{name=Table des Blessures Mineures}}{{Effect=[[1t[Blessure-Mineure]]]}} {&amp;simple} And i get the same king of output if I write : [Bouton]( !&amp;{template:default}{{name=Table des Blessures Mineures}}{{Effect=[[1t[Blessure-Mineure]]]}} {&amp;simple})
Does it need more than just ZeroFrame ?&nbsp;
1664456875

Edited 1664457653
I restarted sand box, and now it launches the result directly, but there is no button appearing to click on to launch this result EDIT : Maybe (probably) i don't get it right...
1664458665
timmaugh
Pro
API Scripter
You should only need ZeroFrame for this particular trick. Your original usage was correct: !&amp;{template:default}{{.......}} {&amp;simple} Can you share what your buttons look like, in the table? And what command you are sending to chat?
1664459885

Edited 1664460009
Can I invite you?&nbsp; EDIT : one of the entry in my Crit-Contondant table is named :&nbsp; [Bouton]( !&amp;{template:default}{{name=Table des Blessures Mineures}}{{Effect=[[1t[Blessure-Mineure]]]}} {&amp;simple}) And i'm sending a macro :&nbsp;&amp;{template:default} {{name=Critique}} {{Effet=[[1t[Crit-?{Type de dégats|Contondant|Perforant|Tranchant|Acide}]]]}} calling for example the "Crit-Contondant" table
1664461526
timmaugh
Pro
API Scripter
I have to run an errand... but is this the game you already invited me to? If so I'll take a look when I get back if you can't get this. In the meantime, I think the {&amp;simple} IN the table is borking the button syntax. Try this... 1) Copy the executable portion of the table entry to its own macro (or ability)... that is, copy this part: !&amp;{template:default}{{name=Table des Blessures Mineures}}{{Effect=[[1t[Blessure-Mineure]]]}} {&amp;simple} To a macro or ability and give it a name. I'll use a macro and call mine: BlessuresMineures 2) Change the entry on your table to now refer to this macro (or ability). For me, using a macro, that would be: [Bouton](!&amp;#13;#BlessuresMineures) 3) Put the bang and the {&amp;simple} tag on your initial macro language: !&amp;{template:default} {{name=Critique}} {{Effet=[[1t[Crit-?{Type de dégats|Contondant|Perforant|Tranchant|Acide}]]]}}{&amp;simple} That basic setup works for me in my test game (names and things obviously changed, so a typo could still creep in, I suppose). If it doesn't work, I'll pop in after I'm back.
i have to re-invite you as i expelled you.&nbsp; i'll pm you the link and we can do the things in parallel if you want when you're online
I tried you configuration and it works perfectly.&nbsp; Let me know if you wanna try another configuration maybe more straight forward calling a api instead of calling a secondary macro. BUt on y side i can deal with that easily.
1664467438
timmaugh
Pro
API Scripter
OK, if it's working, we can let it be for now. Keep the invite open for a day or 2 in case you have another issue. The original formations I posted (for ability, macros, or api buttons) all DO work... it's just the fact that your secondary text (the command your button would execute if clicked) *also* included a {&amp;simple}, so that was taking effect when you tried to send the button to the chat interface. I can envision a way to get around that, but it will take me patching (and testing) ZeroFrame. For now, if your button would launch a roll template, you'll need to put that roll template in a secondary ability or macro. Incidentally, AFAIK, this is the way it is, already, if you want to use a roll template in a button. You have to mask the roll template language behind an ability retrieval or macro retrieval, and have the button "go get it"... so I don't think there's going to be any getting around that particular requirement.