• Please note: In an effort to ensure that all of our users feel welcome on our forums, we’ve updated our forum rules. You can review the updated rules here: http://forums.wolflair.com/showthread.php?t=5528.

    If a fellow Community member is not following the forum rules, please report the post by clicking the Report button (the red yield sign on the left) located on every post. This will notify the moderators directly. If you have any questions about these new rules, please contact support@wolflair.com.

    - The Lone Wolf Development Team

Setting Hade.Equipment tag in an Eval Script?

zarlor

Well-known member
I seem to be completely stumped by this, even if the answer is somehow completely obvious. I have certain items of equipment that I want to hide from the purchase list if a specific source is taken. In this case I'm working specifically with Evernight where there is a second phase to the game that changes the cost of equipment so when that second phased is entered the user would just select and add the "Evernight: Part 2" source in Character Config to show all of the new prices, but at the same time I want to just hide the older versions of that same equipment without precluding it (because I want the old versions to still be valid for characters that still have them.) At any rate here is what I've be using on the Equipment I want to hide, and I've tried various timings (the earliest I can use is Initialize/2000).

Code:
if (hero.tagis[source.EN2] <> 0) then
    perform this.assign[Hide.Equipment]
endif

I've also trued just perform assign[Hide.Equipment] but in either case the tag doesn't seem to get assigned and I can still see the old equipment on the list of purchasable items (along with the new gear) once I add the new Source in. Anyone have some ideas on what I'm doing wrong here?
 
If I understand correctly, you're using a script that's intended to run on an item before it's selected, in order to prevent that item from being selected?

Scripts do not run until an item has been added to the character.
 
Ok, so how do I set the Hide.Equipment tag on something, conditionally, before it's been selected? I guess maybe I'd have to set tags on all the stuff I want to hide conditionally but run the script, picking through everything, in something like the Setting Adjust or Mechanic?
 
That cannot be done. You cannot assign tags to a thing - you can only assign tags to a pick.

I'd use a prereq for this - all the equipment that's only available under a certain circumstance gets a prereq saying "you can't take this now", except when it's a pick:

validif (@ispick <> 0)
validif (hero.tagis[source.EN2] <> 0)
 
Back
Top