PDA

View Full Version : Utility: FG Print Tool (Print campaigns or character sheets)



ddavison
February 21st, 2019, 18:45
I've made some updates to the FG Universal Character Print Tool to allow printing of a 5E campaign and to clean up a few items on the 5E character sheet.

Download Link:
https://www.dropbox.com/s/727h3741n7ls7nm/FGPrintTool.zip?dl=0

Video Walkthrough:
https://youtu.be/fJBLruikePc

https://www.youtube.com/watch?v=fJBLruikePc

The included PrintCampaign5E.xsl sheet will print out the story, encounters, random encounters, images, NPCs, items and treasure parcels for a 5E campaign. This should be fairly easy to modify to support other rulesets.

The 5E character sheet has been modified to use a javascript script called textFit. This makes text shrink or grow to fill a specified width and height. It can be used with character sheets and other areas where the length of text is unknown but it must fit in a specific area.

The output from this can be used to publish to DMs Guild as long as you include the Fantasy Grounds mod file and mark it as a Fantasy Grounds product. You must have legal rights to distribute all the content included. This tool does not grant you rights to any content that you don't already own the copyright for.

If you modify and create alternate versions of the XSL sheets to support other game systems or you make any significant improvements, please consider sharing those back here and granting us permission to incorporate those into the default installation.

Installation Instructions:
1. Download the zip file
2. Unzip it to a folder on your computer
3. Run FGPrintTool.exe


UPDATES
2019-02-19 Table of Contents style story items work in the HTML to provide hyperlinks within the document (not shown in video)
2019-02-22 Added ability to skip content by placing NPCs, items and stories into a new group called Ignore
2022-11-30 New file browser

Other XSL sheets
Thete's WFRP sheets.
https://www.fantasygrounds.com/forums/attachment.php?attachmentid=27876&d=1562848757

Zacchaeus
February 21st, 2019, 19:47
I've stickied this here (https://www.fantasygrounds.com/forums/showthread.php?27298-Extensions-Modules-Pregens-and-other-5E-resources&p=244141#post244141), but if you want to put it somewhere else, Doug, Just move it along.

LordEntrails
February 22nd, 2019, 05:06
Thank you so much. This means a great deal to me.



The output from this can be used to publish to DMs Guild as long as you include the Fantasy Grounds mod file and mark it as a Fantasy Grounds product. You must have legal rights to distribute all the content included. This tool does not grant you rights to any content that you don't already own the copyright for.

Does the print version have to be included in the same product as the FG version or can two separate DMsG product be done? i.e. one FG module and one PDF module.

ddavison
February 22nd, 2019, 05:37
Thank you so much. This means a great deal to me.


Does the print version have to be included in the same product as the FG version or can two separate DMsG product be done? i.e. one FG module and one PDF module.

I believe they need to be paired together -- otherwise we don't get any portion of the proceeds. Normal DMsGuild is split 50/30/20 (author/OBS/Wotc) and items with FG modules that are properly flagged are split as 50/30/10/10 (author/OBS/Wotc/Smiteworks).

LordEntrails
February 22nd, 2019, 06:26
I believe they need to be paired together -- otherwise we don't get any portion of the proceeds. Normal DMsGuild is split 50/30/20 (author/OBS/Wotc) and items with FG modules that are properly flagged are split as 50/20/10/10 (author/OBS/Wotc/Smiteworks).
Ah, I had forgotten about that! Certainly want you to get any proceeds as appropriate.

Trenloe
February 22nd, 2019, 19:19
...and items with FG modules that are properly flagged are split as 50/20/10/10 (author/OBS/Wotc/Smiteworks).
Where does the other 10% go?!? ;)

ddavison
February 22nd, 2019, 20:02
Where does the other 10% go?!? ;)

Sorry, that was a typo. 50/30/10/10

Zacchaeus
February 22nd, 2019, 22:28
Where does the other 10% go?!? ;)

Always on the ball :)

Thete
April 1st, 2019, 23:38
I have a question, (newb tinkering with the 5ed xsl to print WFRPv3 ruleset) so please forgive the ignorant phrasing of my question.
<snip>
I looked at the file a little longer, and I think I see how the PrintCampaign_5E.xsl answers my original question.

Sgain
April 4th, 2019, 19:27
any chance you could do this for Savage Worlds?

CthulhuRol
April 4th, 2019, 21:19
Try using other template. I have used it with CoC modules nad campaigns and results are very good instead of use a different game template.

Thete
April 14th, 2019, 11:29
Can anyone help point me to what I'm doing wrong here:
The ruleset I'm modifying the print xsl file for groups NPCs into a larger category eg:
npcgroups/0001
npc1
npc2
npcgroups/0002
npc1
npc2

My problem is that when I call the template to print each npcgroup, it prints all the nps regrdless of which group they belong to. Can anyone point to what the following lines need to be?




<xsl:template match="//npcgroups/category">
<div class="npcgroupsclass">
<xsl:for-each select="./*">
<div class="npcgroupssubclass">
<a>
<xsl:attribute name="name">
<xsl:value-of select="name()" />
</xsl:attribute>
</a>
<h1><xsl:value-of select="./name" /></h1>
<div class="npctype"><xsl:value-of select="name" /><xsl:text> </xsl:text><xsl:value-of select="notes" /></div>

