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

Why it shows like this?

Why does this show like this? I need it to show the entire sentence normal without those random cuts Here's the rest #1 #2
Firstly, this isn't a scripting issue as the term is used in context of Roll20, and secondly, it's because the output is in an inline roll. Unfortunately, rollable tables need to be in a roll to work, and break if you try to break the inline roll open or style the roll. You can space it better by placing it inside a template, though: &{template:default} {{[[1t[TestScript]]]}}
1726844102
timmaugh
Pro
API Scripter
Just to expand on what Tuo said, rollable tables have to be in inline rolls for them to work if you're using native Roll20 syntax. Scripts can access the table for you directly, if you know how to ask. Assuming that you have access to scripts (since you have the Pro tag next to your name), here are ways that you can access rollable table information using a script. These methods are all available with the MetaScript Toolbox installed, and are all aimed at "unpacking" the inline roll so that it no longer appears with the roll formatting Roll20 gives it. Unpack a Single Roll If you have a single roll against the table, you can use the .value syntax to get that value out of it. This works for equation-based rolls and rollable table rolls: [[ 1t[TestScript] ]].value Unpack All Returns from a Table Roll If you are specifically rolling against a table, you only will see a single entry in the inline roll if you leave it to Roll20 (if the values from the table are numeric, they are added; if they are textual, you get one of them). To see them all -- even if there is only 1 -- you can use the .items syntax: [[ 4t[TestScript] ]].items The default is for the items to be returned as a comma separated list, but you can supply your own delimiter between parentheses following the keyword "items". So, if your items all ended with a sentence-terminating punctuation and you just needed a space between them, you could provide a space as the delimeter with a formation like: [[ 4t[TestScript] ]].items( ) This is discussed more in this post . Get Single Item from Table Directly - Option 1 If you want to skip having to use a roll at all (if you're going to unpack it, anyway), you can use a Fetch construction like: @(table.TestScript.1dW) Which is like saying "roll against the table using a die of 1-d-weight"... whatever the total weight of all the items in the rollable table is. Get Single Item from Table Directly - Option 2 If you need to roll-with-modifiers against the table (i.e., a character being wounded should move them toward the higher end of a table), you can use a modified version of the previous where you use the totalweight property of the table to construct your own roll, which you then extract using the .value syntax already mentioned: @(table.TestScript.[\[\ 1d@(table.TestScript.totalweight) + ?{Your modifier|0} \]\].value) Get Single Item from Table Directly - Option 3 Before the previous 2 options were added to the Toolbox, a different metascript (Muler) offered its own ways to access tables. This formation is like the Option 2 version in that you are using a roll that you can choose to modify or not. In this case, I'll use the same totalweight property of the table from Fetch, though when this syntax was initially introduced there was no way to get the total weight of the table directly (without manually totalling all of the items): get\.table.MaleNames.[\[\ 1d@(table.MaleNames.totalweight) \]\].value/get Deferral Usage Some of the above options use deferrals (backslashes in the syntax constructions) that slow down the detection/processing of them so that they can wait on other pieces of information being available. I just released a video discussing metascripts and deferrals, if you want to know more. Try in Your Game To try any of these formations out in your game, first install the MetaScript Toolbox from the 1-click repository, then insert them into this template statement after the equals sign of the "Result" field. I'll include the "multiple items from a table" syntax as an example. Simply replace the underlined text: !&{template:default} {{name=Table Access With Script}} {{Result=  [[ 4t[TestScript] ]].items( ) }} {&simple}
1726849063
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
Tuo said: Firstly, this isn't a scripting issue as the term is used in context of Roll20, and secondly, it's because the output is in an inline roll. Unfortunately, rollable tables need to be in a roll to work, and break if you try to break the inline roll open or style the roll. You can space it better by placing it inside a template, though: &{template:default} {{[[1t[TestScript]]]}} This is an excellent solution, so long as the game is not using solely a Beacon Sheet, which not only do not have roll templates, but recently lost the ability to even use the default template.