STAR TREK 2d20
Page 3 of 4 First 1234 Last
  1. #21
    @zmtoman are you aware of the character sheet printer: https://www.fantasygrounds.com/forum...Printer-for-FG

    It uses XSL stylesheets to enable export from any ruleset. The available stylesheets aren't great, and the tool itself is a little rough around the edges... but the XSL approach is quite powerful, flexible, and extensible and is implementable in pretty much any language (including java). You might want to have a look and consider XSL for your conversion engine.

  2. #22
    @Skate927 If you're using the tool I created, there's a checkbox just below where you reference your character xml. It'll swap them. If you want the adventurers league pdf, you have to use the 'Tyranny of Dragons' option in the dropdown. If you're using the online tool that was referenced elsewhere, I don't actually know what to do to change that...it kinda' bothered me as well.

    @pollux Thanks for the info, I'll look into it when I get a chance. I wonder how well it would pair with referencing pdfs since the only pdf I actually programmatically generate is the info dump at the end, the others are just copy/fill.

  3. #23
    Quote Originally Posted by zmtoman View Post
    @pollux Thanks for the info, I'll look into it when I get a chance. I wonder how well it would pair with referencing pdfs since the only pdf I actually programmatically generate is the info dump at the end, the others are just copy/fill.
    It's a wildly different approach, I'm not really suggesting it's compatible with the codebase you have... just that you might be interested in prior art. Here's a snippet that is oriented toward html output and creates a list of languages conditional on there being languages to list. You can see HTML tags intermingled with XSL tags that perform some tag-selection and logic:

    Code:
    <xsl:if test="count(languagelist/*) &gt; 0">
        <ul name="languages">
            <label for="languages">Languages</label>
            <xsl:for-each select="languagelist/*">
                <li><xsl:value-of select="name" /></li>
            </xsl:for-each>
        </ul>
    </xsl:if>
    I'm not familiar as familiar with PDF output, but I get the vague sense that XSL provides a markup language for PDF structure that's not so different from HTML. Or one could use one of many strategies to get from html to PDF. Anyplace you have java code that selects XML elements, you'd instead have element selectors in the XSL stylesheet. This strategy allows the code to handle any ruleset by having a stylesheet per ruleset and feeding the character sheet plus the stylesheet to the XSL library to do the heavy-lifting on formatting... whereas you'd potentially need a whole new class heirarchy to handle a different ruleset.
    Last edited by pollux; May 18th, 2020 at 02:04.

  4. #24
    Oh, I see, XSL with the intention of generating new files from scratch. That's vastly different than what I'm doing.

    From what research I've done since my last reply, it appears it would simply rely on linking up an xsl file to an xml file, then outputting the implementation as an html (from there to pdf...possibly) file. I'm pretty sure there's simple web uis that can do that. For example this might be of use to you if you already have an xsl generated: https://www.freeformatter.com/xsl-transformer.html although their support for styles may vary

    A standalone application could do this, however, I think accessible alternatives may already exist. In concert with the link above, I'd find a converter to convert the html output to a pdf.

  5. #25
    Quote Originally Posted by Laerun View Post
    Is there any objection or reason not to use the AL tools online?
    https://www.alonlinetools.net/FGCharacterSheet.aspx
    Other than not printing offline? Nice to have options, good work!

    Laerun

    ps. One caveat, do not use weird characters like hyphens or apostrophes in your 'Name' field or it will break the conversion.
    All I get from this is file uploaded, I don't seem to get a PDF?

  6. #26
    This prints out a nice character sheet. I can't complain about that but I will mention this...it looks like the program is producing a sheet with double the proficiency bonus. Easy to overcome but I wanted to add my two cents. And yes I know I am replying to a thread that is over two years old.

  7. #27
    Quote Originally Posted by kevdog45 View Post
    This prints out a nice character sheet. I can't complain about that but I will mention this...it looks like the program is producing a sheet with double the proficiency bonus. Easy to overcome but I wanted to add my two cents. And yes I know I am replying to a thread that is over two years old.
    Hi Kev, thanks for replying. So after uploading the XML and leaving it for an hour nothing is happening? I'm sure I'm being daft, but after it's uploaded, then what happens for you to get your print out?

  8. #28
    Quote Originally Posted by ianw View Post
    Hi Kev, thanks for replying. So after uploading the XML and leaving it for an hour nothing is happening? I'm sure I'm being daft, but after it's uploaded, then what happens for you to get your print out?
    I think it's broken; it used to then create a PDF you could save.

  9. #29
    Mine won't even launch the window anymore. Is this project abandoned, then?

  10. #30
    Specifically this project as in the java one? I wouldn't say abandoned, but I'm just super busy with another project. All I can suggest is verifying your java version, and launching it via the included bat file. Since it appears executable jars can't be executed directly.

    The online project at https://www.alonlinetools.net/FGCharacterSheet.aspx is a completely different thing (not my work).

    I'm aware of the proficiency issue, however I have no idea why it's doubling. I'll fix it at some point.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
DICE PACKS BUNDLE

Log in

Log in