I remember when Aaron posted his Table-Export script and thinking how useful it could be. Manually putting items into tables via the Roll20 VTT was rather painful. But between family and career I never had the time it seemed and simply forgot about it.
Then Aaron came out with his great “Recursive-Table” script and I knew sooner or later I would need to build some tables on Roll 20. But once again other issues took away my free time. So here it is months (if not years) after he produced these two scripts and I am finally in a position to do some work with them.
To add items into a table one must create lines that look like this:
!import-table --nuts --hide
This command lets the script know you want to create a new table, named nuts and then hide the output from the chat window.
!import-table-item --nuts --Acorn --1
!import-table-item --nuts --Beech --1
!import-table-item --nuts --Breadnut --1
!import-table-item --nuts --Candlenut --1
!import-table-item --nuts --Chestnuts --1
!import-table-item --nuts --Chinese chestnuts --1
!import-table-item --nuts --Sweet chestnuts --1
!import-table-item --nuts --Deeknut --1
!import-table-item --nuts --Johnstone River almond --1
!import-table-item --nuts --Kola nut --1
!import-table-item --nuts --Kurrajong --1
These lines input the items in the table; giving them all a weight of 1. Of course typing all of this in a text file is not that much fun either.
Wouldn’t it be better to just worry about the list of items you want to enter instead of all of the repeated commands? Here is how to do it with Excel (I believe there is a way in Open Office but I’ve not experimented with it.) I’ve been building “game aids” in Excel for years and never felt the need to re-build too many items in Roll20. But with Recursive Tables… I figured I would give it a try.
First, I broke the script parts into cells. Then came the challenge of adding the necessary spaces between the items.
For that I use the Concatenate command. Column I puts all of the pieces back together and puts the proper spacing in place. In Excel you can grab the bottom right corner of a cell and drag it down which will duplicate the cell as many times as you want. Any number in the cell will grow by one though so you have to copy and paste the “1” into Column G.
Once you have the parts in the right places it speeds everything up tremendously. You can build one row, and then pull down the entire row and duplicate it over and over. It is easy to add more rows when needed. So then you just need to change the name of the table in Column C and put the list in Column E:
Acorn
Beech
Breadnut
Candlenut
Chestnuts
Chinese chestnuts
Sweet chestnuts
Deeknut
Johnstone River almond
Kola nut
Kurrajong
To see how well it worked I wanted to go find and build some tables. I couldn’t use most of my work as it uses DND 3.5 edition copyrighted material. So I turned to Wikipedia.
Here’s two quick examples.
!import-table --haircolor --hide
!import-table-item --haircolor --Black --40
!import-table-item --haircolor --Brown --30
!import-table-item --haircolor --Deep Brunette --10
!import-table-item --haircolor --Medium Brown --10
!import-table-item --haircolor --Light Brown --10
!import-table-item --haircolor --Chestnut Brown --5
!import-table-item --haircolor --Light Chestnut Brown --5
!import-table-item --haircolor --Auburn --10
!import-table-item --haircolor --Copper --5
!import-table-item --haircolor --Red --1
!import-table-item --haircolor --Titian --5
!import-table-item --haircolor --Strawberry Blonde --5
!import-table-item --haircolor --Light Blonde --5
!import-table-item --haircolor --Dark Blonde --10
!import-table-item --haircolor --Golden Blonde --15
!import-table-item --haircolor --Grey --20
!import-table-item --haircolor --White --2
!import-table --eyecolor --hide
!import-table-item --eyecolor --Amber --5
!import-table-item --eyecolor --Blue --20
!import-table-item --eyecolor --Brown --40
!import-table-item --eyecolor --Gray --10
!import-table-item --eyecolor --Green --15
!import-table-item --eyecolor --Hazel --10
!import-table-item --eyecolor --Red --1
!import-table-item --eyecolor --Violet --5
!import-table-item --eyecolor --Mixed --2
I data-mined and created 17 charts off of Wikipedia (and other sites) in under an hour. I then imported them all into one of my games with one copy and paste. These aren’t exactly useful charts as they sit perhaps, but could be altered for use in a number of different settings.
Rollable Tables: https://wiki.roll20.net/Collections#Rollable_Tables
Table Export Script: https://app.roll20.net/forum/post/1144568/slug%7D
Recursive Table: https://app.roll20.net/forum/post/2845333/script-recursivetables-expands-inline-rolls-in-rollable-table-results/?pagenum=1
For all of the charts I created; they can be found here:
https://docs.google.com/document/d/1o7FDW_rCNjGk9Q0GeYQQ-mC5Uo96_CZErHbpQjsdSCk/edit?usp=sharing
*You need to be a Pro member in order to use API scripts.
Then Aaron came out with his great “Recursive-Table” script and I knew sooner or later I would need to build some tables on Roll 20. But once again other issues took away my free time. So here it is months (if not years) after he produced these two scripts and I am finally in a position to do some work with them.
To add items into a table one must create lines that look like this:
!import-table --nuts --hide
This command lets the script know you want to create a new table, named nuts and then hide the output from the chat window.
!import-table-item --nuts --Acorn --1
!import-table-item --nuts --Beech --1
!import-table-item --nuts --Breadnut --1
!import-table-item --nuts --Candlenut --1
!import-table-item --nuts --Chestnuts --1
!import-table-item --nuts --Chinese chestnuts --1
!import-table-item --nuts --Sweet chestnuts --1
!import-table-item --nuts --Deeknut --1
!import-table-item --nuts --Johnstone River almond --1
!import-table-item --nuts --Kola nut --1
!import-table-item --nuts --Kurrajong --1
These lines input the items in the table; giving them all a weight of 1. Of course typing all of this in a text file is not that much fun either.
Wouldn’t it be better to just worry about the list of items you want to enter instead of all of the repeated commands? Here is how to do it with Excel (I believe there is a way in Open Office but I’ve not experimented with it.) I’ve been building “game aids” in Excel for years and never felt the need to re-build too many items in Roll20. But with Recursive Tables… I figured I would give it a try.
A | B | C | D | E | F | G | |
1 | |||||||
2 | !import-table-item | -- | Table Name | -- | Table Item | -- | 1 |
3 | |||||||
4 | |||||||
5 |
First, I broke the script parts into cells. Then came the challenge of adding the necessary spaces between the items.
H | I |
2 | =CONCATENATE(A2," ",B2,C2," ",D2,E2, " ",F2,G2) |
For that I use the Concatenate command. Column I puts all of the pieces back together and puts the proper spacing in place. In Excel you can grab the bottom right corner of a cell and drag it down which will duplicate the cell as many times as you want. Any number in the cell will grow by one though so you have to copy and paste the “1” into Column G.
Once you have the parts in the right places it speeds everything up tremendously. You can build one row, and then pull down the entire row and duplicate it over and over. It is easy to add more rows when needed. So then you just need to change the name of the table in Column C and put the list in Column E:
Acorn
Beech
Breadnut
Candlenut
Chestnuts
Chinese chestnuts
Sweet chestnuts
Deeknut
Johnstone River almond
Kola nut
Kurrajong
To see how well it worked I wanted to go find and build some tables. I couldn’t use most of my work as it uses DND 3.5 edition copyrighted material. So I turned to Wikipedia.
Here’s two quick examples.
!import-table --haircolor --hide
!import-table-item --haircolor --Black --40
!import-table-item --haircolor --Brown --30
!import-table-item --haircolor --Deep Brunette --10
!import-table-item --haircolor --Medium Brown --10
!import-table-item --haircolor --Light Brown --10
!import-table-item --haircolor --Chestnut Brown --5
!import-table-item --haircolor --Light Chestnut Brown --5
!import-table-item --haircolor --Auburn --10
!import-table-item --haircolor --Copper --5
!import-table-item --haircolor --Red --1
!import-table-item --haircolor --Titian --5
!import-table-item --haircolor --Strawberry Blonde --5
!import-table-item --haircolor --Light Blonde --5
!import-table-item --haircolor --Dark Blonde --10
!import-table-item --haircolor --Golden Blonde --15
!import-table-item --haircolor --Grey --20
!import-table-item --haircolor --White --2
!import-table --eyecolor --hide
!import-table-item --eyecolor --Amber --5
!import-table-item --eyecolor --Blue --20
!import-table-item --eyecolor --Brown --40
!import-table-item --eyecolor --Gray --10
!import-table-item --eyecolor --Green --15
!import-table-item --eyecolor --Hazel --10
!import-table-item --eyecolor --Red --1
!import-table-item --eyecolor --Violet --5
!import-table-item --eyecolor --Mixed --2
I data-mined and created 17 charts off of Wikipedia (and other sites) in under an hour. I then imported them all into one of my games with one copy and paste. These aren’t exactly useful charts as they sit perhaps, but could be altered for use in a number of different settings.
Rollable Tables: https://wiki.roll20.net/Collections#Rollable_Tables
Table Export Script: https://app.roll20.net/forum/post/1144568/slug%7D
Recursive Table: https://app.roll20.net/forum/post/2845333/script-recursivetables-expands-inline-rolls-in-rollable-table-results/?pagenum=1
For all of the charts I created; they can be found here:
https://docs.google.com/document/d/1o7FDW_rCNjGk9Q0GeYQQ-mC5Uo96_CZErHbpQjsdSCk/edit?usp=sharing
*You need to be a Pro member in order to use API scripts.