The blueprint list specifies which weapons FTL can use. By putting a blueprint list in your blueprints.xml.append, you override the pre-existing list, meaning that the only weapon anyone can use would be your Giscard. Since the Giscard is player-only, this means that all other opponent ships will call weapons that aren’t on the list, meaning that they won’t have any weapons, and the entire house of cards collapses.
Since we don’t want to do that, we instead add just the blueprint. Adding the blueprint itself to blueprints.xml.append will add it to the existing list within FTL’s blueprints.xml.
But none of this has to do with your weapon errors. The reason your weapon sounds and appears incorrectly is because of problems within the blueprint of the weapon itself. For example,
Code: Select all
<weaponBlueprint name="GISCARD">
<type>LASER</type>
<flavorType>Antipersonnel Laser</flavorType>
<title>Z Pierce</title>
<short>Z P.</short>
<desc>This advanced weapon will destroy and disable anything in its path!</desc>
<tooltip>Fires 3 lasers; does 2 ion; does 3 personal damage; with a chance to breech</tooltip>
<persDamage>3</persDamage>
<damage>0</damage>
<ion>2</ion>
<shots>3</shots>
<sp>3</sp>
<fireChance>0</fireChance>
<breachChance>3</breachChance>
<cooldown>10</cooldown>
<power>2</power>
<cost>60</cost>
<bp>2</bp>
<rarity>2</rarity>
<image>giscard</image>
<launchSounds>
<sound>giscardfire</sound>
</launchSounds>
<hitShipSounds>
<sound>giscardaudio</sound>
</hitShipSounds>
<hitShieldSounds>
<sound>giscardaudio</sound>
</hitShieldSounds>
<missSounds>
<sound>miss</sound>
</missSounds>
<weaponArt>giscard</weaponArt>
</weaponBlueprint>
<image>refers to the bullet animation, not the weapon itself.
<weaponArt>giscard refers to your gun animation.
But it appears that in your animations.xml.append, you name the bullet, explosion, and weapon animation sheets all as “giscard”, which means that they override each other. This explains many of your visual errors. I’ll go into further detail below.
First, your weapon itself.
This is what you have:
Code: Select all
<animSheet name="giscard" w="32" h="80" fw="32" fh="80">weapons/giscard.png</animSheet>
<weaponAnim name="giscard">
<sheet>giscard</sheet>
<desc length="3" x="0" y="0"/>
<chargedFrame>1</chargedFrame>
<fireFrame>2</fireFrame>
<firePoint x="15" y="20"/>
<mountPoint x="7" y="30"/>
<chargeImage>weapons/giscard_glow.png</chargeImage>
</weaponAnim>
FTL’s coding expects an image called giscard_strip8.png, but your gun image is named giscard.png.
The desclength tag should equal 8, because there’s 8 frames. (Disregard x=0, y=0 for now.)
w, h, fw, and fh should change: these specify width of image, height of image, frame width, and frame height respectively. Your image is 240*60, and each frame is 30*60.
Here, the weaponAnim refers to and summons the animSheet “giscard”, and that animSheet refers to the weapon image itself.
But in your code…
Code: Select all
<animSheet name="giscard" w="75" h="43" fw="25" fh="43">effects/giscard_explosion.png</animSheet>
<animSheet name="giscard" w="200" h="20" fw="50" fh="20">weapons/laser_light2_strip4.png</animSheet>
<animSheet name="giscard" w="32" h="80" fw="32" fh="80">weapons/giscard.png</animSheet>
All three of your animSheets—bullet, weapon, and explosion—are all named “giscard”. And this is very bad, because when your weaponAnim asks for the “giscard” animSheet, it won’t know which one to call for.
So let’s rename the animSheets when we go forward.
Onto the Explosions! These are actually covered inside the blueprint itself.
Code: Select all
<weaponBlueprint=”giscard”….
….
<explosion>giscard_explosion</explosion>
<weaponArt>giscard</weaponart>
</weaponBlueprint>
Now your giscard weaponBlueprint will ask for the explosion art sheet. This should look something like:
Code: Select all
<animSheet name=”giscard_explosion” w=”your dimensions here”….>effects/giscard_explosion.png </animsheet>
<anim name=”giscard_explosion”
<sheet>giscard_explosion</sheet>
<desc length=”however many frames you have”…./>
<time>how long the animation is</time>
</anim>
Here, I’ve renamed the animSheet to “giscard_explosion”, so we don’t get naming conflict errors.
Now, onto the bullet. Here, it looks like you’ve borrowed FTL’s laser_light1 sheet. So you can just reference the laser_light1 sheet, and don’t need to add your own custom animation.
Code: Select all
<weaponBlueprint=”giscard”…
…
<image>laser_light1</image>
…
</weaponBlueprint>
Now, onto the audio!
If your sounds are just copied from the game, then you can just reference a default sound sheet.
Assuming they’re not…
Create a sounds.xml.append for your custom sound. Inside, you create and declare your custom sound:
Code: Select all
<YOUR SOUND NAME volume="2">weapons/your_sound_filename.ogg</YOUR SOUND NAME>
And within your weaponBlueprint, you reference your custom sound. It appears that you’ve done that already, so I won’t get into that. Here, your problem was a complete absence of sounds.xml.append
And with these tips, you should be able to assemble a working weapon together.
As for miscellaneous comments…
I recognize the Giscard gun sheet from Captain’s Edition (you use the sheet of the Advanced Phase Ion); please be sure to credit Sleeper Service for the artwork in your mod.
You didn’t actually set the <rarity> tag within the <weaponBlueprint> to 0, which means that you’ll be able to purchase the Giscard at shops.
You don’t need an autoBlueprints.xml.append.
And please don’t call things “retarded”. While I understand your frustration, using that word isn’t very professional.