Senior Member
Join Date: May 2013
Posts: 240
|
Okay, I'm working on making the exception for NPCs, and I'm confused as !@##.
I've moved the rules to to the House Rules section, thus: Code:
<source id="WiSParent" name="World is Square" parent="HouseRules" selectable="no" sortorder="0" description="Rules for eliminating feat taxes, as proposed by Michael Iantorno. Hero Lab implementation by Will Martin."> </source> <source id="WiSRules" name="Eliminate feat taxes" parent="WiSParent" description="Grants assorted bonus feats to characters, and combines others."> </source> <source id="WiSNPCTax" name="NPCs pay normal feat taxes" parent="WiSParent" description="NPC characters must purchase feats like Power Attack normally."> </source> house-rules-sc.png I also added a custom tag, "WiSRules.PayFeatTax" in the .1st file. So far so good. I added a Mechanics rule that tests for these things, and tag NPC heros as having to pay the tax: Code:
doneif (hero.tagis[source.WiSRules] = 0) doneif (hero.tagis[source.WiSNPCTax] = 0) if (hero.tagis[CharType.typNPC] <> 0) then perform hero.assign[WiSRules.PayFeatTax] endif 1) If the whole source is disabled, it does nothing; 2) if the NPC tax is turned off, it does nothing; 3) if both are turned on, it tags NPCs, and NPCs only with WiSRules.PayFeatTax. Here's where things break down. I went to the mechanic for bootstrapping Combat Expertise, and put in two tests: Code:
doneif (hero.tagis[source.WiSRules] = 0) ~ We're an NPC, and subject to feat taxes, so we're done doneif (hero.tagis[WiSRules.PayFeatTax] <> 1) So I put in some debug statements: Code:
debug "Is the source turned on? " & hero.tagis[source.WiSRules] debug "Is this a taxed NPC? " & hero.tagis[WiSRules.PayFeatTax] Disabling the source entirely appears to work normally. I can turn off the whole rule set, and nobody gets anything they shouldn't. But trying to tax NPCs has no effect. I tried flipping the polarity a few times -- compare against 0 rather than 1 in the check for WiSRules.PayFeatTax. This had no effect. Finally, in desperation, I tried this: Code:
doneif (hero.tagis[source.WiSRules] = 0) ~ We're an NPC, and subject to feat taxes, so we're done doneif (hero.tagis[WiSRules.PayFeatTax] <> 0) done Meanwhile, Weapon Finesse and Point Blank Shot appear to be working correctly with the exact same code. PCs always get them; NPCs get them until you check the box to tax NPCs, and then they stop getting them. I don't understand. What's different? Why does it work in some places but not in others? I have no idea what's going on, but after beating my head against this for three hours, I'm calling it quits for the night. I've attached update .user and .1st files -- the .1st is renamed .txt, as before. |
#21 |
Senior Member
Join Date: Nov 2013
Location: Andover, Ma
Posts: 632
|
Try and use
doneif (hero.tagis[CharType.typNPC] <> 0) Code:
doneif (hero.tagis[source.WiSRules] = 0) ~ We're an NPC, and subject to feat taxes, so we're done doneif (hero.tagis[WiSRules.PayFeatTax] <> 0) done |
#22 |
Senior Member
Lone Wolf Staff
Join Date: May 2005
Posts: 13,217
|
You haven't shown the bootstrap for combat expertise - what does its bootstrap condition look like?
What comes after the "done" line you're adding? What's in the rest of that script that "done" is intended to stop from happening? Just to make sure you understand - done only applies to the current script. It does not stop the execution of any other scripts. |
#23 |
Senior Member
Join Date: May 2013
Posts: 240
|
Wait, you mean the bootstrap isn't prevented by terminating the script? No wonder! I thought that killing the script would effectively disable the entire thing.
The bit after the "done" does this: 1) Assigns Helper.skipprereq to the feat so it won't trigger warnings on heroes who lack the ability score pre-req; 2) Disables and hides the feat if the hero doesn't have a +1 BAB. That's it. So all I need to do now is figure out 1) how to make the bootstrap conditional rather than just this script, and 2) figure out why Point-Blank Shot and Weapon Finesse appear to be working already. Ugh. I still have so much to learn. This learning curve feels pretty steep compared to some other languages. |
#24 |
Senior Member
Volunteer Data File Contributor
Join Date: Jan 2010
Location: Chicago, IL (USA)
Posts: 10,729
|
Man wouldn't it be cool if this stuff was documented. Like in a "Editor and Scripting article" written by Mathias? Wow that would be sweet! Especially if one of the articles covered bootstrap condition logic.
Sorry couldn't help myself. 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. |
#25 |
Senior Member
Join Date: May 2013
Posts: 240
|
It'd be even nicer if all the documentation were in one place, instead of scattered across the help file, the authoring kit wiki, and assorted forum posts. Half the battle is figuring out where to look for the relevant docs. A lot of the time I wind up hitting Google with searches limited to the forum, like "conditional preclude site:forums.wolflair.com" for example. |
#26 |
Senior Member
Volunteer Data File Contributor
Join Date: Jan 2010
Location: Chicago, IL (USA)
Posts: 10,729
|
Quote:
Or put into the bottom of EVERY post I make. Look in my signature. It is a bit separated but why I did the FAQ long time ago. Put it in my signature. I really don't know a better way to do it but have a FAQ that links to all the different places to you can get information. Would it be nice to all be in one. But no one has the time to do that and the argument has happened a dozen times of "where" it should go. And often I answer people with: I would recommend reading the Glossary of Terms for the Editor. Then check out FAQ#2 for all the places to learn about the editor including YouTube videos. 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. |
|
#27 |
Senior Member
Join Date: May 2013
Posts: 240
|
Yes, Shadow, I'm well aware of your efforts, and have used them. I'm not trying to criticize.
I have read the documentation. Honestly! But reading isn't necessarily the same thing as understanding. At least twice now, I've figured out that the answer to a problem I was having was staring me right in the face, but I hadn't understood it because the explanation hinged on a piece of information from elsewhere in the documentation that I had missed earlier. It's just a complicated system. It will take some time to get familiar and comfortable with the conventions of the language and the data model. In the meantime I am likely to continue making newbie errors, even after I have consulted the documentation (which I do!), because despite the community's best efforts, it's not always easy to find what I want to know. It will take time. Frustration and ineffective flailing are all part of the learning process. I don't know about you, but I learn a heck of a lot more from screwing something up and then fixing it than I do from getting it right the first time. Failure is a better teacher than success. So ... just bear with me. I'll try not to be too annoying. |
#28 |
Senior Member
Volunteer Data File Contributor
Join Date: Jan 2010
Location: Chicago, IL (USA)
Posts: 10,729
|
Quote:
Quote:
On the serious side I have heard a dozen times people talk about making a wiki or "something" all in one place documentation. Each time the talk pudders out as the "scope" of such a project is realized. Quote:
Trust me I get frustrated reading the Wiki myself as I read something and the use of "new" words LW invented (yes Rob has explained why) still causes confusion. Quote:
I was trying to joke and I need to remember it does not work in text... Personally I think you are picking this stuff up very quickly actually. You have done allot already in a short time. You should be very proud of yourself for that. There is allot of fumbling here but when it comes together its so much fun! P.S. - Honestly in person I make a allot of jokes actually but it comes out better in person... 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. Last edited by ShadowChemosh; May 4th, 2016 at 01:46 PM. |
||||
#29 |
Senior Member
Join Date: May 2013
Posts: 240
|
It's all good, Shadow. ^_^
And thank you. It has felt like I've been making progress, at times hard-won. Half the time I think it helps having a background with other programming languages; the other half of the time, I think it's just giving me false friends: Me: Where is the substring function? There's got to be a substring function. Everyone has a substring function! *waves hands in air to make point* ... 45 minutes of googling ... Me: Mid? It's called mid? ... why is it called 'mid'? O_O Okay fine, whatever, it's mid, now I can get on with my life. |
#30 |
|
|