PDA

View Full Version : PDF or External FG sheets?



Aquitaine
October 19th, 2018, 15:22
What (if anything) do you all use for printing or displaying FG character sheets outside of FG?

We like to have FG be authoritative but then have printable copies for easier reading - I see tools that take an FG export for 5E but wonder if there's anything out there for Starfinder?

Octavious
October 20th, 2018, 01:53
HI, I don't think there is a way to print out character sheets for Starfinder.. I haven't really seen a lot of enthusiasm from anyone to build anything like that for Starfinder. Heck there isn't even a starship combat tracker for it. and I'm wondering if there ever will be... ..

Callum
October 20th, 2018, 19:55
It's something I've been wanting from Fantasy Grounds for years! I've had to resort to building duplicate copies of every character in a separate app (PCGen) and printing them from there.

Aquitaine
October 20th, 2018, 20:29
It's a pretty easy development job -- all you need is a well-designed PDF to take the input fields and then a transformer to take the XML and send those values as form fields to the PDF. You could do the same thing with Google Sheets, too, I expect.

My only hesitation is that XML is slow and clunky nd I'd expect that the next-gen FG engine would use JSON for data storage ... much easier to work with that.

pindercarl
October 20th, 2018, 20:32
FG will continue to use XML and LUA in future versions.

Aquitaine
October 20th, 2018, 20:33
I understand supporting it to keep backwards compatibility, but why use it for new material?

pindercarl
October 20th, 2018, 21:00
As you point out, for the purposes of backward compatibility, XML is required. There will not be a hard line of "before FGU and after FGU." Existing products must be supported in the new version and new products will continue be supported in the "classic" version of Fantasy Grounds for some time. The question could be rephrased as, "why replace a core and functioning part of the software?" There are many existing libraries that could be exploited in FGU to make the XML more performant and will likely be explored after FGU development is complete.

Trenloe
October 20th, 2018, 21:34
It's a pretty easy development job -- all you need is a well-designed PDF to take the input fields and then a transformer to take the XML and send those values as form fields to the PDF.
What's your definition of "a pretty easy development job"? An hour, a day, a week, a month? Remember that there are many different rulesets in FG, all with different character sheet output needs. There are some pretty complex data structures (just look at all those different options on the Actions tab)...

Here's a framework designed for community members to help out and put something together: https://www.fantasygrounds.com/forums/showthread.php?27390-Universal-Character-Sheet-Printer-for-FG The fact that there is very little produced from the usually very active community suggests that it's a little bit more than "pretty easy" to produce good and accurate external character sheets from FG XML.

But... I'm happy to be proven wrong! Perhaps I'm missing something and it really is easy. Maybe some community members could get together and produce the required XSL conversion files for Starfinder? Or look into doing this straight into PDF as mentioned?

Aquitaine
October 20th, 2018, 21:42
Taking an XML file and populating a PDF is an easy development job, but that assumes you have the PDF ready to go, and that it's already formatted to accept form fields. I've done that sort of thing before and the "easy" really just comes from the fact that PDF manipulation libraries are already out there. take one of those, an XML deserializer, then write a transformer to map the XML fields to the PDF and create the PDF.

The linked page is if you want to output HTML -- more of a one-stop shop for the whole process. I don't think I'd take that approach, at least for a first pass. If the target format is a printer I'd stick to PDF.

Trenloe
October 20th, 2018, 22:39
Taking an XML file and populating a PDF is an easy development job, but that assumes you have the PDF ready to go, and that it's already formatted to accept form fields. I've done that sort of thing before and the "easy" really just comes from the fact that PDF manipulation libraries are already out there. take one of those, an XML deserializer, then write a transformer to map the XML fields to the PDF and create the PDF.
I'm sorry, but that still doesn't sound easy to me.

As SmiteWorks don't want to make FG a character creation application, I doubt that they would want to assign valuable development resources to something like this. It would take resource away from FGU and would also give the impression that FG is moving into more of a character creation space - otherwise why would they be providing the ability to print out characters for use outside of FG?

If it's something that you want, and it really is easy as you say, then I'd recommend you go for it - do it yourself, or organize a community group to start putting together what's needed. I'm sure I'd use it! :)

Aquitaine
October 20th, 2018, 22:59
I wasn't asking or even suggesting that SmiteWorks should do it. It doesn't make sense for them to do it since it's too specific to each community. They make it easy to get at the data. Their work is done (though JSON export would be nice....)

I can write a transformer in an afternoon, but I'm not a designer. It looks like there's already a pretty decent interactive PDF with formfield support: https://drive.google.com/file/d/0B6EzBlo7vJyUekVCOGdGdmh3SzA/view

If I get some time tomorrow I'll see what I can do.

Trenloe
October 20th, 2018, 23:03
I wasn't asking or even suggesting that SmiteWorks should do it.
Sorry, I misunderstood your intention.


If I get some time tomorrow I'll see what I can do.
Great! :)

Aquitaine
October 21st, 2018, 22:37
Mea culpa, an hour was a bit optimistic. Scaffolding out the app and getting the framework in place to do the transformation took most of the time; now it's just a question of filling in the rest of the fields.

