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:55
Total downloads:5,444
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/26/19, 07:37 AM  
dorrson

Forum posts: 0
File comments: 30
Uploads: 0
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.
Report comment to moderator  
Reply With Quote
Unread 08/25/19, 08:11 PM  
dorrson

Forum posts: 0
File comments: 30
Uploads: 0
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?
Report comment to moderator  
Reply With Quote
Unread 08/14/19, 10:46 AM  
DavidJCobb
 
DavidJCobb's Avatar
AddOn Author - Click to view AddOns

Forum posts: 1
File comments: 25
Uploads: 4
Originally Posted by Akopian Atrebates
Been getting the following error at login:

user:/AddOns/ItemTrig/misc/savedata.lua:154: in function 'ISavedataForAccount:character'
|caaaaaa<Locals> self = tbl, id = 8796093053022879, currentID = 8796093053022879, created = false </Locals>|r
user:/AddOns/ItemTrig/savedata.lua:53: in function 'ItemTrig.Savedata:load'
|caaaaaa<Locals> self = tbl </Locals>|r
user:/AddOns/ItemTrig/ItemTrig.lua:648: in function 'Initialize'
user:/AddOns/ItemTrig/ItemTrig.lua:733: in function 'OnAddonLoaded'
|caaaaaa<Locals> eventCode = 65536, addonName = "ItemTrig" </Locals>|r
I'm unable to reproduce this. The problem seems trivial to fix, but savedata in this game behaves slightly weirdly, so I'd prefer to be able to test any fix first.

Can you send me your SavedVariables file for ItemTrig? It should be at Documents/Elder Scrolls Online/live/SavedVariables/ItemTrig.lua.
Report comment to moderator  
Reply With Quote
Unread 08/13/19, 08:59 PM  
Akopian Atrebates

Forum posts: 9
File comments: 230
Uploads: 0
Been getting the following error at login:

user:/AddOns/ItemTrig/misc/savedata.lua:154: in function 'ISavedataForAccount:character'
|caaaaaa<Locals> self = tbl, id = 8796093053022879, currentID = 8796093053022879, created = false </Locals>|r
user:/AddOns/ItemTrig/savedata.lua:53: in function 'ItemTrig.Savedata:load'
|caaaaaa<Locals> self = tbl </Locals>|r
user:/AddOns/ItemTrig/ItemTrig.lua:648: 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/17/19, 12:08 PM  
DavidJCobb
 
DavidJCobb's Avatar
AddOn Author - Click to view AddOns

Forum posts: 1
File comments: 25
Uploads: 4
The previous ItemTrig update already added automatic refinement and FCOIS checks.
Report comment to moderator  
Reply With Quote
Unread 07/16/19, 10:53 PM  
jubalfh
 
jubalfh's Avatar

Forum posts: 0
File comments: 9
Uploads: 0
[quote=DavidJCobb]FCOIS compatibility is theoretically possible, when I next work on ItemTrig. The add-on offers an API and I assume that API will be kept stable. Taking a look at it, though, uh,... there's a lot. I could just add conditions and actions for marking items, but if I'm going to bother doing compatibility, I should do it all the way -- for example, it looks like FCOIS can be asked to prevent certain actions, so I'd want to amend ItemTrig trigger actions to pay attention to that.

You might also want to have a look at AutoCategory, which provides a stable API.
Report comment to moderator  
Reply With Quote
Unread 07/16/19, 10:48 PM  
jubalfh
 
jubalfh's Avatar

Forum posts: 0
File comments: 9
Uploads: 0
Originally Posted by NoShotz
I really wish it were possible to refine materials with this addon, but if even if there were a refine action, it seems it doesn't trigger when items in your craft bag meet the conditions set.
I think the AutoRefine plugin might ease your pain. It certainly did mine.
Report comment to moderator  
Reply With Quote
Unread 06/25/19, 09:07 AM  
MegwynW

Forum posts: 0
File comments: 20
Uploads: 0
Edit: All of these are fixed/added as of 1.0.11. Thank you

Bug Report:
- nil error on conditions.lua@1073-1077 - You're using item.x instead of context.x
- Withdrawing items from the bank ignores the quantity requested, ie 'withdraw 50 soul shards' instead withdraws the entire stack of 200.

Requests:
- Add $(link) for the itemlink, $(name) isn't always enough and having to go vendor/etc to check exactly what was sold is a pain.
- +1 for the FCOIS Support, that would be incredibly helpful.

Thanks!
Last edited by MegwynW : 07/12/19 at 08:53 PM.
Report comment to moderator  
Reply With Quote
Unread 06/23/19, 07:03 PM  
NoShotz

Forum posts: 0
File comments: 26
Uploads: 0
Originally Posted by DavidJCobb
for example, it looks like FCOIS can be asked to prevent certain actions, so I'd want to amend ItemTrig trigger actions to pay attention to that.
Yeah, it makes it so you can't accidentally deconstruct or sell something you marked for research.
Report comment to moderator  
Reply With Quote
Unread 06/23/19, 06:41 PM  
DavidJCobb
 
DavidJCobb's Avatar
AddOn Author - Click to view AddOns

Forum posts: 1
File comments: 25
Uploads: 4
Originally Posted by NoShotz
This addons looks really cool, and I was wondering if it were possible to support the markers from FCO Item Saver, so that you could sell stuff based on if they are marked with FCOIS's sell at store marker for example. Also would be cool if this addon could apply markers from FCOIS to items.

