Senior Member
Join Date: Aug 2018
Location: Texas
Posts: 109
|
I was wanting to create this feat to allow the use of WIS modifier over DEX. I am using the "Hex Warrior" Class Special as a base, but I cannot see where it allows the drop down menu to select WIS. I know I want to change the BaseWep to only allow ranged weapons.
doneif (tagis[Helper.Disable] = 1) doneif (field[abilActive].value = 0) ~ foreach pick in hero from BaseWep foreach pick in hero from BaseWep where "(fieldval:gIsEquip <> 0) & !wProperty.TwoHanded" eachpick.field[wMelAttTxt].text = "charisma" eachpick.field[wMeleeAttr].value = hero.child[aCHA].field[aBonus].value eachpick.field[wDamAttr].value = hero.child[aCHA].field[aBonus].value nexteach |
#1 |
Senior Member
Join Date: Aug 2018
Location: Texas
Posts: 109
|
I found a fix.
I used the eval script from the monks when they can use either their STR or DEX modifier when unarmed. I changed two things: 1. changed the modifier comparison to WIS 2. the unarmed to Range Projectiles Changing the modifier comparison to WIS and unarmed to range projectiles makes the eval script compare Dex mod (typical of range projectiles) to WIS. If WIS is higher, the WIS mod is applied instead. ~ If we're not shown, just get out now doneif (tagis[Helper.ShowSpec] = 0) ~ If we're disabled, do nothing doneif (tagis[Helper.Disable] <> 0) ~ Now foreach through and carry out calculations to replace the wMain tag if the average ~ damage of our current tag is higher than the current one. var curdicenum as number var curdicesiz as number var curwepavg as number var dotpos as number var tagstring as string var searchexpr as string searchexpr = "wCategory.RangeProj" foreach pick in hero from BaseWep where searchexpr ~We have the option of using Dex instead of Str for attack and damage perform eachpick.assign[MelAttOpt.aWIS] perform eachpick.assign[DamageOpt.aWIS] ~See if our replacement damage would offer a better average damage than what the weapon can currently deal ~debug "We're active. This is " & eachpick.idstring curdicenum = eachpick.field[wDieCount].value curdicesiz = eachpick.field[wDieSize].value ~debug "curdicenum is " & curdicenum ~debug "curdicesiz is " & curdicesiz curwepavg = (curdicesiz + 1)/2 curwepavg *= curdicenum ~debug "After calculations, curwepavg is " & curwepavg & " and our threshold is " & field[abValue].value if (field[abValue].value > curwepavg) then ~debug "Ability is pushing the higher tag." eachpick.field[wDieCount].value = field[wDieCount].value eachpick.field[wDieSize].value = field[wDieSize].value endif nexteach Last edited by spannclann; March 23rd, 2024 at 10:14 AM. Reason: added script |
#2 |
|
|