Senior Member
Join Date: Aug 2011
Posts: 131
|
Hi CC,
Thanks for the code, I went ahead and used the editor to create a mechanic and broke it down into two eval scripts like so. Index 1 Code:
if (hero.tagis[Race.rac89LizMa] <> 0) then foreach pick in hero from Advance where "Skill.skKnow" eachpick.field[advCost].value *= 2 nexteach endif Code:
if (hero.tagis[Race.rac89LizMa] <> 0) then 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 endif This seems to work, but now I am noticing something else. This is probably best explained with an example. I created a Lizard Man with a Smarts of 8 and an Agility of 10, then I added some skills This is how the skill point progression went: Boating d4 1 of 15 (14 left) Boating d6 2 of 15 (13 left) Boating d8 3 of 15 (12 left) Boating d10 4 of 15 (11 left) Boating d12 6 of 15 (9 left) this is where Boating went over the Agility die. Knowledge d4 8 of 15 (8 left) 2 skill points were taken from the 15, but only 1 was taken from the total left Knowledge d6 10 of 15 (7 left) 2 skill points were taken from the 15, but only 1 was taken from the total left Knowledge d8 12 of 15 (6 left) 2 skill points were taken from the 15, but only 1 was taken from the total Knowledge d10 16 of 15 (4 left) 4 skill points were taken from the 15, but only 2 were taken from the total Knowledge d12 20 of 15 (2 left) 4 skill points were taken from the 15, but only 2 were taken from the total Fighting d4 21 of 15 (1 left) Fighting d6 22 of 15 So it looks like the points are being subtracted from the 15 points correctly, but the total left is getting messed up somehow. While I'm thinking about it, when I tested raising a knowledge skill through the advance tab the knowledge skills ARE taking 2 minor (1 major) advance to raise, but I'm getting these error messages: Attempt to access field 'trtUser' that does not exist for thing 'advBoost1' Location: 'eval' script for Thing 'mech89Prim' (Eval Script '#2') near line 4. Attempt to access field 'trtUser' that does not exist for thing 'advBoost1' Location: 'eval' script for Thing 'mech89Prim' (Eval Script '#2') near line 6. Linkage pick 'attribute' not located for current context Location:'eval script for Thing 'mech89Prim' (Eval Script '#2") near line 6 Any ideas? -Erich p.s. Thanks very much for the help, I'm still trying to get the fancy scripting down. And I think this particular bit is pretty deep into the weeds. |
#21 |
|
|