Lone Wolf Development Forums  

Go Back   Lone Wolf Development Forums > Hero Lab Forums > HL - Pathfinder Roleplaying Game
Register FAQ Community Today's Posts Search

Notices

Reply
 
Thread Tools Display Modes
Mad Hamish
Member
 
Join Date: Jun 2011
Location: Tasmania
Posts: 82

Old September 12th, 2015, 10:29 PM
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?
Mad Hamish is offline   #1 Reply With Quote
ShadowChemosh
Senior Member
Volunteer Data File Contributor
 
Join Date: Jan 2010
Location: Chicago, IL (USA)
Posts: 10,729

Old September 13th, 2015, 08:53 AM
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.
ShadowChemosh is offline   #2 Reply With Quote
Mad Hamish
Member
 
Join Date: Jun 2011
Location: Tasmania
Posts: 82

Old September 14th, 2015, 07:43 AM
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.
Mad Hamish is offline   #3 Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -8. The time now is 12:53 AM.


Powered by vBulletin® - Copyright ©2000 - 2024, vBulletin Solutions, Inc.
wolflair.com copyright ©1998-2016 Lone Wolf Development, Inc. View our Privacy Policy here.