Download
(185 Kb)
Download
Updated: 09/22/19 05:48 AM
Pictures
File Info
Compatibility:
Dragonhold (5.2.5)
Scalebreaker (5.1.5)
Elsweyr (5.0.5)
Updated:09/22/19 05:48 AM
Created:03/22/19 12:08 PM
Monthly downloads:45
Total downloads:5,399
Favorites:12
MD5:
Categories:Bags, Bank, Inventory, Utility Mods
ItemTrig  Popular! (More than 5000 hits)
Version: 1.0.14
by: DavidJCobb [More]
ItemTrig is an inventory management add-on that allows you to define custom rules, to automatically perform actions on items in your inventory.

Custom rules come in the form of triggers. Each trigger has entry points, conditions, and actions. The entry point decides when ItemTrig should attempt to test the trigger's conditions; if all of the conditions are met, then the actions will be performed in sequence. This allows you to define flexible rules for handling items as they enter your inventory, or when you open certain services (e.g. crafting stations, merchants).

Here's a basic trigger, to serve as an example:

Name: Deconstruct intricate
Entry points: Crafting Menu Opened
Conditions:
1. The item [is] an [any equippable].
2. The item [is] intricate.
3. The current crafting station [is appropriate for] this item.
4. The player [has not] maxed out their [crafting skill for this item] skill.
Actions:
1. Deconstruct the item.

If you were to define that trigger and then open the crafting menu, then ItemTrig would attempt to automatically deconstruct any intricate equipment in your inventory -- but only if you haven't already maxed out the relevant item skill!

One word of warning, though: ItemTrig will do exactly what you tell it to, even if that's not what you meant.

How does this compare to Dustman?
Dustman is fast and much simpler to set up. It's an excellent mod, and if you're not looking to perform specialized tasks, then it's the mod for you.

ItemTrig is more useful for specialized tasks. You may wish, for example, to destroy low-rarity stolen treasures unless they're useful for the Covetous Countess quest, in which case you might want them laundered instead. You may wish to destroy stolen lockpicks if you already have a full or nearly-full stack of "clean" ones. You may wish to destroy incoming equipment unless it belongs to a specific item set. ItemTrig gives you the building blocks to do any of these (and much more), but you have to assemble those building blocks yourself. The ability to do so is ItemTrig's raison d'ętre.

Extra notes
This add-on requires LibAddonMenu-2.0 and LibStub to function.

You can open the trigger editor via the add-on's options menu, or by entering /itemtrig edit in the chatbox.

ItemTrig has a gallery of built-in triggers. You can import triggers from the gallery, or between characters, by clicking the "Import" button in the main window.

Most entry points only run triggers on the items in your backpack. Your equipped gear does not count as being "in your backpack." The entry points that run triggers on items in your bank are explicitly marked (e.g. "Crafting Menu Opened (runs on banked items)").

When writing your own triggers, consider enabling "Pretend Mode" in the options when you're testing. This feature prevents ItemTrig from taking any action on your inventory, instead announcing the actions it would take. It's a good way to make sure your "destroy these items that I don't care about" trigger doesn't match more than it's meant to!

Links
Github repo
1.0.14
Fixed a bug in the Modify Junk Flag action which caused it to always think it failed. Previously, the action was programmed to double-check that the "junk" flag on the item was successfully changed; however, this is not possible, as the game only updates the flag on the item once the server confirms it's been set (which can take over a tenth of a second). The action no longer runs this check; it now always assumes it will succeed.

Added a "Play Sound" trigger action. The action is programmed so that no more than one of each sound can play at a time (i.e. if fifty items match the same trigger, you won't hear the trigger's sound at 50x volume). However, different sound effects can still stack.

After deleting a condition or action from a trigger, the editor will now select the next condition/action in the list (or the previous one, if there is no next one).

1.0.13
Fixed a typo that caused ItemTrig to improperly save triggers that used multiple entry points: only the last-selected entry point for the trigger would be saved.

