View Single Post
Old 08-12-2002, 06:33 PM   #4
Faille
A Gray Wolf
 
Join Date: Aug 2002
Posts: 8
Default

Yeah.. look at the EQUI_Animations.xml and look at the corresponding .tga and things should become clearer. Let me see if I can explain it to you without making it more confusing

EQ's XML uses an object called "Ui2DAnimation" to define what the various graphics look like for the interface. It can specify a full file to be used, or that only part of an image be used, which is why many of the tga files have many different items on them.

The example that I am going to use is the "A_GaugeBackground" Ui2DAnimation from the EQUI_Animations.xml file. You can get to it by going to line 3164 or just searching for "A_GaugeBackground" in that file. The code for it looks like this:
Quote:
<Ui2DAnimation item = "A_GaugeBackground">
<Cycle>true</Cycle>
<Frames>
<Texture>window_pieces01.tga</Texture>
<Location>
<X>110</X>
<Y>10</Y>
</Location>
<Size>
<CX>100</CX>
<CY>8</CY>
</Size>
<Hotspot>
<X>0</X>
<Y>0</Y>
</Hotspot>
<Duration>1000</Duration>
</Frames>
</Ui2DAnimation>


I'll be honest and say that I'm not sure how to define moving animations specifically, but I can explain the parts that deal with getting the actual image. The <texture></texture> tag is where you tell the xml which file to look at for the picture. In this case it's windows_01.tga .. if you look at it in Photoshop you can see that it has a lot of the different scroll bars, cursors, etc. If you wanted to get the Gauge Background from a different file you would change this texture tag value, or you can directly modify the TGA

The <location></location> tag specifies the top and left coordinates for where this particular image starts. X is left and Y is top. Here, X=110 and Y=10. If you move your cursor around the .tga in photoshop to the coordinate X=110 and Y=10, you should be at the top left of the gauge background image (the empty gauge without any XP in it). You can see what pixel you're at by clicking the Info Tab in the Navigator/Info window.

The <size></size> tag defines the width and height of the image. CX is width and CY is height. Here CX=100 and CY=8. If you start at the point 110,10 and drag your mouse to the right 100 pixels and down 8, you should have the background gauge highlighted. This is how EQ knows which part of the image to use. Maybe someone else can explain the other items

This image is named "A_GaugeBackground" (Ui2DAnimation item="A_GaugeBackground") and can now be used anywhere that a Ui2DAnimation is needed.

If you take a look at any of the <Gauge></Gauge> tags in the EQUI_PlayerWindow.xml file, you'll come to a section that says GaugeDrawTemplate. Each of the tags in that section refer to a Ui2DAnimation. You'll notice that the Background tag has the value A_GaugeBackground, which was defined above.

If you're looking through the files and can't find a certain definition, take a look at the EQUI_Animations.xml because you will probably find it there, although you can define Ui2DAnimations in just about every file I believe.

It was very helpful to me starting out to start at the beginning of a file, look at the first tag, find it in the AboutSIDL.doc, look at the attributes and what type it could take, and then move down and go from there. Anything in the SIDL that says type Ui2DAnimation can use one of those defined pictures in the EQUI_Animations.xml file.

If this is confusing let me know how and I'll try to clarify Good luck
Faille is offline   Reply With Quote