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
Matt Droz
Senior Member
 
Join Date: Apr 2010
Posts: 152

Old March 28th, 2014, 12:14 PM
I'm looking to add a weapon power that would double the weapon's damage dice (like the Vital Strike feat). For instance, a dagger with the ability would go from 1d4 -> 2d4 for Medium creatures and from 3d6 -> 6d6 for Colossal creatures. I've looked through the fields and tags, but there's a lot of computation that goes on behind the scenes from what's tagged on the weapon.

Also, I'd be happy to show the damage as 1d4+1d4 (or 3d6+3d6), just would like to be able to display it on the weapon stats.

Matt Droz Community material (Forgotten Realms & Non-SRD/Retro)
Matt Droz is offline   #1 Reply With Quote
Mathias
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 13,213

Old March 28th, 2014, 01:01 PM
Here's an existing thread on the subject: http://forums.wolflair.com/showthrea...ht=damage+dice
Mathias is online now   #2 Reply With Quote
ShadowChemosh
Senior Member
Volunteer Data File Contributor
 
Join Date: Jan 2010
Location: Chicago, IL (USA)
Posts: 10,729

Old March 28th, 2014, 01:13 PM
So I have a version of the Vital Strike feat that has an activation ability. The code in it is very similar to what your asking as it doubles the base dice value. Also note it needs some fixes because of recent changes in HL.

But its really not super simple. It took awhile to get it to generate the values correctly. That is the best help I can give right now.

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   #3 Reply With Quote
Matt Droz
Senior Member
 
Join Date: Apr 2010
Posts: 152

Old March 28th, 2014, 04:45 PM
Mathias, that's not going to work since it changes the base damage dice of the weapon. So when it upsizes to Colossal, instead of it going from 3d6 to 6d6, it just increases along the 3d4 path.

ShadowChemosh - That is SUPER-complicated. Congrats on it! I'll have to see if I can't tweek it for my purposes.

Matt Droz Community material (Forgotten Realms & Non-SRD/Retro)
Matt Droz is offline   #4 Reply With Quote
Matt Droz
Senior Member
 
Join Date: Apr 2010
Posts: 152

Old March 29th, 2014, 09:42 AM
Since I was looking at this for a specific Magic Weapon (Manyfang dagger, Serpent Kingdoms, p. 152), I was able to take your code ShadowChemosh and tweak it below to add as Extra Damage on the weapon.

Code:
var sDice as string
var nDice as number
var nDieSize as number
var dBreak as string

  ~ Pull out the number of dice
  nDice = mid(field[wDamageTbl].arraytext[1],0,1)
  ~ Pull out the die size
  nDieSize = mid(field[wDamageTbl].arraytext[1],2,2)
  ~ Check for d in damage code
  dBreak = mid(field[wDamageTbl].arraytext[1],1,1)

  ~ Increase the number of dice
  nDice *= 3
  if (compare(dBreak,"d")=0) then
    sDice = nDice & "d" & nDieSize
  else
    sDice = nDice
  endif

  if (nDice <> 0) then
    field[wDamExtra].text = "+" & sDice
  endif

Matt Droz Community material (Forgotten Realms & Non-SRD/Retro)

Last edited by Matt Droz; April 5th, 2014 at 07:51 AM. Reason: Updated code for damage dice less than 1d2
Matt Droz 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 March 29th, 2014, 10:26 AM
Cool. Glad it got you pointed in the right direction.

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   #6 Reply With Quote
Necros99
Junior Member
 
Join Date: Jan 2011
Posts: 28

Old April 13th, 2014, 11:39 AM
Quote:
Originally Posted by Mathias View Post
Damage dice currently can't be multiplied. It's a known limitation that we do intend to solve.
I am curious, has this limitation been solved yet?

A house rule my group intends to use is that base weapon damage increases at levels 8, 15, 22 and 29. This affects all melee (including unarmed) and ranged weapons, but not spells, or classes who have pre-defined damage, such as the monk or brawler.

At each of these levels, the base damage die of the weapon is doubled. Two examples:

longsword
1st level - 1d8
8th level - 2d8
15th level - 3d8
22nd level - 4d8
29th level - 5d8

falchion
1st level - 2d4
8th level - 4d4
15th level - 6d4
22nd level - 8d4
29th level - 10d4

Of course, size affecting damage die type would also need to apply.

I spent the last 5 years playing 4e (using and modifying Hero Labs), but for the life of me I can't see a way to accomplish this.

If this can be done as some sort of general mechanic, that would be great. Next preferred method would be creating single weapons that were cognizant of the character level to determine damage. Coming up with 5 discrete weapons (one for each level class) seems more work than worth the effort.
Necros99 is offline   #7 Reply With Quote
ShadowChemosh
Senior Member
Volunteer Data File Contributor
 
Join Date: Jan 2010
Location: Chicago, IL (USA)
Posts: 10,729

Old April 13th, 2014, 06:55 PM
Matt listed a working script above and the Vital Steike addon would provide another working script example to accomplish this.

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   #8 Reply With Quote
Necros99
Junior Member
 
Join Date: Jan 2011
Posts: 28

Old April 15th, 2014, 06:34 AM
@ShadowChemosh

You have been extremely help, and I have the initial script working as intended by the author. I am wondering, instead of displaying the sDice as extra damage, is it possible to display it as base damage?

I assume it would be applied as a modification to:

if (nDice <> 0) then
field[wDamExtra].text = "+" & sDice
endif

but every time I try replacing "wDamExtra", I run into parsing errors. I assumed it would be some variation of:

if (nDice <> 0) then
field[wMain].text = sDice
endif

Any assistance you could provide would be greatly appreciated.

P.S. I am still working within the weapon definition (as opposed to the Mechanic)

Last edited by Necros99; April 15th, 2014 at 07:29 AM.
Necros99 is offline   #9 Reply With Quote
ShadowChemosh
Senior Member
Volunteer Data File Contributor
 
Join Date: Jan 2010
Location: Chicago, IL (USA)
Posts: 10,729

Old April 15th, 2014, 11:27 AM
Their is two fields you will have to change so that you can get it to display correctly. These are the "Fixed" damage fields. I think its called "wFixDamage" and "wFixRanDam" fields used for setting the melee and ranged damage.

To make sure you can check the Vital Strike feat add as the very bottom of its code it sets the two fields correctly.

If you don't want to use the "extra damage" field you just have to totally rebuild the full value of the dice including any pluses then. That was why Matt went the way he did as it was easier.

So your code will need to figure out the dice current value and the amount of "plus". So if the weapon does 1d8+3 you will need to store that as three independent values (ie 1,8,3). This way you can multiple the "1" of 1d8+3 only by the amount of extra dice. You will also need to know which values to pull the pluses from as 1 handed vs 2-handed do different damage plus amounts so you have to pull from different sections of the damage table.

Then string it all back together again so you get say 2d8+3 if you where to double the dice. For example code I recommend looking at the Vital Strike feat I did as I am doing all that. The only difference is its already doing a foreach loop. So the parts of the script doing the "eachpick" you could leave off if you are running directly on the weapon for now.

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   #10 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 04:40 PM.


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