PCgen integration

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. :)
User avatar
gioppo
Giant
Posts: 145
Joined: Tue Dec 16, 2008 9:09 am
Location: Torino (Italy)
Contact:

PCgen integration

Post by gioppo »

Managed to get a token from PCgen.
The steps are customizing a character sheet for PCgen adding it the ability to tranform the data into an XML usable to MapTool than placing that file into the rptok file
You can read more on my blog

http://gioppoluca.blogspot.com/2009/01/ ... ptool.html

Will post something here soon
Luca

User avatar
gioppo
Giant
Posts: 145
Joined: Tue Dec 16, 2008 9:09 am
Location: Torino (Italy)
Contact:

Re: PCgen integration

Post by gioppo »

I'm very satisfied :D
Managed to add an import menu where you can choose the exported xml file from pcgen and the png image for your character and you get a new tocken in the map with the data coming from PCgen.
Now will work on the xml sheet for PCgen since I think that it could be nice to use the one coming from Pathfinder.
Any suggestion on a ideal general token to use (one with the most of usefull macro)?
Luca

User avatar
DJuego
Cave Troll
Posts: 84
Joined: Fri Jun 01, 2007 1:54 pm

Re: PCgen integration

Post by DJuego »

Thanks for your time!!!

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

Re: PCgen integration

Post by Azhrei »

gioppo wrote:Managed to add an import menu where you can choose the exported xml file from pcgen and the png image for your character and you get a new tocken in the map with the data coming from PCgen.
Very cool. Sounds like a great idea. I'd like to have something to generate PF NPCs quickly...

Does this comment mean that you added the option to MapTool? Or was it CharTool? (It sounds like MapTool.)
Now will work on the xml sheet for PCgen since I think that it could be nice to use the one coming from Pathfinder.
Any suggestion on a ideal general token to use (one with the most of usefull macro)?
Luca
Usefulness of macros is directly related to the campaign properties, so there's not going to be a single good token to use as a template. However, I don't doubt that we'll soon have a way to do a multi-select drag-n-drop of macros from one token to another (hint, hint) so copying macros around won't be so much trouble.

Perhaps the easiest way to handle this is for your import function to accept an existing rptok, an XML file, and one or two PNG images (token and portrait). It then reads the rptok and replaces the sections with the XML, then adds the images.

Although thinking about it, the only stuff that's practical to import is the basic stats: ability scores, skills, and so forth. Every campaign is likely to have different properties assigned, so not much else can be done.

Oh, if you choose a token for your "template" that simply makes calls to a Lib:token, your macros won't have to change when the campaign properties do. I'm almost thinking that Lib:tokens should be exported when the campaign properties are exported...

User avatar
gioppo
Giant
Posts: 145
Joined: Tue Dec 16, 2008 9:09 am
Location: Torino (Italy)
Contact:

Re: PCgen integration

Post by gioppo »

Yes it is Maptool.
Since I use PCgen to record PC data (and to quick generate NPC) one of the best solution for me is porting data from one to the other without having to enter data a second time.
When you work, have a child, and barely manage to make a session a month each minute gained is a treasure.
Luca

User avatar
Mrugnak
Dragon
Posts: 745
Joined: Mon Jul 21, 2008 7:38 pm

Re: PCgen integration

Post by Mrugnak »

I am intrigued, but how bound is this to a specific system?

I would be leery of it hard-coding expectations of, say, D&D3.5 considering the 4.0 players, and as a GURPS player, I'd be REALLY frustrated by it (so close and yet SOOOO far).

