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 08/12/22, 05:43 AM  
shanty

Forum posts: 0
File comments: 2
Uploads: 0
Been playing ESO from day 1 and I discover this now, yes really.

Are there any kick-ass examples people are using and can share here?

AMAZING addon
Report comment to moderator  
Reply With Quote
Unread 03/02/22, 05:54 AM  
Akopian Atrebates

Forum posts: 9
File comments: 230
Uploads: 0
Delay Timer

What this really needs is a delay timer as I will often get kicked from the server if it transfers too many items from inventory.
Report comment to moderator  
Reply With Quote
Unread 01/25/22, 07:10 AM  
Akopian Atrebates

Forum posts: 9
File comments: 230
Uploads: 0
A Little Love

I really like this addon, and I sure wish somebody would update it a little bit. All my inventory management, sales to npc merchants, etc, is automated on a character by character basis with this thing. Well, it was. Now it is not quite so reliable anymore after I left and came back for a year. Anyway, it really is a great addon.
Report comment to moderator  
Reply With Quote
Unread 08/24/21, 12:54 PM  
rosalith

Forum posts: 3
File comments: 11
Uploads: 0
Originally Posted by dbojan
The problem is with:

e[SPECIALIZED_ITEMTYPE_SPELLCRAFTING_TABLET] = nil

just like in Price tooltip addon.
Temp solution, comment AddOns/ItemTrig/triggers/conditions.lua, line 1659 so it looks like this:

--e[SPECIALIZED_ITEMTYPE_SPELLCRAFTING_TABLET] = nil
That fixes it, thanks!
Report comment to moderator  
Reply With Quote
Unread 08/24/21, 12:15 AM  
dbojan
AddOn Author - Click to view AddOns

Forum posts: 0
File comments: 17
Uploads: 1
The problem is with:

e[SPECIALIZED_ITEMTYPE_SPELLCRAFTING_TABLET] = nil

just like in Price tooltip addon.
Temp solution, comment AddOns/ItemTrig/triggers/conditions.lua, line 1659 so it looks like this:

--e[SPECIALIZED_ITEMTYPE_SPELLCRAFTING_TABLET] = nil
Report comment to moderator  
Reply With Quote
Unread 08/23/21, 10:07 AM  
rosalith

Forum posts: 3
File comments: 11
Uploads: 0
Since the update today itemtrig doesn't work at all, and gives these 2 errors

user:/AddOns/ItemTrig/triggers/conditions.lua:1659: table index is nil
stack traceback:
user:/AddOns/ItemTrig/triggers/conditions.lua:1659: in function 'SPECIALIZED_ITEMTYPE_TROPHY_MUSEUM_PIECE'
|caaaaaa<Locals> e = [table:1]{1 = "Meat Dish"} </Locals>|r
user:/AddOns/ItemTrig/triggers/conditions.lua:1769: in function '(main chunk)'
|caaaaaa<Locals> ItemInterface = [table:2]{FAILURE_NORMAL_FENCE_LIMIT = "FENL", FAILURE_LAUNDER_NOT_STOLEN = "LDNS", FAILURE_NORMAL_LAUNDER_LIMIT = "LNDR", FAILURE_ZENIMAX_DEPOSIT_LIMIT = "ZDPT", FAILURE_ZENIMAX_LAUNDER_LIMIT = "ZLND", FAILURE_ITEM_IS_INVALID = "INVA", FAILURE_FCOIS_DISALLOWS = "FCOI", FAILURE_NOT_ENOUGH_TO_REFINE = "RAMT", FAILURE_BANK_CHARACTER_BOUND = "BCHB", FAILURE_CANNOT_LOCK = "NLOK", FAILURE_BANK_IS_FULL = "BKFL", FAILURE_CANNOT_SPLIT_STACK = "SPLT", FAILURE_BANK_CANT_STORE_STOLEN = "BKST", FAILURE_MOD_NOT_SETUP = "NOPE", FAILURE_LAUNDER_CANT_AFFORD = "LNDG", FAILURE_BANK_IS_NOT_OPEN = "BKNO", FAILURE_FCOIS_NOT_INSTALLED = "NFCO", FAILURE_WRONG_CRAFTING_STATION = "WCFT", FAILURE_ITEM_IS_LOCKED = "LOCK", FAILURE_CANNOT_DECONSTRUCT = "DCON", FAILURE_BACKPACK_IS_FULL = "BGFL", FAILURE_CANNOT_REFINE = "REFN", FAILURE_CANNOT_FLAG_AS_JUNK = "NJNK", FAILURE_ZENIMAX_WITHDRAW_LIMIT = "ZWTH"}, Set = [table:3]{}, _s = [C]:-1, ConditionBase = [table:4]{} </Locals>|r
assert: There is a problem with ItemTrig's trigger condition list. A syntax error or script error may have prevented the list from loading properly. The add-on is not usable in this state; please notify the developer.
stack traceback:
[C]: in function 'assert'
user:/AddOns/ItemTrig/ItemTrig.lua:645: in function 'Initialize'
user:/AddOns/ItemTrig/ItemTrig.lua:733: in function 'OnAddonLoaded'
|caaaaaa<Locals> eventCode = 65536, addonName = "ItemTrig" </Locals>|r
Report comment to moderator  
Reply With Quote
Unread 07/01/21, 10:15 AM  
rosalith