<xsl:if test="npcs/*">
<xsl:for-each select="/*">
<xsl:apply-templates select="//npcs" />
</xsl:for-each>
</xsl:if>
<xsl:apply-templates select="text" />
</div>
</xsl:for-each>
</div>
</xsl:template>

I'm not specifying the npc sub category correctly here but can't figure out what it should be instead of "/*"


<xsl:if test="npcs/*">
<xsl:for-each select="/*">

ddavison
April 14th, 2019, 12:29
I think the problem is with <xsl:apply-templates select="//npcs" />

Try something like
<xsl:apply-templates select="." />

Thete
April 14th, 2019, 13:14
Cheers, will give it a go.

..Thanks DD. I had named my template //npcs. Changed it to just npcs without the slashes.
'//' is apparently a too powerful a wildcard and was calling all the instances in the file instead of just the specific context.

Teybor
July 11th, 2019, 04:54
I bought Legacy of the Crystal Shard from Fantasy Grounds and after I did I find it hard for me to read it through on the computer. I followed all the steps given (I think) from the video above but all I get it a cover page. Have I missed a step where I load all the content in order to print it? Yes I am new and this is my first module.

Trenloe
July 11th, 2019, 05:31
I bought Legacy of the Crystal Shard from Fantasy Grounds and after I did I find it hard for me to read it through on the computer. I followed all the steps given (I think) from the video above but all I get it a cover page. Have I missed a step where I load all the content in order to print it? Yes I am new and this is my first module.
The process described in this thread is to print out a FG character sheet or a FG campaign - not a purchased FG module.

Thete
July 11th, 2019, 13:35
It's a great tool, I had great fun trying to learn to print campaigns for the WFRPv3 ruleset. Unfortunately I ran out of time so I'll just post my progress. The ruleset uses custom font characters to represent icons like custom dice results, so I created a ttf font to sit in the folder alongside the printed html file, this font has icons for the custom dice and some of the iconography from the game's Action Cards.

Here is the kind of result I could generate from just css and a ttf file.
2787427875

The very messy xml file and font if anyone was curious 27876

Teybor
July 12th, 2019, 00:54
The process described in this thread is to print out a FG character sheet or a FG campaign - not a purchased FG module.

What's the difference? It's paid for so it isn't like I'm trying to steal anything.

Thete
July 12th, 2019, 01:16
I assume the license allows you to use a product in the form it was purchased, PDF as PDF, printed book as physical copy, FG module as FG Module. So converting it may be a licensing issue.

Wizards provides impressive free PDFs of resources for that module that you can download and print here https://dnd.wizards.com/products/tabletop-games/rpg-products/legacy-crystal-shard

And the entire PDF is currently under half price on drivethru RPG https://www.drivethrurpg.com/product/166079/Legacy-of-the-Crystal-Shard-Next

Trenloe
July 12th, 2019, 17:42
What's the difference? It's paid for so it isn't like I'm trying to steal anything.
There's a big difference - the FG character sheet or data from your FG campaign is something the GM and players have created for their game. As @Thete explains - there's a big difference between using a purchased module in FG (which is where it is licensed to be used) and then adding in additional functionality (allowing printouts) which is usually beyond the usage of the commercial FG module.

ddavison
July 12th, 2019, 18:03
Hey Teybor,

Allowing a print option for encrypted modules is currently one of our limitations. It has more to do with our license with our publishers than it does with your abilities to do something for personal use. I realize that the end result ends up affecting what users can do with content, bu that's the current limitation. You can print your own creations with the print tool and the appropriate XSL sheet -- just not content purchased from the store (with a few exceptions).

Ceazor
August 30th, 2019, 01:41
Have you got a version compatible with Win 10 Pro?
Seems it's not compatible for me

ddavison
August 30th, 2019, 02:02
Have you got a version compatible with Win 10 Pro?
Seems it's not compatible for me

That's what I use. You may need to Unblock it in the Properties for Windows.

Ceazor
August 30th, 2019, 05:25
That's what I use. You may need to Unblock it in the Properties for Windows.

Did you encounter this issue?

I have did a google search for "this app can’t run on your pc, to find a version for your pc, check with the software publisher" can followed a few guide. I am still getting the same error.

ddavison
August 30th, 2019, 14:04
No, but I've seen that sort of thing when trying to open Word docs or Excel docs that I recently downloaded. For those, Windows says it is a corrrupt or invalid file (something like that) unless your right-click on it and choose Properties and then Unblock. The app runs on Windows 10 fine, so there must be something "protecting" your computer from an unknown program. If it isn't blocked in Windows properties, then I would check you anti-virus software to see if it flagged it.

Ceazor
August 30th, 2019, 14:47
No, but I've seen that sort of thing when trying to open Word docs or Excel docs that I recently downloaded. For those, Windows says it is a corrrupt or invalid file (something like that) unless your right-click on it and choose Properties and then Unblock. The app runs on Windows 10 fine, so there must be something "protecting" your computer from an unknown program. If it isn't blocked in Windows properties, then I would check you anti-virus software to see if it flagged it.

I got it to work at home. It's my office PC.

ddavison
August 30th, 2019, 15:49
That points even more strongly to some sort of software protection, security policy or insufficient rights to install executable programs on your work system.

