Weapon Modding Questions

Discuss and distribute tools and methods for modding. Moderator - Grognak
Post Reply
Kiloace
Posts: 22
Joined: Mon Sep 16, 2013 2:22 pm

Weapon Modding Questions

Post by Kiloace »

1) The Heavy Laser built into vanilla FTL seems to "fade up" its charge image. When I try to mimic this in XML coding my own weapon, it just jumps to the full charge after charging. How do I get it to fade into the "full charge" frame?

2) I'm having trouble lining up my projectiles with the firing weapon animation. I know the firing "source point" is affected by x and y values in the animation coding, but is there no way of knowing what the number should be without trial and error?

3) How do I link sounds to the xml files? I know for images, you need a special subroutine place in your blueprints. Is it the same for firing/hit/miss sounds?

Thanks! :D
User avatar
Sleeper Service
Posts: 2275
Joined: Sun Mar 24, 2013 8:49 pm

Re: Weapon Modding Questions

Post by Sleeper Service »

1: If you check the vanilla heavy lasers you will see that they have a _glow.png image, which is referenced in the weapon anim and independent from the actual animation sprite. You need to create one of these and put it in the anim. Then the weapon will use it as charge glow that is faded in while the weapon charges.

2: You can open your weapon anim in the image manipulation program of your choice and zoom in on the first frame of the weapon animation. That's where the firing point is referenced. Look for the point the projectile shoild emerge and put the x and y coordinates in the weapon anim. Again, opening some vanilla weapons and checking where their fire points are might be helpful.

3: Yeah pretty much he same. You can put your sounds in via an sounds.xml.append. The audio directory has various subdirectories and you you might want to mimic that structure. Sound implementation is quite simple. They are put into the game via little soundsheet like this:

<bombteleport_cluster volume="8">weapons/bp_sfx_bombteleport_cluster.ogg</bombteleport_cluster>

The opening and end tag is also the ID of the sound that you will use in the blueprints. Notice the weapons/ subdirectory in the path. You might have to trail and error a little till you get the volume right.
Image
Working on a sci-fi deckbuilder nowadays.
Other games I made.
User avatar
NewAgeOfPower
Posts: 289
Joined: Wed Jan 02, 2013 1:52 am

Re: Weapon Modding Questions

Post by NewAgeOfPower »

Practically everything you've asked (except for the fade) was listed on the Weapons Modding Tutorial.

Please read the Modding Reference Index before posting new threads- only you can prevent forum clogging!
Kiloace
Posts: 22
Joined: Mon Sep 16, 2013 2:22 pm

Re: Weapon Modding Questions

Post by Kiloace »

Thanks for the reply! Solved the charge image and projectile alignment. The burst laser base code is misleading, because it has the source of the shot appearing over a firing image instead of the first image in the animation sequence, yet is still aligned when firing ingame (but not aligned when I try it on my own weapon).
Post Reply