Forum posts: 3
File comments: 11
Uploads: 0
WOW is this one a hidden gem !!
I use it to auto destroy all the crappy loot like basic trait stones (I'm non eso plus sub) and non-set armor/weapons, white quality glyphs, etc so that I can leave on auto-loot. Now, I no longer spend half my play time on inventory managing. Lol Thanks for a great addon!
Report comment to moderator  
Reply With Quote
Unread 01/06/21, 06:55 AM  
dbojan
AddOn Author - Click to view AddOns

Forum posts: 0
File comments: 17
Uploads: 1
deposit all gold, keybinding

Hello.
Thanks for the great addon

-I know it's been mentioned before, but is there any chance of adding action: "deposit all gold from char to the bank"?

-Is it possible to add (default) key to disable/enable all scripts, (Maybe shift, or ctrl)
-(default) keybinding to to show itemtrig window (same as typing /itemtrig edit) ?

edit: added it myself, pretend will always be off, unless shift key is pressed, then it will be on.
in
local function _onBeforeRunTriggers()


Code:
if IsShiftKeyDown() then 
  ItemTrig.prefs:set("pretendActions", true) 
  d("pretend on")
else
  ItemTrig.prefs:set("pretendActions", false) 
  --d("pretend off")
end


Thanks.
Last edited by dbojan : 08/24/21 at 02:49 AM.
Report comment to moderator  
Reply With Quote
Unread 07/03/20, 07:11 AM  
EightChickens

Forum posts: 0
File comments: 7
Uploads: 0
Hi, can this be set up per character?
(character1 has separate triggers than character2)
Report comment to moderator  
Reply With Quote
Unread 06/27/20, 11:19 AM  
NoShotz

Forum posts: 0
File comments: 26
Uploads: 0
I know this hasn't been updated in a while, but would it be possible to have more value conditions using the values from LibPrice, it would allow you to use prices on auction houses via Arkadius' Trade Tools, Master Merchant, and Tamriel Trade Center.
Report comment to moderator  
Reply With Quote
Unread 03/25/20, 12:33 PM  
Daeymon

Forum posts: 0
File comments: 145
Uploads: 0
Originally Posted by RonanFrost
Originally Posted by Daeymon
Firstly, this addon is amazing!! Very well made.

Anyone know how I can create a trigger that tops up a stack in the bank back to a full 200? I can create a trigger which happens when I don't have a complete stack, but its put everything in my inventory into the bank.

So if the amount in the bank is 199, and I have 2 in my bag, then I only want 1 to be transferred. But instead it transfers 2. Any help would be appreciated.
what if you do something like:
Entry point
bank (run on banked)
Conditions
[whatever you're using to successfully identify your item]
Actions
Withdraw 9,999 of the item
Deposit 200 of the item
Let me know if that worked.
Thank you for the suggestion. Unfortunately it does not work. The deposit action does not work on that entry point.
Report comment to moderator  
Reply With Quote
Unread 03/24/20, 09:10 AM  
RonanFrost

Forum posts: 1
File comments: 6
Uploads: 0
Originally Posted by wazoo
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!
I'm not adept at doing "Nested Trigger" functions yet, but essentially you'll need to make it check your inventory multiple times in the same trigger. "is there >200? -> deposit 200 -> repeat"

Theoretically something akin to:
Entry point
Bank Opened
Condition
[whatever your successful identifier is]
Actions
Execute a nested trigger: StackDeposit
Conditions
The player's inventory contains at least 200 of the item
Actions
Deposit 200 of the item in the player's bank
Report comment to moderator  
Reply With Quote
Unread 03/24/20, 08:53 AM  
RonanFrost

Forum posts: 1
File comments: 6
Uploads: 0
Originally Posted by Daeymon
Firstly, this addon is amazing!! Very well made.

Anyone know how I can create a trigger that tops up a stack in the bank back to a full 200? I can create a trigger which happens when I don't have a complete stack, but its put everything in my inventory into the bank.

So if the amount in the bank is 199, and I have 2 in my bag, then I only want 1 to be transferred. But instead it transfers 2. Any help would be appreciated.
what if you do something like:
Entry point
bank (run on banked)
Conditions
[whatever you're using to successfully identify your item]
Actions
Withdraw 9,999 of the item
Deposit 200 of the item
Let me know if that worked.
Report comment to moderator  
Reply With Quote
Unread 03/19/20, 11:48 AM  
Daeymon

Forum posts: 0
File comments: 145
Uploads: 0
Firstly, this addon is amazing!! Very well made.

Anyone know how I can create a trigger that tops up a stack in the bank back to a full 200? I can create a trigger which happens when I don't have a complete stack, but its put everything in my inventory into the bank.

So if the amount in the bank is 199, and I have 2 in my bag, then I only want 1 to be transferred. But instead it transfers 2. Any help would be appreciated.
Report comment to moderator  
Reply With Quote
Unread 03/18/20, 10:04 AM  
RonanFrost

Forum posts: 1
File comments: 6
Uploads: 0
Post Deconstruct broken?

So I've tried numerous methods to get items to decon when crafting is opened, including copying the base example listed in the addon description and using the imported one. Nothing doing. Turned off my error suppression, no errors going on.

Everybody else getting things to decon still?

**UPDATE**

I got it to work - seems my decon will not, under any circumstances, work under:
Entry point-
"Crafting Menu Opened (run on banked items)"
Condition-
"Can Deconstruct"
Workaround: set up an identical trigger to pull things from the bank, and open bank first. :-\

Will continue to update this post if/when I figure anything else out.
Last edited by RonanFrost : 03/24/20 at 08:47 AM.
Report comment to moderator  
Reply With Quote
Post A Reply



Category Jump: