Beta Sheet for PCGen

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! :)
Post Reply
mcbobbo
Kobold
Posts: 20
Joined: Wed Jul 21, 2010 11:26 pm

Beta Sheet for PCGen

Post by mcbobbo »

I've finished a passable preview-sheet for PCGen that allows one to import character info onto a MapTool token. There are, certainly, numerous flaws. This is my first effort.

I may update this later as time permits.

Steps:

0) Get PCGen and apply the Pathfinder ruleset to it.

1) Put the selected sheet in your preview directory, renamed from '.txt' to 'htm'. For me this is: "C:\Program Files (x86)\PCGen\PCGen5164\preview\d20\fantasy" YMMV...

2) Make a character in PCGen. Fill out everything but the spells known/prepared - up to and including equipment equipped with your perferred/default weapon in hand, all armor in place, etc. (Save it...)

3) Go to the 'Character Sheet' tab and select 'importblock.htm' from the drop down. Select all the resulting goo and copy it (with Ctrl+C in my case).

4) Open Maptool and put a new token on your map. Any token should do, so long as it isn't already full of other stats. I don't remap everything - just some of it...

5) Impersonate that token and paste (Ctrl+V) the mess into the chat window.

6) Check for errors. Note the weapons particularly. Commas and parentheses in the name mess it up. Just edit those directly out of the Property. There are others I am sure...

Anyway, the htm is attached. Please be gentle, but please do point out any improvements you might see that I need to make...

Also, thanks muchly to the original authors of all this code. I take nearly-no credit for this work.
Attachments
importblock .txt
PCGen to Maptool preview sheet
(10.78 KiB) Downloaded 137 times

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

Re: Beta Sheet for PCGen

Post by Azhrei »

Having a statblock formatter that generates the actual MT script code is an interesting solution. I'd be curious how this turns out in the long-term because, as you say, there are a few problems.

First, any text that contains braces will look like macro code to be executed when pasted into the chat window.

Second, the property names are hard-coded. I don't have a problem specifically with that (the names are either going to be hard-coded into the PCGen output or in the MT macro code; no way around that). But which will be easier for the user to update? I think it'll be easier to modify a macro in MT than it would be to install a new statblock formatter for PCGen. (Perhaps not for Windows, but for other platforms there is a huge directory structure to navigate to determine where the statblock template goes.)

Last, there's also a limit to how long a macro string can be. So with enough data generated by PCGen you could end up exceeding that limit. It's probably pretty large (on the order of 32K), but still...

mcbobbo
Kobold
Posts: 20
Joined: Wed Jul 21, 2010 11:26 pm

Re: Beta Sheet for PCGen

Post by mcbobbo »

Azhrei wrote:First, any text that contains braces will look like macro code to be executed when pasted into the chat window.
This is actually my intent. In fact, I'm using macro code like 'setProperty' and 'json.set' in the import method. I'm not married to the chat window, per se, and had considered using a pop-up window instead.

Other than the clipboard, though, I'm not sure what conduit I'd use to connect the two programs. Exported file to imported macro, perhaps?

I'd briefly researched dropping the values into the xml inside to rptok file, but that's actually a bit messier in my view.

Azhrei wrote:Second, the property names are hard-coded. I don't have a problem specifically with that (the names are either going to be hard-coded into the PCGen output or in the MT macro code; no way around that). But which will be easier for the user to update? I think it'll be easier to modify a macro in MT than it would be to install a new statblock formatter for PCGen. (Perhaps not for Windows, but for other platforms there is a huge directory structure to navigate to determine where the statblock template goes.)
Well to be fair, I made this for my own use. If it helps others then the effort to post it was justified, but as it sits I'll have no problem either holding the versions of everything steady or performing the direct updates myself. In fact, I haven't distributed this code to my players. I just ask them to email me their pcgen file and I handle the import onto their token.

I would point out, though, that having the precise wording of the feats and whatnot is actually a benefit. I can map them with extreme precision. Or could, if I honed in on the code a bit tighter.

Anyway, thanks for checking it out.

:)

Post Reply

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