Home Forum Downloads My Favorites Register FAQ

Go Back   EQInterface Forums > Tutorials & Info. > XML Tutorials & Info.
User Name
Password

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Old 05-18-2007, 10:53 AM   #1
fenrian1
A Shissar Defiler
 
fenrian1's Avatar
 
Join Date: Jun 2005
Posts: 164
Interface Author - Click to view interfaces
Default Managing custom animations and templates.

After writing a quick tutorial to answer someones question, I decided to write a proper tutorial on how to manage and create custom templates and animations. I suspect this post will get rather long and I ask that the board guru's please read and coment on any errors so I can update/fix as needed. I will start by saying, I am not a programmer and every thing I know I learned from trial and error and spending many many hours using the search feature. I will start with some discussion before I move to actual coding. I was raised by 2 professors, so if I begin to sound like I am lecturing, you can blame them =).

The EQ UI is unfortunately loaded with a ton of hardcoding, so certain things can not be altered with a custom template, the close and minimize buttons are a good example, they will always appear in the same spot, regardless of how you code them.

For the vast majority of mods, there is no reason to modify the animations code. If you want a custom border on a mod, the simplest thing to do is to change the WindowDrawTemplate to WDT_RoundedNoTitle, then modify the tga file. This of course will then affect every window that uses that template, which is not always desireable. The next simplest method is to set borders and titlebar to false, set transparent to true, then use a custom StaticAnimation that has the look you want. In order to do something like have a close or minimize button, but have no visible title bar, you will have to make a custom Template that has a clear title bar since the close button is hardcoded to the title bar.

I will start by defining some language;
EQUI.xml: the so called "xml" file, this tells the game what code files to use in the UI.
Screen item: the actual UI piece, or a window inside the UI piece.
Template: this tells the game what parts to use and how to put them together.
Animation: the actual image used by the template, its called a UI2DAnimation in the code.
Texture: the tga file that contains the animation image
.TGA: a image extension similar to .jpeg but allows for an alpha chanel

Every image seen on the screen requires 2 things, a texture and an animation. depending upon the item, it may also require further defining of the animation. Most animations will work as a UI2DAnimation, but certain images such as backgrounds require that the UI2DAnimation be refined as a StaticAnimation.

Every screen item requires a template to tell the game what parts it needs how to put them together, the template then tells the game what parts to use and the animation file then tell the game what texture to use and where on that texture the image is.

Many modders create a custom xml file and then include a modded EQUI.xml file that tells the game to include both all the normal stuff as well as thier custom xml file. I will not go into the details here of how to do this since their is already a tutorial on it. This is a good method of working since the UI will only break when the xml file is updated, and that pretty much only happens when a new UI piece is added, like the browser window on 5/16/07.

If you make a custom animations file, it will break every time the animations file is updated, which is fairly often. It will also make your mod incompatible with any other mod that uses a custom animations file.

There are several places to include modified templates,animations and textures. You can modify the default stuff, make a custom xml file, include it at the top of the UI piece you are modding, or include it at the top of the actions window code if you want it global. I prefer this last method since the actions window is never updated by sony and since its the first UI piece to be read, an custom code placed here will be global and very stable.

Now for the coding itself...
fenrian1 is offline   Reply With Quote
 




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


All times are GMT -5. The time now is 08:50 AM.


vBulletin Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
© MMOUI