1.0.12
Fixed a bug that caused the Total Count condition to always check your inventory count, even if you asked for the bank or craft bag count.

Updated the mod in preparation for API changes currently being tested on the PTS.

1.0.11
ItemTrig should now be compatible with FCO ItemSaver: trigger actions will fail if FCO ItemSaver has been set to prevent them (e.g. trying to deconstruct something that you've locked in FCOIS). ItemTrig also offers a trigger condition to check whether FCOIS is installed, a condition to check the FCOIS marks on an item, and a trigger action to modify the marks on an item.

Added new conditions to check an armor's type (light/medium/heavy) and a weapon's type (sword/greatsword/staff/shield/etc.).

Added new conditions to check whether an item can be deconstructed, and to check whether an item can be refined. Gallery triggers involving deconstruction now use the former condition.

Added a new condition to check whether the Craft Bag is accessible.

Added a new action to queue the mass refinement of a single type of raw material, or of all raw materials across your inventory and Craft Bag. Due to how refinement works in-engine, it is impossible to limit what materials get refined or from where.

The "Log Message" trigger action now offers a "$(link)" token that can be used to produce an item link.

Users have reported that the "Withdraw from Bank" trigger action withdraws an entire item stack, even if it is directed to only withdraw a certain amount of the item. Unfortunately, this appears to be an issue with the underlying ZOS API: the same API is used for deposits and withdrawals, and when withdrawing, it seems to ignore its "count" parameter. As such, the "Withdraw from Bank" trigger action has had its own count option removed; it now only offers the option to withdraw a full stack, and its description makes this clear.

Fixed a Lua error that left the "Meets Usage Requirement" condition unusable.

1.0.10
Fixed issues that prevented ItemTrig from seeing the expanded bank space added by ESO Plus.

Fixed a few pieces of code that mixed up the Craft Bag with the expanded bank space added by ESO Plus. The fixed functions include those that power the Total Count condition.

Added a "Withdraw from Bank" trigger action, available for the "Bank Opened (run on banked items)" entry point.

Made minor fixes to savedata versioning (don't worry; the relevant bugs didn't affect anything).

1.0.9
Fixed defects in multiple gallery triggers: "sell" triggers will no longer attempt to sell stolen items; the "sell trash" trigger now correctly uses the "sell" action instead of the "launder" action; the "deconstruct worthless equipment" trigger will no longer try and fail to deconstruct provisioning ingredients when you are at a cooking station.

As of this version, ItemTrig will remember which triggers you imported from the Trigger Gallery. As long as you don't modify these triggers, they will auto-update if later versions of the mod fix their counterparts in the Trigger Gallery. You can disable this auto-updating in the mod settings.

1.0.8
Fixed a minor issue with the "Banked items: allow destroy" pref, which could cause LibAddonMenu errors to appear in the chat console.

1.0.7
Fixed a hang that could occur when trying to deconstruct multiple items, if your triggers directed ItemTrig to deconstruct items that for non-obvious reasons aren't considered deconstructable (e.g. the Forgotten Adventurer's Bow).

Deconstruction now properly "finishes" and logs a success after processing deconstruction of one single item; you should no longer incorrectly see warnings about "interrupting" the queue when leaving the crafting station.

1.0.6
Added two new entry points that will run triggers on items in your bank: "Bank Opened (run on banked items)" and "Crafting Menu Opened (run on banked items)." If you wish to run a trigger on both carried and banked items, then use it on both these entry points and the normal "Bank Opened" and "Crafting Menu Opened" entry points. The intended use case for this is being able to automatically deconstruct banked items.

The "Deposit in Bank" action will now cause a trigger failure and show an error message when attempting to deposit Character Bound items, instead of just failing silently.

Added a "Bound" condition to test whether an item is bound, or to test whether an item is Character Bound, specifically.

Zenimax forcibly disconnects players from the server if their add-ons attempt to deposit more than 99 item stacks in the bank during one bank session. ItemTrig is now aware of this and will attempt to stay 2 stacks below the limit. Note that ItemTrig cannot be aware of what other add-ons are doing, so ItemTrig and other add-ons can still exceed the limit together (this is also the case for laundering items).

