Loading ...
Sorry, an error occurred while loading the content.

Stat modification, but how do I avoid a potential loop?

Expand Messages
  • Andrew Maitland
    Hi Folks, I ve got a race that if it s Strength Score is LESS than 20, then the stat automatically becomes 20. I m thinking BONUS:STAT|STR|STRSCORE-20 Would do
    Message 1 of 7 , Nov 4, 2009
    • 0 Attachment
      Hi Folks,

      I've got a race that if it's Strength Score is LESS than 20, then the
      stat automatically becomes 20. I'm thinking
      BONUS:STAT|STR|STRSCORE-20
      Would do the trick, but if the stat is above 20 then I run into an
      issue... 21-20 would give a +1... To counter that, I'm thinking a simple
      !PRESTAT:1,STR=21 but will that trigger an endless loop effect?

      --

      Andrew Maitland (LegacyKing)
      Admin Silverback, PCGen Board of Directors
      Data Chimp, Docs Tamarin
      Unique Title "Quick-Silverback Tracker Monkey"
    • thpr
      Umm, STRSCORE-20 doesn t work for 5 either... it would result in -15. Don t you mean 20-STRSCORE? (which works regardless of the value of STRSCORE - positive
      Message 2 of 7 , Nov 4, 2009
      • 0 Attachment
        Umm, STRSCORE-20 doesn't work for 5 either... it would result in -15.

        Don't you mean 20-STRSCORE? (which works regardless of the value of STRSCORE - positive or negative?)


        --- In PCGenListFileHelp@yahoogroups.com, Andrew Maitland <drew0500@...> wrote:
        >
        > Hi Folks,
        >
        > I've got a race that if it's Strength Score is LESS than 20, then the
        > stat automatically becomes 20. I'm thinking
        > BONUS:STAT|STR|STRSCORE-20
        > Would do the trick, but if the stat is above 20 then I run into an
        > issue... 21-20 would give a +1... To counter that, I'm thinking a simple
        > !PRESTAT:1,STR=21 but will that trigger an endless loop effect?
        >
        > --
        >
        > Andrew Maitland (LegacyKing)
        > Admin Silverback, PCGen Board of Directors
        > Data Chimp, Docs Tamarin
        > Unique Title "Quick-Silverback Tracker Monkey"
        >
      • Jason D
        ... Hey Andrew, How about: DEFINE:OrigStrScore|STRSCORE BONUS:STAT|STR|STRSCORE-20|PREVARLTEQ:OrigStrScore,20 That should bypass the infinite loop problem
        Message 3 of 7 , Nov 4, 2009
        • 0 Attachment
          >From: Andrew Maitland <drew0500@...>
          >To: PCGenListFileHelp@yahoogroups.com
          >Sent: Wed, November 4, 2009 2:57:12 PM
          >Subject: [PCGenListFileHelp] Stat modification, but how do I avoid a potential loop?
          >I've got a race that if it's Strength Score is LESS than 20, then the
          >stat automatically becomes 20. I'm thinking
          >BONUS:STAT|STR| STRSCORE- 20
          >Would do the trick, but if the stat is above 20 then I run into an
          >issue... 21-20 would give a +1... To counter that, I'm thinking a simple
          >!PRESTAT:1,STR= 21 but will that trigger an endless loop effect?

          Hey Andrew,

          How about:

          DEFINE:OrigStrScore|STRSCORE
          BONUS:STAT|STR|STRSCORE-20|PREVARLTEQ:OrigStrScore,20

          That should bypass the infinite loop problem entirely. I haven't tested this, it's just off the top of my head, so I apologize in advance if it doesn't work.
          Jason


          __________________________________________________
          Do You Yahoo!?
          Tired of spam? Yahoo! Mail has the best spam protection around
          http://mail.yahoo.com
        • Jason D
          ... Good catch. I was thinking about the functionality as a whole and totally missed the logic error when I was pondering the problem. :) Change the code I
          Message 4 of 7 , Nov 4, 2009
          • 0 Attachment
            >From: thpr <thpr@...>
            >To: PCGenListFileHelp@yahoogroups.com
            >Sent: Wed, November 4, 2009 5:53:04 PM
            >Subject: [PCGenListFileHelp] Re: Stat modification, but how do I avoid a potential loop?
            >
            >Umm, STRSCORE-20 doesn't work for 5 either... it would result in -15.
            >
            >Don't you mean 20-STRSCORE? (which works regardless of the value of STRSCORE - positive or negative?)

            Good catch. I was thinking about the functionality as a whole and totally missed the logic error when I was pondering the problem. :)

            Change the code I suggested to include this. :)

            DEFINE:OrigStrScore|STRSCORE
            BONUS:STAT|STR|20-STRSCORE|PREVARLTEQ:OrigStrScore,20

            Jason
          • Tir Gwaith
            ... The LTEQ just might avoid the loop problem. Still kinda scary. Tir Gwaith PCGen LST Chimp
            Message 5 of 7 , Nov 4, 2009
            • 0 Attachment
              > Change the code I suggested to include this. :)
              >
              > DEFINE:OrigStrScore|STRSCORE
              > BONUS:STAT|STR|20-STRSCORE|PREVARLTEQ:OrigStrScore,20

              The LTEQ just might avoid the loop problem. Still kinda scary.


              Tir Gwaith
              PCGen LST Chimp
            • Andrew Maitland
              Andrew Maitland (LegacyKing) Admin Silverback, PCGen Board of Directors Data Chimp, Docs Tamarin Unique Title Quick-Silverback Tracker Monkey ... Yeah, this
              Message 6 of 7 , Nov 4, 2009
              • 0 Attachment
                Andrew Maitland (LegacyKing)
                Admin Silverback, PCGen Board of Directors
                Data Chimp, Docs Tamarin
                Unique Title "Quick-Silverback Tracker Monkey"



                Tir Gwaith wrote:
                >> Change the code I suggested to include this. :)
                >>
                >> DEFINE:OrigStrScore|STRSCORE
                >> BONUS:STAT|STR|20-STRSCORE|PREVARLTEQ:OrigStrScore,20
                >>
                >
                > The LTEQ just might avoid the loop problem. Still kinda scary.
                >

                Yeah, this one is a tough one... I did the Ability Route, Apply the
                ability if the stat is Less Than target... but then, when the target
                become different, that will remove the ability... Makes one pine for REQ
                being implemented... and PRE working as intended.

                I think the only way to work this without going through a bunch of logic
                practices is to use a TEMPLATE:CHOOSE which will apply the bonus based
                upon the original stat. Cause I fear that after the bonus is applied,
                the character goes to increase the Strength at level 4, and bam, it
                drops by the bonus it had cause now the stat is outside the parameter
                originally spec'd. Only a template will stay in place... and that'd have
                to be a static bonus.



                >
                > Tir Gwaith
                > PCGen LST Chimp
                >
                >
                > ------------------------------------
                >
                > Yahoo! Groups Links
                >
                >
                >
                >
                >


                [Non-text portions of this message have been removed]
              • Barak
                ... Still a loop... When you do the BONUS you are re-defining the STRSCORE and therefore the OrigStrScore. PCGen re-evaluates VARs all the time. We do not
                Message 7 of 7 , Nov 5, 2009
                • 0 Attachment
                  > -----Original Message-----
                  > > DEFINE:OrigStrScore|STRSCORE
                  > > BONUS:STAT|STR|20-STRSCORE|PREVARLTEQ:OrigStrScore,20
                  >
                  > The LTEQ just might avoid the loop problem. Still kinda scary.

                  Still a loop... When you do the BONUS you are re-defining the STRSCORE and
                  therefore the OrigStrScore.

                  PCGen re-evaluates VARs all the time. We do not have static VARs, hence
                  some of our more obscure issues.

                  Barak
                Your message has been successfully submitted and would be delivered to recipients shortly.