Making weapons with custom effects?

Discuss and distribute tools and methods for modding. Moderator - Grognak
WhiteWeasel
Posts: 248
Joined: Sun Apr 13, 2014 4:36 am

Making weapons with custom effects?

Postby WhiteWeasel » Tue Feb 17, 2015 3:54 am

A long time ago I was fiddling with beam weapons and now I want to make a legit (And more balanced) beam weapon mod.
So I can do the simple coding part, but can you make a weapon with it's own custom assets:

-Sprite for weapon
-Sprite for beam
-Custom sound effect. (I really want to do this one since I have the asset.)

If so, how?
Image
WhiteWeasel
Posts: 248
Joined: Sun Apr 13, 2014 4:36 am

Re: Making weapons with custom effects?

Postby WhiteWeasel » Tue Feb 17, 2015 11:27 pm

Also I have a few other ideads in the works such as this:

Code: Select all

<weaponBlueprint name="LASER_RAIL_1">
   <type>LASER</type>
   <title>Small Railgun</title>
   <short>S. Railgun</short>
   <desc>A commercial variant of the pierce laser that can bypass the equivalent layers of shields it's rated at.</desc>
   <tooltip>Power req: 1 SP rating: 1 Fires a single, one damage shot. High breach chance.</tooltip>
   <damage>1</damage>
   <shots>1</shots>
   <sp>1</sp>                           
   <fireChance>0</fireChance>
   <breachChance>5</breachChance>
   <cooldown>8</cooldown>
   <power>1</power>
   <cost>35</cost>
   <bp>2</bp>
   <rarity>2</rarity>
   <image>laser_light1</image>
   <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>laser_burst_1</weaponArt>
</weaponBlueprint>


Where do I find the blueprints for all the games weapons? I want look at their stats and balance mine according to them/see how they work such as I need a charge laser blueprint to make a variant of this.
Image
User avatar
RAD-82
Posts: 796
Joined: Sat Nov 09, 2013 12:16 am

Re: Making weapons with custom effects?

Postby RAD-82 » Wed Feb 18, 2015 12:41 am

You can find the weapons in blueprints.xml and dlcBlueprints.xml; the same places you would append your custom weapons.

For custom sounds, check out sounds.xml to see how sounds are added to the game. You may need more instruction than that, but that is all I can give as a starting point.
Image
Junkyard has FTL mods, mostly ships and a few other things.
WhiteWeasel
Posts: 248
Joined: Sun Apr 13, 2014 4:36 am

Re: Making weapons with custom effects?

Postby WhiteWeasel » Wed Feb 18, 2015 1:05 am

RAD-82 wrote:You can find the weapons in blueprints.xml and dlcBlueprints.xml; the same places you would append your custom weapons.

For custom sounds, check out sounds.xml to see how sounds are added to the game. You may need more instruction than that, but that is all I can give as a starting point.

Where would I append my custom weapons at? I haven't modded FTl in so long I kinda forgot how to do some of it.

EDIT: I found the blueprints though!
Image
WhiteWeasel
Posts: 248
Joined: Sun Apr 13, 2014 4:36 am

Re: Making weapons with custom effects?

Postby WhiteWeasel » Wed Feb 18, 2015 10:28 pm

Now that I found the blueprints I kinda went overboard and made bunch of weapon concepts. Would any one care to see them? Also for my rail gun, I'd like to use a sharp sound for it and the "Missile/drone in space explosion" would fill that role nicely. Anyone know what it's called? EDIT Found it! It's smallExplosion

EDIT: Also for my titan beam what does this error mean?
Image
Last edited by WhiteWeasel on Thu Feb 19, 2015 3:59 am, edited 1 time in total.
Image
User avatar
NarnKar
Posts: 778
Joined: Thu Jun 19, 2014 4:24 pm

Re: Making weapons with custom effects?

Postby NarnKar » Thu Feb 19, 2015 3:16 am

I'm not too good at debugging terminal code, so I'd like to take a look at your actual .FTL file. (This has the added bonus of getting to take a look at what ideas you have, heheh. I am quite curious to see them.)

EDIT: Found it out. You're using improper encoding.

