Lone Wolf Development Forums  

Go Back   Lone Wolf Development Forums > Hero Lab Forums > HL - Savage Worlds
Register FAQ Community Today's Posts Search

Notices

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Erich
Senior Member
 
Join Date: Aug 2011
Posts: 131

Old February 25th, 2013, 02:10 PM
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
and Index 2
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
I put the if statement in so this would only apply to the lizard men.

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.
Erich is offline   #21 Reply With Quote
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -8. The time now is 06:00 AM.


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