• Please note: In an effort to ensure that all of our users feel welcome on our forums, we’ve updated our forum rules. You can review the updated rules here: http://forums.wolflair.com/showthread.php?t=5528.

    If a fellow Community member is not following the forum rules, please report the post by clicking the Report button (the red yield sign on the left) located on every post. This will notify the moderators directly. If you have any questions about these new rules, please contact support@wolflair.com.

    - The Lone Wolf Development Team

Increasing damage die of a weapon (without Helper.DamageUp)

TheIronGolem

Well-known member
I need to implement a feat (Katana Expertise, from the Path of War Expanded playtest) that increases the damage of a weapon by one die size. Note that this is NOT the same thing as treating the weapon as being one size category larger, which is what the Helper.DamageUp tag does. Incrementing the wDamage field seems to produce similar results, so that's not a solution either.

For example, a d8 weapon with Helper.DamageUp would become 2d6 as per the rules, whereas I need to make it 1d10 instead.

I can do this by grabbing the current wMain.? tag from the weapon, and then doing a series of if-else statements like so:

Code:
foreach pick in hero from BaseWep where "IsWeapon.wKatana"
  ~ First, mark the weapon as finessable
  perform eachpick.assign[Helper.Finesse]

  ~ Next, get the current damage die of the weapon
  perform eachpick.pulltags[wMain.?]
  perform eachpick.delete[wMain.?]

  ~ Whichever damage die we have, assign the next-larger die
  if (tagis[wMain.1d4_4] = 1) then
    perform eachpick.assign[wMain.1d6_5]
  elseif (tagis[wMain.1d6_5] = 1) then
    perform eachpick.assign[wMain.1d8_6]
  elseif (tagis[wMain.1d8_6] = 1) then
    perform eachpick.assign[wMain.1d10_304]
  elseif (tagis[wMain.1d10_304] = 1) then
    perform eachpick.assign[wMain.1d12_404]
  endif
~etc...
nexteach

But that's pretty inelegant in my opinion, and will probably fail once the user starts from a damage die I failed to account for (fairly likely, given various ways to change your size and whatnot).

So is there any other way to more gracefully increase the damage die size of a weapon? Failing that, is there a list of wMain tags somewhere I can use for the if-else method above?
 
I needed to do something similar for an ability that multiples the number of dice a while ago. Unfortunately manipulating damage dice can be difficult once you move outside the usual changing with size.

Using the various string functions, you could extract the number of dice and the type of die from the wMain tag since you know it will always have the "d" character. Then determine the die type and increase it and finally set the damage in fixed damage field.
 
With the fact that Paizo has just released the final complete Damage Dice increase/decrease values. I want to say that you should not give custom damage dice. That you should use Helper.DamageUp and leave it at that because I really don't agree with damage dice being outside of that now official list. This way when LW gets this Errata/FAQ inputted into HL we will 100% match the current official values.

Also confused because 1d8 to next size would be 1d10 and then 2d6. So you sure you where not seeing "two" size increases somehow?
 
Just to clarify, Shadow, 1d8 would increase to 1d10 if we were talking about a small weapon, but it goes to 2d6 for medium or larger weapons (rule 1 of the FAQ).

I suspect that once LWD integrate the FAQ into HL, then what the OP is trying to do will be a lot easier, since it should be possible to force a single step up in the progression.
 
