Code
  1. Code
  2. CODE-73

Using 'defined' var value sets var to 0?

    Details

    • Type: Bug Bug
    • Status: Open Open
    • Priority: Minor Minor
    • Resolution: Unresolved
    • Affects Version/s: 5.16.2
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None

      Description

      To reproduce:

      load rsrd (3.5 RSRD basics or more) and the BugTest dataset.

      create neutral good human cleric (one lvl).
      Add Turn Undead class ability.
      (check preview: turn undead lvl 1)
      add 1 level of BugTestClass
      (check preview: turn undead lvl 0)

      Previous Information:
      > PCGen 5.16.2
      > rsrd + homebrew
      >
      > I ran into this trying to create an ability for a prestige class that is
      > based on Turn Undead.
      >
      > When I tried to increase the relevant VAR with the turn undead var, something
      > weird happened. This is (part of) my code:
      > CLASS:MySpecialPrc<NEWLINE>
      > 1<TAB>BONUS:VAR|PurgeUndeadLevel|TurnLevelUndead
      >
      > As a result, My Turn undead level (as displayed on the html preview) is set
      > to 0, and the PurgeUndeadLevel remains at 0.
      >
      > If, instead, I use TurnLevelBase, My Turn Undead level (as displayed) is
      > correct, and the PurgeUndeadLevel is set correctly.
      >
      > I noticed that TurnLevelUndead is set with a define
      > (DEFINE:TurnLevelUndead|TurnLevelBase) instead of with a bonus
      > (DEFINE:TurnLevelUndead|0<TAB>BONUS:VAR|TurnLevelUndead|TurnLevelBase) in the
      > RSRD.
      >
      > I changed the Turn Undead entry in the RSRD to use the define|0 and
      > bonus|var, and this leads to correct behaviour in my prc.
      >
      > Conclusion:
      >
      > 1. Something strange happening when using DEFINE:MyVar1|MyVar2
      >
      > I think this should either be disallowed (default define to 0 and remove
      > optional initialization parameter) or fixed
      >
      > 2. RSRD should use working data, so change RSRD to use
      > DEFINE:TurnLevelUndead|0 etc.

      1. bugtest.rar
        1.0 kB
        Martijn Verburg

        Activity

        Hide
        Andrew Wilson
        added a comment -

        If you save the test character and then close and reopen it, the numbers come out right.

        Show
        Andrew Wilson
        added a comment - If you save the test character and then close and reopen it, the numbers come out right.

          People

          • Assignee:
            Unassigned
            Reporter:
            Martijn Verburg
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated: