• 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

Modifying Animal Companion

AndrewD2

Well-known member
An archetype I'm working on basically adds a template to to the cavalier's mount, plus the mount gains extra abilities chosen from a list at specific levels. I've never worked with a mount like this and I'm not sure where to start.

Thanks,
Andrew
 
I think I was talking to someone about this just recently. The best you can do is have the archetype check for the presence of something on the mount (perhaps an adjustment) and throw an error if it is missing (thus alerting the user they should go to the mount and add that adjustment or whatever). For the Extra Abilities you can choose you'll probably have to make a new Configurable for that.
 
Anything that manipulates a field or applies a tag you can do from the hero, using the minion transition. You can't however, add a pick to the minion from on the hero. That means you'll have to get the user to add the template themselves. Which is why I recommended the evalrule to throw a validation error.
 
The Wild Caller summoner archetype has an example you can work from (it transitions to the eidolon and checks that a list of certain evolutions).

Code:
      var wrongevolv as string
      
      @valid = 1
      
      ~ If there's no Eidolon, there's nothing we can do
      doneif (hero.hasminion[Eidolon] = 0)

      var i as number
      i = 0
      
      var candidates as string
      
      candidates = "thingid.rcEiMagAtk | thingid.rcEiEnerAt | thingid.rcEiImAcid | thingid.rcEiImCold | thingid.rcEiImElec | thingid.rcEiImFire | thingid.rcEiImSoni | thingid.rcEiWepSim | thingid.rcEiWepMar | thingid.rcEiDR10   | thingid.rcEiDR5 | thingid.rcEiSR     | thingid.rcEiBasMag | thingid.rcEiImBasM |thingid.rcEiUnnAur | thingid.rcEiChaRes | thingid.rcEiHead |thingid.rcEiMajMag | thingid.rcEiImMajM | thingid.rcEiMinMag | thingid.rcEiImMinM | thingid.rcEiUndApp | thingid.rcEiImUnAp |thingid.rcEiGrUnAp | thingid.rcEiDimDoo | thingid.rcEiIncFor | thingid.rcEiLifese | thingid.rcEiNoBre  | thingid.rcEiUltMag |thingid.rcEiBrLine | thingid.rcEiBrWeap | thingid.rcEiBrCone | thingid.rcEiDR10CI | thingid.rcEiDR5CI  | thingid.rcEiFright"

      foreach pick in hero.minion[Eidolon] from RaceCustom
        if (eachpick.tagcountstr[candidates] <> 0) then
          if (i = 0) then
            i += 1
          else
            wrongevolv &= ", "
            endif
          
          wrongevolv &= eachpick.field[name].text
          endif
        nexteach
        
      if (i <> 0) then
        @message = "Wild Caller's Eidolon may not have the following evolutions: " & wrongevolv
        @valid = 0
      else
        @valid =1
        endif

Not exactly what you're looking for but you can probably modify it.
 
So I could use the hero.minion[AnimComp] transition to add the ability score/skill/natural armor modifications but not anything that would require being bootstrapped like low light vision, right?
 
Sort of. hero.minion[AnimComp] is used for a foreach. Here is an example line from the "Andoren Falconry" feat which isn't a foreach but a straight transition to the minion and then adding to the dodge bonus.

Code:
hero.childfound[cAnimComp].minion.child[ArmorClass].field[tACDodge].value
 
Ok, I've got almost everything set, only things left are modifying the Skill Points/Level to 6 + int, make 3 skills class skills, and giving it low-light vision.

Low light vision I believe I have to do through an adjustment, but I think I can do the other two with scripts, I'm just not sure which tags to assign.
 
second issue that just came up. If you assign the archetype before having the animal companion setup you get a lot of not live errors.

Here's the code:
Code:
~ If we're not shown, just get out now
      doneif (tagis[Helper.ShowSpec] = 0)


hero.childfound[cAnimComp].minion[AnimComp].child[aSTR].field[aStartMod].value -= 2
hero.childfound[cAnimComp].minion[AnimComp].child[aDEX].field[aStartMod].value += 4
hero.childfound[cAnimComp].minion[AnimComp].child[aINT].field[aStartMod].value += 2
hero.childfound[cAnimComp].minion[AnimComp].child[aCHA].field[aStartMod].value += 2
#situational[hero.childfound[cAnimComp].minion[AnimComp].child[svAll], "+4 against mind-affecting effects", field[name].text]
hero.childfound[cAnimComp].minion[AnimComp].child[ArmorClass].field[tACNatural].value -= 1

if (field[xAllLev].value >= 15) then
   field[abValue].value += 10
elseif (field[xAllLev].value >= 5) then
   field[abValue].value += 5