Ceazor
September 1st, 2019, 04:47
That points even more strongly to some sort of software protection, security policy or insufficient rights to install executable programs on your work system.

yes youre right. I might just give up on the office and do my job.

Chris

Avalastrius
October 12th, 2019, 14:24
Ι am stuck at the initial setup, third option, about the campaign xml. I have tried the path and renamed the campaign, I have also picked the campaign I am running (it said if I want to replace it, that doesn't appear at the tutorial) but nothing is working.

When I try to generate the campaign I only get code. Granted, I only have a couple of characters at the moment. Does that play a difference?

ddavison
October 12th, 2019, 16:35
Ι am stuck at the initial setup, third option, about the campaign xml. I have tried the path and renamed the campaign, I have also picked the campaign I am running (it said if I want to replace it, that doesn't appear at the tutorial) but nothing is working.

When I try to generate the campaign I only get code. Granted, I only have a couple of characters at the moment. Does that play a difference?

Can you post a screenshot of what your entries look like and another of what you get as a result?

Avalastrius
October 12th, 2019, 22:31
Can you post a screenshot of what your entries look like and another of what you get as a result?

I will do so when I get home, even though I am not sure how this module is actually working. I am quite new at this.

Is there a way to simply print a character sheet with this? I just can't find out how.

Bonny Bella
January 8th, 2020, 00:04
Is this available for Mac?

mdjames0001
January 18th, 2020, 05:24
I noticed that when it prints actions, the attack doesn't take into account weapon proficiency. The +2 attack bonus is not added in.

LordEntrails
January 18th, 2020, 18:28
I noticed that when it prints actions, the attack doesn't take into account weapon proficiency. The +2 attack bonus is not added in.
Please post both the xml exported from FG and the PDF created. Not sure how they could be different, but someone will have to look at both to see what's going on.

mshall
February 8th, 2020, 19:09
Is there any work to integrate Character Sheet printing directly within FG / FGU? (I did add my vote to the wishlist at idea.informer and it has a lot of votes there, but it is just listed as "under consideration" with no real indication if it really will be worked on). I understand the lack of a general print option for the purchased modules that have license restrictions but a general ability to print non-locked-down content would be a great enhancement, and IMO is especially needed for Character sheets. I have used the FGPrint utility posted here, and it is helpful, but it only is extracting part of the information in the Character -- for example I've printed various character classes that have spellcasting abilities and I don't see anywhere where the spell list is showing up. I have also used the adventuring log online tool and that prints more of some things (spells, some more detail of some of the abilities) but it also doesn't do everything well. I usually end up printing both the output from FGPrint tool and the alonlinetools.net and keeping both printouts together. My son sometimes uses FG to create a character and then print it for use at in-person real-world tabletop group -- I like being able to use FG to build the character with all the tools and rulebook content I purchased, but I do wish there was a way to print all the character information.

Zacchaeus
February 8th, 2020, 19:54
There hasn't been any work done on anything like this AFAIK. The main issue would be licensing and whether you could just print out characters and nothing else. I'd suggest that at present anything like this would be near the bottom of the pile in terms of the order of things that need to be worked on.

Smoltok
April 13th, 2020, 16:18
Hi,

I have a blank page in the result.
I've checked, it's is the good db.xml file.

EDIT : Working for campaign not for character Sheet

solomani
April 20th, 2020, 05:02
Hi team, I just tested this out. Works nicely. Much faster than me cutting and pasting and reformatting in and out of FG. Thank you. I did notice that some monster stat blocks are missing. What does the print utility look at when deciding what NPCs to include in the output?

ddavison
April 20th, 2020, 17:07
Hi team, I just tested this out. Works nicely. Much faster than me cutting and pasting and reformatting in and out of FG. Thank you. I did notice that some monster stat blocks are missing. What does the print utility look at when deciding what NPCs to include in the output?

The monster needs to be in your campaign. It won't output monsters that are in official content.

solomani
April 20th, 2020, 23:48
The monster needs to be in your campaign. It won't output monsters that are in official content.

Yes, it is. It printed out the hoard golem but not the void dragon though it did capture the encounter info :
34130

If I click (or scroll down to the NPC section) the hoard golem pops up, but the void dragon is not there though it does have a link - link to the
https://drive.google.com/open?id=1Rdn_3DBF6XZrRpCBKZSsbx7VxnQikwFn

nildik
April 23rd, 2020, 01:41
Hello! I am trying to print a custom campaign that I made, but the program generate the print with the story entries unsorted. For example the adventure starts with "0.01 Introduction" but the print starts in "1.04 Goblins watchers" and this isn't the only wrong entry order. Anybody notice that or know a solution?

solomani
April 23rd, 2020, 01:50
Yes, it is. It printed out the hoard golem but not the void dragon though it did capture the encounter info :
34130

If I click (or scroll down to the NPC section) the hoard golem pops up, but the void dragon is not there though it does have a link - link to the
https://drive.google.com/open?id=1Rdn_3DBF6XZrRpCBKZSsbx7VxnQikwFn

Any help? Being able to print saves me a lot of time since I tend to publish this on my blog and eventually get them published. Thanks.

solomani
April 26th, 2020, 06:17
Any help? Being able to print saves me a lot of time since I tend to publish this on my blog and eventually get them published. Thanks.

Figured it out. The missing mobs were "uncategorised" once I fixed that, all worked.

Milmoor
May 12th, 2020, 19:14
Trying to use this, it sounds very interesting. But I get a short FG logo with an exclamation mark when I start this and nothing more. So I'm overlooking something. I do have FGC and FGU on this computer and the logo I see i the FGU logo. Tried uninstalling FGU, but that's not the issue. What am I missing?

ddavison
May 12th, 2020, 19:16
Trying to use this, it sounds very interesting. But I get a short FG logo with an exclamation mark when I start this and nothing more. So I'm overlooking something. I do have FGC and FGU on this computer and the logo I see i the FGU logo. Tried uninstalling FGU, but that's not the issue. What am I missing?

Right click on the program and make sure it is not Blocked by Windows. Double check any anti-virus programs to make sure it isn't blocked there either.

Milmoor
May 12th, 2020, 21:35
Right click on the program and make sure it is not Blocked by Windows. Double check any anti-virus programs to make sure it isn't blocked there either.

Already accepted a pop-up from Windows if I wanted to run a program from an unknown publisher and checked the viruskiller. But chances are it somehow still got blocked by Windows indeed. It’s for my own good ;). Will check.

Milmoor
May 13th, 2020, 07:56
Checked, (un)fortunately it was not blocked. Tried a different PC with a different setup and different virus killer. Tried another unzip tool since the Windows version sometimes corrupts files. It just stops after the splash screen and some loading progress.

Could someone download and check the current version? I would like to be certain the problem is at my end. Thanks.

ddavison
May 13th, 2020, 15:17
Checked, (un)fortunately it was not blocked. Tried a different PC with a different setup and different virus killer. Tried another unzip tool since the Windows version sometimes corrupts files. It just stops after the splash screen and some loading progress.

Could someone download and check the current version? I would like to be certain the problem is at my end. Thanks.

Can you post a screenshot of what you see when you launch FGPrintTool.exe? Maybe something will jump out at us from that.

Milmoor
May 13th, 2020, 15:39
Can you post a screenshot of what you see when you launch FGPrintTool.exe? Maybe something will jump out at us from that.

Sure:
35338

The bar below fills with green and the screen just disappears before it gets to the end of the bar.

ddavison
May 13th, 2020, 16:06
I see a similar issue reported for a different Unity app where there is a conflict with a Citrix driver. Uninstalling the Citrix driver supposedly corrects it and newer versions of Unity allow a re-build which avoids the conflict as well. Do you happen to have Citrix installed on your system?


https://steamcommunity.com/app/535930/discussions/1/3393916911746879022/

Milmoor
May 13th, 2020, 16:34
I see a similar issue reported for a different Unity app where there is a conflict with a Citrix driver. Uninstalling the Citrix driver supposedly corrects it and newer versions of Unity allow a re-build which avoids the conflict as well. Do you happen to have Citrix installed on your system?


https://steamcommunity.com/app/535930/discussions/1/3393916911746879022/

I use Citrix on all three computers I tried this. I use it for work. Removing it solved this indeed. Thanks, that would have taken ages to find, if at all. I am using another Unity app on these systems which does work (FlowScape, very recommended), so it’s not an issue with every Unity app.

Milmoor
June 13th, 2020, 08:24
It works, /cheer. I'm happy with the campaign export result. That saves me a lot of hassle. The character export needs some work for me. I get better results with https://www.alonlinetools.net/FGCharacterSheet.aspx. Only the first page is filled. Will take a look at the XLS file.

A minor niggle: the output folder selection did not work for me. Somehow it defaults to a non existing folder at my system and I couldn't change this in the file browser. Typing over it worked though.

Ceazor
June 16th, 2020, 05:34
Has anyone added to the template library at all?

Was hoping for cards to print items.

Milmoor
June 20th, 2020, 18:55
Tried to edit today, but I lack proper tooling. XSL transformations by hand is doable, but no fun at all. And tooling is either paid, or geared to programmers. I'd like a drag and drop interface, without paying lots and/or installing a bunch of tools which in the end only work well on a unix platform.

Radalpho
November 2nd, 2020, 18:00
Does this tool still work? I recently downloaded it and tried following the video. No content, just some header information in the file. Perhaps I am using it wrong.

I am looking to print out some module information as I prepare for my next game. Does this tool work on information contained in a module? I like to have some story and npc information printed from a module while I am DMing.

LordEntrails
November 2nd, 2020, 19:38
Does this tool still work? I recently downloaded it and tried following the video. No content, just some header information in the file. Perhaps I am using it wrong.

I am looking to print out some module information as I prepare for my next game. Does this tool work on information contained in a module? I like to have some story and npc information printed from a module while I am DMing.
By module do you mean like content purchased from the FG Store? No, it will not print anything from the vault, otherwise it would circumvent copyright protections and enable illegal distribution.

Its designed to print campaign data, so stuff you created yourself. i.e. it allows someone to create an FG module and to print it to PDF so both can be sold on the DMsGuild.

webdove
November 27th, 2020, 04:13
Hi, I downloaded the zip, opened the exe and opened a player created exported character.
41463
When I click the generate button it pushes in, but no chrome window pops up. I disabled all extensions and that did not help. Is there an option that I need to set for what browser gets opened? Is the html saved in some location that I can reach?
Thanks, Web

ddavison
November 27th, 2020, 04:17
Yes, you need to fill in the other two boxes. You need a source file and an output file. The output file will tell you the path of the HTML.

webdove
November 27th, 2020, 04:25
Yes, sorry about that. I just reread the titles in those boxes more carefully (duh).
4146441465

webdove
November 27th, 2020, 04:25
Thank you!

HomeBrewDM
June 20th, 2021, 19:05
I used this a couple weeks ago to try and print our characters. It did print something but there was a lot of missing data. Like all my actions/spells were missing and also my weapon attack/damage bonuses were missing. I have not checked what else is missing but those were kind of big ones for us to use the characters. We have been playing online with FGU for all of the pandemic but now we are all vaccinated, so we were trying to convert to in person play.

dredcobar
September 15th, 2021, 02:16
I used this a couple weeks ago to try and print our characters. It did print something but there was a lot of missing data. Like all my actions/spells were missing and also my weapon attack/damage bonuses were missing. I have not checked what else is missing but those were kind of big ones for us to use the characters. We have been playing online with FGU for all of the pandemic but now we are all vaccinated, so we were trying to convert to in person play.

I noticed this as well with the Deadlands character I exported.
Just curious if I dig into the XSL form and the XML export and edit the Deadlands myself will the executable read and layout properly from my edits?
Also if I create a Traveller (1st edition) from a edited XSL and export to an XML will it be able to read and layout for those properties as well.
I don't mind making my home "homebrew" character sheet and doing the pixel measurements and things to setup those up if the FG Print Tool will just read and interpret what I setup.
If it doesn't do that purely but has some limiters within the tool please let me know now before I put any work into an attempt to add, edit, or create anything. Please.

ddavison
September 15th, 2021, 04:46
The XSL sheets are editable. I would recommend making a copy and working from that. You really can’t mess up with it if you are okay with a little trial and error. Just look at the exported XML file to find the info you want to include and then modify where you want it displayed in the XSL file.

Philip Poe
November 29th, 2021, 03:35
Thanks in advance. I was able to print the campaign, but could not find the source file for our characters. I tried inserting the character name at the end of the campaign file, that didn't work. Does any one have any input.

ddavison
November 29th, 2021, 12:57
You need to open the campaign, go to the character window, edit, and then export the characters you want first. This will allow you to save an XML file with the info for that character.

Reg
December 13th, 2021, 14:15
Still no word on if this will be done for MacOS anytime soon?

Leafdancer1
February 21st, 2022, 10:07
I'm not good with all the programimg stuff so is there any way you could add in DnD2e xml stuff so we can print up charactors and champains? sorry for spelling errors

ddavison
November 30th, 2022, 15:10
I just uploaded a new version (link in first post should still take you there). I slightly redid the UI and replaced the file browser with a newer version.

joltblaster
July 15th, 2023, 04:46
Any chance we can get a Pathfinder for Savage Worlds XML Source File?

JohnFintch
November 1st, 2023, 15:43
Hi thanks for this useful tool. No matter how hard I try, unfortunately I can't make the maps appear in the html file and I can't understand why. The images are of my own creation and are inserted in the campaign images folder and linked to the story 1 to 1 as shown in the video. Yet they are still not shown in the final document. What am I doing wrong?

ddavison
November 1st, 2023, 15:46
What is the format of the images? Are they JPG, PNG, or webp?

JohnFintch
November 1st, 2023, 15:52
What is the format of the images? Are they JPG, PNG, or webp?
I tried in jpg, jpeg as of now. Sorry for the Italian but i put some image to make it easy to understand.
592045920559204

ddavison
November 3rd, 2023, 21:33
I tried in jpg, jpeg as of now. Sorry for the Italian but i put some image to make it easy to understand.
592045920559204

Hey John,

It's nothing you are doing wrong. I think the format changed since this was originally written and the paths no longer line up to pull the image records. The output HTML does not appear to link to the image at all. I looked at this for a while yesterday and wasn't able to resolve it yet. I will see if I can get it working and post an update if I do. In the meantime, you should still have access to all your images from your campaign image folder and you can manually insert them in using a simple HTML editor.

Both brackets and notepad++ are great text editors with syntax highlighting for HTML files. I would recommend any of those.

The image records would look like this:

<img src="FILENAME WITH PATH" style="width: 100%;" />

LordEntrails
November 3rd, 2023, 21:43
Thanks for looking at this Doug. I was just coming here to get up to speed to start learning how this works. I've got my Ultimate Undermountain I need to get ready to export.

JohnFintch
November 4th, 2023, 01:02
Hey John,

It's nothing you are doing wrong. I think the format changed since this was originally written and the paths no longer line up to pull the image records. The output HTML does not appear to link to the image at all. I looked at this for a while yesterday and wasn't able to resolve it yet. I will see if I can get it working and post an update if I do. In the meantime, you should still have access to all your images from your campaign image folder and you can manually insert them in using a simple HTML editor.

Both brackets and notepad++ are great text editors with syntax highlighting for HTML files. I would recommend any of those.

The image records would look like this:

<img src="FILENAME WITH PATH" style="width: 100%;" />
Thank you 😊 very much for the time you spend on this amazing work you have done I really appreciate your work around to give me a solution. I'll keep look for update meanwhile I'll do what you suggest. 😉 Have nice day.

LordEntrails
June 12th, 2024, 01:51
Some notes for anyone else who might be trying to use this currently;
- there are 2 executables in the linked Google Drive. It appears that "FG Character Tool.exe" is the most current and better version (more recent date and has better selection window)
- local .webp images are not included (other image formats not tested) in the html
- Story, NPCs, Items entries are not alphabetized. They appear to be created in the order in which they were created in the db.
- .webp images used for custom tokens not used (default letter tokens assigned). .png images for tokens work as expected.
- Campaign spells not exported.
- Quests not exported

I'll be working on seeing what if any of this I can resolve in the XSL and other style files.

LordEntrails
June 13th, 2024, 21:22
With this new XSL I've added Quests and Spells to the 5E campaign. I'll be working next on adding more information for Items. Existing XSL only exports a small amount of the related item fields.

Issues that still exists with the core program:
- Image links not populated (see post #73)
- Local tokens using .webp image are replaced with letter tokens
- Records are not alphabetized

LordEntrails
June 15th, 2024, 00:34
EDIT: Doh! Solved...
<xsl:if test="properties != ''"> <div class="label">Properties</div> <div class="stat"><xsl:value-of select="properties" /></div>
</xsl:if>

ORIG:

I've run into an issue I can't resolve with items. Using the default campaign_5E.xsl file the following behavior with items happens.
If the item has no category (i.e. group) it gets exported with the value of all elements in the item tag, but they are unformatted.
If the item has a category, it gets exported but only with the Name, Type, Description, and Weight elements, and they take on the formatting defined int eh XSL.
It appears that the issue is that the XSL is trying to ignore XML elements that have no value, but the evaluation is only working if the element is a number and not when it is a string. From what I can find online, the XSL is correct...

Anyone able to help or point me in the right direction? I'm just going to be hacking to see if I can get something to work.

The relevant XSL is as follows:

<xsl:template match="//item/category">
<div class="itemlist">
<xsl:for-each select="*">
<a>
<xsl:attribute name="name"><xsl:text>item_</xsl:text><xsl:value-of select="name()" /></xsl:attribute>
</a>
<div class="item">
<div class="itemname"><xsl:value-of select="name" /></div>
<div class="npctype"><xsl:value-of select="type" /> <xsl:if test="subtype &gt; ''"> (<xsl:value-of select="subtype" />)</xsl:if><xsl:if test="rarity &gt; ''">, <xsl:value-of select="rarity" /></xsl:if></div>
<xsl:apply-templates select="description" />
<xsl:if test="weight &gt; 0">
<div class="label">Weight</div> <div class="stat"><xsl:value-of select="weight" /></div>
</xsl:if>
<xsl:if test="cost &gt; 0">
<div class="label">Cost</div> <div class="stat"><xsl:value-of select="cost" /></div>
</xsl:if>
<xsl:if test="damage &gt; ''">
<div class="label">Damage</div> <div class="stat"><xsl:value-of select="damage" /></div>
</xsl:if>
<xsl:if test="properties &gt; ''">
<div class="label">Properties</div> <div class="stat"><xsl:value-of select="properties" /></div>
</xsl:if>
</div>
</xsl:for-each>
</div>
</xsl:template>

LordEntrails
June 15th, 2024, 01:32
Attached XSL is for 5E campaigns and it includes Quests and Spells and the default Items are now working with additional elements added and reformatted. Note that objects not in groups/categories may not work. I have not tested that since it's not my use case. Advanced Stories untested. Tables are not included, working on them now.

LordEntrails
June 24th, 2024, 19:21
I have been unable to resolve Advanced Stories. This is because each story entry is made of of multiple <block> elements and I don't know enough to get the for-select command to work.

My latest effort is this:

<xsl:template match="//reference/refmanualdata/category">
<div class="page">
<xsl:for-each select="./*">
<div class="story">
<a>
<xsl:attribute name="name">
<xsl:value-of select="name()" />
</xsl:attribute>
</a>
<h1><xsl:value-of select="./name" /></h1>
<xsl:for-each select="./blocks/*">
<xsl:apply-templates select="text" />
</xsl:for-each>
</div>
</xsl:for-each>
</div>
</xsl:template>

Any help would be greatly appreciated. Attached is the XSL file as well as a sample db.xml and the latest html output from it for anyone who's willing to help and doesn't want to generate their own. (Note, output.zip is zipped version of output.html, had to zip to get forum to attach it.)

Tempered7
September 2nd, 2024, 16:37
I have been unable to resolve Advanced Stories. This is because each story entry is made of of multiple <block> elements and I don't know enough to get the for-select command to work.

I don't know anything about coding but I can contribute to problem solving through brainstorming. i.e: this html example from Brave's AI assistant:

61863

Especially if this part can be translated into xsl:

Wrap each block element (e.g., paragraphs, headings, lists) within an <option> element. This will create a menu option for each block element.
Ensure each <option> element has a value attribute containing a unique value for the corresponding block element. If no value attribute is included, the value defaults to the text contained inside the element.

https://www.w3schools.com/tags/tag_select.asp has some test codes to run.

# XSL version

"Choose" command is used in this, I imagine this can be added to the code to make the dropdown menu (if I understand the problem correctly) to have more blocks.

61864


Hope this helps.

LordEntrails
September 2nd, 2024, 19:12
Thanks. I'm working on updating my map images at the moment but will get back to this shortly. I'll post what I figure out. Appreciate the ideas :)

Tempered7
September 3rd, 2024, 03:38
Thanks. I'm working on updating my map images at the moment but will get back to this shortly. I'll post what I figure out. Appreciate the ideas :)

