Thread Tools Display Modes
02/17/18, 12:12 AM   #1
joshmiller83
AddOn Super User
 
joshmiller83's Avatar
Premium Member
Join Date: Mar 2014
Posts: 70
Question [REQUEST] Hide / Turn Off New Item (!)

I would like an Addon to Turn Off or Hide the (new item) Exclamation point in the Inventory and in the ESO+ Craft Bag?

When you are constantly getting new items and your OCD is telling you to clear those (!) ALL the freaking time is quite frustrating. lol

Last edited by joshmiller83 : 02/18/18 at 01:34 PM.
  Reply With Quote
02/17/18, 12:58 PM   #2
Ayantir
 
Ayantir's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2014
Posts: 1,019
Answer is in

esoui\ingame\inventory\inventory.lua

SHARED_INVENTORY:RegisterCallback("SlotAdded", function(bagId, slotIndex, newSlotData)
or
function ZO_UpdateStatusControlIcons(inventorySlot, slotData)

Have fun.
  Reply With Quote
02/17/18, 12:59 PM   #3
joshmiller83
AddOn Super User
 
joshmiller83's Avatar
Premium Member
Join Date: Mar 2014
Posts: 70
Um, ok. Thanks? lol

I know NO LUA so I'll wait for someone else to want this I guess!

Originally Posted by Ayantir View Post
Answer is in

esoui\ingame\inventory\inventory.lua

SHARED_INVENTORY:RegisterCallback("SlotAdded", function(bagId, slotIndex, newSlotData)
or
function ZO_UpdateStatusControlIcons(inventorySlot, slotData)

Have fun.
  Reply With Quote
02/17/18, 11:23 PM   #4
joshmiller83
AddOn Super User
 
joshmiller83's Avatar
Premium Member
Join Date: Mar 2014
Posts: 70
Question

Anyone willing to take a crack at this code?

If you don't wish to release it in an addon I could make it into a personal one, but I have no idea on the code I'd need.
  Reply With Quote
02/20/18, 06:40 PM   #5
joshmiller83
AddOn Super User
 
joshmiller83's Avatar
Premium Member
Join Date: Mar 2014
Posts: 70
Question

Anyone? Please?
  Reply With Quote
02/21/18, 05:44 AM   #6
Baertram
Super Moderator
 
Baertram's Avatar
WoWInterface Super Mod
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 4,912
Try to ask twice a day, maybe someone will have the time then (ironic) But I guess he/she won't have the desire to do it anymore because of your daily bumps

Lua Code:
  1. unction ZO_InventoryManager:OnInventoryItemAdded(inventoryType, bagId, slotIndex, newSlotData)
  2.     local inventory = self.inventories[inventoryType]
  3.     newSlotData.searchData = {type = SEARCH_TYPE_INVENTORY, bagId = bagId, slotIndex = slotIndex}
  4.  
  5.     newSlotData.inventory = inventory
  6.  
  7.     inventory.stringSearch:Insert(newSlotData.searchData)
  8.  
  9.     -- play a brief flash animation on all the filter tabs that match this item's filterTypes
  10.     if newSlotData.brandNew then
  11.         self:PlayItemAddedAlert(newSlotData.filterData, inventory.tabFilters)
  12.     end
  13. end

This function is called as a new item is put into your inventory.
The lower part is the important one that you don't want to happen anymore:
Lua Code:
  1. -- play a brief flash animation on all the filter tabs that match this item's filterTypes
  2.     if newSlotData.brandNew then

The class ZO_InventoryManager is assigned to the following variable ingame:
Lua Code:
  1. function ZO_PlayerInventory_Initialize()
  2.     -- ZO_PlayerInventory is used for event registration only. There are multiple inventory controls, but only one manager is needed.
  3.     PLAYER_INVENTORY = ZO_InventoryManager:New(ZO_PlayerInventory)
  4. end

PLAYER_INVENTORY is the variable you need to use to get into this function OnInventoryItemAdded then:

So learn to code addons at the wiki, there are many examples and helps:
http://wiki.esoui.com/Main_Page (check the right side!)
http://wiki.esoui.com/Getting_Started
http://wiki.esoui.com/Writing_your_first_addon
http://wiki.esoui.com/MyFirstAddon_t...Zenimax_Online
http://wiki.esoui.com/ISummonThee
http://wiki.esoui.com/SimpleNotebookTutorial/part1

You can use the function ZO_PreHook to pre-enter a function of the base game. You can modify values or run your own source code then prior to the original function.
After that be sure to "return false" so the original function code is executed after yours! Or "return true" to not run the original code!

Suggestion:
Build a small standalone addon and put some code in the Event_addon_loaded callback function of your addon which does a zo_PreHook for this function and just changes newSlotData.brandNew to false always.


The PreHook couldlook likes this e.g.:
Lua Code:
  1. ZO_PreHook(PLAYER_INVENTORY, "OnInventoryItemAdded", function(self, inventoryType, bagId, slotIndex, newSlotData)
  2.     --If it's a new item and marked as brandNew, mark it as not brandNew to block the animation and icon
  3.     if newSlotData and newSlotData.brandNew then
  4.         newSlotData.brandNew = false
  5.     end
  6.     return false -- call original function code of "OnInventoryItemAdded" now!
  7. end)

Taken some code form Writing your first adodn tutorial this could look like this then:
Lua Code:
  1. -- First, we create a namespace for our addon by declaring a top-level table that will hold everything else.
  2. FooAddon = {}
  3.  
  4. -- This isn't strictly necessary, but we'll use this string later when registering events.
  5. -- Better to define it in a single place rather than retyping the same string.
  6. FooAddon.name = "FooAddon"
  7.  
  8. -- Next we create a function that will initialize our addon
  9. function FooAddon:Initialize()
  10. --Remove animation and icon of brand new items in inventory
  11. ZO_PreHook(PLAYER_INVENTORY, "OnInventoryItemAdded", function(self, inventoryType, bagId, slotIndex, newSlotData)
  12.     --If it's a new item and marked as brandNew, mark it as not brandNew to block the animation and icon
  13.     if newSlotData and newSlotData.brandNew then
  14.         newSlotData.brandNew = false
  15.     end
  16.     return false -- call original function code of "OnInventoryItemAdded" now!
  17. end)
  18. end
  19.  
  20. -- Then we create an event handler function which will be called when the "addon loaded" event
  21. -- occurs. We'll use this to initialize our addon after all of its resources are fully loaded.
  22. function FooAddon.OnAddOnLoaded(event, addonName)
  23.   -- The event fires each time *any* addon loads - but we only care about when our own addon loads.
  24.   if addonName == FooAddon.name then
  25.     FooAddon:Initialize()
  26.   end
  27. end
  28.  
  29. -- Finally, we'll register our event handler function to be called when the proper event occurs.
  30. EVENT_MANAGER:RegisterForEvent(FooAddon.name, EVENT_ADD_ON_LOADED, FooAddon.OnAddOnLoaded)

Be sure to change FooAddon to some other name like "NoNewItem" and adapt the manifest txt file to the same name etc.

If you got questions,a fter you read into the materia and tried it, be free to ask here.
But please stop to bump such 1 user requests every 2nd day... This will only make the addon devs "Not help you anymore"!
Write to ZOs via /bug ingame instead and ask them to add a setting instead.

Last edited by Baertram : 02/21/18 at 05:47 AM.
  Reply With Quote
02/21/18, 09:42 AM   #7
Baertram
Super Moderator
 
Baertram's Avatar
WoWInterface Super Mod
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 4,912
Check my addon "FCOChangeStuff", I've added it in there.
-> Update is pending

And please stop bumping messages every 2nd day, ppl are not blind, but just don't have the time or will do fullfill it. Just accept it then, thank you.
  Reply With Quote
02/21/18, 11:06 AM   #8
joshmiller83
AddOn Super User
 
joshmiller83's Avatar
Premium Member
Join Date: Mar 2014
Posts: 70
Originally Posted by Baertram View Post
And please stop bumping messages every 2nd day, ppl are not blind, but just don't have the time or will do fullfill it. Just accept it then, thank you.
My intention wasn't to bump it every day or every other day! I made a mistake and posted it thinking it had been a bit longer than it had. I am sorry!

I did not intend on DISTURBING the authors and the community!

From now on I'll keep my many addon request to myself!

Thank you!

I am sorry!

Last edited by joshmiller83 : 02/21/18 at 03:00 PM.
  Reply With Quote
02/21/18, 12:23 PM   #9
Rhyono
AddOn Author - Click to view addons
Join Date: Sep 2016
Posts: 659
Originally Posted by joshmiller83 View Post
I feel trying to learn in this community is already toxic enough.
Maybe I misunderstood, but are you referring to the addon authors (including the one that just fulfilled your request), as toxic?
  Reply With Quote
02/21/18, 12:30 PM   #10
joshmiller83
AddOn Super User
 
joshmiller83's Avatar
Premium Member
Join Date: Mar 2014
Posts: 70
Not "authors" per say. :| I read a bunch of talk on everything from Discord/gitter arguments to a little of everything else. I was trying to say I did not want to add more opinions to the mix. So staying out of authoring might be for the best for me. lol

Last edited by joshmiller83 : 02/21/18 at 11:22 PM. Reason: gitter not glitter? lol
  Reply With Quote

ESOUI » AddOns » AddOn Search/Requests » Hide / Turn Off New Item (!)

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off