animations.xml - Make lasers fly in different directions

Discuss and distribute tools and methods for modding. Moderator - Grognak
Absu
Posts: 12
Joined: Tue Oct 09, 2012 4:51 pm

animations.xml - Make lasers fly in different directions

Postby Absu » Tue Oct 09, 2012 9:00 pm

I was hoping I could make things like missiles and lasers fly in other directions than left to right. It doesn't seem possible but I thought I'd post here to see if I've missed something.

I'll just go through what I've found. Take the ion-blaster for example. It have got these entries:

Code: Select all

<animSheet name="ion_1" w="240" h="50" fw="30" fh="50">weapons/ion_1_strip8.png</animSheet>


Which is where the gun-texture is rendered.

Code: Select all

<weaponAnim name="ion_1">
   <sheet>ion_1</sheet>
   <desc length="8" x="0" y="0"/>
   <chargedFrame>1</chargedFrame>
   <fireFrame>5</fireFrame>
   <firePoint  x="17" y="7"/>
   <mountPoint x="9" y="35"/>
   <chargeImage>weapons/ion_1_glow.png</chargeImage>
</weaponAnim>


Is responsible for the glow on the gun when it's fired.

These however seem to control the actual bullets that I would want to change:

Code: Select all

<animSheet name="ion_1_shot" w="192" h="24" fw="24" fh="24">weapons/ion_1_shot_strip8.png</animSheet>

<anim name="ion_1_shot">
   <sheet>ion_1_shot</sheet>
   <desc length="8" x="0" y="0"/>
   <time>0.3</time>
</anim>


Changing fh and fw however seem to be like changing the size of the area the texture for the bullet is rendered on, then it's repeating on default and the bullet is rendered over and over again... The attributes h and w are really a mystery though, but it's not doing anything like what I want.

Changing the values in the second tag doesn't seem to do anything. "desc" seem to incadicate it've got something to do with the placement and time the description for the gun stay but I didn't notice any difference.

Anyway, just thought I'd check. The real question perhaps is if anyone have seen a gun that doesn't fire in a straight line from left to right. If there isn't it really makes no sense that you could change something like it. Just going through the file it doesn't seem like there are.
Whale Cancer
Posts: 272
Joined: Fri Sep 21, 2012 3:28 pm

Re: animations.xml - Make lasers fly in different directions

Postby Whale Cancer » Tue Oct 09, 2012 9:28 pm

Absu wrote:I was hoping I could make things like missiles and lasers fly in other directions than left to right. It doesn't seem possible but I thought I'd post here to see if I've missed something.

I'll just go through what I've found. Take the ion-blaster for example. It have got these entries:

Code: Select all

<animSheet name="ion_1" w="240" h="50" fw="30" fh="50">weapons/ion_1_strip8.png</animSheet>


Which is where the gun-texture is rendered.

Code: Select all

<weaponAnim name="ion_1">
   <sheet>ion_1</sheet>
   <desc length="8" x="0" y="0"/>
   <chargedFrame>1</chargedFrame>
   <fireFrame>5</fireFrame>
   <firePoint  x="17" y="7"/>
   <mountPoint x="9" y="35"/>
   <chargeImage>weapons/ion_1_glow.png</chargeImage>
</weaponAnim>


Is responsible for the glow on the gun when it's fired.

These however seem to control the actual bullets that I would want to change:

Code: Select all

<animSheet name="ion_1_shot" w="192" h="24" fw="24" fh="24">weapons/ion_1_shot_strip8.png</animSheet>

<anim name="ion_1_shot">
   <sheet>ion_1_shot</sheet>
   <desc length="8" x="0" y="0"/>
   <time>0.3</time>
</anim>


Changing fh and fw however seem to be like changing the size of the area the texture for the bullet is rendered on, then it's repeating on default and the bullet is rendered over and over again... The attributes h and w are really a mystery though, but it's not doing anything like what I want.

Changing the values in the second tag doesn't seem to do anything. "desc" seem to incadicate it've got something to do with the placement and time the description for the gun stay but I didn't notice any difference.

Anyway, just thought I'd check. The real question perhaps is if anyone have seen a gun that doesn't fire in a straight line from left to right. If there isn't it really makes no sense that you could change something like it. Just going through the file it doesn't seem like there are.


h = height of the sprite strip, w = width of the sprite strip

desc describes the length of the sprite strip along with offsetting

From all my experimentation with animations, I don't think you can change the direction which the projectiles fly.
Contribute to help save the Whales from their various diseases! *DELAYED* Should release the skeleton with the main quests attached by the end of the week (By NOV 9)! *DELAYED* Don't listen to my dates! Things always seem to come up!
Zalkida
Posts: 20
Joined: Tue Oct 02, 2012 12:17 am

Re: animations.xml - Make lasers fly in different directions

Postby Zalkida » Thu Oct 11, 2012 12:35 am

Whale Cancer wrote:
From all my experimentation with animations, I don't think you can change the direction which the projectiles fly.


I would suspect that the actually movement of the projectiles is hardcoded, but I could be wrong.
Zalkida Mirnath - Fear the Assassian
Law
Posts: 66
Joined: Fri Sep 14, 2012 1:36 pm

Re: animations.xml - Make lasers fly in different directions

Postby Law » Sat Oct 13, 2012 10:51 am

Absu wrote:Changing fh and fw however seem to be like changing the size of the area the texture for the bullet is rendered on, then it's repeating on default and the bullet is rendered over and over again...


fh and fw seem to define a size of a sprite within the image. I've found it's for animated sprites like a weapon charging and firing. where h and w tell FTL the height and width total of the image, fh and fw are there to tell FTL how large each sprite actually is.
Image
Forum mods, for your convenience!