2012-12-17

de-personalize

←Older revision

Revision as of 03:57, December 17, 2012

Line 2:

Line 2:

You have to start someplace, and the traditional place to start is with "Hello, World".

You have to start someplace, and the traditional place to start is with "Hello, World".

To accomplish this first task you will need the following items:

To accomplish this first task you will need the following items:



* WoW (World of Warcraft) installed

+

* [[World of Warcraft]] (referred to as "WoW") installed

* An editor that can work with and save pure text.

* An editor that can work with and save pure text.



An AddOn lives in a very specific place. To find that place, first go to the WoW directory (also sometimes called a folder) using whatever file management software you have available. On a Windows platform, that would be Windows Explorer (not Internet Explorer). The program is usually installed on the C: drive of the computer, under the directory's named "Program Files" or "Program Files (x86)" . From pretty much any address bar, simply type "C:\Program Files/Program Files (x86)\World of Warcraft" and press enter.

+

An [[AddOn]] lives in a very specific place. To find that place, first go to the WoW directory (also sometimes called a folder) using whatever file management software you have available. On a Windows platform, that would be Windows Explorer (not Internet Explorer). The program is usually installed on the C: drive of the computer, under the directory's named "Program Files\" or "Program Files (x86)\" (on well supported 64-bit OSes like Windows 7). From pretty much any address bar, simply type "C:\Program Files\World of Warcraft" (or "C:\Program Files (x86)\World of Warcraft") and press enter.



On a Macintosh system, you would use Finder; and on Linux there is a similar mechanism. Whatever you use, you are looking for the installed location for WoW. This is usually at "/Applications/World of Warcraft/" on a Macintosh.

+

On a Macintosh system, you would use Finder; and on Linux there is a similar mechanism. Whatever you use, you are looking for the installed location for WoW. This is usually at "/Applications/World of Warcraft/" on a Macintosh.

Once you find the WoW directory, there is another directory called Interface and within that is another called AddOns. AddOns is the home of all AddOns in WoW. Each AddOn has its own directory under the AddOns directory.

Once you find the WoW directory, there is another directory called Interface and within that is another called AddOns. AddOns is the home of all AddOns in WoW. Each AddOn has its own directory under the AddOns directory.

Now go ahead and do these steps:

Now go ahead and do these steps:



* Create a directory for your AddOn named "HelloWorld"

+

* Create a directory for your AddOn named "HelloWorld\"



* Create three files named: HelloWorld.toc, HelloWorld.lua, HelloWorld.xml

+

* Create three files named: HelloWorld.toc, HelloWorld.lua, HelloWorld.xml



Note that the only difference in the names is the suffix. These denote, in order, [[TOC format|Table of Contents]], the [[Lua]] code file, and the [[XML user interface]] visual elements file. The name of your AddOn directory and the name on the .toc file must match.

+

Note that the only difference in the names is the suffix. These denote, in order, [[TOC format|Table of Contents]], the [[Lua]] code file, and the [[XML user interface]] visual elements file. The name of your AddOn directory and the name on the .toc file must match.



