• Please note: In an effort to ensure that all of our users feel welcome on our forums, we’ve updated our forum rules. You can review the updated rules here: http://forums.wolflair.com/showthread.php?t=5528.

    If a fellow Community member is not following the forum rules, please report the post by clicking the Report button (the red yield sign on the left) located on every post. This will notify the moderators directly. If you have any questions about these new rules, please contact support@wolflair.com.

    - The Lone Wolf Development Team

Hero.Epic

ErinRigh

Well-known member
I know this is an old topic, but I am wondering if anyone involved in the d20 data set has any thoughts on addressing this.

Checking back I can find issues with this going back at least 4 years!

I may be in a minority but I would really like to see Epic character support in Hero Lab. Epic characters fall in line with Open Gaming guidelines and the SRD, so why not support in Hero Lab?

But aside from that, does anyone have an idea on how I would create an adjustment (preferably a condition) that would add the Epic hero (Hero.Epic) state to a character making epic feats valid for the character.

Seriously though, can anyone tell me why epic character support is so limited within HL?
 
Its called "time". I have very little of it and so my decisions are often based on what has the biggest impact on those using the software. The improvements to spells, spell-like abilities, and deities will affect 99% of the user base. Epic will affect maybe 25% of the user base.

Not saying I will never get to improving Epic support. But I need to stay focused on the changes that will help the most number of users.

That means Epic/Gestalt will stay as low-priority in the list. As I make other improvements I will keep them in mind and if something happens where I can add in a feature that also will help Epic/Gestalt then it will happen.

But as been seen lately I think many more people would be happier with support for say "Configurables" in the editor. That allows for "new" tabs to be added allowing for more customization by editors and the community.
 
But aside from that, does anyone have an idea on how I would create an adjustment (preferably a condition) that would add the Epic hero (Hero.Epic) state to a character making epic feats valid for the character.

anybody got any thoughts on this?
 
The hardest part as I see it would be figuring out the classes affected and calculating the appropriate adjustments. Time consuming and clunky coding, but manageable I think. My own gaming groups either finish the campaigns before epic (victory or death) or have simply continued level (like Pathfinder) for levels above 20.

I don't even know where my ELHB is anymore, so can you refresh my memory on what exactly the changes for 21+ level are? As I recall BAB is replaced by just an attack bonus, and the saves are the same for all classes.
 
Well I have no problems using continued advancement, which is how hero lab handles it now, but epic feats require that Hero.Epic <> 0. this state does not appear on characters who are character level 21 automatically and I am looking for a way to do it Manually.
 
Well I have no problems using continued advancement, which is how hero lab handles it now, but epic feats require that Hero.Epic <> 0. this state does not appear on characters who are character level 21 automatically and I am looking for a way to do it Manually.

Can you make a special, which once bootstrapped, checks for level greater than 20 and assigns the Hero.Epic tag?

Possibly an adjustment or Epic template.
 
Well I have no problems using continued advancement, which is how hero lab handles it now, but epic feats require that Hero.Epic <> 0. this state does not appear on characters who are character level 21 automatically and I am looking for a way to do it Manually.

I thought there was one already. I will look into it when I get a chance. In the meantime, you should be able to create a script that searches for total class level (should be a herofield), and if above 20, you can assign the tag:

perform hero.assign[Hero.Epic]
 
I thought there was one already. I will look into it when I get a chance. In the meantime, you should be able to create a script that searches for total class level (should be a herofield), and if above 20, you can assign the tag:

perform hero.assign[Hero.Epic]

Should be able to, but I am just little in the realm of coding, so how about a bit of a walkthrough?

I'd like to create a condition that I can simply click on and set the character as Epic, any thoughts?
 
I don't even know where my ELHB is anymore, so can you refresh my memory on what exactly the changes for 21+ level are? As I recall BAB is replaced by just an attack bonus, and the saves are the same for all classes.

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.
 
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. :D

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.

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.
 
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.
 
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​
 
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
 
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.
 
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.
 
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.
 
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.
 
My confusion in going over this is the way you structured the foreach loops:

:o 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.

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.

:p 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. :o
 
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. :)

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. :)
 
Back
Top