Lone Wolf Development Forums  

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

Notices

Reply
 
Thread Tools Display Modes
Maidhc O Casain
Senior Member
 
Join Date: Nov 2009
Location: Jonesboro, AR (USA)
Posts: 858

Old May 23rd, 2011, 11:23 AM
Very strange - since you indicated that it was working, I went back and put that if/then that I posted first and it did work. It does not work with a masterwork version of the weapon, though.

I know I was using a normal weapon when I was making the scizore version; it's entirely possible I was jumping the gun and using a masterwork version to test my original tries. Apologies for that.

OK, so that first if/then works with the regular version of the weapon. Now how do I go about making it work with the masterwork/special material/bonded item versions?

Here's the script I'm using in its entirety (Phase: Post-Attributes (Users), Priority 10000):

Quote:
~ If we're equipped, add a +1 Shield bonus to our AC
if (field[gIsEquip].value <> 0) then
#applybonus[tACShield, hero.child[ArmorClass], 1]
endif

~ If we're in output mode, don't do anything
doneif (state.isoutput <> 0)

~ If we're fighting defensively or total defense, the shield bonus increases to +2
if (#hascondition[pstFtDefen] + #hascondition[pstTotDef] <> 0) then
if (field[gIsEquip].value <> 0) then
#applybonus[tACShield, hero.child[ArmorClass], 2]
endif
endif
I wasn't sure what the 'output mode' portion of the script accomplished, but since it was in the original version of Two Weapon Defense I kept it.

Last edited by Maidhc O Casain; May 23rd, 2011 at 11:50 AM.
Maidhc O Casain is offline   #11 Reply With Quote
Mathias
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 13,207

Old May 23rd, 2011, 12:17 PM
Have you looked at other weapons with scripts? The lance, for example? There's a special way you have to reference things while a weapon is within a Custom/Magic weapon.

If you accidently left Total defense active at the end of a fight, and before the next fight you re-print your character sheet, do you want to see the effects of Total Defense? The printout is for the base version of the character, so all the things in the condtion tab turn off their effects when you're printing your character or a statblock.

Those feats like two-weapon defense that depend on conditions should also check the same thing - otherwise, you'd add the benefits of the feat while fighting defensively, without the AC bonus of fighting defensively itself.
Mathias is online now   #12 Reply With Quote
Maidhc O Casain
Senior Member
 
Join Date: Nov 2009
Location: Jonesboro, AR (USA)
Posts: 858

Old May 23rd, 2011, 04:26 PM
re: Output Mode - Gotcha. Thanks for explaining that.

I'll take a look at the lance and see what I can puzzle out.
Maidhc O Casain is offline   #13 Reply With Quote
Maidhc O Casain
Senior Member
 
Join Date: Nov 2009
Location: Jonesboro, AR (USA)
Posts: 858

Old May 23rd, 2011, 05:58 PM
OK, I think I've got it. I added the condition for the weapon being magic, and also cleaned up my original script a little to make it more elegant.

This seemed to work in my test - could you take a look and see if I covered everything?

Quote:
~ If we're equipped, add a +1 Shield bonus to our AC
if (field[gIsEquip].value <> 0) then
#applybonus[tACShield, hero.child[ArmorClass], 1]

~ If we're in output mode, don't do anything
doneif (state.isoutput <> 0)

~ If we're fighting defensively or total defense, the shield bonus increases to +2
if (#hascondition[pstFtDefen] + #hascondition[pstTotDef] <> 0) then
#applybonus[tACShield, hero.child[ArmorClass], 2]
endif
endif

~ If we're a magic weapon, modify our parent instead
if (container.ishero = 0) then

if (container.parent.field[gIsEquip].value <> 0) then
#applybonus[tACShield, hero.child[ArmorClass], 1]

~ If we're in output mode, don't do anything
doneif (state.isoutput <> 0)

~ If we're fighting defensively or total defense, the shield bonus increases to +2
if (#hascondition[pstFtDefen] + #hascondition[pstTotDef] <> 0) then
#applybonus[tACShield, hero.child[ArmorClass], 2]
endif
endif
endif
Maidhc O Casain is offline   #14 Reply With Quote
Mathias
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 13,207

Old May 23rd, 2011, 07:13 PM
You said this weapon was two-handed. If it weren't - if it could be wielded in the off-hand, you'd also need to check if it was equipped in that hand:

Code:
 
field[gIsEquip].value + field[wIs2nd].value <> 0
and

Code:
 
container.parent.field[gIsEquip].value + container.parent.field[wIs2nd].value <> 0
So, something to remember for next time.
Mathias is online now   #15 Reply With Quote
Maidhc O Casain
Senior Member
 
Join Date: Nov 2009
Location: Jonesboro, AR (USA)
Posts: 858

Old May 24th, 2011, 02:23 AM
Thanks again, Matthias!
Maidhc O Casain is offline   #16 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 04:47 PM.


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