[Modding]Creating your own weapons

Discuss and distribute tools and methods for modding. Moderator - Grognak
Durandal
Posts: 5
Joined: Fri Jan 25, 2013 7:28 pm

Re: [Modding]Creating your own weapons

Postby Durandal » Tue Jan 29, 2013 12:16 am

thashepherd wrote:
Durandal wrote:What would cause a weapon to show up in-game, but when fired, NOTHING happens at all?

I can't figure out what I did wrong.


Check the reference to the projectile & your animations.xml.append in general.


Thanks for the reply! I never did figure out what I was missing, but I started over by copying someone else's mod (as suggested) and got it to work.

NEXT QUESTION: Is there a way to make a weapon like this?
  • Shoots 3 shots
  • Each shot takes out a shield, but doesn't do hull damage
  • 1 damage to systems and crew
  • If hitting a systemless room, 1 damage to hull
Kind of like a more versatile burst laser (but it would take more power). Could be used for anti-crew or anti-ship.

From what I could tell, weapons that do zero hull damage can't hurt shields, and "hullbust" can only be double or nothing, not +1. Hoping I am wrong :D
Dark Spartan
Posts: 8
Joined: Sun Feb 10, 2013 4:27 pm

Re: [Modding]Creating your own weapons

Postby Dark Spartan » Mon Feb 11, 2013 8:37 pm

Real quick. Is there a way to edit the rate of fire of the weapon? Not the cooldown between charges, but literally how fast something like a burst laser fires its burst, increasing or reducing the amount of time between shots in the burst. I'm trying to make a sort of laser machine gun and I've hit this wall.

I've also had problems getting projectiles to work. I'm thinking that I'm missing a crucial step that links the projectile animation to the weapon itself, but I'm having problems finding it. These are the contents of my animations.xml.append file:

The weapon was created with the id HRL_1, for Heavy Repeating Laser. It uses the Burst Laser Mark III weapon mount model at the moment, and I'm trying to give it projectile animations.

Code: Select all

<animSheet name="hrl_1" w="300" h="64" fw="25" fh="64">weapons/laser5_strip12.png</animSheet>

<weaponAnim name="hrl_1">
   <sheet>hrl_1</sheet>
   <desc length="12" x="0" y="0"/>
   <chargedFrame>5</chargedFrame>
   <fireFrame>8</fireFrame>
   <firePoint  x="14" y="10"/>
   <mountPoint x="6" y="45"/>
</weaponAnim>

<animSheet name="hrl_1" w="200" h="20" fw="50" fh="20">weapons/laser_ion_strip1.png</animSheet>
<anim name="hrl_1">
   <sheet>hrl_1</sheet>
   <desc length="4" x="0" y="0"/>
   <time>0.5</time>
</anim>


What exactly am I missing?
UltraMantis
Posts: 2141
Joined: Thu Sep 20, 2012 3:17 pm

Re: [Modding]Creating your own weapons

Postby UltraMantis » Tue Feb 12, 2013 1:40 am

I have also been looking into projectile spawn rate. Possibly the fewer animation frames you have, the faster the weapon will fire. But i have been distracted by painting Marauder ships so i haven't yet fiddled with it. It's on my to do list so if i learn anything, i'll let you know.
Report spam using the handy Report Button Mod.
Dark Spartan
Posts: 8
Joined: Sun Feb 10, 2013 4:27 pm

Re: [Modding]Creating your own weapons

Postby Dark Spartan » Tue Feb 12, 2013 3:26 am

All right. Any ideas as to why my projectiles aren't being drawn?
UltraMantis
Posts: 2141
Joined: Thu Sep 20, 2012 3:17 pm

Re: [Modding]Creating your own weapons

Postby UltraMantis » Tue Feb 12, 2013 4:07 pm

You either goofed on the tag name, or your image strip isnt 24-bit or 32-bit png. Possibly you lack transparency for the sprite as well.

Creating a weapon is twice as hard as creating a ship. You must persevere. Stay sane. ;)
Report spam using the handy Report Button Mod.
Dark Spartan
Posts: 8
Joined: Sun Feb 10, 2013 4:27 pm

Re: [Modding]Creating your own weapons

Postby Dark Spartan » Tue Feb 12, 2013 5:58 pm

UltraMantis wrote:You either goofed on the tag name, or your image strip isnt 24-bit or 32-bit png. Possibly you lack transparency for the sprite as well.

Creating a weapon is twice as hard as creating a ship. You must persevere. Stay sane. ;)


Do the tags for the weapon ID in the blueprint file and the animations file have to be the same? Like, if I declare a weapon ID'd "HRL_1", does the corresponding tag in animations have to be "hrl_1?" Otherwise I don't see any way that the game would know that the projectile animation corresponds to that weapon.
UltraMantis
Posts: 2141
Joined: Thu Sep 20, 2012 3:17 pm

Re: [Modding]Creating your own weapons

Postby UltraMantis » Tue Feb 12, 2013 7:31 pm

Of the top of my head, blueprints point to projectile and weapon animation sheets. These sheets then describe the animation in detail in the animation.xml file.

Investigate an existing weapon to se how you can replicate it.
Report spam using the handy Report Button Mod.
speedoflight
Posts: 660
Joined: Mon Feb 18, 2013 11:08 am

Re: [Modding]Creating your own weapons

Postby speedoflight » Sat Feb 23, 2013 12:14 am

Hi dudes, quick question, is possible to change the beam graphics (not the weapon, the beam itself) or it is hardcoded??

It will be great if we could change it. We can mod almost everything of this game, except that? :o :cry:
My currently mods / wips ->
ImageImage
UltraMantis
Posts: 2141
Joined: Thu Sep 20, 2012 3:17 pm

Re: [Modding]Creating your own weapons

Postby UltraMantis » Sat Feb 23, 2013 12:41 am

Hardcoded. Hope you like red beams. :mrgreen:

You can modify laser_contact to get a different animation, but not the beam itself.
Report spam using the handy Report Button Mod.
speedoflight
Posts: 660
Joined: Mon Feb 18, 2013 11:08 am

Re: [Modding]Creating your own weapons

Postby speedoflight » Sat Feb 23, 2013 2:31 am

UltraMantis wrote:Hardcoded. Hope you like red beams. :mrgreen:

You can modify laser_contact to get a different animation, but not the beam itself.


Thats too bad. Really bad.. :( , i had A LOT of beam graphics to test, created when i was modding for GSB lol. Its a shame, now i cant make proper phasers :lol: :cry:

Anyways, i like red beams for some specific ones, but i dont see the point of having all the beams with the same color.. :lol:
My currently mods / wips ->
ImageImage