Happy to help :) No need to rush. Thank you for working on this util, it would be a loss to see it broken.

lousilver
February 11th, 2025, 03:16
Curious what the status of this is, and what i need to click on to have a working version in 2025.

ddavison
February 11th, 2025, 13:54
Curious what the status of this is, and what i need to click on to have a working version in 2025.

It should still be working. Check the first post and download a copy from there. Let us know if you have any trouble running it and what operating system you have.

lousilver
February 12th, 2025, 05:51
I didn't see FGPrintTool.exe in the zip file. I ran FG Character Tool.exe. it's running in unity.

I picked PringCampaign_5E.xsl
I picked my campaign.

All i see are NPCs and item records, no stories. I use the book, so my stories aren't numbered like in the video. but i didn't see any stories in the output.xml

windows 10

also, sometimes the file browser has corrupted text so you can't read files. I tried changing the xml source because i had picked the wrong one, and the field became perma blank, so i had to restart the program.

ddavison
February 12th, 2025, 20:14
Yes, the PrintCampaign_5E.xsl uses the path for basic Story entries in the campaign and does not point to the reference manual/advanced story entries. The path would need to be changed in the XSL file to appoint to this new location. The easiest way to do that is to make a duplicate of the XSL file for your own use and then modify it. Look at your campaign's db.xml file to see the path structure of where your data is located and then modify the story section to use this path instead.

