Download
(1 Kb)
Download
Updated: 08/04/20 06:46 AM
Compatibility:
Stonethorn (6.1.5)
Greymoor (6.0.5)
Harrowstorm (5.3.5)
Dragonhold (5.2.5)
Scalebreaker (5.1.5)
Elsweyr (5.0.5)
Updated:08/04/20 06:46 AM
Created:04/22/20 01:37 AM
Monthly downloads:79
Total downloads:7,332
Favorites:14
MD5:
FishBreak  Popular! (More than 5000 hits)
Version: 1.2
by: Solaris Lorica [More]
Purpose:

Graphical indicator for when to reel in fish.

Function:

When a fish is on the hook, "FISH" appears in the middle of the screen. Until the fish is caught or the person stops fishing.

Mechanics:

Uses EVENT_INVENTORY_SINGLE_SLOT_UPDATE to measure a countChange of -1 of an existing item (bait) as "a-fish-on-the-hook" to turn on indicator, and obtaining a new item as the "fish caught" to turn off indicator.

Uses EVENT_CLIENT_INTERACT_RESULT to add "currently fishing" restriction to indicator turn on condition.

Uses EVENT_CHATTER_END as an additional "indicator-off" trigger, to handle the exception where the player does not reel in when the fish is on the hook.

Background:

All the features in this addOn can be found in Votan's Fisherman by @votan73. I simply wanted the indicator to be in static solid bold red text.
Votan's Fisherman and FishAlerter by "hawry" was studied extensively to make this addOn.

Conclusion:

Not tested with multiple languages, not tested extensively. Recommend using alongside Votan's Fisherman for a comprehensive fishing experience.

Acknowledgment:

@Scootsworks for working with me helping me with writing addons and answering my questions.
@Votan73 for making Votan's Fisherman
@hawry for making FishAlerter
@Baertram for performance improvement tips
and people in gitter.

Installation:

Drag and drop in Documents/Elder Scrolls Online/live/AddOns folder

Versions:

1.2 Added "Mystic Fishing Hole" and "Oily Fishing Hole" to the fishingHoles list so that the addOn can now recognize and perform with the two aforementioned fishing holes.

1.1 Unregistered events and added event-filters where possible.

Known Bugs:

Will register "fish on the hook" and display "FISH" when if player aborts fishing and then uses an potion/consumable. (the lowering of stack count of any item the player currently have in his backpack/craft bag)

Temporary solution: Use the fishing hole again or any interactable.
v1.2
Optional Files (0)


Archived Files (2)
File Name
Version
Size
Uploader
Date
1.1
1kB
Solaris Lorica
04/22/20 03:49 AM
1
1kB
04/22/20 01:37 AM


Post A Reply Comment Options
Unread 09/28/20, 01:21 AM  
PersistentMemory
AddOn Author - Click to view AddOns

Forum posts: 0
File comments: 4
Uploads: 2
Thanks for this addon, fishing is actually not an annoying chore for me anymore!

I think you can fix the bug that displays "FISH" after using another consumable just by adding "fishing = false" to the "ranAway" function. At least it fixed it for me when I updated the function for that.
Report comment to moderator  
Reply With Quote
Unread 08/12/20, 08:06 AM  
Hinejak

Forum posts: 3
File comments: 36
Uploads: 0
Originally Posted by Solaris Lorica
Originally Posted by Hinejak
Fish notification doesn't work for mystic fishing holes in Artaeum, can you update it please, this addon is very helpful
It should now work with the mystic fishing holes in Artaeum. I also updated it to work with the Oily fishing holes in clockwork city as well.

for some reason i didn't add the 2 aforementioned fishing hole types to the interact-able check list, i think its because i didnt know they existed haha. This check list was put in place to avoid misnotifications when the user simply have -1 stackCount doing something else other than fishing. It should now work as per version 1.2 when the update goes through.

Im glad you've found this addOn useful, and thanks for the heads up
Thank you
Report comment to moderator  
Reply With Quote
Unread 08/04/20, 06:51 AM  
Solaris Lorica
AddOn Author - Click to view AddOns

Forum posts: 1
File comments: 5
Uploads: 4
Originally Posted by Hinejak
Fish notification doesn't work for mystic fishing holes in Artaeum, can you update it please, this addon is very helpful
It should now work with the mystic fishing holes in Artaeum. I also updated it to work with the Oily fishing holes in clockwork city as well.

for some reason i didn't add the 2 aforementioned fishing hole types to the interact-able check list, i think its because i didnt know they existed haha. This check list was put in place to avoid misnotifications when the user simply have -1 stackCount doing something else other than fishing. It should now work as per version 1.2 when the update goes through.

Im glad you've found this addOn useful, and thanks for the heads up
Last edited by Solaris Lorica : 08/04/20 at 06:58 AM.
Report comment to moderator  
Reply With Quote
Unread 08/01/20, 05:16 PM  
Hinejak

