Quantcast
Download
(3 Kb)
Download
Updated: 04/10/21 10:05 PM
Pictures
File Info
Compatibility:
Flames of Ambition (6.3.5)
Markarth (6.2.5)
Stonethorn (6.1.5)
Greymoor (6.0.5)
Updated:04/10/21 10:05 PM
Created:04/07/21 04:24 AM
Monthly downloads:141
Total downloads:148
Favorites:1
MD5:
Categories:ToolTip, Utility Mods
6.3.5
Custom Item Notes  New this week!
Version: 0.99e
by: Alianym [More]
Welcome to Custom Item Notes!

Created after this request, to add notes to items. You can view/update these with the new context menu item "Edit Note" (text is localized). This is a relatively simple implementation that I may expand if anyone has other requests/thoughts/comments on how it could be improved but my aim for this initial release was to keep it fairly simple. Usage should hopefully be pretty straightforward, (see below).

To edit (add/remove) a note from an item:
Code:
Open context menu (right-click on Keyboard+Mouse) and select "Edit Note", then SAVE to update the note.
I can add a command to remove all CINs (custom item notes) at once if the desire is there, but for now it's a 1:1 add/remove.

Each note is tied to an item ID and the notes are currently stored account-wide per megaserver.

Required Libraries:
LibCustomMenu
v0.99e
  • Fixing compatability issues

v0.99d
  • Fixing the bug, Round 2

v0.99c
  • Recreated the tooltip on mouse-over (hopefully the initial issue is fixed this time)
  • Added some multi-language support (thanks Baertram)

v0.99b
  • Updated a terribly generic global to be less generic

v0.99a
  • Updated functionality to mimic guild/friend notes (no more /commands)
  • Any notes you've created should carry over to this new system
Archived Files (5)
File Name
Version
Size
Uploader
Date
0.99d
3kB
Alianym
04/09/21 09:36 AM
0.99c
3kB
Alianym
04/09/21 04:39 AM
0.99b
2kB
Alianym
04/08/21 02:01 AM
0.99a
2kB
Alianym
04/07/21 08:39 PM
0.99
1kB
Alianym
04/07/21 04:24 AM


Post A Reply Comment Options
Unread Yesterday, 04:48 AM  
crysis992

Forum posts: 1
File comments: 32
Uploads: 0
The latest version fixed the keybind issues, thank you
Report comment to moderator  
Reply With Quote
Unread Yesterday, 10:53 PM  
Alianym
AddOn Author - Click to view AddOns

Forum posts: 3
File comments: 51
Uploads: 6
Alright, let's see how this latest upload goes. It fixed it on my end (thanks for the detail on conflicting AddOns – helped me narrow down the issue (I hope)). As ever, let me know if any errors come up still.

Working on a fix for the issue you're coming across, ksorah. I think I've got it, just want to see about one last test.
Last edited by Alianym : 04/11/21 at 01:47 AM.
Report comment to moderator  
Reply With Quote
Unread 04/10/21, 03:29 PM  
crysis992

Forum posts: 1
File comments: 32
Uploads: 0
Another note, it's not just opening the event boxes, it happens on every item. I can't even use buff food or learn recipes/motifs via the keybind

Edit:
As soon as I enable any addon that adds a entry on the right click menu, it stops working.
When I disable Tamriel Trade Centre, Arkadius Trade Tools and PersonalAssistant it works.
As soon as I enable any of the addons that add something to the context menu, it breaks the hotkey.
Last edited by crysis992 : 04/10/21 at 03:34 PM.
Report comment to moderator  
Reply With Quote
Unread 04/10/21, 02:11 PM  
ksorah

Forum posts: 26
File comments: 53
Uploads: 0
Hi,

Maybe it's only in french : right click

Last edited by ksorah : 04/10/21 at 05:11 PM.
Report comment to moderator  
Reply With Quote
Unread 04/10/21, 11:27 AM  
Alianym
AddOn Author - Click to view AddOns

Forum posts: 3
File comments: 51
Uploads: 6
Originally Posted by crysis992
No, doesn't happen with only these two installed.
But as soon as I enable my other addons and your addon it stops working.
Once I disable your addon but leave all other addons enabled it works fine.

I've just enabled PersonalAssistant and your addon, it stopped working. Once i disabled your addon it worked fine to open containers in my inventory.

