Lone Wolf Development Forums  

Go Back   Lone Wolf Development Forums > Hero Lab Forums > HL - Pathfinder Roleplaying Game

Notices

Reply
 
Thread Tools Display Modes
Arkadious
Junior Member
 
Join Date: Mar 2021
Location: New Zealand
Posts: 18

Old May 23rd, 2021, 11:22 PM
Hello,

I'm trying to change the damage dice of handwraps to have the damage dice of a large creature.

Currently, Stonefist gloves increases the damage dice on a medium creature's Unarmed Strike to that of a large creature, so I thought that the simplest approach would be to copy the code that does that but make it apply to the Handwraps too.

That doesn't work, and I think its because Handwraps is either

1. Pulling the damage dice size from Unarmed Strikes before the size changes, OR
2. Handwraps is looking for the player's size and then fixing the damage dice based on that size.


Code for Stonefist Gloves
Code:
      doneif (field[gIsEquip].value = 0)

      foreach pick in hero from BaseWep
          if (eachpick.tagexpr[IsWeapon.wUnarmed = 1] <> 0) then
              perform eachpick.assign[Helper.DamageUp]
          endif
      nexteach

      foreach pick in hero from BaseWep
          if (eachpick.tagexpr[IsWeapon.wHandwrap = 1] <> 0) then
              perform eachpick.assign[Helper.DamageUp]
          endif
      nexteach

      ~perform hero.child[wUnarmed].assign[Helper.DamageUp]

      var message as string
      message="+" & round(#tierbase[]/2,0,-1) & " to sunder with {i}stonefist gloves{/i}"

      #situational[hero.child[manSunder],message,field[thingname].text]
Code for Handwraps
Code:
      perform hero.child[wUnarmed].pulltags[wMain.?]
      perform hero.child[wUnarmed].pulltags[wCritMin.?]
      perform hero.child[wUnarmed].pulltags[wCritMult.?]
      perform hero.child[wUnarmed].pulltags[wType.?]

      if (container.ishero = 0) then
        perform container.parent.pushtags[wMain.?]
        perform container.parent.pushtags[wCritMin.?]
        perform container.parent.pushtags[wCritMult.?]
        perform container.parent.pushtags[wType.?]
        container.parent.field[wDamage].value += herofield[tSize].value

        if (tagis[Helper.DamageDown] <> 0) then
          perform container.parent.pushtags[Helper.DamageDown]
        elseif (tagis[Helper.DamageUp] <> 0) then
          perform container.parent.pushtags[Helper.DamageUp]
        endif
      else
        field[wDamage].value += herofield[tSize].value
      endif
Does anyone have any solutions as to how I would fix this issue? Any help is appreciated. Thanks.
Arkadious is offline   #1 Reply With Quote
Lord Magus
Senior Member
 
Join Date: Jan 2011
Location: Quebec, QC, Canada
Posts: 464

Old May 24th, 2021, 03:50 PM
What is the timing for each of those scripts?
Lord Magus is offline   #2 Reply With Quote
Arkadious
Junior Member
 
Join Date: Mar 2021
Location: New Zealand
Posts: 18

Old May 25th, 2021, 09:12 PM
Quote:
Originally Posted by Lord Magus View Post
What is the timing for each of those scripts?
Stonefists are set to pre-level
Handwraps are set to post-level

Both are at Priority 10000
Arkadious is offline   #3 Reply With Quote
Arkadious
Junior Member
 
Join Date: Mar 2021
Location: New Zealand
Posts: 18

Old May 25th, 2021, 09:49 PM
Managed to solve the issue by setting Stonefist Gloves to post-level, and setting the Priority Level to 10001
Arkadious is offline   #4 Reply With Quote
Arkadious
Junior Member
 
Join Date: Mar 2021
Location: New Zealand
Posts: 18

Old July 27th, 2021, 04:16 PM
Fixed the issue originally, but now I cannot remember how I solved it fully as the post above was only a part of the solution. Reinstalled some stuff on my computer and accidentally deleted the fix I had made.

Does anyone have any idea how I would fix the interaction between handwraps and stonefist gloves so that it increases the size damage dice for handwraps?
Arkadious is offline   #5 Reply With Quote
Minous
Senior Member
 
Join Date: May 2015
Posts: 830

Old July 27th, 2021, 06:01 PM
The weapon die adjustment uses:


~ If we're not enabled, get out now
doneif (field[pIsOn].value = 0)

doneif (field[pChosen].ischosen = 0)

doneif (field[pChosen].chosen.field[wMMainDSiz].value = 0)

field[pChosen].chosen.field[wMMainDSiz].value += field[pAdjust].value
Minous is offline   #6 Reply With Quote
Minous
Senior Member
 
Join Date: May 2015
Posts: 830

Old July 27th, 2021, 06:04 PM
I however think the weapon damage die step adjustment is probably a better fit.:


~ If we're not enabled, get out now
doneif (field[pIsOn].value = 0)

~if nothing's been chosen, get out now
doneif (field[pChosen].ischosen = 0)

field[pChosen].chosen.field[wDamage].value += field[pAdjust].value
field[pChosen].chosen.field[wRanDamage].value += field[pAdjust].value
Minous is offline   #7 Reply With Quote
Arkadious
Junior Member
 
Join Date: Mar 2021
Location: New Zealand
Posts: 18

Old August 29th, 2021, 10:40 PM
I think the issue comes from the Handwraps pulling the size information from Unarmed strike and then having the size category for the damage dice increased by a size category.

By default, Handwraps has Post-attribute priority 10000, and Stonefist Gloves has Pre-level priority 10000.

Stonefist Gloves has the same priority and timing as the Impact enchantment.

The recommendation to check out the Impact enchantment also let me to find a bug with it when it interacts with Handwraps. If you add Impact to Handwraps, the size damage dice for the weapon doesn't increase even though it should (Med to Large).

In addition, both Unarmed strikes and Handwraps are weapons labelled as "Size doesn't matter" meaning that the damage dice for the weapon changes with the player's size.

One way to fix it might be to disable the "Size doesn't matter" option, but I don't know what that'll effect in the long run.

Original code for Handwraps below

Code:
--------
Handwrap
Post-attributes		10000

      perform hero.child[wUnarmed].pulltags[wMain.?]
      perform hero.child[wUnarmed].pulltags[wCritMin.?]
      perform hero.child[wUnarmed].pulltags[wCritMult.?]
      perform hero.child[wUnarmed].pulltags[wType.?]

      if (container.ishero = 0) then
        perform container.parent.pushtags[wMain.?]
        perform container.parent.pushtags[wCritMin.?]
        perform container.parent.pushtags[wCritMult.?]
        perform container.parent.pushtags[wType.?]
        container.parent.field[wDamage].value += herofield[tSize].value

        if (tagis[Helper.DamageDown] <> 0) then
          perform container.parent.pushtags[Helper.DamageDown]
        elseif (tagis[Helper.DamageUp] <> 0) then
          perform container.parent.pushtags[Helper.DamageUp]
        endif
      else
        field[wDamage].value += herofield[tSize].value
      endif

--------

Last edited by Arkadious; August 29th, 2021 at 11:04 PM.
Arkadious is offline   #8 Reply With Quote
Arkadious
Junior Member
 
Join Date: Mar 2021
Location: New Zealand
Posts: 18

Old August 30th, 2021, 12:00 AM
I've done it! I've actually fixed it!

1. Gave Handwraps a 1d3 damage dice
2. "Size Doesn't Matter?" is still enabled for both Unarmed strikes and Handwraps
3. Gave Handwraps GroupId IsWeapon and TagId wUnarmed
4. Changed Phase from Post-attributes to Post-levels, and did not change Priority
5. Changed Stonefist Gloves Priority to 10001, and did not change Phase
6. Altered the code for Stonefist Gloves to this

Code:
      doneif (field[gIsEquip].value = 0)

      ~perform hero.child[wUnarmed].assign[Helper.DamageUp]
      ~perform hero.child[wHandwrap].assign[Helper.DamageUp]

      foreach pick in hero from BaseWep
          if (eachpick.tagexpr[IsWeapon.wUnarmed = 1] <> 0) then
              perform eachpick.assign[Helper.DamageUp]
          endif
      nexteach

      var message as string
      message="+" & round(#tierbase[]/2,0,-1) & " to sunder with {i}stonefist gloves{/i}"

      #situational[hero.child[manSunder],message,field[thingname].text]
What has done is allowed me to add the Impact enchantment to Handwraps and have it affect its damage size dice, and use Stonefist Gloves to up the damage size dice for both Unarmed strikes and Handwraps.
Arkadious is offline   #9 Reply With Quote
Reply

Thread Tools
Display Modes

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 08:18 AM.


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