Fixed a bug that could cause attempts to enable/disable a top-level trigger to fail.

Added an option to improve logging of trigger failures by "collapsing" certain kinds of trigger failures when they occur more than once. For example, if you have a trigger that tries to deposit ten items into your bank, and your bank is full, you do not need to see ten error messages all telling you that the bank is full. This option will instead display full details on the first such trigger failure, and then (after all triggers for the entry point have finished running) display the number of triggers that experienced the same error. This option is enabled by default.

Added an option to forcibly prevent triggers from destroying items in your bank, even if they run on bank-specific entry points. If the option is enabled, then Destroy actions on a banked item will cause a trigger failure. This does not apply to deconstructing items.

Made various fixes and improvements to ItemTrig's tooltips.

1.0.5
Added a new condition: "Item Type (Detailed)." This condition can be used to check for very specific item categories, such as "Museum Piece."

Added buttons to the trigger editor to duplicate a selected condition or action.

Fixed window sizing for the condition/action editor. Sizing errors could be seen when editing conditions/actions with long values (e.g. a Comment condition with copypasta stuffed into it).

Fixed theming for the condition/action option editor. Previously, explanatory text for some condition/action options didn't theme properly and was always in white print.

The description for the "Covetous Countess" condition should no longer produce an incorrect sentence.

Minor fixes to the "Deconstruct" trigger action: ItemTrig should no longer log both a "success" message and a "failure" message if a deconstruct is attempted and fails; if a deconstruct fails because your inventory is full, then all pending deconstructs will be aborted.

1.0.4
Critical fixes to the "Deconstruct" trigger action; it will no longer fail silently after deconstructing a single item, and it now works on enchanting glyphs.

Fixed the "Pretend Mode" option: triggers will no longer continue to run on an item after pretending to destroy, deconstruct, sell/fence, or deposit it.

1.0.3
Added a theme switcher to the add-on's options menu.

Added a dark theme.

Added more pre-made triggers to the Trigger Gallery accessible via the "Import" button.

Fixed some pre-made triggers that would've logged errors if run on locked items.

Fixed a bug with the "Esc force-closes the editor" option that made it always take effect even if disabled.

Fixed spacing on the validation tooltip in the opcode argument editor.

Deprecated the "Priority Sell" condition.

1.0.2
Fixed a packaging mistake with the mod.

The "Sell or Fence" action will now fail on locked items.

1.0.1
Fixed the sort order for the rarities in the "Item Rarity" condition.

The "Sell or Fence" action's explanation text now properly identifies it as being usable in the merchant or fence menus.

Fixed internal issues with quantity options (e.g. "at most 5," "at least 1") for conditions and actions.
Optional Files (0)


Archived Files (12)
File Name
Version
Size
Uploader
Date
1.0.12
185kB
DavidJCobb
08/08/19 05:59 AM
1.0.11
184kB
DavidJCobb
07/11/19 05:21 AM
1.0.10
171kB
DavidJCobb
06/22/19 06:01 PM
1.0.9
170kB
DavidJCobb
05/02/19 02:34 PM
1.0.8
168kB
DavidJCobb
04/30/19 04:01 PM
1.0.7
168kB
DavidJCobb
04/25/19 06:57 PM
1.0.6
168kB
DavidJCobb
04/25/19 05:29 PM
1.0.5
165kB
DavidJCobb
04/07/19 03:04 PM
1.0.4
162kB
DavidJCobb
03/28/19 03:08 PM
1.0.3
159kB
DavidJCobb
03/23/19 07:25 PM
1.0.2
152kB
DavidJCobb
03/22/19 07:04 PM
1.0.1
151kB
DavidJCobb
03/22/19 01:12 PM


Post A Reply Comment Options
Unread 01/25/20, 11:02 PM  
wazoo

Forum posts: 0
File comments: 50
Uploads: 0
Hi guys!

