EQInterface Forums

EQInterface Forums (http://www.eqinterface.com/forums/index.php)
-   Graphics modification help. (http://www.eqinterface.com/forums/forumdisplay.php?f=31)
-   -   animated invintory class icon (http://www.eqinterface.com/forums/showthread.php?t=2809)

abbaar 10-09-2002 06:07 PM

animated invintory class icon
 
How many frames can it be?¿


do you need to modify any xml or just create the tga files with the correct size and file name drop them in the dir and go?¿

Earthscum 10-09-2002 07:52 PM

ok, here's how it's done:

You create your animation (however many frames you want) and paste them all together in one TGA file (remember the Alpha channel!)

Now, to make the animation, you define the texture:

<TextureInfo item = "Skelly_Animation.tga">
<Size>
<CX>512</CX>
<CY>1024</CY>
</Size>
</TextureInfo>

Then you define your frames:

<Ui2DAnimation item = "Skelly">
<Cycle>true</Cycle>
<Frames>
<Texture>Skelly_Animation.tga</Texture>
<Location>
<X>4</X>
<Y>10</Y>
</Location>
<Size>
<CX>120</CX>
<CY>200</CY>
</Size>
<Hotspot>
<X>0</X>
<Y>0</Y>
</Hotspot>
<Duration>150</Duration>
</Frames>
<Frames>
<Texture>Skelly_Animation.tga</Texture>
<Location>
<X>132</X>
<Y>10</Y>
</Location>
<Size>
<CX>120</CX>
<CY>200</CY>
</Size>
<Hotspot>
<X>0</X>
<Y>0</Y>
</Hotspot>
<Duration>150</Duration>
</Frames>
</Ui2DAnimation>

All the frames need to be within the same <Ui2DAnimation> tags.
The <Duration>1000</Duration> is 1 second, 250 is 1/4 a second, etc etc.
If you forget the <Cycle>true</Cycle> before listing your frames, it won't work. This is how you can use as many frames as you want.

Next, you place the image:

<StaticAnimation item= "Skelly">
<ScreenID>Skelly</ScreenID>
<Location>
<X>160</X>
<Y>40</Y>
</Location>
<Size>
<CX>120</CX>
<CY>200</CY>
</Size>
<Animation>Skelly</Animation>
</StaticAnimation>

and don't forget to add:

<Pieces>Skelly</Pieces>
at the end.

Pretty simple and straight forward :-) Good luck!!!

Iluvatar 10-10-2002 01:04 AM

You might get some trouble using the above declaration.
Basically (and even in detail) that "how-to-do" is nicely done, BUT you must not define the same name twice.
In the above example the UI2DAnimation item is called "Skelly" and the StaticAnimation item is called "Skelly" too.
Now, I'm not sure if the items in the <pieces> tags are called by their item name or their screen ID but I'd go safe and define different names every time...

Earthscum 10-10-2002 02:12 AM

Actually, that is part of the code I actually wrote for my inventory window. I set my autoequip area transparency to true and overlayed it with the animation... no problems at all! Except that I used screenshots of a pet and tried to duplicate the swaggering effect and he looks more likle Stevie Wonder's corpse the way he moves, but oh well... I'll get around to fixing it some day, lol!

It probably would be a better idea to do the item name (also <pieces>) as different name, ie. "A_Skelly". But, as I said before, I don't have any errors from it.

faBBe 10-25-2002 12:30 AM

You are probably going to be fine as long as you dont have names colliding in the same 'family'

i.e. you can't have 2 UI2DAnimation's named 'skelly', but you can have a StaticAnimation and a UI2DANimation named 'skelly', each of those are of different types.


All times are GMT -5. The time now is 03:40 AM.

vBulletin Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.