Thread Tools Display Modes
07-19-08, 05:18 PM   #1
Ipood
A Deviate Faerie Dragon
AddOn Author - Click to view addons
Join Date: Nov 2006
Posts: 14
Help making my first addon.

Well basiclly im a total noob to this.
i have no experience in coding exept maby in html and php.

so what i want is just points in the right direction.
So the addon i want to make is a pretty simple one in ace2. I just want to make a addon that has the most usefull macros for all wow's different classes in it.

and with that i mean i want the macros only in text. so that people can have them and just copy/paste them into the wow macro windows and they will work.

so its not a addon that needs to interact with something.

basiclly what i picture is just a frame. with all wow's classes listed in buttons horizontally placed in the top of the frame.

in the frame i just want a window with the info. and this info (the macros and what they do) will change depending on what class u click on. and i want this text to be markable and u should be able to copy it.

and @ the bottom just a close button.

thats it.
nothing fancy.

Mind u i want to write this addon and be able to say that i made it.
i just wants some points in the right direction on what code might be best to use and such.

and ye. only addons ive done is two addons with "AddOn Studio for World of Warcraft"
and theese where only the 2 tutorial addons. one for ace2 and one normal wow addon. so my experience in making wow addons isnt big :P

Over and out.
  Reply With Quote
07-19-08, 09:13 PM   #2
Seerah
Fishing Trainer
 
Seerah's Avatar
WoWInterface Super Mod
Featured
Join Date: Oct 2006
Posts: 10,860
I'm just curious, but what benefit would this have as an addon over just being a text file?
__________________
"You'd be surprised how many people violate this simple principle every day of their lives and try to fit square pegs into round holes, ignoring the clear reality that Things Are As They Are." -Benjamin Hoff, The Tao of Pooh

  Reply With Quote
07-19-08, 09:37 PM   #3
Icecoldcoke
A Flamescale Wyrmkin
AddOn Author - Click to view addons
Join Date: Sep 2007
Posts: 132
Originally Posted by Seerah View Post
I'm just curious, but what benefit would this have as an addon over just being a text file?
It would be a text file.. in-game
  Reply With Quote
07-19-08, 09:54 PM   #4
EWOlson
A Fallenroot Satyr
Join Date: Jun 2008
Posts: 24
First off, I wouldn't start out to make a specific addon. I'd do some small things to get the hang of coding in XML and Lua. A "Hello, world!" type addon comes to mind.

Second, I'd suggest staying away from libraries like Ace. I find them a crutch. The WoW API is simple enough without a library making it more simple (more complicated).

Feel free to check out my addons. For the most part they are very simple and I try to use best practices when it comes to coding.
  Reply With Quote
07-20-08, 04:38 AM   #5
Ipood
A Deviate Faerie Dragon
AddOn Author - Click to view addons
Join Date: Nov 2006
Posts: 14
well yes its a textfile ingame. but also i figured out i want to add different bosses and useable macros for them.

keep in mind that this is my first addon. so i didnt want it to eb something advanced. thus a easy textfile addon :P

ye i like ace. mainly cuss it makes tha addon lightweight.
althou i might test just in WoW API just cuss its my first addon and then maby somhow remake it in ace.

and as i wrote ive done 2 hello world type of addons.
  Reply With Quote
07-20-08, 04:49 AM   #6
Amethyst
A Fallenroot Satyr
 
Amethyst's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2006
Posts: 20
Could be interesting, thinking about the fact that mods can actually create macros.

For ideas, you could display a list in-game of useful macros, each with a "create me this macro" button.

As for getting started? One of the biggest issues I found was tutorials that are badly out of date.

I found the following worked for me:

1. Check the forums here for stuff.

2. Download some simple mods and look at the code in them. Where possible grab code from established authors with lots of mods, as they're more likely to produce "good code" that's worth learning from.

3. Reference. Although wowwiki.com is a bit out of date or incomplete in many places, it's still a fairly good reference.
  Reply With Quote
07-20-08, 05:07 AM   #7
EWOlson
A Fallenroot Satyr
Join Date: Jun 2008
Posts: 24
Feel free to view the comments on Amethyst's page for why I don't use libraries.

