Page 1 of 1

Help Getting Started with New Custom OS

PostPosted: Wed Apr 05, 2017 5:32 pm
by Zenoguy3
So I play with a online pathfinder pick up game group, Blade and Bow and we are quite particular about our character sheets for obvious reasons. It's very important, due to the nature of our game and players, that as much detail as possible is documented on the character sheet, making using pcgen for our characters impossible, simply because it does not, as delivered, provide all of the information required. Examples of this information would be, why a character got feats, such as which feats came for leveling, antihero, race, or class features such as the fighter bonus feat, a complete breakdown of hit point sources, such as leveling, con mod, FCB etc, and other such details. Essentially we want to make it exceedingly obvious if anyone is trying to cheat.

Now I love pcgen, it makes creating characters and npcs easy and fast, and I want to use it for B&B, and open it to others to use in that community as well, so I took it upon myself to start the project of making it work and created this repo for anyone that wanted to help me (the help has been predictably absent).

I figured the best way to do this would be to make a singular OS that was not dependent on any of the other standard OS so that I would not have to change it drastically whenever changes were made to the standard ones, and so that I would have complete control over the look and contents of the sheet. However I am having trouble getting started. I have found a few resources for the XSL and FO sides of the equation, but the documentation for the creation of PDF OSs for PCGen has been unhelpful. I find myself unable to get the export function to output a sheet at all. I am sure that there is some issue that is preventing it at this point, a misunderstanding on my part of how the program handles these things, but for the life of me I've been unable to find a resource that adequately explains it.

Presently I have a XSL stylesheet with a template where match = "/" that includes the fo:root object with a simple hello world output. I figure that if I'm able to have the program output that, then using the token and standard fo resources I should be able to build the sheet as I need it, but I can't get the program to actually export anything. when I try to use the helloWorld.xslt to export to PDF I get
Code: Select all
 SEVERE SwingWorker-pool-2-thread-10 BatchExporter:258 BatchExporter.exportCharacterToPDF failed: null
in the log.

So how do I get Started?

Re: Help Getting Started with New Custom OS

PostPosted: Wed Apr 05, 2017 11:04 pm
by Nylanfs
If I'm not mistaken creating the OS's is a two step process for PCGen, everything is sent to "base.xml" or "base.xml.ftl' and then output to the selected sheet.

Here is a place to start.


Also you can jump into our support chat room and depending on who is there get some help.

Re: Help Getting Started with New Custom OS

PostPosted: Thu Apr 06, 2017 2:00 am
by LegacyKing
PDF uses the base.xml.ftl file found in either the gamemode system root directory for that game system, or the default one in the root director of the output sheets. Then the XSLT sheets are a complicated mess - you typically break those up into specific color sheets which then call upon some master template which pulls in the other components. I constructed a building block sheet, which is what we use for the vast majority of the character sheets.

FTL is a stickler for proper syntax. It is an unforgiving template engine. But what it lacks in forgiveness it makes up for a lot more flexibility and power in the sheets.

Also, a side note: PCGen typically omits information to keep the publishers relevant. Other items like what level you gained a specific feat isn't recorded easily. I suppose if you wanted, you could do a Level 1, Level 3, Level 5 feat pool for each gain. But when designing PCGen, the powers that existed back then made the decision to allow for easier character creation, regardless of starting point - be it level 1 or 20. Thus, the design didn't include a method to track what was taken when.

If you want to work on that, then that's fine. I've found you can always record things in the notes section, or the Log sheet works nicely. That should work in the latest version.


Re: Help Getting Started with New Custom OS

PostPosted: Thu Apr 06, 2017 2:54 am
by Zenoguy3
I've tried both of those links and as I said in original post, I found them unhelpful. I've found and looked at the base file and more or less understand it, it's just a matter of translating that to a PDF. I would use the other methods, but I don't think it's possible to make a PDF with anything other than the XSLT stylesheets. My biggest problem is I follow the imports as far down as the go, but I can't figure out where the start of the thing is so I don't know what I have to call in order to make something happen, I'm pretty sure that the null error just means that nothing in my file actually instructs the program to do anything, but I can't figure out what actually makes it do anything. I'll try to hand out in the hipchat to see if I can get some help that way sometime, but all I need is a start, and then I can figure it out as I go.

Re: Help Getting Started with New Custom OS

PostPosted: Thu Apr 06, 2017 6:11 am
by LegacyKing
I work on the OS the most, but it's only on an "as needed basis". You can also hit up Stefan Radermacher on hipchat. We both hang out there at different times. I'm mainly late evenings (U.S. West Coast), Stefan is in Germany.

My advice, pick a sheet you like most, and then reverse engineer it. Everything is set up in blocks, and it's much easier to edit a block, then to build something entirely from scratch, especially if you're coming into this with no XML, or XSLT knowledge. FO is not something I touch unless absolutely necessary.

Process of export - You select the Sheet - that sheet grabs the information from the XML file (.ftl) and then takes the populated information to pull into the blocks.

I have been advocating to make the export use the same files to go to pdf, and htm. But so far, not enough developers to take on this task. Be nicer to work on one set of files, instead of multiple file formats.