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] ScriptCards - My "Spiritual Successor" to PowerCards

That did not seem to do it This is the Error I am getting: Errors No target characters. You need to supply one of --all, --allgm, --sel, --allplayers, --charid, or --name Just for ref: I am using basic fantasy This is the code after the changes: !scriptcard {{ --hidecard | 1 --:ArmorClass | --=ArmorClass|?{AC|0} --+ debug|[$ArmorClass] --@setattr|_sel_ArmorClass|[$ArmorClass] }}
cyberlinxz, If you use !setattr in the chat window does it function as you expect? Are you able to set the AC on your selected character sheets with !setattr --sel --ArmorClass|15  ? Does that work for you? If not, is there a ChatSetAttr command that you have been using to set AC that is working for you?
1661478063

Edited 1661478246
Joshua N. said: cyberlinxz, If you use !setattr in the chat window does it function as you expect? Are you able to set the AC on your selected character sheets with !setattr --sel --ArmorClass|15  ? Does that work for you? If not, is there a ChatSetAttr command that you have been using to set AC that is working for you? It does work if I do it in chat just cant get it to work in scriptcard it seems to be that due to scriptcard is using the _ for api's it is seeing as the --sel or --charid
1661481397

Edited 1661487086
Got it to work need Selcetmanerger to get it to work Thanks for the help
Hello Kurt, love your script! I have created this magic items table. I'm using scriptcards buttons that links to a handout in the compendium. How do I make the button text fit within the tableborders? This was not a problem before upgrading to Scriptcards v. 2.0. Before it would automatically adjust the text size. Thank you for your help and script.
Off-hand, I don't know how to solve that issue, but I love your shop menu! Could you share the code? Mads said: Hello Kurt, love your script! I have created this magic items table. I'm using scriptcards buttons that links to a handout in the compendium. How do I make the button text fit within the tableborders? This was not a problem before upgrading to Scriptcards v. 2.0. Before it would automatically adjust the text size. Thank you for your help and script.
I'm not a good scripter, but here you go. You will have to do some work with uploading your own item pictures to roll20. And I'm sorry for the length of the script :) !script {{ --#reentrant|MagicStore&nbsp; --/For this first procedure I created two rollable tables of magic items (inspired by XGE). The first&nbsp; [T#Magic-Items] is &nbsp;a table of minor magic items. The second&nbsp; [T#Magic-Items-Major] is a table of major magic items. Also I didn't want the same item to show up twice, which is the reason for the long procedure underneath.&nbsp; --=MagicItems1|[T#Magic-Items] --:RestartMaIt1| --=MagicItems2|[T#Magic-Items] --?"[$MagicItems1.tableEntryText]" -inc "[$MagicItems2.tableEntryText]"|RestartMaIt1 --:RestartMaIt2| --=MagicItems3|[T#Magic-Items] --?"[$MagicItems3.tableEntryText]" -inc "[$MagicItems2.tableEntryText]" -or&nbsp; "[$MagicItems3.tableEntryText]" -inc "[$MagicItems1.tableEntryText]" |RestartMaIt2&nbsp; --:RestartMaIt3| --=MagicItems4|[T#Magic-Items]&nbsp; --?"[$MagicItems4.tableEntryText]" -inc "[$MagicItems3.tableEntryText]" -or&nbsp; "[$MagicItems4.tableEntryText]" -inc "[$MagicItems2.tableEntryText]" -or&nbsp; "[$MagicItems4.tableEntryText]" -inc "[$MagicItems1.tableEntryText]" |RestartMaIt3&nbsp; &nbsp; --:RestartMaIt4| --=MagicItems5|[T#Magic-Items]&nbsp; &nbsp; --?"[$MagicItems5.tableEntryText]" -inc "[$MagicItems4.tableEntryText]" -or&nbsp; "[$MagicItems5.tableEntryText]" -inc "[$MagicItems3.tableEntryText]" -or&nbsp; "[$MagicItems5.tableEntryText]" -inc "[$MagicItems2.tableEntryText]" -or&nbsp; "[$MagicItems5.tableEntryText]" -inc "[$MagicItems1.tableEntryText]" |RestartMaIt4 --:RestartMaIt5| --=MagicItems6|[T#Magic-Items] --?"[$MagicItems6.tableEntryText]" -inc "[$MagicItems5.tableEntryText]" -or&nbsp; "[$MagicItems6.tableEntryText]" -inc "[$MagicItems4.tableEntryText]" -or&nbsp; "[$MagicItems6.tableEntryText]" -inc "[$MagicItems3.tableEntryText]" -or&nbsp; "[$MagicItems6.tableEntryText]" -inc "[$MagicItems2.tableEntryText]" -or&nbsp; "[$MagicItems6.tableEntryText]" -inc "[$MagicItems1.tableEntryText]" |RestartMaIt5 --=MagicItemsMajor|[T#Magic-Items-Major] --/Setup the compendium links for the magic items buttons --&amp;MagicItem_Link|<a href="https://app.roll20.net/compendium/dnd5e/" rel="nofollow">https://app.roll20.net/compendium/dnd5e/</a> Potion of Healing --&amp;MagicItem_Link1|<a href="https://app.roll20.net/compendium/dnd5e/" rel="nofollow">https://app.roll20.net/compendium/dnd5e/</a> [$MagicItems1.tableEntryText] --&amp;MagicItem_Link2|<a href="https://app.roll20.net/compendium/dnd5e/" rel="nofollow">https://app.roll20.net/compendium/dnd5e/</a> [$MagicItems2.tableEntryText] --&amp;MagicItem_Link3|<a href="https://app.roll20.net/compendium/dnd5e/" rel="nofollow">https://app.roll20.net/compendium/dnd5e/</a> [$MagicItems3.tableEntryText] --&amp;MagicItem_Link4|<a href="https://app.roll20.net/compendium/dnd5e/" rel="nofollow">https://app.roll20.net/compendium/dnd5e/</a> [$MagicItems4.tableEntryText] --&amp;MagicItem_Link5|<a href="https://app.roll20.net/compendium/dnd5e/" rel="nofollow">https://app.roll20.net/compendium/dnd5e/</a> [$MagicItems5.tableEntryText] --&amp;MagicItem_Link6|<a href="https://app.roll20.net/compendium/dnd5e/" rel="nofollow">https://app.roll20.net/compendium/dnd5e/</a> [$MagicItems6.tableEntryText] --&amp;MagicItem_LinkMajor|<a href="https://app.roll20.net/compendium/dnd5e/" rel="nofollow">https://app.roll20.net/compendium/dnd5e/</a> [$MagicItemsMajor.tableEntryText] --/The card output --:Return| --+|[img]<a href="http://media.wizards.com/2014/images/dnd/articles/DMG_MagicItems.jpg[/img]" rel="nofollow">http://media.wizards.com/2014/images/dnd/articles/DMG_MagicItems.jpg[/img]</a> --#title|Magic Store --#titlecardbackground|#993333 --#bodyFontSize|11px&nbsp; --#buttonBorderColor|#d6d4d5 --#oddRowBackground|#d6d4d5 --#evenRowBackground|#d6d4d5 --#buttonBackground|#d6d4d5 --#buttonTextColor|#000000 --#evenRowFontColor|#000000 --#oddRowFontColor|#000000&nbsp; &nbsp; --#tableShadow|5px 3px 3px 0px #121212&nbsp; &nbsp; --+|[t border=2 width=100%][tr][td][rbutton]Orb::Orb[/rbutton][/td][td][rbutton]Wand::Wand[/rbutton][/td][td][rbutton]Spring of Mistletoe::SpringOfMistletoe[/rbutton][/td][td][rbutton]Rod::Rod[/rbutton][/td][/tr][tr][td][rbutton]Yew Wand::YewWand[/rbutton][/td][td][rbutton]Crystal::Crystal[/rbutton][/td][td][rbutton]Holy Emblem::HolyEmblem[/rbutton][/td][td][rbutton]Holy Amulet::HolyAmulet[/rbutton][/td][/tr][tr][td][rbutton]Component Pouch::ComponentPouch[/rbutton][/td][td][rbutton]Scroll Case::ScrollCase[/rbutton][/td][td][rbutton]Spellbook::Spellbook[/rbutton][/td][td][rbutton]Ink Pen::InkPen[/rbutton][td][/tr][tr][td][rbutton]Ink Vial::InkVial[/rbutton][/td][td][rbutton]Parchment::Parchment[/rbutton][/td][td][rbutton]Book::Book[/rbutton][/td][td][rbutton]Alchemist Fire::AlchemistFire[/rbutton][/td][/tr][tr][td][button]Potion of Healing::[&amp;MagicItem_Link][/button][/td][td][button][$MagicItems1.tableEntryText]::[&amp;MagicItem_Link1][/button][/td][td][button][$MagicItems2.tableEntryText]::[&amp;MagicItem_Link2][/button][/td][td][button][$MagicItems3.tableEntryText]::[&amp;MagicItem_Link3][/button][/td][/tr][tr][td][button][$MagicItems4.tableEntryText]::[&amp;MagicItem_Link4][/button][/td][td][button][$MagicItems5.tableEntryText]::[&amp;MagicItem_Link5][/button][/td][td][button][$MagicItems6.tableEntryText]::[&amp;MagicItem_Link6][/button][/td][td][button][$MagicItemsMajor.tableEntryText]::[&amp;MagicItem_LinkMajor][/button][/td][/tr] --+[c]Magic Item Prices[/c]|[t border=2 width=100%][tr][td]Common[/td][td]50-100 GP[/td][/tr][tr][td]Uncommon[/td][td]101-500 GP[/td][/tr][tr][td]Rare[/td][td]501-5000 GP[/td][/tr][tr][td]Very Rare[/td][td]5001-50000 GP[/td][/tr][tr][td]Legendary[/td][td]50001+ GP[/td][/tr]&nbsp; --x| --/I uploaded images with pictures of the items and prices. Use the following link to see the item cards that I bought on dmsguild:&nbsp;<a href="https://i.pinimg.com/originals/ab/5a/90/ab5a9066248282e010d2758bcc231b53.jpg" rel="nofollow">https://i.pinimg.com/originals/ab/5a/90/ab5a9066248282e010d2758bcc231b53.jpg</a> --:Orb|&nbsp; --+|[img]<a href="https://s3.amazonaws.com/files.d20.io/images/174674041/ruwKJSGssKXhmB2fP86dNQ/original.jpg?16041805835[/img]" rel="nofollow">https://s3.amazonaws.com/files.d20.io/images/174674041/ruwKJSGssKXhmB2fP86dNQ/original.jpg?16041805835[/img]</a> --+|&nbsp; [c][rbutton]Return::Return[/rbutton][/c] --x| --:Wand|&nbsp; --+|[img]<a href="https://s3.amazonaws.com/files.d20.io/images/174674046/OTWJXnb0_FKSbjE4hyg8lg/original.jpg?16041805845[/img]" rel="nofollow">https://s3.amazonaws.com/files.d20.io/images/174674046/OTWJXnb0_FKSbjE4hyg8lg/original.jpg?16041805845[/img]</a> --+|&nbsp; [c][rbutton]Return::Return[/rbutton][/c] --x| --:SpringOfMistletoe|&nbsp; --+|[img]<a href="https://s3.amazonaws.com/files.d20.io/images/174674045/l6iuavY2E_XNWlwAMpXlGA/original.jpg?16041805845[/img]" rel="nofollow">https://s3.amazonaws.com/files.d20.io/images/174674045/l6iuavY2E_XNWlwAMpXlGA/original.jpg?16041805845[/img]</a> --+|&nbsp; [c][rbutton]Return::Return[/rbutton][/c] --x| --:Rod|&nbsp; --+|[img]<a href="https://s3.amazonaws.com/files.d20.io/images/174674043/4dfm_KGF9MFwQTchaO0CAg/original.jpg?16041805845[/img]" rel="nofollow">https://s3.amazonaws.com/files.d20.io/images/174674043/4dfm_KGF9MFwQTchaO0CAg/original.jpg?16041805845[/img]</a> --+|&nbsp; [c][rbutton]Return::Return[/rbutton][/c] --x| --:YewWand|&nbsp; --+|[img]<a href="https://s3.amazonaws.com/files.d20.io/images/174674044/RyISabH0SVmpcfp-z0xy-Q/original.jpg?16041805845[/img]" rel="nofollow">https://s3.amazonaws.com/files.d20.io/images/174674044/RyISabH0SVmpcfp-z0xy-Q/original.jpg?16041805845[/img]</a> --+|&nbsp; [c][rbutton]Return::Return[/rbutton][/c] --x| --:Crystal|&nbsp; --+|[img]<a href="https://s3.amazonaws.com/files.d20.io/images/174674040/1w_12QCmNaZJZa0fqcqUiQ/original.jpg?16041805835[/img]" rel="nofollow">https://s3.amazonaws.com/files.d20.io/images/174674040/1w_12QCmNaZJZa0fqcqUiQ/original.jpg?16041805835[/img]</a> --+|&nbsp; [c][rbutton]Return::Return[/rbutton][/c] --x| --:ComponentPouch|&nbsp; --+|[img]<a href="https://s3.amazonaws.com/files.d20.io/images/174674021/8PsgO4QhoQrxTtjoHdottA/original.jpg?16041805835[/img]" rel="nofollow">https://s3.amazonaws.com/files.d20.io/images/174674021/8PsgO4QhoQrxTtjoHdottA/original.jpg?16041805835[/img]</a> --+|&nbsp; [c][rbutton]Return::Return[/rbutton][/c] --x| --:ScrollCase|&nbsp; --+|[img]<a href="https://s3.amazonaws.com/files.d20.io/images/174674002/BJizJYLcNYyfmaiw9goGaw/original.jpg?16041805825[/img]" rel="nofollow">https://s3.amazonaws.com/files.d20.io/images/174674002/BJizJYLcNYyfmaiw9goGaw/original.jpg?16041805825[/img]</a> --+|&nbsp; [c][rbutton]Return::Return[/rbutton][/c] --x| --:Spellbook|&nbsp; &nbsp; --+|[img]<a href="https://s3.amazonaws.com/files.d20.io/images/174673999/JGARgcb3WASfjFTsLL48VA/original.jpg?16041805825[/img]" rel="nofollow">https://s3.amazonaws.com/files.d20.io/images/174673999/JGARgcb3WASfjFTsLL48VA/original.jpg?16041805825[/img]</a> --+|&nbsp; [c][rbutton]Return::Return[/rbutton][/c] --x| --:HolyEmblem|&nbsp; &nbsp; --+|[img]<a href="https://s3.amazonaws.com/files.d20.io/images/174674013/FP1hWLZWqrBmogWV75f_bw/original.jpg?16041805835[/img]" rel="nofollow">https://s3.amazonaws.com/files.d20.io/images/174674013/FP1hWLZWqrBmogWV75f_bw/original.jpg?16041805835[/img]</a> --+|&nbsp; [c][rbutton]Return::Return[/rbutton][/c] --x| --:HolyAmulet|&nbsp; --+|[img]<a href="https://s3.amazonaws.com/files.d20.io/images/174673996/6C7jqnlVc0qPiYGCGKoocA/original.jpg?16041805825[/img]" rel="nofollow">https://s3.amazonaws.com/files.d20.io/images/174673996/6C7jqnlVc0qPiYGCGKoocA/original.jpg?16041805825[/img]</a> --+|&nbsp; [c][rbutton]Return::Return[/rbutton][/c] --x|&nbsp; --:InkPen|&nbsp; --+|[img]<a href="https://s3.amazonaws.com/files.d20.io/images/174673966/7SMejsppocrn8a5DEEs06w/original.jpg?16041805825[/img]" rel="nofollow">https://s3.amazonaws.com/files.d20.io/images/174673966/7SMejsppocrn8a5DEEs06w/original.jpg?16041805825[/img]</a> --+|&nbsp; [c][rbutton]Return::Return[/rbutton][/c] --x|&nbsp; --:InkVial| --+|[img]<a href="https://s3.amazonaws.com/files.d20.io/images/174673965/mGkz2-rMeq_ry4koNY9B8A/original.jpg?16041805825[/img]" rel="nofollow">https://s3.amazonaws.com/files.d20.io/images/174673965/mGkz2-rMeq_ry4koNY9B8A/original.jpg?16041805825[/img]</a> --+|&nbsp; [c][rbutton]Return::Return[/rbutton][/c] --x|&nbsp; --:Parchment|&nbsp; --+|[img]<a href="https://s3.amazonaws.com/files.d20.io/images/174673964/5SgTjzBj_0Ky9W6TP0yJyg/original.jpg?16041805825[/img]" rel="nofollow">https://s3.amazonaws.com/files.d20.io/images/174673964/5SgTjzBj_0Ky9W6TP0yJyg/original.jpg?16041805825[/img]</a> --+|&nbsp; [c][rbutton]Return::Return[/rbutton][/c] --x|&nbsp; --:Book| --+|[img]<a href="https://s3.amazonaws.com/files.d20.io/images/174673962/_F_8CspOjFYuaPnPFETpjw/original.jpg?16041805815[/img]" rel="nofollow">https://s3.amazonaws.com/files.d20.io/images/174673962/_F_8CspOjFYuaPnPFETpjw/original.jpg?16041805815[/img]</a> --+|&nbsp; [c][rbutton]Return::Return[/rbutton][/c] --x|&nbsp; --:AlchemistFire|&nbsp; &nbsp; --+|[img]<a href="https://s3.amazonaws.com/files.d20.io/images/174056575/HqKFf89XIuDk2pkP_LLZ-g/original.jpg?16039912635[/img]" rel="nofollow">https://s3.amazonaws.com/files.d20.io/images/174056575/HqKFf89XIuDk2pkP_LLZ-g/original.jpg?16039912635[/img]</a> --+|&nbsp; [c][rbutton]Return::Return[/rbutton][/c] --x| }}
1661611533

Edited 1661611582
Kurt J.
Pro
API Scripter
cyberlinxz said: Got it to work need Selcetmanerger to get it to work Thanks for the help Just for clarity, you don't actually need SelectManager or chatsetattr to do this. ScriptCards itself can modify character attributes: !scriptcard {{ --#hidecard|1 --#sourcetoken|@{selected|token_id} --:ArmorClass| --=ArmorClass|?{AC|0} --!a:[*s:character_id]|ArmorClass:[$ArmorClass] }}
1661611857
Kurt J.
Pro
API Scripter
Mads said: Hello Kurt, love your script! I have created this magic items table. I'm using scriptcards buttons that links to a handout in the compendium. How do I make the button text fit within the tableborders? This was not a problem before upgrading to Scriptcards v. 2.0. Before it would automatically adjust the text size. Thank you for your help and script. There were several updates to buttons around the 2.0 timeframe. Most of these were related to setting button colors inline, but one was buttonpadding, which might be what you are looking for. I'm not great with CSS and layouts, but I try to make the settings available for the folks who are. I'll experiment, but this might be a great question for someone better versed in layouts than I am.
Setting&nbsp;buttonPadding to 0,5px did the job! Thank you Kurt!
1663252865

Edited 1663253560
Hi folks, I've been messing around with ScriptCards and have run into the age old question regarding queries. I'm trying to reduce the number of query inputs my players have to answer for an action, spell, or effect to take place. I thought I'd big brained a way to make a single query into multiple answers, but it isn't working. I'm hoping someone here can tell me if this is even possible with ScriptCards and if that is the case, point me towards my error. If its not the case then I hope there's another script that'll do the trick. My code for reference: !scriptcards {{ +++dnd5elib+++ --|\ Design and necessary variables | req. updates: rightsub, sourceToken --=Cast|?{Cast at what level?|3|4|5|6|7|8|9} --?[$Cast] eq 3|Cast3 --?[$Cast] eq 4|Cast4 --?[$Cast] eq 5|Cast5 --?[$Cast] eq 6|Cast6 --?[$Cast] eq 7|Cast7 --?[$Cast] eq 8|Cast8 --?[$Cast] eq 9|Cast9 --:Cast3| --=|3rd Level --:Cast4| --=|4th Level --:Cast5| --=|5th Level --:Cast6| --=|6th Level --:Cast7| --=|7th Level --:Cast8| --=|8th Level --:Cast9| --=|9th Level --#title|Minute Meteors --#titlecardbackground|#6aa84f --#leftsub|The spell was cast at [$Cast] --#sourceToken|-Mw-2yNlJIP__ulp8uwd --#emoteState|hide --|\ Outcome --=Mana|?{Cast at what level?} --?[$Cast] eq 3|Mana3 --?[$Cast] eq 4|Mana4 --?[$Cast] eq 5|Mana5 --?[$Cast] eq 6|Mana6 --?[$Cast] eq 7|Mana7 --?[$Cast] eq 8|Mana8 --?[$Cast] eq 9|Mana9 --:Mana3| --=|5 --:Mana4| --=|6 --:Mana5| --=|7 --:Mana6| --=|9 --:Mana7| --=|10 --:Mana8| --=|11 --:Mana9| --=|13 --+|[c]Albin spent [$Mana] spell points on the cast[/c] --=Meteor|?{Cast at what level?} --?[$Cast] eq 3|Meteor3 --?[$Cast] eq 4|Meteor4 --?[$Cast] eq 5|Meteor5 --?[$Cast] eq 6|Meteor6 --?[$Cast] eq 7|Meteor7 --?[$Cast] eq 8|Meteor8 --?[$Cast] eq 9|Meteor9 --:Meteor3| --=|6 --:Meteor4| --=|8 --:Meteor5| --=|10 --:Meteor6| --=|12 --:Meteor7| --=|14 --:Meteor8| --=|16 --:Meteor9| --=|18 --+|[c][$Meteor] Minute Meteors was conjured[/c] --|\ Special things - this might need to be moved around, depending on the special thing --@token-mod| _ids -Mw-2yNlJIP__ulp8uwd _set statusmarkers|!Concentration --@token-mod| _ids -Mw-2yNlJIP__ulp8uwd _set statusmarkers|Concentration:?[$Meteor] --@act -1 100 _Minute Meteors _after --@modbattr| _silent _charid -Mw-2yNlJIP__ulp8uwd _other_resource|-[$Mana] !!! }}&nbsp; Edit: At the moment, it prints the following text to chat, repeatedly using 3 instead of the variable outputs.
1663254735
David M.
Pro
API Scripter
I think you can greatly simplify your logic with a case statement and a roll formula. Something like the following --/|Query Spell Slot --=Cast|?{Cast at what level?|3|4|5|6|7|8|9} --/|Lookup Mana Cost --C[$Cast.Raw]|3:=Mana;5|4:=Mana;6|5:=Mana;7|6:=Mana;9|7:=Mana;10|8:=Mana;11|9:=Mana;13 --/|Calc Number of Meteors --=Meteor|2*?{Cast at what level?} --/|Print --+|[c]Albin spent [$Mana] spell points on the cast[/c] --+|[c][$Meteor] Minute Meteors were conjured[/c]
1663256319

Edited 1663256361
David M. said: I think you can greatly simplify your logic with a case statement and a roll formula. Something like the following --/|Query Spell Slot --=Cast|?{Cast at what level?|3|4|5|6|7|8|9} --/|Lookup Mana Cost --C[$Cast.Raw]|3:=Mana;5|4:=Mana;6|5:=Mana;7|6:=Mana;9|7:=Mana;10|8:=Mana;11|9:=Mana;13 --/|Calc Number of Meteors --=Meteor|2*?{Cast at what level?} --/|Print --+|[c]Albin spent [$Mana] spell points on the cast[/c] --+|[c][$Meteor] Minute Meteors were conjured[/c] That certainly is a lot less code! It did the trick. I tried to add another Lookup to set the level for text more similar to the PHB, but it prints " 0 " instead of the text I want it to print. Any chance you can tell me what I'm missing here? Code: --/|Lookup Spell Level --C[$Cast.Raw]|3:=Level;3rd Level|4:=Level;4th Level|5:=Level;5th Level|6:=Level;6th Level|7:=Level;7th Level|8:=Level;8th Level|9:=Level;9th Level (later in the script) &nbsp;&nbsp;&nbsp;&nbsp;--#leftsub|The spell was cast at [$Level] Also, thank you for the help!
1663257366

Edited 1663257390
David M.
Pro
API Scripter
You are trying to assign a string data type to a roll (numeric) variable. "Level" should be a string variable instead, using " &amp; Level" --C[$Cast.Raw]|3: &amp; Level;3rd Level|4: &amp; Level;4th Level|5: &amp; Level;5th Level|6: &amp; Level;6th Level|7: &amp; Level;7th Level|8: &amp; Level;8th Level|9: &amp; Level;9th Level --+|The spell was cast at [ &amp; Level]
1663257607

Edited 1663258084
Gotcha! Thank you so much. Still trying to get an understanding for all this code stuff, so I really appreciate the assistance. Figuring these things out on my own have proven quite the impossible challenge.
1663259966
Kurt J.
Pro
API Scripter
Also, remember that no matter what you do as far as conditionals every query in your macro will be asked of the player prior to ScriptCards getting to process anything since these are done by the chat server. The only way around this is to use --i or [rbuttons] to let the user click to prompt for additional input, which is not always what you'll want to do.
Another issue from your original script: --=Cast|?{Cast at what level?|3|4|5|6|7|8|9} --?[$Cast] eq 3|Cast3 --?[$Cast] eq 4|Cast4 --?[$Cast] eq 5|Cast5 --?[$Cast] eq 6|Cast6 --?[$Cast] eq 7|Cast7 --?[$Cast] eq 8|Cast8 --?[$Cast] eq 9|Cast9 --:Cast3| --=|3rd Level The last part doesn't do anything.&nbsp; Your output references the Cast roll variable, but that variable was only defined at the beginning. It looks like you're defining three different variables using the query input, and then attempting to redefine each variable based on that starting query input, but none of your subsequent variable assignments do anything because they don't include the variable name. Also, your script doesn't prevent reassigning the variable to the last option--i.e., after each step, there's no command that says "skip the rest of the section." David's solution solves these problems also, but it's worth being aware of them for a future use case as well.
I've started using --X| a lot more after having learned as much as possible over the last day. It's a lot of new stuff to learn, but I feel like I'm beginning to get somewhat of a beginner understanding of how it all fits together. Though I have no doubt I'll be thoroughly confused and in need of assistance again at some point. Thanks again for the pointers though. Every bit helps :)
This is prollly a basic question, but I cannot seem to get script cards to pass tokens to the turn order.&nbsp; I've tried several different things, and looked on the wiki as well as searched this thread.&nbsp; There a bunch of interesting thins that I see people have done with turn order manipulation.&nbsp; But I've not been able to find the basic... "Add to Turn Order" The script cards code I'm using is: !scriptcards {{ --/| === ScriptCard Layout for Initiative Rolls === |\-- --/| === Version 0.1a&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; === |\-- --/| === Date: 08/14/2022&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; === |\-- --/| Local Variables --|\ --#sourceToken|@{selected|token_id} --/| ===== Roll Queries / Information Lookup =========== |\ --&amp;initRollMod|?{Modifier|0} --/| ===== Strings =========== |\ --&amp;initType|Standard --&amp;initAttrAbbr|Agi --/| ===== Numbers =========== |\ --=initAttrMod|[[floor(@{selected|agimod})]] --=initRoll|1d10+[[floor(@{selected|agimod})]]+[&amp;initRollMod] &amp;{tracker} --/| TITLE and FORMATTING --#title|Initiative :: [&amp;initType] --#titlecardbackground|#993333 --#leftsub|1d10 --#rightsub|Agi Mod ([$initAttrMod]) --#emoteText|[*S:t-name] rolls Initiative --/| === WEAPON DETAILS === --+|[c][t border=2 width=95% align=center][tr][td][b]Initiative&nbsp; [/b][/td][/tr][tr][td][$initRoll]&nbsp; &nbsp;[/td][/tr][/t][/c] --+|[c] ● Skill Details ● [/c] }} And well, it doesnt work.&nbsp; Any help would be appreciated.&nbsp;
1663511715
Kurt J.
Pro
API Scripter
Toby said: This is prollly a basic question, but I cannot seem to get script cards to pass tokens to the turn order.&nbsp; I've tried several different things, and looked on the wiki as well as searched this thread.&nbsp; There a bunch of interesting thins that I see people have done with turn order manipulation.&nbsp; But I've not been able to find the basic... "Add to Turn Order" The script cards code I'm using is: !scriptcards {{ --/| === ScriptCard Layout for Initiative Rolls === |\-- --/| === Version 0.1a&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; === |\-- --/| === Date: 08/14/2022&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; === |\-- --/| Local Variables --|\ --#sourceToken|@{selected|token_id} --/| ===== Roll Queries / Information Lookup =========== |\ --&amp;initRollMod|?{Modifier|0} --/| ===== Strings =========== |\ --&amp;initType|Standard --&amp;initAttrAbbr|Agi --/| ===== Numbers =========== |\ --=initAttrMod|[[floor(@{selected|agimod})]] --=initRoll|1d10+[[floor(@{selected|agimod})]]+[&amp;initRollMod] &amp;{tracker} --/| TITLE and FORMATTING --#title|Initiative :: [&amp;initType] --#titlecardbackground|#993333 --#leftsub|1d10 --#rightsub|Agi Mod ([$initAttrMod]) --#emoteText|[*S:t-name] rolls Initiative --/| === WEAPON DETAILS === --+|[c][t border=2 width=95% align=center][tr][td][b]Initiative&nbsp; [/b][/td][/tr][tr][td][$initRoll]&nbsp; &nbsp;[/td][/tr][/t][/c] --+|[c] ● Skill Details ● [/c] }} And well, it doesnt work.&nbsp; Any help would be appreciated.&nbsp; ScriptCard doesn't use the Chat server/Quantum Roll server for dice rolls, so the {&amp;tracker} construct won't do anything. Below is how I would implement what you have above. I removed the in-line rolls that used the quantum roll server since they only come in as the final value to ScriptCards. This assumes the character has an attribute called "agimod" and that an initiative roll is 1d10 + agimod + querymodifier. It will add the result to the initiative tracker, replacing any existing value for the token in question. If you wanted to add the token again if there was already one there, change replacetoken to addtoken. !scriptcards {{ --/| === ScriptCard Layout for Initiative Rolls === |\-- --/| === Version 0.1a === |\-- --/| === Date: 08/14/2022 === |\-- --/| Set source token (for avatar image and *S references) --#sourceToken|@{selected|token_id} --/| ===== Roll Queries / Information Lookup =========== --&amp;initRollMod|?{Modifier|0} --/| ===== Strings =========== --&amp;initType|Standard --/| ===== Numbers =========== --=initAttrMod|[*S:agimod] {FLOOR} --=initRoll|1d10 + [$initAttrMod.Raw] [AGI] + [&amp;initRollMod] [MOD] --/| Add to Initiative Tracker (replace if already there) --~|turnoder;replacetoken;[*S:t-id];[$initRoll.Raw] --/| TITLE and FORMATTING --#title|Initiative :: [&amp;initType] --#titlecardbackground|#993333 --#leftsub|1d10 --#rightsub|Agi Mod ([$initAttrMod]) --#emoteText|[*S:t-name] rolls Initiative --/| === WEAPON DETAILS === --+|[c][t border=2 width=95% align=center][tr][td][b]Initiative [/b][/td][/tr][tr][td][$initRoll] [/td][/tr][/t][/c] --+|[c] ● Skill Details ● [/c] }}
Your example doesn't add to the turn order, instead I get: "Array reference error : [@{Ag}/10]" in the Mod Output Console.
1663545750
Kurt J.
Pro
API Scripter
Toby said: Your example doesn't add to the turn order, instead I get: "Array reference error : [@{Ag}/10]" in the Mod Output Console. Then the character sheet is using a calculation to get the agimod value instead of storing a raw value, and apparently is enclosing that calculation in square brackets for some reason. Try changing the line that gets the adimod to: --=initAttrMod|[*S:Agi] / 10 {FLOOR}
That doesn't work either, but unlike previously, it gives no console nor mod output console messages.&nbsp; Is there any other issues that may cause it to not function? Also, perhaps you could explain what the following code does... --/| Add to Initiative Tracker (replace if already there) &nbsp; &nbsp; --~|turnoder;replacetoken;[*S:t-id];[$initRoll] --~| is an array function yes?&nbsp; replacetoken means that it will add to the turn order and replace any previous entry (use addtoken) to prevent replacing...&nbsp; the next part is less understandable..&nbsp; [*S:t-id].&nbsp; It basically uses the selected token and searches for the attribute named "t-id" except I dont have any such attribute on my character sheet.&nbsp; Could this be a problem?&nbsp; I assume its looking for a token id?&nbsp; Is there something I can manually enter here to test if this is an issue? And finally the last parameter I assume is the numeric initiative order.&nbsp; Is this only a fixed number?&nbsp; can it accept increments or decrements?
1663557547
Andrew R.
Pro
Sheet Author
Is&nbsp; turnoder a typo?&nbsp;
OMG... how did I not notice that... been working with this trial and error for... hours..&nbsp; Yeah.. that fixed it..&nbsp; Though my previous questions about how the code works still stands.&nbsp;&nbsp; Thank you very much.. I feel like an idiot.
1663558837
Andrew R.
Pro
Sheet Author
You’re most welcome!
1663586435

Edited 1663586460
David M.
Pro
API Scripter
Toby said: ...&nbsp; the next part is less understandable..&nbsp; [*S:t-id].&nbsp; It basically uses the selected token and searches for the attribute named "t-id" except I dont have any such attribute on my character sheet.&nbsp; Could this be a problem?&nbsp; I assume its looking for a token id?&nbsp; Is there something I can manually enter here to test if this is an issue? And finally the last parameter I assume is the numeric initiative order.&nbsp; Is this only a fixed number?&nbsp; can it accept increments or decrements? Regarding [*&lt;id&gt;:&lt;attribute/property&gt;] syntax -- In this case "t-id" is referring to the token_id (i.e. same as @{selected|token_id}). The "t-" prefix is telling the scriptcards parser to retrieve a token property. Without the prefix it will attempt to find a character attribute (found in the attributes tab of the sheet). You can find a full list of available properties for tokens here . The wiki section discussing this is here . Regarding increment/decrement for the turnorder function -- I don't think this is currently possible. Pretty sure you'd have to retrieve the current value, do the math with a roll variable, and then put the new value into --~|turnorder.&nbsp;
Hey all,&nbsp; I may have missed an update or change somewhere, but flavor text in square brackets aren't appearing in the hover-over from rolls for me anymore.&nbsp; !scriptcard {{ --#whisper|GM --=Roll|1d20 [Base] + 2 [Stuff] --+|[$Roll] }} Am I doing something wrong? Thanks!
1663930179
David M.
Pro
API Scripter
There is a temporary bug in the one-click version. You can either temporarily replace it with a manual install from the dev version on GitHub or just deal with it until the bug fix is pushed out to the one-click repo.
David M. said: There is a temporary bug in the one-click version. You can either temporarily replace it with a manual install from the dev version on GitHub or just deal with it until the bug fix is pushed out to the one-click repo. &nbsp;Perfect, thanks!
Ok, I just looked and the change log, and wow Kurt! So much great stuff! I do have question about the 2.1.7c change.&nbsp; v 2.1.7c - When setting attribute values with --!a, the setting will be made normally (with obj.set) and then again with obj.setWithWorker. Note&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;that while this allows sheetworkers to run on the changed value, this happens asynchronously, hence the normal set prior to the worker. Does this mean if I use a card to toggle a buff (I'm using the Starfinder by Roll20 sheet), that it should not only toggle the buff, but also apply the result of it to the attributes on the sheet? If so, I'm having a bit of trouble.&nbsp; One of my players has the Mobility feat, which provides +4 to AC from attacks of opportunity. The buff on the sheet, when manually clicked, adds that +4 bonus. When I try it through a card though, the box is highlighted but no change to the attribute happens. Here is what I am using:&nbsp; !scriptcard {{ --#sourceToken|@{selected|token_id} --Rfind|@{selected|character_id};Mobility;repeating_buff;name --=Toggle|[*R:toggle] - 1 {ABS} --!a:@{selected|token_id}|[*R&gt;toggle]:[$Toggle.Raw] }} Is there something else I should be doing, or am I misunderstanding this change? Thanks again!
1664316221
Kurt J.
Pro
API Scripter
Erik M. said: Ok, I just looked and the change log, and wow Kurt! So much great stuff! I do have question about the 2.1.7c change.&nbsp; v 2.1.7c - When setting attribute values with --!a, the setting will be made normally (with obj.set) and then again with obj.setWithWorker. Note&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;that while this allows sheetworkers to run on the changed value, this happens asynchronously, hence the normal set prior to the worker. Does this mean if I use a card to toggle a buff (I'm using the Starfinder by Roll20 sheet), that it should not only toggle the buff, but also apply the result of it to the attributes on the sheet? If so, I'm having a bit of trouble.&nbsp; One of my players has the Mobility feat, which provides +4 to AC from attacks of opportunity. The buff on the sheet, when manually clicked, adds that +4 bonus. When I try it through a card though, the box is highlighted but no change to the attribute happens. Here is what I am using:&nbsp; !scriptcard {{ --#sourceToken|@{selected|token_id} --Rfind|@{selected|character_id};Mobility;repeating_buff;name --=Toggle|[*R:toggle] - 1 {ABS} --!a:@{selected|token_id}|[*R&gt;toggle]:[$Toggle.Raw] }} Is there something else I should be doing, or am I misunderstanding this change? Thanks again! That would depend on what the sheet is doing under the hood. Prior to 2.1.7c, ScriptCards just set the raw value with obj.Set, which wouldn't trigger sheetworkers to run. With this change the setting is made via the SetWithSheetworkers call, so if the sheet does anything with the change (that depends on the sheet author) it should be triggered by the update now.
I'm having an issue with conditional statements, im assuming im doing a small obvious thing wrong but cant seem to figure out what. The aim of the script is to for the selected token (at some point need to change it to work with multiple non identical selected, but want to fix conditionals first prior to dealing with the looping) set their hp to the maximum, for npcs only. logic behind it is, get the hp formular, then since i cant find a way to just calculate maximum, find the value infront of the d, which gives the number of dice, the number after the d but before either the + or - (mostly focusing on the + situation as - is rare) which is the type of dice, then the modifier comes after the +. this is my issue area as doing this when there is no + causes issues. so want a conditional to find the +,-,or neither then do the appropriate bit. each of these functions does what i want, but from testing the conditions clearly arent applying and its failign both and going straight through to no mod. (the random --+ statements where to help me attempt (and clearly fail) to debug this issue) all variables except mod are coming out as expected, and mod is due to it just going straight to no mod. so any help would be much appreciated! !scriptcard {{ --:TOP| --#title|max hp --#whisper|gm --/#hideCard|1 --#sourcetoken|@{selected|token_id} --&amp;hp|[*S:npc_hpformula] --~noDice|stringfuncs;before;d;[&amp;hp] --~dice|stringfuncs;after;d;[&amp;hp] --~dice|stringfuncs;before;+;[&amp;dice] --+hp|[&amp;hp] --?[&amp;hp] -inc "+"|POSTIVE_MOD --?"[&amp;hp]" -inc "-"|NEGATIVE_MOD --&gt;NO_MOD| --:POSITIVE_MOD| --+POS|ITIVE --~mod|stringfuncs;after;+;[&amp;hp] --&gt;PROGRESS| --:NO_MOD| --&amp;mod|0 --+huh|no mod --&gt;PROGRESS| --:NEGATIVE_MOD| --+negative| --~mod|stringfuncs;after;-;[&amp;hp] --&amp;mod|-[&amp;mod] --&gt;PROGRESS| --:PROGRESS| --+hp....|[&amp;hp] --+dice|[&amp;noDice] --+doce|[&amp;dice] --+mod|[&amp;mod] --=HP|[&amp;noDice] * [&amp;dice] + [&amp;mod] --+total hp|[$HP] --/@token-mod|_ids @{selected|token_id} _set bar1_value|[$HP] bar1_max|[$HP] }}
1664637868

Edited 1664639596
Hey Kurt I was watching your video and spotted on the left side of the screen that the tokens bars AKA the circles were on the left side of the screen. What addons is this or setting? Or does anyone else know?
1664648297

Edited 1664649588
Kurt J.
Pro
API Scripter
Snooze said: I'm having an issue with conditional statements, im assuming im doing a small obvious thing wrong but cant seem to figure out what. The aim of the script is to for the selected token (at some point need to change it to work with multiple non identical selected, but want to fix conditionals first prior to dealing with the looping) set their hp to the maximum, for npcs only. logic behind it is, get the hp formular, then since i cant find a way to just calculate maximum, find the value infront of the d, which gives the number of dice, the number after the d but before either the + or - (mostly focusing on the + situation as - is rare) which is the type of dice, then the modifier comes after the +. this is my issue area as doing this when there is no + causes issues. so want a conditional to find the +,-,or neither then do the appropriate bit. each of these functions does what i want, but from testing the conditions clearly arent applying and its failign both and going straight through to no mod. (the random --+ statements where to help me attempt (and clearly fail) to debug this issue) all variables except mod are coming out as expected, and mod is due to it just going straight to no mod. so any help would be much appreciated! The issue with your code above is this line: -?[&amp;hp] -inc "+"|POSTIVE_MOD because "POSITIVE_MOD" is misspelled :) (also, [&amp;hp] should be in quotes since the formula contains a space) That said, here is how I would handle what you are doing. This uses the new looping structures that were introduced in 2.1.8 (OneClick is now on 2.1.11, so these should be widely available now). I've included more or less line-by-line comments. This will operate on all tokens you have selected, and uses the --! attribute modification command to set the bar1 max and bar 1 value values. !script {{ --/|Make sure we have some tokens selected, otherwise quit --?"[@SC_SelectedTokens(maxindex)]" -eq "undefined array"|END --/|Loop through all the selected tokens --%loop|foreach;SC_SelectedTokens --/|If the token doesn't represent a character, skip it --?"X[*[&amp;loop]:t-represents]" -eq "X"|% --/|If the character is not an NPC, skip it --?"X[*[&amp;loop]:npc]" -ne "X1"|% --/|Convert the HP formula to a max hp calculation by replacing "d" with "*" --~hpinfo|string;replace;d;*;[*[&amp;loop]:npc_hpformula] --/|Calculate Max HP --=MaxHP|[&amp;hpinfo] --/|Display the character name and max hp --+[*[&amp;loop]:name]|[$MaxHP] --/|Set to bar1 max (first) then bar1 value for the token to the max hp --!t:[&amp;loop]|bar1_max:[$MaxHP.Raw]|bar1_value:[$MaxHP.Raw] --%| --:END| }}
1664648609
Kurt J.
Pro
API Scripter
Craven said: Hey Kurt I was watching your video and spotted on the left side of the screen that the tokens bars AKA the circles were on the left side of the screen. What addons is this or setting? Or does anyone else know? This was done with the Stylus browser addon with information from this thread:&nbsp; <a href="https://app.roll20.net/forum/post/10802054/show-off-your-style-4-a-new-hope/?pageforid=10802056#post-10802056" rel="nofollow">https://app.roll20.net/forum/post/10802054/show-off-your-style-4-a-new-hope/?pageforid=10802056#post-10802056</a> That whole thread series (and the roll20 tips and tricks thread) have some great information in them.
Kurt would you mine sharing your code for the stylus? I was able to move the Menu but I can't figure out how to unhide the setting and status marker buttons.&nbsp;&nbsp;
Easiest way to implement IF-THEN ? For example, I want to put IF (@{selected|atribute}-1d20)&lt;0 THEN {text to chat} ELSE {different text to chat} In my macro.
1665438436

Edited 1665438451
David M.
Pro
API Scripter
There are some optional ways to do this depending on the specifics, but this is probably the most explicit. !script {{ --#title|Conditional example --=roll|1d20 --=attr|@{selected|attribute} --=result|[$attr]-[$roll] --+Attribute|[$attr] --+Roll|[$roll] --+Result|[$result] --?[$result] -lt 0|[ --+true branch|some text --]|[ --+false branch|some other text --]| }}
1665490668
Kurt J.
Pro
API Scripter
There is some shorthand available as well, though David's method has a couple of advantages. The shorthand only allows you to output a string for each condition, while you an do whatever you want for each case with David's. Also, the shorthand only displays the raw value of the rolls and doesn't include the highlighting/hover overs (though they are avaialble outside the conditional). !script {{ &nbsp; --=Roll|@{selected|strength} - 1d20 &nbsp; --?[$Roll] -lt 0|+True;[$Roll] is less than 0|+False;[$Roll] greater than or equal to 0 }} This can be shortened up into a single line if you include the roll in the conditional: !script {{ &nbsp; --?[=Roll:@{selected|strength} - 1d20] -lt 0|+True;[$Roll] is less than 0|+False;[$Roll] greater than or equal to 0 }}
David M. said: - Kurt J. said: - Thanks. Got it to work. Only question- how to turn off the ScriptCards template, so the output is just plain text I can incorporate in my own macro?
Kaspar K. said: Only question- how to turn off the ScriptCards template, so the output is just plain text I can incorporate in my own macro? Use the echo to chat function: --eChat Sender Name|Message Content If you're trying to use a particular template for your output, that's more complicated and would probably require some ZeroFrame shenanigans, but if you just want a bog-standard chat output, this will work.
1665729818

Edited 1665733285
Toby
Pro
Probably a fairly straightforward question but how do I do exploding dice (and exploding dice threshold) rolls with the scriptcards?&nbsp; I cant find it on the scriptCards wiki.&nbsp; I want to pull the damage from a field in a repeating section if that makes a difference. Edit: Well, nvm.. I figured out my issue.. the field in the character sheet had damage as 1d10+5.&nbsp; So the "!" scriptCards was trying to do 1d10+5!&nbsp; Welp, gotta make two different fields on the character sheet... one for the roll one for any modifiers.
Hm.. I'm trying to do some stuff with roll tables... I can get the text to output, but I'm trying to get the actual roll to display as well (so I can use that to perform various stuff with it...)&nbsp; But, no matter what I do it either comes out as "undefined" or straight "0".&nbsp; Perhaps someone could tell me what I might be doing wrong.&nbsp; Or point me to an example where roll tables are being used (not the 5e shop one above, its something really cool but its a bit hard to understand). !scriptcard {{ --/| === ScriptCard Layout for Imperial Divination DH1e === |\-- --/| === Version 1.0&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; === |\-- --/| === Date: 10/15/2022&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; === |\-- --/| ===== Roll Queries / Information Lookup =========== |\ --#title|Emperor's Tarot - Divination --#titlecardbackground|#993333 --=Divination|[T#Imperial-Tarot] --+[$Divination.tableEntryText]| --+[$Divination.tableEntryValue]| }} Basically what I want is to have both the output in roll number, text and imageURL for the same roll.&nbsp; So I can manipulate all three.
@Toby - I have been working on this as well with the same issues.&nbsp; Text and url are available but apparently the value cannot be accessed in the same way.&nbsp; I will be interested to see if the others have an answer.
There seems to be an issue with roll tables on my end, I don't know if anyone else is having this issue but the no matter what roll (even if I roll the tables normally), the roll number remains ZERO (0).
1665958372
Kurt J.
Pro
API Scripter
Toby said: There seems to be an issue with roll tables on my end, I don't know if anyone else is having this issue but the no matter what roll (even if I roll the tables normally), the roll number remains ZERO (0). When ScriptCards rolls on a table, there isn't actually an equivalent roll number that makes sense. This is because a table can have weights for each value, and these are calculated into the roll prior to picking an entry. For example, you could create a roll table like this: Item: Apple, Weight: 1 Item: Banana, Weight: 1 Item: Watermelon, Weight: 3 This would be directly equivalent to: Item: Apple, Weight: 1 Item: Banana, Weight: 1 Item: Watermelon, Weight: 1 Item: Watermelon, Weight: 1 Item: Watermelon, Weight: 1 which is what it gets expanded to inside the ScriptCards roll processor. I'll look into updating the table roll code to fill in the roll number for tables where all of the weight values are 1, but it wouldn't make much sense in a table with different weight values.
1665959630
Kurt J.
Pro
API Scripter
I just uploaded version 2.1.13 to the GitHub which includes this functionality. If the weight value for all of the items on the table is 1, the number rolled to get the result will be returned in the .Total and .Base components of the roll. In addation, for all table rolls, the [T#TableName] will be places in the .RollText component and the result value will be places in .Text (it will be the same as .tableEntryText)