I can get GCA to spit out an XML file however I like it with some sweat and effort (including one that's basically most of the MapTools token XML, I suppose), but obviously a completely different game system wants different properties and macros...

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

Re: PCgen integration

Post by jfrazierjr »

Mrugnak wrote:I am intrigued, but how bound is this to a specific system?

I would be leery of it hard-coding expectations of, say, D&D3.5 considering the 4.0 players, and as a GURPS player, I'd be REALLY frustrated by it (so close and yet SOOOO far).

I can get GCA to spit out an XML file however I like it with some sweat and effort (including one that's basically most of the MapTools token XML, I suppose), but obviously a completely different game system wants different properties and macros...
PCGen can for the most part take whatever data you have in PCGen and transform that with xslt to any format xslt utilizes, so there is not reason any game system that can be created in PCGen cannot have a transform for creating a rptok as long as someone is willing to put in the work to make the xslt transform file.
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..

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

Re: PCgen integration

Post by Azhrei »

jfrazierjr wrote:... as long as someone is willing to put in the work to make the xslt transform file.
Aye, there's the rub.

;)

User avatar
Mrugnak
Dragon
Posts: 745
Joined: Mon Jul 21, 2008 7:38 pm

Re: PCgen integration

Post by Mrugnak »

jfrazierjr wrote:PCGen can for the most part take whatever data you have in PCGen and transform that with xslt to any format xslt utilizes, so there is not reason any game system that can be created in PCGen cannot have a transform for creating a rptok as long as someone is willing to put in the work to make the xslt transform file.
And yet I wasn't talking about PCGen. :D I was talking about EVERYBODY ELSE... and specifically about this rptok import, which I'm still not clear on if it's expecting a specific set of attributes etc. as input, or if it is more flexible.

User avatar
gioppo
Giant
Posts: 145
Joined: Tue Dec 16, 2008 9:09 am
Location: Torino (Italy)
Contact:

Re: PCgen integration

Post by gioppo »

I'm coding the modifier so to be enough generic for each system.
The menu now is called PCgen, but is imprecise since it get a png image and a xml file corresponding to the content.xml that is inside the rptok file (you know that is a zip file with a definite structure).
So if you manage to produce the xml file for your game system you can use the import (I think I'll change the manu label) and to get the token in the map.
Luca

P.S.
I'm posting the patch file against the b49 so that you can try it out.
I'm also posting a draft of a character sheet to place in the output sheet of PCgen (still not completely working, but enough to give it a try).
Attachments
patch.zip
(7.53 KiB) Downloaded 159 times

User avatar
Mrugnak
Dragon
Posts: 745
Joined: Mon Jul 21, 2008 7:38 pm

Re: PCgen integration

Post by Mrugnak »

gioppo wrote:I'm coding the modifier so to be enough generic for each system.
The menu now is called PCgen, but is imprecise since it get a png image and a xml file corresponding to the content.xml that is inside the rptok file (you know that is a zip file with a definite structure).
Oh, excellent. I'm very pleased to hear that!
gioppo wrote:So if you manage to produce the xml file for your game system you can use the import (I think I'll change the manu label) and to get the token in the map.
Eheheh, changing the menu lable might be a good idea at this point, but I'm not too worried what it's called :D
gioppo wrote:P.S.
I'm posting the patch file against the b49 so that you can try it out.
I'm also posting a draft of a character sheet to place in the output sheet of PCgen (still not completely working, but enough to give it a try).
Oh HO excellent, thank you. Now to figure out how to apply the patch file O.o (I've never done this before)

User avatar
gioppo
Giant
Posts: 145
Joined: Tue Dec 16, 2008 9:09 am
Location: Torino (Italy)
Contact:

Re: PCgen integration

Post by gioppo »

OK here is a better output sheet for PCgen.
It produce a xml file derived from the pathfinder campaign.
Have modified some macro since much of the calculation is done in PCgen.
Let me know if the patch works and if the token get imported well.
Luca
Attachments
csheet_maptool_pathfinder35.zip
(4.11 KiB) Downloaded 186 times

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

Re: PCgen integration

Post by Azhrei »

I'm grabbing a copy of this myself. I plan to get PCGen 5.15.9 since it's supposed to have PF Beta supprt and I need to build some bad guys for the next session in a couple weeks.

Thanks!

User avatar
gioppo
Giant
Posts: 145
Joined: Tue Dec 16, 2008 9:09 am
Location: Torino (Italy)
Contact:

Re: PCgen integration - error in patch

Post by gioppo »

As I wrote somewhere else I work on different features in the same time (I usually follow a stream of consciousness and code by inspiration :mrgreen: ).
So I usually merge to SVN just the piece of code needed for the feature.
This at risk of forgetting something around.
This is a case (not a good thing for the first patch submission) you will have to add the following

Code: Select all

	public ImportInfo getImportInfo() {
		return importInfo;
	}

	public void setImportInfo(ImportInfo importInfo) {
		this.importInfo = importInfo;
	}

at the end of the Campaign.java file or you will get errors.
Sorry for the mess.
Luca

kridak
Cave Troll
Posts: 57
Joined: Sun Feb 15, 2009 4:59 pm

Re: PCgen integration

Post by kridak »

how do you add the patch to pcgen?

Post Reply

Return to “MapTool”