Member
Join Date: Jun 2011
Location: Tasmania
Posts: 82
|
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? |
#1 |
Senior Member
Volunteer Data File Contributor
Join Date: Jan 2010
Location: Chicago, IL (USA)
Posts: 10,729
|
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] Hero Lab Resources: Pathfinder - d20pfsrd and Pathfinder Pack Setup 3.5 D&D (d20) - Community Server Setup 5E D&D - Community Server Setup Hero Lab Help - Hero Lab FAQ, Editor Tutorials and Videos, Editor & Scripting Resources. Created by the community for the community - Realm Works kickstarter backer (Alpha Wolf) and Beta tester.- d20 HL package volunteer editor. |
#2 |
Member
Join Date: Jun 2011
Location: Tasmania
Posts: 82
|
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. |
#3 |
|
|