• 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

Adjusting the Swallow Whole calculated AC and HP.

bodrin

Well-known member
Okay i'm creating a Construct which has the Swallow Whole ability.

This construct has a bonus to it's stomach HP equal to its construct size bonus hit points.

Refer to PFRPG Bestiary page 307 but for my particular construct its large so it gets 30 HP.

Hero lab calculates the correct standard swallow whole stats AC19 HP 11 but I need to correctly display AC19 and HP 41.

I've tried to locate the fields, tags and tasks that work behind the scenes to calculate these figures but can find only bare minimum indicators.

Examining the Swallow whole data
It appears that Abvalue#1 refers to the AC and Abvalue#2 holds the HP value.

Looking at the Construct data I can't see where the extra bonus Hit points get applied or even how they get applied. (Perhaps its elsewhere in the data files or not user accessible)

So I know I need to set up an If then loop to check for construct size, determine a value to apply the correct HP number based upon that size then target the Swallow whole ability and add the value to Abvalue#2.

Likewise with the AC calculation if needed.

Here's what i've been mulling over within the deep recesses of ones mind.

Code:
   Probably use Final Phase 9500

~ If we aren't a Construct then we do nothing
  doneif (hero[tpConst] <> 1)

   ~ Set up a variable to hold the bonus stomach HP

     Var something as a number
      
     ~Calculate the total bonus hit points to add based on our size
       if field[abValue2].value += field[xxxxxx].value + other code to determine size 
       elseif xxxxxxx

     ~Extra code just in case we need to alter our AC too
      if (Lots of specific code) elseif

       ~Let's add our bonus HPs to our Swallow Whole Stomach HP      
        hero[xxxxx].child[Totals].field[abValue2].value += something
Obviously I need to know which fields to target to get the correct values to plug into the script. As it stands i'm searching the existing stuff for something similar.

Any help appreciated.:D

Edit: Found the xConstruct ability but there still isn't any indication where the bonus HP gets applied.
 
Last edited:
Eureka Moment

And it's done!!!!!:D

Post levels 5000

Code:
~ If we aren't a Construct then we do nothing
  doneif (#hastype[tpConst] = 0)

 ~ Set up a variable to hold the bonus stomach HP depending on size
   Var Bonus as number

  ~ Check our size and set bonus HP
    if (hero.tagis[Size.Small] <> 0) then 
     Bonus = 10
      elseif (hero.tagis[Size.Medium] <> 0) then 
       Bonus = 20
        elseif (hero.tagis[Size.Large] <> 0) then 
         Bonus = 30
          elseif (hero.tagis[Size.Huge] <> 0) then 
           Bonus = 40
            elseif (hero.tagis[Size.Gargantuan] <> 0) then 
             Bonus = 60
              elseif (hero.tagis[Size.Colossal] <> 0) then 
               Bonus = 80
                endif
 
 ~ Target our Stomach HP field and add the Bonus HP
   #value2[raSwallow] += Bonus

Script posted for reference.:cool:
 
Back
Top