I want to deposit in my bank only full stacks of materials.
I created a trigger:
Code:
Conditions:
The item belongs to the Material category.
The player's inventory contains at least 200 of the item.
Actions:
Deposit 200 of the item in the player's bank
ItemTrig deposit in the bank ALL materials if they're 200+.
What I'm doing wrong? Any help?

Thanks!
Report comment to moderator  
Reply With Quote
Unread 12/05/19, 09:52 AM  
CookieDuster

Forum posts: 0
File comments: 11
Uploads: 0
Do you plan on implementing Craftstore or any other research/recipe tracker integration? It would be massively helpful for organizing recipes, blueprints and trait research items.
Report comment to moderator  
Reply With Quote
Unread 11/30/19, 06:08 PM  
DavidJCobb
 
DavidJCobb's Avatar
AddOn Author - Click to view AddOns

Forum posts: 1
File comments: 25
Uploads: 4
Originally Posted by Brotanks
Heya! Really enjoying this addon, but I've run into a problem. Specifically with the Toggle Junk Flag action. Whenever ItemTrig hits that action it marks the item as junk like it should, but then throws an error and stops processing any other actions in that trigger.
Should hopefully be fixed in the new update.
Report comment to moderator  
Reply With Quote
Unread 11/25/19, 09:07 PM  
Brotanks
AddOn Author - Click to view AddOns

Forum posts: 0
File comments: 7
Uploads: 1
Heya! Really enjoying this addon, but I've run into a problem. Specifically with the Toggle Junk Flag action. Whenever ItemTrig hits that action it marks the item as junk like it should, but then throws an error and stops processing any other actions in that trigger. If it was in a nested trigger, it pops back out to the trigger above and keeps going. I end up with spam in my chat box to the effect of:
Code:
Junked Item X
ItemTrig: Encountered an error in a trigger.
Item: Item X
Faulting Trigger: NestedTrigger
Containing Top-Level Trigger: TopTrigger
Action: Mark the item as junk.
Not a huge deal; it's mostly a problem because I would like to be able to throw in some "Stop processing top-level trigger" actions after junking but it skips over 'em.
Report comment to moderator  
Reply With Quote
Unread 11/14/19, 03:55 AM  
ZoLatKam
 
ZoLatKam's Avatar

Forum posts: 3
File comments: 143
Uploads: 0
Re: Re: Re: Re: General Help

Originally Posted by DavidJCobb
Originally Posted by ZoLatKam
Tried the above suggestion, which now looks like this:
https://cdn.discordapp.com/attachmen...019_181254.png
The OR condition has to go first.

Right now, your trigger requires that the item's name be Crown Refreshing Drink AND that it be Gold Coast Trapping Poison OR Crown Fortifying Meal OR Gold Coast Warrior Elixir OR Gold Coast Spellcaster Elixir OR Gold Coast Swift Survivor Elixir OR Gold Coast Debilitating Poison OR Gold Coast Draining Poison.
BOOM! This was the additional clarification I needed! Thx so much!

I honestly did not understand that's what you meant with your first response! <Picard Facepalm>

Seems to be working great as of 11.13.19!
Report comment to moderator  
Reply With Quote
Unread 11/08/19, 01:24 PM  
DavidJCobb
 
DavidJCobb's Avatar
AddOn Author - Click to view AddOns

Forum posts: 1
File comments: 25
Uploads: 4
Re: Re: Re: General Help

Originally Posted by ZoLatKam
Tried the above suggestion, which now looks like this:
https://cdn.discordapp.com/attachmen...019_181254.png
The OR condition has to go first.

Right now, your trigger requires that the item's name be Crown Refreshing Drink AND that it be Gold Coast Trapping Poison OR Crown Fortifying Meal OR Gold Coast Warrior Elixir OR Gold Coast Spellcaster Elixir OR Gold Coast Swift Survivor Elixir OR Gold Coast Debilitating Poison OR Gold Coast Draining Poison.
Report comment to moderator  
Reply With Quote
Unread 11/03/19, 06:21 PM  
ZoLatKam
 
