A Pathfinder Hero Lab to Maptool converter
Moderators: dorpond, trevor, Azhrei, Gamerdude
Re: A Pathfinder Hero Lab to Maptool converter
Your Nerps variant supports a urlrequest(), no? If you can show me a use example of that I can write an indexer publisher that supports pulling in data via that. Right now I'm thinking I can either bundle the files into zip or publish via scp(user could use either option).
I'll probably also play with JSON, but the problem isn't just using the a JSON lib(Python has one), it's formatting it properly so when it goes into a .rptok file it loads properly.
But there's really no reason I can't have multiple methods of indexing and let the users figure out which one works the best.
I'll probably also play with JSON, but the problem isn't just using the a JSON lib(Python has one), it's formatting it properly so when it goes into a .rptok file it loads properly.
But there's really no reason I can't have multiple methods of indexing and let the users figure out which one works the best.
- JamzTheMan
- Great Wyrm
- Posts: 1872
- Joined: Mon May 10, 2010 12:59 pm
- Location: Chicagoland
- Contact:
Re: A Pathfinder Hero Lab to Maptool converter
Sure, my custom JAR has HTTP connectivity, wasn't sure you wanted to use it or not. I'd love it as an option, but probably should have an alternate version for those on the straight and narrow MT version.
Regarding JSON, would it be better to just load the JSON into a property, then use MT Macros to read that JSON and map/populate it to the properties? (that way it can be more Framework agnostic). I guess it depends if you want to build the token outside or inside MT. 1000 ways to skin a cat I suppose
Regarding the HTTP functions, they are pretty simple, supply a URL, return a String. For sendURL, you can pass a second parm and it's sent as a POST. You can only post one value (I was keeping it simple, but for my stuff, I just post a JSON with everything I needed)
If you request an HTML page, you will get the "source", so you could build your frame code externally if needed and just pass that to a macro, provided you use valid MT HTML. Or use PHP/Python/Whatever to return an HTML snippet. Just make sure if you use any links in that HTML, they should be macroLinks so you can call requestURL again.
Oh, I should add, for sendURL, the POST key is "jsonData" (although technically it can be xml or just a string). So, in PHP, you would use this to retrieve it:
Regarding JSON, would it be better to just load the JSON into a property, then use MT Macros to read that JSON and map/populate it to the properties? (that way it can be more Framework agnostic). I guess it depends if you want to build the token outside or inside MT. 1000 ways to skin a cat I suppose
Regarding the HTTP functions, they are pretty simple, supply a URL, return a String. For sendURL, you can pass a second parm and it's sent as a POST. You can only post one value (I was keeping it simple, but for my stuff, I just post a JSON with everything I needed)
sendURL
Code: Select all
[h: session = "s01e44" ]
[h: notes = "The hills have eyes..." ]
[h: charName = getName() ]
[h: gameSystem = "pathfinder" ]
[h: server = "http://www.yourserver.net/some.php" ]
[h: NewXP = 1000]
[h: xpJSON = json.set("{ }", "character_name", charName, "username", NerpsUsername, "gameSystem", gameSystem, "xp_earned", NewXP, "session", session, "notes", notes)]
[h: response = sendURL(server, xpJSON) ]
[h, if(response == ""), code: {
[response = "Error, no reponse!" ]
}]
{response}
requestURL
Code: Select all
[h: response = requestURL("http://www.yoursever.net/somepage") ]
Oh, I should add, for sendURL, the POST key is "jsonData" (although technically it can be xml or just a string). So, in PHP, you would use this to retrieve it:
Code: Select all
$jsonData = stripslashes($_POST['jsonData']);
$result = json_decode($jsonData, true);
-Jamz
____________________
Custom MapTool 1.4.x.x Fork: maptool.nerps.net
Custom TokenTool 2.0 Fork: tokentool.nerps.net
More information here: MapTool Nerps! Fork
____________________
Custom MapTool 1.4.x.x Fork: maptool.nerps.net
Custom TokenTool 2.0 Fork: tokentool.nerps.net
More information here: MapTool Nerps! Fork
Re: A Pathfinder Hero Lab to Maptool converter
Jamz : this is so close to enable MT to connect with a RESTful web service. Any chance you would consider enabling all the http methods? get,post,put,delete..JamzTheMan wrote: Regarding the HTTP functions, they are pretty simple, supply a URL, return a String. For sendURL, you can pass a second parm and it's sent as a POST. You can only post one value (I was keeping it simple, but for my stuff, I just post a JSON with everything I needed)
If you request an HTML page, you will get the "source", so you could build your frame code externally if needed and just pass that to a macro, provided you use valid MT HTML. Or use PHP/Python/Whatever to return an HTML snippet. Just make sure if you use any links in that HTML, they should be macroLinks so you can call requestURL again.
Oh, I should add, for sendURL, the POST key is "jsonData" (although technically it can be xml or just a string). So, in PHP, you would use this to retrieve it:
That would enable a lot of AWESOME!
My shared rpg stuff:
(exe)TokenNameChanger3: https://www.dropbox.com/s/cqsof54v3dl2k ... 3.zip?dl=0
Tiddly Spell Wiki: https://www.dropbox.com/s/53pya4k68mnvc ... ddly01.htm
Stuff to check out:
Mote Kickstarter(back it): https://www.kickstarter.com/projects/74 ... abletop-ev
(exe)TokenNameChanger3: https://www.dropbox.com/s/cqsof54v3dl2k ... 3.zip?dl=0
Tiddly Spell Wiki: https://www.dropbox.com/s/53pya4k68mnvc ... ddly01.htm
Stuff to check out:
Mote Kickstarter(back it): https://www.kickstarter.com/projects/74 ... abletop-ev
Re: A Pathfinder Hero Lab to Maptool converter
Alright, I've uploaded a new version that has support for remote HTML if you're using Nerps Maptools. If you choose this option from the new Index Options GUI, you basically supply the base URL where the html will be stored and give the app a zip file name. It'll create and bundle the pages into a zip file. Example of what the directory will look like: http://tarsis.org/maptool/
Below is what the new options panel looks like. The old table indexing method is still supported for people not running Nerps. As people request other ways to use the index data I can add other indexing options to the app.
Below is what the new options panel looks like. The old table indexing method is still supported for people not running Nerps. As people request other ways to use the index data I can add other indexing options to the app.
- JamzTheMan
- Great Wyrm
- Posts: 1872
- Joined: Mon May 10, 2010 12:59 pm
- Location: Chicagoland
- Contact:
Re: A Pathfinder Hero Lab to Maptool converter
I would if I thought it would see the light of day. I initially added these as a proof of concept and a bare minimum of what I needed to get a little automation for my framework going.badsequel wrote:Jamz : this is so close to enable MT to connect with a RESTful web service. Any chance you would consider enabling all the http methods? get,post,put,delete..JamzTheMan wrote: Regarding the HTTP functions, they are pretty simple, supply a URL, return a String. For sendURL, you can pass a second parm and it's sent as a POST. You can only post one value (I was keeping it simple, but for my stuff, I just post a JSON with everything I needed)
If you request an HTML page, you will get the "source", so you could build your frame code externally if needed and just pass that to a macro, provided you use valid MT HTML. Or use PHP/Python/Whatever to return an HTML snippet. Just make sure if you use any links in that HTML, they should be macroLinks so you can call requestURL again.
Oh, I should add, for sendURL, the POST key is "jsonData" (although technically it can be xml or just a string). So, in PHP, you would use this to retrieve it:
That would enable a lot of AWESOME!
Unfortuneatly it seemed to scare a lot of people that saw it as a security threat/issue so I ceased development and only keep it alive in my custom jar.
I'll have to try your new version this week if I can get some time in, and still owe you a test for your other Hero Lab project in the "other" forums as well (I haven't forgotten, just RL getting in the way)
-Jamz
____________________
Custom MapTool 1.4.x.x Fork: maptool.nerps.net
Custom TokenTool 2.0 Fork: tokentool.nerps.net
More information here: MapTool Nerps! Fork
____________________
Custom MapTool 1.4.x.x Fork: maptool.nerps.net
Custom TokenTool 2.0 Fork: tokentool.nerps.net
More information here: MapTool Nerps! Fork
Re: A Pathfinder Hero Lab to Maptool converter
It's too bad the URL stuff won't make it into the main branch, it worked pretty effortlessly and Maptool seems to be performing a lot better using this method than trying to keep all the data in a table. Being able to post/receive data to external resources sort of bumps the power of Maptool up to 11. At the least I'd think it could be secured with a global campaign option/property of "trusted domains" or something. Just a simple array the URL functions check against before running.
At the moment I've been copying over Hero Lab stock files and importing around 2000 NPCs and monsters from that. I'm expecting peeps to run into issues where their stock/pors are different than mine(causing import issues) and areas where weird characters in the HL data causes certain macros to break. If anyone runs into that let me know and we'll see if I can play with the problem files to debug it.
At the moment I've been copying over Hero Lab stock files and importing around 2000 NPCs and monsters from that. I'm expecting peeps to run into issues where their stock/pors are different than mine(causing import issues) and areas where weird characters in the HL data causes certain macros to break. If anyone runs into that let me know and we'll see if I can play with the problem files to debug it.
- JamzTheMan
- Great Wyrm
- Posts: 1872
- Joined: Mon May 10, 2010 12:59 pm
- Location: Chicagoland
- Contact:
Re: A Pathfinder Hero Lab to Maptool converter
Ya, I thought people would love to have it as well. I couldn't quite see the security issue myself though. Any data coming in could just as well be data already in a macro and you still could only do what MT allows you to do with said data. In the end it just wasn't worth it fighting it.
But I agree, being able to retrieve external data REALLY amps up MT solving a lot of data table issues.
But I agree, being able to retrieve external data REALLY amps up MT solving a lot of data table issues.
-Jamz
____________________
Custom MapTool 1.4.x.x Fork: maptool.nerps.net
Custom TokenTool 2.0 Fork: tokentool.nerps.net
More information here: MapTool Nerps! Fork
____________________
Custom MapTool 1.4.x.x Fork: maptool.nerps.net
Custom TokenTool 2.0 Fork: tokentool.nerps.net
More information here: MapTool Nerps! Fork
Re: A Pathfinder Hero Lab to Maptool converter
I use tokenlab and the only thing that i have found that it does not parse well is weapon special abilities like Flaming/flaming burst and the like have you figured a work around for that ?
Re: A Pathfinder Hero Lab to Maptool converter
I'm not doing any smart macroing for critical rolls and what not where flameburst would kick in. But flaming does parse through for the damage roll and flameburst crit damage is shown on the crit range/damage text.
If there's a weapon situation that isn't translating right from Hero Lab, I can adjust things so it goes through. Just let me know.
I went ahead and just now coded in an "Item Powers" macro that'll list powers for any carried magic items. So players would be able to look up what these things do and apply them manually in play as needed:
So again, while this isn't automatic the information will be there for the players/GM to see.
If there's a weapon situation that isn't translating right from Hero Lab, I can adjust things so it goes through. Just let me know.
I went ahead and just now coded in an "Item Powers" macro that'll list powers for any carried magic items. So players would be able to look up what these things do and apply them manually in play as needed:
So again, while this isn't automatic the information will be there for the players/GM to see.
Re: A Pathfinder Hero Lab to Maptool converter
This looks amazing - but it seems that the link in your original post isn't working.
I'm looking for a TokenLab alternative right now - for some reason I can't get any of the attacks to work in MapTool when I'm using TokenLab - stack overflow errors regardless of how large my stack is.
Let me know if you get this up and running again!
I'm looking for a TokenLab alternative right now - for some reason I can't get any of the attacks to work in MapTool when I'm using TokenLab - stack overflow errors regardless of how large my stack is.
Let me know if you get this up and running again!
Re: A Pathfinder Hero Lab to Maptool converter
I'm using this great tool, thanks to all who created it!! Now the problem, I'm trying to use (use disguise) on a token I created through Tokenlab but I cant change the image on my tokens. I can change the image on any other token I've created through Statblock Parsers and such but the Tokenlab tokens refuse to change images even with out trying to use the use disguise macro. Anybody shed some light on this?
OOOHH RegEx....YOU BITTER-SWEET BEAST!!!
Re: A Pathfinder Hero Lab to Maptool converter
Is this question in the right area?Sereptus wrote:I'm using this great tool, thanks to all who created it!! Now the problem, I'm trying to use (use disguise) on a token I created through Tokenlab but I cant change the image on my tokens. I can change the image on any other token I've created through Statblock Parsers and such but the Tokenlab tokens refuse to change images even with out trying to use the use disguise macro. Anybody shed some light on this?
OOOHH RegEx....YOU BITTER-SWEET BEAST!!!
Re: A Pathfinder Hero Lab to Maptool converter
I've done a major revamp on the app which I finished up this weekend. Changes and new links are in the first post along with some video tutorials.
Re: A Pathfinder Hero Lab to Maptool converter
Version 0.6 of this is up with support for the latest release of Hero Lab's Pathfinder files and I've finally been able to get OS X support tested and released.
Re: A Pathfinder Hero Lab to Maptool converter
Version 0.7 is up. Outside of some bug fixes, the major changes are an option to add in ability check macros and the app will now create separate full attack macros for characters that have iterative attacks listed for a weapon.