• 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

Brawny feat help

Mergon

Well-known member
Ok, I need help. Here is my feat. It's broken atm but I need help with some scripting I've never used before.

What I need to do is check if an ability like the Goliath's Powerful Build ability is present. If it is I need add +1 to iCount. This allows abilities like Powerful Build to stack with the Brawny feat. (I've highlighted the sample script in red).

I tried using the #hasability macro but it wasn't detecting the presence of the
'ra5CEEMoBo' for some reason.

I think I should be using findchild but am unsure how to go about it.

I am shamelessly asking ShadowChemost for advice. :)

Phase: Post-attributes, Priority: 11000
doneif (tagis[Helper.ShowSpec] = 0)

doneif (tagis[Helper.Disable] <> 0)

var iCount as number
iCount = 2
debug "Count = " & iCount

~ Goliath's Powerful Build ability
if (hero.child[ra5CEEMoBo].tagis[HasAbility.ra5CEEMoBo] <> 0) then
iCount += 1
debug "Count = " & iCount
endif


~ Firbolg's Powerful Build ability

~ Bear Totem Barbarian's 6th level ability
if (hero.child[c5CBbnABBe].tagis[HasAbility.c5CBbnABBe] > 0) then
iCount += 1
debug "Count = " & iCount
endif

var iLgt as number
var iHvy as number
var iMax as number

var iStr as number
iStr = hero.child[aSTR].field[aFinalVal].value

var iTemp as number

iTemp = (15*iStr*iCount)/3
iLgt = round(iTemp,0,-1)
iTemp = (15*iStr*iCount)/2
iHvy = round(iTemp,0,-1)
iTemp = (15*iStr*iCount)/1
iMax = round(iTemp,0,-1)

~herofield[tEncumLgt].value = herofield[tEncumLgt].value * iCount
~herofield[tEncumHvy].value = herofield[tEncumHvy].value * iCount
~herofield[tEncumMax].value = herofield[tEncumMax].value * iCount

herofield[tEncumLgt].value = iLgt
herofield[tEncumHvy].value = iHvy
herofield[tEncumMax].value = iMax
 
So your checking the HasAbility.? tag on the Child. Sort of different but basically it should work except when using hero.child[] it should be throwing an error when the racial ability is not found.

The easy way here is to look for the Ability tag on the hero which should get placed pretty early. Otherwise the hero HasAbility.? tag is not placed until really late as its meant to be used by Pre-Req scripts.

Try this for an easy solution:
Code:
~ Goliath's Powerful Build ability
if (hero.tagis[Ability.ra5CEEMoBo] <> 0) then
  iCount += 1
endif

If for some reason that does not work which would be surprising to me. Or you need to test for the presence of a Pick very early in timing. You can simply test for the live state:
Code:
~ Goliath's Powerful Build ability LIVE on the Hero
if (hero.childlives[ra5CEEMoBo] <> 0) then
  iCount += 1
endif
 
I'll look at it tomorrow. It should fix my issues I think.

hero.child[] was throwing errors and that was what was driving me batty. :)

childlives is new to me though. I'll have to remember it and add it to my list of commands.
 
I sort of said that about hero.child[]. You could also replace the logic with hero.childfound[] instead and then you won't get an error message.

hero.child[] says the Pick "must" exist Live on the hero or throw an error to the user. hero.childfound[] says do stuff to a Pick "if" found else do nothing. :)
 
~ Goliath's Powerful Build ability
if (hero.tagis[Ability.ra5CEEMoBo] <> 0) then
iCount += 1
endif

This code worked perfectly as far as I can tell. I re-used it for the Firbolg and the 6th level Bear Totem barbarian ability and they also worked.

Many, many thanks.

Now I just have to figure out where my problem is with elf Keen Sight perception and my Perceptive feat script and the Unearthed Arcana Skill feats are complete and I'll move on to the racial feats.
 
Back
Top