[Modding]Creating your own weapons

Discuss and distribute tools and methods for modding. Moderator - Grognak
UltraMantis
Posts: 2141
Joined: Thu Sep 20, 2012 3:17 pm

Re: [Modding]Creating your own weapons

Postby UltraMantis » Mon Feb 25, 2013 3:05 am

Open up and study the mods made by others. You can learn much by studying and adapting already crated things like animations and sounds. Kieve's Obsidian would answer all your questions so far asked. No need to lose sleep over what's already available.

Also you can check out project Overdrive, as 99% of blueprint tags are documented.
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 » Mon Feb 25, 2013 3:25 am

Thats the thing. I checked a lot of mods, and the way i did the weapons is exactly the same. So far, i solved all the problems, except the one with the audio (i did exactly the same as found in the diversity mod, for example) and the movement effect of the missile animation (this is done as well in the same exact way that the diversity mod, for example). Now, i dunno if the diversity mod is actually not showing the animations, i need to check it, but i assume they are. And why i cant hear the audio effects.. thats another mistery (maybe if i change the file format to wav instead of ogg?).

Anyways, i will check the overdrive project, thanks for the tip :)

P.D.: It looks like the overdrive proyect is not implemented in some languaje i can read.. so i cant do anything much with it..
My currently mods / wips ->
ImageImage
mcbmaestro
Posts: 7
Joined: Fri Feb 22, 2013 7:04 pm

Re: [Modding]Creating your own weapons

Postby mcbmaestro » Mon Feb 25, 2013 8:39 pm

AtillaBosma wrote:
buzzyrecky wrote:Wouldnt the shops/loot function for the weapons just be setting the rarity to anything but 0?

Also, if you could clarify what the bp/sp in the weapon stats is, I'd be appreciative. I'm trying this weapon stuff out for the first time and having a blast... hopefully it works.


I am not sure what BP and SP means, but I think that SP means how much Shield Points it penetrates.
So if their shield points is like, 5, and your weapon SP is 6 it penetrates the shield, but if your weapons SP is like 4, it takes away 4 shield points.

Seriously not sure about BP.

Rarity has to do with how rare it is for an event to drops it, not sure about that.


I think your almost right about SP being shield penetration however I don't think it takes away shield points I think the number 1-5 represents how many shield units the projectile is capable of going thru before it's stopped.
UltraMantis
Posts: 2141
Joined: Thu Sep 20, 2012 3:17 pm

Re: [Modding]Creating your own weapons

Postby UltraMantis » Tue Feb 26, 2013 3:03 pm

https://docs.google.com/spreadsheet/ccc ... BSFE#gid=0

That's the Overdrive documentation i was refering to.
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 » Wed Feb 27, 2013 11:08 pm

Thx UltraMantis, that will be very very useful ;)

Anyways, i dunno if this answered in the forums .. is possible to change the delay between shots from a multishot weapon?? i read something that this is controled by the animation timing, is this right?
My currently mods / wips ->
ImageImage
UltraMantis
Posts: 2141
Joined: Thu Sep 20, 2012 3:17 pm

Re: [Modding]Creating your own weapons

Postby UltraMantis » Thu Feb 28, 2013 2:07 am

I think the first rule of animations is Don't Do Animations! :lol:

Seriously, of all the problems to have i now have the <chargedFrame> showing up correctly in the hangar weapons list, but being skipped in the game...Image wtf? That's in addition to frames being skipped and one case of animation seemingly going backwards for a few frames.
Report spam using the handy Report Button Mod.
User avatar
Sleeper Service
Posts: 2305
Joined: Sun Mar 24, 2013 8:49 pm

Re: [Modding]Creating your own weapons

Postby Sleeper Service » Sun Mar 24, 2013 9:45 pm

Hello everybody, my first post here...

UltraMantis wrote:I think the first rule of animations is Don't Do Animations! :lol:

Seriously, of all the problems to have i now have the <chargedFrame> showing up correctly in the hangar weapons list, but being skipped in the game...Image wtf? That's in addition to frames being skipped and one case of animation seemingly going backwards for a few frames.


Well I have similar problems, as I created this little Ion Burst Mark I here:

Image

Everything works fine in the beginning, it fits on the ship, it charges up using the custom glow map. But when it fires everything gets pretty random. Often it gets stuck in the firing animation for some seconds, then spits out one blast, later another two. Sometimes it fires correctly, but still plays the animation at last six times while firing, instead of the three times Id like it two (one time for each projectile). What really disturbs me is that it bugs out so unpredictably.

