I want to edit my littlewigs addon to track some extra timers on some bosses. Is there a way to edit the lua files for it without having those changes overwritten when I update the addon in future?
Look at any of the expansion specific modules or other unofficial ones.
I’m not sure what you mean. I’m not very experienced with lua or wow addon development. As an example, I edited the ManaDevourer.lua file to track its energy discharge ability. I just added half a dozen lines to the file.
I don’t know if there’s any official way to extend BigWigs modules, but here’s a way that might work.
At the top of each LittleWigs module you see something like local mod, CL = BigWigs:NewBoss("Mana Devourer", 1651, 1818)
that initializes the local mod table.
You can try making your own addon with local mod = BigWigs:GetBossModule("Mana Devourer")
at the start of your code to get access to that mod table and edit and hook it to your hearts content, without having to modify the original lua files.
But LittleWigs modules are loaded on demand, and you have to wait for those encounters to be defined before running your code. Which can be achieved by making your addon load whenever a specific LittleWigs modules does like so.
## LoadOnDemand: 1
## LoadWith: LittleWigs_Legion
How experienced are you with source control (for any programming language)?
I ask because I dabble in modding my addons to tweak them and what I find helpful is keeping a local source control copy on my computer (I use GIT, but any kind will most likely work). I make my changes and commit them to my source control repository and when an addon is updated, I make a new branch and copy the new version there. The source control can show me all the file differences, including my personal changes that were wiped out with the new version. I can use that report of the differences to reupdate the new version.
It’s not a quick and easy way, but I don’t know of a better way to do it.
just carry them over if you’ll have to do updates, turn off auto updates, easy