• 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

Trait bonus to Channel Energy DC help

bodrin

Well-known member
I'm trying to increase the DC of the Channel Energy ability.

It's a trait bonus so I thought this script at post levels 10000

Code:
~ Add +1 Trait Bonus to our Channel Energy DC 
 #situational[hero.child[xChannel],"+1 trait bonus to the save DC of Channel 

 #applybonus[BonTrait, hero.child[abDC], 1

would work but I get this error

HTML:
Hero Lab was forced to stop compilation after the following errors were detected:

Syntax error in 'eval' script for Thing 'trWoWAsmWi' (Eval Script '#1') on line 4
  -> Non-existent thing 'abDC' used by script

then I tried this script at Final 26000

Code:
~ Add +1 Trait Bonus to our Channel Energy DC 
 #situational[hero.child[xChannel],"+1 trait bonus to the save DC of Channel energy",field[thingname].text]

~ Add a +1 trait bonus to our Channel Energy DC
   foreach pick in hero from Ability where "fieldval:abDC > 0"
        eachpick.field[abDC].value += 1
        nexteach

which compiled but I received this error

HTML:
Attempt to access field 'SitList' that does not exist for thing 'xChannel'

which I presume means that xChannel doesn't accept situational bonuses.

I then tried this script at final 26000

Code:
~ Add a +1 trait bonus to our Channel Energy DC
   foreach pick in hero from Ability where "fieldval:abDC > 0"
        eachpick.field[abDC].value += 1
        nexteach

and the Channel energy DC increases but if I were to add another trait bonus to the DC it would also increase as the above script doesn't define the +1 as a trait bonus.

Is there a better way of coding this so it doesn't stack with any other trait bonuses?:confused:
 
Abilities don't have any bonus type fields in them, if you want to add to their DCs you just add to the abDC field. This means you can't really track bonus types or stacking, sorry.

Btw, I think the final code you posted will add +1 to the DC of any ability with a DC higher than 0, not just xChannel. I'd suggest testing and possible rewrite.
 
Abilities don't have any bonus type fields in them, if you want to add to their DCs you just add to the abDC field. This means you can't really track bonus types or stacking, sorry.

Btw, I think the final code you posted will add +1 to the DC of any ability with a DC higher than 0, not just xChannel. I'd suggest testing and possible rewrite.

Yep, I'd considered this situation too. However I was pressed for time and just needed to get the abDC to increase, but the errors kept me from fully testing before I had to depart for real life work.

Any possibility of getting the bonus type fields added in a later iteration of HL for any future modifications?
 
Last edited:
Further investigation results in any abDC ability applied to a Hero increasing, this is an unfortunate situation.

I'll have to reconsider how it's scripted, but for the moment i'm moving onto other things in the source. I'll revisit at a later date.

By all means anybody with any insights are welcome to offer suggestions.:cool:
 
Out of curiosity was it just a copy/paste issue or are you missing the right bracket ]?

Yep the Copy / Paste error terror strikes again

This script

Code:
~ Add +1 Trait Bonus to our Channel Energy DC 
 #situational[hero.child[xChannel],"+1 trait bonus to the save DC of Channel 

 #applybonus[BonTrait, hero.child[abDC], 1]

Results in this error

HTML:
Hero Lab was forced to stop compilation after the following errors were detected:

Syntax error in 'eval' script for Thing 'trWoWAsmWi' (Eval Script '#1') on line 2
  -> Invalid macro reference encountered in script

right bracket was missing.:o
 
Note to self, read the editor manual sometimes.

Maybe there is already an example blatantly there!!

#dc[ability_id] The abDC field stores the DC of the ability. If abDC is greater than 0, it is appended to the livename - the version of the ability's name that is displayed on the special tab and printouts. For example, the Improved Channel feat adds 2 to the DC of the Channel Energy ability.
~ Add 2 to the DC of our channel energy ability #dc[xChannel] += 2



Code:
~ Add a +1 trait bonus to our Channel Energy DC
   #dc[xChannel] += 1
I'll just go and stand in the corner, nothing to see here.:o

Edit: I'd still like the conditional / situational fields adding to the abilities, Please.
 
Last edited:
Back
Top