• 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

Supressing xClimb, xSwim & Snaky Body

djc664

Well-known member
Need help coding to supress xClimb, xSwim & Snaky Body

Greets everyone!

So I after a whirlwind few months since GenCon (huge work projects all stacked up + my daughter being born), everything settled to the point that I can get back to coding the RotRL NPCs. I see another member has put out the first two book (which is awesome!), but my versions are a lot more detailed so I'm going to continue along with them and still release those...

Working on the beast of Xanesha, and am trying to code in the changes for the Lamia Matriarch's Alternate Form racial special. Here's where I am in the description so far:

When activated, this should change size to medium (DONE), subtract 8 STR and 4 CON, add 2 DEX (DONE), supress Wisdom Drain (Not needed until that ability can modify weapons with the -1 Wis drain... can this happen now?), Supress Climb & Swim speed bootstraps (need help with this), supress serpant shape/non-humanoid for no tripping (need help with this), and change base speed to 30ft (DONE).

My hacked up code for this so far:
Code:
First/20000
 
      ~ If we're not shown, just get out now
      doneif (tagis[Helper.ShowSpec] = 0)
 
      ~ When activated
      if (field[abilActive].value <> 0) then
 
      ~ Abilty scores modified (-8 STR, -4 CON, +2 DEX)
      hero.child[aSTR].field[Penalty].value -= 8
      hero.child[aCON].field[Penalty].value -= 4
      hero.child[aDEX].field[Bonus].value += 2
 
      ~ Change base speed to 30ft when active
      hero.child[Speed].field[tSpeed].value = 30
 
      ~ Remove Climb & Swim
      ~???????
 
      ~ Change Many/No Legs option from Snaky Body --> None
      ~???????
 
      ~ Add to size - must come after race and template size set
      herofield[tSize].value -= 1
      ~ Change the size of all our equipment (apart from unarmed
      ~ strike, which changes automatically)
      foreach pick in hero from MyGear where "!wCategory.Unarmed"
        eachpick.field[gSizeMod].value -= 1
        nexteach
 
      var i as number
 
      ~change the size of our natural weapons
      foreach pick in hero from BaseNatWep where "!Helper.NatSizeDmg"
        perform eachpick.assign[Helper.DamageDown]
        nexteach
      endIf

I have a feeling the timing is not prime, but it all seems to work thus far. Any help, cleaning or insight is greatly appreciated.
 
Last edited:
Normally, you would assign a climb and swim speed when you added them to the race. Since in this case, you know you want to alter those speeds with a script, add climb and swim, but leave the speeds empty.

There's nothing needed for the remove part of the script, since Swim and Climb will hide themselves if their speed is 0, but at the bottom of this, instead of just using endif, you'll apply the speeds as part of an Else:

Code:
else
  ~swim speed 20
  perform hero.childfound[xSwim].assign[Value.20] 
  ~climb speed 30
  perform hero.childfound[xClimb].assign[Value.30]
  endif

So, if the ability is active, no swim or climb speed will be applied, but if it's not active, speeds will be assigned.

To find the Quarduper/Snaky/ManyLegs information, make sure that in the Develop menu, "Enable Data File Debugging" is checked.

Start a new character for testing.

Now, in the develop menu, go to "floating info windows...show hero tags"

Now, add a race that's snaky, and look for any tags that appear that look appropriate. Then try a race with 4 legs, and look for the Quadruped tag, and a race with 8 legs and look for the Many legs tag. Then select the human race, and you'll see that 2 legs is the default - there aren't any tags for that.

So, you can delete the snaky tag from the race, and they won't be forwarded to the hero:

perform delete[Helper.Snaky]

Unless you've checked the option yourself in the editor, you don't need to worry about the not humanoid tag - that's automatically assigned to every Snaky, Quadrupedal or Many-legged creature, so getting rid of snaky gets rid of that.

Note that this will need to go in a separate script from the rest - Snaky is forwarded to the hero at First/650, so I'd recommend First/625 in order to change it in time.
 
Understood on both. Thank you for explaining the thought process + code. That really helped, overall.

Just to confirm my understanding of what you wrote...
So the reason one doesn't use the Racial Special Eval Script to remove the two movements instead of adding them on with else (like a double negative, of sorts) is because it can't assign a value of 0 through the script... but if it *starts* at 0, you can modify to a positive integer. Is that correct?

Also, the perform.delete did not remove the snaky helper. I tried wrapping it like this:

Code:
      if (field[abilActive].value <> 0) then

      ~ Delete the snake bits!
      perform delete[Helper.Snaky]

      endIf

as well as just with what you wrote, at First/625, but it just seems to ignore it. When activated, I look at the tags and Helper.Snaky is still there.

Also the ImnTrip under Basics doesn't change (which is the only thing I've found that even lets you know there's something going on with that helper). Speaking of which, shouldn't something like Snaky Body, which confers a bonus to things in addition to being untrippable show up as an item in the Special Abilities tab?
 
Actually, the reason to add, and not delete is - what if you had cast a spell on yourself to grant Climb 20' - if the script deletes the climb speed, it will delete all Value.20 tags, both the tag added by the spell and the tag added by the race.

I'll take a closer look at what's happening with Helper.Snaky.

The reason it's not a special is that I'm just guessing at what it means - while adding Bestiary material, I noticed a common pattern of bonuses to trip CMDs that seemed to match up with the number of legs a thing had (but the pattern's not even consistent - you can trip a squid or a shark, but not an octopus).
 
I noticed a common pattern of bonuses to trip CMDs that seemed to match up with the number of legs a thing had

Comes from this:
If the target has more than two legs, add +2 to the DC of the combat maneuver attack roll for each additional leg it has
Core p201

I found this thread looking for a way to suppress Climb/Swim/Burrow, but only if from a race. If I delete all tags, I end up killing spells in effect granting a speed. How do I script only removing it if it was added by a race?
 
Last edited:
Back
Top