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

Re: Objects (WAS: Can we use Xpath...)

Expand Messages
  • andargor
    Hi all, I coded up a little demo to illustrate the advantages of using independent XML objects for character generators. It s a little too large to be put in
    Message 1 of 15 , May 25, 2004
      Hi all,

      I coded up a little demo to illustrate the advantages of using
      independent XML objects for character generators.

      It's a little too large to be put in the Files section (1.5MB), so
      it's on my site:

      http://www.andargor.com/files/panther-demo.zip

      - Unzip to any directory
      - Read the README for the explanation on the approach
      - Execute panther.exe for a sample character

      I'd love to hear your comments,

      Andargor
    • merton_monk
      I like your implementation. Your xml is easily readible and I like how you abstracted the rules into system.xml. Just from glancing at how you constructed
      Message 2 of 15 , May 26, 2004
        I like your implementation. Your xml is easily readible and I like
        how you abstracted the 'rules' into system.xml.

        Just from glancing at how you constructed your class.xml, I wonder if
        you could create a class-template, since it appears that a lot of the
        classes repeat a lot of the same information with only subtle
        changes. e.g.


        <object>
        <category>level</category>
        <name>Cleric Skill Points 3</name>
        <classname>Cleric</classname>
        <classlevel>3</classlevel>
        <value>2</value>
        <targets>
        <target>
        <category>level</category>
        <name>Cleric Skill
        Points</name>
        </target>
        <target>
        <category>skill</category>
        <name>Skill Point List</name>
        </target>
        <target>
        <category>skill</category>
        <name>Total Skill
        Points</name>
        </target>
        </targets>
        </object>


        Is repeated for every class for every level 1 to 20, with only the
        level and the class name changing. Maybe it's not possible in your
        schema to have a 'use this macro, but replace classname with Cleric,
        and level with 3' type function. It would dramatically lower your
        file-size, and may even speed up initialization/load time.

        That's just a first impression. Nice job - obviously you've put a lot
        of effort into this!

        -Bryan
        Benevolent Dictator of PCGen

        --- In pcgen-xml@yahoogroups.com, "andargor" <andargor@y...> wrote:
        > Hi all,
        >
        > I coded up a little demo to illustrate the advantages of using
        > independent XML objects for character generators.
        >
        > It's a little too large to be put in the Files section (1.5MB), so
        > it's on my site:
        >
        > http://www.andargor.com/files/panther-demo.zip
        >
        > - Unzip to any directory
        > - Read the README for the explanation on the approach
        > - Execute panther.exe for a sample character
        >
        > I'd love to hear your comments,
        >
        > Andargor
      • andargor
        ... Thanks for the comment Bryan. Yes, that was the plan, to use object templates , but I didn t have the time to implement them :) Actually, the classes file
        Message 3 of 15 , May 26, 2004
          --- In pcgen-xml@yahoogroups.com, "merton_monk" <merton_monk@y...> wrote:

          > Is repeated for every class for every level 1 to 20, with only the
          > level and the class name changing. Maybe it's not possible in your
          > schema to have a 'use this macro, but replace classname with Cleric,
          > and level with 3' type function. It would dramatically lower your
          > file-size, and may even speed up initialization/load time.
          >
          > That's just a first impression. Nice job - obviously you've put a lot
          > of effort into this!
          >
          > -Bryan
          > Benevolent Dictator of PCGen

          Thanks for the comment Bryan. Yes, that was the plan, to use "object
          templates", but I didn't have the time to implement them :)

          Actually, the classes file is generated by a perl script for now :D

          There are a lot of other optimizations that are needed, particularly
          memory usage, speeding up XPath lookups with indices, etc. All in good
          time...

          Andargor
        • merton_monk
          ... the ... your ... Cleric, ... your ... lot ... I assumed you had used a script of some kind - typing all of that in would have left you with major carpal
          Message 4 of 15 , May 28, 2004
            --- In pcgen-xml@yahoogroups.com, "andargor" <andargor@y...> wrote:
            > --- In pcgen-xml@yahoogroups.com, "merton_monk" <merton_monk@y...>
            wrote:
            >
            > > Is repeated for every class for every level 1 to 20, with only
            the
            > > level and the class name changing. Maybe it's not possible in
            your
            > > schema to have a 'use this macro, but replace classname with
            Cleric,
            > > and level with 3' type function. It would dramatically lower
            your
            > > file-size, and may even speed up initialization/load time.
            > >
            > > That's just a first impression. Nice job - obviously you've put a
            lot
            > > of effort into this!
            > >
            > > -Bryan
            > > Benevolent Dictator of PCGen
            >
            > Thanks for the comment Bryan. Yes, that was the plan, to use "object
            > templates", but I didn't have the time to implement them :)
            >
            > Actually, the classes file is generated by a perl script for now :D

            I assumed you had used a script of some kind - typing all of that in
            would have left you with major carpal tunnel! I know my hands were
            sore for a few days when I first typed in the Spells from the PHB
            when 3e first came out.... ;)

            -Bryan

            >
            > There are a lot of other optimizations that are needed, particularly
            > memory usage, speeding up XPath lookups with indices, etc. All in
            good
            > time...
            >
            > Andargor
          Your message has been successfully submitted and would be delivered to recipients shortly.
          »
          «