Forum posts: 3
File comments: 36
Uploads: 0
Fish notification doesn't work for mystic fishing holes in Artaeum, can you update it please, this addon is very helpful
Report comment to moderator  
Reply With Quote
Unread 04/22/20, 03:54 AM  
Solaris Lorica
AddOn Author - Click to view AddOns

Forum posts: 1
File comments: 5
Uploads: 4
oh i see, i updated it.

Lua Code:
  1. FishBreak = {}
  2.  
  3. FishBreak.name="FishBreak"
  4.  
  5. FishBreak.fishingHoles = {["Foul Fishing Hole"] = true, ["Lake Fishing Hole"] = true, ["Saltwater Fishing Hole"] =  true, ["River Fishing Hole"] = true}
  6.  
  7. function FishBreak.OnAddOnLoaded(event, addOnName)
  8.     if addOnName == FishBreak.name then
  9.         FishBreak:Initialize()
  10.     end
  11. end
  12.  
  13. function FishBreak:Initialize()
  14.     EVENT_MANAGER:UnregisterForEvent(FishBreak.name, EVENT_ADD_ON_LOADED)
  15.     EVENT_MANAGER:RegisterForEvent(FishBreak.name, EVENT_INVENTORY_SINGLE_SLOT_UPDATE, FishBreak.baitGone)
  16.     EVENT_MANAGER:AddFilterForEvent(FishBreak.name, EVENT_INVENTORY_SINGLE_SLOT_UPDATE, REGISTER_FILTER_INVENTORY_UPDATE_REASON, INVENTORY_UPDATE_REASON_DEFAULT)
  17.     EVENT_MANAGER:AddFilterForEvent(FishBreak.name, EVENT_INVENTORY_SINGLE_SLOT_UPDATE, REGISTER_FILTER_IS_NEW_ITEM, false)
  18.     EVENT_MANAGER:RegisterForEvent(FishBreak.name, EVENT_CLIENT_INTERACT_RESULT, FishBreak.startFish)
  19.     EVENT_MANAGER:RegisterForEvent(FishBreak.name, EVENT_CHATTER_END, FishBreak.ranAway)
  20. end
  21.  
  22. function FishBreak.startFish(_,_,targetName)
  23.     if FishBreak.fishingHoles[targetName] then
  24.         FishBreak.fishing = true
  25.     else
  26.         FishBreak.fishing = false
  27.     end
  28. end
  29.  
  30. function FishBreak.baitGone(_,bagId,_,_,_,_,stackCount)
  31.     if bagId == BAG_BACKPACK or bagId == BAG_VIRTUAL then
  32.         if FishBreak.fishing and stackCount == -1 then
  33.             FishIndicator:SetHidden(false)     
  34.         else
  35.             FishIndicator:SetHidden(true)
  36.         end
  37.     end
  38. end
  39.  
  40. function FishBreak.ranAway(_)
  41.     FishIndicator:SetHidden(true)
  42. end
  43.  
  44. EVENT_MANAGER:RegisterForEvent(FishBreak.name, EVENT_ADD_ON_LOADED, FishBreak.OnAddOnLoaded)

Originally Posted by Baertram
You should definately unregister event_add_on_loaded in it's callback function again as your addon was found, in all of your addons. Else the string comparison against addonName is run for each of your libs and addons and ZOs code!

And please try to always use event filters (see the wiki) for especially event_inventory_single_slot_update. At least add the inventory_update_reason filter so it won't fire at each charge of weapon or armor durability update! And you also could add a second filter on new items here as it seems (be sure to register the event with different unique id's for each, update reason+filter and is New + filter, or it won't work).

The event filtering happens at c code and is faster, before the lua code is even run. So your callback function could do the same by checking if isNew or if invUpdazeReason ==... But it will be slower. And there are a lot addons using the same inv update slot functions which makes every performance gain mandatory imo.
Event filters should also be always applied, if possible, for combat events.
Report comment to moderator  
Reply With Quote
Unread 04/22/20, 02:10 AM  
Baertram
Super Moderator
 
Baertram's Avatar
ESOUI Super Moderator
AddOn Author - Click to view AddOns

Forum posts: 4913
File comments: 5990
Uploads: 78
You should definately unregister event_add_on_loaded in it's callback function again as your addon was found, in all of your addons. Else the string comparison against addonName is run for each of your libs and addons and ZOs code!

And please try to always use event filters (see the wiki) for especially event_inventory_single_slot_update. At least add the inventory_update_reason filter so it won't fire at each charge of weapon or armor durability update! And you also could add a second filter on new items here as it seems (be sure to register the event with different unique id's for each, update reason+filter and is New + filter, or it won't work).

The event filtering happens at c code and is faster, before the lua code is even run. So your callback function could do the same by checking if isNew or if invUpdazeReason ==... But it will be slower. And there are a lot addons using the same inv update slot functions which makes every performance gain mandatory imo.
Event filters should also be always applied, if possible, for combat events.
Last edited by Baertram : 04/22/20 at 02:12 AM.
Report comment to moderator  
Reply With Quote
Post A Reply



Category Jump: