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

RE: [pcgen_developers] Hit point generator code

Expand Messages
  • Caleb Ulfers
    When I tried to access the link you sent, I received an error. I think you will have to copy and paste the roll function into a reply email. In any case, once
    Message 1 of 18 , Jun 25, 2011
    • 0 Attachment
      When I tried to access the link you sent, I received an error. I think you will have to copy and paste the roll function into a reply email. In any case, once I have this roll function, where should I put it?


      To: pcgen_developers@yahoogroups.com
      From: jdempsey@...
      Date: Sat, 25 Jun 2011 08:18:16 +1000
      Subject: Re: [pcgen_developers] Hit point generator code

       
      Hi Caleb,

      Ah well then you'll need the roll function as described in http://www.pcgen-test.org/autobuilds/pcgen-docs/listfilepages/globalfilestagpages/globalfilesformulas.htm That can be achieved entirely in LST code.

      Cheers,
      James.


      On 25/06/2011 4:51 AM Caleb Ulfers wrote

      My endeavor doesn't have to do with Hit Dice, but rather with items whose prices (and, in some cases, weights as well) could be a range of numbers. Which is why I thought I could use the hit point generator code to make a (random) price and weight generator. 


      To: pcgen_developers@yahoogroups.com
      From: jdempsey@...
      Date: Fri, 24 Jun 2011 14:26:48 +1000
      Subject: Re: [pcgen_developers] Hit point generator code

       
      Hi Caleb,

      Ah this is in the java code. You'd need to be able to recompile that to play extensively with the hit points formula.

      Instead you may be able to achieve the result you want by playing with the hit die size and bonusing the hitpoints based on your criteria instead. I know Andrew Maitland has done some playing with this for his Eclipse set.

      Cheers,
      James Dempsey
      PCGen Code SB



      On 24 June 2011 13:27, Caleb Ulfers <culfers@...> wrote:


      No, I am not intending to commit this; I'm working on a closed-content set for private use. In any case, I can't find .pcgen.core; I can only find .pcgen; there's no .core under that.

      Date: Fri, 24 Jun 2011 08:22:41 +1000

      Subject: Re: [pcgen_developers] Hit point generator code

       
      Hi Caleb,

      Most of the hit point work happens in pcgen.core.Globals.getGameModeHPFormula() however if you need access to character details you may need to look at its caller, pcgen.core.PCClass.rollHP()

      Were you intending to commit this change? If so, once you have worked out what you want to do could you post a proposal here please? Being quite a core part of the system it would be good to discuss any changes in advance.

      Cheers,
      James.

      On 24/06/2011 4:17 AM Caleb Ulfers wrote

      Character hit points. 


      To: pcgen_developers@yahoogroups.com
      From: jdempsey@...
      Date: Thu, 23 Jun 2011 13:47:01 +1000
      Subject: Re: [pcgen_developers] Hit point generator code

       
      Hi Caleb,

      On 23 June 2011 13:34, CalebU <culfers@...>wrote:
      > I wanted to know what the code for the hit point generator is; I want to try to adapt it to code items which have variable prices and weights.
      >

      Welcome to the dev list!

      Were you interested in character or equipment hit points?

      Cheers,
      James Dempsey
      PCGen Code SB



    • James Dempsey
      Hi, I missed a letter from the end. Try this one: http://www.pcgen-test.org/autobuilds/pcgen-docs/listfilepages/globalfilestagpages/globalfilesformulas.html
      Message 2 of 18 , Jun 25, 2011
      • 0 Attachment
        Hi,

        I missed a letter from the end. Try this one:

        http://www.pcgen-test.org/autobuilds/pcgen-docs/listfilepages/globalfilestagpages/globalfilesformulas.html

        Search for roll or random and you'll spot it. The docs should show you how to use the function. You would use the roll function in your weight or cost tags to give a random value each time the item is chosen. Having thought about it I suspect that it won't really do what you are after. You might be better off having an SPROP for your item and then getting the user to change the cost and weight in the customiser.

        I would recommend that further discussion is on the LST File Help list though - it is set up for this sort of discussion.

        Cheers,
        James.

        On 26/06/2011 2:21 AM Caleb Ulfers wrote
        When I tried to access the link you sent, I received an error. I think you will have to copy and paste the roll function into a reply email. In any case, once I have this roll function, where should I put it?


        To: pcgen_developers@yahoogroups.com
        From: jdempsey@...
        Date: Sat, 25 Jun 2011 08:18:16 +1000
        Subject: Re: [pcgen_developers] Hit point generator code

         
        Hi Caleb,

        Ah well then you'll need the roll function as described in http://www.pcgen-test.org/autobuilds/pcgen-docs/listfilepages/globalfilestagpages/globalfilesformulas.htm That can be achieved entirely in LST code.

        Cheers,
        James.


        On 25/06/2011 4:51 AM Caleb Ulfers wrote

        My endeavor doesn't have to do with Hit Dice, but rather with items whose prices (and, in some cases, weights as well) could be a range of numbers. Which is why I thought I could use the hit point generator code to make a (random) price and weight generator. 


        To: pcgen_developers@yahoogroups.com
        From: jdempsey@...
        Date: Fri, 24 Jun 2011 14:26:48 +1000
        Subject: Re: [pcgen_developers] Hit point generator code

         
        Hi Caleb,

        Ah this is in the java code. You'd need to be able to recompile that to play extensively with the hit points formula.

        Instead you may be able to achieve the result you want by playing with the hit die size and bonusing the hitpoints based on your criteria instead. I know Andrew Maitland has done some playing with this for his Eclipse set.

        Cheers,
        James Dempsey
        PCGen Code SB



        On 24 June 2011 13:27, Caleb Ulfers <culfers@...> wrote:


        No, I am not intending to commit this; I'm working on a closed-content set for private use. In any case, I can't find .pcgen.core; I can only find .pcgen; there's no .core under that.

        Date: Fri, 24 Jun 2011 08:22:41 +1000

        Subject: Re: [pcgen_developers] Hit point generator code

         
        Hi Caleb,

        Most of the hit point work happens in pcgen.core.Globals.getGameModeHPFormula() however if you need access to character details you may need to look at its caller, pcgen.core.PCClass.rollHP()

        Were you intending to commit this change? If so, once you have worked out what you want to do could you post a proposal here please? Being quite a core part of the system it would be good to discuss any changes in advance.

        Cheers,
        James.

        On 24/06/2011 4:17 AM Caleb Ulfers wrote

        Character hit points. 


        To: pcgen_developers@yahoogroups.com
        From: jdempsey@...
        Date: Thu, 23 Jun 2011 13:47:01 +1000
        Subject: Re: [pcgen_developers] Hit point generator code

         
        Hi Caleb,

        On 23 June 2011 13:34, CalebU <culfers@...>wrote:
        > I wanted to know what the code for the hit point generator is; I want to try to adapt it to code items which have variable prices and weights.
        >

        Welcome to the dev list!

        Were you interested in character or equipment hit points?

        Cheers,
        James Dempsey
        PCGen Code SB

      • Caleb Ulfers
        Thanks. To: pcgen_developers@yahoogroups.com From: jdempsey@acslink.net.au Date: Sun, 26 Jun 2011 08:55:14 +1000 Subject: Re: [pcgen_developers] Hit point
        Message 3 of 18 , Jun 25, 2011
        • 0 Attachment
          Thanks. 


          To: pcgen_developers@yahoogroups.com
          From: jdempsey@...
          Date: Sun, 26 Jun 2011 08:55:14 +1000
          Subject: Re: [pcgen_developers] Hit point generator code

           
          Hi,

          I missed a letter from the end. Try this one:

          http://www.pcgen-test.org/autobuilds/pcgen-docs/listfilepages/globalfilestagpages/globalfilesformulas.html

          Search for roll or random and you'll spot it. The docs should show you how to use the function. You would use the roll function in your weight or cost tags to give a random value each time the item is chosen. Having thought about it I suspect that it won't really do what you are after. You might be better off having an SPROP for your item and then getting the user to change the cost and weight in the customiser.

          I would recommend that further discussion is on the LST File Help list though - it is set up for this sort of discussion.

          Cheers,
          James.

          On 26/06/2011 2:21 AM Caleb Ulfers wrote

          When I tried to access the link you sent, I received an error. I think you will have to copy and paste the roll function into a reply email. In any case, once I have this roll function, where should I put it?


          To: pcgen_developers@yahoogroups.com
          From: jdempsey@...
          Date: Sat, 25 Jun 2011 08:18:16 +1000
          Subject: Re: [pcgen_developers] Hit point generator code

           
          Hi Caleb,

          Ah well then you'll need the roll function as described in http://www.pcgen-test.org/autobuilds/pcgen-docs/listfilepages/globalfilestagpages/globalfilesformulas.htm That can be achieved entirely in LST code.

          Cheers,
          James.


          On 25/06/2011 4:51 AM Caleb Ulfers wrote

          My endeavor doesn't have to do with Hit Dice, but rather with items whose prices (and, in some cases, weights as well) could be a range of numbers. Which is why I thought I could use the hit point generator code to make a (random) price and weight generator. 


          To: pcgen_developers@yahoogroups.com
          From: jdempsey@...
          Date: Fri, 24 Jun 2011 14:26:48 +1000
          Subject: Re: [pcgen_developers] Hit point generator code

           
          Hi Caleb,

          Ah this is in the java code. You'd need to be able to recompile that to play extensively with the hit points formula.

          Instead you may be able to achieve the result you want by playing with the hit die size and bonusing the hitpoints based on your criteria instead. I know Andrew Maitland has done some playing with this for his Eclipse set.

          Cheers,
          James Dempsey
          PCGen Code SB



          On 24 June 2011 13:27, Caleb Ulfers <culfers@...> wrote:


          No, I am not intending to commit this; I'm working on a closed-content set for private use. In any case, I can't find .pcgen.core; I can only find .pcgen; there's no .core under that.

          Date: Fri, 24 Jun 2011 08:22:41 +1000

          Subject: Re: [pcgen_developers] Hit point generator code

           
          Hi Caleb,

          Most of the hit point work happens in pcgen.core.Globals.getGameModeHPFormula() however if you need access to character details you may need to look at its caller, pcgen.core.PCClass.rollHP()

          Were you intending to commit this change? If so, once you have worked out what you want to do could you post a proposal here please? Being quite a core part of the system it would be good to discuss any changes in advance.

          Cheers,
          James.

          On 24/06/2011 4:17 AM Caleb Ulfers wrote

          Character hit points. 


          To: pcgen_developers@yahoogroups.com
          From: jdempsey@...
          Date: Thu, 23 Jun 2011 13:47:01 +1000
          Subject: Re: [pcgen_developers] Hit point generator code

           
          Hi Caleb,

          On 23 June 2011 13:34, CalebU <culfers@...>wrote:
          > I wanted to know what the code for the hit point generator is; I want to try to adapt it to code items which have variable prices and weights.
          >

          Welcome to the dev list!

          Were you interested in character or equipment hit points?

          Cheers,
          James Dempsey
          PCGen Code SB


        • Caleb Ulfers
          Could I use the program that was used to write the Java code for the hit point generator to recompile it? If so, what is it and where can it be found? Hi, I
          Message 4 of 18 , Jan 15, 2012
          • 0 Attachment
            Could I use the program that was used to write the Java code for the hit point generator to recompile it? If so, what is it and where can it be found?
             
            Hi,

            I missed a letter from the end. Try this one:

            http://www.pcgen-test.org/autobuilds/pcgen-docs/listfilepages/globalfilestagpages/globalfilesformulas.html

            Search for roll or random and you'll spot it. The docs should show you how to use the function. You would use the roll function in your weight or cost tags to give a random value each time the item is chosen. Having thought about it I suspect that it won't really do what you are after. You might be better off having an SPROP for your item and then getting the user to change the cost and weight in the customiser.

            I would recommend that further discussion is on the LST File Help list though - it is set up for this sort of discussion.

            Cheers,
            James.
             
            On 26/06/2011 2:21 AM Caleb Ulfers wrote

            When I tried to access the link you sent, I received an error. I think you will have to copy and paste the roll function into a reply email. In any case, once I have this roll function, where should I put it?


            To: pcgen_developers@yahoogroups.com
            From: jdempsey@...
            Date: Sat, 25 Jun 2011 08:18:16 +1000
            Subject: Re: [pcgen_developers] Hit point generator code

             
            Hi Caleb,

            Ah well then you'll need the roll function as described in http://www.pcgen-test.org/autobuilds/pcgen-docs/listfilepages/globalfilestagpages/globalfilesformulas.htm That can be achieved entirely in LST code.

            Cheers,
            James.


            On 25/06/2011 4:51 AM Caleb Ulfers wrote

            My endeavor doesn't have to do with Hit Dice, but rather with items whose prices (and, in some cases, weights as well) could be a range of numbers. Which is why I thought I could use the hit point generator code to make a (random) price and weight generator. 


            To: pcgen_developers@yahoogroups.com
            From: jdempsey@...
            Date: Fri, 24 Jun 2011 14:26:48 +1000
            Subject: Re: [pcgen_developers] Hit point generator code

             
            Hi Caleb,

            Ah this is in the java code. You'd need to be able to recompile that to play extensively with the hit points formula.

            Instead you may be able to achieve the result you want by playing with the hit die size and bonusing the hitpoints based on your criteria instead. I know Andrew Maitland has done some playing with this for his Eclipse set.

            Cheers,
            James Dempsey
            PCGen Code SB



            On 24 June 2011 13:27, Caleb Ulfers <culfers@...> wrote:


            No, I am not intending to commit this; I'm working on a closed-content set for private use. In any case, I can't find .pcgen.core; I can only find .pcgen; there's no .core under that.

            Date: Fri, 24 Jun 2011 08:22:41 +1000

            Subject: Re: [pcgen_developers] Hit point generator code

             
            Hi Caleb,

            Most of the hit point work happens in pcgen.core.Globals.getGameModeHPFormula() however if you need access to character details you may need to look at its caller, pcgen.core.PCClass.rollHP()

            Were you intending to commit this change? If so, once you have worked out what you want to do could you post a proposal here please? Being quite a core part of the system it would be good to discuss any changes in advance.

            Cheers,
            James.

            On 24/06/2011 4:17 AM Caleb Ulfers wrote

            Character hit points. 


            To: pcgen_developers@yahoogroups.com
            From: jdempsey@...
            Date: Thu, 23 Jun 2011 13:47:01 +1000
            Subject: Re: [pcgen_developers] Hit point generator code

             
            Hi Caleb,

            On 23 June 2011 13:34, CalebU <culfers@...>wrote:
            > I wanted to know what the code for the hit point generator is; I want to try to adapt it to code items which have variable prices and weights.
            >

            Welcome to the dev list!

            Were you interested in character or equipment hit points?

            Cheers,
            James Dempsey
            PCGen Code SB



          • Martijn Verburg
            Do you mean Javacc? - K
            Message 5 of 18 , Jan 22, 2012
            • 0 Attachment
              Do you mean Javacc? - K

              On 15 January 2012 22:06, Caleb Ulfers <culfers@...> wrote:
               

              Could I use the program that was used to write the Java code for the hit point generator to recompile it? If so, what is it and where can it be found?
               
              Hi,

              I missed a letter from the end. Try this one:

              http://www.pcgen-test.org/autobuilds/pcgen-docs/listfilepages/globalfilestagpages/globalfilesformulas.html

              Search for roll or random and you'll spot it. The docs should show you how to use the function. You would use the roll function in your weight or cost tags to give a random value each time the item is chosen. Having thought about it I suspect that it won't really do what you are after. You might be better off having an SPROP for your item and then getting the user to change the cost and weight in the customiser.

              I would recommend that further discussion is on the LST File Help list though - it is set up for this sort of discussion.

              Cheers,
              James.
               
              On 26/06/2011 2:21 AM Caleb Ulfers wrote

              When I tried to access the link you sent, I received an error. I think you will have to copy and paste the roll function into a reply email. In any case, once I have this roll function, where should I put it?


              To: pcgen_developers@yahoogroups.com
              From: jdempsey@...
              Date: Sat, 25 Jun 2011 08:18:16 +1000
              Subject: Re: [pcgen_developers] Hit point generator code

               
              Hi Caleb,

              Ah well then you'll need the roll function as described in http://www.pcgen-test.org/autobuilds/pcgen-docs/listfilepages/globalfilestagpages/globalfilesformulas.htm That can be achieved entirely in LST code.

              Cheers,
              James.


              On 25/06/2011 4:51 AM Caleb Ulfers wrote

              My endeavor doesn't have to do with Hit Dice, but rather with items whose prices (and, in some cases, weights as well) could be a range of numbers. Which is why I thought I could use the hit point generator code to make a (random) price and weight generator. 


              To: pcgen_developers@yahoogroups.com
              From: jdempsey@...
              Date: Fri, 24 Jun 2011 14:26:48 +1000
              Subject: Re: [pcgen_developers] Hit point generator code

               
              Hi Caleb,

              Ah this is in the java code. You'd need to be able to recompile that to play extensively with the hit points formula.

              Instead you may be able to achieve the result you want by playing with the hit die size and bonusing the hitpoints based on your criteria instead. I know Andrew Maitland has done some playing with this for his Eclipse set.

              Cheers,
              James Dempsey
              PCGen Code SB



              On 24 June 2011 13:27, Caleb Ulfers <culfers@...> wrote:


              No, I am not intending to commit this; I'm working on a closed-content set for private use. In any case, I can't find .pcgen.core; I can only find .pcgen; there's no .core under that.

              Date: Fri, 24 Jun 2011 08:22:41 +1000

              Subject: Re: [pcgen_developers] Hit point generator code

               
              Hi Caleb,

              Most of the hit point work happens in pcgen.core.Globals.getGameModeHPFormula() however if you need access to character details you may need to look at its caller, pcgen.core.PCClass.rollHP()

              Were you intending to commit this change? If so, once you have worked out what you want to do could you post a proposal here please? Being quite a core part of the system it would be good to discuss any changes in advance.

              Cheers,
              James.

              On 24/06/2011 4:17 AM Caleb Ulfers wrote

              Character hit points. 


              To: pcgen_developers@yahoogroups.com
              From: jdempsey@...
              Date: Thu, 23 Jun 2011 13:47:01 +1000
              Subject: Re: [pcgen_developers] Hit point generator code

               
              Hi Caleb,

              On 23 June 2011 13:34, CalebU <culfers@...>wrote:
              > I wanted to know what the code for the hit point generator is; I want to try to adapt it to code items which have variable prices and weights.
              >

              Welcome to the dev list!

              Were you interested in character or equipment hit points?

              Cheers,
              James Dempsey
              PCGen Code SB




            • Caleb Ulfers
              If that was the program used to make the code for the hit point generator, then yes. After a while I downloaded a decompiler called DJ Java Decompiler.but I
              Message 6 of 18 , Jan 22, 2012
              • 0 Attachment
                If that was the program used to make the code for the hit point generator, then yes. After a while I downloaded a decompiler called DJ Java Decompiler.but I still can't find the file pcgen.core.Globals.getGameModeHPFormula()

                 
                Do you mean Javacc? - K


                On 15 January 2012 22:06, Caleb Ulfers <culfers@...> wrote:
                 

                Could I use the program that was used to write the Java code for the hit point generator to recompile it? If so, what is it and where can it be found?
                 
                Hi,

                I missed a letter from the end. Try this one:

                http://www.pcgen-test.org/autobuilds/pcgen-docs/listfilepages/globalfilestagpages/globalfilesformulas.html

                Search for roll or random and you'll spot it. The docs should show you how to use the function. You would use the roll function in your weight or cost tags to give a random value each time the item is chosen. Having thought about it I suspect that it won't really do what you are after. You might be better off having an SPROP for your item and then getting the user to change the cost and weight in the customiser.

                I would recommend that further discussion is on the LST File Help list though - it is set up for this sort of discussion.

                Cheers,
                James.
                 
                On 26/06/2011 2:21 AM Caleb Ulfers wrote

                When I tried to access the link you sent, I received an error. I think you will have to copy and paste the roll function into a reply email. In any case, once I have this roll function, where should I put it?


                To: pcgen_developers@yahoogroups.com
                From: jdempsey@...
                Date: Sat, 25 Jun 2011 08:18:16 +1000
                Subject: Re: [pcgen_developers] Hit point generator code

                 
                Hi Caleb,

                Ah well then you'll need the roll function as described in http://www.pcgen-test.org/autobuilds/pcgen-docs/listfilepages/globalfilestagpages/globalfilesformulas.htm That can be achieved entirely in LST code.

                Cheers,
                James.


                On 25/06/2011 4:51 AM Caleb Ulfers wrote

                My endeavor doesn't have to do with Hit Dice, but rather with items whose prices (and, in some cases, weights as well) could be a range of numbers. Which is why I thought I could use the hit point generator code to make a (random) price and weight generator. 


                To: pcgen_developers@yahoogroups.com
                From: jdempsey@...
                Date: Fri, 24 Jun 2011 14:26:48 +1000
                Subject: Re: [pcgen_developers] Hit point generator code

                 
                Hi Caleb,

                Ah this is in the java code. You'd need to be able to recompile that to play extensively with the hit points formula.

                Instead you may be able to achieve the result you want by playing with the hit die size and bonusing the hitpoints based on your criteria instead. I know Andrew Maitland has done some playing with this for his Eclipse set.

                Cheers,
                James Dempsey
                PCGen Code SB



                On 24 June 2011 13:27, Caleb Ulfers <culfers@...> wrote:


                No, I am not intending to commit this; I'm working on a closed-content set for private use. In any case, I can't find .pcgen.core; I can only find .pcgen; there's no .core under that.

                Date: Fri, 24 Jun 2011 08:22:41 +1000

                Subject: Re: [pcgen_developers] Hit point generator code

                 
                Hi Caleb,

                Most of the hit point work happens in pcgen.core.Globals.getGameModeHPFormula() however if you need access to character details you may need to look at its caller, pcgen.core.PCClass.rollHP()

                Were you intending to commit this change? If so, once you have worked out what you want to do could you post a proposal here please? Being quite a core part of the system it would be good to discuss any changes in advance.

                Cheers,
                James.

                On 24/06/2011 4:17 AM Caleb Ulfers wrote

                Character hit points. 


                To: pcgen_developers@yahoogroups.com
                From: jdempsey@...
                Date: Thu, 23 Jun 2011 13:47:01 +1000
                Subject: Re: [pcgen_developers] Hit point generator code

                 
                Hi Caleb,

                On 23 June 2011 13:34, CalebU <culfers@...>wrote:
                > I wanted to know what the code for the hit point generator is; I want to try to adapt it to code items which have variable prices and weights.
                >

                Welcome to the dev list!

                Were you interested in character or equipment hit points?

                Cheers,
                James Dempsey
                PCGen Code SB






              • James Dempsey
                Hi Caleb, No need to go to those sort of lengths for an open source project! The source code you are after is at
                Message 7 of 18 , Jan 22, 2012
                • 0 Attachment
                  Hi Caleb,

                  No need to go to those sort of lengths for an open source project!

                  The source code you are after is at https://pcgen.svn.sourceforge.net/svnroot/pcgen/Trunk/pcgen/code/src/java/pcgen/core/Globals.java however that will just return the optional value provided in the gamemode. I'm pretty sure that value isn't used in any of our distributed sets though.

                  If you want to track down how this is handled, I'd recommend you check out the source from https://pcgen.svn.sourceforge.net/svnroot/pcgen/Trunk/pcgen/ and load it up into an IDE like Eclipse. See http://wiki.pcgen.org/Basic_Developer_Setup#Setting_up_with_Eclipse for instructions.

                  Cheers,
                  James Dempsey
                  PCGen Code SB


                  On 23 January 2012 13:06, Caleb Ulfers <culfers@...> wrote:


                  If that was the program used to make the code for the hit point generator, then yes. After a while I downloaded a decompiler called DJ Java Decompiler.but I still can't find the file pcgen.core.Globals.getGameModeHPFormula()

                   
                  Do you mean Javacc? - K


                  On 15 January 2012 22:06, Caleb Ulfers <culfers@...> wrote:
                   

                  Could I use the program that was used to write the Java code for the hit point generator to recompile it? If so, what is it and where can it be found?
                   
                  Hi,

                  I missed a letter from the end. Try this one:

                  http://www.pcgen-test.org/autobuilds/pcgen-docs/listfilepages/globalfilestagpages/globalfilesformulas.html

                  Search for roll or random and you'll spot it. The docs should show you how to use the function. You would use the roll function in your weight or cost tags to give a random value each time the item is chosen. Having thought about it I suspect that it won't really do what you are after. You might be better off having an SPROP for your item and then getting the user to change the cost and weight in the customiser.

                  I would recommend that further discussion is on the LST File Help list though - it is set up for this sort of discussion.

                  Cheers,
                  James.
                   
                  On 26/06/2011 2:21 AM Caleb Ulfers wrote

                  When I tried to access the link you sent, I received an error. I think you will have to copy and paste the roll function into a reply email. In any case, once I have this roll function, where should I put it?


                  To: pcgen_developers@yahoogroups.com
                  From: jdempsey@...
                  Date: Sat, 25 Jun 2011 08:18:16 +1000
                  Subject: Re: [pcgen_developers] Hit point generator code

                   
                  Hi Caleb,

                  Ah well then you'll need the roll function as described in http://www.pcgen-test.org/autobuilds/pcgen-docs/listfilepages/globalfilestagpages/globalfilesformulas.htm That can be achieved entirely in LST code.

                  Cheers,
                  James.


                  On 25/06/2011 4:51 AM Caleb Ulfers wrote

                  My endeavor doesn't have to do with Hit Dice, but rather with items whose prices (and, in some cases, weights as well) could be a range of numbers. Which is why I thought I could use the hit point generator code to make a (random) price and weight generator. 


                  To: pcgen_developers@yahoogroups.com
                  From: jdempsey@...
                  Date: Fri, 24 Jun 2011 14:26:48 +1000
                  Subject: Re: [pcgen_developers] Hit point generator code

                   
                  Hi Caleb,

                  Ah this is in the java code. You'd need to be able to recompile that to play extensively with the hit points formula.

                  Instead you may be able to achieve the result you want by playing with the hit die size and bonusing the hitpoints based on your criteria instead. I know Andrew Maitland has done some playing with this for his Eclipse set.

                  Cheers,
                  James Dempsey
                  PCGen Code SB



                  On 24 June 2011 13:27, Caleb Ulfers <culfers@...> wrote:


                  No, I am not intending to commit this; I'm working on a closed-content set for private use. In any case, I can't find .pcgen.core; I can only find .pcgen; there's no .core under that.

                  Date: Fri, 24 Jun 2011 08:22:41 +1000

                  Subject: Re: [pcgen_developers] Hit point generator code

                   
                  Hi Caleb,

                  Most of the hit point work happens in pcgen.core.Globals.getGameModeHPFormula() however if you need access to character details you may need to look at its caller, pcgen.core.PCClass.rollHP()

                  Were you intending to commit this change? If so, once you have worked out what you want to do could you post a proposal here please? Being quite a core part of the system it would be good to discuss any changes in advance.

                  Cheers,
                  James.

                  On 24/06/2011 4:17 AM Caleb Ulfers wrote

                  Character hit points. 


                  To: pcgen_developers@yahoogroups.com
                  From: jdempsey@...
                  Date: Thu, 23 Jun 2011 13:47:01 +1000
                  Subject: Re: [pcgen_developers] Hit point generator code

                   
                  Hi Caleb,

                  On 23 June 2011 13:34, CalebU <culfers@...>wrote:
                  > I wanted to know what the code for the hit point generator is; I want to try to adapt it to code items which have variable prices and weights.
                  >

                  Welcome to the dev list!

                  Were you interested in character or equipment hit points?

                  Cheers,
                  James Dempsey
                  PCGen Code SB









                • Caleb Ulfers
                  I have found pcgen.core.Globals.getGameModeHPFormula(), but now I don t know where/how to use it to find the hit point generation code for DnD v3.5. Will
                  Message 8 of 18 , Jan 27, 2012
                  • 0 Attachment
                    I have found pcgen.core.Globals.getGameModeHPFormula(), but now I don't know where/how to use it to find the hit point generation code for DnD v3.5. Will someone please show me? 

                    > To: PCGenListFileHelp@yahoogroups.com 
                    > From: bryan@...
                    > Date: Mon, 23 Jan 2012 06:21:57 -0600
                    > Subject: RE: [PCGenListFileHelp] Hit point generator code&#8207;

                    > Here might be a good place to start.

                    http://sourceforge.net/scm/?type=svn&group_id=25576

                    > Also whichever client you download should have install instructions, etc.
                    > Trust me that going to the source would very likely be easier , both to
                    > read and get to the code, than trying to decompile it.
                    > On Jan 22, 2012 11:20 PM, "Caleb Ulfers" <culfers@...> wrote:

                    > > **
                    > >
                    > >
                    > >
                    > > I'd do that, but I'm not sure how to.
                    > >
                    > > > To: PCGenListFileHelp@yahoogroups.com
                    > > > From: bryan@...
                    > > > Date: Sun, 22 Jan 2012 21:09:14 -0600
                    > > > Subject: Re: [PCGenListFileHelp] Hit point generator code&#8207;
                    > > >
                    > > > Not sure why you would want to. If you really need the code for that part
                    > > > can't you just go look at the code in the svn repository?
                    > > > On Jan 22, 2012 7:47 PM, "CalebU" <culfers@...> wrote:
                    > > >
                    > > > > **
                    > > > >
                    > > > >
                    > > > > I e-mailed the dev list about whether the compiler that was used to
                    > > > > compile the code for the hit point generator could be used to
                    > > decompile it,
                    > > > > but it's been a week, and I haven't received an answer, so I thought I
                    > > > > would ask the question here, even though I think it is more
                    > > appropriately
                    > > > > asked on the dev list, seeing what it has to do with.
                    > > > >
                    > > > >
                    > > > >
                    > > >
                    > > >
                    > > > [Non-text portions of this message have been removed]
                    > > >
                    > > >
                    > > >
                    > > > ------------------------------------
                    > > >
                    > > > Yahoo! Groups Links
                    > > >
                    > > >
                    > > >
                    > >
                    > >
                    > > [Non-text portions of this message have been removed]
                    > >
                    > > 
                    > >


                    > [Non-text portions of this message have been removed]



                    > ------------------------------------

                    > Yahoo! Groups Links





                  • javydreamer
                    PCGen is a great tool but it was never designed to be used as a library. That s the same problem I had. You won t find a nice API and much less something
                    Message 9 of 18 , Jan 27, 2012
                    • 0 Attachment
                      PCGen is a great tool but it was never designed to be used as a library. That's the same problem I had. You won't find a nice API and much less something specific to D&D. The only part I was able to figure out so far is the use of the dice.But again that's not rocket science.

                      I'm trying to use PCGen as a library but I was told that they are about to merge changes towards making this possible.

                      This is part of the code you can find here later (when I'm done pushing): https://bitbucket.org/javydreamercsw/simple-marauroa-java/src

                      public int roll(String diceExp) {
                      //Make sure there's an space between operators
                      diceExp = diceExp.replaceAll("\\+", " + ").replaceAll("-", " - ");
                      logger.log(level, "Expression: {0}", diceExp);
                      int result = 0;
                      String[] tokens = diceExp.split("\\s");
                      String operator = null;
                      for (String token : tokens) {
                      String nextToken = token.trim().toLowerCase();
                      if (nextToken.contains("d")) {
                      //Is a dice expresion (i.e. 3d12)
                      result += new DieEx(nextToken).roll();
                      } else if (nextToken.equals("+") || nextToken.equals("-")) {
                      operator = nextToken;
                      } else {
                      //It should be an integer
                      float toAdd = Float.valueOf(nextToken);
                      if (operator.equals("+")) {
                      logger.log(level, "Adding {0} to the result...", toAdd);
                      result += toAdd;
                      } else if (operator.equals("-")) {
                      logger.log(level, "Substracting {0} to the result...", toAdd);
                      result -= toAdd;
                      }
                      }
                      }
                      logger.log(level, "Final Result: {0}", result);
                      return result;
                      }

                      You can pass something like this:

                      roll("1d12+1");

                      Hope that helps.

                      DieEx is from PCGen.
                    Your message has been successfully submitted and would be delivered to recipients shortly.