• 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

Wild Shape scripting help

Mergon

Well-known member
I am working on an Adjustment for druid wild shape.

You add the beast shape as a hireling then add this adjustment. It transfers your mental stats to the creature. That works.

In addition, I need to transfer save proficiencies. This is the script I am using for that, but it doesn't work. It's the first time I've worked with 'master' so I am not sure if I have a timing problem or ifd the issue is in my scripting.

Phase: Final Phase, Priority: 1000

~ If we're not enabled, get out now
doneif (field[pIsOn].value = 0)

foreach pick in master from BaseSave where "Helper.Proficient"
perform eachpick.assign[Helper.Proficient]
nexteach

What this script is supposed to do is go through all the character's Saves and for each one the character is proficient in, assign the Helper.Proficient tag to the beast.

What I am wondering is with the foreach script I am trying to use, is it applying the tag back on the master or to the beast as I want . . . :confused:
 
What I am wondering is with the foreach script I am trying to use, is it applying the tag back on the master or to the beast as I want . . . :confused:
Its setting the Tag back on to Eachpick. Eachpick is the masters BaseSave Pick that you are currently pointing too. So if the master has Helper.Proficient on the Reflex save you are assigning Helper.Proficient again to the masters Reflex save.

You need to do the following:
1) Figure out which "Save" you are on the master (ie Ref, Fort, Will).
2) assign the tag to the minion's associated Ref, Fort, Will save.

Honestly unless I am mistaken you only have three saves to work with in 5e right? Wouldn't a simple If/Then setup be easier in this situation and WAY less CPU overhead... :)

Code:
~ Reflex Save
If (master.hero.child[svRef].tagis[Helper.Proficient] = 1) then
  perform hero.child[svRef].assign[Helper.Proficient]
Endif
~ Fortitude Save
If (master.hero.child[svFort].tagis[Helper.Proficient] = 1) then
  perform hero.child[svFort].assign[Helper.Proficient]
Endif
~ Will Save
If (master.hero.child[svWill].tagis[Helper.Proficient] = 1) then
  perform hero.child[svWill].assign[Helper.Proficient]
Endif
Obviously replace with the correct Thing ID if svRef is not right...
 
There are actually 6 saves in 5E, one for each ability score . . .

Still, I just need to add an if/then as you have shown for each save. Thx for the assist . . . <again> :)
 
Chemosh:

Is there anyway to do this usign a foreach loop?

What you showed me worked great, but now I also have to apply Proficiency bonus that the druid possesses to the beast form. For now, I'll use the same trick as above, but it would be nice to be able to just loop through the skills. :)
 
Chemosh:

I have a question about script timing if you have the time.

From the 'master' I want to grab the Intelligence, Wisdom, and Charisma scores and transfer them to the beast hireling. I need to do this early enough that skills on the beast use these new ability scores

What Phase & Priority should I be using?

I've tried both pre and post-attribute. I've even tried the Attribute phase. The new stats only show up when I use Post-attribute or later Phases. However, the skills do not take advantage of the new attribute bonuses. I am pretty sure it has to be a timign issue, but I am out of my depth and have been shooting blind trying to find the right combo.

Any assistance would be much appreciated.
 
Chemosh:

Is there anyway to do this usign a foreach loop?

What you showed me worked great, but now I also have to apply Proficiency bonus that the druid possesses to the beast form. For now, I'll use the same trick as above, but it would be nice to be able to just loop through the skills. :)
Can't you just pull the ProfSkill.? tags directly from the hero? Don't those match exactly to the Proficiency bonuses? I guess again my confusion is your game terms. :(


Pre-Levels/10000
Code:
var searchexpr as string
~ Get list of Proficient Skills from master
searchexpr = master.hero.tagids[ProfSkill.?,"|"]

~ Loop through those same skills on the hero and
~ apply the proficient tag.
foreach pick in hero from BaseSkill where searchexpr
  perform eachpick.assign[Helper.Proficient]
nexteach
I am thinking this is what you want. It finds all the ProfSkill.? on the master and then does a foreach loop on the hero (ie minon) and apply the proficient tag to the same skills.
 
Chemosh:

If it works, that's exactly what I am looking for. Today has not been my day for scripting. For some reason, I have the master's INT, WIS, and CHA scores transferred over to the beast but the ability score bonuses don't seem to be being applied.

Time to get a nerf bat to take out my frustrations without destroying everythign around me. :)
 
For some reason, I have the master's INT, WIS, and CHA scores transferred over to the beast but the ability score bonuses don't seem to be being applied.
Transferring ability scores is about very specific timing or just issues. This is because by the time you get to the final ability score you are very likely past the point where you can adjust the minion's ability score. :(

There could be a specific window (timing) that will work but finding it is going to be allot of trial and error... :)
 
Well, its not pretty, but its working. The new Wild Shape adjustment seems to be transferring the appropriate stats (INT, WIS, CHA), and skill and save proficiencies.

So far, I haven't looked into transferring class abilities over to the beast form. I don't know if its even possible, so for the time being the player has to alternate between the character and the beast forms.

Once I have tested it some more, I'll upload the adjustment to GIT in case others want to use it.
 
I was able to add the Hireling and choose Rat as the race. I'm a little fuzzy on how to add the adjustment script. I do not see a script option in either the adjustment tab nor the personal tab where you can load permanent adjustments. or are you creating a new duplicate race and calling is something like Rat Wild shape and adding the script there?
 
Last edited:
Scripts need to be added via the Tools > Editor > Thing > Eval Script. It's not something you do on a live character.
 
This adjustment is for Wild Shape. So far it looks good. I'd like to add more features at some point in the future, but for now what I have seems to work great.

To simulate a wild shape you add a beast as a hireling. You name it Wild Shape (beast name).

You add the Wild Shape adjustment; no need to set anything.

Features:
- imports the druid's INT, WIS, and CHA scores.
- imports the druid's Proficiency bonus.
- imports the druid's skill & save Proficiencies.

That's it for now.

Chemosh; when I upload it would it be possible to list it under 'Shadows of Endore' as the Source?
 
Back
Top