[Tutorial] New Guide on creating weapons

Discuss and distribute tools and methods for modding. Moderator - Grognak
ClockALock
Posts: 51
Joined: Mon Jul 22, 2013 11:14 pm

Re: [Tutorial] New Guide on creating weapons

Postby ClockALock » Fri Sep 13, 2013 11:57 pm

Okay.
Been fiddling for a bit, and I think I have part one down, but for part two I don't know how the "image" part works.
How do I tell it where this image for my weapon is? Where do I save it? And does it matter what I've named it?
I have an image with all 12 frames specified, but I don't know how to use it.
User avatar
Metzelmax
Posts: 364
Joined: Wed Sep 26, 2012 7:59 am

Re: [Tutorial] New Guide on creating weapons

Postby Metzelmax » Sun Sep 15, 2013 5:25 am

Code: Select all

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

Declares the image, its frame setup and where it is positioned.
Here is the Stuff I made:
ImageImageImageImage
And stuff is always better than no stuff, right?
User avatar
Metzelmax
Posts: 364
Joined: Wed Sep 26, 2012 7:59 am

Re: [Tutorial] New Guide on creating weapons

Postby Metzelmax » Sat Dec 07, 2013 8:25 am

Every 3rd thread is like: Oh my gawd how does I makez a weapon.... do people never ever search a forum?
Here is the Stuff I made:
ImageImageImageImage
And stuff is always better than no stuff, right?
User avatar
R4V3-0N
Posts: 1291
Joined: Sun Oct 06, 2013 11:44 am

Re: [Tutorial] New Guide on creating weapons

Postby R4V3-0N » Sat Dec 07, 2013 9:09 am

Some people have issues. When I searched forum it said

"you can not use the word "Make" , "Weapons" , or "Guide" because it's to common, when I try not using those words or in moderation all I got was a thread talking about what does MFK means on the rebel elite ships.

Also some people got issues with it, I read this thoroughly like a hundred times and I still can't get the animations right and have all sort of problems. The way I fix it is re do it again... and again... and again from scratch and also rename everything to the same name. it works after attempt 4. No one so far was polite enough to elaborate how to do anim sheet, I did get help with 1 weapon but I do not wish to ask again, seeing how NewAgeOfPower seems reasonably pissed at me for not knowing how to mod and ask questions. telling me to go on threads that do not help me (eg: "How do I reference the drone image correctly?" he tells me to go on a thread on how to MAKE the image. nothing about coding).
R4V3-0N, a dreamer.
User avatar
Metzelmax
Posts: 364
Joined: Wed Sep 26, 2012 7:59 am

Re: [Tutorial] New Guide on creating weapons

Postby Metzelmax » Sat Dec 07, 2013 10:47 am

Anim sheet is really easy actually, even though it is quite confusing since the way they decide to split it up:


Code: Select all


<animSheet name="SWARM_LAUNCH_1" w="102" h="57" fw="34" fh="57">weapons/Swarm_launcher.png</animSheet>

<weaponAnim name="SWARM_LAUNCH_1">
   <sheet>SWARM_LAUNCH_1</sheet>
   <desc length="3" x="0" y="0"/>
   <chargedFrame>1</chargedFrame>
   <fireFrame>2</fireFrame>
   <firePoint  x="20" y="15"/>
   <mountPoint x="2" y="40"/>
   <chargeImage>weapons/Swarm_launcher_glow.png</chargeImage>
</weaponAnim>



I call it the same as the weapon anim but thats just for convenience. the animSheet it's self contains the link to the position of your image. Then it declares the images full size (w, h), ie how large it is. And then you declare how large an frame of your animation within the image is (fh, fw), which is strange since you would have thought fh = full high would be the whole image, but its just the other way around.

Then you have weaponAnim, the name again can be anything but you have to be careful that the SHEET is linked right, ie your previous animsheet name.
On desc you tell it how many frames there are within your image (here 3).
charged frame is the image that shows in stores and is the one the weapon stays at if you dont fire it when fully charged. anything between 1st frame and charge frame will be shown as loading animation.
fireframe is just a marker. All images between charged fire will be shown before a shot is fired, the ones after it afterwards (beams only take the images behind it as their beamy-glowing-while-fire animation).


