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
Valdacil
Senior Member
 
Join Date: Feb 2017
Posts: 119

Old May 30th, 2017, 09:30 PM
Scenario: I'm trying to replace the headbands that grant stat bonuses with a headband setting item that would attach to another headband (this as an alternate to ABP). I'm 90% done except I ran into an issue with INT. On the headbands that have INT, there is a selector (or two) to select a skill to grant bonus ranks. I'm already using 2 selectors on the item; one to select the headband it attaches to and the second to select the stat to provide the bonus to. Since I don't have room for an additional selector for skill, I found the ioINTHelp item which adds another item for skill selector(s). This is bootstrapped by the headbands that have +6 INT to select a 3rd skill. I modified this item for my purposes and intend to bootstrap 1 (for +2 and +4) or 2 (for +6) of them. However, if the user doesn't select INT from the usrChosen2, then these additional items are unnecessary and I want to hide them.

Is there a tag to hide an equipment item on the Magic screen (the thing is on the Wondrous tab in the editor)? I've already tried Hide.Equipment but it says that tag doesn't exist.
Valdacil is offline   #1 Reply With Quote
Aaron
Senior Member
 
Join Date: Oct 2011
Posts: 6,793

Old May 31st, 2017, 06:34 AM
Hide.Gear
Aaron is offline   #2 Reply With Quote
Valdacil
Senior Member
 
Join Date: Feb 2017
Posts: 119

Old May 31st, 2017, 01:56 PM
That worked successfully to hide it, but I cannot get it to unhide. I've put debugging in so I know that the condition to run the following line is working and the script is getting to the line, however the Hide.Gear tag is still on the pick so the line isn't working:

Quote:
~ make sure we've been added by something else, and that pick can be equipped
doneif (isroot = 0)

doneif (root.tagis[component.BaseEquip] = 0)

~ If there are lots of items on the Magic Items tab, there is likely some things which would appear in the alphabet between 3rd and whatever bootstrapped us. Therefore, set our livename so we'll sort near our root.
field[livename].text = root.field[thingname].text & " Skill"

~ Items which would add enhancement bonuses to attributes do not do so
~ when we are using the Auto Bonus Progression rules from Pathfinder Unchained.
doneif (hero.tagis[source.PUAutoB?] <> 0)

debug "abValue3 = " & root.field[abValue3].value
~ If our parent hasn't selected INT (abValue3 = 1) then hide ourselves
If (root.field[abValue3].value = 1) then
debug "I should unhide"
perform delete[Hide.Gear]
Else
perform assign[Hide.Gear]
EndIf

~ If we haven't selected anything, get out now
doneif (field[usrChosen1].ischosen = 0)

if (root.field[usrChosen1].chosen.field[gIsEquip].value <> 0) then
~ now, we'll add item ranks to that skill equal to our HD
field[usrChosen1].chosen.field[skItem].value += herofield[tHitDice].value
endif

~ if 2nd selector is present, check if selected something
doneif (tagis[fShowWhat2.?] = 0)
doneif (field[usrChosen2].ischosen = 0)

if (root.field[usrChosen1].chosen.field[gIsEquip].value <> 0) then
~ now, we'll add item ranks to that skill equal to our HD
field[usrChosen2].chosen.field[skItem].value += herofield[tHitDice].value
endif
Debug log shows "I should unhide" when I select INT (which sets abValue3 = 1 on the parent) so I know it is getting to that line.
Valdacil is offline   #3 Reply With Quote
Aaron
Senior Member
 
Join Date: Oct 2011
Posts: 6,793

Old May 31st, 2017, 04:07 PM
Try triggering a full evaluation when the thing should be unhidden. Also, why are you deleting a tag near that debug? Shouldn't you just not be assigning the hide tag instead?
Aaron is offline   #4 Reply With Quote
Valdacil
Senior Member
 
Join Date: Feb 2017
Posts: 119

Old May 31st, 2017, 07:29 PM
What do you mean by 'triggering a full evaluation"?

That IF statement either hides or unhides depending on the status of the parent abValue3. If it is 1, then it should unhide the thing. If it isn't 1 then it should hide the thing. The hiding part is working correctly. But when abValue3 = 1, it executes the debug command, but fails to remove the tag, so the thing remains hidden (when it should not).
Valdacil is offline   #5 Reply With Quote
Valdacil
Senior Member
 
Join Date: Feb 2017
Posts: 119

Old May 31st, 2017, 07:32 PM
Full evaluation didn't do anything.

This line doesn't work. Tag is still on the thing and does not successfully delete. But I know it is executing that portion because of the debug command.

perform delete[Hide.Gear]
Valdacil is offline   #6 Reply With Quote
Farling
Senior Member
 
Join Date: Mar 2013
Location: Greater London, UK
Posts: 2,623

Old May 31st, 2017, 11:22 PM
Quote:
Originally Posted by Valdacil View Post
What do you mean by 'triggering a full evaluation"?

That IF statement either hides or unhides depending on the status of the parent abValue3. If it is 1, then it should unhide the thing. If it isn't 1 then it should hide the thing. The hiding part is working correctly. But when abValue3 = 1, it executes the debug command, but fails to remove the tag, so the thing remains hidden (when it should not).
Do you have a different script which is adding the Hide.Gear tag? Otherwise, there is no need to unhide something which won't exist.

Don't forget that every time scripts run, everything has been reset to a default state. No state information is kept between one run of a script and another.
Farling is offline   #7 Reply With Quote
Valdacil
Senior Member
 
Join Date: Feb 2017
Posts: 119

Old June 1st, 2017, 09:58 AM
Quote:
Originally Posted by Farling View Post
Do you have a different script which is adding the Hide.Gear tag? Otherwise, there is no need to unhide something which won't exist.

Don't forget that every time scripts run, everything has been reset to a default state. No state information is kept between one run of a script and another.
Good question, but no, I don't have any other script that adds Hide.Gear to the item and it doesn't have Hide.Gear on the base item. Hide.Gear is only added to the pick under the conditions above. If I comment out the line, it is not hidden... but also not hidden when I want it to be of course.
Valdacil is offline   #8 Reply With Quote
Valdacil
Senior Member
 
Join Date: Feb 2017
Posts: 119

Old June 1st, 2017, 04:16 PM
Ok, now at this point, I have it properly deleting the tag Hide.Gear when I want it to... however, the pick is still hidden even when it doesn't have the Hide.Gear tag.
Valdacil is offline   #9 Reply With Quote
Valdacil
Senior Member
 
Join Date: Feb 2017
Posts: 119

Old June 1st, 2017, 04:40 PM
So I tried a different thing. Instead of hiding the whole row, I tried deleting [fShowWhat.Skills] and [ChooseSrc1.Hero] hoping that would hide the selector. Then if the user selects INT in the main item's attribute selector, I add those 2 tags to the pick. That part is working, the tags successfully delete or hide appropriately based on the selection. However, no matter the status of the tags, the actual interface does not change. It always shows the initial state (hidden). This seems to be the same behavior if I show/hide the entire gear item. It only shows the initial state (hidden).

Is there any known reason why it is not updating the display of the pick (whether selectors hidden/shown or entire pick hidden/shown) based on status change or is that just not something that it will ever do?
Valdacil is offline   #10 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 07:10 AM.


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