TALES of the VALIANT
Page 10 of 10 First ... 8910
  1. #91
    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" />.


    Code:
      <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>

  2. #92
    Would love to see this as a Linux usable program as well

  3. #93
    Quote Originally Posted by LordEntrails View Post
    See the xml files I have uploaded to earlier in this thread to see what improvements I've made.
    &

    Quote Originally Posted by lousilver View Post
    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.
    If you want to solo your way through FGU, I write about Solo RPG methods and reviews for Resources in my All Things Solo blog.
    Actual Play Logs are in Solo Play Adventures. And Solo GM Notes are in GM's Tome of Experiments.
    Now with Multichannel ChitChat - AI Podcast Series.

  4. #94
    Quote Originally Posted by Tempered7 View Post
    * 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.

  5. #95
    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
    If you want to solo your way through FGU, I write about Solo RPG methods and reviews for Resources in my All Things Solo blog.
    Actual Play Logs are in Solo Play Adventures. And Solo GM Notes are in GM's Tome of Experiments.
    Now with Multichannel ChitChat - AI Podcast Series.

Page 10 of 10 First ... 8910

Thread Information

Users Browsing this Thread

There are currently 4 users browsing this thread. (0 members and 4 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
  •  
Cosmere RPG Beta Launch

Log in

Log in