• Please note: In an effort to ensure that all of our users feel welcome on our forums, we’ve updated our forum rules. You can review the updated rules here: http://forums.wolflair.com/showthread.php?t=5528.

    If a fellow Community member is not following the forum rules, please report the post by clicking the Report button (the red yield sign on the left) located on every post. This will notify the moderators directly. If you have any questions about these new rules, please contact support@wolflair.com.

    - The Lone Wolf Development Team

Auto-grant a feat for all characters?

Adam.Ormond

Well-known member
I want to implement a house rule that grants Weapon Finesse to all characters, but only if they actually qualify for the feat. I know I can add a data file to bootstrap it, like so:

Code:
<?xml version="1.0" encoding="ISO-8859-1"?>
<document signature="Hero Lab Structure">
	<bootstrap index="278" thing="fWepFin"/>
</document>

But this ignores the pre-reqs. Is there a more elegant solution?
 
You can use the Mechanics tab instead of hacking it into the program. All mechanics are added to all characters, so you can bootstrap the feat from the mechanic. That also allows you to add a source to the mechanic, so that this only applies to someone who wants to make use of this house rule.

I'm afraid you'll need to use a script to figure out whether the character qualifies for that feat. If they don't qualify, then find the feat you bootstrapped, and assign the following tags:

Helper.FtHide
Helper.FtDisable
thing.skipprereq

That will hide the feat and disable its effects, so it will act as if it were never added. There's currently a bug in weapon finesse, so the disabling will not currently do anything (it'll act as if its still there), but once I get a chance to fix that, this will allow you to grant Weapon Finesse only under certain circumstances.

In the meantime, you can use the source you added to the Mechanic to manually decide whether that specific character qualifies - if they don't, turn off the source.
 
I created a source ("adamHRules") and a Mechanic ("mechHRules") which bootstraps the fWepFin thing. That part works fine, and when I select it in the Configure Character dialog, characters are granted the feat.

However, regardless of whether the source is selected in the Configure Character dialog, I receive the following error when loading a portfolio:
Code:
Attempt to access non-live source pick 'mechHRules' from script
Location: 'eval' script for Component 'BaseRace' (Eval Script '#16') near line 23
Attempt to access non-live source pick 'mechHRules' from script
Location: 'eval' script for Component 'BaseRace' (Eval Script '#16') near line 6
What am I doing wrong?
 
Last edited:
Would you mind bumping this after Gen Con, please? I don't have enough time to study this right now.

A quick glance tells me the interaction is in the script that figures out whether a feat on the hero is one of those that will be suppressed when you click the "Customize?" checkbox for a race, but I can't see at a glance why it's a problem.
 
I was attempting to do something similar(add a mechanic that grats certain feats for free), and I ran into a similar error.

When I open the portfolio, I get a bunch of errors:
Attempt to access non-live pick via script fails for pick 'mHouseRu' from script
Location: 'eval' script for Component 'BaseRace' (Eval Script '#16') near line 23

mHouseRu is the name of my house rule mechanic.

The problem appears when I add my summoner to the portfolio. After that, I have to create a new portfolio and import all of my other characters to make it go away.
 
Last edited:
Yeah, I gave up hope on getting a fix. I'm back to 'hacking' the program -- the only way to do this that actually works without producing errors every time you open a portfolio.
 
I created a source ("adamHRules") and a Mechanic ("mechHRules") which bootstraps the fWepFin thing. That part works fine, and when I select it in the Configure Character dialog, characters are granted the feat.

However, regardless of whether the source is selected in the Configure Character dialog, I receive the following error when loading a portfolio:
Code:
Attempt to access non-live source pick 'mechHRules' from script
Location: 'eval' script for Component 'BaseRace' (Eval Script '#16') near line 23
Attempt to access non-live source pick 'mechHRules' from script
Location: 'eval' script for Component 'BaseRace' (Eval Script '#16') near line 6
What am I doing wrong?
I just did exactly what you have listed above and it works fine for me. The fWepFin only appears when I check mark adamHRules. It goes away when off. I added classes, races, skills, and spells with no error showing.

