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

[BUG]5.12.1 PRExxx and CLASSES in spells.lst

Expand Messages
  • Barak
    I m coding up substitution levels and some of these levels remove spells that are available to the regular class. I ve accomplished this by using PRExxx on
    Message 1 of 6 , Dec 29, 2007
    • 0 Attachment
      I'm coding up substitution levels and some of these levels remove spells
      that are available to the regular class. I've accomplished this by using
      PRExxx on the CLASSES tag in the spells list. This seems to work fine until
      I have multiple PRExxxs and use a PREMULT. Then it throws an error in the
      console and does not work.

      It seems to me that if one or more types of PRExxx tags work, they all
      should.

      Working examples:
      CLASSES:Ranger=2[PREVARNEQ:GnomeRangerSpellRemoved,1]
      CLASSES:Ranger=2[PRETEMPLATE:GnomeRangerSpellRemoved]
      CLASSES:Druid=4|Ranger=3[PREVARNEQ:HalfElfRangerSpellRemoved,1]

      Non working:
      CLASSES:Druid=5|Ranger=4[PREMULT:2,[PREVARNEQ:HalfElfRangerSpellRemoved,1],[
      PREVARNEQ:GnomeRangerSpellRemoved,1]]

      Error thrown in console from above:
      Could not set level info.
      java.lang.NumberFormatException: For input string:
      "4[PREMULT:2,[PREVARNEQ:HalfElfRangerSpellRemoved,1],"
      at java.lang.NumberFormatException.forInputString(Unknown Source)
      at java.lang.Integer.parseInt(Unknown Source)
      at java.lang.Integer.parseInt(Unknown Source)
      at pcgen.core.spell.Spell.setLevelInfo(Unknown Source)
      at pcgen.persistence.lst.SpellLoader.setLevelList(Unknown Source)
      at plugin.lsttokens.spell.ClassesToken.parse(Unknown Source)
      at pcgen.persistence.lst.SpellLoader.parseLine(Unknown Source)
      at pcgen.persistence.lst.SpellLoader.parseLine(Unknown Source)
      at pcgen.persistence.lst.LstObjectFileLoader.loadLstFile(Unknown
      Source)
      at pcgen.persistence.lst.LstObjectFileLoader.loadLstFiles(Unknown
      Source)
      at pcgen.persistence.lst.LstSystemLoader.loadCampaigns(Unknown
      Source)
      at pcgen.persistence.PersistenceManager.loadCampaigns(Unknown
      Source)
      at pcgen.gui.MainSource.loadCampaigns(Unknown Source)
      at pcgen.gui.MainSource.access$1800(Unknown Source)
      at pcgen.gui.MainSource$18.construct(Unknown Source)
      at pcgen.util.SwingWorker$2.run(Unknown Source)
      at java.lang.Thread.run(Unknown Source)

      Barak
    • Tir Gwaith
      ... It is the parser. It is grabbing from the first [ to the first ]. Does this work?:
      Message 2 of 6 , Dec 29, 2007
      • 0 Attachment
        On 12/29/07, Barak <barak@...> wrote:
        > I'm coding up substitution levels and some of these levels remove spells
        > that are available to the regular class. I've accomplished this by using
        > PRExxx on the CLASSES tag in the spells list. This seems to work fine until
        > I have multiple PRExxxs and use a PREMULT. Then it throws an error in the
        > console and does not work.
        >
        > It seems to me that if one or more types of PRExxx tags work, they all
        > should.
        >
        > Working examples:
        > CLASSES:Ranger=2[PREVARNEQ:GnomeRangerSpellRemoved,1]
        > CLASSES:Ranger=2[PRETEMPLATE:GnomeRangerSpellRemoved]
        > CLASSES:Druid=4|Ranger=3[PREVARNEQ:HalfElfRangerSpellRemoved,1]
        >
        > Non working:
        > CLASSES:Druid=5|Ranger=4[PREMULT:2,[PREVARNEQ:HalfElfRangerSpellRemoved,1],[
        > PREVARNEQ:GnomeRangerSpellRemoved,1]]
        >
        > Error thrown in console from above:
        > Could not set level info.
        > java.lang.NumberFormatException: For input string:
        > "4[PREMULT:2,[PREVARNEQ:HalfElfRangerSpellRemoved,1],"

        It is the parser. It is grabbing from the first [ to the first ].

        Does this work?:
        CLASSES:Druid=5|Ranger=4[PREVARNEQ:HalfElfRangerSpellRemoved,1][PREVARNEQ:GnomeRangerSpellRemoved,1]

        I don't know, but worth trying.

        --
        Tir Gwaith
        PCGen LST Chimp
      • Barak
        ... Good thought but still no dice. However, it did lead me to the idea that did work. :p
        Message 3 of 6 , Dec 30, 2007
        • 0 Attachment
          > -----Original Message-----
          > Does this work?:
          > CLASSES:Druid=5|Ranger=4[PREVARNEQ:HalfElfRangerSpellRemoved,1][PREVARN
          > EQ:GnomeRangerSpellRemoved,1]

          Good thought but still no dice.

          However, it did lead me to the idea that did work. :p

          CLASSES:Druid=5|Ranger=4[PREVARNEQ:HalfElfRangerSpellRemoved+GnomeRangerSpel
          lRemoved,1]

          Barak
        • Tir Gwaith
          ... Right, I should have seen that. :) So the CLASSES [ ] stuff only takes a single PRExxx, and not PREMULT. I m tired, and can t think of why we wouldn t
          Message 4 of 6 , Dec 30, 2007
          • 0 Attachment
            On Dec 30, 2007 2:06 PM, Barak <barak@...> wrote:
            > > -----Original Message-----
            > > Does this work?:
            > > CLASSES:Druid=5|Ranger=4[PREVARNEQ:HalfElfRangerSpellRemoved,1][PREVARN
            > > EQ:GnomeRangerSpellRemoved,1]
            >
            > Good thought but still no dice.
            >
            > However, it did lead me to the idea that did work. :p
            >
            > CLASSES:Druid=5|Ranger=4[PREVARNEQ:HalfElfRangerSpellRemoved+GnomeRangerSpel
            > lRemoved,1]

            Right, I should have seen that. :)

            So the CLASSES [ ] stuff only takes a single PRExxx, and not PREMULT.
            I'm tired, and can't think of why we wouldn't want to convert that to
            the standard |PRExxx stuff.... CLASSES tag a single-tag per object
            only?

            --
            Tir Gwaith
            PCGen LST Chimp
          • Byngl
            Shouldn t that be: CLASSES:Druid=5|Ranger=4 [PREVAREQ:HalfElfRangerSpellRemoved+GnomeRangerSpellRemoved,0] But I guess that a character can t be both Half-Elf
            Message 5 of 6 , Dec 31, 2007
            • 0 Attachment
              Shouldn't that be:

              CLASSES:Druid=5|Ranger=4
              [PREVAREQ:HalfElfRangerSpellRemoved+GnomeRangerSpellRemoved,0]

              But I guess that a character can't be both Half-Elf and Gnome at the
              same time...

              Byngl

              --- In pcgen@yahoogroups.com, "Tir Gwaith" <Tir.Gwaith@...> wrote:
              >
              > On Dec 30, 2007 2:06 PM, Barak <barak@...> wrote:
              > > > -----Original Message-----
              > > > Does this work?:
              > > > CLASSES:Druid=5|Ranger=4[PREVARNEQ:HalfElfRangerSpellRemoved,1]
              [PREVARN
              > > > EQ:GnomeRangerSpellRemoved,1]
              > >
              > > Good thought but still no dice.
              > >
              > > However, it did lead me to the idea that did work. :p
              > >
              > > CLASSES:Druid=5|Ranger=4
              [PREVARNEQ:HalfElfRangerSpellRemoved+GnomeRangerSpel
              > > lRemoved,1]
              >
            • Tir Gwaith
              ... Either way. :) -- Tir Gwaith PCGen LST Chimp
              Message 6 of 6 , Dec 31, 2007
              • 0 Attachment
                On Dec 31, 2007 12:36 PM, Byngl <byngl@...> wrote:
                > Shouldn't that be:
                >
                > CLASSES:Druid=5|Ranger=4
                > [PREVAREQ:HalfElfRangerSpellRemoved+GnomeRangerSpellRemoved,0]
                >
                > But I guess that a character can't be both Half-Elf and Gnome at the
                > same time...

                Either way. :)

                --
                Tir Gwaith
                PCGen LST Chimp
              Your message has been successfully submitted and would be delivered to recipients shortly.