Lone Wolf Development Forums

Lone Wolf Development Forums (http://forums.wolflair.com/index.php)
-   HL - Savage Worlds (http://forums.wolflair.com/forumdisplay.php?f=59)
-   -   Modifying Power Points by a skill level (http://forums.wolflair.com/showthread.php?t=68331)

Gumbytie April 28th, 2024 09:56 AM

Modifying Power Points by a skill level
 
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?

CapedCrusader April 29th, 2024 03:24 AM

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.

Gumbytie April 29th, 2024 04:05 AM

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 :)


All times are GMT -8. The time now is 02:41 AM.

Powered by vBulletin® - Copyright ©2000 - 2024, vBulletin Solutions, Inc.
wolflair.com copyright ©1998-2016 Lone Wolf Development, Inc. View our Privacy Policy here.