See the line "ERROR ModUtilities ... Failed to decode as UTF-8...Failed to decode as windows-1252"; that basically means that your XML code isn't in an encoding that Slipstream can recognize, which means the entire thing afterwards fails since there's nothing Slipstream can actually add to the game. It usually happens when you're using word processing software that can't encode XML. Personally, I use Notepad++ when editing my mods.

I still wanna take a look at what you have though.
WhiteWeasel
Posts: 248
Joined: Sun Apr 13, 2014 4:36 am

Re: Making weapons with custom effects?

Postby WhiteWeasel » Thu Feb 19, 2015 3:56 am

Upside of this is that all of my weapons that use vanilla assets work fine, so It must be something with the sound file or folder structure.

-removed-
Last edited by WhiteWeasel on Sun Feb 22, 2015 3:49 am, edited 1 time in total.
Image
WhiteWeasel
Posts: 248
Joined: Sun Apr 13, 2014 4:36 am

Re: Making weapons with custom effects?

Postby WhiteWeasel » Thu Feb 19, 2015 9:37 pm

Also I figured out how to make the railgun projectiles travel faster. Would a faster moving projectile be harder to hit by a defense drone?
Image
WhiteWeasel
Posts: 248
Joined: Sun Apr 13, 2014 4:36 am

Re: Making weapons with custom effects?

Postby WhiteWeasel » Fri Feb 20, 2015 5:24 am

Functionally speaking, my weapons are complete and I have done general balancing. Though I will probably put up a version later for you guys to balance test. While I have a a variety of weapons, the railguns are the only ones with a coherent theme and the one's I'd like to give special attention (along with the titan beam). Using the ingame assets, I gave then a sharp shooting sound <smallexplosion> that would be fitting for a railgun. While a custom weapon sprite is a maybe, I'd like to atleast give them a little more spice by adding a custom projectile image. I'd like a copy of one of the stock laser sprites so I can alter it and of course show me how to add the custom sprite to my mod.

Demonstration video: (Note the kestrel loadout was for testing purposes)
https://www.youtube.com/watch?v=6G3J8ELdHgI&feature=youtu.be

Railguns are special kind of laser weapon that fires a high velocity shield-piercing projectile. The prefer singular, high damage projectiles over the volley of burst lasers to beach enemy shields. Rails have a fairly long cooldown and a moderate chance chance to inflict a hull breach. A rails shield piercing is dependent on it's damage (Probably should not have fought an enemy with only one shield in the video to show that :roll:) A one damage rail will only pierce one shield, the 2 damage rail will ignore 2 shields etc... Note that they still only take out one shield layer if it cannot breach it. Such as hitting a 3 layer shield with a medium railgun. So they are actually poor at stripping them if cannot pierce them to begin with. Still stopped by zoltan shields. There are four types of rails that I developed so far.

Generally rails are pretty economical if you can tolerate the longish cool downs. Especially the medium railgun. Fairly rare, but very effective if you can get your hands on one like the burst laser MK II. The charge railgun has a two second shorter cooldown than the small rail, but it costs three power and has a slightly slower projectile speed and breach chance. The big railgun seems kinda OP fot it's shield piercing of five and five damage shot accompanying it plus a guarantee to breach. But, for it's price, power use, and rarity it has to compete with the glaive beam and vulcan.

EDIT:
Also my weapons mod that I was testing fine yesterday won't work. Namely the custom missile launchers don't show up in the kestrels loadout correctly. It's the issue you get if you don't spell your weapon tags correctly and you get a blank laser icon. But I assure you they are spelled the same and it still does not work.

EDIT 2: Resolved, I placed the </mod:findName> in the wrong spot.
Image
User avatar
NarnKar
Posts: 778
Joined: Thu Jun 19, 2014 4:24 pm

Re: Making weapons with custom effects?

Postby NarnKar » Sat Feb 21, 2015 5:32 am

The big railgun seems kinda OP fot it's shield piercing of five and five damage shot accompanying it plus a guarantee to breach. But, for it's price, power use, and rarity it has to compete with the glaive beam and vulcan.


It also has to compete with enemies' dodge chance, especially in the lategame where they have stupidly high evasion.