lousilver
February 13th, 2025, 05:33
Yes, the PrintCampaign_5E.xsl uses the path for basic Story entries in the campaign and does not point to the reference manual/advanced story entries. The path would need to be changed in the XSL file to appoint to this new location. The easiest way to do that is to make a duplicate of the XSL file for your own use and then modify it. Look at your campaign's db.xml file to see the path structure of where your data is located and then modify the story section to use this path instead.

I had some mild success. I noticed that simple stories are termed 'encounter', and that advanced stories are 'refmanualdata'. So I saved a copy of PrintCampaign_5E.xsl and replaced all instances of the former with the latter. This resulted in the titles of each record being included in the output, which was actually in record order rather than alphabetical order so that was nice. but none of the record content was included. I suspect this might be due to the a difference in the internal structure between simple and advanced stories, as the latter can have multiple blocks. maybe i can puzzle this out later.

ddavison
February 13th, 2025, 14:50
Exactly. You are on the right track. The refmanualdata nodes have children nodes for the various blocks of text that are included, along with extra information for any frames our layouts you have.

You can leave the story one there and duplicate it so it looks at the refmanualdata records. Then you will need to look at the children of those nodes and make templates for the children. Finally call the appy-templates for each of the children so it knows how you want to format the output. You can probably map various frames to new CSS classes that resemble the same styling options.

