• 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

Editor setting a Competance Bonus on Ranged Attacks

Mad Hamish

Well-known member
I'm trying to add a competence bonus to ranged attacks
(I'm looking at building the Channel Vigor options)

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

~ Add to our ranged attack bonus
#applybonus[BonComp, hero.child[basAttackR], 4]

and
#competencebonus[hero.child[basAttackR], 4]

and I get
Attempt to access field 'BonComp' that does not exist for thing 'basAttackR'

for either of them

If I change it to
#competencebonus[hero.child[Attack], 4]
that works on all attacks

Could somebody please let me know what I'm doing wrong?
 
The #applybonus[] macro is looking for three things of input:
#applybonus[FIELD_NAME_FROM_PICK, PICK_ON_THE_HERO, THE_BONUS_TO_APPLY]

In this case your looking for giving Ranged Attacks. So go to Develop->Floating Info Windows->Show Selection Fields and we want to look at the "Attack" pick. We see it has fields:
Noname2.jpg

So with all the above info we can now easily make the macro:
Code:
#applybonus[atrBonComp,hero.child[Attack],4]
 
Thanks for that, the expression you've given works

I hadn't understood exactly how to use the Debug Windows to get information.

That's going to be a massive help for me.
 
Back
Top