Lone Wolf Development Forums  

Go Back   Lone Wolf Development Forums > Hero Lab Forums > HL - d20 System

Notices

Reply
 
Thread Tools Display Modes
Nightfox
Senior Member
 
Join Date: Dec 2011
Posts: 100

Old November 23rd, 2016, 09:16 AM
Quote:
Originally Posted by ErinRigh View Post
Should be able to, but I am just little in the realm of coding, so how about a bit of a walkthrough?
You are right were I was a couple years ago, and asking all the same types of questions. In a few months you'll be the one helping others.

Quote:
Originally Posted by ErinRigh View Post
I'd like to create a condition that I can simply click on and set the character as Epic, any thoughts?
If you are willing to deal with it manually a condition could work. Go to the editor and add an adjustment. Name it something easy like "Epic", check the box labeled "Is Condition?".

In the eval script you want something like:
Code:
      ~ If we're not enabled, get out now
      doneif (field[pIsOn].value = 0)

      ~ Give our hero the Epic tag
      perform hero.assign[Hero.Epic]
If you want it to automatically add the code when the hero has reached level 21 or above you would need to add an If() statement and find some place to hide it. Conditions are good places to hide these types of things because they are loaded on all characters.

Quote:
Originally Posted by Illyahr View Post
BAB stops increasing once you hit 20 HD. After that, you get a +1 Epic bonus every odd level. You also no longer get class bonuses to saves and instead get a +1 Epic bonus to saves every even level. Other than that, class abilities are gained as listed by the class.
I think you would need to break it down into individual tasks. For the BAB and saves you would need to be able to figure out what they would be at level 20 and reset then to that value. Then calculate how many levels you have above 20 and divide by 2, round up for attack bonus, round down for saves. The saves bonus could simply be added to the individual saves as normal, but for the attack bonus you would want to add it as a bonus to your hero.child[Attack] or to the [tAtk].value so it doesn't effect the number of attacks the character has from BAB. The really hard part will be figuring out what the character had at 20th.

As for progressing classes beyond 20th, I think that would have to be done as separate classes. For example a single class 30th level fighter would actually have 2 classes, Fighter 20 and Epic Fighter 10. I haven't dug deep into HL in a while, but if I remember correctly it limits the number a classes a hero can have so this may be a problem.
Nightfox is offline   #11 Reply With Quote
Sendric
Senior Member
 
Join Date: Jul 2010
Posts: 3,144

Old November 24th, 2016, 06:05 AM
Quote:
Originally Posted by Nightfox View Post
As for progressing classes beyond 20th, I think that would have to be done as separate classes. For example a single class 30th level fighter would actually have 2 classes, Fighter 20 and Epic Fighter 10. I haven't dug deep into HL in a while, but if I remember correctly it limits the number a classes a hero can have so this may be a problem.
Good point. I hadn't thought of doing it with "Epic" classes but that's a really good idea. I'll add a script to add the tag automatically as well.
Sendric is offline   #12 Reply With Quote
Nightfox
Senior Member
 
Join Date: Dec 2011
Posts: 100

Old November 28th, 2016, 03:49 PM
Erin, Illyahr, Sendric, AND ANYONE ELSE INTERESTED

I've started working on a rough bit of script and I wanted to check something with you and the community. From what I can find of the Epic rules there is a little bit of ambiguity. Everything is fine if you are playing one of the base races with standard classes for 1-20th, but it gets a little foggy when it comes to non-standard races and templates that may add hit dice or level adjustments. Therefore I wanted to ask what people think:
When should the epic progress start?
a) ECL > 20
b) HD > 20
c) Class(tag) > 20 (includes racial HD+LA and class, but not templates)
d) something else
Nightfox is offline   #13 Reply With Quote
Nightfox
Senior Member
 
Join Date: Dec 2011
Posts: 100

Old November 28th, 2016, 07:33 PM
ok, I thought I'd put this little bit of code (for certain definitions of little) up for those more skilled with coding to look at and see if they could find a better way of doing everything so that it would not be quite as intensive.

Note that this is rather ugly so those of you who are code-aphobic, you may want to look away.

As it stands, I'm thinking I may need to create separate specials to run the code for the sake of space and timing, but that could end up drastically increasing the number of foreach statements and therefore processing requirements.