So either of you post your full XML or the full .user file maybe? As there must be something else you have that is interfering or causing the issue.

Here is the XML I used in testing:
Code:
  <thing id="mechHRules" name="Test1" compset="Mechanics">
    <usesource source="adamHRules" parent="UserParent" name="adamHRules"/>
    <bootstrap thing="fWepFin"></bootstrap>
    </thing>
 
Interesting -- so if you create a new Portfolio with the source added, save it, and re-open, the error does not occur.

If you take an existing portfolio, add the source, save it, and then re-open, I receive the error. I can click through the error, and everything looks okay superficially -- I haven't investigated that deeply.

Below is my .user file. I have more defined than just the fWepFin bootstrap, but if I take that out, the problem goes away entirely.
Code:
<?xml version="1.0" encoding="ISO-8859-1"?>
<document signature="Hero Lab Data">
  <thing id="mechHRules" name="Adam&apos;s House Rules" description="Adding this mechanic implements the following house rules:\n\n  - All characters are granted the Weapon Finesse feat\n  - Causes the Leadership feat to flag as an error" compset="Mechanics" summary="House Rules for Adam&apos;s Pathfinder Games">
    <usesource source="adamHRules" parent="UserParent" name="Adam&apos;s House Rules"/>
    <bootstrap thing="fWepFin"></bootstrap>
    <pickreq thing="fLeader" ispreclude="yes" ispanelhighlight="no"/>
    </thing>
  <thing id="cOraFireSt" name="Firestarter" description="You find your powers manifest themselves uncontrollably during times of stress or unease. During combat, all adjacent squares are affected by Spark (DC = 10 + 1/2 CL + CHA modifier). Objects held by the Oracle are automatically affected. Add Spark to your list of spells known. At 3rd level, add Burning Disarm and Produce Flame to your list of spells known. At 5th level, add Produce Flame to your list of spells known.  At 10th level add Flame Strike to your list of spells known. At 15th level add Fire Storm to your list of spells known." compset="CustomSpec" summary="You find your powers manifest themselves uncontrollably during times of stress or unease." uniqueness="unique">
    <tag group="SpecSource" tag="cHelpOra" name="Oracle" abbrev="Oracle"/>
    <tag group="SpecType" tag="Weakness" name="Weakness" abbrev="Weakness"/>
    <tag group="Helper" tag="Secondary" name="Secondary" abbrev="Secondary"/>
    <tag group="User" tag="Activation"/>
    <bootstrap thing="spProdFla1">
      <containerreq phase="First" priority="500"><![CDATA[count:Classes.Oracle + count:Classes.RageProph + (count:Classes.? - count:Classes.Oracle - count:Classes.RageProph)/2 >= 3]]></containerreq>
      <autotag group="SpellType" tag="cHelpOra"/>
      </bootstrap>
    <bootstrap thing="spSpark0">
      <containerreq phase="First" priority="500"><![CDATA[count:Classes.Oracle + count:Classes.RageProph + (count:Classes.? - count:Classes.Oracle - count:Classes.RageProph)/2 >= 1]]></containerreq>
      <autotag group="SpellType" tag="cHelpOra"/>
      </bootstrap>
    <bootstrap thing="spFlamSph2">
      <containerreq phase="First" priority="500"><![CDATA[count:Classes.Oracle + count:Classes.RageProph + (count:Classes.? - count:Classes.Oracle - count:Classes.RageProph)/2 >= 5]]></containerreq>
      <autotag group="SpellType" tag="cHelpOra"/>
      </bootstrap>
    <bootstrap thing="spFlamStr5">
      <containerreq phase="First" priority="50"><![CDATA[count:Classes.Oracle + count:Classes.RageProph + (count:Classes.? - count:Classes.Oracle - count:Classes.RageProph)/2 >= 10]]></containerreq>
      <autotag group="SpellType" tag="cHelpOra"/>
      </bootstrap>
    <bootstrap thing="spBurnDis1">
      <containerreq phase="First" priority="500"><![CDATA[count:Classes.Oracle + count:Classes.RageProph + (count:Classes.? - count:Classes.Oracle - count:Classes.RageProph)/2 >= 3]]></containerreq>
      <autotag group="SpellType" tag="cHelpOra"/>
      </bootstrap>
    <bootstrap thing="spFireSto7">
      <containerreq phase="First" priority="500"><![CDATA[count:Classes.Oracle + count:Classes.RageProph + (count:Classes.? - count:Classes.Oracle - count:Classes.RageProph)/2 >= 15]]></containerreq>
      <autotag group="SpellType" tag="cHelpOra"/>
      </bootstrap>
    </thing>
  </document>
 
