• 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

Modifying Power Points by a skill level

Gumbytie

Well-known member
Okay, this is the objective. The arcane skill used to "cast" modifies the amount of Power Points based on the skill level.

d4 Skill = 2 starting power points
d6 Skill = 3 power points
d8 Skill = 4 power points

etc.

The character can ALSO still take the Edge Power Points for even more additional PP.

So I have a script that is not quite getting what I want:

Code:
foreach pick in hero where "component.Arcane"
var powbonus as number
powbonus = hero.tagis[Skill.skCBDeepConnect]
debug powbonus

~ Half Deep Connection die in Power Points
eachpick.field[resMax].value += powbonus
nexteach

So that is giving me a constant bonus of 1 additional Power Point. I am pretty sure I am not getting it correct in this part:

Code:
hero.tagis[Skill.skCBDeepConnect]

The desire is that should adjust best on the skill level as above listing. So, does anyone have some suggestions how to get my math correct?
 
The element 'tagis' will give you a 0 or a 1 based on whether the tag is there or not.
Try powbonus = #traitfound[skFighting]
Normally a trait value is half the die value, which is just what you're after. And using traitfound won't cause an error if the skill isn't on the hero.
 
Thanks Caped, that worked. I also needed to adjust the timing. If anyone interested, here is the working code:

Code:
foreach pick in hero where "component.Arcane"
  var powbonus as number
  powbonus = #traitfound[skSpellcst]
  debug powbonus

  ~ Half Deep Connection die in Power Points
  eachpick.field[resMax].value += powbonus
nexteach

Timing needs to be set to: Traits 5000

You replace the "skill" with whatever appropriate arcane skill. And make sure Number of Powers is 0. Or you could use this to add bonus Power Points I guess :)
 
Back
Top