It must be something in your addon that breaks this :/
Thank you for narrowing down the conflict for me! Much appreciated and should definitely help with debugging. I can't take a look right now, but will definitely investigate later today.
Report comment to moderator  
Reply With Quote
Unread 04/10/21, 11:01 AM  
crysis992

Forum posts: 1
File comments: 32
Uploads: 0
Originally Posted by Alianym
I have no idea how this would be my AddOn causing it, the only option I can think of is if it's some weird conflict but still that function doesn't even get a mention in my code. Have you tried to see if the bug happens when you have only Custom Item Notes and LibCustomMenu installed?
No, doesn't happen with only these two installed.
But as soon as I enable my other addons and your addon it stops working.
Once I disable your addon but leave all other addons enabled it works fine.

I've just enabled PersonalAssistant and your addon, it stopped working. Once i disabled your addon it worked fine to open containers in my inventory.

It must be something in your addon that breaks this :/
Report comment to moderator  
Reply With Quote
Unread 04/10/21, 09:50 AM  
Alianym
AddOn Author - Click to view AddOns

Forum posts: 3
File comments: 51
Uploads: 6
Originally Posted by crysis992
I'm still unable to open containers with this addon enabled. Getting following error when trying to open a container with the keybind.

Code:
EsoUI/Ingame/Inventory/InventorySlot.lua:1110: function expected instead of nil
stack traceback:
EsoUI/Ingame/Inventory/InventorySlot.lua:1110: in function 'TryUseItem'
EsoUI/Ingame/Inventory/InventorySlot.lua:1344: in function 'INDEX_ACTION_CALLBACK'
EsoUI/Ingame/Inventory/InventorySlotActions.lua:96: in function 'ZO_InventorySlotActions:DoPrimaryAction'
EsoUI/Ingame/Inventory/ItemSlotActionController.lua:30: in function 'callback'
EsoUI/Libraries/ZO_KeybindStrip/ZO_KeybindStrip.lua:679: in function 'ZO_KeybindStrip:TryHandlingKeybindDown'
(tail call): ?
(tail call): ?
Hey there,

