Tokenlab: Pathfinder Herolabs -> Maptools converter

Discussion concerning lmarkus' campaign framework for D&D3.x and Pathfinder.

Moderators: dorpond, trevor, Azhrei, giliath, Gamerdude, jay, Mr.Ice, lmarkus001

Forum rules
Discussion regarding lmarkus001's framework only. Other posts deleted without notice! :)
sozin
Cave Troll
Posts: 65
Joined: Sat Nov 25, 2006 8:51 pm
Location: Chicago
Contact:

Tokenlab: Pathfinder Herolabs -> Maptools converter

Post by sozin »

Happy to announce the 0.4 release of Tokenlab, a Pathfinder Herolabs to Maptools converter. It requires vb.87 of Maptools to work.

Image

I started with Thundertoe's Pathfinder framework and modified it heavily to support my needs. Tokenlab has its own set of campaign properties and a campaign file.

The big item still on the todo list is to add the ability to edit weapon properties via a form. (Right now its just raw JSON.)

Feedback/thoughts/ideas appreciated. Cheers!

Dracones
Cave Troll
Posts: 68
Joined: Mon Nov 14, 2011 8:04 pm
Location: Fort Pierce, FL

Re: Tokenlab: Pathfinder Herolabs -> Maptools converter

Post by Dracones »

This is really nice. I've tried to play with maptools using MT before, but with zero luck being able to create a character or anything. I was able to export a PC and a 3 goblin raiding party into maptools with your setup and run a quick little combat on the first try in a few minutes.

So very nice work on this.

If I had any comments on this it would be to import in from Herolabs the other character stats with some way to track them on the token. Specifically spells, spells per day and inventory. But really anywhere you can let Herolab be the engine that "figures out all the numbers" and just put them on the token someplace to tick off or reference.

I guess the idea would be to let Herolab do what it does best, do all the number crunching math, skills, feat calcs, spells, shopping for magic items, etc etc. And then just import all that in on token for manipulating during play. On level ups go back to Herolabs to work on the character and then just import a fresh token.

That'd be a pretty powerful combo.

User avatar
Azhrei
Site Admin
Posts: 12086
Joined: Mon Jun 12, 2006 1:20 pm
Location: Tampa, FL

Re: Tokenlab: Pathfinder Herolabs -> Maptools converter

Post by Azhrei »

Dracones wrote:I guess the idea would be to let Herolab do what it does best, do all the number crunching math, skills, feat calcs, spells, shopping for magic items, etc etc. And then just import all that in on token for manipulating during play. On level ups go back to Herolabs to work on the character and then just import a fresh token.

That'd be a pretty powerful combo.
The problem is what do you do about a bless spell cast by a 3rd level cleric? You only get the bonus for 3 rounds -- do you turn on the condition in HL and import a character just for that? What happens to the 8 pts of damage that the original token has already taken?

What really needs to happen is some kind of dynamic data stream between MT and HL. So that any change in HL is immediately sent (probably as a set of differences) to MT, and any changes on the MT side go back to HL. There's no way for that to happen in 1.3 as MTscript doesn't have any kind of network support. Sozin's approach so far has been to modify MT. We hope to have some kind of plugin architecture in the future that would be able to do something similar to what he's done but without modifying the existing code base. There's no telling when a first stab at plugins will be available to play with though.

Dracones
Cave Troll
Posts: 68
Joined: Mon Nov 14, 2011 8:04 pm
Location: Fort Pierce, FL

Re: Tokenlab: Pathfinder Herolabs -> Maptools converter

Post by Dracones »

Azhrei wrote:The problem is what do you do about a bless spell cast by a 3rd level cleric? You only get the bonus for 3 rounds -- do you turn on the condition in HL and import a character just for that? What happens to the 8 pts of damage that the original token has already taken?
No, that's taking it too far. When I'm sitting at the table with no computer and get a bless spell what do I do? I mark it on the sheet or calc it in my head. The "sheet" here already has a "Change Temporary Bonuses" widget, so that's already taken care of.

