Is there an external table editor? [update: there is now!]
Moderators: dorpond, trevor, Azhrei, giliath, jay, Mr.Ice
Is there an external table editor? [update: there is now!]
[Update: file and link to online doc can be found in and attached to this post below]
I guess the subject sais it all: is there an external (so outside maptool) where the xml tables can be created, edited and when done imported into maptool?
I just discovered the table option in maptool and frankly I was slightly blown away by the endless possibilities that doomed before me, for one I already have an enormous amount of tables in Excel with the necessary script to run through them (check out the download section of strike-to-stun.net to get an idea of what I do with tables ). Embedding them into maptool seems a natural thing to do.
However! I have 0 skills in xml, I can go as far as export a table in maptool, notice that its a zip, unpack it, load it into excel (which works) edit it, zip it again, import it back into maptool -->error. From which I guess that the xml format excel uses does not comply with maptool.
sooo.... hence my question above. I like to copy paste my excel tables into this 'editor' and import them into maptool (preferably I would like to copy paste a list straight into the maptool table editor but I guess for that I need to be in the features section....)
I guess the subject sais it all: is there an external (so outside maptool) where the xml tables can be created, edited and when done imported into maptool?
I just discovered the table option in maptool and frankly I was slightly blown away by the endless possibilities that doomed before me, for one I already have an enormous amount of tables in Excel with the necessary script to run through them (check out the download section of strike-to-stun.net to get an idea of what I do with tables ). Embedding them into maptool seems a natural thing to do.
However! I have 0 skills in xml, I can go as far as export a table in maptool, notice that its a zip, unpack it, load it into excel (which works) edit it, zip it again, import it back into maptool -->error. From which I guess that the xml format excel uses does not comply with maptool.
sooo.... hence my question above. I like to copy paste my excel tables into this 'editor' and import them into maptool (preferably I would like to copy paste a list straight into the maptool table editor but I guess for that I need to be in the features section....)
Last edited by wolph42 on Thu Oct 08, 2009 6:18 am, edited 5 times in total.
GETTING STARTED WITH MAPTOOLS - TUTORIALS, DOCS, VIDEOS, TOOLS, ETC
DISCORD (the new MT forum!)
My stuff
Excel Tools: Table and Light editors
MT Tools: Bag of Tricks: Tools for Maptool, Dungeon Builder I, Dungeon Builder II,onMouseOverEvent.
Frameworks: Dark Heresy, Rogue Trader, Deathwatch, Black Crusade, Only War, SET Card Game, RoboRally
Wiki: Debugging Tutorial, Speed Up Your Macros, Working With Two CODE Levels, Shortcut Keys, Avoiding Stack Overflow, READ THIS
DISCORD (the new MT forum!)
My stuff
Excel Tools: Table and Light editors
MT Tools: Bag of Tricks: Tools for Maptool, Dungeon Builder I, Dungeon Builder II,onMouseOverEvent.
Frameworks: Dark Heresy, Rogue Trader, Deathwatch, Black Crusade, Only War, SET Card Game, RoboRally
Wiki: Debugging Tutorial, Speed Up Your Macros, Working With Two CODE Levels, Shortcut Keys, Avoiding Stack Overflow, READ THIS
Re: Is there a external table editor?
What does the content of an exported table file look like? I'm sure there's more elegant ways to do this, but if it's easy enough you could always make some good use of the excel contactenate function to alter your existing tables. I haven't looked at the files though and am at work so I can't look at them here.
Re: Is there a external table editor?
another post mentions this html preview editor. This seems handy
http://www.w3schools.com/html/tryit.asp ... html_basic
http://forums.rptools.net/viewtopic.php?f=20&t=11282
The issue I find with using Excel (or Word) to generate HTML is that they typically generate a host of linked files, and the amount of actual html markup required to present a page is tremendous. (I was just looking at the last html file I made with Word and it's only about 2 pages of display, just text and a few pictures, and the file has 1688 lines of markup.)
An html editor I've used on and off since college is Chami's HTML kit.
http://www.w3schools.com/html/tryit.asp ... html_basic
http://forums.rptools.net/viewtopic.php?f=20&t=11282
The issue I find with using Excel (or Word) to generate HTML is that they typically generate a host of linked files, and the amount of actual html markup required to present a page is tremendous. (I was just looking at the last html file I made with Word and it's only about 2 pages of display, just text and a few pictures, and the file has 1688 lines of markup.)
An html editor I've used on and off since college is Chami's HTML kit.
Re: Is there a external table editor?
do you mean exported form Maptool or exported from Excel? The export from MT into Excel works perfectly (you get a nice table in excel) the other way round though... is likely what Wyrmwood suggests: an xml table with a HUGE amount of junk attached.Hawke wrote:What does the content of an exported table file look like? I'm sure there's more elegant ways to do this, but if it's easy enough you could always make some good use of the excel contactenate function to alter your existing tables. I haven't looked at the files though and am at work so I can't look at them here.
As for the concatenate function... are you suggesting that I generate xml code from within Excel?? I can boogie quite well in Excel and VBA, but as I said I know jack-poo about xml so I wouldn't know where to start.
@Wyrmwood: I don't quite see how the basic HTML editor will help me create an xml table out of a say basic xls, csv or tsv file?
Maybe I should rephrase my question:
What I'm looking for is an elegant way to 'copy paste' a basic table (columns seperated either by commas, tabs or anything else), straight into the table section of Maptool, either by directly copy-pasting it into Maptool (which doesn't work) or by copy-pasting it first in another editor which is able to translate it into an xml file that Maptool can import.
GETTING STARTED WITH MAPTOOLS - TUTORIALS, DOCS, VIDEOS, TOOLS, ETC
DISCORD (the new MT forum!)
My stuff
Excel Tools: Table and Light editors
MT Tools: Bag of Tricks: Tools for Maptool, Dungeon Builder I, Dungeon Builder II,onMouseOverEvent.
Frameworks: Dark Heresy, Rogue Trader, Deathwatch, Black Crusade, Only War, SET Card Game, RoboRally
Wiki: Debugging Tutorial, Speed Up Your Macros, Working With Two CODE Levels, Shortcut Keys, Avoiding Stack Overflow, READ THIS
DISCORD (the new MT forum!)
My stuff
Excel Tools: Table and Light editors
MT Tools: Bag of Tricks: Tools for Maptool, Dungeon Builder I, Dungeon Builder II,onMouseOverEvent.
Frameworks: Dark Heresy, Rogue Trader, Deathwatch, Black Crusade, Only War, SET Card Game, RoboRally
Wiki: Debugging Tutorial, Speed Up Your Macros, Working With Two CODE Levels, Shortcut Keys, Avoiding Stack Overflow, READ THIS
Re: Is there a external table editor?
The table file (I forget the extension) should be plaintext - try opening it in notepad to test, but better off with something like textpad or one of the other notepad clones. You can see the format of the table - XML isn't a language per se but a way to mark up the data. Depending on how it's setup, it might be really clear on how to handle table entries and maniplate them with your concat... if you paste a few lines of actual table values, we might be able to figure it out.
Re: Is there a external table editor?
Good point!
Here is an example table which I would like to paste into MT (tab seperated):
If I export this table from MT and have a look at it, it looks like this:
from this I can already see that no xml editor will 'automatically' convert a random list into the MT-xml 'standard'.
So the answer to my question is : 'No'
I am however very curious to any suggestions how to tackle this puppy...?
Here is an example table which I would like to paste into MT (tab seperated):
Code: Select all
1-30 You find a variety of coins but none of value.
31-35 You find 1 copper piece.
36-40 [1d10/5] pieces of copper.
(.....)
96-100 [1d10] gold pieces.
Code: Select all
<net.rptools.maptool.model.LookupTable>
<entryList>
<net.rptools.maptool.model.LookupTable_-LookupEntry>
<min>1</min>
<max>30</max>
<value>You find a variety of coins but none of value.</value>
</net.rptools.maptool.model.LookupTable_-LookupEntry>
<net.rptools.maptool.model.LookupTable_-LookupEntry>
<min>31</min>
<max>35</max>
<value>You find 1 copper piece.</value>
</net.rptools.maptool.model.LookupTable_-LookupEntry>
<net.rptools.maptool.model.LookupTable_-LookupEntry>
<min>36</min>
<max>40</max>
<value>[1d10/5] pieces of copper.</value>
</net.rptools.maptool.model.LookupTable_-LookupEntry>
(....)
<net.rptools.maptool.model.LookupTable_-LookupEntry>
<min>96</min>
<max>100</max>
<value>[1d10] gold pieces.</value>
</net.rptools.maptool.model.LookupTable_-LookupEntry>
</entryList>
<name>veCoin</name>
<defaultRoll>1d100</defaultRoll>
<visible>true</visible>
<allowLookup>true</allowLookup>
</net.rptools.maptool.model.LookupTable>
So the answer to my question is : 'No'
I am however very curious to any suggestions how to tackle this puppy...?
GETTING STARTED WITH MAPTOOLS - TUTORIALS, DOCS, VIDEOS, TOOLS, ETC
DISCORD (the new MT forum!)
My stuff
Excel Tools: Table and Light editors
MT Tools: Bag of Tricks: Tools for Maptool, Dungeon Builder I, Dungeon Builder II,onMouseOverEvent.
Frameworks: Dark Heresy, Rogue Trader, Deathwatch, Black Crusade, Only War, SET Card Game, RoboRally
Wiki: Debugging Tutorial, Speed Up Your Macros, Working With Two CODE Levels, Shortcut Keys, Avoiding Stack Overflow, READ THIS
DISCORD (the new MT forum!)
My stuff
Excel Tools: Table and Light editors
MT Tools: Bag of Tricks: Tools for Maptool, Dungeon Builder I, Dungeon Builder II,onMouseOverEvent.
Frameworks: Dark Heresy, Rogue Trader, Deathwatch, Black Crusade, Only War, SET Card Game, RoboRally
Wiki: Debugging Tutorial, Speed Up Your Macros, Working With Two CODE Levels, Shortcut Keys, Avoiding Stack Overflow, READ THIS
Re: Is there a external table editor?
So what you're looking for is generating a list of these to copy&paste into the tables file. Ignore the stuff before & after but just generate:
I don't think spaces matter in the XML (someone please correct me if this is wrong!) So you're looking for something like this
The trick is then splitting out into A1 value into two formats "1-20"... something like this might work for B1
In B1 should make it show the first part of the number. Whereas C1 would look like
and should display after the -.
Am I making sense? I don't know how excelly you are... and I am not 100% sure that MapTool isn't super picky about formatting the XML, but my guess is this will work.
Code: Select all
<net.rptools.maptool.model.LookupTable_-LookupEntry>
<min>1</min>
<max>30</max>
<value>You find a variety of coins but none of value.</value>
</net.rptools.maptool.model.LookupTable_-LookupEntry>
Code: Select all
=CONCATENATE("<net.rptools.maptool.model.LookupTable_-LookupEntry> <min>",B1,"</min><max>",C1,"</max><value>",D1,"</value></net.rptools.maptool.model.LookupTable_-LookupEntry>")
Code: Select all
=LEFT(A1,FIND("-",A1)-1)
Code: Select all
=RIGHT(A1,FIND("-",A1))
Am I making sense? I don't know how excelly you are... and I am not 100% sure that MapTool isn't super picky about formatting the XML, but my guess is this will work.
Re: Is there a external table editor?
you're fast!
I'm quite heavy on the excel side, so yes this makes sense, I'll give it a try. Need to adjust my campaign files first with the other code I posted in the other thread first, if I've still got time im gonna test it tonight.
thnxs!
I'm quite heavy on the excel side, so yes this makes sense, I'll give it a try. Need to adjust my campaign files first with the other code I posted in the other thread first, if I've still got time im gonna test it tonight.
thnxs!
GETTING STARTED WITH MAPTOOLS - TUTORIALS, DOCS, VIDEOS, TOOLS, ETC
DISCORD (the new MT forum!)
My stuff
Excel Tools: Table and Light editors
MT Tools: Bag of Tricks: Tools for Maptool, Dungeon Builder I, Dungeon Builder II,onMouseOverEvent.
Frameworks: Dark Heresy, Rogue Trader, Deathwatch, Black Crusade, Only War, SET Card Game, RoboRally
Wiki: Debugging Tutorial, Speed Up Your Macros, Working With Two CODE Levels, Shortcut Keys, Avoiding Stack Overflow, READ THIS
DISCORD (the new MT forum!)
My stuff
Excel Tools: Table and Light editors
MT Tools: Bag of Tricks: Tools for Maptool, Dungeon Builder I, Dungeon Builder II,onMouseOverEvent.
Frameworks: Dark Heresy, Rogue Trader, Deathwatch, Black Crusade, Only War, SET Card Game, RoboRally
Wiki: Debugging Tutorial, Speed Up Your Macros, Working With Two CODE Levels, Shortcut Keys, Avoiding Stack Overflow, READ THIS
Re: Is there a external table editor?
well here the 'correct' excel method (my version wants ; in stead of , and I prefer the & over the concatenate function)
I've added spaces and and linebreaks and your RIGHT function was wrong
This results into:
Which resembles the code, I've tested it in Excel, not yes in MT, I'll do this later and if it works I'll create a generic excel sheet which I'll post here for others to use.
Code: Select all
A1: 1-30
B1: "You find a ..."
C1: =LEFT(A1;FIND("-";A1)-1)
D1: =IF(A1="";"";RIGHT(A1;LEN(A1)-FIND("-";A1)))
E1:
="<net.rptools.maptool.model.LookupTable_-LookupEntry>"&CHAR(10)&" <min>"&C1&"</min>"&CHAR(10)&" <max>"&D1&"</max>"&CHAR(10)&" <value>"&B1&"</value>"&CHAR(10)&"</net.rptools.maptool.model.LookupTable_-LookupEntry>"
This results into:
Code: Select all
"<net.rptools.maptool.model.LookupTable_-LookupEntry>
<min>1</min>
<max>30</max>
<value>You find a variety of coins but none of value. </value>
</net.rptools.maptool.model.LookupTable_-LookupEntry>"
Last edited by wolph42 on Thu Oct 08, 2009 4:55 am, edited 1 time in total.
GETTING STARTED WITH MAPTOOLS - TUTORIALS, DOCS, VIDEOS, TOOLS, ETC
DISCORD (the new MT forum!)
My stuff
Excel Tools: Table and Light editors
MT Tools: Bag of Tricks: Tools for Maptool, Dungeon Builder I, Dungeon Builder II,onMouseOverEvent.
Frameworks: Dark Heresy, Rogue Trader, Deathwatch, Black Crusade, Only War, SET Card Game, RoboRally
Wiki: Debugging Tutorial, Speed Up Your Macros, Working With Two CODE Levels, Shortcut Keys, Avoiding Stack Overflow, READ THIS
DISCORD (the new MT forum!)
My stuff
Excel Tools: Table and Light editors
MT Tools: Bag of Tricks: Tools for Maptool, Dungeon Builder I, Dungeon Builder II,onMouseOverEvent.
Frameworks: Dark Heresy, Rogue Trader, Deathwatch, Black Crusade, Only War, SET Card Game, RoboRally
Wiki: Debugging Tutorial, Speed Up Your Macros, Working With Two CODE Levels, Shortcut Keys, Avoiding Stack Overflow, READ THIS
Re: Is there a external table editor?
it took some finetuning but attached is an excel file that creates an translation. I can make it a bit more userfriendly but for now it works.
Thanks for the input!
edit: attachement is removed new version below
Thanks for the input!
edit: attachement is removed new version below
Last edited by wolph42 on Thu Oct 08, 2009 4:51 am, edited 1 time in total.
GETTING STARTED WITH MAPTOOLS - TUTORIALS, DOCS, VIDEOS, TOOLS, ETC
DISCORD (the new MT forum!)
My stuff
Excel Tools: Table and Light editors
MT Tools: Bag of Tricks: Tools for Maptool, Dungeon Builder I, Dungeon Builder II,onMouseOverEvent.
Frameworks: Dark Heresy, Rogue Trader, Deathwatch, Black Crusade, Only War, SET Card Game, RoboRally
Wiki: Debugging Tutorial, Speed Up Your Macros, Working With Two CODE Levels, Shortcut Keys, Avoiding Stack Overflow, READ THIS
DISCORD (the new MT forum!)
My stuff
Excel Tools: Table and Light editors
MT Tools: Bag of Tricks: Tools for Maptool, Dungeon Builder I, Dungeon Builder II,onMouseOverEvent.
Frameworks: Dark Heresy, Rogue Trader, Deathwatch, Black Crusade, Only War, SET Card Game, RoboRally
Wiki: Debugging Tutorial, Speed Up Your Macros, Working With Two CODE Levels, Shortcut Keys, Avoiding Stack Overflow, READ THIS
Re: Is there a external table editor?
Cool, hope it works out well for you. I figured some of those functions wouldn't be exactly there - doing it from memory is always tricky =)
Re: Is there a external table editor?
Folks,
Very, very cool!
Found 1 problem. If my range entry is a single number, the function stops working.
If you enter this:
Any chance of getting a patch for this? A lot of my encounter tables have single numbers in the entries.
Great Work!
Pat.
Very, very cool!
Found 1 problem. If my range entry is a single number, the function stops working.
If you enter this:
Code: Select all
41-45 [2d10] pieces of copper.
46 You find 1 silver piece. <<< This line will generate an error in the formula.
47-55 [1d10/5] silver pieces.
Great Work!
Pat.
A little nonsense, now and then, is relished by the wisest men. - Willy Wonka
Currently playing Savage Worlds in the home-brew world of Shadora.
We are looking for players! PM me if interested.
Currently playing Savage Worlds in the home-brew world of Shadora.
We are looking for players! PM me if interested.
Re: Is there a external table editor?
Thanks Pat!
I've updated the excel sheet, tested it more thoroughly, it still works and added a short manual. Also added the possibility to set the parameters for the table.
Attached is the new version, which I boldly named version 1.0
Edit: if you don't have Excel, it also works in Google docs, just upload the file, it wil act a bit strange as it will show the full content of the blue box (turning off wrap text will help but not much), but it does work. Alternatively you can use this link (but I'm a bit unsure what happens if two people are using that online doc at the same time...)
The cells C1 and D1 should have been:
This takes care of the bug.
I've updated the excel sheet, tested it more thoroughly, it still works and added a short manual. Also added the possibility to set the parameters for the table.
Attached is the new version, which I boldly named version 1.0
Edit: if you don't have Excel, it also works in Google docs, just upload the file, it wil act a bit strange as it will show the full content of the blue box (turning off wrap text will help but not much), but it does work. Alternatively you can use this link (but I'm a bit unsure what happens if two people are using that online doc at the same time...)
The cells C1 and D1 should have been:
Code: Select all
C1: =IF(ISERROR(FIND("-";A1));A1;LEFT(A1;FIND("-";A1)-1))
D1: =IF(ISERROR(FIND("-";A1));A1;RIGHT(A1;LEN(A1)-FIND("-";A1)))
- Attachments
-
- table2MTxml v1.0.xls.zip
- (38.56 KiB) Downloaded 242 times
GETTING STARTED WITH MAPTOOLS - TUTORIALS, DOCS, VIDEOS, TOOLS, ETC
DISCORD (the new MT forum!)
My stuff
Excel Tools: Table and Light editors
MT Tools: Bag of Tricks: Tools for Maptool, Dungeon Builder I, Dungeon Builder II,onMouseOverEvent.
Frameworks: Dark Heresy, Rogue Trader, Deathwatch, Black Crusade, Only War, SET Card Game, RoboRally
Wiki: Debugging Tutorial, Speed Up Your Macros, Working With Two CODE Levels, Shortcut Keys, Avoiding Stack Overflow, READ THIS
DISCORD (the new MT forum!)
My stuff
Excel Tools: Table and Light editors
MT Tools: Bag of Tricks: Tools for Maptool, Dungeon Builder I, Dungeon Builder II,onMouseOverEvent.
Frameworks: Dark Heresy, Rogue Trader, Deathwatch, Black Crusade, Only War, SET Card Game, RoboRally
Wiki: Debugging Tutorial, Speed Up Your Macros, Working With Two CODE Levels, Shortcut Keys, Avoiding Stack Overflow, READ THIS
- CyrusStonecypher
- Giant
- Posts: 158
- Joined: Thu Nov 26, 2009 1:22 am
- Location: Columbus, IN, U.S.A.
Re: Is there an external table editor? [update: there is now!]
Awesome! Thank you!
Stuff created by more capable MT users than myself :[Light vision Illumination Generator Tool] [External table editor] [Lindsay's Generic Tools] [Import and Export Maps for b63] [Group Movement]
Re: Is there an external table editor? [update: there is now!]
I think I'm running into a maximum character limit with Excel. It's only generating about 2/3 of my table.
Can the output in column H be split, so that there's 2 or 3 Middle sections? This would also require an additional blue cell block. I tried changing H3 to do an OFFSET on the first 100 rows and then adding a 2nd middle to do an OFFSET on the next 50, but in my 2nd blue box, it's just repeating the table text from the beginning.
Can the output in column H be split, so that there's 2 or 3 Middle sections? This would also require an additional blue cell block. I tried changing H3 to do an OFFSET on the first 100 rows and then adding a 2nd middle to do an OFFSET on the next 50, but in my 2nd blue box, it's just repeating the table text from the beginning.