ZoLatKam's Avatar

Forum posts: 3
File comments: 143
Uploads: 0
Re: Re: General Help

Originally Posted by DavidJCobb
Warning: Spoiler

You only need one "OR" condition, and it needs to go before the other conditions that you want OR-linked.

Switch to using OR to evaluate conditions.
The item's name is ABC.
The item's name is DEF.
The item's name is GHI.


The "OR/AND" condition affects all conditions that come after it in the same trigger (until the next "OR/AND" condition), rather than just the one condition that comes before it.
Tried the above suggestion, which now looks like this:
https://cdn.discordapp.com/attachmen...019_181254.png

Unfortunately, it did not work.

I've enabled the option that allows Triggers to run on Crown Crate Items as well, so I guess I'll see what happens in about 40m.


Edit #1 - 11.07.19 @ 21:54:28 - Okay, so RL happened and I wasn't able to test the rules until just now.

Still not working.

I collect the Daily Reward and it just ends up in my bags like normal. Thoughts?
Last edited by ZoLatKam : 11/07/19 at 09:56 PM.
Report comment to moderator  
Reply With Quote
Unread 10/22/19, 07:20 AM  
jubalfh
 
jubalfh's Avatar

Forum posts: 0
File comments: 9
Uploads: 0
Originally Posted by Akopian Atrebates
Since last update, it appears that FCO Item Saver tags are no longer being recognized.
Can't confirm on my side – though I have all functionality of FCOIS disabled (and do all the tagging / acting on tags via ItemTrig).
Report comment to moderator  
Reply With Quote
Unread 10/21/19, 09:45 PM  
Akopian Atrebates

Forum posts: 9
File comments: 230
Uploads: 0
Since last update, it appears that FCO Item Saver tags are no longer being recognized.
Report comment to moderator  
Reply With Quote
Unread 10/21/19, 05:45 PM  
jubalfh
 
jubalfh's Avatar

Forum posts: 0
File comments: 9
Uploads: 0
Originally Posted by CookieDuster
Having gone though quite a few inventory management addons looking for more and more advanced functionality, this looks like just what I'm looking for. I'm looking to re-implement rulesets of 30+ items, some of which have to change at times. Is there a way to keep them synced across multiple characters? I found the import function, but that seems to be one-way and one by one; not sure if I'm missing something here.
If I'm not badly mistaken, importing a trigger without changing it should be enough to have it automatically updated (now that the multiple entry points are not being lost).