My thoughts was that a lot of frameworks seem to do a lot of automation and handling of things. You put on a ring +1 and it adjusts your stats for you. Or a lot of code to add in new weapons: auto-calc str bonuses, to hits, etc etc etc. My point is don't bother with it. The ring +1 can be fudged until the party gets back into town or the next session when the Herolab characters can be updated and imported back into the campaign. Let Herolab handle all of that since it does it so well anyway.

Instead what would be nice to see is leveraging everything Herolab exports so you have a complete reference on your token. For example, the gnomish sorcerer I created:

Code: Select all

<spelllike><special name="Dancing Lights (1/day) (Sp)" shortname="Dancing Lights (1/day)" type="Spell-Like Ability" sourcetext="Gnome"><description>If you have Charisma 11+, you can cast Dancing Lights once per day at caster level 1st, save 10 + charisma modifier + spell level.</description><specsource>Gnome</specsource></special><special name="Ghost Sound (1/day) (Sp)" shortname="Ghost Sound (1/day)" type="Spell-Like Ability" sourcetext="Gnome"><description>If you have Charisma 11+, you can cast Ghost Sound once per day at caster level 1st, save 10 + charisma modifier + spell level.</description><specsource>Gnome</specsource></special><special name="Prestidigitation (1/day) (Sp)" shortname="Prestidigitation (1/day)" type="Spell-Like Ability" sourcetext="Gnome"><description>If you have Charisma 11+, you can cast Prestidigitation once per day at caster level 1st, save 10 + charisma modifier + spell level.</description><specsource>Gnome</specsource></special><special name="Speak with Animals (1/day) (Sp)" shortname="Speak with Animals (1/day)" type="Spell-Like Ability" sourcetext="Gnome"><description>Speak with Animals once per day.</description><specsource>Gnome</specsource></special></spelllike>
I'd find it very useful to have a "Spell like abilities" tab that imports the above data into it. Initially even just a simple text box. Later on if there was the ability to check off the 1/day used, that'd be awesome too.

For equipment, just an equipment text box would do. A place I can see what I bought in Herolab and edit as I adventure along. You don't need fancy widgets for this.

Spells per day

Code: Select all

<spelllevel level="0" unlimited="yes" used="0"/><spelllevel level="1" maxcasts="5" used="0"/>
Again, HL provides the data. But just being able to track that on the token would be awesome. The framework doesn't even need to be able to adjust this on the fly. Just take the data from HL and display the checkboxes.

It'd also be very useful to display the spells with reference text:

Code: Select all

<spell name="Disrupt Undead" level="0" class="Sorcerer" casttime="1 action" range="Close" target="" area="" effect="ray" duration="Instantaneous" save="none" resist="Yes" dc="15" casterlevel="1" componenttext="Verbal, Somatic" schooltext="Necromancy" subschooltext="" descriptortext="" spontaneous="yes"><description>You direct a ray of positive energy. You must make a ranged touch attack to hit, and if the ray hits an undead creature, it deals 1d6 points of damage to it.</description><spellcomp>Verbal</spellcomp><spellcomp>Somatic</spellcomp><spellschool>Necromancy</spellschool></spell>
Again, HL provides all the needed data in the XML. You don't need to automate the working of the spell, the group can easily roll the DC and damage manually. But being able to look it up in game would be invaluable.

Herolab does an amazing job figuring out all the crunch and spitting out all the rules. You really don't need the framework to automate all that, that's really too big of a job, it's error-prone and other people are already doing it. Besides you don't even have that at a table when playing face to face, so it's not absolutely needed. But having it there on the token as a reference becomes very handy especially for newbies like me, which I think Tokenlab is perfect for.

sozin
Cave Troll
Posts: 65
Joined: Sat Nov 25, 2006 8:51 pm
Location: Chicago
Contact:

Re: Tokenlab: Pathfinder Herolabs -> Maptools converter

Post by sozin »

