Page 1 of 2

Modding a Weapon

Posted: Tue Feb 26, 2013 3:43 am
by FrostWyrmWraith
Right, so, I've been through the weapon mod guide and I have experience making multiple ships. I'm currently making a weapon for one of those ships, but I can't seem to make the actual weapon image appear. The projectile custom projectile works, just not the weapon. Here's the coding in the animation file:

Code: Select all

<animSheet name="duallaser2" w="192" h="60" fw="16" fh="60">weapons/duallaser2_strip12.png</animSheet>

<weaponAnim name="duallaser2">
	<sheet>duallaser2</sheet>
	<desc length="12" x="0" y="0"/>
	<chargedFrame>5</chargedFrame>
	<fireFrame>8</fireFrame>
	<firePoint  x="10" y="16"/>
	<mountPoint x="4" y="44"/>
</weaponAnim>

<animSheet name="laser_light3" w="200" h="20" fw="50" fh="20">weapons/laser_light3_strip4.png</animSheet>

<anim name="laser_light3">
	<sheet>laser_light3</sheet>
	<desc length="4" x="0" y="0"/>
	<time>0.5</time>
</anim>
And the coding in the blueprints:

Code: Select all

<weaponBlueprint name="Laser_Battery">
	<type>LASER</type>
	<title>Laser Battery</title>
	<short>Laser Battery</short>
	<desc>A laser weapon which fires two shots at once.</desc>
	<tooltip>Two shots, one damage per shot, simultaneous fire.</tooltip>
        <damage>2</damage>
	<shots>1</shots>
	<sp>0</sp>
	<fireChance>3</fireChance>
	<breachChance>3</breachChance>
	<cooldown>9</cooldown>
	<power>1</power>
	<cost>55</cost>
	<bp>6</bp>
	<rarity>2</rarity>
	<image>laser_light3</image>
	<launchSounds>
		<sound>heavyLaser1</sound>
		<sound>heavyLaser2</sound>
		<sound>heavyLaser3</sound>
	</launchSounds>
	<hitShipSounds>
		<sound>hitHull1</sound>
	</hitShipSounds>
	<hitShieldSounds>
		<sound>hitShield1</sound>
		<sound>hitShield2</sound>
		<sound>hitShield3</sound>
	</hitShieldSounds>
	<missSounds>
		<sound>miss</sound>
	</missSounds>
	<weaponArt>duallaser2</weaponArt> 
</weaponBlueprint>



<blueprintList name="STARTING_WEAPONS">
<name>laser_battery</name>
</blueprintList>
I've been through it multiple times and found nothing. I'm hoping a second set of eyes can spot what I'm missing. Anyone?

Re: Modding a Weapon

Posted: Tue Feb 26, 2013 11:58 am
by kartoFlane
Blueprints appear to be perfectly fine, though I'll admit that I'm not that experienced with weapons, either...
Are you sure you haven't made any sort of stupid typo? Is the weapon's image itself named correctly? The weapon works, so the error has to be of that nature...

Re: Modding a Weapon

Posted: Tue Feb 26, 2013 2:30 pm
by UltraMantis

Code: Select all

<blueprintList name="STARTING_WEAPONS">
<name>laser_battery</name>
</blueprintList>
All is good except the name of the weapon in the starting weapons list MUST match the name used in the weapon blueprint itself. You called one laser_battery and the other Laser_Battery. That is what tripped up the game.

Re: Modding a Weapon

Posted: Tue Feb 26, 2013 3:23 pm
by kartoFlane
Really doubt that's the cause. It's only a list of starting weapons, which I don't think is even used by the game (hence there's no need to even bother adding blueprints to it) - 'tis an untested claim, though.
Besides, the game launched without an error and the ship itself is playable, the only issue is the weapon's graphic not showing up properly, if I understood correctly.

That said, it is an error and correcting them never hurts.

edit:
@down
Well, damn me.

Re: Modding a Weapon