If you use something like ChatGPT, just make sure to tell it that it has to be compatible with XSL 1.0. There are lots of new and easy to use features in later versions of XSLT but Unity only supports the 1.0 version.

LordEntrails
February 13th, 2025, 16:06
See the xml files I have uploaded to earlier in this thread to see what improvements I've made. Please share any improvements you make.
edit: my simple efforts did not come up with a way to export advanced stories. I'm sure it's achievable, I just haven't tried very hard as I don't currently have the need for advanced story export.

lousilver
February 14th, 2025, 02:36
I was able to cobble some frankenstein solution together that served my need. but it is not robust, and I'd be hesitant to unleash it on the universe. However, if someone is trying to print an advanced story instead of a simple story with a single block in it, then this works. Essentially you replace all instances of 'encounter' with 'refmanualdata', then find this block and replace <xsl:apply-templates select="text" /> with <xsl:apply-templates select="./blocks/*/text" />.



<xsl:template match="//refmanualdata/category">
<div class="page">
<xsl:for-each select="./*">
<div class="story">
<a>
<xsl:attribute name="name">
<xsl:value-of select="name()" />
</xsl:attribute>
</a>
<h1><xsl:value-of select="./name" /></h1>
<xsl:apply-templates select="./blocks/*/text" />
</div>
</xsl:for-each>
</div>
</xsl:template>

