Attempted Plater Function Overrides Throw Protected Function Error
davidcooper1 opened this issue ยท 3 comments
Game and Plater version
Which is the game version and Plater version you're using?
Plater-v598-Retail - DF v586 - 11.0.5
Describe the bug
- Steps to Reproduce (what did you do to make the bug happen):
- Create a new mod.
- Follow instructions in Player_Data.lua to override a plater function such as Plater.AddExtraIcon.
- Add a constructor hook and copy the Plater.AddExtraIcon function as is.
- Add a nameplate created hook.
-
Result (what happens when you follow the steps above):
After a reload, Plater returns an error with the messageConstructor error: Interface/AddOns/Plater/Plater.lua:11942: 'Plater.AddExtraIcon' is protected and may not be overwritten.
-
Expected (what you think the expected behavior would be when following the steps):
There should be some way to override existing functions, but I'm unsure of how to do so. The goal, ultimately, is to track interrupts like the addon BigDebuffs. I'd love to be able to carry over a similar functionality with the with the look and feel of plater buff special icons. -
When the bug started (a date, wow path release, details update, etc)?
Unsure, I've only just tested. -
Additional information:
If there is already an existing plugin or mod to make plater track interrupts, that would be very much appreciated. As it stands, I'm unsure how to hook or modify any function for plater not explicitly exposed.
Lua Error
Post here lua errors, if you aren't getting any, use /console scriptErrors 1
Screenshots
Post images of the bug if necessary.
Other Information
If necessary, add more info here.
Looking at the code and the UI, I haven't seen any code to track lockouts since they aren't inherently an aura. Anything that is not an aura gets cleared when the extra icon frame is refreshed. Silences do get tracked with crowd control option enabled, but that is not sufficient enough. I'm trying to track lockout length for the purposes of PvP. For now, I have to have all options in buff special completely removed which throws off the look and feel. Is this a feature that would be desired?
Also, is there a contribution guide for this code base? I could look at creating some sort of PR for this. Trying to create a hacky solution through mods doesn't seem like a good plan anyway after trying to dive in a bit. I'm not sure if current contributors use VS Code, as that's what I've used in the past. It seems like luaserver.lua
is vital for definitions during development, but I'm not sure how that is used.
Plater has no intention of tracking lockouts. That's what mods/scripts can be used for. There's a reason stuff like this exists: https://wago.io/mA-zQQEsD