(And you're right that importing one-by-one on more than one character is a bit tedious. Would it be feasible to implement a “common” or “global”, with changes stored per-account rather than per-character and perhaps have a bulk import for those triggers that can be templated off a shared one but then character-specific?)
Report comment to moderator  
Reply With Quote
Unread 10/16/19, 07:56 AM  
DavidJCobb
 
DavidJCobb's Avatar
AddOn Author - Click to view AddOns

Forum posts: 1
File comments: 25
Uploads: 4
Re: General Help

Originally Posted by ZoLatKam
Just looking for someone to point out what I'm doing wrong here...

I've the following rule set up with the goal of auto-destroying the "Worthless Crown Bits" from the Daily Rewards:

https://cdn.discordapp.com/attachmen...019_032527.png

(I'm sure there's a more efficient way, but I threw this together in a few minutes to see if it'd work)


I also have this option enabled:

https://cdn.discordapp.com/attachmen...019_033202.png


All helpful suggestions (that don't tell me to "Google it" or "Search the Interwebs" - I've tried that already) are appreciated!
You only need one "OR" condition, and it needs to go before the other conditions that you want OR-linked.

Switch to using OR to evaluate conditions.
The item's name is ABC.
The item's name is DEF.
The item's name is GHI.


The "OR/AND" condition affects all conditions that come after it in the same trigger (until the next "OR/AND" condition), rather than just the one condition that comes before it.
Last edited by DavidJCobb : 10/16/19 at 08:27 AM.
Report comment to moderator  
Reply With Quote
Unread 10/12/19, 02:53 AM  
ZoLatKam
 
ZoLatKam's Avatar

Forum posts: 3
File comments: 143
Uploads: 0
General Help

Just looking for someone to point out what I'm doing wrong here...

I've the following rule set up with the goal of auto-destroying the "Worthless Crown Bits" from the Daily Rewards:

https://cdn.discordapp.com/attachmen...019_032527.png

(I'm sure there's a more efficient way, but I threw this together in a few minutes to see if it'd work)


I also have this option enabled:

https://cdn.discordapp.com/attachmen...019_033202.png


All helpful suggestions (that don't tell me to "Google it" or "Search the Interwebs" - I've tried that already) are appreciated!
Report comment to moderator  
Reply With Quote
Unread 10/08/19, 04:02 PM  
CookieDuster

Forum posts: 0
File comments: 11
Uploads: 0
Having gone though quite a few inventory management addons looking for more and more advanced functionality, this looks like just what I'm looking for. I'm looking to re-implement rulesets of 30+ items, some of which have to change at times. Is there a way to keep them synced across multiple characters? I found the import function, but that seems to be one-way and one by one; not sure if I'm missing something here.

Also, would it be possible to also add CraftStore-based actions similarly to FCOIS? Seems to have a well maintained API and would let us distinguish between motifs, recipes and item traits that are unknown on self or other characters.
Report comment to moderator  
Reply With Quote
Unread 09/14/19, 02:27 PM  
DavidJCobb
 
DavidJCobb's Avatar
AddOn Author - Click to view AddOns

Forum posts: 1
File comments: 25
Uploads: 4
Terribly, terribly sorry about the delayed response! My time's been occupied by a fairly large project for another game, but I just want to let you know that I've seen your bug report and I'll work on it as soon as I'm able to. It's far too easy to think, "I should wait to reply until I can work on this," and then weeks fly right by.

You've done a really great job at narrowing this down and getting me test-cases -- providing me the savedata from the start was extremely useful -- and I want you to know that I appreciate that.

EDIT, one week later: That other project is now done. I've uploaded an ItemTrig update that should hopefully fix this.
Last edited by DavidJCobb : 09/22/19 at 05:49 AM.
Report comment to moderator  
Reply With Quote
Unread 08/26/19, 10:29 AM  
dorrson

Forum posts: 0
File comments: 30
Uploads: 0
Originally Posted by dorrson
Originally Posted by dorrson
Very interesting addon, I like the functionality and possible triggers that could be created. However, I seem to have an issue. Everytime I log out, all my entry points are lost for all the triggers I create.

I've went as far as manually trying to edit the code for the ItemTrig.lua saved variable... but it doesn't seem to stick.

Here's an example of what a trigger looks like that loses the entry points after logging out...

"$Junk Furnishings<[e|1][ep|BRTR,BRTR,BRTR,BRTR,BRTR,BRTR,BRTR][c|(28{1}{21})][a|(6{1})]>$Junk Materials (If Full Stack)<[e|1][ep|BRTR,BRTR,BRTR,BRTR,BRTR,BRTR,BRTR][c|(28{1}{4})(28{0}{21})(2{1})(11{2}{GTE,200})(11{5}{GTE,200})][a|(6{1})]>",

When this occurs, I have to update the Entry Points again. It lasts for the logged in duration, but again is lost upon next login.

Thoughts?
I thought I had narrowed it down to using the import function, pulling in a trigger from another character. But that doesn't seem to be the case so far. The only way I've been able to keep my triggers intact is to mark the saved variables file read only, after manually changing the entry points using a text editor. If I edit the entry points from the in game GUI for a single trigger, all entry points for all triggers on that character are lost.
It appears to be isolated to if I'm using multiple entry points for a trigger. If a character has triggers with only single entry points, they don't seem to be affected when editing from the gui. For the multiple entry point characters, editing one trigger, changes all of the triggers to the same entry point. Which appears to be the last item selected from the entry point drop down menu.
Report comment to moderator  
Reply With Quote
Post A Reply



Category Jump: