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

Creating numbered tables without the rolling

1383490024
Hoob
Marketplace Creator
I play a lot of Dark Heresy, so easy use of tables is a big deal for me. Thing is, rollable tables are, for the most part, pretty useless to me. What I need is to be able to populate a table with results, each numbered, then call out a specific result by punching in the appropriate number. Is this functionality supported by Roll20 and I've just missed it, or what?
I would really love something like this. Though it would probably be incredibly easy to do with the API it'd be nice to have it as a core feature.
This could be implemented easily using the API. I've been adding these types of tables to my Class prototypes for BFRPG. Allows for easy lookup on the number of spells at a given level or target numbers for skills.
1383496695
Hoob
Marketplace Creator
Think you could possibly give me some kinda template to work off of? I'm sure I could blunder through it if I tried, but something to work with would be incredibly handy.
1383499073

Edited 1383499274
I'm on vacation and posting from my tablet without good access to my scripts. What you're looking for is pretty straight forward and I would implement as a set of nested objects. Start with a tables object as sort of container, then use its keys as an index of table names, pointing to the array that makes up the table. It would be used from chat by sending !lookup tablename index You could also just select items from a roll table using a similar interface. This would give you the ability to edit the tables without diving in to the api, but you'd need to include the index value in the roll table items' names since they are not stored in a way guaranteed to be sorted. The roll table items weight property could be repurposed as a numerical index if you don't ever plan to actually roll on the table. If you make this a request in the API forum, some one might take up the challenge. I could provide you some code in a few days when I'm back in front of a real keyboard.
So I'm back from vacation and as promised, here is a very simple example of API-based tables. <a href="https://gist.github.com/goblinHordes/7314322" rel="nofollow">https://gist.github.com/goblinHordes/7314322</a>
1383643308
Hoob
Marketplace Creator
Awesome, great thing to come home to. This should make it easy for me, I'm competent enough with coding to modify this especially with how well commented it is. Thanks heaps!