• 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

Another scripting question.

dartnet

Well-known member
How would you script it so lets say an edges needs Knowledge: Science, Navigation, or Occult at a d6?
 
Ah, this is a reason why I stopped making players fill in their Knowledge skills six years ago. I figured out what Knowledge skills were needed, by definition being those that are asked for by an Edge, and I made it be a skill. Then I modified Scholar to account for it. I also added in a few more. Not all of them get used every single campaign, but they are there and it makes times like this really easy. The other reason is that it is annoying to have to fill out the knowledge field every time. Plus, I can easily have a race add a specific knowledge.

So, I would script them like any other three skills.

You get to go through the validation rigamarole and make it look for those three skills, and if it has them, add to the count. Offhand, I think that Tactician does it for Knowledge: Battle. You would copy that, and make three parts to look for those instead of Knowledge: Battle.

You are lucky that it is for an "or". If it was an "and", you get to have three versions of the script, one per knowledge skill.
 
How about this?

Code:
      var totalcount as number
      totalcount = 0
      foreach pick in hero where "thingid.skKnow"
          if (compare(lowercase(eachpick.field[domDomain].text),"science") = 0) then
            if (eachpick.field[trtFinal].value >= 3) then
              totalcount += 1
              endif
          endif
          if (compare(lowercase(eachpick.field[domDomain].text),"occult") = 0) then
            if (eachpick.field[trtFinal].value >= 3) then
              totalcount += 1
              endif
          endif
          if (compare(lowercase(eachpick.field[domDomain].text),"navigation") = 0) then
            if (eachpick.field[trtFinal].value >= 3) then
              totalcount += 1
              endif
          endif
        nexteach
      validif (totalcount >= 1)

A little clunky, I'll admit, but it should work. And if you wanted to check if it was two of them, change the (totalcount >= 1) to (totalcount >= 2), or 3 for all 3.
 
Last edited:
Back
Top