Lone Wolf Development Forums  

Go Back   Lone Wolf Development Forums > Hero Lab Forums > HL - Pathfinder Roleplaying Game

Notices

Reply
 
Thread Tools Display Modes
Santok1972
Junior Member
 
Join Date: Mar 2019
Posts: 12

Old February 20th, 2021, 01:38 PM
I've been searching through these forums looking for a way to make the adjustment for a custom feat I have been working on for PF1 in HeroLab Classic. I've found a few ideas, but nothing quite seems to work out.

For the feat, when it is activated in the "In Play" tab, I want to add a +1 to hit with light or one-handed melee weapons.

The functionality of checking if the ability is activated on the In Play tab is working

if (field[abilActive].value <> 0) then

end if

The following code inserted in the above If-Then statement adds a bonus to all melee weapon attack rolls, including two-handed weapons:

hero.child[Attack].field[atmBonus].value += field[abValue].value

Then I tried using

if (container.tagis[wClass.Light] <> 0) then
foreach pick in hero from BaseWep
eachpick.field[wAttMelee].value += field[abValue].value
nexteach
endif

But that doesn't seem to be cutting it. I'm sure it's something simple that I'm missing.

Any suggestions?

Thank you.
Santok1972 is offline   #1 Reply With Quote
wdmartin
Senior Member
 
Join Date: May 2013
Posts: 240

Old February 26th, 2021, 08:17 AM
Try this:

Code:
if (field[abilActive].value <> 0) then
	foreach pick in hero from BaseWep where "wClass.Light"
		eachpick.field[wAttMelee].value += field[abValue].value
	nexteach
end if
You can feed the foreach itself a tag expression this way and it will only do its thing on picks that match.
wdmartin is offline   #2 Reply With Quote
Santok1972
Junior Member
 
Join Date: Mar 2019
Posts: 12

Old February 27th, 2021, 10:17 AM
Yes, thank you. That did it. I was close, but just a little off.
Santok1972 is offline   #3 Reply With Quote
Reply

Thread Tools
Display Modes

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 09:29 PM.


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