Lone Wolf Development Forums  

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

Notices

Reply
 
Thread Tools Display Modes
Dragon5e
Member
 
Join Date: May 2021
Location: San Angelo
Posts: 35

Old April 12th, 2023, 12:38 PM
The starting adjustment was the Initiator level adjustment from Path of War. When I tried to modify it I ran onto serious problem. Took me a week to figure how that code actually worked. This snippet won't work for a practiced initiator trait.

field[usrChosen1].chosen.field[cIL].value = maximum[field[usrChosen1].chosen.field[cIL].value +2 , #totallevelcount[])

There's 2 reasons. One is the timing at Post level 9. The bonus need to be added here at this time but you cannot pull the cIL value until past 9 when the value get calculated. That rendered the above code moot.

I rewrote the code to include a class so I could run a levelcount on it. With that I could calculate what the cIL need to be for a bonus to be added. I also eliminated the need to pull cIL which means I rewrote the bonus as a addition not a replacement. This mean you need a pick on hero to choose the maneuver and class to work properly.

<thing id="trPracInit1" name="Practiced Initator - Need maneuvers and Class listed" description="Benefit: – Pick an initiating class—your initiator level in that class gains a +2 trait bonus as long as this bonus does not raise your initiator level above your current Hit Dice." compset="Trait" uniqueness="useronce">
<fieldval field="usrCandid1" value="component.PWManList"/>
<tag group="trCategory" tag="PracInit" name="Practiced Initator"/>
<tag group="ChooseSrc1" tag="Hero"/>
<tag group="ChooseSrc2" tag="Hero"/>
<tag group="Helper" tag="ShowSpec"/>
<tag group="fShowWhat2" tag="Classes"/>
<eval phase="PostLevel" priority="9"><![CDATA[
~ Do nothing if not activated, or if either selection not made &

doneif (field[usrChosen1].ischosen = 0)

perform field[usrChosen2].chosen.setfocus
var initLvl as number
doneif (state.isfocus = 0)
initLvl = #totallevelcount[] -focus.field[cTotalLev].value
initLvl += round(initLvl/2,0,-1)
initLvl = maximum(focus.field[cTotalLev].value, initLvl)
field[livename].text &= "cIL " & initLvl

field[usrChosen1].chosen.field[cIL].value += minimum(2, #totallevelcount[] -initLvl)
field[livename].text &= " Practiced Initiator " & " Bonus " & field[usrChosen1].chosen.field[cIL].value]]></eval>
</thing>
<thing id="pPracInit" name="Practiced Initiator" description="Benefit: – Pick an initiating class—your initiator level in that class gains a +2 trait bonus as long as this bonus does not raise your initiator level above your current Hit Dice." compset="InPlay">
<fieldval field="pCandExpr" value="component.PWManList"/>
<fieldval field="pUsePicks2" value="1"/>
<usesource source="srcPathOfW" parent="pPathOfWar" name="DSP - Path of War"/>
<tag group="ProductId" tag="HLCommunit" name="Hero Lab Community" abbrev="Hero Lab Community"/>
<tag group="Adjustment" tag="S2Custom" name="Custom Menu" abbrev="Custom Menu"/>
<tag group="ChooseSrc1" tag="Thing" name="All Things" abbrev="All Things"/>
<tag group="Helper" tag="NoIncr"/>
<tag group="Adjust2nd" tag="Class"/>
<tag group="OthAdjCat" tag="UserTop5th" name="User 5th Top Group" abbrev="User 5th Top Group"/>
<eval phase="PostLevel" priority="9"><![CDATA[
~ Do nothing if not activated, or if either selection not made &
doneif (field[pIsOn].value = 0)
doneif (field[pChosen].ischosen = 0)
perform field[pChosen2].chosen.setfocus
var initLvl as number
doneif (state.isfocus = 0)
initLvl = #totallevelcount[] -focus.field[cTotalLev].value
initLvl += round(initLvl/2,0,-1)
initLvl = maximum(focus.field[cTotalLev].value, initLvl)
field[livename].text &= "cIL " & initLvl

field[pChosen].chosen.field[cIL].value += minimum(2, #totallevelcount[] -initLvl)
field[livename].text &= "Practiced Initiator " & " Bonus " & field[pChosen].chosen.field[cIL].value]]>
<before name="PoW Calc IL"/>
</eval>
</thing>
Attached Files
File Type: txt pracinit.txt (3.0 KB, 0 views)
Dragon5e is offline   #1 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:24 PM.


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