Xruptor / LagBar

Displays a simple bar with some Latency Information.
http://www.wowinterface.com/downloads/info12373-LagBar.html
5 stars 2 forks source link

Updated TOCs to conform to new rules #9

Closed draknyte1 closed 3 years ago

draknyte1 commented 3 years ago

New rules - https://wowpedia.fandom.com/wiki/TOC_format#Basic_rules

Xruptor commented 3 years ago

Before I accept these modifications. I need to make sure it won't break my automatic distribution GitHub Action for WOWInterface and CurseForge. All my addons utilize the https://github.com/BigWigsMods/packager

https://github.com/BigWigsMods/packager/wiki/GitHub-Actions-workflow

A lot of addon authors use this and I would have to review it to see if it accepts the new TOC formats you are proposing. It probably does but if doesn't, I would hate to lose that functionality.

Official GitHub marketplace site: https://github.com/marketplace/actions/wow-packager

draknyte1 commented 3 years ago

I'd assume they'll update to support it soon if they don't already. I was updating a few others and thought I'd do yours (That I use anyway) while I was at it. :)

Edit: Seems they changed some stuff 15hr ago related to the varying TOCs, although I haven't a clue on the context of their changes, it is something. Let me know anyway.

Xruptor commented 3 years ago

I'd assume they'll update to support it soon if they don't already. I was updating a few others and thought I'd do yours (That I use anyway) while I was at it. :)

You're the best! 😄 I'll review the packager and see if they support it when I get home. Using GitHub on my phone LOL.

Xruptor commented 3 years ago

Okay so it looks like they are updating it slowly but surely. I see them adding filter options for the new TOC files. Instead of using the Interface variable in a single TOC.

draknyte1 commented 3 years ago

Neato. I assume most of the next week or two will be various people waiting on various projects to update.

Would you like me to do the rest of your addons tomorrow? Didn’t want to do all of them if it wasn’t going to be approved, so I just did the ones I had locally and had already updated. :)

Also, bit off topic, but could you give me some advice in writing addons? I just want to add tooltips to certain items (which I can get to work for every item, just not specifics) which are pulled from a table. all good if not but the only other person I know with Lua knowledge isn’t able to help me with WoW addon stuff.

Thanks! (GitHub mobile is great)

Xruptor commented 3 years ago

Neato. I assume most of the next week or two will be various people waiting on various projects to update.

Would you like me to do the rest of your addons tomorrow? Didn’t want to do all of them if it wasn’t going to be approved, so I just did the ones I had locally and had already updated. :)

Also, bit off topic, but could you give me some advice in writing addons? I just want to add tooltips to certain items (which I can get to work for every item, just not specifics) which are pulled from a table. all good if not but the only other person I know with Lua knowledge isn’t able to help me with WoW addon stuff.

Thanks! (GitHub mobile is great)

I'd say we should wait until they work out the kinks out of the packager script before we move forward. Afterwards, you are more than welcome to update any of my scripts. I'd appreciate it! 😄

I would be more then welcome to help you out with your coding issues. I can give you some pointers and help you on your code. The best advice I can give to start is to look at my most basic addons and review the code. You need to understand the basic structure of how an addon works. Then afterwards, understand how Blizzard provides data via Object Methods and Events that are triggered (fired) when the client does something. You capture these events and then process the information for your addon.

https://www.wowhead.com/guide=1949/addon-writing-guide-a-basic-introduction-by-example

This reddit post contains some links to other articles. https://www.reddit.com/r/wow/comments/5zg4ts/how_to_start_learning_to_write_addons/

In reference to your example. In order to add tooltips to certain items. You need to capture the Tooltip by "hooking" into it. There are several methods to do this and there are also multiple tooltip functions that blizzard provides. After you hook into the tooltip you will need to grab the itemlink and extra the itemID from it. The itemID is the specific item you wish to interact with. Compare this ItemID with one you have written locally in a table (since you wanted specific items). Then add lines to the tooltip appropriately.

Tooltip has AddLine and AddDoubleLine. https://wowwiki-archive.fandom.com/wiki/API_GameTooltip_AddLine https://wowwiki-archive.fandom.com/wiki/API_GameTooltip_AddDoubleLine

For more information see the following: https://wowwiki-archive.fandom.com/wiki/UIOBJECT_GameTooltip

You can see how I hook into tooltips in my BagSync addon. Just look at my tooltip.lua under Wireframe folder. Important note the main tooltip object that blizzard uses in wow is called GameTooltip. Pay special attention to the function Tooltip:HookTooltip(objTooltip that is in the tooltip.lua of BagSync.

I suggest you create a https://replit.com/ account and start your first LUA addon there. You can share it with me and I can give you some pointers.

Xruptor commented 3 years ago

Oh before I forget there is also this nifty addon generator you can use. https://addon.bool.no/

Xruptor commented 3 years ago

It looks like they finalized the changes for the new TOC files. I see the BCC externals support now. I'll give it a try when I get a moment. I hadn't heard back from you on your request from coding assistance. So I'm assuming you figured it out. 😄

Xruptor commented 3 years ago

The Packager script has been updated to properly filter out the TOC file and produce zip packages based on the #Interface-Types (Classic, Retail, BCC) that are in it. Only one Interface TOC file is required and the packager will do the rest. Therefore, it's not necessary to create individual TOC files for each client version. Instead the packager will properly place the correct TOC information and send it off to WOWInterface and CurseForge.

Also, I've not heard back from you in eight or nine days. I'm going to assume you have moved on and do not wish assistance in your programming skills.