Reply
Thread Tools Display Modes
Unread 01-31-05, 03:40 PM   #1
Syra
A Kobold Labourer
Join Date: Jan 2005
Posts: 1
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

http://www.scintilla.org/SciTE.html

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.

Code:
ModTemplate.toc
---------------
## Interface: 4150
## Title: Mod Template
## Notes: 
## Author: 
## SavedVariables:
## OptionalDeps:
## Dependencies: 
ModTemplate.xml


ModTemplate.xml
---------------
<Ui xmlns="http://www.blizzard.com/wow/ui/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.blizzard.com/wow/ui/
	..\FrameXML\UI.xsd">

	<Script file="ModTemplate.lua"/>
	<Frame name="ModTemplate" parent="UIParent" hidden="true">
		<Scripts>
			<OnLoad>
				ModTemplate_OnLoad();
			</OnLoad>
		</Scripts>
	</Frame>

</Ui>

ModTemplate.lua
---------------
function ModTemplate_OnLoad()
	if( DEFAULT_CHAT_FRAME ) then
		DEFAULT_CHAT_FRAME:AddMessage("ModTemplate Loaded");
	end
	UIErrorsFrame:AddMessage("ModTemplate Loaded", 1.0, 1.0, 1.0, 1.0, UIERRORS_HOLD_TIME);
end
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 - http://www.scintilla.org/SciTE.html
WoW Wiki: World of Warcraft API - http://www.wowwiki.com/World_of_Warcraft_API
WoW Wiki: UI Customization Guide - http://www.wowwiki.com/WoW_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.
Syra is offline   Reply With Quote
Unread 01-31-05, 08:08 PM   #2
Inokis
EQInterface Staff
 
Inokis's Avatar
AddOn Author - Click to view addons
Join Date: Jan 2005
Posts: 156
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.
Inokis is offline   Reply With Quote
Unread 08-27-05, 12:44 PM   #3
johnbuns2
A Murloc Raider
Join Date: Aug 2005
Posts: 8
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?
johnbuns2 is offline   Reply With Quote
Unread 08-27-05, 02:28 PM   #4
Cairenn
Credendo Vides
 
Cairenn's Avatar
Premium Member
WoWInterface Admin
Join Date: Mar 2004
Posts: 6,904
Not that I ever heard of. Shame. =/
__________________
I'm fine. You know what 'fine' stands for, don't you? Yeah - Freaked Out, Insecure, Neurotic and Emotional
~~~~~~~~~~~~~~~~~~~
Co-Founder & Admin: MMOUI
FaceBook Profile, Page, Group
Avatar Image by RaffaeleMarinetti
Cairenn is online now   Reply With Quote
Reply

Go BackWoWInterface » Developer Discussions » Tutorials & Other Helpful Info. » Mod Dissection: Preface [Crosspost from WoW Forums]

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