View Single Post
basselope
Junior Member
 
Join Date: Sep 2011
Posts: 23

Old November 25th, 2017, 03:00 PM
I found the following from the Common Code Examples thread:

Quote:
Originally Posted by zarlor View Post
A thorny one that Erich brought up dealing with how to use the mechanic used by the Racial Property "Very Costly Atribute", but in this case trying to do it for all Knowledge skills. Knowledge skill are rather special since they are not Unique, you can have multiples of the. CapedCrusaader came through with the following code:

Eval Script: Effects/1000

Code:
foreach pick in hero from Advance where "Skill.skKnow"
  eachpick.field[advCost].value *= 2
nexteach
Eval Script: Traits/5000 Index: 2

Code:
foreach pick in hero where "Skill.skKnow"
   perform #resspent[resSkill,+,eachpick.field[trtUser].value - 1,"Hindrance Name"]
   var modifier as number
   modifier = maximum(eachpick.field[trtUser].value - eachpick.linkage[attribute].field[trtFinal].value,0)
   perform #resspent[resSkill,+,modifier,"Hindrance Name"]
nexteach
However, I have not been able to modify it properly to work. Unfortunately, because I'm new at this, I don't have a real solid understanding of everything yet. I knew to change the reference to the skill to the one I was working on. What is happening is it charges 2 skill points for the initial purchase like I wanted. However, after that it charges 3 skill points for each rank after the first. So, a d4 is 2 points, but a d6 is 5 points instead of the desired 4 points.

Any ideas?
basselope is offline   #2 Reply With Quote