Thanks for the error message, but it's kind of weird because at InventorySlot.lua:1110 is:
Code:
1105    local function TryUseItem(inventorySlot)
1106        local bag, index = ZO_Inventory_GetBagAndIndex(inventorySlot)
1107        local usable, onlyFromActionSlot = IsItemUsable(bag, index)
1108        if usable and not onlyFromActionSlot then
1109            ClearCursor()
1110            UseItem(bag, index)
1111            return true
1112        end
1112    end
And that's a base ZOS function I don't even touch, (and would definitely risk breaking things if I did).
Code:
UseItem *protected* (*[Bag|#Bag]* _bagId_, *integer* _slotIndex_)
I have no idea how this would be my AddOn causing it, the only option I can think of is if it's some weird conflict but still that function doesn't even get a mention in my code. Have you tried to see if the bug happens when you have only Custom Item Notes and LibCustomMenu installed?
Report comment to moderator  
Reply With Quote
Unread 04/10/21, 08:36 AM  
crysis992

Forum posts: 1
File comments: 32
Uploads: 0
I'm still unable to open containers with this addon enabled. Getting following error when trying to open a container with the keybind.

Code:
EsoUI/Ingame/Inventory/InventorySlot.lua:1110: function expected instead of nil
stack traceback:
EsoUI/Ingame/Inventory/InventorySlot.lua:1110: in function 'TryUseItem'
EsoUI/Ingame/Inventory/InventorySlot.lua:1344: in function 'INDEX_ACTION_CALLBACK'
EsoUI/Ingame/Inventory/InventorySlotActions.lua:96: in function 'ZO_InventorySlotActions:DoPrimaryAction'
EsoUI/Ingame/Inventory/ItemSlotActionController.lua:30: in function 'callback'
EsoUI/Libraries/ZO_KeybindStrip/ZO_KeybindStrip.lua:679: in function 'ZO_KeybindStrip:TryHandlingKeybindDown'
(tail call): ?
(tail call): ?
Report comment to moderator  
Reply With Quote
Unread 04/09/21, 03:35 PM  
ksorah

Forum posts: 26
File comments: 53
Uploads: 0
courage
Report comment to moderator  
Reply With Quote
Unread 04/09/21, 10:13 AM  
Alianym
AddOn Author - Click to view AddOns

Forum posts: 3
File comments: 51
Uploads: 6
Originally Posted by Baertram
Never happens to me /irony off
The life of an AddOn author!

Originally Posted by Baertram
Could also be the side effect of other addons!
I'd always ask the error reporters to proof it throws the error with ONLY this addon + needed libs enabled as well, else it's there work to check what other of theire addons enabled casues this in combination (as you cannot know these addons + have them installed + got the same settings like the reporter does).

Sounds harsh but simply is the way to be able to rebuild and find a fix. We all learned this in several field tries

About the invSlot: Weird. They should have the same structure.
Happy to be corrected about invSlot, but that’s definitely how it looked to me, even in the ESOUI source.

Yeah I was thinking about that just afterwards.

So questions for users encountering bugs;
  • how long until the error showed up?
  • did it error on your first container?
  • keyboard + mouse or Gamepad?
  • did you try with only Custom Item Notes and LibCustomMenu active?
Report comment to moderator  
Reply With Quote
Unread 04/09/21, 09:56 AM  
Baertram
 
Baertram's Avatar
AddOn Author - Click to view AddOns

Forum posts: 3432
File comments: 4144
Uploads: 66
Could also be the side effect of other addons!
I'd always ask the error reporters to proof it throws the error with ONLY this addon + needed libs enabled as well, else it's there work to check what other of theire addons enabled casues this in combination (as you cannot know these addons + have them installed + got the same settings like the reporter does).

Sounds harsh but simply is the way to be able to rebuild and find a fix. We all learned this in several field tries

About the invSlot: Weird. They should have the same structure.

(It could just be I'm spending too much time developing and reloading UI to play long enough to come across the error. )
Never happens to me /irony off

Originally Posted by Alianym
Originally Posted by Baertram
Try if moving the LibCustomMenu:RegisterContextMenu(AddNote, LibCustomMenu.CATEGORY_LATE) lines to your event_add_on_loaded or event_player_activated callback fixes this.
If the customslotaction will be added too early, it may break the normal inventory slot actions somehow.
Only a guess, so you'd have to test this.

The dialog you define should be put into the event_add_on_loaded as well, else the lua code could try to use the xml file too early, if you change the initialization one day. Must not, had happened in the past


btw, in your callback function to "ZO_InventorySlot_OnMouseEnter" you also could use
local bagId, slotIndex = ZO_Inventory_GetBagAndIndex(inventorySlot)
Instead of hardcoding the lines for bagId and slotIndex to the dataEntry.data tables

As you reuse the same code in your 2 funcitons, maybe only create 1:
Code:
local function getSlotIds(inventorySlot)
    local bagId, slotIndex = ZO_Inventory_GetBagAndIndex(inventorySlot)
    local itemId = GetItemId(bagId, slotIndex)
    return bagId, slotIndex, itemId
end
So funny thing about inventorySlot, it doesn't always have the same structure. In this case this means that the inventorySlot I use in ZO_InventorySlot_OnMouseEnter(inventorySlot) is different to the inventorySlot format used with AddNote(inventorySlot, slotActions). I confirmed this with some debugging. So ZO_Inventory_GetBagAndIndex(inventorySlot) won't always return the right values. I'm actually using ZOS's ways of getting the bagId and slotId. I did create a GetSlotIds(inventorySlot) local function anyway and just accounted for both formats.

Going to upload a version with LibCustomMenu:RegisterContextMenu in the EVENT_PLAYER_ACTIVATED callback.

As far as testing, I'm curious why I haven't run into these errors myself. Questions to those who've gotten the errors in the past; how long are you playing before the error shows up? Also, Gamepad or Keyboard+Mouse? Are you successfully opening containers or the first container you try is bugged?

(It could just be I'm spending too much time developing and reloading UI to play long enough to come across the error. )
Last edited by Baertram : 04/09/21 at 09:58 AM.
Report comment to moderator  
Reply With Quote
Unread 04/09/21, 09:26 AM  
Alianym
AddOn Author - Click to view AddOns

Forum posts: 3
File comments: 51
Uploads: 6
Originally Posted by Baertram
Try if moving the LibCustomMenu:RegisterContextMenu(AddNote, LibCustomMenu.CATEGORY_LATE) lines to your event_add_on_loaded or event_player_activated callback fixes this.
If the customslotaction will be added too early, it may break the normal inventory slot actions somehow.
Only a guess, so you'd have to test this.

The dialog you define should be put into the event_add_on_loaded as well, else the lua code could try to use the xml file too early, if you change the initialization one day. Must not, had happened in the past


btw, in your callback function to "ZO_InventorySlot_OnMouseEnter" you also could use
local bagId, slotIndex = ZO_Inventory_GetBagAndIndex(inventorySlot)
Instead of hardcoding the lines for bagId and slotIndex to the dataEntry.data tables

As you reuse the same code in your 2 funcitons, maybe only create 1:
Code:
local function getSlotIds(inventorySlot)
    local bagId, slotIndex = ZO_Inventory_GetBagAndIndex(inventorySlot)
    local itemId = GetItemId(bagId, slotIndex)
    return bagId, slotIndex, itemId
end
So funny thing about inventorySlot, it doesn't always have the same structure. In this case this means that the inventorySlot I use in ZO_InventorySlot_OnMouseEnter(inventorySlot) is different to the inventorySlot format used with AddNote(inventorySlot, slotActions). I confirmed this with some debugging. So ZO_Inventory_GetBagAndIndex(inventorySlot) won't always return the right values. I'm actually using ZOS's ways of getting the bagId and slotId. I did create a GetSlotIds(inventorySlot) local function anyway and just accounted for both formats.

Going to upload a version with LibCustomMenu:RegisterContextMenu in the EVENT_PLAYER_ACTIVATED callback.

As far as testing, I'm curious why I haven't run into these errors myself. Questions to those who've gotten the errors in the past; how long are you playing before the error shows up? Also, Gamepad or Keyboard+Mouse? Are you successfully opening containers or the first container you try is bugged?

(It could just be I'm spending too much time developing and reloading UI to play long enough to come across the error. )
Last edited by Alianym : 04/09/21 at 09:38 AM.
Report comment to moderator  
Reply With Quote
Unread 04/09/21, 08:06 AM  
Baertram
 
Baertram's Avatar
AddOn Author - Click to view AddOns

Forum posts: 3432
File comments: 4144
Uploads: 66
Try if moving the LibCustomMenu:RegisterContextMenu(AddNote, LibCustomMenu.CATEGORY_LATE) lines to your event_add_on_loaded or event_player_activated callback fixes this.
If the customslotaction will be added too early, it may break the normal inventory slot actions somehow.
Only a guess, so you'd have to test this.

The dialog you define should be put into the event_add_on_loaded as well, else the lua code could try to use the xml file too early, if you change the initialization one day. Must not, had happened in the past


btw, in your callback function to "ZO_InventorySlot_OnMouseEnter" you also could use
local bagId, slotIndex = ZO_Inventory_GetBagAndIndex(inventorySlot)
Instead of hardcoding the lines for bagId and slotIndex to the dataEntry.data tables

As you reuse the same code in your 2 funcitons, maybe only create 1:
Code:
local function getSlotIds(inventorySlot)
    local bagId, slotIndex = ZO_Inventory_GetBagAndIndex(inventorySlot)
    local itemId = GetItemId(bagId, slotIndex)
    return bagId, slotIndex, itemId
end
Last edited by Baertram : 04/09/21 at 08:12 AM.
Report comment to moderator  
Reply With Quote
Unread 04/09/21, 07:17 AM  
crysis992

Forum posts: 1
File comments: 32
Uploads: 0
The latest version breaks hotkeys on items.
With the addon enabled I cannot open the anniversary boxes in my inventory by pressing the open key.
Report comment to moderator  
Reply With Quote
Unread 04/09/21, 04:43 AM  
Alianym
AddOn Author - Click to view AddOns

Forum posts: 3
File comments: 51
Uploads: 6
Originally Posted by ksorah
Hello,

I made this image hoping to give you some inspiration, it's an idea like any other, and probably too difficult to implement! It's all just as you want!

Warning: Spoiler


i can think more if you want
So kinda like an editable tooltip? I re-instated the tooltip in this latest update (hopefully not breaking anything again) so if this works we'll go from there!

@Baertram
Added in a couple language files, (with a default en.lua utilizing the ZOS official translations).
Also I re-added the SecurePostHook("ZO_InventorySlot_OnMouseEnter", ...) function, but this time after EVENT_PLAYER_ACTIVATED, because I want to confirm whether or not this'll work. So anyone gets any bugs, be certain to let me know!
Report comment to moderator  
Reply With Quote
Post A Reply



Category Jump: