WoWInterface (
-   Tutorials & Other Helpful Info. (
-   -   Mod Dissection: Preface [Crosspost from WoW Forums] (

Syra 01-31-05 03:40 PM

Mod Dissection: Preface [Crosspost from WoW Forums]
Alright, I decided to start a series of tutorials, my long term goal is to take some of the existing mods, disect them, and help explain how they work.

However, there are a few things and tools I'd like to present for those that might need them, and that personally help me when I'm making mods.

First, and foremost, an editor, you're going to be editing lots of files with just plain text. Notepad works just fine, however, I use and recommend SciTE

Next, something I made for myself, that just speeds up some of the initial gruntwork of creating a new mod. I made a template, that has some of the most basic information possible.


## Interface: 4150
## Title: Mod Template
## Notes:
## Author:
## SavedVariables:
## OptionalDeps:
## Dependencies:

<Ui xmlns="" xmlns:xsi="" xsi:schemaLocation="

        <Script file="ModTemplate.lua"/>
        <Frame name="ModTemplate" parent="UIParent" hidden="true">


function ModTemplate_OnLoad()
        if( DEFAULT_CHAT_FRAME ) then
                DEFAULT_CHAT_FRAME:AddMessage("ModTemplate Loaded");
        UIErrorsFrame:AddMessage("ModTemplate Loaded", 1.0, 1.0, 1.0, 1.0, UIERRORS_HOLD_TIME);

I'll try and find a place to host these files as a download, but, wanted them posted for completeness sake inside this post. The .toc file provides the WoW client with information on what the mod is, and what dependencies it has. The .xml file defines the visual UI elements and what script file corresponds to certain interactions with the UI. The .lua file is the actual code that's run and processed on those interactions. The above is a full, working mod, that simple displays ModTemplate loaded in the overhead chat when loaded. A good starting point for almost any mod.

I confess, I'm ignorant of what other fields can be put in the .toc files and I also don't know exactly how the UI tag is made up, just that it's neccessary.

I know that's quite a bit to digest, and, I apologize, but a little more filler. LUA is a great scripting language, and it's how most of the functionality of your mods will come to be. Fortunately, it's not that complex, it's very human readable, and it's easy enough to pick up that until I'd looked at a few mods, I'd never coded anything in LUA. I know programming theory, but, before WoW modding, I'd never touched the language itself, I've figured almost everything I know about LUA from examining mods.

So, having bored you to death with some of the above. That may or may not be relevant to this actual lesson, but, neccessary for my own train of thought and considering this is a series of tutorial, I wanted to get some things out of the way, even if they end up being forgotten for a good long while.

I wanted to dissect existing mods, but, a good number I wanted to do, would be jumping just a bit far for a progressive tutorial. So, I've decided to do a hybrid of explaining a few functional mods, and then some mods of my own, and then onto some of the existing mods. I may deviate, but, that's the basic plan.

Lastly, some useful links.

Scintella Text Editor -
WoW Wiki: World of Warcraft API -
WoW Wiki: UI Customization Guide -

Of special note, the WinMPQ let's you extract files from the game, and those can be a great source of ideas and learning.


I know this preface isn't what was promised, but it's information I wanted to put out there before going into the meat of something else. I'm not sure how helpful it'll be as a good deal of it is just stuff that's been stated elsewhere with my own rambling.

Inokis 01-31-05 08:08 PM

This is somewhat of a double post, since I responded with the same comments to Cairenn's thread:


Originally Posted by Inokis
Personally after working with the default UI, I've found it's extremely easy to break. For example, moving an item from one of the layers to a different one will often break the window.

I think the explanation of what is what and such is a good idea. However, similar to the EQUI, having a list of what is/isn't possible is a good idea as well.

Coding a window from scratch, I can follow the WoW XML schema to a tea, no errors in the xml itself, then on load the window will either not display correctly or crash the game. I think its a lot more than learning how to code a window, its an experience issue with what items can be contained in what layers and what items don't mesh if not contained in their own separate layer.

johnbuns2 08-27-05 12:44 PM

Did these tutorials ever get made?
Did these tutorials ever get made? It's been 7 months methinks. :( If anyone knows the links post them?

Cairenn 08-27-05 02:28 PM

Not that I ever heard of. Shame. =/

All times are GMT -6. The time now is 12:05 PM.

vBulletin © 2018, Jelsoft Enterprises Ltd
© 2004 - 2017 MMOUI