• 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

HP adjustments via script

DeltaMasterMind

Well-known member
Hi everyone, today I am requesting some information on how to force HP updates to a active summon via a ability that is bootstrapped to the possible summons. This chooser allows the player to pick the CR rating and adds the corresponding values to the summon. This summon comes from an archetype that I made that uses a blood ritual to summon a creature. Now so far I have had issues getting the editor to play nice with me trying to modify HP values from script. Any suggestions?

By the way I have the summon bootstrapped to the archetype so at level 12 it activates the summon on the portfolio but does not add any useful attributes until the ability of the archetype has selected a area for which the summon is called forth from. It starts as a CR 5 creature and need to make the script allow proper addition of HP when higher CRs are selected. I have also tried a few different timings with the fields rHPstart, cHP, cHPBonus, and others related to them.

Here is my current script: Post-Attributes 11000
~ If we're not shown, just get out now
doneif (tagis[Helper.ShowSpec] <> 1)
~ If we've been Disabled, get out now
doneif (tagis[Helper.SpcDisable] <> 0)

~ Set a pointer to our race
perform hero.findchild[BaseRace].setfocus
~ if can't find then get out now!
doneif (state.isfocus = 0)

~ Now that we have a pointer we can just increase/change
~ any value on the race.

~ Base setting for Summon
If (field[usrIndex].value = 0) Then

~ CR 6
ElseIf (field[usrIndex].value = 1) Then
focus.field[rCR].value += 1
focus.field[rHitDice].value += 1
~ CR 7
ElseIf (field[usrIndex].value = 2) Then
focus.field[rCR].value += 2
focus.field[rHitDice].value += 2
~ CR 8
ElseIf (field[usrIndex].value = 3) Then
focus.field[rCR].value += 3
focus.field[rHitDice].value += 3
~ CR 9
ElseIf (field[usrIndex].value = 4) Then
focus.field[rCR].value += 4
focus.field[rHitDice].value += 4
~ CR 10
ElseIf (field[usrIndex].value = 5) Then
focus.field[rCR].value += 5
focus.field[rHitDice].value += 5
~ CR 11
ElseIf (field[usrIndex].value = 6) Then
focus.field[rCR].value += 6
focus.field[rHitDice].value += 6
~ CR 12
ElseIf (field[usrIndex].value = 7) Then
focus.field[rCR].value += 7
focus.field[rHitDice].value += 7
~ CR 13
ElseIf (field[usrIndex].value = 8) Then
focus.field[rCR].value += 8
focus.field[rHitDice].value += 8
~ CR 14
ElseIf (field[usrIndex].value = 9) Then
focus.field[rCR].value += 9
focus.field[rHitDice].value += 9
~ CR 15
ElseIf (field[usrIndex].value = 10) Then
focus.field[rCR].value += 10
focus.field[rHitDice].value += 10
~ CR 16
ElseIf (field[usrIndex].value = 11) Then
focus.field[rCR].value += 11
focus.field[rHitDice].value += 11
~ CR 17
ElseIf (field[usrIndex].value = 12) Then
focus.field[rCR].value += 12
focus.field[rHitDice].value += 12
~ CR 18
ElseIf (field[usrIndex].value = 13) Then
focus.field[rCR].value += 13
focus.field[rHitDice].value += 13
~ CR 19
ElseIf (field[usrIndex].value = 14) Then
focus.field[rCR].value += 14
focus.field[rHitDice].value += 14
~ CR 20
ElseIf (field[usrIndex].value = 15) Then
focus.field[rCR].value += 15
focus.field[rHitDice].value += 15
endif
 
Last edited:
If trying to affect the BaseRace and have those changes apply to the Hero you need to be REALLY early in timing. Like I would start at First/50 and go sooner if the changes didn't work.

Also can't you stream line your code to remove all the elseif logic and just do:
Code:
~ Increase CR and Hit Dice
focus.field[rCR].value += field[usrIndex].value
focus.field[rHitDice].value += field[usrIndex].value
As the above covers usrIndex 1 to XX increases...
 
There is a herofield for bonus hp (tBonusHP) you could add to at a later timing, if you like.
 
If trying to affect the BaseRace and have those changes apply to the Hero you need to be REALLY early in timing. Like I would start at First/50 and go sooner if the changes didn't work.

Also can't you stream line your code to remove all the elseif logic and just do:
Code:
~ Increase CR and Hit Dice
focus.field[rCR].value += field[usrIndex].value
focus.field[rHitDice].value += field[usrIndex].value
As the above covers usrIndex 1 to XX increases...

I suppose I could xD. Just didn't think about it, but now I plan to add that into my code. Thanks for the suggestion!
 
There is a herofield for bonus hp (tBonusHP) you could add to at a later timing, if you like.

Seems the editor may not like the area I am building this chooser. I choose to use the augmentation tab under races. Although I am fairly certain that when using a focus that it shouldn't be an issue. Any links that may shed light on this matter for me?
 
Seems the editor may not like the area I am building this chooser. I choose to use the augmentation tab under races. Although I am fairly certain that when using a focus that it shouldn't be an issue. Any links that may shed light on this matter for me?
Its just a hero field transition like so:
Code:
herofield[tBonusHP].value += WHATEVER BONUS HP
 
Back
Top