Posted: Tue Feb 26, 2013 5:58 pm
by FrostWyrmWraith
Mantis was right, actually. When I changed that to match the other listing the weapon showed up. Thanks muchly!

Re: Modding a Weapon

Posted: Fri Mar 01, 2013 3:00 am
by FrostWyrmWraith
I have another problem. This time I made a weapon from scratch- custom model and projectile, the whole thing. When it fires though, the projectile doesn't launch and the weapon just resets. I'm clearly missing something, but I don't know what.

For reference, the file names are "plasma_torp_glow.png", "plasma_torp_strip6.png", and "missile_plasma.png".

Code: Select all

<weaponBlueprint name="Plasma_Torp">
	<type>MISSILE</type>
	<title>Plasma Torpedo</title>
	<short>Plasma Torpedo</short>
	<desc>Covenant plasma weapon which fires a concentrated orb of plasma at enemy ships.</desc>
	<tooltip>High fire, decent breach, 2 damage. Pierces shields.</tooltip>
        <damage>2</damage>
	<shots>1</shots>
	<sp>6</sp>
	<fireChance>10</fireChance>
	<breachChance>6</breachChance>
	<cooldown>16</cooldown>
	<power>2</power>
	<cost>80</cost>
	<bp>6</bp>
	<rarity>3</rarity>
	<image>missile_plasma</image>
	<launchSounds>
		<sound>heavyLaser1</sound>
		<sound>heavyLaser2</sound>
		<sound>heavyLaser3</sound>
	</launchSounds>
	<hitShipSounds>
		<sound>hitHull1</sound>
	</hitShipSounds>
	<hitShieldSounds>
		<sound>hitShield1</sound>
		<sound>hitShield2</sound>
		<sound>hitShield3</sound>
	</hitShieldSounds>
	<missSounds>
		<sound>miss</sound>
	</missSounds>
	<weaponArt>plasma_torp</weaponArt> 
</weaponBlueprint>

<blueprintList name="STARTING_WEAPONS">
<name>Plasma_Torp</name>
</blueprintList>

Code: Select all

<animSheet name="plasma_torp" w="102" h="43" fw="17" fh="43">weapons/plasma_torp_strip6.png</animSheet>
<weaponAnim name="plasma_torp">
	<sheet>plasma_torp</sheet>
	<desc length="6" x="0" y="0"/>
	<chargedFrame>5</chargedFrame>
	<fireFrame>6</fireFrame>
	<firePoint  x="8" y="12"/>
	<mountPoint x="2" y="33"/>
        <chargeImage>weapons/plasma_torp_glow.png</chargeImage>
</weaponAnim>

<animSheet name="missile_plasma" w="32" h="51" fw="32" fh="51">weapons/missile_plasma.png</animSheet>
<anim name="missile_plasma">
	<sheet>missile_plasma</sheet>
	<desc length="1" x="0" y="0"/>
	<time>1</time>
</anim>

Re: Modding a Weapon

Posted: Fri Mar 01, 2013 4:33 am
by UltraMantis
Nothing looks wrong. Only suspicious part is that the fire frame is also the last frame of the animation. I don't recall seeing any weapon use that frame to shoot, so maybe it's the reason the weapon simply resets. Try adding a 7th frame and see if that fixes it.

Re: Modding a Weapon

Posted: Fri Mar 01, 2013 3:53 pm
by FrostWyrmWraith
I can try. I attempted shifting the entire thing down by one so it was charged on four and fired on five and it didn't work- I'll see what happens if I add a seventh slide instead.

Re: Modding a Weapon

Posted: Fri Mar 01, 2013 4:02 pm
by FrostWyrmWraith
Unfortunately, it still appears to be glitched.

Re: Modding a Weapon

Posted: Fri Mar 01, 2013 4:34 pm
by kartoFlane

Code: Select all

<type>MISSILE</type>
A potential problem - weapons have type MISSILES. Another thing is, I recall someone having a similar issue here on the forums, and changing weapon type to LASER fixed it.

Also, please follow the naming convention and type your blueprint names in capital letters.