• Please note: In an effort to ensure that all of our users feel welcome on our forums, we’ve updated our forum rules. You can review the updated rules here: http://forums.wolflair.com/showthread.php?t=5528.

    If a fellow Community member is not following the forum rules, please report the post by clicking the Report button (the red yield sign on the left) located on every post. This will notify the moderators directly. If you have any questions about these new rules, please contact support@wolflair.com.

    - The Lone Wolf Development Team

How to get a +1 to all Smarts-based skill checks

Gumbytie

Well-known member
So I have an Edge which grants:

You gain a +1 to all Smarts-based skill checks (except Arcane skills).

Which sounded easy to me until I sat down to actually code this. Sigh. I have just come back over from coding a bunch of Pathfinder stuff so brain not in Savage Worlds mode yet :)

Any suggestions would be most helpful.

Cheers,
Gumbytie
 
I'm not sure if there is a way to pick them out by group, so it may be easiest to just do a +1 on each Smarts skill on the list, except for Knowledge. When you get to the Knowledge ones you'll have to step through each one of those, so something like this:

Code:
~go through all knowledge skills and exclude an "Arcane" one
foreach pick in hero where "thingid.skKnow"
   if (compare(lowercase(eachpick.field[domDomain].text),"arcane") <> 0) then
      perform #traitroll[skKnow,+,1,"Your Edge Name"]
   endif
nexteach

If you allow ABs don't forget to include the appropriate Smarts-based skills for those as well, like Psionics.

Does that help?
 
Okay, so yes, I just added the bonus to each Smarts-based skill directly. Easy enough, there aren't that many.

Now your script (thanks BTW), I dropped it in as is and it almost works. But instead of adding a +1 to each of my three Knowledge skills in my test character, it just added +3 to only one of them.
 
Maybe it should be done this way instead?

Code:
foreach pick in hero where "Skill.skKnow"
   if (compare(lowercase(eachpick.field[domDomain].text),"arcane") <> 0) then
      perform #traitroll[skKnow,+,1,"Your Edge Name"]
   endif
nexteach

I'm not always sure on the best ways to step through picks.
 
You and me both :)

That also just adds everything to one Knowledge skill.

And it is the Knowledge skills that kick me harder than anything. Been searching through the forums and most seem to be talking about applying everything to one Knowledge skill and its domain.

I really thought there was a thread very similar about adding a bonus to all Knowledge skills but must have been imagining it :) Time for more coffee.
 
I could have sworn I'd run into this problem before, too. I'll have to do some more searching when I have some time if someone doesn't jump in before then. I just can't for the life of me remember what it was.
 
OK, I got it. The problem was using the #traitroll macro. Looks like we had to break it down to what that macro normally calls and then modifying the syntax to point to the pick, and not just the generic trait of skKnow (which apparently just grabs the first one and is modifying that one.)

So it should look something like this:
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
 
Awesome dude, totally worked. Here I was getting ready to head to bed after a day of Pathfinder coding, dropped in here real quick and saw this. Had to try it and of course it worked.

Thanks bunches.

Now maybe I will sleep better :)
 
Let me see, that's a good question. How to add a bonus to all <Some Attribute>-related skills?

How about this at Pre-Traits/5000?

Code:
foreach pick in hero where "component.Skill"
   ~ Set the tag for whichever Attribute you are after, this one's Smarts
   ~ (attrAgi, attrSma, attrSpi, attrStr, attrVig)
   if (eachpick.linkage[attribute].tagis[thingid.attrSma] <> 0) then
      perform eachpick.field[trtRoll].modify[+,1,"Your Edge Name"]
   endif
nexteach
 
Back
Top