The WoW API has plenty of bugs to code around without adding any bugs that are introduced by a library.

Libraries aren't lightweight. They are a crutch. What you mean is you personally have to do less coding, but the addon itself, with libraries, is much larger than an addon written without them.

Oh, and although you've done two "Hello, world!" style addons, one was done using a library, and both were done using some program I've never heard of. So I wouldn't count either of them. All you need is a text program to write addons. That's it. Oh, and references. Lots, and lots, of references.

Last edited by EWOlson : 07-20-08 at 05:10 AM.
  Reply With Quote
07-20-08, 08:32 AM   #8
Ipood
A Deviate Faerie Dragon
AddOn Author - Click to view addons
Join Date: Nov 2006
Posts: 14
u should try the program out. its like dreamweaver for html but for wow only :P

i like the idea u had Amethyst. althou i might begin with just getting the concept first and then add on to it.

reading up on things now. need to learn alot of things.
  Reply With Quote
07-20-08, 09:58 AM   #9
Dreadlorde
A Pyroguard Emberseer
 
Dreadlorde's Avatar
AddOn Author - Click to view addons
Join Date: Dec 2006
Posts: 2,302
You could get the list of macros and paste it in tinypad.
__________________

Funtoo - Plan 9 - Windows 7
  Reply With Quote
07-20-08, 10:42 AM   #10
Ipood
A Deviate Faerie Dragon
AddOn Author - Click to view addons
Join Date: Nov 2006
Posts: 14
but thats removes the fun of learning how to make a addon
  Reply With Quote
07-21-08, 04:54 AM   #11
Ipood
A Deviate Faerie Dragon
AddOn Author - Click to view addons
Join Date: Nov 2006
Posts: 14
was thinking that maby i could use SimpleHTML.
cuss im familiar with html its gonna get stuff done faster.
althou i can figure out how to use the SimpleHTML

this is the code i have so far in the xml file.

Code:
<Ui xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://www.blizzard.com/wow/ui/">
	<Script file="Frame.lua" />
	<Frame name="Frame1" parent="UIParent" toplevel="true" movable="true" enableMouse="true">
		<Size>
			<AbsDimension x="550" y="472" />
		</Size>
		<Anchors>
			<Anchor point="TOPLEFT">
				<Offset>
					<AbsDimension x="72" y="-26" />
				</Offset>
			</Anchor>
		</Anchors>
		<Scripts>
			<OnMouseDown>self:StartMoving();</OnMouseDown>
			<OnMouseUp>self:StopMovingOrSizing();</OnMouseUp>
		</Scripts>
		<Backdrop bgFile="Interface\DialogFrame\UI-DialogBox-Background" edgeFile="Interface\DialogFrame\UI-DialogBox-Border" tile="true">
			<BackgroundInsets>
				<AbsInset left="11" right="12" top="12" bottom="11" />
			</BackgroundInsets>
			<TileSize>
				<AbsValue val="32" />
			</TileSize>
			<EdgeSize>
				<AbsValue val="32" />
			</EdgeSize>
		</Backdrop>
		<Frames>
			<Button name="CloseButton" inherits="UIPanelButtonTemplate" text="Close">
				<Size x="71" y="20" />
				<Anchors>
					<Anchor point="TOPLEFT">
						<Offset x="460" y="-439" />
					</Anchor>
				</Anchors>
				<Scripts>
					<OnClick>CloseButton_OnClick();</OnClick>
				</Scripts>
			</Button>
			<SimpleHTML name="SimpleHTML1">
				<Size x="515" y="387" />
				<Anchors>
					<Anchor point="TOPLEFT">
						<Offset x="17" y="-46" />
					</Anchor>
				</Anchors>
				<FontString />
			</SimpleHTML>
		</Frames>
	</Frame>
</Ui>
and here's my lua
Code:
function CloseButton_OnClick()
	Frame1:Hide();
end
i was just wondering where the hell i put
Code:
<html>
<body>
</body>
</html>
so that i can use html.
or is that in the lua file i put the html ?

Last edited by Ipood : 07-21-08 at 05:21 AM.
  Reply With Quote

WoWInterface » Developer Discussions » Lua/XML Help » Help making my first addon.


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