Member
Join Date: Jan 2015
Location: Wellington, NZ
Posts: 91
|
First: apologies if this should be in the Authoring Kit section
I am trying to use the Hero Lab editor to create a Mythic version of the Piranha Strike feat (such that it is equivalent to the Mythic version of Power attack) As i want it to apply in exactly the same way i duplicated the Mythic Power attack feat and then changed the eval scripts so that instead of the Eval Script saying: doneif (tagis[Helper.FtDisable] <> 0) hero.childfound[fPowerAtt].field[abValue2].value *= 1.5 hero.childfound[fPowerAtt].field[abValue2].value = round(hero.childfound[fPowerAtt].field[abValue2].value,0,-1) doneif (field[abilActive].value = 0) hero.childfound[fPowerAtt].field[abValue].value = 0 it goes doneif (tagis[Helper.FtDisable] <> 0) hero.childfound[fPiranStr].field[abValue2].value *= 1.5 hero.childfound[fPiranStr].field[abValue2].value = round(hero.childfound[fPiranStr].field[abValue2].value,0,-1) doneif (field[abilActive].value = 0) hero.childfound[fPiranStr].field[abValue].value = 0 (fPiranStr is the unique id for the piranha strike feat) Unfortunately this does not work: it does not negate the penalties when checked, or increase the bonus damage as it should (ie the abValue field when checked is not being set to 0, and abvalue.2 is not being multiplied by 1.5) Below is the script for the Piranha strike feat (which cannot be edited), but all the variables seem to match up, so i cant figure out why it doesnt work. var bonus as number bonus = #BAB[] / 4 field[abValue].value += round(bonus,0,-1) + 1 field[abValue2].value += field[abValue].value * 2 field[livename].text = "Piranha Strike -" & field[abValue].value & "/+" & field[abValue2].value if (field[abilActive].value <> 0) then hero.child[Attack].field[atmPenalty].value -= field[abValue].value hero.child[Damage].field[tDamPower].value += field[abValue2].value endif One more thing: when wielding the weapon with 2 hands, the damage is increased even further. This should not be occuring, but there is nothing i can see that should cause this (other than the general rule that using 2 hands gives 1.5* damage - though should only be the case on strength based damage)! Any help would be much appreciated! Thanks Stuart |
#1 |
Senior Member
Join Date: Feb 2013
Location: Blandford, UK
Posts: 164
|
Looking at the timing of the two base feats, I'd check how your mythic version compares as there are differences in the implementation times of P.S. & P.A.
Whereas Power Attack creates the values at post-levels then implements them in a seperate script at post-attributes, Piranha Strike sets the values and implements the effect in one lot at post-levels. You could either replace Piranha Strike with a version that acts more like Power Attack, or you could have your script work out the difference between the normal version and your mythic version and implement the modification seperately. I would suggest the latter myself as it means if the base version is changed you won't have to redo it. It looks like the reason that it is implementing the *1.5 for two-handed weapon is that it has been applied as DamPower rather than DamBonus, I'll go and bug report it now. |
#2 |
Member
Join Date: Jan 2015
Location: Wellington, NZ
Posts: 91
|
Hi Portilis,
Thanks very much for your help - i do now see why it doesnt work. Whilst i understand in theory the fix you are suggesting, i am not sure how to implement it. Any more help is appreciated! |
#3 |
Senior Member
Join Date: Feb 2013
Location: Blandford, UK
Posts: 164
|
I've attached a working .user file (albeit there's a couple of improvements that you could make, such as making it update the values shown for Piranha Strike before it renders).
It's running at Post-Level 10000 as that is when the Piranha Strike feat runs, so keeps the modifications at the same time. Code:
var bonus as number bonus = #BAB[] / 4 field[abValue].value += round(bonus,0,-1) + 1 if (hero.child[fPiranStr].field[abilActive].value <> 0) then hero.child[Damage].field[tDamPower].value += field[abValue2].value endif if (field[abilActive].value <> 0) then hero.child[Attack].field[atmPenalty].value += field[abValue].value endif]]> The first 2 lines are just setting up the bonus based on BAB, same as the base feat. The third line sets the value of the additional damage bonus and the quantity of attack restored if mythic power is spent. Lines 4-6 check whether the normal Piranha Strike feat is turned on and apply the additional damage if it is. Lines 7-9 check whether the negation tick box is ticked, and counteract the attack penalty applied by the normal feat if it is. Mythic Piranha Strike.user |
#4 |
Member
Join Date: Jan 2015
Location: Wellington, NZ
Posts: 91
|
Thanks again - it works brilliantly.
As per your suggestion i have added an extra piece of scripting in the render phase to update the piranha strike values. In case anyone else is interested: Add a second eval script, Phase: Render, Priority: 10000, Index: 2 Code:
field[abValue2].value = field[abValue].value * 3 hero.child[fPiranStr].field[livename].text = "Piranha Strike -" & hero.child[fMyPiranha].field[abValue].value & "/+" & field[abValue2].value if (field[abilActive].value <> 0) then hero.child[fPiranStr].field[livename].text = "Piranha Strike -" & "0" & "/+" & field[abValue2].value endif Last edited by stuartwaring; January 12th, 2015 at 04:11 PM. |
#5 |
Member
Join Date: Jan 2015
Location: Wellington, NZ
Posts: 91
|
I recently noticed a small issue - if Mythic Piranha Strike is ticked, but Piranha Strike is not, it actually give you a bonus to you to hit roll.
It has been fixed by adding in an extra check to ensure that when negating penalties, Piranha Strike is also activated. The new version of the feat is attached Piranha Strike (Mythic).user |
#6 |
|
|