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
Mediator9292
Member
 
Join Date: Apr 2018
Location: New York
Posts: 45

Old October 30th, 2023, 07:20 PM
I'm trying to build an intelligent magic item that utilizes Influence similar to the Medium to unlock stronger abilities (tempting the user to give up more and more control). Most everything is going well, but I can't quite figure out how the syntax is supposed to work in the Condition's Tag Expression (where it says, "Edit Container Requirement Expression").
I'm utilizing First Phase and Priority 400, in case it matters, but the timing is on par with similar triggers like in Scaling Items.

Here is what I have drafted for the Tag Expressions. Ideally, different weapon properties and item spells will unlock at higher Influence levels, but for some reason, (field[actUser].value >= # doesn't cut it.
Code:
(fieldval:gIsEquip <> 0) & (field[actUser].value >= 9)
Any suggestions? Am I missing something obvious?
Mediator9292 is offline   #1 Reply With Quote
Mathias
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 13,213

Old October 31st, 2023, 08:03 AM
That looks fine. I have a thought on this - is this a common property, like a DR, an energy resistance, a speed, SR, something like one of those? Or is this something new - a unique ability you've created? The bootstrapping method probably isn't best if this is one of the common properties - for those, since all of those picks are already on the hero, regardless of whether this item is turned on or not, just use a script to check actUser, and apply a value to that property if actUser is high enough.
Mathias is offline   #2 Reply With Quote
Mediator9292
Member
 
Join Date: Apr 2018
Location: New York
Posts: 45

Old October 31st, 2023, 08:16 PM
Quote:
Originally Posted by Mathias View Post
That looks fine. I have a thought on this - is this a common property, like a DR, an energy resistance, a speed, SR, something like one of those? Or is this something new - a unique ability you've created? The bootstrapping method probably isn't best if this is one of the common properties - for those, since all of those picks are already on the hero, regardless of whether this item is turned on or not, just use a script to check actUser, and apply a value to that property if actUser is high enough.
I'm trying to get it to apply things like iKeen, iHoly, iBane at different levels of Influence, as well as unlock item spells like Mirror Image and Mirror Strike. Do those count as common properties?

I also have several effects running in various eval scripts that do things like reducing caster level or adding enhancement bonuses to the weapon and even unlocking an Inspired Rage effect that can be activated, but if there's a simple way to just 'unlock' these weapon properties and item spells at different Influence levels without resorting to several more eval scripts, I'd much prefer that if possible. I just can't figure out how to fix the syntax error that keeps popping up whenever I try to use field[actUser].value >= # specifically in the Tag Expression.

Last edited by Mediator9292; October 31st, 2023 at 08:19 PM. Reason: just emphasizing the location of the error
Mediator9292 is offline   #3 Reply With Quote
Mathias
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 13,213

Old November 1st, 2023, 08:03 AM
No, item powers and spells are all non-unique things.


If there's a syntax error, then please copy and paste it - in Hero Lab, you can right-click pop-up messages to copy the text. I thought I was debugging a thing where everything compiled and ran, but didn't work - if there's an error message, then the source is most likely a typo, so hopefully the error message includes exactly what you wrote for your condition.
Mathias is offline   #4 Reply With Quote
Sendric
Senior Member
 
Join Date: Jul 2010
Posts: 3,147

Old November 1st, 2023, 11:38 AM
Quote:
Originally Posted by Mediator9292 View Post
Code:
(fieldval:gIsEquip <> 0) & (field[actUser].value >= 9)
Shouldn't this be:

Code:
(fieldval:gIsEquip <> 0) & (fieldval:actUser >= 9)
Sendric is offline   #5 Reply With Quote
Mediator9292
Member
 
Join Date: Apr 2018
Location: New York
Posts: 45

Old November 1st, 2023, 12:49 PM
Quote:
Originally Posted by Sendric View Post
Shouldn't this be:

Code:
(fieldval:gIsEquip <> 0) & (fieldval:actUser >= 9)
THAT WORKED! For the Item Spells, anyway - thank you Sendric!

Now the difficulty is getting it to work for the weapon powers. I tried using it for iBane, iHoly, iKeen, and got the following error:

Quote:
Hero Lab was forced to stop compilation after the following errors were detected:

Thing 'iGoldnsong' - Conditional bootstrap is not allowed with value assignment on 'user' field 'iCustSpec'
One or more timing errors were identified. Please review the timing report and correct the errors. You can access the report under the 'Develop' menu or by clicking this link.
I'm honestly not even sure where to start with the timing report - it seems to display comments about every single aspect of the file I'm working with (it has several dozen custom components so that my players only need to check 1 box to get all of our homebrew content working).
Mediator9292 is offline   #6 Reply With Quote
Mathias
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 13,213

Old November 1st, 2023, 01:00 PM
Ignore the timing report line - once the other failure happened, the timing report failed to generate.

Hero Lab reports errors as it encounters them, so always start from the top when fixing things, because later errors may be cascades from the initial failure.
Mathias is offline   #7 Reply With Quote
Mathias
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 13,213

Old November 1st, 2023, 01:04 PM
So, let's see the full info on this bootstrap of iGoldnsong. So far, there's not enough information to know what's going wrong. I'd recommend opening the .user file in a text editor, and copying this particular item's code.
Mathias is offline   #8 Reply With Quote
Mediator9292
Member
 
Join Date: Apr 2018
Location: New York
Posts: 45

Old November 1st, 2023, 03:00 PM
Quote:
Originally Posted by Mathias View Post
So, let's see the full info on this bootstrap of iGoldnsong. So far, there's not enough information to know what's going wrong. I'd recommend opening the .user file in a text editor, and copying this particular item's code.
Code:
  <thing id="iGoldnsong" name="Goldensong" description="{b}Alignment{/b} CG; {b}Ego{/b} 20\n{b}Senses{/b} 30 ft.\n{b}Int{/b} 16, {b}Wis{/b} 12, {b}Cha{/b} 18 \n{b}Communication{/b} empathy, telepathy (with wielder)\n\nGoldensong is a {i}+1 greatsword{/i} that ostensibly carries the soul of the lost Linnorm Prince, Sven Goldensong. Due to the mysterious circumstances surrounding his binding, Goldensong is able to utilize some of his former abilities despite lacking a true body, and can aid its wielder even more - assuming they are willing to give up more and more control over their body. The wielder gains the {i}Possessed{i} Corruption, but can withstand up to 10 points of Influence instead of the normal 5 - though the amount of Influence decreases by 1 after a night’s rest instead of resetting completely. Each point of Influence adds +1 to Goldensong’s Ego, effectively increasing the Will save DC that the wielder must resist each morning to prevent losing temporary control to Goldensong.\n\n{i}Goldensong{/i} can cast {i}Mage Hand{i} at will, and {i}Unseen Servant{/i} three times per day. \nAt Influence level 1, Goldensong can cast {i}Mirror Strike{i} on the wielder on command 3/day. \nAt Influence Level 3, the same can be done with {i}Mirror Image{/i} 1/day, though half of the images generated this way tend to take on the former appearance of the Linnorm Prince himself. \nAt Influence Level 5, …\nAt Influence 7, Goldensong can expend 1 use of its daily Legendary Power to be able to speak or sing out loud for 1 minute. If it so desires, it can grant the wielder and all allies within earshot the benefits of the Skald&apos;s Inspired Rage ability, with an effective skald level of 9.\nAt Influence 9, …\n\nFor every 2 points of Influence the wielder yields to Goldensong, the weapon gains an additional +1 enhancement bonus (up to +5 at Influence 8). At Influence 10, …\n\nWhile made of spiresteel, {i}Goldensong{/i} is treated as if it was also made of cold iron for the purpose of penetrating damage reduction. While {i}Goldensong{/i} was forged as a greatsword and reverts to this shape when no one wields it, when held in the hand, the sword immediately transforms into the type of blade its owner is most proficient with (choosing from dagger, short sword, longsword, scimitar, falchion, greatsword, rapier, or katana).\n\nAlthough {i}Goldensong{/i} is chaotic good, as long as its wielder is dedicated to the defeat, however temporary, of Those Who Remain and those under their sway, the sword does not attempt to seize control of its wielder. If its wielder does go against its wishes, {i}Goldensong{/i} tries to force him to relinquish the blade to a more appropriate wielder. As with all holy weapons, {i}Goldensong{/i} imposes 1 negative level on any evil creature attempting to wield it. The negative level remains as long as the creature holds the weapon in its hand and disappears when the weapon is no longer wielded. A worshiper of any Outer God or Great Old One who wields {i}Goldensong{/i} takes 4 negative levels and is nauseated as long as these negative levels persist. The negative levels and any additional side effects cannot be overcome in any way (including by {i}restoration{/i} spells) while the weapon is wielded.\n\n{b}Destruction{/b}\n{i}Goldensong{/i} can be destroyed only if used to directly facilitate the destructive emergence or alignment of an Outer God." compset="MagicWep" summary="A powerful weapon against Those Who Remain.">
    <fieldval field="gWeight" value="5"/>
    <fieldval field="sbName" value="{i}Goldensong{/b}"/>
    <fieldval field="iCL" value="20"/>
    <fieldval field="actIncrNam" value="Influence"/>
    <fieldval field="actUserMin" value="0"/>
    <fieldval field="actUserMax" value="10"/>
    <fieldval field="actName" value="Inspired Rage (1 Legendary Power, 8 rds)"/>
    <fieldval field="BonEnhance" value="1"/>
    <arrayval field="usrArray" index="6" value="Scimitar"/>
    <arrayval field="usrArray" index="7" value="Short sword"/>
    <arrayval field="usrArray" index="0" value="Bastard sword"/>
    <arrayval field="usrArray" index="1" value="Dagger"/>
    <arrayval field="usrArray" index="2" value="Flachion"/>
    <arrayval field="usrArray" index="3" value="Greatsword"/>
    <arrayval field="usrArray" index="4" value="Longsword"/>
    <arrayval field="usrArray" index="5" value="Rapier"/>
    <usesource source="Alastair2018"/>
    <usesource source="PathCurse" parent="PathAdvent" name="Curse of the Crimson Throne"/>
    <usesource source="CSArtifLeg" parent="CSHeader" name="Artifacts &amp; Legends"/>
    <tag group="iSchool" tag="Universal" name="Universal" abbrev="Universal"/>
    <tag group="Helper" tag="LegendItem" name="Legendary Item" abbrev="Legendary Item"/>
    <tag group="User" tag="Activation" name="Activation" abbrev="Activation"/>
    <tag group="Helper" tag="ActivMenu" name="ActivMenu" abbrev="ActivMenu"/>
    <tag group="Helper" tag="NoPathSoc" name="Not Allowed for Pathfinder Society Characters" abbrev="Not Allowed for Pathfinder Society Characters"/>
    <tag group="Helper" tag="Proficient" name="Proficient" abbrev="Proficient"/>
    <tag group="User" tag="NoAutoName" name="NoAutoName" abbrev="NoAutoName"/>
    <tag group="Helper" tag="UserAdjust"/>
    <tag group="Helper" tag="ArtiMajor" name="Artifact (Major)" abbrev="Artifact"/>
    <tag group="Helper" tag="NoOutGear" name="NoOutGear" abbrev="NoOutGear"/>
    <bootstrap thing="spMageHan0">
      <autotag group="Helper" tag="ItemSpell"/>
      <autotag group="Usage" tag="AtWill"/>
      </bootstrap>
    <bootstrap thing="spUnseSer1">
      <autotag group="Helper" tag="ItemSpell"/>
      <autotag group="Usage" tag="Day"/>
      <autotag group="Activated" tag="iGoldnsong"/>
      <autotag group="Helper" tag="StaffSpell"/>
      <assignval field="trkMax" value="3"/>
      </bootstrap>
    <bootstrap thing="spMirrStr1">
      <containerreq phase="First" priority="400"><![CDATA[(fieldval:gIsEquip <> 0) & (fieldval:actUser >= 1)]]></containerreq>
      <autotag group="Usage" tag="Day"/>
      <autotag group="Helper" tag="ItemSpell"/>
      <autotag group="Activated" tag="iGoldnsong"/>
      <autotag group="Helper" tag="StaffSpell"/>
      <assignval field="trkMax" value="3"/>
      </bootstrap>
    <bootstrap thing="spMirrIma2">
      <containerreq phase="First" priority="400"><![CDATA[(fieldval:gIsEquip <> 0) & (fieldval:actUser >= 3)]]></containerreq>
      <autotag group="Usage" tag="Day"/>
      <autotag group="Activated" tag="iGoldnsong"/>
      <autotag group="Helper" tag="StaffSpell"/>
      <autotag group="Helper" tag="ItemSpell"/>
      <assignval field="trkMax" value="1"/>
      </bootstrap>
    <bootstrap thing="corPossess"></bootstrap>
    <eval phase="First" priority="700" index="5"><![CDATA[~If Influence is not 7, disable Inspired Rage ability
  if (field[actUser].value < 7) then
  perform assign[Helper.ChgDisab1]
  endif

      ~Inspired Rage bonuses
      if (field[abilActive].value <> 0) then
          #applybonus[BonMorale, hero.child[aSTR], 4]
          #applybonus[BonMorale, hero.child[aCON], 4]
          #applybonus[BonMorale, hero.child[svWill], 3]
        endif]]></eval>
    <eval phase="PostAttr" priority="25000" index="2"><![CDATA[      var searchexpr as string
      ~ Create our Activated tag with our Unique ID
      searchexpr = tagids[Activated.?,"|"]

      ~ Loop through all the spells with this weapons activated
      ~ identity tag.
      foreach pick in hero from BaseSpell where searchexpr
        eachpick.field[sDCAttr].value += #attrmod[aCHA]
      nexteach]]></eval>
    <eval phase="PostAttr" priority="5000" index="6" name="Influence Bonuses"><![CDATA[~Enhancement bonus increase at every even Influence Level
  if (field[actUser].value >= 8) then
        field[BonEnhance].value += 4
  elseif (field[actUser].value >= 6) then
        field[BonEnhance].value += 3
  elseif (field[actUser].value >= 4) then
        field[BonEnhance].value += 2
  elseif (field[actUser].value >= 2) then
        field[BonEnhance].value += 1
  endif

~Weapon Properties at every odd Influence Level
~Flying property ipFlying
~Holy iHoly
~Bane 
~Keen iKeen]]></eval>
    <eval phase="PostLevel" priority="10000" index="3">~ Our first field stores the Influence bonus.
      field[abValue].value -= field[actUser].value

      var influence as number
      influence = field[actUser].value - 1

      field[abValue2].value -= round(influence/2, 0, 1)
      <after name="Influence Bonus sets abValue"/>
      </eval>
    <eval phase="PostAttr" priority="10000" index="4" name="Influence Helper Applies Influence Penalties">doneif (tagis[Helper.SpcDisable] &lt;&gt; 0)

      doneif (field[actUser].value &lt; 1)

      perform hero.childfound[abHelpInPe].assign[Helper.ShowStatbl]

      ~ When Goldensong gains at least 1 points of influence over the wielder, the dual impulses housed within the same body cause the wielder to meld with Goldensong’s consciousness. The resulting muddled sense of self and struggle for control causes the wielder to take a –2 penalty on initiative checks as well as a specific additional penalty listed in each spirit’s entry. However, Goldensong’s mental presence grants the wielder a +4 bonus against possession effects and a +2 bonus on saving throws against mind-affecting effects that are not related to possession.
      hero.childfound[Initiative].field[Penalty].value -= 2
      #situational[hero.childfound[svAll],&quot;+2 bonus vs. mind-affecting or +4 if possession&quot;,&quot;Influence Effects&quot;]

      ~ You take a penalty equal to your Influence bonus on Intelligence checks and Intelligence-based skill checks, and to your caster level (to a minimum of caster level 0); as usual, a reduced caster level may render you unable to cast spells. You can’t benefit from effects that increase your caster level.
      #situational[hero.childfound[aINT], signed(field[abValue].value) &amp; &quot; penalty on ability checks&quot;, &quot;Fated Champion Influence Penalty&quot;]

      ~ If initiative has been changed to be a Int check then we add a penalty to that as well.
      if (hero.childfound[Initiative].tagis[UseAttr.aINT] &lt;&gt; 0) then
        hero.childfound[Initiative].field[Penalty].value += field[abValue].value
        endif

      foreach pick in hero from BaseSkill where &quot;SkillAbil.aINT&quot;
        eachpick.field[Penalty].value += field[abValue].value
        nexteach

      foreach pick in hero from BaseClHelp
        eachpick.field[cMagicLev].value += field[abValue].value
        nexteach</eval>
    <child entity="wSpecMagic">
      <bootstrap thing="wKatana">
        <containerreq phase="First" priority="450">fieldval:usrIndex = 0</containerreq>
        </bootstrap>
      <bootstrap thing="iHoly"></bootstrap>
      <bootstrap thing="mSpiresteel"></bootstrap>
      <bootstrap thing="eColdIron"></bootstrap>
      <bootstrap thing="wDagger">
        <containerreq phase="First" priority="450">fieldval:usrIndex = 1</containerreq>
        </bootstrap>
      <bootstrap thing="wFalchion">
        <containerreq phase="First" priority="450">fieldval:usrIndex = 2</containerreq>
        </bootstrap>
      <bootstrap thing="wGreatswd">
        <containerreq phase="First" priority="450">fieldval:usrIndex = 3</containerreq>
        </bootstrap>
      <bootstrap thing="wLongsword">
        <containerreq phase="First" priority="450">fieldval:usrIndex = 4</containerreq>
        </bootstrap>
      <bootstrap thing="wRapier">
        <containerreq phase="First" priority="450">fieldval:usrIndex = 5</containerreq>
        </bootstrap>
      <bootstrap thing="wScimitar">
        <containerreq phase="First" priority="450">fieldval:usrIndex = 6</containerreq>
        </bootstrap>
      <bootstrap thing="wShortswd">
        <containerreq phase="First" priority="450">fieldval:usrIndex = 7</containerreq>
        </bootstrap>
      <bootstrap thing="iKeen"></bootstrap>
      <bootstrap thing="laIntellig"></bootstrap>
      <bootstrap thing="iBane">
        <assignval field="iCustSpec" value="Those Who Remain"/>
        </bootstrap>
      <bootstrap thing="LegItemHlp"></bootstrap>
      </child>
    </thing>
I really do appreciate the help, Mathias! I know there's a lot going on, sorry - I just really liked the Champion Spirit's penalty to caster level and int-checks, though I may end up tweaking it to fit the spirit in question (a former PC whose spirit was last seen in Spire's Edge).
Mediator9292 is offline   #9 Reply With Quote
Mathias
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 13,213

Old November 1st, 2023, 03:12 PM
<assignval field="iCustSpec" value="Those Who Remain"/>

This is the offending line (I think - I suspect this is a compiling version of your code, not the bugged version with a condition added) - iCustSpec is a user field. You may not set those in a bootstrap if your bootstrap has a condition, so you'll need to add a trusted script to set that text on the pick, under the same conditions that let the power be live.

However, that's not really safe - what if your user starts touching that field's text? Making scripts trusted should always be a last resort.

I'd make a special, non-purchasable version of the Bane power that is "Bane (Those Who Remain)", where that text is just a permanent addition, and the power doesn't ask the user to customize it, and add that instead.
Mathias is offline   #10 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:44 AM.


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