Details

    • Type: New Token New Token
    • Status: Closed Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 6.01.04
    • Component/s: Output Tag
    • Labels:
      None
    • Subtype:
      Token

      Description

      Fix for Post 6.0

      Currently we allow the user to change the INVALID TO HIT text. Currently it defaults to 'N/A'. The issue is we have an OS test that requires that exact text or else it breaks the Weapons Output in the Simple Output Sheet.

      I propose a New Output token linked to the INVALID TO HIT Text

      INVALIDTOHIT

      It would export the value entered. We can then make the test check for a value in that token, if yes, then test is valid, if no, proceed.

        Issue Links

          Activity

          Hide
          Eric C. Smith
          added a comment -

          Would this be a "switch" tag, meaning if it id present it print the invalid tohit text?

          Or is the invalid tohit text attached to the tag, i.e. INVALIDTOHIT:Text?

          Show
          Eric C. Smith
          added a comment - Would this be a "switch" tag, meaning if it id present it print the invalid tohit text? Or is the invalid tohit text attached to the tag, i.e. INVALIDTOHIT:Text?
          Hide
          Andrew Maitland
          added a comment -

          This tag literally takes the INVALIDTOHIT text value, and places it in the xlst code. Looks like we'll need a tag for INVALIDDAMAGE

          Here is a sample:

          <xsl:if test="not(w1_h1_p/to_hit = 'null' and w1_h1_p/damage = 'null' and w2_p_oh/to_hit = 'null' and w2_p_oh/damage = 'null')">

          null is a value, it's static. Now, change it to

          <xsl:if test="not(w1_h1_p/to_hit = 'INVALIDTOHIT' and w1_h1_p/damage = 'INVALIDDAMAGE' and w2_p_oh/to_hit = 'INVALIDTOHIT' and w2_p_oh/damage = 'INVALIDDAMAGE')">

          Show
          Andrew Maitland
          added a comment - This tag literally takes the INVALIDTOHIT text value, and places it in the xlst code. Looks like we'll need a tag for INVALIDDAMAGE Here is a sample: <xsl:if test="not(w1_h1_p/to_hit = 'null' and w1_h1_p/damage = 'null' and w2_p_oh/to_hit = 'null' and w2_p_oh/damage = 'null')"> null is a value, it's static. Now, change it to <xsl:if test="not(w1_h1_p/to_hit = 'INVALIDTOHIT' and w1_h1_p/damage = 'INVALIDDAMAGE' and w2_p_oh/to_hit = 'INVALIDTOHIT' and w2_p_oh/damage = 'INVALIDDAMAGE')">
          Hide
          Andrew Maitland
          added a comment -

          Thanks for tackling this Stefan

          Show
          Andrew Maitland
          added a comment - Thanks for tackling this Stefan
          Hide
          Stefan Radermacher
          added a comment -

          Since we need this both for the invalid to-hit and damage texts, I have consolidated both into a single token:

          INVALIDTEXT.x

          Variables Used : Text (Property):
          TOHIT: output the invalid to-hit text as defined on the output preferences tab
          DAMAGE: output the invalid damage text as defined on the output preferences tab

          I have implemented this in Subversion revision 20433.

          Note: don't use this tag in the XSLT code as you sample shows. It should be used to create a new node under /character/export in base.xml, similar to the PAPERINFO token, and then use this in the XSLT code.

          Show
          Stefan Radermacher
          added a comment - Since we need this both for the invalid to-hit and damage texts, I have consolidated both into a single token: INVALIDTEXT.x Variables Used : Text (Property): TOHIT: output the invalid to-hit text as defined on the output preferences tab DAMAGE: output the invalid damage text as defined on the output preferences tab I have implemented this in Subversion revision 20433. Note: don't use this tag in the XSLT code as you sample shows. It should be used to create a new node under /character/export in base.xml, similar to the PAPERINFO token, and then use this in the XSLT code.
          Hide
          Eric C. Smith
          added a comment -

          Where in the OS docs should this token be documented?

          Also, can someone post a clear set of examples from which I can interpolate the rest of the doc entry?

          Show
          Eric C. Smith
          added a comment - Where in the OS docs should this token be documented? Also, can someone post a clear set of examples from which I can interpolate the rest of the doc entry?
          Hide
          Andrew Maitland
          added a comment -

          Eric C. Smith It's used in the base.xml code last I checked:

          <invalidtext>
          <tohit>|INVALIDTEXT.TOHIT|</tohit>
          <damage>|INVALIDTEXT.DAMAGE|</damage>
          </invalidtext>

          and here in xslt:

          <xsl:if test="not(w1_h1_p/to_hit = /character/export/invalidtext/tohit and w1_h1_p/damage = /character/export/invalidtext/damage and w2_p_oh/to_hit = /character/export/invalidtext/tohit and w2_p_oh/damage = /character/export/invalidtext/damage)">

          Show
          Andrew Maitland
          added a comment - Eric C. Smith It's used in the base.xml code last I checked: <invalidtext> <tohit>|INVALIDTEXT.TOHIT|</tohit> <damage>|INVALIDTEXT.DAMAGE|</damage> </invalidtext> and here in xslt: <xsl:if test="not(w1_h1_p/to_hit = /character/export/invalidtext/tohit and w1_h1_p/damage = /character/export/invalidtext/damage and w2_p_oh/to_hit = /character/export/invalidtext/tohit and w2_p_oh/damage = /character/export/invalidtext/damage)">
          Hide
          Eric C. Smith
          added a comment -

          Added new token to OS docs.
          svn #21726

          Show
          Eric C. Smith
          added a comment - Added new token to OS docs. svn #21726
          Hide
          Andrew Maitland
          added a comment -

          OS, no prettylst needed

          Show
          Andrew Maitland
          added a comment - OS, no prettylst needed

            People

            • Assignee:
              Andrew Maitland
              Reporter:
              Andrew Maitland
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: