• 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

Additional Favored Terrain/Enemy Feat

KTFish7

Active member
Am stumped. Not sure why this isn't working....Have gone through the forum, found some very helpful tips and tricks I didn't know about (the floating debug windows are insanely helpful)...and yet, I can't get this code to work.

The feat allows for an additional favored enemy (if the class has the favored enemy feature)...and another class for favored terrain, same situation.
I've tried it with all of these options now, individually of course, but none of them are working to accomplish the bonus to the total count.

Code:
hero.child[resEnemSel].field[resMax].value += 1
hero.child[resEnemUpg].field[resMax].value += 1

hero.child[resTerrSel].field[resMax].value += 1
hero.child[resTerrUpg].field[resMax].value += 1

And of course, getting frustrated with the fact I couldn't get this to work, I tried working on the pre-req to take my mind away from the main problem for a second, only to not be able to get it to work either...and I haven't even tackled the additional animal companion Ranger Talent yet....arrggghhhh...and here this PDF was going so well, lol.

Any help on dissecting this and getting me past my brain dead moment will, as always, get you HL Gurus a toast from this humble guy. Thanks in Advance
 
Last edited:
Currently the phase is on First, with a priority of 100....have tried several variations of phase/priority based on other threads from the forum, none of them have been that sweet spot yet.

Thanks Mathias
 
As a general rule, the default phase & priority is a bad choice for ANY script - there are some real problems that can be created if you leave it there.

Post-Attributes/10000 would be when I'd try this.

Are you testing this on a Ranger, or some other character that already has favored terrains, or are you testing this on an otherwise blank character?

Are you receiving any error messages? If so, please right-click them, copy their text, and paste them here.
 
KT, it's my understanding that the Additional Favored Enemy/Terrain wouldn't add to the upgrade resource. It would still only be a single +2 and wouldn't allow upgrading any other entry.
 
KT, it's my understanding that the Additional Favored Enemy/Terrain wouldn't add to the upgrade resource. It would still only be a single +2 and wouldn't allow upgrading any other entry.

I wasn't trying to affect the upgrade resource. The feat gives additional selection options by increasing the total count each time the feat is taken.
 
Is this for the Spell-less Ranger that was submitted to OD/KP? Every time I add a feat, any feat, I get an error code related to the prereqs in both the Additional Favored Enemy and Additional Favored Terrain feats.

I redownloaded it from the Paizo site to make sure it was the most up to date and I'm still getting the error (pic below). I took a look at those two feats and at my (admittedly inadequate) skill level couldn't see where it went wrong. Also, (assuming you are the author of the official file) there's a typo in the AFE as the message calls out for favored terrain, not enemy.

AFE :
if (hero.picklives[resEnemSel] <> 0) then
validif (#resmax[resEnemSel] <> 0)
endif

AFT :
if (hero.picklives[resTerrSel] <> 0) then
validif (#resmax[resTerrSel] <> 0)
endif
 

Attachments

  • spellless ranger error.png
    spellless ranger error.png
    325.5 KB · Views: 6
AFE :
if (hero.picklives[resEnemSel] <> 0) then
validif (#resmax[resEnemSel] <> 0)
endif

AFT :
if (hero.picklives[resTerrSel] <> 0) then
validif (#resmax[resTerrSel] <> 0)
endif
Maybe picklives works but I have never seen it or used it. I always use "childlives". Trying changing picklives to "hero.childlives" and see if it throws the same error.
 
Maybe picklives works but I have never seen it or used it. I always use "childlives". Trying changing picklives to "hero.childlives" and see if it throws the same error.

if (hero.childlives[resEnemSel] <> 0) then
validif (#resmax[resEnemSel] <> 0)
endif

Almost. It dropped the line about prereq and ultimately reduced the error message down to "Attempt to access script from container with no ability to do so"

Dunno if it makes a difference, but the eval script is :

hero.child[resEnemSel].field[resMax].value += 1

(Pre-levels/1000)
 

Attachments

  • spellless ranger error2.png
    spellless ranger error2.png
    114.6 KB · Views: 8
I'd guess that to know if resmax is <>0, levels have to be taken into account.

Hence I'd try this at Post-Levels, not Pre-Levels
 
Tried playing around and found that that childlives or picklives will both cause these errors your seeing. Your currently only choice is to remove the checks.
 
I already did. It's one of those things where there's no point in taking the feat if you don't meet the prereqs anyway. I just thought I'd point it out in case the author wanted to fix it (or remove it) from the official set.
 
Poizen and Shadow,

I just now saw this thread, and want to thank you for pointing out the solution.

I was able to separate into two different checks:

AFE:
Expr-req: hero.childlives[resEnemSel] <> 0
pre-req: validif (hero.childfound[resEnemSel].field[resMax].value >= 1)

The Terrain one is the same but referencing resTerrSel.

Thanks!
Thomas
 
Back
Top