pord
February 14th, 2025, 12:52
Would love to see this as a Linux usable program as well

Tempered7
March 5th, 2025, 00:45
See the xml files I have uploaded to earlier in this thread to see what improvements I've made.

&


I was able to cobble some frankenstein solution together that served my need. but it is not robust, and I'd be hesitant to unleash it on the universe. However, if someone is trying to print an advanced story instead of a simple story with a single block in it, then this works.

Feedback on the printed material: I used the latest 5e LE file from LordEntrails and edited it as per lousilver's code. Here's the result.

* Almost all the text is there.
* There's no pics, links, header block and the text in it, or the text in frames.
* The arrangement of the titles in printed material is not the same as the source material. This may be due to Pages created in different time (i.e: 02. Index is created way after 059. Blah blah)
* If there is coding characters such as "<>" in the text, print tool doesn't show them.

* It prints beautiful tables, even with alternating colors
* Chat bubble is nice white frame (no links created if there is a link to web)

My module consists only in text & tables, I don't know about character sheets & feats / spells, etc.
Hope this helps.

lousilver
March 5th, 2025, 22:49
* The arrangement of the titles in printed material is not the same as the source material. This may be due to Pages created in different time (i.e: 02. Index is created way after 059. Blah blah)

It's by record id, not index id. Each time you create a new advanced story it gets record id + 1. but if it was actually inserted between indexed page 1 & 3, it will get printed after them, not in between as desired. This may also apply to the blocks within the story itself.

