1) The Heavy Laser built into vanilla FTL seems to "fade up" its charge image. When I try to mimic this in XML coding my own weapon, it just jumps to the full charge after charging. How do I get it to fade into the "full charge" frame?
2) I'm having trouble lining up my projectiles with the firing weapon animation. I know the firing "source point" is affected by x and y values in the animation coding, but is there no way of knowing what the number should be without trial and error?
3) How do I link sounds to the xml files? I know for images, you need a special subroutine place in your blueprints. Is it the same for firing/hit/miss sounds?
1: If you check the vanilla heavy lasers you will see that they have a _glow.png image, which is referenced in the weapon anim and independent from the actual animation sprite. You need to create one of these and put it in the anim. Then the weapon will use it as charge glow that is faded in while the weapon charges.
2: You can open your weapon anim in the image manipulation program of your choice and zoom in on the first frame of the weapon animation. That's where the firing point is referenced. Look for the point the projectile shoild emerge and put the x and y coordinates in the weapon anim. Again, opening some vanilla weapons and checking where their fire points are might be helpful.
3: Yeah pretty much he same. You can put your sounds in via an sounds.xml.append. The audio directory has various subdirectories and you you might want to mimic that structure. Sound implementation is quite simple. They are put into the game via little soundsheet like this:
The opening and end tag is also the ID of the sound that you will use in the blueprints. Notice the weapons/ subdirectory in the path. You might have to trail and error a little till you get the volume right.
Thanks for the reply! Solved the charge image and projectile alignment. The burst laser base code is misleading, because it has the source of the shot appearing over a firing image instead of the first image in the animation sequence, yet is still aligned when firing ingame (but not aligned when I try it on my own weapon).