Lone Wolf Development Forums

Lone Wolf Development Forums (http://forums.wolflair.com/index.php)
-   HL - Savage Worlds (http://forums.wolflair.com/forumdisplay.php?f=59)
-   -   Custom Output Sheets (http://forums.wolflair.com/showthread.php?t=26377)

zarlor November 2nd, 2012 06:55 AM

Custom Output Sheets
Anyone done some work on any of these? I'd love to see your work if you have, no matter how crude. My head is swimming from trying to figure out XSLT and HTML formatting.

Personally I'd love to see something that looks as nice as the standard PDF/Print Preview character sheet, but with all of the full descriptions on Edges/Powers and the like (my group has lots of custom stuff in there.) Trying to figure out how to do that formatting in Custom Output looks like it'll be a LOT of learning to do before I can really even start and I was hoping some others might have made some headway on this and be willing to share examples of at least their statblock.xsl files.

Thanks for any help anyone might be able to throw into the ring!

zarlor November 16th, 2012 09:52 AM

So I guess I'll work on figuring this out, but I need some help. I've worked out more than a few things from the DTD and how to present them but there are some things I can't seem to get working and I'm wondering if anyone here might be able to help me with it.

I'll start off with trying to display Magic Items. I used the Gear entries to make this sort of work as a comma separated list.

First off the lines telling it to display look like:

<!-- Magical gear -->
<p class="magicitem">
<xsl:apply-templates select="magicitems/magicitem"/>
Next the template that tells it how to display:


<!-- Add a comma before all magic items but the first -->
<xsl:template match="magicitems/magicitem">
<xsl:if test="position() != 1">
<xsl:text>, </xsl:text>

<!-- Display the name and quantity - note the lack of newlines / indents
here which make it ugly, but are require to avoid introducing extra
white space which makes the output look bad -->
<xsl:value-of select="@name"/>: <xsl:value-of select="@description"/>, <xsl:value-of select="@enchantments"/><xsl:if test="@quantity != 1">
(x<xsl:value-of select="@quantity"/>)</xsl:if></xsl:template>
Again most of that is a direct copy from the sample statblock.xsl file. What I get for output looks like:


Armbands of Strength: , , Cloak of Shadows: , , Goggles of the Eagle: , , Griffin Statuette: , , Handy Haversack: , , Thieve's Picks: ,
So no real description or enchantments print out.

So from the DTD I can see that there is an ELEMENT entry for "magicitems" with a parenthetical list that includes "magicitem*" in it. Later there is another ELEMENT for "magicitem" with another parenthetical list that includes"description", for example. So it seems that description would not be an @description item, but something different and I don't see any good examples of stuff that is nested 3 deep instead of only 1 or 2 deep. Any ideas?

zarlor November 16th, 2012 11:39 AM

I've been playing with this all day and apparently it took my posting here then playing with it just a tiny bit more to come up with one part of my answer.

It looks like on the line:

<xsl:value-of select="@name"/>: <xsl:value-of select="@description"/>, <xsl:value-of select="@enchantments"/><xsl:if test="@quantity != 1"> (x<xsl:value-of select="@quantity"/>)</xsl:if>
Where I have @description works by simply removing the @ symbol before it. (Told you I'm an XSLT idiot!) So in the DTD for ELEMENT entries like "ELEMENT magicitem ((description))" you wouldn't need to put an @ symbol before it, but for any items in the ATTLIST for that thing presumably you do. Items like "ELEMENT magicitem ((weight?))" for the ones with a ? after them seems to refer to elements that are further defined with their own ELEMENT entry.

In the example in the post previous to this @enchantments is one of those but I still need to work out how to make that one work. enchantment/skillbonus/@name, for example? Presumably I'd have to work out some way to nest a list for items that have multiple skill bonuses/edges/powers. Yikes.

zarlor November 20th, 2012 11:33 AM

OK, here is what I have so far. It's very, very rough and needs a lot of formatting work, but this will print out a lot more information on a character than currently exists in the default custom output. I have a friend with a lot more experience working with XSLT so I'm hoping we can get some help there.

At any rate, this sheet is meant to show all of your "magic items" and gear along with the detailed descriptions, since I have several players who are both relatively unfamiliar with the SW rules and are horrible about looking them up, thus having it right in front of them will save us all a lot of time in play. I don't know how well it will work with things like Deadlands, Super Powers or Horror settings, but this is still in the baby-steps of trying to get this to work at all. Any tips/suggestions are more than welcome.


The file itself is .rar format so just use something like WinRAR to open it and put it in your C:\ProgramData\Hero Lab\customoutput\savage folder. From there you should see it show up in Hero Labs when you go to File -> Save Custom Output... as "Full Character Sheet"

zarlor December 3rd, 2012 10:33 AM

Ok, I'm hoping someone will be able to help out with this...

I've taken a look at Altova's StyleVision (found at http://www.altova.com/solutions/xslt-tools.html, I'm using a 30-day trial) to see if I might be able to use that to design this sheet. I set it up so that the Schema it points to is C:\Program Data\Hero Lab\data\savage\docs\customoutput.dtd which works great and show up all the stuff in the little Schema tree it provides. I then set the "Workng XML" file to C:\Program Data\Hero Lab\customoutput\fullsheet_savage\output.xml, which give me an error about there not be a declaration in element "document" for attribute "signature". And finally I set the XSLT file to C:\Program Data\Hero Lab\customoutput\fullsheet_savage\statblock.xsl. I get no errors there, but it also doesn't show that layout on the Design pane, either. (EDIT: turns out it isn't able to use an existing xslt file to show you the output, only the one in it's format.)

Anyone have a good idea on how I should be laying out files in a tool like this to work correctly? It seem like I've got the dtd file right, but maybe not the other ones? I'd definitely appreciate it if anyone has any experience doing this kind of thing and hopefully I can put together a sheet or two that might be halfway decent for folks before my trial expires (sorry, I don't intend to spend $130 for the product just for this one purpose.)

CapedCrusader December 8th, 2012 12:08 AM

I wish I could be more help on this, but my XML experience is a bit limited, and I have even less on XSLT.

zarlor December 8th, 2012 06:53 AM

Thanks for the input at least. I'm still working on these some and plan to get back into it harder when I'm done with the HoER data file, but I think I'll have to hit the Pathfinder forum for it. They have a couple of sheets like this done and there has been some little bit of discussion on the tools used in the past, so some folks there might have some experience to help us out on these. If I'm really lucky I might even figure out how to do some of the checkbox stuff they've done on some of the sheets so you can just click a checkbox for things like if you want detailed Edge descriptions or just the short descriptions and such.

jbearwillis December 8th, 2012 11:19 AM

Yes Ancient One is the one to direct your questions to. His character sheet in Pathfinder in amazing.:)

zarlor December 8th, 2012 11:38 AM

Agreed, but he's also using Java for it. And learning Java from scratch isn't something I look forward to. Unless the tools in Java make it easier than the very few tools I've found for XML. Something I'll ask around about after I finish the HoER file.

Colen December 9th, 2012 12:43 PM


Originally Posted by zarlor (Post 112446)
I then set the "Workng XML" file to C:\Program Data\Hero Lab\customoutput\fullsheet_savage\output.xml, which give me an error about there not be a declaration in element "document" for attribute "signature".

I think this is your problem. I'm not familiar with the tool you're using, but I believe "Working XML" file would be the XML file the style sheet was going to operate on, i.e. the XML file produced by Hero Lab's custom output mechanism.

Create a character with some items in Savage Worlds to test, then go to File -> Save Custom Output -> Generate XML File. Take the XML file that gets generated and use that for your "Working XML File" in Altova, and see if that works?

All times are GMT -8. The time now is 01:27 AM.

Powered by vBulletin® - Copyright ©2000 - 2022, vBulletin Solutions, Inc.
wolflair.com copyright 1998-2016 Lone Wolf Development, Inc. View our Privacy Policy here.