Member
Join Date: Apr 2007
Posts: 60
|
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? |
#1 |
Senior Member
Join Date: Jul 2010
Posts: 3,147
|
Quote:
Code:
foreach pick in hero from BaseWep where "wGroup.Natural" |
|
#2 |
Member
Join Date: Apr 2007
Posts: 60
|
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 Last edited by Sphynx; August 17th, 2023 at 08:55 AM. Reason: Clarification |
#3 |
Senior Member
Join Date: Jul 2010
Posts: 3,147
|
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) Last edited by Sendric; August 17th, 2023 at 09:36 AM. |
#4 |
Member
Join Date: Apr 2007
Posts: 60
|
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 |
#5 |
Senior Member
Join Date: Jul 2010
Posts: 3,147
|
Quote:
|
|
#6 |
Member
Join Date: Apr 2007
Posts: 60
|
Yeah, it's working now, but had to remove the doneif(). Thank you for your time.
|
#7 |
Senior Member
Join Date: Jul 2010
Posts: 3,147
|
|
#8 |
|
|