Senior Member
Join Date: Apr 2010
Posts: 152
|
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) |
#1 |
Senior Member
Lone Wolf Staff
Join Date: May 2005
Posts: 13,213
|
Here's an existing thread on the subject: http://forums.wolflair.com/showthrea...ht=damage+dice
|
#2 |
Senior Member
Volunteer Data File Contributor
Join Date: Jan 2010
Location: Chicago, IL (USA)
Posts: 10,729
|
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. |
#3 |
Senior Member
Join Date: Apr 2010
Posts: 152
|
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) |
#4 |
Senior Member
Join Date: Apr 2010
Posts: 152
|
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 |
#5 |
Senior Member
Volunteer Data File Contributor
Join Date: Jan 2010
Location: Chicago, IL (USA)
Posts: 10,729
|
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. |
#6 |
Junior Member
Join Date: Jan 2011
Posts: 28
|
Quote:
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. |
|
#7 |
Senior Member
Volunteer Data File Contributor
Join Date: Jan 2010
Location: Chicago, IL (USA)
Posts: 10,729
|
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. |
#8 |
Junior Member
Join Date: Jan 2011
Posts: 28
|
Quote:
<thing id="wmLongswor" name="Longsword (modified)" description="This sword is about 3-1/2 feet in length." compset="Weapon"> <fieldval field="gWeight" value="4"/> <fieldval field="gSizeCost" value="15"/> <tag group="wClass" tag="OneHanded" name="One-Handed" abbrev="One-Handed"/> <tag group="wCritMin" tag="19" name="19" abbrev="19"/> <tag group="wCritMult" tag="2" name="2" abbrev="2"/> <tag group="wFtrGroup" tag="BladeHeavy" name="Blades, Heavy" abbrev="Blades, Heavy"/> <tag group="wMain" tag="1d8_6" name="1d8" abbrev="1d8"/> <tag group="wProfReq" tag="Simple"/> <tag group="wType" tag="S" name="Slashing" abbrev="S"/> <tag group="EquipType" tag="Metal" name="Metal" abbrev="Metal"/> <tag group="wCategory" tag="Melee" name="Melee Weapon" abbrev="Melee"/> <eval phase="UserFinal"><![CDATA[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]]></eval> </thing> Yet when the weapon is displayed, it only shows damage as "1d8" |
|
#9 |
Senior Member
Volunteer Data File Contributor
Join Date: Jan 2010
Location: Chicago, IL (USA)
Posts: 10,729
|
I am not seeing any reason it its not showing triple dice damage. I will have to wait until I get home to try it out in HL to see why its not working...
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. |
#10 |
|
|