Lone Wolf Development Forums  

Go Back   Lone Wolf Development Forums > Hero Lab Forums > HL - d20 System

Notices

Reply
 
Thread Tools Display Modes
Kendall-DM
Spy
 
Join Date: Jan 2011
Location: Van Nuys, California
Posts: 1,220

Old September 27th, 2011, 08:06 AM
Currently, double weapons do not allow for 1.5 damage if used two handed but not as a double weapon. This is the fix I implemented on my end, put here in case the community wants to use it.

Code:
<<Post-Attributes (Users) 1000>>
~ Fix for double weapons (HL workaround).
~ If we're not equipped, do nothing.
var result as number
result = field[gIsEquip].value
if (container.ishero = 0) then
  result += container.parent.field[gIsEquip].value
endif
doneif (result = 0)

~ Determine if we are used in both hands but not as a double weapon.
if (container.ishero <> 0) then
  doneif (field[wIsDouble].value <> 0)
  field[wDamBonus].value += round(hero.child[aSTR].field[aModBonus].value / 2, 0, -1)
else
  doneif (container.parent.field[wIsDouble].value <> 0)
  container.parent.field[wDamBonus].value += round(hero.child[aSTR].field[aModBonus].value / 2, 0, -1)
endif
Kendall-DM is offline   #1 Reply With Quote
ChrisRevocateur
Senior Member
 
Join Date: Aug 2011
Posts: 223

Old September 27th, 2011, 08:18 AM
Where would I insert this code, and would it work with the Pathfinder data set?
ChrisRevocateur is offline   #2 Reply With Quote
Kendall-DM
Spy
 
Join Date: Jan 2011
Location: Van Nuys, California
Posts: 1,220

Old September 27th, 2011, 08:39 AM
I inserted it into every double weapon, which means I copied and replaced those weapons. Have no idea if it would work with the Pathfinder set, maybe someone else proficient with Pathfinder would know, as I don't have that set.
Kendall-DM is offline   #3 Reply With Quote
ShadowChemosh
Senior Member
Volunteer Data File Contributor
 
Join Date: Jan 2010
Location: Chicago, IL (USA)
Posts: 10,729

Old September 27th, 2011, 09:41 AM
Pathfinder already correctly handles Double weapons so no need to do anthing. I am a little surprised that d20 is not handling them correctly. Will double check later...

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   #4 Reply With Quote
Kendall-DM
Spy
 
Join Date: Jan 2011
Location: Van Nuys, California
Posts: 1,220

Old September 27th, 2011, 12:39 PM
It was never doing it for me, so I just decided to code it myself. It's been too long since any bug fixes have occured in d20 and it doesn't look like the d20 will see much attention anytime soon, so I'm just going to have to put in temporary workarounds for those things that I can for the time being. Just kept getting tired of things being calculated incorrectly in the midst of a gaming session.
Kendall-DM is offline   #5 Reply With Quote
ShadowChemosh
Senior Member
Volunteer Data File Contributor
 
Join Date: Jan 2010
Location: Chicago, IL (USA)
Posts: 10,729

Old September 27th, 2011, 11:24 PM
Quote:
Originally Posted by Kendall-DM View Post
It was never doing it for me, so I just decided to code it myself.
Yep appears you are correct. Good job on the above code. Wonder if someway to do a more global fix instead of having to do a Replace ID....

Also playing around I found that when the double weapon prints it is actually correct. You can see this when you do a File->Print Preview... Leading to the idea that double weapons displayed in HL should take into account the 1.5 Str.

Here is the changed code to prevent double weapons when printed from getting a x2 str bonus:
Code:
~<<Post-Attributes (Users) 1000>>
~ If we're in output mode, don't do anything
doneif (state.isoutput <> 0)

~ Fix for double weapons (HL workaround).
~ If we're not equipped, do nothing.
var result as number
result = field[gIsEquip].value
if (container.ishero = 0) then
  result += container.parent.field[gIsEquip].value
endif
doneif (result = 0)

~ Determine if we are used in both hands but not as a double weapon.
if (container.ishero <> 0) then
  doneif (field[wIsDouble].value <> 0)
  field[wDamBonus].value += round(hero.child[aSTR].field[aModBonus].value / 2, 0, -1)
else
  doneif (container.parent.field[wIsDouble].value <> 0)
  container.parent.field[wDamBonus].value += round(hero.child[aSTR].field[aModBonus].value / 2, 0, -1)
endif

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; September 27th, 2011 at 11:39 PM.
ShadowChemosh is offline   #6 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 06:45 AM.


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