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] RecursiveTables -- Expands Inline Rolls in Rollable Table Results

I have run into an error that I think has to do with the way my tables are constructed, however I don't know specifically where or how things are going wrong.  I could use some help. SyntaxError: Expected "[" or [ |\t] but "1" found. undefined I am using the following table (s): !import-table --kEvent-Generic --show !import-table-item --kEvent-Generic --a natural blessing and ROLL AGAIN. --2 -- !import-table-item --kEvent-Generic --good weather and ROLL AGAIN. --2 -- !import-table-item --kEvent-Generic -- <%%91%%><%%91%%> 1t<%%91%%>kEvent-benKingdom<%%93%%> <%%93%%><%%93%%>. --20 -- !import-table-item --kEvent-Generic -- <%%91%%><%%91%%> 1t<%%91%%>kEvent-danKingdom<%%93%%> <%%93%%><%%93%%>. --25 -- !import-table-item --kEvent-Generic -- <%%91%%><%%91%%> 1t<%%91%%>kEvent-benSettlement<%%93%%> <%%93%%><%%93%%>. --25 -- !import-table-item --kEvent-Generic -- <%%91%%><%%91%%> 1t<%%91%%>kEvent-danSettlement<%%93%%> <%%93%%><%%93%%>. --22 -- !import-table-item --kEvent-Generic --bandit activity and ROLL AGAIN. --1 -- !import-table-item --kEvent-Generic --squatters and ROLL AGAIN. --1 -- !import-table-item --kEvent-Generic --monster attack and ROLL AGAIN. --1 -- !import-table-item --kEvent-Generic --vandals and ROLL AGAIN. --1 -- !import-table --kEvent-benKingdom --show !import-table-item --kEvent-benKingdom --an archaeological find --7 -- !import-table-item --kEvent-benKingdom --a diplomatic overture --5 -- !import-table-item --kEvent-benKingdom --a discovery --5 -- !import-table-item --kEvent-benKingdom --an economic boom --11 -- !import-table-item --kEvent-benKingdom --a festive invitation --8 -- !import-table-item --kEvent-benKingdom --a food surplus --14 -- !import-table-item --kEvent-benKingdom --good weather --13 -- !import-table-item --kEvent-benKingdom --a land rush --9 -- !import-table-item --kEvent-benKingdom --a natural blessing --10 -- !import-table-item --kEvent-benKingdom --new subjects --5 -- !import-table-item --kEvent-benKingdom --political calm --10 -- !import-table --kEvent-danKingdom --show !import-table-item --kEvent-danKingdom --an assassination attempt --5 -- !import-table-item --kEvent-danKingdom --bandit activity --13 -- !import-table-item --kEvent-danKingdom --a feud --10 -- !import-table-item --kEvent-danKingdom --a food shortage --13 -- !import-table-item --kEvent-danKingdom --an improvement demand --11 -- !import-table-item --kEvent-danKingdom --an inquisition --8 -- !import-table-item --kEvent-danKingdom --a large disaster --5 -- !import-table-item --kEvent-danKingdom --a monster attack --12 -- !import-table-item --kEvent-danKingdom --a plauge --8 -- !import-table-item --kEvent-danKingdom --a public scandal --8 -- !import-table-item --kEvent-danKingdom --smugglers --8 -- !import-table --kEvent-benSettlement --show !import-table-item --kEvent-benSettlement --a boomtown --14 -- !import-table-item --kEvent-benSettlement --a discovery --10 -- !import-table-item --kEvent-benSettlement --justice prevails --14 -- !import-table-item --kEvent-benSettlement --a noblesse oblige --6 -- !import-table-item --kEvent-benSettlement --an outstanding success --11 -- !import-table-item --kEvent-benSettlement --a pilgrimage --8 -- !import-table-item --kEvent-benSettlement --a remarkable treasure --6 -- !import-table-item --kEvent-benSettlement --an unexpected find --9 -- !import-table-item --kEvent-benSettlement --a visiting celebrity --12 -- !import-table-item --kEvent-benSettlement --a wealthy immigrant --7 -- !import-table --kEvent-danSettlement --show !import-table-item --kEvent-danSettlement --building demand --10 -- !import-table-item --kEvent-danSettlement --a crop failure --7 -- !import-table-item --kEvent-danSettlement --cult activity --8 -- !import-table-item --kEvent-danSettlement --a drug den --8 -- !import-table-item --kEvent-danSettlement --a feud --8 -- !import-table-item --kEvent-danSettlement --an inquisition --8 -- !import-table-item --kEvent-danSettlement --a localized disaster --5 -- !import-table-item --kEvent-danSettlement --a monster attack --7 -- !import-table-item --kEvent-danSettlement --a plague --5 -- !import-table-item --kEvent-danSettlement --a sensational crime --8 -- !import-table-item --kEvent-danSettlement --slavers --6 -- !import-table-item --kEvent-danSettlement --squatters --10 -- !import-table-item --kEvent-danSettlement --vandals --10 -- While using:  !rt /w gm You have [[ 1t[[kEvent-Generic]] ]].  Could anyone help with this small problem?
1464700723
The Aaron
Pro
API Scripter
Try taking the spaces out of here: !import-table-item --kEvent-Generic -- &lt;%%91%%&gt;&lt;%%91%%&gt; 1t&lt;%%91%%&gt;kEvent-benKingdom&lt;%%93%%&gt; &lt;%%93%%&gt;&lt;%%93%%&gt;. --20 -- !import-table-item --kEvent-Generic -- &lt;%%91%%&gt;&lt;%%91%%&gt; 1t&lt;%%91%%&gt;kEvent-danKingdom&lt;%%93%%&gt; &lt;%%93%%&gt;&lt;%%93%%&gt;. --25 -- !import-table-item --kEvent-Generic -- &lt;%%91%%&gt;&lt;%%91%%&gt; 1t&lt;%%91%%&gt;kEvent-benSettlement&lt;%%93%%&gt; &lt;%%93%%&gt;&lt;%%93%%&gt;. --25 -- !import-table-item --kEvent-Generic -- &lt;%%91%%&gt;&lt;%%91%%&gt; 1t&lt;%%91%%&gt;kEvent-danSettlement&lt;%%93%%&gt; &lt;%%93%%&gt;&lt;%%93%%&gt;. --22 -- Such that it looks like this: !import-table-item --kEvent-Generic -- &lt;%%91%%&gt;&lt;%%91%%&gt;1t&lt;%%91%%&gt;kEvent-benKingdom&lt;%%93%%&gt;&lt;%%93%%&gt;&lt;%%93%%&gt;. --20 -- !import-table-item --kEvent-Generic -- &lt;%%91%%&gt;&lt;%%91%%&gt;1t&lt;%%91%%&gt;kEvent-danKingdom&lt;%%93%%&gt;&lt;%%93%%&gt;&lt;%%93%%&gt;. --25 -- !import-table-item --kEvent-Generic -- &lt;%%91%%&gt;&lt;%%91%%&gt;1t&lt;%%91%%&gt;kEvent-benSettlement&lt;%%93%%&gt;&lt;%%93%%&gt;&lt;%%93%%&gt;. --25 -- !import-table-item --kEvent-Generic -- &lt;%%91%%&gt;&lt;%%91%%&gt;1t&lt;%%91%%&gt;kEvent-danSettlement&lt;%%93%%&gt;&lt;%%93%%&gt;&lt;%%93%%&gt;. --22 -- There is a bug with the inline roll expansion for API messages where spaces can cause issues: &nbsp; <a href="https://app.roll20.net/forum/post/2217884/slug%7D" rel="nofollow">https://app.roll20.net/forum/post/2217884/slug%7D</a>
I just found this..... it looks amazing..... the problem is i am a complete dunce when it comes to code..... I am looking to make a multi line random encounter table.... IE Select Area&gt;[Random Encounter Type]&gt; [Random Creature]&gt; [Random Number of Creatures]..... is this script made for this or can it be set up to do this?
1467857712
The Aaron
Pro
API Scripter
It is pretty much made for that sort of thing. I'll try to get you an example in the morning. Hard to type it in my phone.&nbsp; Look back through the thread for some similar examples.&nbsp;
1467898498
The Aaron
Pro
API Scripter
Jake S. said: I just found this..... it looks amazing..... the problem is i am a complete dunce when it comes to code..... I am looking to make a multi line random encounter table.... IE Select Area&gt;[Random Encounter Type]&gt; [Random Creature]&gt; [Random Number of Creatures]..... is this script made for this or can it be set up to do this? You'll probably want&nbsp; TableExport . &nbsp;Here is an example for an encounter in the plains, first TableExport commands to create a rollable table: !import-table --Encounter-Plains --show !import-table-item --Wolves --&lt;%%91%%&gt;&lt;%%91%%&gt;1d8&lt;%%93%%&gt;&lt;%%93%%&gt; wolves spring forth from the grasses. --2 -- !import-table-item --Badgers --&lt;%%91%%&gt;&lt;%%91%%&gt;1d12&lt;%%93%%&gt;&lt;%%93%%&gt; badgers waddle from beneath ferns. --5 -- !import-table-item --Honey-Badger --&lt;%%91%%&gt;&lt;%%91%%&gt;1&lt;%%93%%&gt;&lt;%%93%%&gt; honey badger sneers from a bare spot of earth littered with the carcasses of dragons! RUN!!!. --1 -- Then using it with RecursiveTables: !rt Plains Encounter: [[1t[Encounter-Plains]]] Does that help?
1467916968
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
Jake S. said: I just found this..... it looks amazing..... the problem is i am a complete dunce when it comes to code..... I am looking to make a multi line random encounter table.... IE Select Area&gt;[Random Encounter Type]&gt; [Random Creature]&gt; [Random Number of Creatures]..... is this script made for this or can it be set up to do this? For your case Jake, the easiest way as far as planning out how you're going to use the wonderfulness that is RecursiveTables would probably be something like: You'll need to make a table for each of your areas, encounter types (by area), and random creatures (again by area, and maybe by encounter type). So for the plains; you might have entries for encounter type like: [[1t[BeneficialPlains]]] [[1t[MonsterPlains]]] And then in MonsterPlains you would have entries for what monster like: [[1t[PlainsCreatures]]] [[1t[nonPlainsCreatures]]] PlainsCreatures would have entries for specific creatures and groups of creatures like: [[1d6]] Barbaraian Hunters [[2d5]] Giant Vultures [[1d2]] Plains Dragons To call all these simply you have two options: The Roll Query: You encounter: [[?{Area| Plains, 1t[PlainsEncounters] | Mountains, 1t[MountainsEncounters] | Whatever other area types you've got}]] Ability Command Button Menu with a button for your Plains, Mountains, etc. area macros. In either case the final output would be something like: You encounter: 2 Plains Dragons You encounter: 4 Barbarian Hunters You encounter 3 Giant Vultures etc.
The Aaron said: Jake S. said: I just found this..... it looks amazing..... the problem is i am a complete dunce when it comes to code..... I am looking to make a multi line random encounter table.... IE Select Area&gt;[Random Encounter Type]&gt; [Random Creature]&gt; [Random Number of Creatures]..... is this script made for this or can it be set up to do this? You'll probably want&nbsp; TableExport . &nbsp;Here is an example for an encounter in the plains, first TableExport commands to create a rollable table: !import-table --Encounter-Plains --show !import-table-item --Wolves --&lt;%%91%%&gt;&lt;%%91%%&gt;1d8&lt;%%93%%&gt;&lt;%%93%%&gt; wolves spring forth from the grasses. --2 -- !import-table-item --Badgers --&lt;%%91%%&gt;&lt;%%91%%&gt;1d12&lt;%%93%%&gt;&lt;%%93%%&gt; badgers waddle from beneath ferns. --5 -- !import-table-item --Honey-Badger --&lt;%%91%%&gt;&lt;%%91%%&gt;1&lt;%%93%%&gt;&lt;%%93%%&gt; honey badger sneers from a bare spot of earth littered with the carcasses of dragons! RUN!!!. --1 -- Then using it with RecursiveTables: !rt Plains Encounter: [[1t[Encounter-Plains]]] Does that help? That's part of my problem (being a dunce when code is concerned).&nbsp; This is what i have fleshed out and will be using as a "Frame" for my other areas. Do you think your script can work with what I want?
1467949009
The Aaron
Pro
API Scripter
Yeah, it should work. &nbsp;Here's some of what the TableExport commands will look like. !import-table --Laughing-Hills --hide !import-table-item --Laughing-Hills --&lt;%%91%%&gt;&lt;%%91%%&gt;1t&lt;%%91%%&gt;Beast&lt;%%93%%&gt;&lt;%%93%%&gt;&lt;%%93%%&gt; --40 -- !import-table-item --Laughing-Hills --&lt;%%91%%&gt;&lt;%%91%%&gt;1t&lt;%%91%%&gt;Monstrosity&lt;%%93%%&gt;&lt;%%93%%&gt;&lt;%%93%%&gt; --15 -- !import-table --Beast --hide !import-table-item --Beast --&lt;%%91%%&gt;&lt;%%91%%&gt;1d8+2&lt;%%93%%&gt;&lt;%%93%%&gt; Hyenas (CR: 0) --35 -- !import-table-item --Beast --&lt;%%91%%&gt;&lt;%%91%%&gt;1d8+2&lt;%%93%%&gt;&lt;%%93%%&gt; Jackals (CR: 0) --20 -- !import-table-item --Beast --&lt;%%91%%&gt;&lt;%%91%%&gt;1d4&lt;%%93%%&gt;&lt;%%93%%&gt; Blood Hawks (CR: 1/8) --5 -- !import-table --Monstrosity --hide !import-table-item --Monstrosity --&lt;%%91%%&gt;&lt;%%91%%&gt;1d4+2&lt;%%93%%&gt;&lt;%%93%%&gt; Cockatrice (CR: 1/2) --25 -- !import-table-item --Monstrosity --&lt;%%91%%&gt;&lt;%%91%%&gt;1d4+2&lt;%%93%%&gt;&lt;%%93%%&gt; Worg (CR: 1/2) --40 -- !import-table-item --Monstrosity --&lt;%%91%%&gt;&lt;%%91%%&gt;1d6+1&lt;%%93%%&gt;&lt;%%93%%&gt; Harpy --20 -- This is a bit simplified, as you'd actually want to have an arrangement more like [Terrain]-&gt;[Difficulty]-&gt;[Monster], etc...
Greetings- I have tried to add a random number to be used to determine how many times a table is rolled on. It results in a single roll being shown in chat but if you mouse over the result it lists the other results as well. Any way to get that to show in chat?&nbsp;
1467990434
The Aaron
Pro
API Scripter
Can you post the command you are using?
Sorry The Aaron, didn't see the reply. It would happen when I was using default template- the box with the inline roll would just show one result. If you moused over it, however, you would see that it was rolling a random number of times and generating the proper results. I cannot duplicate the result- got frustrated and started from scratch so I don't have the example to give you :) This morning finds me having made all the gem, art, and magic tables from the 5e DMG. They all seem to play nice with !rt. I started combining them into hoard tables. When I use !rt with the hoard table I get an API error. It doesn't seem to be a problem with the individual table entries- I used them at least 20 times each without an error. It only occurs when I roll on the master hoard table.&nbsp;
1468943071
The Aaron
Pro
API Scripter
Hmm. &nbsp;You might have a look at this bug report: &nbsp; <a href="https://app.roll20.net/forum/post/2217884/api-regr" rel="nofollow">https://app.roll20.net/forum/post/2217884/api-regr</a>... Probably something about your chosen formatting is causing that issue. &nbsp;I don't see anything in the screenshot of table rows, but the error message looks like the type you'd see when sending something to sendChat() (which is what parses the nested inline rolls) in a format that causes the bug. It expected a bracket, space, or tab, but found a 6. &nbsp;It SHOULD take a 6 in that position, hence the bug. &nbsp;Try making a new table with just one of your rows, or possibly 2 tables with 1 row each, the one calling the other, and see if you can figure out the spacing issue.
1468947535
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
Could this be the same thing that was going on in my&nbsp; magic item tables ?
Aaron- could it be related to the weight? It doesn't like a single one of my entries on the Hoard table when I entered them on a new test table. Even though they all work as a !rt when I paste the entries into chat. I didn't see anything wrong with the format. But I did think that there was one table that makes multiple checks- the Magic Item Table I. It has one entry for Armor that makes multiple calls. I tried to place two entries from that table (one single item and then the line that calls for a separate roll on the armor table). It gave me the same bug I get on the Hoard table. The kicker is I went back and rolled the Magic Item Table far too many times to count- until I saw one of the items as a result that ONLY comes from a successful roll on the nested armor table...... I am stumped
1468949813
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
Gary, I'd go through your armor table with a fine toothed comb and make sure all the inline rolls in it are formatted correctly. I had a very similar error ("S" found instead of your "6" found) that was caused by having an inline roll call to my MinorWands table (it was [1t[MinorWands]]] instead of [[1t[MinorWands]]].
1468950466
The Aaron
Pro
API Scripter
Scott: maybe, but I didn't see any missing [ Gary: can you use TableExport to dump the two little tables so that I can try to duplicate it?
!import-table --test-table --show !import-table-item --test-table --&lt;%%91%%&gt;&lt;%%91%%&gt;2d6 1000&lt;%%93%%&gt;&lt;%%93%%&gt; Electrum plus &lt;%%91%%&gt;&lt;%%91%%&gt;8d6 100&lt;%%93%%&gt;&lt;%%93%%&gt; Gold --1 -- !import-table-item --test-table --&lt;%%91%%&gt;&lt;%%91%%&gt; 1&lt;%%93%%&gt;t&lt;%%91%%&gt;Magic-Armor-Table-I&lt;%%93%%&gt; &lt;%%93%%&gt;&lt;%%93%%&gt; --1 -- !import-table --Magic-Armor-Table-I --hide !import-table-item --Magic-Armor-Table-I --Armor +2 Half Plate --2 -- !import-table-item --Magic-Armor-Table-I --Armor +2 Plate --2 -- !import-table-item --Magic-Armor-Table-I --Armor +3 Studded Leather --2 -- !import-table-item --Magic-Armor-Table-I --Armor +3 Breastplate --2 -- !import-table-item --Magic-Armor-Table-I --Armor +3 Splint --2 -- !import-table-item --Magic-Armor-Table-I --Armor +3 Half Plate --1 -- !import-table-item --Magic-Armor-Table-I --Armor +3 Plate --1 -- Is this what you need Aaron?&nbsp;
1468960035
The Aaron
Pro
API Scripter
Yup, I think so... Oh wait? &nbsp; that looks like it's: [[ 1 ] t[Magic-Armor-Table-I] ]] Shouldn't it be: [[ 1t[Magic-Armor-Table-I] ]]
Slowly bangs head against table. Wonder how many of those I have! Will try to take a look at my bigger table and see if it is the same issue. Because I am not a coder I tend to copy a line and reuse it as much as possible once I think it works. .... But if I mess it up..... yikes.&nbsp;
Thanks Aaron.&nbsp;
Still getting that error though- &nbsp;have looked several times to make sure the format is right.&nbsp; !import-table --test-table --show !import-table-item --test-table --&lt;%%91%%&gt;&lt;%%91%%&gt;2d6 1000&lt;%%93%%&gt;&lt;%%93%%&gt; Electrum plus &lt;%%91%%&gt;&lt;%%91%%&gt;8d6 100&lt;%%93%%&gt;&lt;%%93%%&gt; Gold --1 -- !import-table-item --test-table --&lt;%%91%%&gt;&lt;%%91%%&gt; 1t&lt;%%91%%&gt;Magic-Armor-Table-I&lt;%%93%%&gt; &lt;%%93%%&gt;&lt;%%93%%&gt; --1 --
1468961507

Edited 1468961630
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
[[ 1t[Magic-Armor-Table-I] ]] needs to be [[1t[Magic-Armor-Table-I] ]] or [[1t[Magic-Armor-Table-I]]]. The API doesn't like spaces in inline rolls according to some stuff Aaron has found. NVM, I'm talking out my you know what.
Copied the table entries and put an !rt in front of them. All the entries work individually in chat.&nbsp; !rt [[6d6*100]] Copper, [[3d6*100]] Silver, and [[2d6*10]] Gold !rt [[6d6*100]] Copper, [[3d6*100]] Silver, and [[2d6*10]] Gold with [[ [[2d6]]t[10GP-Gemstones] ]] !rt [[6d6*100]] Copper, [[3d6*100]] Silver, and [[2d6*10]] Gold with [[ [[2d4]]t[25GP-Art-Object] ]] !rt [[6d6*100]] Copper, [[3d6*100]] Silver, and [[2d6*10]] Gold with [[ [[2d6]]t[50GP-Gemstones] ]] !rt [[6d6*100]] Copper, [[3d6*100]] Silver, and [[2d6*10]] Gold with [[ [[2d6]]t[10GP-Gemstones] ]] with [[ [[1d6]]t[Magic-Item-Table-A] ]] !rt [[6d6*100]] Copper, [[3d6*100]] Silver, and [[2d6*10]] Gold with [[ [[2d4]]t[25GP-Art-Object] ]] with [[ [[1d6]]t[Magic-Item-Table-A] ]] !rt [[6d6*100]] Copper, [[3d6*100]] Silver, and [[2d6*10]] Gold with [[ [[2d6]]t[50GP-Gemstones] ]] with [[ [[1d6]]t[Magic-Item-Table-A] ]] !rt [[6d6*100]] Copper, [[3d6*100]] Silver, and [[2d6*10]] Gold with [[ [[2d6]]t[10GP-Gemstones] ]] with [[ [[1d4]]t[Magic-Item-Table-B] ]] !rt [[6d6*100]] Copper, [[3d6*100]] Silver, and [[2d6*10]] Gold with [[ [[2d4]]t[25GP-Art-Object] ]] with [[ [[1d4]]t[Magic-Item-Table-B] ]] !rt [[6d6*100]] Copper, [[3d6*100]] Silver, and [[2d6*10]] Gold with [[ [[2d6]]t[50GP-Gemstones] ]] with [[ [[1d4]]t[Magic-Item-Table-B] ]] !rt [[6d6*100]] Copper, [[3d6*100]] Silver, and [[2d6*10]] Gold with [[ [[2d4]]t[10GP-Gemstones] ]] with [[ [[1d4]]t[Magic-Item-Table-C] ]] !rt [[6d6*100]] Copper, [[3d6*100]] Silver, and [[2d6*10]] Gold with [[ [[2d4]]t[25GP-Art-Object] ]] with [[ [[1d4]]t[Magic-Item-Table-C] ]] !rt [[6d6*100]] Copper, [[3d6*100]] Silver, and [[2d6*10]] Gold with [[ [[2d6]]t[50GP-Gemstones] ]] with [[ [[1d4]]t[Magic-Item-Table-C] ]] !rt [[6d6*100]] Copper, [[3d6*100]] Silver, and [[2d6*10]] Gold with [[ [[2d4]]t[25GP-Art-Object] ]] with [[ [[1d4]]t[Magic-Item-Table-F] ]] !rt [[6d6*100]] Copper, [[3d6*100]] Silver, and [[2d6*10]] Gold with [[ [[2d6]]t[50GP-Gemstones] ]] with [[ [[1d4]]t[Magic-Item-Table-F] ]] !rt [[6d6*100]] Copper, [[3d6*100]] Silver, and [[2d6*10]] Gold with [[ [[2d4]]t[25GP-Art-Object] ]] with [[ 1t[Magic-Item-Table-G] ]] !rt [[6d6*100]] Copper, [[3d6*100]] Silver, and [[2d6*10]] Gold with [[ [[2d4]]t[25GP-Art-Object] ]] with [[ 1t[Magic-Item-Table-G] ]] -----------ALL OF THE ABOVE WORK FINE ---------- USE THE COMMAND BELOW TO ROLL ON HOARD TABLE (WHICH IS JUST A COLLECTION OF THE LINES ABOVE WITH THE LEADING !rt). GETS ERROR MESSAGE. !rt [[ 1t[Treasure-Hoard-CR0-4] ]] If it helps here is the actual table export-&nbsp; !import-table --Treasure-Hoard-CR0-4 --show !import-table-item --Treasure-Hoard-CR0-4 --&lt;%%91%%&gt;&lt;%%91%%&gt;6d6 100&lt;%%93%%&gt;&lt;%%93%%&gt; Copper, &lt;%%91%%&gt;&lt;%%91%%&gt;3d6 100&lt;%%93%%&gt;&lt;%%93%%&gt; Silver, and &lt;%%91%%&gt;&lt;%%91%%&gt;2d6 10&lt;%%93%%&gt;&lt;%%93%%&gt; Gold --6 -- !import-table-item --Treasure-Hoard-CR0-4 --&lt;%%91%%&gt;&lt;%%91%%&gt;6d6 100&lt;%%93%%&gt;&lt;%%93%%&gt; Copper, &lt;%%91%%&gt;&lt;%%91%%&gt;3d6 100&lt;%%93%%&gt;&lt;%%93%%&gt; Silver, and &lt;%%91%%&gt;&lt;%%91%%&gt;2d6 10&lt;%%93%%&gt;&lt;%%93%%&gt; Gold with &lt;%%91%%&gt;&lt;%%91%%&gt; &lt;%%91%%&gt;&lt;%%91%%&gt;2d6&lt;%%93%%&gt;&lt;%%93%%&gt;t&lt;%%91%%&gt;10GP-Gemstones&lt;%%93%%&gt; &lt;%%93%%&gt;&lt;%%93%%&gt; --10 -- !import-table-item --Treasure-Hoard-CR0-4 --&lt;%%91%%&gt;&lt;%%91%%&gt;6d6 100&lt;%%93%%&gt;&lt;%%93%%&gt; Copper, &lt;%%91%%&gt;&lt;%%91%%&gt;3d6 100&lt;%%93%%&gt;&lt;%%93%%&gt; Silver, and &lt;%%91%%&gt;&lt;%%91%%&gt;2d6 10&lt;%%93%%&gt;&lt;%%93%%&gt; Gold with &lt;%%91%%&gt;&lt;%%91%%&gt; &lt;%%91%%&gt;&lt;%%91%%&gt;2d4&lt;%%93%%&gt;&lt;%%93%%&gt;t&lt;%%91%%&gt;25GP-Art-Object&lt;%%93%%&gt; &lt;%%93%%&gt;&lt;%%93%%&gt; --10 -- !import-table-item --Treasure-Hoard-CR0-4 --&lt;%%91%%&gt;&lt;%%91%%&gt;6d6 100&lt;%%93%%&gt;&lt;%%93%%&gt; Copper, &lt;%%91%%&gt;&lt;%%91%%&gt;3d6 100&lt;%%93%%&gt;&lt;%%93%%&gt; Silver, and &lt;%%91%%&gt;&lt;%%91%%&gt;2d6 10&lt;%%93%%&gt;&lt;%%93%%&gt; Gold with &lt;%%91%%&gt;&lt;%%91%%&gt; &lt;%%91%%&gt;&lt;%%91%%&gt;2d6&lt;%%93%%&gt;&lt;%%93%%&gt;t&lt;%%91%%&gt;50GP-Gemstones&lt;%%93%%&gt; &lt;%%93%%&gt;&lt;%%93%%&gt; --10 -- !import-table-item --Treasure-Hoard-CR0-4 --&lt;%%91%%&gt;&lt;%%91%%&gt;6d6 100&lt;%%93%%&gt;&lt;%%93%%&gt; Copper, &lt;%%91%%&gt;&lt;%%91%%&gt;3d6 100&lt;%%93%%&gt;&lt;%%93%%&gt; Silver, and &lt;%%91%%&gt;&lt;%%91%%&gt;2d6 10&lt;%%93%%&gt;&lt;%%93%%&gt; Gold with &lt;%%91%%&gt;&lt;%%91%%&gt; &lt;%%91%%&gt;&lt;%%91%%&gt;2d6&lt;%%93%%&gt;&lt;%%93%%&gt;t&lt;%%91%%&gt;10GP-Gemstones&lt;%%93%%&gt; &lt;%%93%%&gt;&lt;%%93%%&gt; with &lt;%%91%%&gt;&lt;%%91%%&gt; &lt;%%91%%&gt;&lt;%%91%%&gt;1d6&lt;%%93%%&gt;&lt;%%93%%&gt;t&lt;%%91%%&gt;Magic-Item-Table-A&lt;%%93%%&gt; &lt;%%93%%&gt;&lt;%%93%%&gt; --8 -- !import-table-item --Treasure-Hoard-CR0-4 --&lt;%%91%%&gt;&lt;%%91%%&gt;6d6 100&lt;%%93%%&gt;&lt;%%93%%&gt; Copper, &lt;%%91%%&gt;&lt;%%91%%&gt;3d6 100&lt;%%93%%&gt;&lt;%%93%%&gt; Silver, and &lt;%%91%%&gt;&lt;%%91%%&gt;2d6 10&lt;%%93%%&gt;&lt;%%93%%&gt; Gold with &lt;%%91%%&gt;&lt;%%91%%&gt; &lt;%%91%%&gt;&lt;%%91%%&gt;2d4&lt;%%93%%&gt;&lt;%%93%%&gt;t&lt;%%91%%&gt;25GP-Art-Object&lt;%%93%%&gt; &lt;%%93%%&gt;&lt;%%93%%&gt; with &lt;%%91%%&gt;&lt;%%91%%&gt; &lt;%%91%%&gt;&lt;%%91%%&gt;1d6&lt;%%93%%&gt;&lt;%%93%%&gt;t&lt;%%91%%&gt;Magic-Item-Table-A&lt;%%93%%&gt; &lt;%%93%%&gt;&lt;%%93%%&gt; --7 -- !import-table-item --Treasure-Hoard-CR0-4 --&lt;%%91%%&gt;&lt;%%91%%&gt;6d6 100&lt;%%93%%&gt;&lt;%%93%%&gt; Copper, &lt;%%91%%&gt;&lt;%%91%%&gt;3d6 100&lt;%%93%%&gt;&lt;%%93%%&gt; Silver, and &lt;%%91%%&gt;&lt;%%91%%&gt;2d6 10&lt;%%93%%&gt;&lt;%%93%%&gt; Gold with &lt;%%91%%&gt;&lt;%%91%%&gt; &lt;%%91%%&gt;&lt;%%91%%&gt;2d6&lt;%%93%%&gt;&lt;%%93%%&gt;t&lt;%%91%%&gt;50GP-Gemstones&lt;%%93%%&gt; &lt;%%93%%&gt;&lt;%%93%%&gt; with &lt;%%91%%&gt;&lt;%%91%%&gt; &lt;%%91%%&gt;&lt;%%91%%&gt;1d6&lt;%%93%%&gt;&lt;%%93%%&gt;t&lt;%%91%%&gt;Magic-Item-Table-A&lt;%%93%%&gt; &lt;%%93%%&gt;&lt;%%93%%&gt; --7 -- !import-table-item --Treasure-Hoard-CR0-4 --&lt;%%91%%&gt;&lt;%%91%%&gt;6d6 100&lt;%%93%%&gt;&lt;%%93%%&gt; Copper, &lt;%%91%%&gt;&lt;%%91%%&gt;3d6 100&lt;%%93%%&gt;&lt;%%93%%&gt; Silver, and &lt;%%91%%&gt;&lt;%%91%%&gt;2d6 10&lt;%%93%%&gt;&lt;%%93%%&gt; Gold with &lt;%%91%%&gt;&lt;%%91%%&gt; &lt;%%91%%&gt;&lt;%%91%%&gt;2d6&lt;%%93%%&gt;&lt;%%93%%&gt;t&lt;%%91%%&gt;10GP-Gemstones&lt;%%93%%&gt; &lt;%%93%%&gt;&lt;%%93%%&gt; with &lt;%%91%%&gt;&lt;%%91%%&gt; &lt;%%91%%&gt;&lt;%%91%%&gt;1d4&lt;%%93%%&gt;&lt;%%93%%&gt;t&lt;%%91%%&gt;Magic-Item-Table-B&lt;%%93%%&gt; &lt;%%93%%&gt;&lt;%%93%%&gt; --5 -- !import-table-item --Treasure-Hoard-CR0-4 --&lt;%%91%%&gt;&lt;%%91%%&gt;6d6 100&lt;%%93%%&gt;&lt;%%93%%&gt; Copper, &lt;%%91%%&gt;&lt;%%91%%&gt;3d6 100&lt;%%93%%&gt;&lt;%%93%%&gt; Silver, and &lt;%%91%%&gt;&lt;%%91%%&gt;2d6 10&lt;%%93%%&gt;&lt;%%93%%&gt; Gold with &lt;%%91%%&gt;&lt;%%91%%&gt; &lt;%%91%%&gt;&lt;%%91%%&gt;2d4&lt;%%93%%&gt;&lt;%%93%%&gt;t&lt;%%91%%&gt;25GP-Art-Object&lt;%%93%%&gt; &lt;%%93%%&gt;&lt;%%93%%&gt; with &lt;%%91%%&gt;&lt;%%91%%&gt; &lt;%%91%%&gt;&lt;%%91%%&gt;1d4&lt;%%93%%&gt;&lt;%%93%%&gt;t&lt;%%91%%&gt;Magic-Item-Table-B&lt;%%93%%&gt; &lt;%%93%%&gt;&lt;%%93%%&gt; --5 -- !import-table-item --Treasure-Hoard-CR0-4 --&lt;%%91%%&gt;&lt;%%91%%&gt;6d6 100&lt;%%93%%&gt;&lt;%%93%%&gt; Copper, &lt;%%91%%&gt;&lt;%%91%%&gt;3d6 100&lt;%%93%%&gt;&lt;%%93%%&gt; Silver, and &lt;%%91%%&gt;&lt;%%91%%&gt;2d6 10&lt;%%93%%&gt;&lt;%%93%%&gt; Gold with &lt;%%91%%&gt;&lt;%%91%%&gt; &lt;%%91%%&gt;&lt;%%91%%&gt;2d6&lt;%%93%%&gt;&lt;%%93%%&gt;t&lt;%%91%%&gt;50GP-Gemstones&lt;%%93%%&gt; &lt;%%93%%&gt;&lt;%%93%%&gt; with &lt;%%91%%&gt;&lt;%%91%%&gt; &lt;%%91%%&gt;&lt;%%91%%&gt;1d4&lt;%%93%%&gt;&lt;%%93%%&gt;t&lt;%%91%%&gt;Magic-Item-Table-B&lt;%%93%%&gt; &lt;%%93%%&gt;&lt;%%93%%&gt; --5 -- !import-table-item --Treasure-Hoard-CR0-4 --&lt;%%91%%&gt;&lt;%%91%%&gt;6d6 100&lt;%%93%%&gt;&lt;%%93%%&gt; Copper, &lt;%%91%%&gt;&lt;%%91%%&gt;3d6 100&lt;%%93%%&gt;&lt;%%93%%&gt; Silver, and &lt;%%91%%&gt;&lt;%%91%%&gt;2d6 10&lt;%%93%%&gt;&lt;%%93%%&gt; Gold with &lt;%%91%%&gt;&lt;%%91%%&gt; &lt;%%91%%&gt;&lt;%%91%%&gt;2d4&lt;%%93%%&gt;&lt;%%93%%&gt;t&lt;%%91%%&gt;10GP-Gemstones&lt;%%93%%&gt; &lt;%%93%%&gt;&lt;%%93%%&gt; with &lt;%%91%%&gt;&lt;%%91%%&gt; &lt;%%91%%&gt;&lt;%%91%%&gt;1d4&lt;%%93%%&gt;&lt;%%93%%&gt;t&lt;%%91%%&gt;Magic-Item-Table-C&lt;%%93%%&gt; &lt;%%93%%&gt;&lt;%%93%%&gt; --3 -- !import-table-item --Treasure-Hoard-CR0-4 --&lt;%%91%%&gt;&lt;%%91%%&gt;6d6 100&lt;%%93%%&gt;&lt;%%93%%&gt; Copper, &lt;%%91%%&gt;&lt;%%91%%&gt;3d6 100&lt;%%93%%&gt;&lt;%%93%%&gt; Silver, and &lt;%%91%%&gt;&lt;%%91%%&gt;2d6 10&lt;%%93%%&gt;&lt;%%93%%&gt; Gold with &lt;%%91%%&gt;&lt;%%91%%&gt; &lt;%%91%%&gt;&lt;%%91%%&gt;2d4&lt;%%93%%&gt;&lt;%%93%%&gt;t&lt;%%91%%&gt;25GP-Art-Object&lt;%%93%%&gt; &lt;%%93%%&gt;&lt;%%93%%&gt; with &lt;%%91%%&gt;&lt;%%91%%&gt; &lt;%%91%%&gt;&lt;%%91%%&gt;1d4&lt;%%93%%&gt;&lt;%%93%%&gt;t&lt;%%91%%&gt;Magic-Item-Table-C&lt;%%93%%&gt; &lt;%%93%%&gt;&lt;%%93%%&gt; --2 -- !import-table-item --Treasure-Hoard-CR0-4 --&lt;%%91%%&gt;&lt;%%91%%&gt;6d6 100&lt;%%93%%&gt;&lt;%%93%%&gt; Copper, &lt;%%91%%&gt;&lt;%%91%%&gt;3d6 100&lt;%%93%%&gt;&lt;%%93%%&gt; Silver, and &lt;%%91%%&gt;&lt;%%91%%&gt;2d6 10&lt;%%93%%&gt;&lt;%%93%%&gt; Gold with &lt;%%91%%&gt;&lt;%%91%%&gt; &lt;%%91%%&gt;&lt;%%91%%&gt;2d6&lt;%%93%%&gt;&lt;%%93%%&gt;t&lt;%%91%%&gt;50GP-Gemstones&lt;%%93%%&gt; &lt;%%93%%&gt;&lt;%%93%%&gt; with &lt;%%91%%&gt;&lt;%%91%%&gt; &lt;%%91%%&gt;&lt;%%91%%&gt;1d4&lt;%%93%%&gt;&lt;%%93%%&gt;t&lt;%%91%%&gt;Magic-Item-Table-C&lt;%%93%%&gt; &lt;%%93%%&gt;&lt;%%93%%&gt; --5 -- !import-table-item --Treasure-Hoard-CR0-4 --&lt;%%91%%&gt;&lt;%%91%%&gt;6d6 100&lt;%%93%%&gt;&lt;%%93%%&gt; Copper, &lt;%%91%%&gt;&lt;%%91%%&gt;3d6 100&lt;%%93%%&gt;&lt;%%93%%&gt; Silver, and &lt;%%91%%&gt;&lt;%%91%%&gt;2d6 10&lt;%%93%%&gt;&lt;%%93%%&gt; Gold with &lt;%%91%%&gt;&lt;%%91%%&gt; &lt;%%91%%&gt;&lt;%%91%%&gt;2d4&lt;%%93%%&gt;&lt;%%93%%&gt;t&lt;%%91%%&gt;25GP-Art-Object&lt;%%93%%&gt; &lt;%%93%%&gt;&lt;%%93%%&gt; with &lt;%%91%%&gt;&lt;%%91%%&gt; &lt;%%91%%&gt;&lt;%%91%%&gt;1d4&lt;%%93%%&gt;&lt;%%93%%&gt;t&lt;%%91%%&gt;Magic-Item-Table-F&lt;%%93%%&gt; &lt;%%93%%&gt;&lt;%%93%%&gt; --7 -- !import-table-item --Treasure-Hoard-CR0-4 --&lt;%%91%%&gt;&lt;%%91%%&gt;6d6 100&lt;%%93%%&gt;&lt;%%93%%&gt; Copper, &lt;%%91%%&gt;&lt;%%91%%&gt;3d6 100&lt;%%93%%&gt;&lt;%%93%%&gt; Silver, and &lt;%%91%%&gt;&lt;%%91%%&gt;2d6 10&lt;%%93%%&gt;&lt;%%93%%&gt; Gold with &lt;%%91%%&gt;&lt;%%91%%&gt; &lt;%%91%%&gt;&lt;%%91%%&gt;2d6&lt;%%93%%&gt;&lt;%%93%%&gt;t&lt;%%91%%&gt;50GP-Gemstones&lt;%%93%%&gt; &lt;%%93%%&gt;&lt;%%93%%&gt; with &lt;%%91%%&gt;&lt;%%91%%&gt; &lt;%%91%%&gt;&lt;%%91%%&gt;1d4&lt;%%93%%&gt;&lt;%%93%%&gt;t&lt;%%91%%&gt;Magic-Item-Table-F&lt;%%93%%&gt; &lt;%%93%%&gt;&lt;%%93%%&gt; --5 -- !import-table-item --Treasure-Hoard-CR0-4 --&lt;%%91%%&gt;&lt;%%91%%&gt;6d6 100&lt;%%93%%&gt;&lt;%%93%%&gt; Copper, &lt;%%91%%&gt;&lt;%%91%%&gt;3d6 100&lt;%%93%%&gt;&lt;%%93%%&gt; Silver, and &lt;%%91%%&gt;&lt;%%91%%&gt;2d6 10&lt;%%93%%&gt;&lt;%%93%%&gt; Gold with &lt;%%91%%&gt;&lt;%%91%%&gt; &lt;%%91%%&gt;&lt;%%91%%&gt;2d4&lt;%%93%%&gt;&lt;%%93%%&gt;t&lt;%%91%%&gt;25GP-Art-Object&lt;%%93%%&gt; &lt;%%93%%&gt;&lt;%%93%%&gt; with &lt;%%91%%&gt;&lt;%%91%%&gt; 1t&lt;%%91%%&gt;Magic-Item-Table-G&lt;%%93%%&gt; &lt;%%93%%&gt;&lt;%%93%%&gt; --2 -- !import-table-item --Treasure-Hoard-CR0-4 --&lt;%%91%%&gt;&lt;%%91%%&gt;6d6 100&lt;%%93%%&gt;&lt;%%93%%&gt; Copper, &lt;%%91%%&gt;&lt;%%91%%&gt;3d6 100&lt;%%93%%&gt;&lt;%%93%%&gt; Silver, and &lt;%%91%%&gt;&lt;%%91%%&gt;2d6*10&lt;%%93%%&gt;&lt;%%93%%&gt; Gold with &lt;%%91%%&gt;&lt;%%91%%&gt; &lt;%%91%%&gt;&lt;%%91%%&gt;2d6&lt;%%93%%&gt;&lt;%%93%%&gt;t&lt;%%91%%&gt;50GP-Gemstones&lt;%%93%%&gt; &lt;%%93%%&gt;&lt;%%93%%&gt; with &lt;%%91%%&gt;&lt;%%91%%&gt; 1t&lt;%%91%%&gt;Magic-Item-Table-G&lt;%%93%%&gt; &lt;%%93%%&gt;&lt;%%93%%&gt; --1 --
Scott- Don't sell yourself short. I took away those spaces and most of the table is now working fine. Still have an error on at least one magic items (coming up as 0 in the output text) but will eventually figure that one out.&nbsp;
1468967401
The Aaron
Pro
API Scripter
Yay teamwork! Glad you seem to be getting it working. I pinged Phil that bug report and he's going to try and take a look at it in the near term. Hopefully it will cease to be an issue. :)
As a non coder it makes absolutely no sense to me that I could run each and every one of those table entries in chat successfully. &nbsp;I am a Pastor though, and am often saying we &nbsp;need to take some things on faiith! Hard to be on the other end of the statement :)
1468980340
The Aaron
Pro
API Scripter
Yeah, agreed. &nbsp;The basic reason is that the chat system uses a different system for parsing messages than the API does. &nbsp;I find this to be unfortunate duplication for exactly this reason. &nbsp;If they both shared the same parser, they would both work and fail in the same way. In pastor terms, it would be like translating one of those word codes were one person is using the NIV Bible and the other the AMP Bible.&nbsp; 2 Corinthians 10:13, 2nd word. &nbsp;'on' does not equal 'however'.
AMEN! But please no talk about codes and the Bible- I wasn't a Christian when the Bible Code thing was so popular but it still has some reverberations in the community :) You know what though, it seems like everything works better in the parser for the chat... I vote they just take that system. Make it so!
1468985237
The Aaron
Pro
API Scripter
HAHAHAHA. No worries. (Honestly, I didn't even know the Bible Code was a thing... Just looking for a pertinent analogy. =D) Re: the parser - totally agree. :)
Allright- Have the treasure hoard tables for 0-4 and 5-10 working perfectly (or so it seems.) My OCD is making me do the last two even though I won't be using them for a bit. &nbsp;You guys have trained me to make a test table and try out bits of the code so this time I have zeroed in on a problem pretty tightly before bringing it here for help.&nbsp; [[4d6*1000]] Gold and [[5d6*100]] Platinum with [[[[3d6]]t[500GP-Gemstones]]] with [[[[1d4]]t[Magic-Item-Table-A]]] and [[[[1d6]]t[Magic-Item-Table-B]]] seems to work sometimes but not all the time.&nbsp; 16000 Gold and 700 Platinum with Black pearl (opaque pure black) worth 500GP, Peridot (transparent rich olive green) worth 500GP, Aquamarine (transparent pale blue-green) worth 500GP, Alexandrite (transparent dark green) worth 500GP, Alexandrite (transparent dark green) worth 500GP, Aquamarine (transparent pale blue-green) worth 500GP, Blue spinel (transparent deep blue) worth 500GP, Alexandrite (transparent dark green) worth 500GP, Alexandrite (transparent dark green) worth 500GP, Aquamarine (transparent pale blue-green) worth 500GP with Potion of Healing, Cantrip Spell Scroll, !st Level Spell Scroll and Elemental Gem, Keoghtom's Ointment, Potion of Greater Healing, Keoghtom's Ointment, Potion of Growth shows when it is working. Not I get items from table A and B. Just when I think I have a &nbsp;good entry the following shows up. (it isn't caused by the typo on 1(!)st level spell scroll though I have since fixed it) 13000 Gold and 2300 Platinum with Alexandrite (transparent dark green) worth 500GP, Alexandrite (transparent dark green) worth 500GP, Black pearl (opaque pure black) worth 500GP, Black pearl (opaque pure black) worth 500GP, Alexandrite (transparent dark green) worth 500GP, Topaz (transparent golden yellow) worth 500GP, Blue spinel (transparent deep blue) worth 500GP, Aquamarine (transparent pale blue-green) worth 500GP, Blue spinel (transparent deep blue) worth 500GP, Topaz (transparent golden yellow) worth 500GP, Black pearl (opaque pure black) worth 500GP, Aquamarine (transparent pale blue-green) worth 500GP with Potion of Healing, Potion of Greater Healing, !st Level Spell Scroll and 0 What could make that 0 show up? The table it is reading from is a simple one result per entry.&nbsp;
1469023090
The Aaron
Pro
API Scripter
I can think of 2 possibilities: 1) The recursion depth has been hit. &nbsp;To avoid an infinite loop, I put a maximum number of iterations it would evaluate table results. &nbsp;I set it to 10 (or 11, might be off by one..). &nbsp;You could manually change that (see line 11: "maxParseDepth = 10," change the 10 to a 20 and see if it still has the problem), I haven't added a configuration for it yet as I want to rewrite some other things. &nbsp;Sorry! 2) The sendChat() dice roller seems to have an upper limit on the number of inline rolls it will parse. &nbsp;I'm not certain what that limit is, but anecdotal evidence seems to indicate it is about 100 rolls. &nbsp; Unfortunately, the fix for this is rewriting the calls to be less complicated (what I'm wanting to do). &nbsp;I opened a bug about this 9 months ago but it hasn't had any responses. =( &nbsp; <a href="https://app.roll20.net/forum/post/2466383/bug-api-" rel="nofollow">https://app.roll20.net/forum/post/2466383/bug-api-</a>... I'd say try #1 above and see if that works. &nbsp;If it doesn't, maybe I can get Scott to proxy me on some changes as he's already familiar with the code and I'll have a hard time working on it in the next few months.. =(
1469023597
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
Sure thing, as long as you trust me to make official changes to your code ;).
1469023752
The Aaron
Pro
API Scripter
Trust but verify! &nbsp;=D
1469023909
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
Heh, I'm good with that.
1469024084
The Aaron
Pro
API Scripter
Hit me up on Gitter and I'll lay out my plans? =D
The chat limit- is that per call?
Nope still getting that 0 with after I upped it to 20. And the 0 doesnt seem to be linked to the number of table evaluations. It has worked on evaluations of 10 or more and failed after returning 4 table rolls and putting a 0 on the fifth
1469103359
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
Is it always at the end?
If it shows up it is always at the end. But seemingly not dependent on the number of table evaluations.&nbsp;
Here are some examples&nbsp; (From Gary W. (GM)): 15000 Gold and 1700 Platinum with Carved ivory statuette worth 250GP, Silver necklace with a gemstone pendant worth 250GP, Gold ring set with bloodstones worth 250GP, Gold bird cage with electrum filigree worth 250GP, Silk robe with gold embroidery worth 250GP, Box of turquoise animal figurines worth 250GP, Carved ivory statuette worth 250GP with Armor +3 Splint 7:25AM(From Gary W. (GM)): 12000 Gold and 1500 Platinum with Gold bird cage with electrum filigree worth 250GP, Gold bird cage with electrum filigree worth 250GP, Large gold bracelet worth 250GP, Bra ss mug with jade inlay worth 250GP, Large well-made tapestry worth 250GP with Plate Armor of Etherealness 7:25AM(From Gary W. (GM)): 13000 Gold and 1500 Platinum with Gold ring set with bloodstones worth 250GP, Gold bird cage with electrum filigree worth 250GP with 0 7:25AM(From Gary W. (GM)): 18000 Gold and 1300 Platinum with Box of turquoise animal figurines worth 250GP, Silk robe with gold embroidery worth 250GP, Bronze crown worth 250GP, Bra ss mug with jade inlay worth 250GP, Large gold bracelet worth 250GP, Gold ring set with bloodstones worth 250GP with Vorpal Sword 7:25AM(From Gary W. (GM)): 15000 Gold and 1900 Platinum with Box of turquoise animal figurines worth 250GP, Large gold bracelet worth 250GP, Box of turquoise animal figurines worth 250GP, Bronze crown worth 250GP, Carved ivory statuette worth 250GP, Large well-made tapestry worth 250GP, Gold bird cage with electrum filigree worth 250GP with Scarab of Protection 7:25AM(From Gary W. (GM)): 18000 Gold and 1200 Platinum with Silver necklace with a gemstone pendant worth 250GP, Silk robe with gold embroidery worth 250GP, Large gold bracelet worth 250GP with Talisman of Ultimate Evil 7:25AM(From Gary W. (GM)): 16000 Gold and 1300 Platinum with Large gold bracelet worth 250GP, Silk robe with gold embroidery worth 250GP, Bronze crown worth 250GP, Gold ring set with bloodstones worth 250GP with 0 7:25AM(From Gary W. (GM)): 16000 Gold and 1600 Platinum with Gold ring set with bloodstones worth 250GP, Silver necklace with a gemstone pendant worth 250GP, Large well-made tapestry worth 250GP, Bronze crown worth 250GP, Silver necklace with a gemstone pendant worth 250GP, Silver necklace with a gemstone pendant worth 250GP with 0
1469105013

Edited 1469105122
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
Hmm, ok, Since I'm gonna be proxying the update for Aaron, and I'd like to see if this is a bug or an error in the entry, could you add log(msg.content); in between lines 99 and 100, and 101 and 102: Like this: 98 if(context.depth &lt; maxParseDepth && msg.content.match(/\[\[.+\]\]/)){ 99 ++context.depth; log(context.depth+msg.content); 100 sendChat('',msg.content,function(msg){parseMessage(msg,context);}); 101 } else { log('final'); log(context.depth+msg.content); 102 sendChat(context.who, (context.rolltemplate ? '&{template:'+context.rolltemplate+'} ':'')+msg.content.replace(/%%SLASH%%/,'/')); 103 } And then post the log entries for an occurence of the zero.
1469107353
The Aaron
Pro
API Scripter
(That's precisely what I was going to pursue when I got on my computer!)
Complete non coder here- Think I added the entries correctly but where would I find the log. Is it this entry in the API output console? "%%SLASH%%w gm [[4d6*1000]] Gold and [[5d6*100]] Platinum with [[[[2d4]]t[250GP-Art-Object]]] with [[1t[Magic-Item-Table-I]]]" "%%SLASH%%w gm 20000 Gold and 1800 Platinum with Bra ss mug with jade inlay worth 250GP, Box of turquoise animal figurines worth 250GP, Silver necklace with a gemstone pendant worth 250GP, Large well-made tapestry worth 250GP with 0"
1469113604

Edited 1469113761
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
Yep, that's it. It looks like you have an item in your magic item or art object table that resolves to a 0 somehow. I'd take a look at the entries there and see if one of them is not what it is supposed to be and/or post a table export of those tables.
All the tables involved here are simple i item entries EXCEPT for the fact that the Magic Table does have a small percentage chance to roll on the armor table. &nbsp;It seems like the problem is the magic table (maybe when it has to roll on the armor table?) because the art object are listed out and the 0 comes after the "with" which is the connector between the art and magic tables&nbsp; (From ): !import-table --Magic-Item-Table-I --hide !import-table-item --Magic-Item-Table-I --Defender --5 -- !import-table-item --Magic-Item-Table-I --Hammer of Thunderbolts --5 -- !import-table-item --Magic-Item-Table-I --Luck Blade --5 -- !import-table-item --Magic-Item-Table-I --Sword of Answering --5 -- !import-table-item --Magic-Item-Table-I --Holy Avenger --3 -- !import-table-item --Magic-Item-Table-I --Ring of Djinni Summoning --3 -- !import-table-item --Magic-Item-Table-I --Ring of Invisibility --3 -- !import-table-item --Magic-Item-Table-I --Ring of Spell Turning --3 -- !import-table-item --Magic-Item-Table-I --Rod of Lordly Might --3 -- !import-table-item --Magic-Item-Table-I --Staff of the Magi --3 -- !import-table-item --Magic-Item-Table-I --Vorpal Sword --3 -- !import-table-item --Magic-Item-Table-I --Belt of Cloud Giant Strength --2 -- !import-table-item --Magic-Item-Table-I --Armor +2 Breastplate --2 -- !import-table-item --Magic-Item-Table-I --Armor +3 Chain Mail --2 -- !import-table-item --Magic-Item-Table-I --Armor +3 Chain Shirt --2 -- !import-table-item --Magic-Item-Table-I --Cloak of Invisibility --2 -- !import-table-item --Magic-Item-Table-I --Crystal ball (legendary version) --2 -- !import-table-item --Magic-Item-Table-I --Armor +1 Half Plate --2 -- !import-table-item --Magic-Item-Table-I --Iron Flask --2 -- !import-table-item --Magic-Item-Table-I --Armor +3 Leather --2 -- !import-table-item --Magic-Item-Table-I --Armor +1 Plate --2 -- !import-table-item --Magic-Item-Table-I --Robe of the Archmagi --2 -- !import-table-item --Magic-Item-Table-I --Rod of Resurrection --2 -- !import-table-item --Magic-Item-Table-I --Armor +1 Scale Mail --2 -- !import-table-item --Magic-Item-Table-I --Scarab of Protection --2 -- !import-table-item --Magic-Item-Table-I --Armor + 2 splint --2 -- !import-table-item --Magic-Item-Table-I --Armor +2 Studded Leather --2 -- !import-table-item --Magic-Item-Table-I --Well of Many Worlds --2 -- !import-table-item --Magic-Item-Table-I --&lt;%%91%%&gt;&lt;%%91%%&gt;1t&lt;%%91%%&gt;Magic-Armor-Table-I&lt;%%93%%&gt; &lt;%%93%%&gt;&lt;%%93%%&gt; --1 -- !import-table-item --Magic-Item-Table-I --Apparatus of Kwalish --1 -- !import-table-item --Magic-Item-Table-I --Armor of Invulnerability --1 -- !import-table-item --Magic-Item-Table-I --Belt of Storm Giant Strength --1 -- !import-table-item --Magic-Item-Table-I --Cubic Gate --1 -- !import-table-item --Magic-Item-Table-I --Deck of Many Things --1 -- !import-table-item --Magic-Item-Table-I --Efreeti Chain --1 -- !import-table-item --Magic-Item-Table-I --Armor of resistance (Half Plate) --1 -- !import-table-item --Magic-Item-Table-I --Horn of Valhalla (iron) --1 -- !import-table-item --Magic-Item-Table-I --Instrument of the Bards (Ollamh Harp) --1 -- !import-table-item --Magic-Item-Table-I --Ioun Stone greater absorption --1 -- !import-table-item --Magic-Item-Table-I --Ioun Stone Mastery --1 -- !import-table-item --Magic-Item-Table-I --Ioum Stone Regeneration --1 -- !import-table-item --Magic-Item-Table-I --Plate Armor of Etherealness --1 -- !import-table-item --Magic-Item-Table-I --Plate Armor of Resistance --1 -- !import-table-item --Magic-Item-Table-I --Ring of Air Elemental Command --1 -- !import-table-item --Magic-Item-Table-I --Ring of Earth Elemental Command --1 -- !import-table-item --Magic-Item-Table-I --Ring of Fire Elemental Command --1 -- !import-table-item --Magic-Item-Table-I --Ring of Three Wishes --1 -- !import-table-item --Magic-Item-Table-I --Ring of Water Elemental Command --1 -- !import-table-item --Magic-Item-Table-I --Sphere of Annihilation --1 -- !import-table-item --Magic-Item-Table-I --Talisman of Pure Good --1 -- !import-table-item --Magic-Item-Table-I --Talisman of the Sphere --1 -- !import-table-item --Magic-Item-Table-I --Talisman of Ultimate Evil --1 -- !import-table-item --Magic-Item-Table-I --Tome of the Stilled Tongue --1 -- (From ): !import-table --Magic-Armor-Table-I --hide !import-table-item --Magic-Armor-Table-I --Armor +2 Half Plate --2 -- !import-table-item --Magic-Armor-Table-I --Armor +2 Plate --2 -- !import-table-item --Magic-Armor-Table-I --Armor +3 Studded Leather --2 -- !import-table-item --Magic-Armor-Table-I --Armor +3 Breastplate --2 -- !import-table-item --Magic-Armor-Table-I --Armor +3 Splint --2 -- !import-table-item --Magic-Armor-Table-I --Armor +3 Half Plate --1 -- !import-table-item --Magic-Armor-Table-I --Armor +3 Plate --1 -- (From ): !import-table --250GP-Art-Object --show !import-table-item --250GP-Art-Object --Gold ring set with bloodstones worth 250GP --1 -- !import-table-item --250GP-Art-Object --Carved ivory statuette worth 250GP --1 -- !import-table-item --250GP-Art-Object --Large gold bracelet worth 250GP --1 -- !import-table-item --250GP-Art-Object --Silver necklace with a gemstone pendant worth 250GP --1 -- !import-table-item --250GP-Art-Object --Bronze crown worth 250GP --1 -- !import-table-item --250GP-Art-Object --Silk robe with gold embroidery worth 250GP --1 -- !import-table-item --250GP-Art-Object --Large well-made tapestry worth 250GP --1 -- !import-table-item --250GP-Art-Object --Bra ss mug with jade inlay worth 250GP --1 -- !import-table-item --250GP-Art-Object --Box of turquoise animal figurines worth 250GP --1 -- !import-table-item --250GP-Art-Object --Gold bird cage with electrum filigree worth 250GP --1 --
1469191382

Edited 1469192716
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
Sorry it's taken so long Gary. I can't see anything in there that would cause that 0. Do you ever get a magic armor result? I'll try importing your tables to my sandbox tonight and see if I can't zero in on the problem with some more in depth logging and investigation. If there are any tables that you haven't exported yet that are used in your macro, could you post them?
Yup I have gotten a magic armor result before- I believe the only way to get the plus 3 plates are off of that table and I have seen them. At least off of a roll from the magic item table I leading to a roll on the magic armor table i&nbsp;
I have tons of tables- but the only ones in play on that 0 result you already have.&nbsp;
1469212292
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
Yep, just the ones in that macro you C&P'd above will be fine, I'll let you know what I find tomorrow probably
Thank you- no big rush on this. We are currently level 4... won't be rolling on that table anytime to soon :)&nbsp;