PDA

View Full Version : Fantasy Grounds character sheet printer



Erin Righ
May 13th, 2016, 22:44
I was browsing the forums the other day and came across a link for a program called "fg character sheet printer" that may have it's functionality added to FG in the future according to the post. In any event, I downloaded it and it works great for 4E, 5E and Deadlands, but there was no compatibility with 3.5E/Pathfinder. However, I love the program and wrote a character sheet for 3.5 edition (backgrounds and xsl file) for it that I would like to share but I can't find the link to the program again, and don't know where to post such things. Can anyone help me?

Erin

damned
May 14th, 2016, 01:24
Welcome Erin.
Well done on the new character sheet.
This is the link you are looking for but you may not have permission to upload just yet as you dont have enough posts.
https://www.fantasygrounds.com/forums/showthread.php?27390-Universal-Character-Sheet-Printer-for-FG

If you cant upload email it to Doug via [email protected] and reference that thread and they will either give you permission to upload or do it for you.

ddavison
May 14th, 2016, 15:58
Thanks Erin, I have attached the XSL sheet here. I uploaded your base images to the server and changed the path from your local drive to our server so that it should now work for anyone. I will include the background images as well though for people that may want to alter them or save them locally. If you save locally, you will need to edit the XSL file paths for each page (1 line each.) I didn't have a 3.5E character available, but I had a quick Pathfinder Zen Monk that I used as a test case to generate the PDF output.

ddavison
May 14th, 2016, 15:59
And the final page is here...

Nylanfs
May 14th, 2016, 17:17
purddy, BTW you might be interested in the link in my signature.

Erin Righ
May 14th, 2016, 18:55
Thanks, Nylanfs I find PC Gen confusing, but I honestly haven't looked at it in a while.

Please give me your feedback, folks, I will correct any errors and I am looking for help with a couple of XSL coding problems.

If there is enough interest, i might be convinced to do character sheets for other systems as well.

Thanks for looking.

Erin

Nylanfs
May 14th, 2016, 20:28
This video may be of use in understanding PCGen.

https://youtu.be/n6omGHtAW1Q

Erin Righ
May 14th, 2016, 20:29
Thanks again

damned
May 15th, 2016, 04:46
Nice work Erin :)

Erin Righ
May 15th, 2016, 15:11
Thanks :D

Erin Righ
May 15th, 2016, 15:14
Can someone help me with some XSL code?

damned
May 15th, 2016, 23:12
Can someone help me with some XSL code?

post your challenge here and see what happens.

Erin Righ
May 16th, 2016, 00:28
the code i need is in
<classes>
<id-00001>
<level type="number">12</level>
<name type="string">Paragon</name>
</id-00001>
<id-00002>
<level type="number">20</level>
<name type="string">Paladin</name>
</id-00002>

where i need it to count the number of classes/id-000XX/level and add them together to generate ECL

second problem is in the string
<id-00001>
<bonus type="number">9</bonus>
<critmult type="number">3</critmult>
<dice type="dice">d10</dice>
<stat type="string">strength</stat>
<statmax type="number">0</statmax>
<statmult type="number">1</statmult>
<type type="string">Slashing</type>
</id-00001>

Where i need it to multiply stat (up to statmax) by statmult and add it to bonus then display the result

Then I need it to be able to read

<id-00001>
<bonus type="number">11</bonus>
<critmult type="number">3</critmult>
<dice type="dice">d6,d6,d6</dice>
<stat type="string">strength</stat>
<statmax type="number">0</statmax>
<statmult type="number">1</statmult>
<type type="string">Slashing</type>
</id-00001>

and add the value of dice to itself to come up with the figure 3D6

Any help with this would be appreciated

Erin

Erin Righ
May 17th, 2016, 21:09
No takers? :(

damned
May 18th, 2016, 02:42
:( not as yet... I havent looked at the XSLT stuff before and am up to my eyeballs at the moment...

ddavison
May 18th, 2016, 03:14
Can you send me a sample character export for each and the current XSL sheet and the line # where you want it added. I don't use it frequently enough to know it off the top of my head but I can usually figure something out with trial and error. Unfortunately, the solution will need to be limited to XSLT 1.0 standards which makes it a bit more effort.

ddavison
May 18th, 2016, 03:22
the code i need is in
<classes>
<id-00001>
<level type="number">12</level>
<name type="string">Paragon</name>
</id-00001>
<id-00002>
<level type="number">20</level>
<name type="string">Paladin</name>
</id-00002>

where i need it to count the number of classes/id-000XX/level and add them together to generate ECL


It would be something like this:



<xsl:value-of select='sum(//classes/*/level)'/>

ddavison
May 18th, 2016, 03:50
second problem is in the string
<id-00001>
<bonus type="number">9</bonus>
<critmult type="number">3</critmult>
<dice type="dice">d10</dice>
<stat type="string">strength</stat>
<statmax type="number">0</statmax>
<statmult type="number">1</statmult>
<type type="string">Slashing</type>
</id-00001>

Where i need it to multiply stat (up to statmax) by statmult and add it to bonus then display the result

Erin

I'm not sure what you are multiplying against statmax, but you can wrap some xsl:if statements with some test functions to see if the statmult is greater than the statmax (if I'm reading that properly) and then perform whatever calculation you need within the xsl:value-of expression.

try something along these lines. (I couldn't figure out where the stat value is in the example above. I would expect a number somewhere)


<xsl:if test="statmult &gt; statmax">
<xsl:value-of select="statmax * statvalue + bonus" />
</xsl:if>

<xsl:if test="statmult &lt; (statmax + 1)">
<xsl:value-of select="statmult * statvalue + bonus" />
</xsl:if>

Erin Righ
May 18th, 2016, 18:28
[QUOTE=ddavison;270535]I'm not sure what you are multiplying against statmax, but you can wrap some xsl:if statements with some test functions to see if the statmult is greater than the statmax (if I'm reading that properly) and then perform whatever calculation you need within the xsl:value-of expression.

try something along these lines. (I couldn't figure out where the stat value is in the example above. I would expect a number somewhere)


The line needed comes from the XML at lines 4 through 41 <attributes> but the confusing thing is that the XML references <stat> where the needed number is <bonus>. the XSL file is already set up to get this number on lines 104 through 109, i am not certain i set that up correctly either, any thoughts Doug?

Erin Righ
May 18th, 2016, 18:40
It would be something like this:



<xsl:value-of select='sum(//classes/*/level)'/>



that worked, thanks

Erin Righ
May 23rd, 2016, 18:34
Hey Doug, I could still use some help on that second problem if you have the time? i sent an email to [email protected] with the problem explained further and a copy of the sheets in question attached. Thanks in advance for your time.

Erin