WhiteWeasel wrote:How do I add a custom projectile sprite to my weapon?
If you already know how to make a projectile animation, ignore this part:
Ok, so, for example, if you want to make a gun that shoots a nyan cat, you would take a picture of nyan cat off of the internet, scale it down to a normal projectile size (you just have to assume) in some sort of image manipulation program. If you wanted to make it so that nyan cat would run in flight, you would add multiple pictures side by side, like the frames of a gif.
Here's how to actually make your gun use that projectile:
The first step would be to add it to your animations.xml.append in your data folder. If you don't have an animations.xml.append sheet, here is what would be in one:
Code: Select all
<animSheet name="nyan_cat" w="480" h="40" fw="40" fh="40">weapons/nyan_projectile.png</animSheet>
<anim name="nyan_cat">
<sheet>nyan_cat</sheet>
<desc length="12" x="0" y="0"/>
<time>0.2</time>
Next, you would go into your blueprints.xml.append where I assume you have already written the code for your weapon, and in the <image> tags you would write the name of your anim. I highly recommend you make the name of the animsheet and the anim the same.
Since I am not sure how to add an image to this

you can download FTL UnPacker from somewhere in the forums and it will unpack your data.dat and resources.dat so that you can look at the game files and clarify anything that may not have made sense coming from me, and you can also go into the unpacked img folder and find the picture of a laser bolt (in the weapons subfolder) and edit that, and save it as a new one.