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
wdmartin
Senior Member
 
Join Date: May 2013
Posts: 240

Old May 3rd, 2016, 10:48 PM
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>
That correctly makes them show up like this:

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
That runs at Pre-Levels 100, and appears to work correctly. That is:

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)
But my test characters kept getting Combat Expertise. PCs get it; NPCs get it. NPCs still get it if I check the box to tax them.

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]
This tells me that the checkboxes from the hero configuration screen are working correctly; if they are checked, these test both return 1. If they are unchecked, both return 0.

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
Note the last line: a plain, unqualified done, which is supposed to immediately terminate script execution ... and doesn't. The script hits that "done" and continues running, so everybody continues getting Combat Expertise.

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.
Attached Files
File Type: txt world-is-square.txt (4.8 KB, 11 views)
File Type: email world-is-square.user (35.8 KB, 5 views)
wdmartin is offline   #21 Reply With Quote
TobyFox2002
Senior Member
 
Join Date: Nov 2013
Location: Andover, Ma
Posts: 632

Old May 4th, 2016, 12:55 AM
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
It is not the same method, setting up a tag, but does work. From what I saw from my tests, the WiSRules.PayFeatTax tag is applied from either source being selected. So as long as one is selected the answer will always be the true.
TobyFox2002 is offline   #22 Reply With Quote
Mathias
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 13,217

Old May 4th, 2016, 08:57 AM
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.
Mathias is offline   #23 Reply With Quote
wdmartin
Senior Member
 
Join Date: May 2013
Posts: 240

Old May 4th, 2016, 09:41 AM
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.
wdmartin is offline   #24 Reply With Quote
ShadowChemosh
Senior Member
Volunteer Data File Contributor
 
Join Date: Jan 2010
Location: Chicago, IL (USA)
Posts: 10,729

Old May 4th, 2016, 09:50 AM
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.
ShadowChemosh is offline   #25 Reply With Quote
wdmartin
Senior Member
 
Join Date: May 2013
Posts: 240

Old May 4th, 2016, 10:00 AM


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.
wdmartin is offline   #26 Reply With Quote
ShadowChemosh
Senior Member
Volunteer Data File Contributor
 
Join Date: Jan 2010
Location: Chicago, IL (USA)
Posts: 10,729

Old May 4th, 2016, 11:17 AM
Quote:
Originally Posted by wdmartin View Post


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.
Wow so like a FAQ that combines all locations into one. Damn some one should have thought of that.

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.
ShadowChemosh is offline   #27 Reply With Quote
wdmartin
Senior Member
 
Join Date: May 2013
Posts: 240

Old May 4th, 2016, 12:50 PM
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.
wdmartin is offline   #28 Reply With Quote
ShadowChemosh
Senior Member
Volunteer Data File Contributor
 
Join Date: Jan 2010
Location: Chicago, IL (USA)
Posts: 10,729

Old May 4th, 2016, 01:43 PM
Quote:
Originally Posted by wdmartin View Post
Yes, Shadow, I'm well aware of your efforts, and have used them. I'm not trying to criticize.
Sorry! I was just trying to be joking about it and that failed badly! I really should not do that in text...

Quote:
Originally Posted by wdmartin View Post
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.
In total agreement about this. The documentation does "answer" questions but no easy way to locate it all with a simple keyword search. That is where it all fails badly.

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:
Originally Posted by wdmartin View Post
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.
Again totally agree and my post was not helpful. Sorry...

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:
Originally Posted by wdmartin View Post
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.
Totally agree. I am making changes to the UI stuff for d20 for LW. I added a new "deity" selection and that was DAYS of work. Trust me I used the words "LW" and some colorful four letter words a few times.

I was trying to joke and I need to remember it does not work in text...

Quote:
Originally Posted by wdmartin View Post
So ... just bear with me. I'll try not to be too annoying.
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.
ShadowChemosh is offline   #29 Reply With Quote
wdmartin
Senior Member
 
Join Date: May 2013
Posts: 240

Old May 4th, 2016, 02:00 PM
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.
wdmartin is offline   #30 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 03:40 AM.


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