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
Sphynx
Member
 
Join Date: Apr 2007
Posts: 60

Old August 17th, 2023, 08:29 AM
Hey, so we have a Catfolk Monk that has convinced me to let him play where his Natural Attacks do Monk Unarmed damage (at the loss of Flurry). While it's not greatly problematic, thanks to ShadowChemosh's tools, to do it all manually every time he goes up a level, I got it in my head to try and automate it...

Looked at the closest thing I could find: Ki Weapons: Unarmed Damage. Which has a nice loop through the BaseWep array, but I can not find the equivalent array for your BaseNaturalAttacks. :P

Anyone have any idea what variable to loop through, and is there a way to use the current foreach loop to do this?
Sphynx is offline   #1 Reply With Quote
Sendric
Senior Member
 
Join Date: Jul 2010
Posts: 3,147

Old August 17th, 2023, 08:39 AM
Quote:
Originally Posted by Sphynx View Post
Hey, so we have a Catfolk Monk that has convinced me to let him play where his Natural Attacks do Monk Unarmed damage (at the loss of Flurry). While it's not greatly problematic, thanks to ShadowChemosh's tools, to do it all manually every time he goes up a level, I got it in my head to try and automate it...

Looked at the closest thing I could find: Ki Weapons: Unarmed Damage. Which has a nice loop through the BaseWep array, but I can not find the equivalent array for your BaseNaturalAttacks. :P

Anyone have any idea what variable to loop through, and is there a way to use the current foreach loop to do this?
Not sure what the foreach loop for this specifically is, but if you want a foreach loop that looks at natural weapons:

Code:
foreach pick in hero from BaseWep where "wGroup.Natural"
Note: BaseWep includes all weapons, including natural attacks.
Sendric is offline   #2 Reply With Quote
Sphynx
Member
 
Join Date: Apr 2007
Posts: 60

Old August 17th, 2023, 08:54 AM
You're right, I should have posted the code... Because it's grabbing from the unarmed damage of the monk, not sure how to intermix what you wrote into this, my apologies.

Here's what I took from Ki Weapons:

Code:
      ~ Do nothing if we are not active.
      doneif (field[abilActive].value = 0)

      ~ First pull the weapon damage and damageup tags from our unarmed strike weapon.
      perform hero.child[wUnarmed].pulltags[wMain.?]
      perform hero.child[wUnarmed].pulltags[Helper.DamageUp]
      perform hero.child[wUnarmed].pulltags[Helper.DamageDown]

      ~ Then search through all the improvised weapons, delete the damage tags and push our tags to them
      foreach pick in hero from BaseNatWep

        perform eachpick.delete[Helper.DamageUp]
        perform eachpick.delete[Helper.DamageDown]

        perform eachpick.pushtags[wMain.?]
        perform eachpick.pushtags[Helper.DamageUp]
        perform eachpick.pushtags[Helper.DamageDown]
      nexteach
The "BaseNatWep" is the only var I could find, but that doesn't work...

Last edited by Sphynx; August 17th, 2023 at 08:55 AM. Reason: Clarification
Sphynx is offline   #3 Reply With Quote
Sendric
Senior Member
 
Join Date: Jul 2010
Posts: 3,147

Old August 17th, 2023, 09:20 AM
Oh, right. BaseNatWep should work to loop through natural weapons. I somehow overlooked that when looking for tags.

What exactly isn't working? After this script runs, are you able to look at the weapons and see what tags are assigned? You may need to delete any wMain.? tags before assigning new ones.

Edit: Wait, is this an adjustment you're making? If so, that first line of code is going to produce an error. Change it to this:

Code:
doneif (field[pIsOn].value = 0)
Edit #2: I made an adjustment with this script and ran it at Post-Attributes/10000. It seems to work.

Last edited by Sendric; August 17th, 2023 at 09:36 AM.
Sendric is offline   #4 Reply With Quote
Sphynx
Member
 
Join Date: Apr 2007
Posts: 60

Old August 17th, 2023, 09:36 AM
Thank you for your reply.

There was no error with my code, it just didn't work (perhaps I have the wrong phase or priority?) I set it to Post-levels/11000.

However the line you suggested changing to does produce an error:

Attempt to access field 'plsOn' that does not exist for thing 'cMnkUCatsFlurry'

Current Code:
Code:
      ~ Do nothing if we are not active.
      doneif (field[pIsOn].value = 0)

      ~ First pull the weapon damage and damageup tags from our unarmed strike weapon.
      perform hero.child[wUnarmed].pulltags[wMain.?]
      perform hero.child[wUnarmed].pulltags[Helper.DamageUp]
      perform hero.child[wUnarmed].pulltags[Helper.DamageDown]

      foreach pick in hero from BaseNatWep

        perform eachpick.delete[wMain.?]
        perform eachpick.delete[Helper.DamageUp]
        perform eachpick.delete[Helper.DamageDown]

        perform eachpick.pushtags[wMain.?]
        perform eachpick.pushtags[Helper.DamageUp]
        perform eachpick.pushtags[Helper.DamageDown]

      nexteach
Sphynx is offline   #5 Reply With Quote
Sendric
Senior Member
 
Join Date: Jul 2010
Posts: 3,147

Old August 17th, 2023, 09:37 AM
Quote:
Originally Posted by Sphynx View Post
Thank you for your reply.

There was no error with my code, it just didn't work (perhaps I have the wrong phase or priority?) I set it to Post-levels/11000.

However the line you suggested changing to does produce an error:

Attempt to access field 'plsOn' that does not exist for thing 'cMnkUCatsFlurry'

Current Code:
Code:
      ~ Do nothing if we are not active.
      doneif (field[pIsOn].value = 0)

      ~ First pull the weapon damage and damageup tags from our unarmed strike weapon.
      perform hero.child[wUnarmed].pulltags[wMain.?]
      perform hero.child[wUnarmed].pulltags[Helper.DamageUp]
      perform hero.child[wUnarmed].pulltags[Helper.DamageDown]

      foreach pick in hero from BaseNatWep

        perform eachpick.delete[wMain.?]
        perform eachpick.delete[Helper.DamageUp]
        perform eachpick.delete[Helper.DamageDown]

        perform eachpick.pushtags[wMain.?]
        perform eachpick.pushtags[Helper.DamageUp]
        perform eachpick.pushtags[Helper.DamageDown]

      nexteach
Ok, so you aren't making an adjustment. That's what I wasn't sure about. Try running at Post-Attributes/10000.
Sendric is offline   #6 Reply With Quote
Sphynx
Member
 
Join Date: Apr 2007
Posts: 60

Old August 17th, 2023, 10:25 AM
Yeah, it's working now, but had to remove the doneif(). Thank you for your time.
Sphynx is offline   #7 Reply With Quote
Sendric
Senior Member
 
Join Date: Jul 2010
Posts: 3,147

Old August 18th, 2023, 03:25 AM
Quote:
Originally Posted by Sphynx View Post
Yeah, it's working now, but had to remove the doneif(). Thank you for your time.
Yea, the field "pIsOn" is only used with adjustments. I wasn't sure if you were making an adjustment or an ability.

Glad it's working!
Sendric is offline   #8 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:46 AM.


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