Weapon-modding question

Discuss and distribute tools and methods for modding. Moderator - Grognak
User avatar
NarnKar
Posts: 778
Joined: Thu Jun 19, 2014 4:24 pm

Weapon-modding question

Postby NarnKar » Sun Jul 20, 2014 3:46 am

I've been fiddling around with weapon modding, trying to learn the code, and I've got a bit of a problem.

The weapon I've designed is a Super Vulcan--fires three shots, and each volley reduces its cooldown by 4 seconds. It starts with a 25-second cooldown, and charges up to six times, so its final cooldown is just one second. To compensate for the OP-ness of this weapon, I've given it a six power bar requirement.

It fires as expected, but for some reason, the images fail to show up. But I copied all the image code from the Chain Vulcan, so I don't quite know what I'm doing wrong.

Here's the code:

The Blueprint:

Code: Select all

<weaponBlueprint name="SUPER_VULCAN">
   <type>LASER</type>
   <title>Battleship Vulcan</title>
   <short>Super Vulcan</short>
   <desc>Back when super-sized battleships were in style, this weapon was seen frequently. This one has been retrofitted for a modern cruiser, but is still power-hungry..</desc>
   <tooltip>6 Power. 1 damage per shot, 3 shots per volley.</tooltip>
   <damage>1</damage>
   <ion>0</ion>
   <shots>3</shots>
   <sp>0</sp>
   <fireChance>0</fireChance>
   <breachChance>0</breachChance>
   <cooldown>25</cooldown>
   <power>6</power>
   <cost>225</cost>
   <bp>2</bp> <!--what is this. biodamage?-->
   <rarity>5</rarity>
   <image>laser_light1</image> <!--what the bullet is-->
   <boost>
      <type>cooldown</type>
      <amount>4</amount>
      <count>6</count>
   </boost>
   <launchSounds>
      <sound>lightLaser1</sound>
      <sound>lightLaser2</sound>
      <sound>lightLaser3</sound>
   </launchSounds>
   <hitShipSounds>
      <sound>hitHull2</sound>
      <sound>hitHull3</sound>
   </hitShipSounds>
   <hitShieldSounds>
      <sound>hitShield1</sound>
      <sound>hitShield2</sound>
      <sound>hitShield3</sound>
   </hitShieldSounds>
   <missSounds>
      <sound>miss</sound>
   </missSounds>
   <weaponArt>super_vulcan</weaponArt>
   <iconImage>super_vulcan_charge</iconImage>
</weaponBlueprint>


The animations:

Code: Select all

<animSheet name="super_vulcan_charge" w="160" h="67" fw="32" fh="67">weapons/super_vulcan_chargeglow_strip5.png</animSheet>
<anim name="super_vulcan">
   <sheet>super_vulcan</sheet>
   <desc length="4" x="0" y="0"/>
   <time>1.0</time>
</anim>

<animSheet name="super_vulcan" w="320" h="67" fw="32" fh="67">weapons/super_vulcan_strip10.png</animSheet>
<weaponAnim name="super_vulcan">
   <sheet>super_vulcan</sheet>
   <desc length="10" x="0" y="0"/>
   <chargedFrame>4</chargedFrame>
   <fireFrame>5</fireFrame>
   <firePoint  x="18" y="23"/>
   <mountPoint x="4" y="49"/>
   <boost>super_vulcan</boost>
</weaponAnim>


The images themselves:
super_vulcan.png
Image

super_vulcan_chargeglow_strip5.png
Image
User avatar
RAD-82
Posts: 796
Joined: Sat Nov 09, 2013 12:16 am

Re: Weapon-modding question

Postby RAD-82 » Sun Jul 20, 2014 4:57 am

You definitely have issues with your animations.

You posted a picture and called it super_vulcan.png. The animation data is looking for a file called super_vulcan_strip10.png.

There is also problems with the boost image. It isn't using your super_vulcan_chargeglow_strip5.png, which is a copy of chainlaser_2_chargeglow_strip5.png, which was designed for 5 charges. You need a new image designed for 6 charges, then fix the <animSheet> and <anim> for it.

Animation code would probably look like this once you have a new image for the boost:

Code: Select all

<animSheet name="super_vulcan_charge" w="192" h="67" fw="32" fh="67">weapons/super_vulcan_chargeglow_strip6.png</animSheet>
<anim name="super_vulcan_charge">
   <sheet>super_vulcan_charge</sheet>
   <desc length="6" x="0" y="0"/>
   <time>1.0</time>
</anim>

<animSheet name="super_vulcan" w="320" h="67" fw="32" fh="67">weapons/super_vulcan_strip10.png</animSheet>
<weaponAnim name="super_vulcan">
   <sheet>super_vulcan</sheet>
   <desc length="10" x="0" y="0"/>
   <chargedFrame>4</chargedFrame>
   <fireFrame>5</fireFrame>
   <firePoint  x="18" y="23"/>
   <mountPoint x="4" y="49"/>
   <boost>super_vulcan_charge</boost>
</weaponAnim>


Sidenote: On your blueprint, the <iconImage> is an iPad graphic. You probably don't need that. Just mentioning it because you misused the tag.
Image
Junkyard has FTL mods, mostly ships and a few other things.