Lone Wolf Development Forums

Lone Wolf Development Forums (http://forums.wolflair.com/index.php)
-   HL - Pathfinder Roleplaying Game (http://forums.wolflair.com/forumdisplay.php?f=62)
-   -   Natural Attacks Progression (http://forums.wolflair.com/showthread.php?t=67959)

Sphynx August 17th, 2023 08:29 AM

Natural Attacks Progression
 
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?

Sendric August 17th, 2023 08:39 AM

Quote:

Originally Posted by Sphynx (Post 302001)
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.

Sphynx 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...

Sendric 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.

Sphynx 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


Sendric August 17th, 2023 09:37 AM

Quote:

Originally Posted by Sphynx (Post 302005)
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.

Sphynx August 17th, 2023 10:25 AM

Yeah, it's working now, but had to remove the doneif(). Thank you for your time. :)

Sendric August 18th, 2023 03:25 AM

Quote:

Originally Posted by Sphynx (Post 302008)
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!


All times are GMT -8. The time now is 04:39 AM.

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