Hydrothermal
Member
I'm trying to add an adjustment that lets you select a slot and add more copies of it. My adjustment uses the custom menu expression ExtraSlot.Eqp? to get a list of all extra slot tags. I copied some code from the Weapon Focus feat and tried this:
Unfortunately it appears that fTargetId always looks for the usrChosen1 field, and the user menu field for adjustments is named pChosen instead. I could of course just write an if/elseif block to assign the right tag for every slot, but I'm sure there's a more elegant solution. Is there another way to assign a tag from the user menu?
Code:
doneif (tagis[Helper.FtDisable] <> 0)
doneif (field[pChosen].ischosen = 0)
var x as number
var slot as string
call fTargetId
for x = 1 to field[pAdjust].value
perform field[pChosen].chosen.setfocus
perform hero.assignstr["ExtraSlot." & slot]
next
Unfortunately it appears that fTargetId always looks for the usrChosen1 field, and the user menu field for adjustments is named pChosen instead. I could of course just write an if/elseif block to assign the right tag for every slot, but I'm sure there's a more elegant solution. Is there another way to assign a tag from the user menu?