Good feedback, thank you!
The problem is what do you do about a bless spell cast by a 3rd level cleric? You only get the bonus for 3 rounds -- do you turn on the condition in HL and import a character just for that? What happens to the 8 pts of damage that the original token has already taken?
Yep. The only way around this is, as Azhrei says, have a live data stream from Herolabs into Maptools. This item is on the Herolab team's backlog, but ... waaaaaay down. I'm bid two years on that feature, if at all.

The workaround for this issue is to use Tokenlab's character sheet and temporary bonus macro buttons to adjust your stats on buffs, damages, etc. It's a little clunky but it works.

Re: spellbooks and special attacks, these is definitely an item that I'm going to implement in Tokenlab in the near future. However, I doubt that I will be adding any sort of smarts that bump your character's attack bonus and saving throw's against fear effects when bless is cast. For one, I'm trying to avoid having knowledge of Pathfinder rules in my source code. For two, the xml files that Herolabs cast don't give me actionable information about the spell. Here's Herolab's output XML for Bless, for example:

Code: Select all

<spell name="Bless" level="1" casterlevel="1" save="none" castsleft="1" descriptortext="Mind-Affecting" subschooltext="Compulsion" schooltext="Enchantment" componenttext="Verbal, Somatic, Divine Focus" dc="15" resist="Yes (harmless)" duration="1 min./level" effect="" area="The caster and all allies within a 50-ft. burst, centered on the caster" target="" range="50 ft." casttime="1 action" class="Cleric">
    <description>Bless fills your allies with courage. Each ally gains a +1 morale bonus on attack rolls and on saving throws 
                 against fear effects. Bless counters and dispels bane.</description><spellcomp>Verbal</spellcomp>    
    <spellcomp>Somatic</spellcomp>
    <spellcomp>Divine Focus</spellcomp>
    <spellschool>Enchantment</spellschool>
    <spellsubschool>Compulsion</spellsubschool>
    <spelldescript>Mind-Affecting</spelldescript>
</spell>
The only way for me to understand what effect Bless has is to do natural language parsing on the description field ("[E]ach ally gains a +1 morale bonus on attack roles..."). Or implement bless manually. Both of which go against my design goals in Tokenlab.

sozin
Cave Troll
Posts: 65
Joined: Sat Nov 25, 2006 8:51 pm
Location: Chicago
Contact:

Re: Tokenlab: Pathfinder Herolabs -> Maptools converter

Post by sozin »

You don't need to automate the working of the spell, the group can easily roll the DC and damage manually. But being able to look it up in game would be invaluable.

Herolab does an amazing job figuring out all the crunch and spitting out all the rules. You really don't need the framework to automate all that, that's really too big of a job, it's error-prone and other people are already doing it. Besides you don't even have that at a table when playing face to face, so it's not absolutely needed. But having it there on the token as a reference becomes very handy especially for newbies like me, which I think Tokenlab is perfect for.
Definitely. Doing spells and special abilities is next on my backlog. Thanks again for the thoughtful reply.

User avatar
jfrazierjr
Deity
Posts: 5176
Joined: Tue Sep 11, 2007 7:31 pm

Re: Tokenlab: Pathfinder Herolabs -> Maptools converter

Post by jfrazierjr »

sozin wrote:

Code: Select all

<spell name="Bless" level="1" casterlevel="1" save="none" castsleft="1" descriptortext="Mind-Affecting" subschooltext="Compulsion" schooltext="Enchantment" componenttext="Verbal, Somatic, Divine Focus" dc="15" resist="Yes (harmless)" duration="1 min./level" effect="" area="The caster and all allies within a 50-ft. burst, centered on the caster" target="" range="50 ft." casttime="1 action" class="Cleric">
    <description>Bless fills your allies with courage. Each ally gains a +1 morale bonus on attack rolls and on saving throws 
                 against fear effects. Bless counters and dispels bane.</description><spellcomp>Verbal</spellcomp>    
    <spellcomp>Somatic</spellcomp>
    <spellcomp>Divine Focus</spellcomp>
    <spellschool>Enchantment</spellschool>
    <spellsubschool>Compulsion</spellsubschool>
    <spelldescript>Mind-Affecting</spelldescript>