Code:
      ~ If we're not enabled, get out now
      doneif (field[pIsOn].value = 0)

      ~ If we're not epic, lets stop this now
      doneif (herofield[tTotLevel].value < 21)

      ~ for the easy part, lets add the epic tag to our hero
      perform hero.assign[Hero.Epic]

      ~ now the hard part, identifying our bonuses before epic.
      ~ first we are going to set up a bunch of veriables we can reference later
      var LevCnt as number
      var totHD as number

      var bBAB as number
      var bFort as number
      var bRef as number
      var bWill as number

      var Class0 as number
      var c0BAB as number
      var c0Fort as number
      var c0Ref as number
      var c0Will as number

      var Class1 as number
      var c1BAB as number
      var c1Fort as number
      var c1Ref as number
      var c1Will as number

      var Class2 as number
      var c2BAB as number
      var c2Fort as number
      var c2Ref as number
      var c2Will as number

      var Class3 as number
      var c3BAB as number
      var c3Fort as number
      var c3Ref as number
      var c3Will as number

      var Class4 as number
      var c4BAB as number
      var c4Fort as number
      var c4Ref as number
      var c4Will as number

      var Class5 as number
      var c5BAB as number
      var c5Fort as number
      var c5Ref as number
      var c5Will as number

      ~ at this time HL still limits us to 5 classes + 1 Race so I will stop here

      var epcLev as number
      var epcAtk as number
      var epcSave as number

      ~ now we will start looking at our classes/races/templates and try to retrieve information
      foreach pick on hero where (field[cIndex].value < 20)
      ~ don't do anything if we have already reached a epic
          if (LevCnt < 20) then
      ~ We need to identify what is at each index so we can get the information we need
              if (tagcount[Component.BaseRace] <> 0) then
      ~ If it is a race at this index then we can pull the specific values from the race
                  bBAB += eachpick.field[rAttack].value
                  bFort += eachpick.field[rFort].value
                  bRef += eachpick.field[rRef].value
                  bWill += eachpick.field[rWill].value
      ~ For now I am using the totHD and LevCnt to help me keep track of our progress and so we can stop the foreach if we reach epic early.
                  totHD += eachpick.field[rHitDice].value
                  LevCnt += eachpick.field[cLevelAdj].value
                  endif

      ~ if it is not a race we need to know if it is a class or a template
              elseif (tagcount[Component.BaseClass] <> 0) then
      ~ HL calculates the BAB and saves based on number of total levels in a given class. So we will have to figure out how many levels our hero has of each class before going epic so we can calculate it later.
      ~ from what I can find, HL only supports up to 5 classes + 1 racial for a total of 6 class tags in total
                  if (eachpick.field[cHelpIndex].value = 0) then
                      Class0 += 1
                      elseif (eachpick.field[cHelpIndex].value = 1) then
                          Class1 += 1
                      elseif (eachpick.field[cHelpIndex].value = 2) then
                          Class2 += 1
                      elseif (eachpick.field[cHelpIndex].value = 3) then
                          Class3 += 1
                      elseif (eachpick.field[cHelpIndex].value = 4) then
                          Class4 += 1
                      elseif (eachpick.field[cHelpIndex].value = 5) then
                          Class5 += 1
                      endif
      ~ again, we want to add to our totals here so we will know when to stop the foreach
                  totHD += 1
                  LevCnt += 1

      ~ The other major option is templates. Many add level adjustments, and some add to our HD or base saves
              elseif (tagcount[Component.BaseTemp] <> 0) then
      ~ much like races, the relevant bonuses can be pulled straight from fields on the pick.
                  bBAB += eachpick.field[tmAttack].value
                  bFort += eachpick.field[tmFort].value
                  bRef += eachpick.field[tmRef].value
                  bWill += eachpick.field[tmWill].value
      ~ For now I am using the totHD and LevCnt to help me keep track of our progress and so we can stop the foreach if we reach epic early.
                  totHD += eachpick.field[tmHitDice].value
                  LevCnt += eachpick.field[cLevelAdj].value
                  endif
              endif
          endif
          nexteach

      ~ now to start our class calculations
      ~ we will start with the FIRST class space
      if (Class0 > 0) then
          foreach pick on hero where (field[cClsIndex].value = 0)
      ~ calculate our BAB bonus from this class
      ~ if we have good bab in the class then calculate our bonus as equal our level in class
              if (eachpick.tagcount[cAttack.Good] <> 0) then
                  c0BAB = Class0
      ~ if we do not have good BAB, check if we have medium and calculate our bonus as 3/4 class
                  elseif (eachpick.tagcount[cAttack.Medium] <> 0) then
                      c0BAB = round((Class0 * 3)/4,0,-1)
      ~ if we do not have good or medium BAB, check if we have Poor bab and calculate our bonus as 1/2 class
                  elseif (eachpick.tagcount[cAttack.Poor] <> 0) then
                      c0BAB = round(Class0 /2,0,-1)
      ~ if we do not have good, medium, or poor BAB tags we may be a race or template and have already gathered the BAB above
                  else c0BAB = 0
                  endif

      ~ next we will start on the Fort save
      ~ if we have a good save, calculate our bonus
              if (eachpick.tagcount[cFort.Good] <> 0 then
                  c0Fort = 2 + round(Class0/2,0,-1)
      ~ if we do not have a good tag then check if we have a poor Fort
                  elseif (eachpick.tagcount[cFort.Poor] <> 0) then
                      c0Fort = round(Class0/3,0,-1)
      ~ if we do not have a good or poor Fort tag we may be a race or template and have already gathered the bonus above
                  else c0Fort = 0
                  endif

      ~ next we will start on the Reflex save
      ~ if we have a good save, calculate our bonus
              if (eachpick.tagcount[cRef.Good] <> 0 then
                  c0Ref = 2 + round(Class0/2,0,-1)
      ~ if we do not have a good tag then check if we have a poor Reflex
                  elseif (eachpick.tagcount[cRef.Poor] <> 0) then
                      c0Ref = round(Class0/3,0,-1)
      ~ if we do not have a good or poor Reflex tag we may be a race or template and have already gathered the bonus above
                  else c0Ref = 0
                  endif

      ~ next we will start on the Will save
      ~ if we have a good save, calculate our bonus
              if (eachpick.tagcount[cWill.Good] <> 0 then
                  c0Will = 2 + round(Class0/2,0,-1)
      ~ if we do not have a good tag then check if we have a poor Will
                  elseif (eachpick.tagcount[cWill.Poor] <> 0) then
                      c0Will = round(Class0/3,0,-1)
      ~ if we do not have a good or poor Will tag we may be a race or template and have already gathered the bonus above
                  else c0Will = 0
                  endif
              nexteach
          endif

      ~ now we move on to the next index
      ~ start looking at our SECOND class space
      if (Class1 > 0) then
          foreach pick on hero where (field[cClsIndex].value = 1)
      ~ calculate our BAB bonus from this class
      ~ if we have good bab in the class then calculate our bonus as equal our level in class
              if (eachpick.tagcount[cAttack.Good] <> 0) then
                  c1BAB = Class1
      ~ if we do not have good BAB, check if we have medium and calculate our bonus as 3/4 class
                  elseif (eachpick.tagcount[cAttack.Medium] <> 0) then
                      c1BAB = round((Class1 * 3)/4,0,-1)
      ~ if we do not have good or medium BAB, check if we have Poor bab and calculate our bonus as 1/2 class
                  elseif (eachpick.tagcount[cAttack.Poor] <> 0) then
                      c1BAB = round(Class1 /2,0,-1)
      ~ if we do not have good, medium, or poor BAB tags we may be a race or template and have already gathered the BAB above
                  else c1BAB = 0
                  endif

      ~ next we will start on the Fort save
      ~ if we have a good save, calculate our bonus
              if (eachpick.tagcount[cFort.Good] <> 0 then
                  c1Fort = 2 + round(Class1/2,0,-1)
      ~ if we do not have a good tag then check if we have a poor Fort
                  elseif (eachpick.tagcount[cFort.Poor] <> 0) then
                      c1Fort = round(Class1/3,0,-1)
      ~ if we do not have a good or poor Fort tag we may be a race or template and have already gathered the bonus above
                  else c1Fort = 0
                  endif

      ~ next we will start on the Reflex save
      ~ if we have a good save, calculate our bonus
              if (eachpick.tagcount[cRef.Good] <> 0 then
                  c1Ref = 2 + round(Class1/2,0,-1)
      ~ if we do not have a good tag then check if we have a poor Reflex
                  elseif (eachpick.tagcount[cRef.Poor] <> 0) then
                      c1Ref = round(Class1/3,0,-1)
      ~ if we do not have a good or poor Reflex tag we may be a race or template and have already gathered the bonus above
                  else c1Ref = 0
                  endif

      ~ next we will start on the Will save
      ~ if we have a good save, calculate our bonus
              if (eachpick.tagcount[cWill.Good] <> 0 then
                  c1Will = 2 + round(Class1/2,0,-1)
      ~ if we do not have a good tag then check if we have a poor Will
                  elseif (eachpick.tagcount[cWill.Poor] <> 0) then
                      c1Will = round(Class1/3,0,-1)
      ~ if we do not have a good or poor Will tag we may be a race or template and have already gathered the bonus above
                  else c1Will = 0
                  endif
              nexteach
          endif



      ~ now we move on to our THIRD class space
      if (Class2 > 0) then
          foreach pick on hero where (field[cClsIndex].value = 2)
      ~ calculate our BAB bonus from this class
      ~ if we have good bab in the class then calculate our bonus as equal our level in class
              if (eachpick.tagcount[cAttack.Good] <> 0) then
                  c2BAB = Class2
      ~ if we do not have good BAB, check if we have medium and calculate our bonus as 3/4 class
                  elseif (eachpick.tagcount[cAttack.Medium] <> 0) then
                      c2BAB = round((Class2 * 3)/4,0,-1)
      ~ if we do not have good or medium BAB, check if we have Poor bab and calculate our bonus as 1/2 class
                  elseif (eachpick.tagcount[cAttack.Poor] <> 0) then
                      c2BAB = round(Class2 /2,0,-1)
      ~ if we do not have good, medium, or poor BAB tags we may be a race or template and have already gathered the BAB above
                  else c2BAB = 0
                  endif

      ~ next we will start on the Fort save
      ~ if we have a good save, calculate our bonus
              if (eachpick.tagcount[cFort.Good] <> 0 then
                  c2Fort = 2 + round(Class2/2,0,-1)
      ~ if we do not have a good tag then check if we have a poor Fort
                  elseif (eachpick.tagcount[cFort.Poor] <> 0) then
                      c2Fort = round(Class2/3,0,-1)
      ~ if we do not have a good or poor Fort tag we may be a race or template and have already gathered the bonus above
                  else c2Fort = 0
                  endif

      ~ next we will start on the Reflex save
      ~ if we have a good save, calculate our bonus
              if (eachpick.tagcount[cRef.Good] <> 0 then
                  c2Ref = 2 + round(Class2/2,0,-1)
      ~ if we do not have a good tag then check if we have a poor Reflex
                  elseif (eachpick.tagcount[cRef.Poor] <> 0) then
                      c2Ref = round(Class2/3,0,-1)
      ~ if we do not have a good or poor Reflex tag we may be a race or template and have already gathered the bonus above
                  else c2Ref = 0
                  endif

      ~ next we will start on the Will save
      ~ if we have a good save, calculate our bonus
              if (eachpick.tagcount[cWill.Good] <> 0 then
                  c2Will = 2 + round(Class2/2,0,-1)
      ~ if we do not have a good tag then check if we have a poor Will
                  elseif (eachpick.tagcount[cWill.Poor] <> 0) then
                      c2Will = round(Class2/3,0,-1)
      ~ if we do not have a good or poor Will tag we may be a race or template and have already gathered the bonus above
                  else c2Will = 0
                  endif
              nexteach
          endif


      ~ now we move on to our FOURTH class space
      if (Class3 > 0) then
          foreach pick on hero where (field[cClsIndex].value = 3)
      ~ calculate our BAB bonus from this class
      ~ if we have good bab in the class then calculate our bonus as equal our level in class
              if (eachpick.tagcount[cAttack.Good] <> 0) then
                  c3BAB = Class3
      ~ if we do not have good BAB, check if we have medium and calculate our bonus as 3/4 class
                  elseif (eachpick.tagcount[cAttack.Medium] <> 0) then
                      c3BAB = round((Class3 * 3)/4,0,-1)
      ~ if we do not have good or medium BAB, check if we have Poor bab and calculat our bonus as 1/2 class
                  elseif (eachpick.tagcount[cAttack.Poor] <> 0) then
                      c3BAB = round(Class3 /2,0,-1)
      ~ if we do not have good, medium, or poor BAB tags we may be a race or template and have already gathered the BAB above
                  else c3BAB = 0
                  endif

      ~ next we will start on the Fort save
      ~ if we have a good save, calculate our bonus
              if (eachpick.tagcount[cFort.Good] <> 0 then
                  c3Fort = 2 + round(Class3/2,0,-1)
      ~ if we do not have a good tag then check if we have a poor Fort
                  elseif (eachpick.tagcount[cFort.Poor] <> 0) then
                      c3Fort = round(Class3/3,0,-1)
      ~ if we do not have a good or poor Fort tag we may be a race or template and have already gathered the bonus above
                  else c3Fort = 0
                  endif

      ~ next we will start on the Reflex save
      ~ if we have a good save, calculate our bonus
              if (eachpick.tagcount[cRef.Good] <> 0 then
                  c3Ref = 2 + round(Class3/2,0,-1)
      ~ if we do not have a good tag then check if we have a poor Reflex
                  elseif (eachpick.tagcount[cRef.Poor] <> 0) then
                      c3Ref = round(Class3/3,0,-1)
      ~ if we do not have a good or poor Reflex tag we may be a race or template and have already gathered the bonus above
                  else c3Ref = 0
                  endif

      ~ next we will start on the Will save
      ~ if we have a good save, calculate our bonus
              if (eachpick.tagcount[cWill.Good] <> 0 then
                  c3Will = 2 + round(Class3/2,0,-1)
      ~ if we do not have a good tag then check if we have a poor Will
                  elseif (eachpick.tagcount[cWill.Poor] <> 0) then
                      c3Will = round(Class3/3,0,-1)
      ~ if we do not have a good or poor Will tag we may be a race or template and have already gathered the bonus above
                  else c3Will = 0
                  endif
              nexteach
          endif


      ~ now we move on to our FIFTH class space
      if (Class4 > 0) then
          foreach pick on hero where (field[cClsIndex].value = 4)
      ~ calculate our BAB bonus from this class
      ~ if we have good bab in the class then calculate our bonus as equal our level in class
              if (eachpick.tagcount[cAttack.Good] <> 0) then
                  c4BAB = Class4
      ~ if we do not have good BAB, check if we have medium and calculate our bonus as 3/4 class
                  elseif (eachpick.tagcount[cAttack.Medium] <> 0) then
                      c4BAB = round((Class4 * 3)/4,0,-1)
      ~ if we do not have good or medium BAB, check if we have Poor bab and calculate our bonus as 1/2 class
                  elseif (eachpick.tagcount[cAttack.Poor] <> 0) then
                      c4BAB = round(Class4 /2,0,-1)
      ~ if we do not have good, medium, or poor BAB tags we may be a race or template and have already gathered the BAB above
                  else c4BAB = 0
                  endif

      ~ next we will start on the Fort save
      ~ if we have a good save, calculate our bonus
              if (eachpick.tagcount[cFort.Good] <> 0 then
                  c4Fort = 2 + round(Class4/2,0,-1)
      ~ if we do not have a good tag then check if we have a poor Fort
                  elseif (eachpick.tagcount[cFort.Poor] <> 0) then
                      c4Fort = round(Class4/3,0,-1)
      ~ if we do not have a good or poor Fort tag we may be a race or template and have already gathered the bonus above
                  else c4Fort = 0
                  endif

      ~ next we will start on the Reflex save
      ~ if we have a good save, calculate our bonus
              if (eachpick.tagcount[cRef.Good] <> 0 then
                  c4Ref = 2 + round(Class4/2,0,-1)
      ~ if we do not have a good tag then check if we have a poor Reflex
                  elseif (eachpick.tagcount[cRef.Poor] <> 0) then
                      c4Ref = round(Class4/3,0,-1)
      ~ if we do not have a good or poor Reflex tag we may be a race or template and have already gathered the bonus above
                  else c4Ref = 0
                  endif

      ~ next we will start on the Will save
      ~ if we have a good save, calculate our bonus
              if (eachpick.tagcount[cWill.Good] <> 0 then
                  c4Will = 2 + round(Class4/2,0,-1)
      ~ if we do not have a good tag then check if we have a poor Will
                  elseif (eachpick.tagcount[cWill.Poor] <> 0) then
                      c4Will = round(Class4/3,0,-1)
      ~ if we do not have a good or poor Will tag we may be a race or template and have already gathered the bonus above
                  else c4Will = 0
                  endif
              nexteach
          endif

      ~ now we move on to our SIXTH class space
      if (Class5 > 0) then
          foreach pick on hero where (field[cClsIndex].value = 5)
      ~ calculate our BAB bonus from this class
      ~ if we have good bab in the class then calculate our bonus as equal our level in class
              if (eachpick.tagcount[cAttack.Good] <> 0) then
                  c5BAB = Class5
      ~ if we do not have good BAB, check if we have medium and calculate our bonus as 3/4 class
                  elseif (eachpick.tagcount[cAttack.Medium] <> 0) then
                      c5BAB = round((Class5 * 3)/4,0,-1)
      ~ if we do not have good or medium BAB, check if we have Poor bab and calculate our bonus as 1/2 class
                  elseif (eachpick.tagcount[cAttack.Poor] <> 0) then
                      c5BAB = round(Class5 /2,0,-1)
      ~ if we do not have good, medium, or poor BAB tags we may be a race or template and have already gathered the BAB above
                  else c5BAB = 0
                  endif

      ~ next we will start on the Fort save
      ~ if we have a good save, calculate our bonus
              if (eachpick.tagcount[cFort.Good] <> 0 then
                  c5Fort = 2 + round(Class5/2,0,-1)
      ~ if we do not have a good tag then check if we have a poor Fort
                  elseif (eachpick.tagcount[cFort.Poor] <> 0) then
                      c5Fort = round(Class5/3,0,-1)
      ~ if we do not have a good or poor Fort tag we may be a race or template and have already gathered the bonus above
                  else c5Fort = 0
                  endif

      ~ next we will start on the Reflex save
      ~ if we have a good save, calculate our bonus
              if (eachpick.tagcount[cRef.Good] <> 0 then
                  c5Ref = 2 + round(Class5/2,0,-1)
      ~ if we do not have a good tag then check if we have a poor Reflex
                  elseif (eachpick.tagcount[cRef.Poor] <> 0) then
                      c5Ref = round(Class5/3,0,-1)
      ~ if we do not have a good or poor Reflex tag we may be a race or template and have already gathered the bonus above
                  else c5Ref = 0
                  endif

      ~ next we will start on the Will save
      ~ if we have a good save, calculate our bonus
              if (eachpick.tagcount[cWill.Good] <> 0 then
                  c5Will = 2 + round(Class5/2,0,-1)
      ~ if we do not have a good tag then check if we have a poor Will
                  elseif (eachpick.tagcount[cWill.Poor] <> 0) then
                      c5Will = round(Class5/3,0,-1)
      ~ if we do not have a good or poor Will tag we may be a race or template and have already gathered the bonus above
                  else c5Will = 0
                  endif
              nexteach
          endif

      ~ hopefully, if we have done everything correct so far we can calculate our total pre-epic base attack and saves
      bBAB = bBAB + c0BAB + c1BAB + c2BAB + c3BAB + c4BAB + c5BAB
      bFort = bFort + c0Fort + c1Fort + c2Fort + c3Fort + c4Fort + c5Fort
      bRef = bRef + c0Ref + c1Ref + c2Ref + c3Ref + c4Ref + c5Ref
      bWill = bWill + c0Will + c1Will + c2Will + c3Will + c4Will + c5Will

      ~ now the easy part
      epcLev = herofield[tTotLevel].value - 20
      epcAtk = round(epcLev/2,0,1)
      epcSave = round(epcLev/2,0,-1)

      ~ ok, we have our pre epic bonuses and our post epic bonuses, now to put them in the right places
      hero.child[Attack].field[tAtkBase].value = bBAB
      hero.child[Attack].field[tAtkEpic].value = epcAtk
      hero.child[vFort].field[vBase].value = bFort + epcSave
      hero.child[vRef].field[vBase].value = bRef + epcSave
      hero.child[vWill].field[vBase].value = bWill + epcSave
Nightfox is offline   #14 Reply With Quote
Sendric
Senior Member
 
Join Date: Jul 2010
Posts: 3,144

Old November 29th, 2016, 03:43 AM
Quote:
Originally Posted by Nightfox View Post
Erin, Illyahr, Sendric, AND ANYONE ELSE INTERESTED

I've started working on a rough bit of script and I wanted to check something with you and the community. From what I can find of the Epic rules there is a little bit of ambiguity. Everything is fine if you are playing one of the base races with standard classes for 1-20th, but it gets a little foggy when it comes to non-standard races and templates that may add hit dice or level adjustments. Therefore I wanted to ask what people think:
When should the epic progress start?
a) ECL > 20
b) HD > 20
c) Class(tag) > 20 (includes racial HD+LA and class, but not templates)
d) something else
My understanding is that Epic level is determined by a character's CL, which is effectively equal to their overall HD. I don't think LA is factored in, but I could be wrong.
Sendric is offline   #15 Reply With Quote
Nightfox
Senior Member
 
Join Date: Dec 2011
Posts: 100

Old November 29th, 2016, 08:56 AM
Quote:
Originally Posted by Sendric View Post
My understanding is that Epic level is determined by a character's CL, which is effectively equal to their overall HD. I don't think LA is factored in, but I could be wrong.
That is one of the common progressions I've seen. The other 2 common progressions according to old forum posts across the web are full ECL and Class levels only (no racial HD or LA).

Apparently the HL total level count macro counts racial HD and LA along with class levels, but does not appear to count templates at all. This presents the problem of templates that add HD such as afflicted were<Pick Your Animal>.

It might be easier to create a radio button section in the hero configuration for selecting Epic Progress (Default-none, Class Only, HD Only, Full ECL), and set the code up for each of these with source tags.

Is there a way to pull a pick based on an index value without using foreach, cause that would simplify the code a lot. Actually, I should probably just ask that in a new thread so if there is an a way, we can find it again later.
Nightfox is offline   #16 Reply With Quote
Illyahr
Senior Member
 
Join Date: Feb 2013
Posts: 357

Old November 29th, 2016, 09:56 AM
Quote:
Originally Posted by Sendric View Post
My understanding is that Epic level is determined by a character's CL, which is effectively equal to their overall HD. I don't think LA is factored in, but I could be wrong.
All the rules I've read on Epic specifically call out BAB, Saves, and then skill points/class abilities. These are all a product of leveling except in the case of Racial Hit Dice. Since RHD function like class levels (adding BAB, saves, and skill points) the easiest solution is that Epic counts these. Since level adjustment provides nothing for the calculation of these stats, I don't believe it is counted.

I could be wrong, but I think total Hit Die count (class + racial) should be the only factor.
Illyahr is offline   #17 Reply With Quote
ShadowChemosh
Senior Member
Volunteer Data File Contributor
 
Join Date: Jan 2010
Location: Chicago, IL (USA)
Posts: 10,729

Old November 29th, 2016, 10:39 AM
Quote:
Originally Posted by Nightfox View Post
ok, I thought I'd put this little bit of code (for certain definitions of little) up for those more skilled with coding to look at and see if they could find a better way of doing everything so that it would not be quite as intensive.

Note that this is rather ugly so those of you who are code-aphobic, you may want to look away.

As it stands, I'm thinking I may need to create separate specials to run the code for the sake of space and timing, but that could end up drastically increasing the number of foreach statements and therefore processing requirements.
My confusion in going over this is the way you structured the foreach loops:
Code:
foreach pick on hero where (field[cIndex].value < 20)
If you are going to do a foreach loop then at least limit the context down by component sets. This loop here goes after every PICK on the hero then tries to subset by a field that may or may not even exist on the picks list of fields.

Limit the foreach scope like this:
Code:
foreach pick in hero from BaseClHelp where "TagGroup.Tag"
or 
foreach pick in hero from BaseClHelp
Always better to use a tag then any field for searching. HL is optimized to deal with Tags not so much with fields. By saying "from BaseClHelp" we are limiting HL down to just the Class Helper Picks on the hero which will be ALLOT smaller subset of Picks to deal with then every Pick.

Please note I can't remember if BaseClHelp is correct for d20 as I am not near HL. You can see which "Components" make up a Pick by looking at its tags and the 'component.?' group section.

Hero Lab Resources:
Pathfinder - d20pfsrd and Pathfinder Pack Setup
3.5 D&D (d20) - Community Server Setup
5E D&D - Community Server Setup
Hero Lab Help - Hero Lab FAQ, Editor Tutorials and Videos, Editor & Scripting Resources.
Created by the community for the community
- Realm Works kickstarter backer (Alpha Wolf) and Beta tester.
- d20 HL package volunteer editor.
ShadowChemosh is offline   #18 Reply With Quote
Nightfox
Senior Member
 
Join Date: Dec 2011
Posts: 100

Old November 29th, 2016, 01:04 PM
Quote:
Originally Posted by ShadowChemosh View Post
My confusion in going over this is the way you structured the foreach loops:
The simple answer is that I have tried very hard to avoid foreach loops and so have little experience with them. Most of what I have done in the past with them has been copy/paste with slight slight changes to fit a need. This is why I am welcoming input in the hopes of finding a way to simplify or even get rid of some of those nasty things.

Quote:
Originally Posted by ShadowChemosh View Post
Code:
foreach pick on hero where (field[cIndex].value < 20)
If you are going to do a foreach loop then at least limit the context down by component sets. This loop here goes after every PICK on the hero then tries to subset by a field that may or may not even exist on the picks list of fields.

Limit the foreach scope like this:
Code:
foreach pick in hero from BaseClHelp where "TagGroup.Tag"
or 
foreach pick in hero from BaseClHelp
Always better to use a tag then any field for searching. HL is optimized to deal with Tags not so much with fields. By saying "from BaseClHelp" we are limiting HL down to just the Class Helper Picks on the hero which will be ALLOT smaller subset of Picks to deal with then every Pick.

Please note I can't remember if BaseClHelp is correct for d20 as I am not near HL. You can see which "Components" make up a Pick by looking at its tags and the 'component.?' group section.
I don't think BaseClHelp is correct for where we want to look, but I have no idea where to find the right term let alone what it would be.

Again, I'm not familiar enough with the structure of foreach, and how they are handled in the system. For my initial endeavor on this project I wanted to limit the scope to only the first 20 "class" entries. The likely components would be BaseClass, BaseRace, or BaseTemp. If there are others I have not noticed them yet. My concern is that if I set it up for those components it would run through all the class levels (out to theoretically 100), pulling information that it should not.

The other question is what order do foreach loops approach data? I would assume following an index somewhere, but then the question goes, could classes end up on the search index in a different order then their class index on the hero? For example, could a hero's 30th class level end up being searched before their 3rd class level.

I suppose I could restructure it as:
Code:
foreach pick in hero from BaseClHelp
if (eachpick.field[cIndex].value = 1) then
....
elseif (eachpick.field[cIndex].value = 2) then
etc...
and in this way limit the search and get the data saved to variables depending on the index value, for use in later calculations. I still think it would be better if we could find a way to remove the foreach and search on class index.

By the way, if the first foreach bothers you, the next 6 all have a duplicate structure to each other. More then the first, I feel that those should be able to be replaced since the class helpers are part of an array, but again, I've only dealt with array values in script by using the copy/paste approach.
Nightfox is offline   #19 Reply With Quote
ShadowChemosh
Senior Member
Volunteer Data File Contributor
 
Join Date: Jan 2010
Location: Chicago, IL (USA)
Posts: 10,729

Old November 29th, 2016, 01:51 PM
A class is made up of "TWO" pieces or Things. The Class Helper and the Class. The Class Helper only exists "ONE" time no matter the level of the character. Where a Class Pick exists each time you select the class on the Basics tab. So a 5th level wizard has ONE Pick named cHelpWiz and 5 picks named cWizard (so 6 total picks on the hero).

When I get home I can get you the correct component name for class helpers. But to find it yourself add 1 level of wizard to your a blank character. Go to the develop menu and look at the "tags" and look for "cHelpWiz". If you look at the "tags" you can see the components and one is named "Class Helper". Its BaseClHelp in Pathfinder/5e and I thought that naming convention came from d20.

My next question in all this is do you need to run super early in script timing? Otherwise class level and racial hit dice are all tags on the "hero" you can simply count.
Code:
var classlevel as number
classlevel = hero.tagcount[Classes.?]
If you run at like Post-Level/10000 the above script will tell you the total of ALL classes on the hero. Which is all that #totallevelcount[] macro is doing.

If you are needing to run "super" early like First/10000 or earlier then and only then would you need to do a foreach loop to try and count classes. This is because the "Classes.?" tags have not yet been forwarded to the hero. Even then I am thinking that the Class Helpers have the total class level already done and you only need to total the couple class helper Picks not the "Class" components on the character.

In example the character has 5 levels of Wizard and 1 of Rogue. Your foreach loop and find cHelpWiz with a class level of 5 and cHelpRog has a class level of 1. Boom now you know you have 6 total levels.

Quote:
Originally Posted by Nightfox View Post
The other question is what order do foreach loops approach data?
Foreach loops are not SQL and you can not do an "order by". In other words you will get the "Picks" back in a random order that will very often change when executed. If you have 6 picks A,B,C,D,E,F on a character and do
Code:
foreach pick in hero from LETTERS
You could one time get back F,E,D,C,B,A and next run get A,B,C,F,E,D.

Hero Lab Resources:
Pathfinder - d20pfsrd and Pathfinder Pack Setup
3.5 D&D (d20) - Community Server Setup
5E D&D - Community Server Setup
Hero Lab Help - Hero Lab FAQ, Editor Tutorials and Videos, Editor & Scripting Resources.
Created by the community for the community
- Realm Works kickstarter backer (Alpha Wolf) and Beta tester.
- d20 HL package volunteer editor.
ShadowChemosh is offline   #20 Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -8. The time now is 12:17 PM.


Powered by vBulletin® - Copyright ©2000 - 2024, vBulletin Solutions, Inc.
wolflair.com copyright ©1998-2016 Lone Wolf Development, Inc. View our Privacy Policy here.