Lone Wolf Development Forums  

Go Back   Lone Wolf Development Forums > Hero Lab Forums > HL - D&D 5th Edition SRD
Register FAQ Community Today's Posts Search

Notices

Reply
 
Thread Tools Display Modes
spannclann
Member
 
Join Date: Aug 2018
Location: Texas
Posts: 87

Old March 21st, 2024, 10:35 AM
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
spannclann is offline   #1 Reply With Quote
spannclann
Member
 
Join Date: Aug 2018
Location: Texas
Posts: 87

Old March 23rd, 2024, 10:13 AM
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
spannclann is offline   #2 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 02:16 AM.


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