Just to clarify, Shadow, 1d8 would increase to 1d10 if we were talking about a small weapon, but it goes to 2d6 for medium or larger weapons (rule 1 of the
Duh! Yep you are correct sir.

The OP is one of my editors doing path of war. I am not really in agreement for using size scaling outside of paizo new official size values. It don't make logical sense to me.:o
 
Well, I got confirmation from DSP over on the Playground that it should use Paizo's progression, though they hinted that wasn't their original intent.

So back to good old Helper.DamageUp it is, and hooray for not having to painstakingly replace wMain tags!
 
Figured I would post this here since it helped me develop the thing & seems to fit the request or moving up one step in the Pazio Damage Progression rather than the two steps that Enlarge Person (and the HL Helpers) are based on.

I built it mainly for an ammunition system I am working on where I wanted to make custom bullets that increased/reduced the weapons base damage in exchange for extra effects (DR Piercing, AoEs, etc) but wanted it to reflect it in the HL screens instead of having the player remember :P

If someone with better HL scripting skills wants to tell me how the heck I can condense all the redundant IF statements I would appreciate it. I couldn't get the normal OR functions to work with my string checks no matter how much I tried lol :confused:

Basically this turns the wMain.whatever into a string (Reguardless if it is one with an _ addon or just a raw dice value), splits is apart, compares, rebuilds it with a new dice value & then replaces it into a proper tag on the item. Handles up to 1d2, 1d3, 10d4, 12d6, 12d8, 4d10, or 4d12 and scales the dice by 1 step in the Pazio Progression, or at least as close as I can figure in the case of special instructions on 4s, 10s, & 12s. :D

Core of the code. Just replace the input for "base1" (line 2) with whatever you are using to find the specific weapon & wMain tag since mine is from a foreach statement. This piece runs fine at Final Phase 10000 with a simple foreach check against the equipped weapons but I am pretty sure it will run as early as Pre-Levels. Haven't tested it on anything earlier then that.
Code:
var base1 as string
base1 = eachpick.tagids[wMain.?]

var base2l as string
var base2m as string
var base2r as string
var base2pos as number
var base2len as number
var base5 as string

base2l = left(base1,6)
base2pos = pos(base1, "_")
if (base2pos > -1) then
	base2pos = pos(base1, "_") - 1
	base2m = mid(base1,6,base2pos)
	base2len = length(base1) - length(base2l) - length(base2m)
	base2r = right(base1,base2len)
elseif (base2pos = -1) then
	base2len = length(base1) - length(base2l)
	base2m = right(base1,base2len)
else
	base2m = mid(base1,6,9)
endif

	if (compare(base2m,"1d2") = 0) then
		base2m = "1d3"
	elseif (compare(base2m,"1d3") = 0) then
		base2m = "1d4"
	elseif (compare(base2m,"1d4") = 0) then
		base2m = "1d6"
	elseif (compare(base2m,"1d6") = 0) then
		base2m = "1d8"
	elseif (compare(base2m,"1d8") = 0) then
		base2m = "1d10"
	elseif (compare(base2m,"2d4") = 0) then
		base2m = "1d10"

	elseif (compare(base2m,"1d10") = 0) then
		base2m = "2d6"
	elseif (compare(base2m,"2d6") = 0) then
		base2m = "2d8"
	elseif (compare(base2m,"3d4") = 0) then
		base2m = "2d8"
	elseif (compare(base2m,"1d12") = 0) then
		base2m = "2d8"

	elseif (compare(base2m,"2d8") = 0) then
		base2m = "3d6"
	elseif (compare(base2m,"4d4") = 0) then
		base2m = "3d6"

	elseif (compare(base2m,"3d6") = 0) then
		base2m = "3d8"
	elseif (compare(base2m,"5d4") = 0) then
		base2m = "3d8"

	elseif (compare(base2m,"3d8") = 0) then
		base2m = "4d6"
	elseif (compare(base2m,"6d4") = 0) then
		base2m = "4d6"

	elseif (compare(base2m,"4d6") = 0) then
		base2m = "4d8"
	elseif (compare(base2m,"7d4") = 0) then
		base2m = "4d8"
	elseif (compare(base2m,"2d12") = 0) then
		base2m = "4d8"

	elseif (compare(base2m,"4d8") = 0) then
		base2m = "6d6"
	elseif (compare(base2m,"8d4") = 0) then
		base2m = "6d6"
	elseif (compare(base2m,"5d6") = 0) then
		base2m = "6d6"
	elseif (compare(base2m,"2d10") = 0) then
		base2m = "6d6"

	elseif (compare(base2m,"6d6") = 0) then
		base2m = "6d8"
	elseif (compare(base2m,"9d4") = 0) then
		base2m = "6d8"
	elseif (compare(base2m,"5d8") = 0) then
		base2m = "6d8"
	elseif (compare(base2m,"3d12") = 0) then
		base2m = "6d8"

	elseif (compare(base2m,"6d8") = 0) then
		base2m = "8d6"
	elseif (compare(base2m,"10d4") = 0) then
		base2m = "8d6"
	elseif (compare(base2m,"7d6") = 0) then
		base2m = "8d6"
	elseif (compare(base2m,"3d10") = 0) then
		base2m = "8d6"

	elseif (compare(base2m,"8d6") = 0) then
		base2m = "8d8"
	elseif (compare(base2m,"7d8") = 0) then
		base2m = "8d8"
	elseif (compare(base2m,"4d12") = 0) then
		base2m = "8d8"

	elseif (compare(base2m,"8d8") = 0) then
		base2m = "12d6"
	elseif (compare(base2m,"3d10") = 0) then
		base2m = "12d6"
	elseif (compare(base2m,"4d10") = 0) then
		base2m = "12d6"

	elseif (compare(base2m,"12d6") = 0) then
		base2m = "12d8"
	elseif (compare(base2m,"12d8") = 0) then
		base2m = "16d6"

	endif

base5 = base2l & base2m & base2r
perform eachpick.delete[wMain.?]
perform eachpick.assignstr[base5]
Note: I have one that is reversed to scale Downward as well if you want it :p

I so hope a future HL update will make this type of thing alot easier lmao
 
Back
Top