Dalixam
27-04-2008, 04:04 PM
Hi,
I am looking for some help in creating my first addon. It is very simple (I think) yet I can't manage to work it out. I have experience in PHP programming, so I thought LUA would be 'easy' but I guess the basics elude me. Ok, enough chatter, here is my addon plans:
It is a simple addon that lets you sort trade skill recipes in your trade skill window by name (as is default) or by skill requirement. Basically, there should be two extra check boxes in the default trade skill window labeled "Sort by name" and "Sort by difficulty". "Sort by name" should be default.
Obviously it should then change the sorting of the trade skills based on what you click. Advanced Trade Skill Window (http://wowui.worldofwar.net/?p=mod&m=2092) has this feature, but also a lot of other stuff. I want to create an addon that just has the sorting options in the default trade skill window and nothing else.
I've looked at all the How'to and tutorials I could find. I've also read through other simple addons and read up on 'hooking' WoW functions, but I am at a loss.
Mainly, I can't figure out how to add two simple checkboxes to the default window. Also, I can't figure out what function to hook. Looking at http://www.wowwiki.com/World_of_Warcraft_API I think I need to alter GetTradeSkillInfo but I can't figure out how to 'loop' though them all and sort them differently. (Remember, I think PHP so looping seems natural).
I got the .toc file layed down, but other than that I am very confused to put it mildly.
Any help and nudges in the right direction will be greatly appreciated.
I am looking for some help in creating my first addon. It is very simple (I think) yet I can't manage to work it out. I have experience in PHP programming, so I thought LUA would be 'easy' but I guess the basics elude me. Ok, enough chatter, here is my addon plans:
It is a simple addon that lets you sort trade skill recipes in your trade skill window by name (as is default) or by skill requirement. Basically, there should be two extra check boxes in the default trade skill window labeled "Sort by name" and "Sort by difficulty". "Sort by name" should be default.
Obviously it should then change the sorting of the trade skills based on what you click. Advanced Trade Skill Window (http://wowui.worldofwar.net/?p=mod&m=2092) has this feature, but also a lot of other stuff. I want to create an addon that just has the sorting options in the default trade skill window and nothing else.
I've looked at all the How'to and tutorials I could find. I've also read through other simple addons and read up on 'hooking' WoW functions, but I am at a loss.
Mainly, I can't figure out how to add two simple checkboxes to the default window. Also, I can't figure out what function to hook. Looking at http://www.wowwiki.com/World_of_Warcraft_API I think I need to alter GetTradeSkillInfo but I can't figure out how to 'loop' though them all and sort them differently. (Remember, I think PHP so looping seems natural).
I got the .toc file layed down, but other than that I am very confused to put it mildly.
Any help and nudges in the right direction will be greatly appreciated.