You could change this by redirecting the for loop over the index rather than the record id, but then you'd have to "look up" the record id from the index, rather than iterate over the records directly. Or you could do what i did, and create each story in index order. Also keep in mind that advanced stories are found in the story tab, if you don't save them to a group, the sit unassigned. and if you delete it from the index, it is NOT deleted from the story records. So you will have orphaned story records, unless you delete them directly.

Tempered7
March 11th, 2025, 04:52
I understood only some parts of what you wrote but failed at creating that loop even though I tried for 2 days. Coding is hard.
Thanks for explaining though. From now on, I'll write the text to player notes and then everything is finished I'll pass them to index.
Your edit on Lord's xsl file still printed everything so I can recreate the module in another ruleset and add the text easily.

Thank you all who worked on this app :)

QuothDRaven191
July 4th, 2025, 04:12
Hi all, forgive me if this has been mentioned before.
I've created a Legacy 5e campaign and would like to print the character sheets.
Using the tool from this thread (2022 version) I can get a basic sheet but there is no spell information for my spellcasters and the fonts are all over the place - giant text in some fields, etc.
I've tried each of the 5E XML sheet options supplied with the tool and get similar results.

LordEntrails
March 29th, 2026, 03:20
Starting to work on this again. Working on getting Advanced Stories/Ref Manual/Campaign Books to print. If anyone has made any improvements since the last updates and is up to sharing, would appreciate it :)

LordEntrails
March 30th, 2026, 02:01
Significant improvements have been made for campaign export of D&D 5E, both Legacy and 2024 formats. The following objects are supported: Encounters, Random Encounters, Images (in Advanced Stories), Items, NPCs, Parcels, Tables, Vehicles, Locations, Quests, Basic Stories, Advanced Stories, Spells. The following is not supported, but I plan to figure this out: Story Templates. The following are not exported and I don't have plans to add them; Backgrounds, Classes, Feats, Skills, and Species.

Requirements/Restrictions

All items have to be local to the campaign, including images and tokens

except NPC tokens from an encounter that is linked in a story, for now. See below.


For images to render in the html output they need to be placed in folders relative to the html file

/tokens
/campaign/images or /images (not sure which one this xslt is using...)


Two columns in advanced stories are not exported in two columns, they are converted sequentially, left then right. This meets my needs but others may desire to change this behavior.
NPC stat blocks will include Portraits, then Tokens, then 3D Flat images if they exist


Known Issues

Story Templates are untested, I have not done anything with them so...
Random Encounters are untested, but the code accounts for it and should work.
I've tried to remove the token images from the Encounter links embedded in Stories but have failed. No idea where they are coming from.
Links in stories to Spells and other Stories don't work, the hyperlink is always wrong.
Formatting of Locations is minimal.
Objects are exported according to there db ID, which is based on the prder they are created, not the order they appear in the campaign book.


I've included both the .xsl file and a sample db.xml file I've been testing with. I did not include images so you will need to replace those.

Edit: sorting alphabetical was easier than I expected. Have not updated the xslt here, but it's just having to fully define the sort for stories and advanced stories. The code is:

<xsl:template match="//encounter/category">
<div class="page">
<xsl:for-each select="./*">
<xsl:sort select="name" order="ascending" data-type="text" />
<div class="story">
...
and

<xsl:template match="//reference/refmanualdata/category | //reference/refmanualdata[not(category)]">
<div class="page">
<xsl:for-each select="./*">
<xsl:sort select="name" order="ascending" data-type="text" />
...

LordEntrails
March 30th, 2026, 03:45
Hi all, forgive me if this has been mentioned before.
I've created a Legacy 5e campaign and would like to print the character sheets.
Using the tool from this thread (2022 version) I can get a basic sheet but there is no spell information for my spellcasters and the fonts are all over the place - giant text in some fields, etc.
I've tried each of the 5E XML sheet options supplied with the tool and get similar results.
This is probably because the spells are not contained in the campaign, they are referenced from modules that you have loaded. This tool can only export from campaign content, not loaded modules.

Trenloe
March 30th, 2026, 13:45
This is probably because the spells are not contained in the campaign, they are referenced from modules that you have loaded. This tool can only export from campaign content, not loaded modules.
Spell data is copied to the character sheet when spells are added to the character sheet by drag/drop. The data should be there in the exported character sheet XML.