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
Charender
Junior Member
 
Join Date: Aug 2011
Posts: 21

Old September 1st, 2011, 01:03 PM
I am trying to replace the Fighting Defensively rule with a house rule. I followed the same procedure as replacing a feat.
Create a skeleton adjustment that replaces pstFtDefen
Create an exact copy of the normal fighting defensively adjustment with a containerreq of !source.HouseRule
Create a new adjustment that contains my house rules with a containerreq of source.HouseRule

Everything works except for 1 thing
My problem is that in the adjustments section of the conditions tab, Fighting Defensively shows up twice. It has the correct modifiers based on whether I have my house rule source selected or not, but when I select it, it applies highlights both of the fighting defensively modifiers, and it applies the correct modifiers twice.

Code:
<thing id="pstFDTest" name="Fighting Defensively Test" description="This will replace fighting defensively and bootstrap both the old or new Fighting Defensively." compset="InPlay" replaces="pstFtDefen">
    <bootstrap thing="pstStdFtDe"></bootstrap>
    <bootstrap thing="pstHRFtDef"></bootstrap>
    </thing>
  <thing id="pstStdFtDe" name="Fighting Defensively" description="You can choose to fight defensively when attacking. If you do so, you take a –4 penalty on all attacks in a round to gain a +2 to AC for the same round." compset="InPlay">
    <tag group="Helper" tag="AdjState" name="Combat State" abbrev="Combat State"/>
    <containerreq phase="First" priority="100">!source.srcHouseRH</containerreq>
    <eval phase="Final" priority="20000" index="2"><![CDATA[
      ~ If we're in output mode, don't do anything
      doneif (state.isoutput <> 0)

      field[livename].text = field[thingname].text & " (" & signed(field[abValue2].value) & " To Hit, " & signed(field[abValue].value) & " AC)"]]></eval>
    <eval phase="PostLevel" priority="20000"><![CDATA[
      ~ If we're in output mode, don't do anything
      doneif (state.isoutput <> 0)

      ~AC
      field[abValue].value += 2
      ~attack
      field[abValue2].value -= 4

      ~ If we're not enabled, get out now
      doneif (field[pIsOn].value + hero.isidentity[Condition] = 0)

      ~ +2 AC
      hero.child[ArmorClass].field[tACDodge].value += field[abValue].value

      ~-4 to hit
      hero.child[Attack].field[tAtk].value += field[abValue2].value]]></eval>
    </thing>
  <hidden id="pstTotDef"/>
  <thing id="pstHRFtDef" name="Fighting Defensively" description="You can choose to take a –1 penalty on melee attack rolls and combat maneuver checks to gain a +1 dodge bonus to your Armor Class. When your base attack bonus reaches +4, and every +4 thereafter, the penalty increases by –1 and the dodge bonus increases by +1. You can only choose to use this feat when you declare that you are making an attack or a full-attack action with a melee weapon. The effects of this feat last until your next turn" compset="InPlay">
    <usesource source="srcHouseRH"/>
    <tag group="Helper" tag="AdjState" name="Combat State" abbrev="Combat State"/>
    <containerreq phase="First" priority="100">source.srcHouseRH</containerreq>
    <eval phase="PostLevel" priority="20000"><![CDATA[~ If we're in output mode, don't do anything
        doneif (state.isoutput <> 0)
        
        ~ If fighting Defensively is active, change the bonuses
        var ACBonus as number
        var HitPenalty as number
        
        HitPenalty = round(hero.child[Attack].field[tAtkBase].value/4,0,-1)+1
        ACBonus = HitPenalty
        
        if (#hasfeat[fAgilDef] <> 0) then
          ACBonus = round(ACBonus * 1.5,0,-1)
        endif
        
        ~AC
        field[abValue].value += ACBonus
        ~attack
        field[abValue2].value -= HitPenalty
        
        ~ If we're not enabled, get out now
        doneif (field[pIsOn].value + hero.isidentity[Condition] = 0)
        
        ~ AC
        hero.child[ArmorClass].field[tACDodge].value += field[abValue].value
        
        ~ to hit
        hero.child[Attack].field[tAtk].value += field[abValue2].value]]></eval>
    <eval phase="Final" priority="20000" index="2"><![CDATA[
      ~ If we're in output mode, don't do anything
      doneif (state.isoutput <> 0)

      field[livename].text = field[thingname].text & " (" & signed(field[abValue2].value) & " To Hit, " & signed(field[abValue].value) & " AC)"]]></eval>
    </thing>
Charender is offline   #1 Reply With Quote
chiefweasel
Senior Member
 
Join Date: Aug 2008
Location: Miamisburg, OH
Posts: 1,322

Old September 1st, 2011, 05:41 PM
Did you indicate to "replaces ID" on the right side of the screen?

Web site - Cheese Weasel Logistics - www.cheeseweasel.net
Twitter - @CheeseWeaselGMZ
For user created content check out www.d20pfsrd.com and www.cheeseweasel.net
For video demos of Hero Lab go to http://www.youtube.com/user/TheChiefweasel?blend=9&ob=5
chiefweasel is offline   #2 Reply With Quote
ShadowChemosh
Senior Member
Volunteer Data File Contributor
 
Join Date: Jan 2010
Location: Chicago, IL (USA)
Posts: 10,729

Old September 2nd, 2011, 01:19 PM
I put your xml in a test file and it is currently working just fine. As the conditions are bootstrapped to the hero to get it to work you have to do a complete re-load of pathfinder. You can do this by either restarting HL or by doing Ctrl-R. If Ctrl-R does not work go to Develop->Enable Data File Debugging.

My advice for future changes that include bootstrapping conditionally I would always do a re-load before testing.

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   #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 07:50 AM.


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