</spell>
Yep.. that's the type of mind numbing stuff that just leaves me thinking: WTF? Some stuff is very well detailed and very granular(class, casttime, casterlevel,etc), but others are crap. According to their site, it might be possible to modify the base data files to produce your own format.
I save all my Campaign Files to DropBox. Not only can I access a campaign file from pretty much any OS that will run Maptool(Win,OSX, linux), but each file is versioned, so if something goes crazy wild, I can always roll back to a previous version of the same file.

Get your Dropbox 2GB via my referral link, and as a bonus, I get an extra 250 MB of space. Even if you don't don't use my link, I still enthusiastically recommend Dropbox..

sozin
Cave Troll
Posts: 65
Joined: Sat Nov 25, 2006 8:51 pm
Location: Chicago
Contact:

Re: Tokenlab: Pathfinder Herolabs -> Maptools converter

Post by sozin »

Version 0.10 of TokenLab is released. It contains a number of bug fixes (thank you, beta testers) and a new 'Special Abilities' macro group that shows you the N/PCs feats and special abilities. Spells are next on the list.

The release page gives instructions on how to upgrade from a previous version.

sozin
Cave Troll
Posts: 65
Joined: Sat Nov 25, 2006 8:51 pm
Location: Chicago
Contact:

Re: Tokenlab: Pathfinder Herolabs -> Maptools converter

Post by sozin »

Added a spell reference button that shows you what spells your PC knows. Next up, spell resource tracking.

Dracones
Cave Troll
Posts: 68
Joined: Mon Nov 14, 2011 8:04 pm
Location: Fort Pierce, FL

Re: Tokenlab: Pathfinder Herolabs -> Maptools converter

Post by Dracones »

Awesome update. Really looking forward to seeing how you handle the spell tracking.

One thing you might want to add into the docs at some point is for Windows users to get the proper Java version. Under Linux it's easy to install openjdk and run, but getting javaw for Windows can be a little harder to track down. Sun's java install on Windows looks like it pretty much just snags the browser version when you hit their most common Java page.

Maybe just post a link to the recommended JDK or JRE.

Dracones
Cave Troll
Posts: 68
Joined: Mon Nov 14, 2011 8:04 pm
Location: Fort Pierce, FL

Re: Tokenlab: Pathfinder Herolabs -> Maptools converter

Post by Dracones »

More comments after playing with this. One quick bug. If I impersonate but don't have selected a token, I can't bring up the special abilities. Actually, if I impersonate one token and select another, the impersonate window will bring up the special abilities of the selected token.

I love that the portrait now shows flat footed, touched, CMD, etc:

Image

Showing of the abilities is awesome and well laid out:

Image

The way you can bring up all the spells is very nice and concise:

Image

And the drill down into each spell works very well:

Image


You could probably redo the character sheet to reflect the Herolab output. Langages, stats, etc. But that's fluff and I'm sure you're working on core functionality first(tracking spells/abilities used).

Edit:

Another "bug" or minor quirk. Are you pulling the spell descriptions from Herolab? I'm not seeing the DC's for them even though they're in the Herolab data:

Image

From the XML:

Code: Select all

<spell name="Cause Fear" level="1" class="Sorcerer" casttime="1 action" range="Close" target="one living creature with 5 or fewer HD" area="" effect="" duration="1d4 rounds or 1 round; see text" save="DC 13 Will partial" resist="Yes" dc="13"
Edit part 2 :)

If you are parsing input from the Herolab XML and the output in Maptool conforms to HTML, you might consider a nl 2 br function call on the text. For example, with Detect Magic:

Code: Select all

Lingering Aura: A magical aura lingers after its original source dissipates (in the case of a spell) or is destroyed (in the case of a magic item). If detect magic is cast and directed at such a location, the spell indicates an aura strength of dim (even weaker than a faint aura). How long the aura lingers at this dim level depends on its original power:

Original Strength - Duration of Lingering Aura
Faint - 1d6 rounds
Moderate - 1d6 minutes
Strong - 1d6 x 10 minutes
Overwhelming - 1d6 days
That formatting gets lost in the translation.