Last edited:
If you dirty and save the portfolio after clicking through the error, do you get it the next time you open that portfolio?
 
Yeah, still get it:

Opened a level 5 character, added the source, verified he received the weapon finesse feat, saved, closed.
Re-opened - received error. Changed hitpoints for level 5, re-saved
Re-opened - received error
 
If you dirty and save the portfolio after clicking through the error, do you get it the next time you open that portfolio?

I noticed that I get the error for some mechanics, and not others, so I started playing around with my mechanic rules. I removed the source dependancy on my mechanics and the problem went away.

So I changed my house rules to look like this. Basically, I removed the source dependancy on the mechanic, made the bootstraps conditional on the houserule being present, and put a doneif at the beginning of the eval scripts to do nothing if my houserules are not selected.

Code:
<thing id="mHouseRu1" name="House Rule One" description="Weapon Finesse and Agile Manuvers are free, but hide them if strength mod is better than dex mod" compset="Mechanics">
    <bootstrap thing="fWepFin">
      <containerreq phase="First" priority="100">source.srcHouseRH</containerreq>
      </bootstrap>
    <bootstrap thing="fAgileMan">
      <containerreq phase="First" priority="100">source.srcHouseRH</containerreq>
      </bootstrap>
    <eval phase="UserFinal" index="5"><![CDATA[       doneif (hero.tagcount[source.srcHouseRH] = 0)

        ~ if dexterity < strength, hide Agile Manuvers and Weapon Finesse        
        ~debug "dex mod = " & #attrmod[aDEX] & " str mod = " & #attrmod[aSTR]
        
        if (#attrmod[aDEX] <= #attrmod[aSTR]) then
            ~debug "dex less than strength"
            if (#hasfeat[fWepFin] <> 0) then
                ~debug "Hiding Weapon Finesse"
                perform hero.child[fWepFin].assign[Helper.FtHide]
            endif
            if (#hasfeat[fAgileMan] <> 0) then
                ~debug "Hiding Agile Manuvers"
                perform hero.child[fAgileMan].assign[Helper.FtHide]
            endif
        endif]]></eval>
    </thing>

and the problem seems to have gone away.
 
Last edited:
Have you tried to remove the source in the xml file?

I ran into a similar problem the other night. i was testing a new skill and created a seperate file for it. i added it to a .por then deleted it. I then recompiled HL, even shut it down and reopened it. But the new skill was still showing up. i had to physically remove it from the directory before the delete from the editor would actually occur.
 
Have you tried to remove the source in the xml file?

I ran into a similar problem the other night. i was testing a new skill and created a seperate file for it. i added it to a .por then deleted it. I then recompiled HL, even shut it down and reopened it. But the new skill was still showing up. i had to physically remove it from the directory before the delete from the editor would actually occur.

It is not the source that is the problem. I have added and removed sources with no problems. The problem seems to result from having a mechanic that is dependant on the source. It is acting like something in base race is trying to include the mechanic even though it is flagged as unavailable due to source. If I make the mechanic's availability not dependant on source, the problem goes away.

If I make the mechanic not dependant on source, and make my bootstraps and scripts conditional on source, I get the same effect without the errors.
 
Back
Top