endif

#applydr[xDamRdIron, field[abValue].value]

if (field[xAllLev].value >= 7) then
   field[abValue2].value = round(hero.childfound[cAnimComp].minion[AnimComp].child[Speed].field[tSpeed].value * 1.5, 0, -1)
   hero.childfound[cAnimComp].minion[AnimComp].child[xFly].field[abValue].value += field[abValue2].value
      if (hero.childfound[cAnimComp].minion[AnimComp].child[xFly].tagis[Maneuver.Good] <> 0) then
        perform hero.childfound[cAnimComp].minion[AnimComp].child[xFly].assign[Maneuver.Perfect]
	  else
	    perform hero.childfound[cAnimComp].minion[AnimComp].child[xFly].assign[Maneuver.Good]
	  endif
endif

Here's the errors:

Code:
Attempt to access non-live child pick 'cAnimComp' from script
- - -
Attempt to access non-live pick via script fails for pick 'cAnimComp'
- - -
Attempt to access non-live child pick 'cAnimComp' from script
- - -
Attempt to access non-live pick via script fails for pick 'cAnimComp'
- - -
Attempt to access non-live child pick 'cAnimComp' from script
- - -
Attempt to access non-live pick via script fails for pick 'cAnimComp'
- - -
Attempt to access non-live child pick 'cAnimComp' from script
- - -
Attempt to access non-live pick via script fails for pick 'cAnimComp'
- - -
Attempt to access non-live child pick 'cAnimComp' from script
- - -
Attempt to access non-live pick via script fails for pick 'cAnimComp'
 
I am the person Aaron was talking to :) I made a Configurable, which I'm bootstrapping to the companion by means of a Trait. The trait has an eval script that "unspends" the resource used when I added the trait - it's just a handy place to put it that doesn't result in a check box.

My Companion gains Rage Powers from the master, via Ferocious Mount power. I'm setting up all the modifiers for the Rage, etc. in the configurable. Everything seems to be working well.

I'm bootstrapping the picks in the configurable as well, with conditions checking for tags which I copy from the hero. For example:

At First/450, if the master is raging, mounted, and has the ferocious mount enabled, the tag Hero.Raging is applied to the mount. Otherwise, Hero.Raging is removed from the mount.

At First/451, the configurable iterates through the picks in the master that are Barbarian custom powers and, if the mount has the Hero.Raging tag applied, applies Ability and HasAbility tags for the picks. If the mount doesn't have the Hero.Raging tag applied, it deletes the tags.

At First/500, the picks are bootstrapped by the configurable, if the mount has the appropriate tags applied.

You could do something similar with your archetype, and then you wouldn't have to worry about the archetype being applied to early for the companion, since the companion would be the one doing the tag picking.

I'm still making the thing (there a LOT of Rage Powers to duplicate), but I'll send you the .user file when it's done, if you'd like.
 
I've actually got it mostly taken care of. Currently my only problems have to do with non-live picks error that I posted about and adding Electrical and Cold Resistance.
 
Ok, fixed that, but I'm still getting a not live error when I try to modify the Energy Resistance.

Here's the code:
Code:
hero.childfound[cAnimComp].minion[AnimComp].child[xDamRsCold].field[abValue].value += 10
hero.childfound[cAnimComp].minion[AnimComp].child[xDamRsElec].field[abValue].value += 10

Any ideas?
 
Nope, that didn't work

Code:
Attempt to access non-live child pick 'xDamRsCold' from script
- - -
Attempt to access non-live pick via script fails for pick 'xDamRsCold'
- - -
Attempt to access non-live child pick 'xDamRsCold' from script
- - -
Attempt to access non-live pick via script fails for pick 'xDamRsCold'
- - -
Attempt to access non-live child pick 'xDamRsElec' from script
- - -
Attempt to access non-live pick via script fails for pick 'xDamRsElec'
- - -
Attempt to access non-live child pick 'xDamRsElec' from script
- - -
Attempt to access non-live pick via script fails for pick 'xDamRsElec'
 
According to my tests, this works without errors.

Code:
      perform hero.childfound[cAnimComp].minion.child[xDamRsCold].setfocus
      
      doneif (state.isfocus = 0)
      
      focus.field[abValue].value = maximum(focus.field[abValue].value, 10)
 
I was trying to use the setfocus option to clean the code up a little (since I've never used it before) so I tried

Code:
perform hero.childfound[cAnimComp].minion.setfocus

but that appears to not have worked.

Is there a place to see the limits of how setfocus works? I had assumed it would just replace "focus" later in the script with the value of where focus was set, but I'm guessing that is not correct.
 
Back
Top