• 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

Automatically Excluding Beasts from the Ranger Companion List

Fenris447

Well-known member
I've been working on updating SRD monsters in the Community Pack, and in doing so realized that our implementation of the Beast Master's Animal Companion is flawed.

It properly excludes all Large+ creatures, all non-beasts, and all swarms of beasts using a tag expression:

Code:
      searchexpr = "((hasbootstrap:tpBeast) & (RaceSize.Tiny12 | RaceSize.Small11 | RaceSize.Medium0) & !SwarmSize.?)"  & excrace

This is great. But there's another requirement: the beast must not be more than CR 1/4. Because we can't test for fields (rCR is the field for CR) in tag expressions, we had to manually exclude any CR 1/2+ beasts that otherwise fit the requirements:

Code:
      excrace = "& !thingid.rApe & !thingid.rBlackBear & !thingid.rGiantGoat & !thingid.rGiantSea & !thingid.GiantWasp & !thingid.rReefShar & !thingid.rWarhorse & !thingid.r5CJaculi & !thingid.r5CALGtHGo & !thingid.r5CSumBst & !thingid.r5CBstLnd & !thingid.r5CBstSea & !thingid.r5CBstSky"

I realized this list hasn't been updated for stuff like VGM, which had the Deinonychus that needed to be added. But since there's a high likelihood that new beasts will need to be added to the list, I thought we could do better. So I set up a foreach that will look through all beasts that otherwise fit the description, check their CR, and add them to an exclusion tag expression if they should be kept out:

Code:
foreach thing in BaseRace where "((hasbootstrap:tpBeast) & (RaceSize.Tiny12 | RaceSize.Small11 | RaceSize.Medium0) & !SwarmSize.?)"
      if (eachthing.field[rCR].value > 0.25) then
          excrace &= " & !" & eachthing.tagids[thingid.?,""]
          endif
          nexteach

So from now on, we won't need to manually update the list. It'll just pull stuff in automatically and exclude them from selection.

Incoming New Adjustment!

On top of that, I noticed that there have been multiple forum posts asking how to add a creature that otherwise doesn't meet these requirements (like a dragon wyrmling or a displacer beast) as the companion. I'm going to try and design an adjustment that will let you pick any creature and add it to the list as an option. Wish me luck!
 
Last edited:
Back
Top