Here's a proof of concept; haven't got to the 'health and resolve' or 'armor class' stuff yet but I have everything written that I need to pull those fields. Just need to finish the legwork to transform them.

The app runs on a (relatively) small java application server. I'd prefer not to host it myself. Anybody have a DigitalOcean or AWS instance they want to donate? I've packaged it as a docker image so all that's required is to press "go"!

Aquitaine
August 13th, 2019, 03:11
Real life intervened between my job and a newborn, but this is actually not that far from being usable, at least for basic character sheets.

It can be used locally but requires Docker; it's probably better suited to run on a public web site. If somebody has a VM somewhere with a couple gigs of RAM that's all that's needed.

If nobody responds, I'll get around to it eventually (like once I have time to actually play Starfinder....maybe in a year or so) and will host it myself. But if there's interest in the form of donating a sliver of server space, I'll get it done sooner.

AdrielLBR
January 18th, 2020, 04:07
Real life intervened between my job and a newborn, but this is actually not that far from being usable, at least for basic character sheets.

It can be used locally but requires Docker; it's probably better suited to run on a public web site. If somebody has a VM somewhere with a couple gigs of RAM that's all that's needed.

If nobody responds, I'll get around to it eventually (like once I have time to actually play Starfinder....maybe in a year or so) and will host it myself. But if there's interest in the form of donating a sliver of server space, I'll get it done sooner.

Would like to help somehow. I'm an inthusiastic for FG, a quick learner and a Starfinder lover.
So if there is something I can help with, let me know.

Another thing: it is applicable to other rulesets. And in case it is, how much work would we need to do to make it fullfunctional?

Aquitaine
January 18th, 2020, 04:15
Another thing: it is applicable to other rulesets. And in case it is, how much work would we need to do to make it fullfunctional?

Yes, I think so. It's nothing terribly complicated. There are two pieces: part of the application populates PDFs that have form fields predefined. It just takes input values and plugs them into the PDF.

The other part of the app reads the input from the FG XML and transforms it into those values that get fed into the PDF. In many cases, it's just finding the appropriate value, but in some cases, we have to do calculations that FG doesn't do (or rather, it does, but it doesn't save the calculated values in the XML). Max dexterity to AC and armor penalties, for instance. We also have to format description fields to fit on the PDF.

tbh I set it aside between a baby and FG not looking like it was going to support Starfinder space combat for some time. I haven't checked in on that lately but I don't think I'd put more work into this until it does. But I'm happy to open up the code if somebody wants to take it over. It's written in Lucee, which is just a JVM scripting language and pretty easy to learn.

damned
January 18th, 2020, 05:17
Yes, I think so. It's nothing terribly complicated. There are two pieces: part of the application populates PDFs that have form fields predefined. It just takes input values and plugs them into the PDF.

The other part of the app reads the input from the FG XML and transforms it into those values that get fed into the PDF. In many cases, it's just finding the appropriate value, but in some cases, we have to do calculations that FG doesn't do (or rather, it does, but it doesn't save the calculated values in the XML). Max dexterity to AC and armor penalties, for instance. We also have to format description fields to fit on the PDF.

tbh I set it aside between a baby and FG not looking like it was going to support Starfinder space combat for some time. I haven't checked in on that lately but I don't think I'd put more work into this until it does. But I'm happy to open up the code if somebody wants to take it over. It's written in Lucee, which is just a JVM scripting language and pretty easy to learn.

new dev team member superteddy57 has released some Starship combat updates recently.

superteddy57
January 18th, 2020, 06:55
Yes, it is currently available on the Test server and will soon be Live.

https://www.fantasygrounds.com/forums/showthread.php?53280-Starfinder-Ship-Combat-moving-to-main-code

Aquitaine
January 18th, 2020, 14:50
That's great! Sorry, I'm sure I could've figured that out from reading the forum, but I only checked this thread because I was subscribed to it.

I'll see if I can get a couple hours to dust off my exporter and get it out the door. My original offer stands, too - if somebody wants to spring for a 4 GB VM somewhere like AWS Lightsail or DigitalOcean, I'll make it publicly available. It's possible to run it offline but it needs a bunch of Java plumbing to handle the XML transformation and PDF manipulation.

HeckoX
November 12th, 2021, 02:54
I'll see if I can get a couple hours to dust off my exporter and get it out the door. My original offer stands, too - if somebody wants to spring for a 4 GB VM somewhere like AWS Lightsail or DigitalOcean, I'll make it publicly available. It's possible to run it offline but it needs a bunch of Java plumbing to handle the XML transformation and PDF manipulation.
Cheers mate, did anything come of this?

Aquitaine
November 12th, 2021, 03:02
Family obligations took over my life. I'm happy to share the code (which relies on a free tool called Commandbox with a JRE to run, or else Docker, which is how I have set it up). Anybody with basic java or javascript or just coding 101 skills could probably make sense of it and I'm happy to lend a hand.

https://github.com/MordantWastrel/sfrpg_pdf - built to run in Docker

HeckoX
November 12th, 2021, 03:37
I unfortunately have none of those skills...
And while I would normally be willing to learn, it was to export 5 character sheets for a game tomorrow, so it would be a bit overkill.
But I hope someone will host the application somewhere in the future, as it really looks great! And all the best with the little one :)