As for drones:

You dont need to declare anything within animations.xml to make them work. All drones have a naming pattern which you need to follow in order to make one.

If the name of the drone is for example: ASDF_DRONE then the images are for attack drones:
ASDF_DRONE_base.png
ASDF_DRONE_on.png
ASDF_DRONE_charged.png
ASDF_DRONE_engine.png

and for defense drones:
ASDF_DRONE_base.png
ASDF_DRONE_on.png
ASDF_DRONE_charged.png
ASDF_DRONE_engine.png
ASDF_DRONE_gun.png
ASDF_DRONE_gun_on.png
ASDF_DRONE_gun_charged.png

as long as those images are in img/ship/drones/ you simply set the tag

Code: Select all

<droneImage>ASDF_DRONE</droneImage>
without the _base.png and it picks it automatically.
Here is the Stuff I made:
ImageImageImageImage
And stuff is always better than no stuff, right?
User avatar
R4V3-0N
Posts: 1291
Joined: Sun Oct 06, 2013 11:44 am

Re: [Tutorial] New Guide on creating weapons

Postby R4V3-0N » Sat Dec 07, 2013 11:24 am

Thank you for telling me in detail.
Especially to that much detail.

Even though I got drones down (Sort of... still can't fix that 1 drone I have tried to make for my first mod)
Hopefully this will mean I can make more new weapons with ease.

And also I do agree with some people not paying attention to the forum, Some things like this should be easy to find it on that sticky'd thread. But the search engine for the forum does make it hell to search some things.

Also I think on the original post it should be updated what weapons can and can't do or some bugs/ issues.

Like ion beams, ion + sys/ normal damage. ion with shield piercing, or beams with shield piercing. It would be helpful and prevent someone making a new weapon with everything then figure out there ion beam is OP no matter what they do and waste there time (possibly like Sleeper Service did, you can clearly see his ion beam weapon images, animations, and blueprints still in the .ftl for his mod, and they were a small handful of those images)
R4V3-0N, a dreamer.
xlandar
Posts: 151
Joined: Thu Jan 23, 2014 1:34 am

Re: [Tutorial] New Guide on creating weapons

Postby xlandar » Wed Feb 26, 2014 12:54 am

very good tutorial! i'm using this to create my first weapon.
one thing, i can't figure out how to package the file as .ftl (im on mac) it always stays as a .zip.
could you elaborate on how to package it correctly?
art and coding tutorials wanted, pm if you have some good ones please!Image
User avatar
Metzelmax
Posts: 364
Joined: Wed Sep 26, 2012 7:59 am

Re: [Tutorial] New Guide on creating weapons

Postby Metzelmax » Wed Feb 26, 2014 5:29 am

I have no idea how things work on mac, sry.
Here is the Stuff I made:
ImageImageImageImage
And stuff is always better than no stuff, right?
xlandar
Posts: 151
Joined: Thu Jan 23, 2014 1:34 am

Re: [Tutorial] New Guide on creating weapons

Postby xlandar » Wed Feb 26, 2014 6:10 am

Metzelmax wrote:I have no idea how things work on mac, sry.


dang. oh well, time to download ftl onto ye olde crappy pc.
art and coding tutorials wanted, pm if you have some good ones please!Image
Kaerius
Posts: 87
Joined: Wed Sep 19, 2012 3:02 pm

Re: [Tutorial] New Guide on creating weapons

Postby Kaerius » Wed Apr 30, 2014 11:04 am

Working on learning to mod, and to see if it worked I tried to edit ship starting equipment.

So I used FTL Dat Manager to pull out blueprint.xml.append, then I edited the ship loadout, and added the append back in... and nope, didn't work. (Though I've later read I may need to remove the old append and save before I add it in).

Then I tried making it a mod. I made a test directory, inside that I made a data directory, put the append in that, zipped up the test directory(with 7zip, but in zip format, not 7z format) and made the filename .ftl.

Used slipstream to mod it in, put it last in my load order.

Ran the game, and still nothing. No change to starting weapons.