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

Requesting Code and Data changes on equipment to solve OS problem

Expand Messages
  • Frank Kliewe
    Let me start describing the problem first. If reading about OS stuff makes your head hurt, please fast forward to the section under the header SOLUTION, but I
    Message 1 of 6 , Aug 26, 2005
    • 0 Attachment
      Let me start describing the problem first. If reading about OS stuff makes your head hurt, please fast forward to the section under the header SOLUTION, but I promise I will try to make it easy understandable.

      I recently tried to add ammo checkboxes to the weapons block of the modern output sheets. The weapons block uses an output token named WEAPON that allows access to the combat relevant data of a weapon item. The normal equipment data of the weapon item can be accessed by another output token called EQ. For the checkboxes in the weapons block I needed some info gained using the EQ token.

      Since the WEAPON token only holds the weapons in its list and the EQ token holds all equipment, there is an extension to the EQ token called EQ.IS.WEAPON. When this extension is used, basically "WEAPON.4" will reference the same item as "EQ.IS.WEAPON.4".

      The problem now arises, when certain weapons are used. In a LST-file a thrown weapon has both TYPE:Ranged and TYPE:Melee. That will be 1 entry for EQ.IS.WEAPON, but it counts as 2 entries for WEAPON, which results in the index numbers not referring to the same item anymore (every item before the offending one will be correct, every item coming after it will be off). The same problem happens with weapons of TYPE:Double, only that they even count as 3 entries for WEAPON.


      SOLUTION
      The straightforward solution would probably be a CODE change to add the needed info to the WEAPON token. But I think that would be doctoring the symptoms and not finding the cure, as the next time someone would need to mix information from both of these tags, the problem would come up again.

      My suggestion to solve this would involve a change in CODE and DATA.

      Part of the CODE change necessary for this would be adding the VISIBLE tag to equipment (there is already a FREQ in the trackers to make VISIBLE global).

      With that, the DATA could then be changed to use hidden equipment. A Knife is a thrown weapon now, that holds both tags (Melee and Ranged). After the changes there would be a visible TYPE:Melee entry for the Knife and a hidden TYPE:Ranged entry for Knife(Thrown). A double weapon would get 3 entries, 1 visible normal entry and 2 hidden for the 2 heads when used as double weapon.

      Of course the EQ and WEAPON tokens would then also need the functionality to reference the hidden items, as they would not be welcome in the equipment block, but needed in the weapons block and for referencing the token index. I am aware that this would need a lot more fine tuning, as we would probably also need a KEY tag or something like that to link the entries and there will be more issues that I haven't even thought about yet.

      Does this make any sense?


      Cheerio,

      Frank Kliewe
      PCGen Data Tamarin & OS Lemur

      --
      Death surrounds me, yet in my head I hear something that sounds like Angels, for I have found the Holy Grail of Firepower
      Mine eyes can but weep as they bear witness to the majesty --- the BFG 9000 (The Doom comic, 1994)
    • Barak
      ... Honestly, I think this is a bad idea... It would basically be adding more objects to PCGen which will slow it down. I d go with adding the functionality
      Message 2 of 6 , Aug 26, 2005
      • 0 Attachment
        > -----Original Message-----
        > From: pcgen@yahoogroups.com [mailto:pcgen@yahoogroups.com] On

        > With that, the DATA could then be changed to use hidden
        > equipment. A Knife is a thrown weapon now, that holds both
        > tags (Melee and Ranged). After the changes there would be a
        > visible TYPE:Melee entry for the Knife and a hidden
        > TYPE:Ranged entry for Knife(Thrown). A double weapon would
        > get 3 entries, 1 visible normal entry and 2 hidden for the 2
        > heads when used as double weapon.

        Honestly, I think this is a bad idea... It would basically be adding more
        objects to PCGen which will slow it down. I'd go with adding the
        functionality to the WEAPON tag.

        Right now, there is one object, when the export is created, it makes a
        second one, exports the info and then tosses it (or so it was explained to
        me long ago). What you are proposing is burdening the system not only with
        that one extra, but with additional ones for all the others that are just
        like it for the whole time the program is running. (Code monkeys feel free
        to jump in if I've gotten this wrong in any way).

        Just my .02

        Barak

        PS: Any tag that will work with EQ.IS.xxx should be made to work with
        WEAPON (IMO).
      • Eddy Anthony
        ... I believe I entered that FREQ. The idea is that the item would be hidden in the general gear list and so would not be available for characters to manually
        Message 3 of 6 , Aug 26, 2005
        • 0 Attachment
          Frank Kliewe scribed:

          > Part of the CODE change necessary for this would be adding the VISIBLE tag to
          > equipment (there is already a FREQ in the trackers to make VISIBLE global).

          I believe I entered that FREQ. The idea is that the item would be hidden in
          the general gear list and so would not be available for characters to
          manually add the item to their character. This is because we have items
          which are not supposed to be bought but instead are a virtual representation
          or work-around, things like unarmed strike and Flurry of Blows. These things
          can be added to the PC with the AUTO:EQUIP tag and they show up in yellow
          like automatic feats do and cannot be deleted from the characters gear. They
          still have to be equipped though so a VISIBLE:NO tag should not hide the
          item when it is in the characters equipment list, just the main gear list.

          I don't like the idea of splitting these objects up into multiple items, too
          much complications and they still would need to be equipped like everything
          else. I think it would confuse folks to have to equip the same item twice.

          The straightforward solution listed first sounds good to me, why do you feel
          it does not cover all the bases, if you don't mind explaining things to a
          non-OS monkey. BTW, thanks for the plain English explanation to the problem.
          --
          ~ Eddy Anthony (MoSaT)
          ~ PCGen Content Silverback
        • Frank Kliewe
          ... I could address this, but I won t as Barak s post about this using too much memory made me already scrap the idea in that form. I have put another idea
          Message 4 of 6 , Aug 27, 2005
          • 0 Attachment
            > I don't like the idea of splitting these objects up into multiple items, too
            > much complications and they still would need to be equipped like everything
            > else. I think it would confuse folks to have to equip the same item twice.

            I could address this, but I won't as Barak's post about this using too much memory made me already scrap the idea in that form. I have put another idea into the reply to his post.


            > The straightforward solution listed first sounds good to me, why do you feel
            > it does not cover all the bases, if you don't mind explaining things to a
            > non-OS monkey.

            Because we have two tokens here that can address same item, but there is no 100% working way to link their output. If we make a code change now, that only adds the one tag I need, the next time the problem comes up with another tag will call for yet another code change. If we could synchronize the "index" of these tokens, this one change would grant full information exchange between them. (well, they do not really exchange data with each other, just the information from both of them could be used in the output for one item).

            >BTW, thanks for the plain English explanation to the problem.
            > --
            > ~ Eddy Anthony (MoSaT)
            > ~ PCGen Content Silverback

            Hehe, you're welcome.

            Cheerio,

            Frank Kliewe
            PCGen Data Tamarin & OS Lemur

            --
            Death surrounds me, yet in my head I hear something that sounds like Angels, for I have found the Holy Grail of Firepower
            Mine eyes can but weep as they bear witness to the majesty --- the BFG 9000 (The Doom comic, 1994)
          • Frank Kliewe
            ... OK. I can see the problem and have already scrapped the idea in this form. But still I think that it would be better to have WEAPON and EQ.IS.WEAPON linked
            Message 5 of 6 , Aug 27, 2005
            • 0 Attachment
              > Honestly, I think this is a bad idea... It would basically be adding more
              > objects to PCGen which will slow it down. I'd go with adding the
              > functionality to the WEAPON tag.
              >
              > Right now, there is one object, when the export is created, it makes a
              > second one, exports the info and then tosses it (or so it was explained to
              > me long ago). What you are proposing is burdening the system not only with
              > that one extra, but with additional ones for all the others that are just
              > like it for the whole time the program is running. (Code monkeys feel free
              > to jump in if I've gotten this wrong in any way).
              >
              > Just my .02
              >
              > Barak
              >
              > PS: Any tag that will work with EQ.IS.xxx should be made to work with
              > WEAPON (IMO).

              OK. I can see the problem and have already scrapped the idea in this form. But still I think that it would be better to have WEAPON and EQ.IS.WEAPON linked indexwise.

              If it is the OS WEAPON token that "tosses" the weapons into multiple entries, couldn't the code do that for EQ.IS.WEAPON as well? That solution would also result in both tokens going by the same index.

              I can imagine that it would be complicated to implement codewise, as the EQ.IS.WEAPON syntax probably is integrated in the normal EQ token, but it should not be impossible.

              BTW your explanation seems to imply that all the data from all loaded datasets is kept in memory all the time. Is that so? Is it necessary? Couldn't for instance the feats only be loaded when I'm on the feats tab, and otherwise only those were held, that are actually applied to a character and of the rest only the name and perhaps a link/reference to the dataset? (Yeah, I know, not really a question for you, just brainstorming here).

              Cheerio,

              Frank Kliewe
              PCGen Data Tamarin & OS Lemur

              --
              Death surrounds me, yet in my head I hear something that sounds like Angels, for I have found the Holy Grail of Firepower
              Mine eyes can but weep as they bear witness to the majesty --- the BFG 9000 (The Doom comic, 1994)
            • Barak
              ... That s my understanding, and why PCGen gets slower and slower the more sources you load. ... LOL, brainstorm away. A code monkey will really have to answer
              Message 6 of 6 , Aug 27, 2005
              • 0 Attachment
                > -----Original Message-----
                > BTW your explanation seems to imply that all the data from
                > all loaded datasets is kept in memory all the time. Is that
                > so?

                That's my understanding, and why PCGen gets slower and slower the more
                sources you load.

                > Is it necessary? Couldn't for instance the feats only be
                > loaded when I'm on the feats tab, and otherwise only those
                > were held, that are actually applied to a character and of
                > the rest only the name and perhaps a link/reference to the
                > dataset? (Yeah, I know, not really a question for you, just
                > brainstorming here).

                LOL, brainstorm away.

                A code monkey will really have to answer the question though. :p

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