sozin
Cave Troll
Posts: 65
Joined: Sat Nov 25, 2006 8:51 pm
Location: Chicago
Contact:

Re: Tokenlab: Pathfinder Herolabs -> Maptools converter

Post by sozin »

Thanks for the feedback!
Maybe just post a link to the recommended JDK or JRE
Good idea, will do.
Are you pulling the spell descriptions from Herolab? I'm not seeing the DC's for them even though they're in the Herolab data:
I cheated and sucked down the d20pfsrd spell database and embedded it right inside the app :-) but yeah, the DC data is definitely in the herolabs output, I'll add to the spell listing.
If I impersonate but don't have selected a token, I can't bring up the special abilities. Actually, if I impersonate one token and select another, the impersonate window will bring up the special abilities of the selected token
Good catch! Should be an easy fix.

Dracones
Cave Troll
Posts: 68
Joined: Mon Nov 14, 2011 8:04 pm
Location: Fort Pierce, FL

Re: Tokenlab: Pathfinder Herolabs -> Maptools converter

Post by Dracones »

Other maybe bugs/quirks. Darkvision in Pathfinder is range 60, but it looks like in the campaign properties it's set to r10.5? Changing that to r60.5 seems to correct it along with changing lowlight to x2, since lowlight let's people see twice as far in dim light.

Actually, these are the values from the Pathfinder MT framework and are probably a good base.

Code: Select all

Darkvision: circle r62 
Darkvision90: circle r92 
Blind: circle distance=2.5 r2 
Darkvision30 and Lowlight: circle x2 r16 
Normal: circle r2 
Darkvision120: circle r122 
Dazzled: circle x0.5 r2 
Lowlight: circle x2 r1.2 
Darkvision120 and Lowlight: circle x2 r61 
Darkvision90 and Lowlight: circle x2 r46 
Darkvision60 and Lowlight: circle x2 r31 
Darkvision30: circle r32 

Also, on the tokens I believe "has sight" needs to be checked?

Image

A new TODO: If you could parse the special abilities XML and give either normal, lowlight or darkvision as appropriate that'd be really awesome. I'll check the bestiary for HL when I get it downloaded and see if it has it for monsters on the export. If it does and you can parse/import it, even better.

Dracones
Cave Troll
Posts: 68
Joined: Mon Nov 14, 2011 8:04 pm
Location: Fort Pierce, FL

Re: Tokenlab: Pathfinder Herolabs -> Maptools converter

Post by Dracones »

Yep, hero lab has the vision ranges for monsters.

Harpy:

Code: Select all

<senses><special name="Darkvision (60 feet)" shortname="Darkvision (60 feet)"><description>You can see in the dark (black and white vision only).</description></special></senses>
Wolf:

Code: Select all

<senses><special name="Low-Light Vision" shortname="Low-Light Vision"><description>See twice as far as a human in low light, distinguishing color and detail.</description></special>
Drow, combination 120 dark vision and lowlight:

Code: Select all

<senses><special name="Darkvision (120 feet)" shortname="Darkvision (120 feet)"><description>You can see in the dark (black and white vision only).</description></special><special name="Low-Light Vision" shortname="Low-Light Vision"><description>See twice as far as a human in low light, distinguishing color and detail.</description></special></senses>

sozin
Cave Troll
Posts: 65
Joined: Sat Nov 25, 2006 8:51 pm
Location: Chicago
Contact:

Re: Tokenlab: Pathfinder Herolabs -> Maptools converter

Post by sozin »

Ok, version 0.12 uploaded to the usual spot. Includes:

- full support for vision as you describe above, using the MT framework base as recommended. (as a result of this, you need to report the campaign properties file from the tokenlab-0.12 unzipped folder into whatever .campaign file you are using.)
- added DC and CL to the spell viewer
- fixed the impersonate bug

Thanks again for the rich feedback.

Post Reply

Return to “D&D 3.5/Pathfinder 1e Campaign Macros”