Also would be nice if there were conditions for the different types of armor (heavy, medium, light) and the same for weapons (1h sword, mace, axe, etc)

I really wish it were possible to refine materials with this addon, but if even if there were a refine action, it seems it doesn't trigger when items in your craft bag meet the conditions set.
FCOIS compatibility is theoretically possible, when I next work on ItemTrig. The add-on offers an API and I assume that API will be kept stable. Taking a look at it, though, uh,... there's a lot. I could just add conditions and actions for marking items, but if I'm going to bother doing compatibility, I should do it all the way -- for example, it looks like FCOIS can be asked to prevent certain actions, so I'd want to amend ItemTrig trigger actions to pay attention to that.

Conditions for armor and weapon types are a good idea. I'll see about that when I next return to ItemTrig. I'm beginning to be able to work on stuff again -- which means ItemTrig isn't the only published mod in need of updates!

Currently there is no way to run triggers on Craft Bag items. I could add that like I did with banked items, but given the Craft Bag's infinite size, I'm worried about performance impacts.
Last edited by DavidJCobb : 06/23/19 at 06:42 PM.
Report comment to moderator  
Reply With Quote
Unread 06/23/19, 02:47 PM  
NoShotz

Forum posts: 0
File comments: 26
Uploads: 0
I really wish it were possible to refine materials with this addon, but if even if there were a refine action, it seems it doesn't trigger when items in your craft bag meet the conditions set.
Report comment to moderator  
Reply With Quote
Unread 06/23/19, 01:38 PM  
NoShotz

Forum posts: 0
File comments: 26
Uploads: 0
Also would be nice if there were conditions for the different types of armor (heavy, medium, light) and the same for weapons (1h sword, mace, axe, etc)
Report comment to moderator  
Reply With Quote
Unread 06/22/19, 07:37 PM  
NoShotz

Forum posts: 0
File comments: 26
Uploads: 0
This addons looks really cool, and I was wondering if it were possible to support the markers from FCO Item Saver, so that you could sell stuff based on if they are marked with FCOIS's sell at store marker for example. Also would be cool if this addon could apply markers from FCOIS to items.
Report comment to moderator  
Reply With Quote
Unread 06/11/19, 04:16 PM  
Sekrin

Forum posts: 8
File comments: 9
Uploads: 0
Originally Posted by Clazy
Originally Posted by Clazy
Loving the addon and its been making my life easier. But of recent I have encountered a problem with one of the triggers I'm using. The trigger is "Deposit in Bank". The trigger works at first for me and it does what it is suppose to. But when I start reaching around 215 items in my bank it will not longer "Deposit in Bank". I usually have to start manuelly depositing stuff after that. I'm wondering if there is a problem with how I am using it or if it is just me. The conditions and trigger specifically:

Conditions:
The item is an [any equippable].
The item is not flagged as junk.
The item is not locked.
Actions
Deposit 1 of the item in the Player's Bank.

Thank you in advanced.

btw My max bank space as of right now in my bank is 480 and that is including the doubled space by ESO Plus.
About this issue. I found that the addon was telling me my bank was full even though it wasn't. So I'm guessing there is a max inventory part somewhere. I dunno but if that helps you in the future. cool beans.
I was also getting the same issue and have done some digging this evening and I believe that I've found the problem.

Before ItemTrig attempts to move an item to the bank, it first checks to make sure there's enough space. However, there are actually two "banks" - one called "BAG_BANK" that contains the bank slots that everyone gets, and one called "BAG_SUBSCRIBER_BANK" that contains the extra slots that subscribers have - and ItemTrig is only checking the first bank when it needs to check both.

If you want to sort it yourself whilst you wait for an official fix, open ItemTrig/misc/item.lua and change line 1307 from:
Code:
if not DoesBagHaveSpaceFor(BAG_BANK, self.bag, self.slot) then
to:
Code:
if not DoesBagHaveSpaceFor(BAG_BANK, self.bag, self.slot) and not DoesBagHaveSpaceFor(BAG_SUBSCRIBER_BANK, self.bag, self.slot) then
Report comment to moderator  
Reply With Quote
Unread 06/11/19, 02:05 PM  
Clazy

Forum posts: 0
File comments: 2
Uploads: 0
Originally Posted by Clazy
Loving the addon and its been making my life easier. But of recent I have encountered a problem with one of the triggers I'm using. The trigger is "Deposit in Bank". The trigger works at first for me and it does what it is suppose to. But when I start reaching around 215 items in my bank it will not longer "Deposit in Bank". I usually have to start manuelly depositing stuff after that. I'm wondering if there is a problem with how I am using it or if it is just me. The conditions and trigger specifically:

Conditions:
The item is an [any equippable].
The item is not flagged as junk.
The item is not locked.
Actions
Deposit 1 of the item in the Player's Bank.

Thank you in advanced.

btw My max bank space as of right now in my bank is 480 and that is including the doubled space by ESO Plus.
About this issue. I found that the addon was telling me my bank was full even though it wasn't. So I'm guessing there is a max inventory part somewhere. I dunno but if that helps you in the future. cool beans.
Report comment to moderator  
Reply With Quote
Post A Reply



Category Jump: