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

Table Import keeps changing inline rolls

1652737221

Edited 1652737456
F P.
Pro
I've built some random encounter tables to import.&nbsp; The problem I'm having is that when I import the tables this: !import-table -- RandomEncounters5-10 -- hide !import-table-item -- RandomEncounters5-10 -- 2 [Saber-toothed Tigers]( <a href="https://app.roll20.net/compendium/dnd5e/Monsters:Saber-Toothed%20Tiger#content" rel="nofollow">https://app.roll20.net/compendium/dnd5e/Monsters:Saber-Toothed%20Tiger#content</a> ) -- 50 !import-table-item -- RandomEncounters5-10 -- [[1d4]] &nbsp; [Half-ogres]( <a href="https://app.roll20.net/compendium/dnd5e/Half-Ogre#h-Half-Ogre" rel="nofollow">https://app.roll20.net/compendium/dnd5e/Half-Ogre#h-Half-Ogre</a> ) -- 50 becomes this: I'm trying to understand where the tab (magenta rectangle) is coming from in the title and how inline rolls are being converted to $[[0]] (red oval) in my tables.&nbsp; I'm sure it's a formatting thing in my spreadsheet but I don't know how to remove it.&nbsp; Anyone know what I'm doing wrong?&nbsp; By the way, this seems to happen whether I use excel, numbers, or a csv file.
Use the following replacements then import. Also make sure to have the API to use inline roll from table. [ &amp;#91; Opening/Left square bracket ] &amp;#93; Closing/Right square bracket
1652748298

Edited 1652828459
To make it easier on yourself, you should be able to add two more columns to the left with this code (assuming the first row is Row 2 and you have a header above, then copy and paste down): A2: =SUBSTITUTE(SUBSTITUTE(B2,"[","&lt;%%91%%&gt;"),"]","&lt;%%93%%&gt;") B2: =CONCAT(C2,D2,E2,F2,G2,H2,I2) (Edited to correct the number of percent signs)
1652749054
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
Also, test rolling your table before you go too much farther. If you start a table entry with a numeral, it will only return the numeral when it is rolled, and drop the text portion. This is why official encounter tables are written like "Goblins (2)" instead of "2 Goblins".
In the help for table export/import they tell you what to use for replacements for some unique characters.&nbsp; I suppose the actual html replacements would work too.&nbsp; The tab is probably a bad paste of a hidden character in your source document, especially if you are trying to copy/paste from that community doc that is floating around here, its in a google doc instead of a sanitized source.&nbsp; Just hold down shift when you paste things in.&nbsp;&nbsp;
The substitutions don't seem to be working either.&nbsp; When I import they just show the text string of the substition ( &lt;%91&gt; or &lt;%93&gt;) rather than actually substituting.&nbsp; I'll keep poking at it. @keithcurtis, yeah I figured out the beginning numeric issue.&nbsp; I've been test rolling everything which I why this table only has a couple of entries.&nbsp; I'm basically rebuilding the Xanathar's random encounter tables from scratch.&nbsp; I think it's like 40 tables and over 1400 entries so I've been testing with just a few to start. @DM Eddie, the hidden character was what I was assuming for the tab issue.&nbsp; I just don't know how to remove it since it's not visible in my source (Apple Numbers) or in my copy and paste into the chat that builds the tables for import.&nbsp; I built these myself so I don't know what other source docs people might have found and fixed already.&nbsp;
1652818778
David M.
Pro
API Scripter
I think the TableExport syntax should include double percent signs, as indicated here ? So something like this? &lt;%%91%%&gt;&lt;%%91%%&gt;1d4&lt;%%93%%&gt;&lt;%%93%%&gt;
David M. said: I think the TableExport syntax should include double percent signs, as indicated here ? So something like this? &lt;%%91%%&gt;&lt;%%91%%&gt;1d4&lt;%%93%%&gt;&lt;%%93%%&gt; Yep my apologies for that - I modified the script to use single percent signs (to make it easier to read and take up less space) and forgot when I copied and pasted from my spreadsheet. A2: =SUBSTITUTE(SUBSTITUTE(B2,"[","&lt;%%91%%&gt;"),"]","&lt;%%93%%&gt;") B2: =CONCAT(C2,D2,E2,F2,G2,H2,I2)
I tried with double percent signs, single percent signs, with and without the &lt; &gt; around (both options) and I tried the &amp;# option with all of the above as well. &nbsp;Still no luck. &nbsp;I'm sure I'm doing something wrong but so far can't seem to figure it out. &nbsp;I'll keep poking at it.
1652854357

Edited 1652888180
!import-table --RandomEncounters5-10 --hide !import-table-item --RandomEncounters5-10 --2 [Saber-toothed Tigers](<a href="https://app.roll20.net/compendium/dnd5e/Monsters:Saber-Toothed%20Tiger#content" rel="nofollow">https://app.roll20.net/compendium/dnd5e/Monsters:Saber-Toothed%20Tiger#content</a>) --50 !import-table-item --RandomEncounters5-10 --&lt;%%91%%&gt;&lt;%%91%%&gt;1d4&lt;%%93%%&gt;&lt;%%93%%&gt;&nbsp; [Half-ogres](<a href="https://app.roll20.net/compendium/dnd5e/Half-Ogre#h-Half-Ogre" rel="nofollow">https://app.roll20.net/compendium/dnd5e/Half-Ogre#h-Half-Ogre</a>) --50 Does this work? I just tested it and it worked to add this table and two entries. Make sure you delete any table with that name before trying again, and make sure you have the most up-to-date versions of TableExport (0.2.4) and RecursiveTables (0.2.5). If it helps as a reference, here is a post that links to a couple Google docs that you should be able to use as reference for creating your own spreadsheet.&nbsp;&nbsp; One issue may be that you are not concatenating all of the entries correctly before cutting and pasting them into the Roll20 chatbox.&nbsp; Excel/Google Docs will add extra hidden breaking spaces and things when copying from multiple cells, which may affect Roll20's parsing of them in chat. An easy way to check if that is happening is to select an entire row, then paste it into a plain-text word editor (use shift-ctrl-V to ensure any formatting is removed), then copy it from there into the Roll20 chatbox.
1652989117

Edited 1652997563
F P.
Pro
@Jarren, that did work.&nbsp; Obviously there's some sort of invisible field I'm not seeing in my copy/paste.&nbsp; I'll keep poking at it.&nbsp; Thank you, all. EDIT:&nbsp; saved my spreadsheet as a CSV and opened in a text editor to find all the issues.&nbsp; The copy/paste was adding extra spaces that didn't show on my chat window well enough for me to notice but the import wouldn't parse through.&nbsp; All fixed now.&nbsp; Thank you to everyone who offered suggestions.