View Single Post
01/30/18, 06:52 AM   #3
zykis39
Join Date: Jan 2018
Posts: 3
Originally Posted by Shinni View Post
Think of your question in a different way. Instead of renaming the fishing hole, you actually just want to display a different text under the cursor.

You can find the code for the cursor here: https://github.com/esoui/esoui/blob/...le/reticle.lua
By looking at it (I haven't tested it) the reticle text is set in this line:
https://github.com/esoui/esoui/blob/...ticle.lua#L237

You see that the function returns true, if a new text was set to the reticle/cursor, so you can do the following to change the displayed text:
Lua Code:
  1. local originalFunction = ZO_Reticle.TryHandlingInteraction -- remember the original function
  2. function ZO_Reticle:TryHandlingInteraction(...) -- override the function because we want to change the text
  3.     local success = originalFunction(self, ...) -- change the text as originally intended
  4.     -- if a new text was set
  5.     if success then
  6.         -- check if target is a fishing hole
  7.         local additionalInfo = select(5, GetGameCameraInteractableActionInfo())
  8.         if additionalInfo == ADDITIONAL_INTERACT_INFO_FISHING_NODE then
  9.             -- add the crawler information
  10.             self.interactContext:SetText(self.interactContext:GetText() .. " (Crawler)")
  11.         end
  12.     end
  13. end

I have not tested this code, it's just what I would try after reading the source code of ZO_Reticle. So beware of bugs.
Wow! Looks like that's what i was looking for!
Would you suggest any resources, where i can grab a ZO_XXX class or functions descriptions? Didn't even knew of ZO_Reticle existance.
  Reply With Quote