Thread Tools Display Modes
11-23-05, 01:13 PM   #1
Rapture
A Murloc Raider
Join Date: Nov 2005
Posts: 8
Step by Step, a newbie's plea.

Greetings,

I'm a bit overwhelmed by writting AddOns, but I'm determined to learn. I've read tutorial after tutorial and though they make since, they don't seem to help. So I'm wondering if you (the gurus) could give me step by step instructions for writting a simple AddOn with comments as to why/how you did things.

The AddOn I'd like to create is a MiniMap AddOn that does a few things:
  1. Make the MiniMap frame moveable, hideable (I know it's in the game already), and scalable.
  2. Change the artwork for it, along with options for pre-determined "schemes".
  3. Change the shape (Circle, Box, Diamond, and maybe Octogon).
  4. Change the shape, size, and alpha of the buttons around the MiniMap.

I know the very basics, like creating a TOC file and what goes in it, but I have no idea how to structure the XML file(s). Also, I'm a big confused on how the LUA code correlates to the XML script tags.

Thanx in advance,
Rapture
  Reply With Quote
11-23-05, 03:58 PM   #2
noraj
A Flamescale Wyrmkin
AddOn Author - Click to view addons
Join Date: Jul 2005
Posts: 102
just make the clock example on
MMhell's Tutorial "Writing your first add-on"
google "first add-on"

If you have any programming experience you should be able to pick it up after that using
wow wiki

btw all the stuff your trying to do can be done with Discord Art and Discord Frame Modifier

cept the minimap thats always gonna be a circle afaik maybe you could cut the sides off( and some info) to make it look like another shape bu underneath it will still be a circle

Last edited by noraj : 11-23-05 at 04:00 PM.
  Reply With Quote
11-23-05, 04:32 PM   #3
Gello
A Molten Giant
AddOn Author - Click to view addons
Join Date: Jan 2005
Posts: 521
I'm a strong believer that the best way to learn how to make mods is to make mods that don't touch the default UI.

This is really not an easy mod to start out with. It's not trivial. That said:

1. Make the MiniMap frame moveable, hideable (I know it's in the game already), and scalable.

Movable:
1. MinimapCluster:SetMovable(1)
2. Get the mouse down/up events for the MinimapCluster
3. Insert your functions to move it

Hideable: Under what conditions do you want to hide it? MinimapCluster:Hide(), MinimapCluster:Show() will hide/show it. The conditions would be the coding bit.

Scalable: MinimapCluster:SetScale(scale) ie, MinimapCluster:SetScale(0.5)

2. Change the artwork for it, along with options for pre-determined "schemes".

Put all the replacement textures in your addon folder and then :SetTexture to each artwork element. This will only work for elements that have a name. (I believe all do in the minimap cluster now)

3. Change the shape (Circle, Box, Diamond, and maybe Octogon).

Make the artwork above cover more of the minimap in the desired shape. The round minimap is untouchable by mods.

4. Change the shape, size, and alpha of the buttons around the MiniMap.

You can change the size with :SetHeight and :SetWidth. The shape you can overlay an image but you generally won't be able to alter the existing artwork of non-default buttons without enumerating the child windows it and hoping the textures are named. To get the buttons you can enumerate through the child windows of the Minimap frame.

Last edited by Gello : 11-23-05 at 04:43 PM.
  Reply With Quote

WoWInterface » Developer Discussions » Lua/XML Help » Step by Step, a newbie's plea.

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off