Lone Wolf Development Forums  

Go Back   Lone Wolf Development Forums > Hero Lab Forums > HL - Pathfinder Roleplaying Game
Register FAQ Community Today's Posts Search

Notices

Reply
 
Thread Tools Display Modes
Hydrothermal
Junior Member
 
Join Date: Sep 2014
Location: USA
Posts: 11

Old April 2nd, 2019, 08:51 PM
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:

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?
Hydrothermal is offline   #1 Reply With Quote
Mathias
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 13,217

Old April 3rd, 2019, 07:23 AM
Code:
doneif (field[pChosen].ischosen = 0)

perform field[pChosen].chosen.pulltags[ExtraSlot.?]

var i as number
for i = 1 to field[pAdjust].value
  perform hero.pushtags[ExtraSlot.?]
  next
Mathias 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 01:00 AM.


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