Tables tbl() column support?

Thoughts, Help, Feature Requests, Bug Reports, Developing code for...

Moderators: dorpond, trevor, Azhrei

Forum rules
PLEASE don't post images of your entire desktop, attach entire campaign files when only a single file is needed, or generally act in some other anti-social behavior. :)
Post Reply
chap126
Kobold
Posts: 24
Joined: Wed Jul 31, 2013 9:57 am

Tables tbl() column support?

Post by chap126 »

I've read rumours in the past that there may be addColumn() support coming to Maptool tables sometime in the future, is there any substantiation on that? I'm getting ready to do some heavy macro/table making and column support would be a game changer of course, so if that's on the horizon I might stick to excel for the present, or if that's not in the foreseeable future I might as well go ahead and do the macros now.

User avatar
Full Bleed
Demigod
Posts: 4736
Joined: Sun Feb 25, 2007 11:53 am
Location: FL

Re: Tables tbl() column support?

Post by Full Bleed »

chap126 wrote:I've read rumours in the past that there may be addColumn() support coming to Maptool tables sometime in the future, is there any substantiation on that? I'm getting ready to do some heavy macro/table making and column support would be a game changer of course, so if that's on the horizon I might stick to excel for the present, or if that's not in the foreseeable future I might as well go ahead and do the macros now.
I've never read about that function/feature being developed... and a search pulls up nothing but your post.

I'd proceed with zero expectation of it happening any time soon.
Maptool is the Millennium Falcon of VTT's -- "She may not look like much, but she's got it where it counts."

User avatar
aliasmask
RPTools Team
Posts: 9024
Joined: Tue Nov 10, 2009 6:11 pm
Location: Bay Area

Re: Tables tbl() column support?

Post by aliasmask »

I usually use lib tokens to hold all my data. I use json objects for multiple columns of data. If you give me an example of the data and I"ll give you an example of how to set up your data structures.

chap126
Kobold
Posts: 24
Joined: Wed Jul 31, 2013 9:57 am

Re: Tables tbl() column support?

Post by chap126 »

The big one would be monsters: I could have a table I that rolls a random forest encounter and have a single monster table II that had columns for all their individual stats. So if I rolled a bear it would have a column for strength, dex, con, int, wis, cha, attack 1, attack 2, attack 3, and description, and could simply reference that to generate a new bear to fight.
So in pseudocode the first table might be

Forest encounter Table
1-18 2d6 Bandit
19-20 1d2 Bear

Monster Table
Name - Bear| HP-5d6| HD-7| Strength - 5d6| Dex- 3d6| Int - 1d6|Wis - 1d6| Con-5d6| Cha - 1d6|Attack 1- Swipe|Attack 2- Hug|Attack 3- None|Description- A fierce woodland critter.

Then the macro would be generate an encounter based on SELECT|TerrainType and create #monsters Monster tokens.

The rumours I saw include this discussion on databases:
http://forums.rptools.net/viewtopic.php?f=86&t=25848

and this discussion on table features:
http://forums.rptools.net/viewtopic.php?f=86&t=26612
Jagged wrote:
wolph42 wrote: Now the *only* thing this lacks is 'addTableColumn'... and I know, that would require an entire new table system. But still one keeps dreaming...
That will come :)

Although it will probably be a different system for compatibility reasons.
That was 1.5 years ago, so I thought I'd better ask in case anyone is working on it, cause that would be sweet. :D

User avatar
aliasmask
RPTools Team
Posts: 9024
Joined: Tue Nov 10, 2009 6:11 pm
Location: Bay Area

Re: Tables tbl() column support?

Post by aliasmask »

Well, you could put all that data nearly as is in the table. I would structure it as a json though.

Code: Select all

[H: monster = json.set("{}",
   "Name","Bear",
   "HP","5d6",
   "HD",7,
   "Strength", "5d6",
   "Dex", "3d6",
   "Int" , "1d6",
   "Wis" , "1d6",
   "Con","5d6",
   "Cha" , "1d6",
   "Attack 1", "Swipe",
   "Attack 2", "Hug",
   "Attack 3", "None"
   "Description", "A fierce woodland critter."
)]
You would set the table value to monster.

If you already have all this data in a table, there are several post that tell you easy ways to put it in to MT. Here's one of my recent posts on the topic: http://forums.rptools.net/viewtopic.php ... 72#p268085

chap126
Kobold
Posts: 24
Joined: Wed Jul 31, 2013 9:57 am

Re: Tables tbl() column support?

Post by chap126 »

aliasmask wrote:Well, you could put all that data nearly as is in the table. I would structure it as a json though.

...
If you already have all this data in a table, there are several post that tell you easy ways to put it in to MT. Here's one of my recent posts on the topic: http://forums.rptools.net/viewtopic.php ... 72#p268085
Yep! That was the plan, until I browsed the forums and saw rumors for column support in tables. On the off chance that a dev was working on it and it would be out soon, I figured I'd save myself the effort of going the full json route, but it definitely would work.

So would I put each monster as a json array in a table row? Or how would you go about doing that?

User avatar
aliasmask
RPTools Team
Posts: 9024
Joined: Tue Nov 10, 2009 6:11 pm
Location: Bay Area

Re: Tables tbl() column support?

Post by aliasmask »

If you have images for all the monsters or plan to, I would probably put them in a table. I would store all the names as a json array under index 0, then 1 - whatever start adding the monster data as a json object and image if you have it using the table functions. As someone pointed out, if you're going to have images I would use a generic image if you don't have it so you don't get an error trying to retrieve the image. Someone here has a generic monster token set based on type, with different colors. If you can't find it I can zip it up and make a post at a later date.

After a quick search I found the zip. I uploaded it to My Drive: https://drive.google.com/open?id=0ByJAX ... EZPYUROMEk

chap126
Kobold
Posts: 24
Joined: Wed Jul 31, 2013 9:57 am

Re: Tables tbl() column support?

Post by chap126 »

aliasmask wrote:If you have images for all the monsters or plan to, I would probably put them in a table. I would store all the names as a json array under index 0, then 1 - whatever start adding the monster data as a json object and image if you have it using the table functions. As someone pointed out, if you're going to have images I would use a generic image if you don't have it so you don't get an error trying to retrieve the image. Someone here has a generic monster token set based on type, with different colors. If you can't find it I can zip it up and make a post at a later date.

After a quick search I found the zip. I uploaded it to My Drive: https://drive.google.com/open?id=0ByJAX ... EZPYUROMEk

You're a champion. I'll have to think about this a bit, but it looks like i'll be doing a json array of monster objects. It might even work out easier in the long run than using built in Maptool tables, due to the increased flexibility and control.

User avatar
Jagged
Great Wyrm
Posts: 1306
Joined: Mon Sep 15, 2008 9:27 am
Location: Bristol, UK

Re: Tables tbl() column support?

Post by Jagged »

The plan was to add database functionality rather than extend tables.

It is still the plan but development happens a lot slower than we'd all like. I would not expect anything soon.

chap126
Kobold
Posts: 24
Joined: Wed Jul 31, 2013 9:57 am

Re: Tables tbl() column support?

Post by chap126 »

Jagged wrote:The plan was to add database functionality rather than extend tables.

It is still the plan but development happens a lot slower than we'd all like. I would not expect anything soon.
Thanks for the update :D

I figured as much, just wanted to be sure. Wish I knew enough about coding to help out, maptool is probably the most important rpg software out there IMO.

Post Reply

Return to “MapTool”