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)
-   -   -1 to all knowledge skills (http://forums.wolflair.com/showthread.php?t=47483)

dartnet December 2nd, 2013 08:15 PM

-1 to all knowledge skills
 
How would I script this?

zarlor December 3rd, 2013 05:58 AM

Let's see, the closest similar code snippet I have is at pre-traits/5000 with the following:

Code:

foreach pick in container where "thingid.skKnow"
  if (compare(lowercase(eachpick.field[domDomain].text),"arcane") <> 0) then
      perform eachpick.field[trtRoll].modify[+,1,"Your Edge Name"]
  endif
nexteach

So obviously you need to change the +, 1 to -,1 and otherwise you should just be able to remove the if and endif lines completely, since you want it to apply to all of them. So something like:

Code:

foreach pick in container where "thingid.skKnow"
      perform eachpick.field[trtRoll].modify[1,1,"Name of the thing that does this"]
nexteach


Mauron December 3rd, 2013 08:46 AM

There's a typo in zarlor's code. Here's a corrected and tested version.

Code:

foreach pick in container where "thingid.skKnow"
      perform eachpick.field[trtRoll].modify[-,1,"Name of the thing that does this"]
nexteach


zarlor December 3rd, 2013 09:16 AM

Doh! Thanks, Mauron!

dartnet December 4th, 2013 07:58 PM

You are gods among men thank you.


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

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