Is there a way to salvage this? Does the amount of frames in weapon sprites actualy interfere with the animation and fire speed? Do you think It could work if the weapon would have a already existing sprite size and frame amount, so do I have to copy this on some existing sprites with lesser animation frames? Have I missed something in the code?

Code: Select all


<animSheet name="ion_burst1" w="528" h="75" fw="33" fh="75">weapons/ion_burst1_strip16.png</animSheet>

<weaponAnim name="ion_burst1">
   <sheet>ion_burst1</sheet>
   <desc length="16" x="0" y="0"/>
   <chargedFrame>1</chargedFrame>
   <fireFrame>13</fireFrame>
   <firePoint  x="20" y="13"/>
   <mountPoint x="4" y="62"/>
   <chargeImage>weapons/ion_burst1_glow.png</chargeImage>
</weaponAnim>

<weaponBlueprint name="ION_BURST_1">
   <type>LASER</type>
   <title>Ion Burst Mark I</title>
   <short>Ion Burst I</short>
        <locked>1</locked>
   <desc>Slow but powerful ion weapons that can disable entire systems in one burst.</desc>
   <tooltip>Fires 3 blasts, 1 ion damage each. Can hit and disable shields as well as systems.</tooltip>
   <damage>0</damage>
   <ion>1</ion>
   <speed>30</speed>
   <shots>3</shots>
   <sp>0</sp>
   <fireChance>0</fireChance>
   <breachChance>0</breachChance>
   <cooldown>18</cooldown>
   <power>2</power>
   <cost>50</cost>
   <bp>7</bp>
   <rarity>3</rarity>
   <image>ion_1_shot</image>
   <explosion>explosion_small_ion</explosion>
   <launchSounds>
      <sound>ionShoot1</sound>
      <sound>ionShoot2</sound>
      <sound>ionShoot3</sound>
   </launchSounds>
   <hitShipSounds>
      <sound>ionHit1</sound>
      <sound>ionHit2</sound>
      <sound>ionHit3</sound>
   </hitShipSounds>
   <hitShieldSounds>
      <sound>ionShields1</sound>
      <sound>ionShields2</sound>
      <sound>ionShields3</sound>
   </hitShieldSounds>
   <missSounds>
      <sound>miss</sound>
   </missSounds>
   <weaponArt>ion_burst1</weaponArt>
</weaponBlueprint>


Also, as the <locked>1</locked> attribute previously discussed in the thread:
I'm pretty sure this defines if weapons recoil or not. Most weapons move back a little the moment they fire. As far as I see it, Ion and bomb weapons just discharge and don't recoil cause they are flagged <locked>1</locked>.
DryEagle
Posts: 363
Joined: Thu Oct 04, 2012 11:17 am

Re: [Modding]Creating your own weapons

Postby DryEagle » Sun Mar 24, 2013 10:35 pm

I would suggest having no more than 5-6 frames for the 'firing' part of the animation, and on top of that, space them out so you have ~3 before and a couple after the fire frame. This way it should work consistently.
All ships I have created include custom weapons, graphics etc:
Image
ImageImageImageImage
User avatar
Sleeper Service
Posts: 2305
Joined: Sun Mar 24, 2013 8:49 pm

Re: [Modding]Creating your own weapons

Postby Sleeper Service » Mon Mar 25, 2013 3:44 pm

Thx DryEagle, ill try that.

speedoflight wrote: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:


If you are into editing weapon sprits then possible workaround for this is to ad you favourite rainbow beam/death ray to the firing frames of the weapon sprite. It than simply overlaps the hard coded red beam.

Image

The weapon sprites becomes quite big this way. One bug I observed was that the Weapon doesn't get an Image for the Item card if the sprite has such unusual dimensions. But still, the game seems to be able to handle it for the most part, I didn't do too much testing but it works so far:

Image

So in theory a lot of things could be made possible this way, like lightening arcs and irregular rays in all collors of the rainbow and other stuff. As long as the firing point of the weapon is sufficiently covered with the new beam.
Still, I don't know how to change the impact beam on the enemy ship. Hard coded as well I guess? Or does <image>beam_contact</image> handle that?
DryEagle
Posts: 363
Joined: Thu Oct 04, 2012 11:17 am

Re: [Modding]Creating your own weapons

Postby DryEagle » Tue Mar 26, 2013 12:49 pm

beam_contact is the little collision bit at the end of the beam. You cannot change beam line at all. Beam thickness is automatically scaled to its damage. The reason your weapon card has no graphic is because it automatically centres the sprite in the card, so your weapon is going to be way off the edge if you do it like that.
All ships I have created include custom weapons, graphics etc:
Image
ImageImageImageImage