Now to put something into each of these files, and this is where the editor that works with text files comes in. The files must be saved as text, not as some document format. Notepad is a pure text editor, but it is very limited. There are many out there, some of which can help with your programming efforts by understanding the syntax of the [[Lua]] language (more on that later). My personal favorite text editor is [http://www.ultraedit.com UltraEdit].

+

Now to put something into each of these files, and this is where the editor that works with text files comes in. The files must be saved as text, not as some document format. Notepad is a pure text editor, but it is very limited. There are many out there, some of which can help with your programming efforts by understanding the syntax of the [[Lua]] language (more on that later). A favorite text editor is [http://www.ultraedit.com UltraEdit] (not free, but cross-platform: Windows, Mac, and Linux).



For additional Lua Editors check out the additional [[Lua editors]] page, with which [http://notepad-plus.sourceforge.net/uk/about.php Notepad++] is highly recommended; it comes with all the basic features of Notepad along with more advanced features for progressed programmers including syntax highlighting for LUA.

+

For additional Lua Editors check out the additional [[Lua editors]] page, with which [http://notepad-plus-plus.org/ Notepad++] (MS Windows only) is highly recommended; it comes with all the basic features of Notepad along with more advanced features for progressed programmers including syntax highlighting for LUA.

Line 24:

Line 24:

This file tells WoW about your AddOn: what files to load and what order to load them in. Later you will want to peruse the [[TOC format]] page for all of the gory details about what you could put into this file. For now we are just going to give you some basic stuff to include.

This file tells WoW about your AddOn: what files to load and what order to load them in. Later you will want to peruse the [[TOC format]] page for all of the gory details about what you could put into this file. For now we are just going to give you some basic stuff to include.



Using your trusted text file editor, place the following into the HelloWorld.toc file and save it:

+

Using your trusted text file editor, place the following into the HelloWorld.toc file and save it:

## Interface: 30300

## Interface: 30300

## Title: Hello, World!

## Title: Hello, World!

Line 31:

Line 31:

HelloWorld.xml

HelloWorld.xml



See the line with ## Interface: 30300 in it? That value is obsolete, and you will need to put in the current value. If you already have some AddOns installed, you can just look into their .toc files and see what they used. Another way is to visit http://wow.go-hero.net and look there. You will want the TOC Build number for the latest Public Server version listed.

+

See the line with ## Interface: 30300 in it? That value is obsolete, and you will need to put in the current value. If you already have some AddOns installed, you can just look into their .toc files and see what they used. Another way is to visit [http://wow.go-hero.net WoW.Go-hero.net's FrameXML Archive] and look there. You will want the TOC Build number for the latest Public Server version listed.

What is this number? It is the user-interface (UI) version for the AddOn. The "30300" is version 3.03.00 (or 3.3.0). This number tells WoW that your AddOn is compatible with Blizzard UI level 3.3.0. If your UI number does not match the Blizzard UI number, your AddOn will be considered out of date. This is to minimize problems caused by old UI modifications hosing Blizzard's UI.

What is this number? It is the user-interface (UI) version for the AddOn. The "30300" is version 3.03.00 (or 3.3.0). This number tells WoW that your AddOn is compatible with Blizzard UI level 3.3.0. If your UI number does not match the Blizzard UI number, your AddOn will be considered out of date. This is to minimize problems caused by old UI modifications hosing Blizzard's UI.

Line 198:

Line 198:

You should see your new HelloWorld in this list. The name should be yellow, and the checkbox to the left should be checked.

You should see your new HelloWorld in this list. The name should be yellow, and the checkbox to the left should be checked.



If the name is red and you see an '''Out of date''' message to the right, you probably didn't change the '''## Interface: 30300''' value as described above under [[#The .toc or Table of Contents|The .toc or Table of Contents]]. Review that section and make the appropriate change. I do not recommend running your AddOns with the 'Load out of date AddOns' checkbox checked. That's asking for trouble as an AddOn that attempts to use old UI features can corrupt a new UI. Nearly every patch that changes the UI level has had problems with old AddOns that have not been updated to conform to the new UI standards.

+

If the name is red and you see an '''Out of date''' message to the right, you probably didn't change the '''## Interface: 30300''' value as described above under [[#The .toc or Table of Contents|The .toc or Table of Contents]]. Review that section and make the appropriate change. Running your AddOns with the 'Load out of date AddOns' checkbox checked is not recommended. That's asking for trouble as an AddOn that attempts to use old UI features can corrupt a new UI. Nearly every patch that changes the UI level has had problems with old AddOns that have not been updated to conform to the new UI standards.



If you don't see the name at all, make sure that you have placed the HelloWorld directory in the AddOns directory, which is in the Interface directory under the WoW installation location. On my system (Windows) it is 'C:\Program Files\World of Warcraft\Interface\AddOns\HelloWorld'. The files inside that directory should all start with 'HelloWorld' and have the .toc, .lua, and .xml endings.

+

If you don't see the name at all, make sure that you have placed the HelloWorld directory in the AddOns directory, which is in the Interface directory under the WoW installation location. On a Windows system, it would be 'C:\Program Files\World of Warcraft\Interface\AddOns\HelloWorld'. The files inside that directory should all start with 'HelloWorld' and have the .toc, .lua, and .xml endings.

A note for Windows users; make sure that you have not saved the files as HelloWorld.toc.txt, etc., as an option in Windows Explorer will hide the .txt on the end.

A note for Windows users; make sure that you have not saved the files as HelloWorld.toc.txt, etc., as an option in Windows Explorer will hide the .txt on the end.

Show more