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

Rollable table question.

I have a few rollable table that need to be called from a query. That's my first issue but I think I can deal with that.  My second issue is that in some of the entries text I'd like to insert a button to call another table... Is that easily doable and if yes how would that work syntax wise?  I know that recursive table is probably on option but not sure I have to go through all that.  Can a button call a table? Or does it have to call a macro calling the table?  Thx for your help
1664391834
GiGs
Pro
Sheet Author
API Scripter
Calling a table from a query is easy - tables are just like attrributes or abilities, with slightly different syntax (since you didn't like any rollable table names, see the wiki). You can also call tables from a button. The button itself usually calls a macro which has the table call inside it. Recusive Tables (if youre referring to the script) requires a Pro subscription.
1664395983

Edited 1664396874
Thank you for your answer GIGs i have access to pro as i'm doing all tables and macro and script stuff for my dm (pro) So basically if i call a macro like that :  &{template:default} {{name=Fumble}} {{Effet=[[1t[Fumble]]]}} i could modifiy it to have a query in it as such ? &{template:default} {{name=Critique}} {{Effet=[[1t[Crit-?{Type de dégats|Contondant}]]]}} assuming that my table is  called Crit-Contondant ? (of course there will be more options in the query, but as a try, i only input one for the moment. Now for the button in the name of the entry calling the other table ? can a button directly call a table or does it have to call a macro that will call that table ? if i use recursive table, should this construction be correct ? text text text [button](!rt [[ 1t[Blessure-Mineure] ]]) or do i need to make the !
# substitution thing ? EDIT : 1-I tried the construction above to insert a button but apparently the text of an entry cannot accept a button. Maybe i'm wrong but this construction doesn't work for me anyway 2-I also tried to copy this command :  [button](!rt [[ 1t[Blessure-Mineure] ]]) in the chat and i have the output showing twice in a row. i don't know why... 3- if I want to have the same kind of template for the second call (the one using RT) what should be the syntax. I checked on the wiki but didn't really understand how to do that.... Thanks for your help
1664400717
GiGs
Pro
Sheet Author
API Scripter
For your question 1, that should work - I'd look at your table naming. This works: &{template:default} {{name=Critique}} {{Effet=[[1t[Crit-?{Type de dégats|1|2|3}]]]}} with tables named Crit-1, Crit-2, and Crit-3. For question 2, buttons are only good for calling macros (or abilities), and you'll need to create a macro with the table call inside it. There have been some solutions for running buttons directly, but wgile I havent used them much, I don't think they are for cases like these. I don't understand your third question. But in general, if you want to have buttons, you need to create macros for them.
Apparently it doesn't work in the name of a value of a table . In my table i create an object called  [Blessures Légères](!
#Table-Blessure-Mineure) and it shows the text plain just like above, with no button...
1664409971
GiGs
Pro
Sheet Author
API Scripter
Whenever you see the plain text as you describe, that's a sign that roll20 thinks the entry doesn't exist - so there is something wrong with your syntax. have you tried this: [Blessures Légères](!
Table-Blessure-Mineure)
the construction i posted works perfectly when posted directly in the chat. But it doesn't work when inserted in the name of a table object.
1664455344
timmaugh
Pro
API Scripter
I posted a way to get buttons in a table in this post ... so for those who find this thread, you might find a solution there.