[Tutorial] New Guide on creating weapons

Discuss and distribute tools and methods for modding. Moderator - Grognak
baconpancakes9
Posts: 10
Joined: Wed May 27, 2015 7:55 pm

Re: [Tutorial] New Guide on creating weapons

Postby baconpancakes9 » Sat Jun 13, 2015 6:27 pm

L'cie wrote:Two questions
1. Does this still work now advance edition is out?
2. Would this also work for making artillery?
Thanks


1. I have no idea

2. yes. just make a dummy weapon with no animation that will have the stats of your artillery and use superluminal 2 to put it into a ship. make sure rarity is zero!
wow, this is a nice signature...
dizzy_xc
Posts: 37
Joined: Thu Sep 10, 2015 9:48 am

Re: [Tutorial] New Guide on creating weapons

Postby dizzy_xc » Thu Sep 10, 2015 11:56 am

Metzelmax wrote: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.


Hello. 1st post here. Ive been a fan of modding games like SFCOP and really like FTL and all this community has to offer it, especially the custom ships, CE and Superluminals ship editor. I have a few questions.
In regards to the above quote, I'm not sure exactly how to insert a custom drone image into my custom ship. After Ive attempted to change the blueprint file and add my drone blueprint and custom image, I load the mod and it simply doesnt show a drone in slot 3 like it did before using the standard drone.

Ive made sure that my images are all in the proper folders, so perhaps its something Im doing wrong in the blueprints text? Heres a copy of what it looks like underneath the <weaponslot>. Im pretty sure I left something out...

<weaponSlots>4</weaponSlots>
<droneSlots>3</droneSlots>
<weaponList missiles="16" count="4">
<weapon name="MISSILE_CHARGEGUN" />
<weapon name="MISSILES_2_PLAYER" />
<weapon name="SHOTGUN" />
<weapon name="LASER_HEAVY_1" />
</weaponList>

<droneList drones="16" count="3">
<drone name="ANTI_DRONE" />
<drone name="DEFENSE_1" />
<drone name="COMBAT_MISSILE_2" />
</droneList>
<health amount="30" />
<maxPower amount="16" />
<crewCount amount="1" class="human" />
<crewCount amount="1" class="engi" />
<crewCount amount="1" class="energy" />
<crewCount amount="1" class="energy" />
<crewCount amount="1" class="crystal" />
<crewCount amount="1" class="rock" />
<crewCount amount="1" class="mantis" />
<aug name="DRONE_RECOVERY" />
<aug name="EXPLOSIVE_REPLICATOR" />
<aug name="SYSTEM_CASING" />
<droneBlueprint name="COMBAT_MISSILE_2">
<type>COMBAT</type>
<tip>tip_combat</tip>
<title>Anti-Ship Missile Drone II</title>
<short>Missile II</short>
<desc>Fast moving drone that repeatedly attacks the enemy ship with mini missiles.</desc>
<power>4</power>
<cooldown>1000</cooldown> <!-- Doesn't effect combat drone -->
<dodge>0</dodge>
<speed>7</speed> <!-- Change this to increase/decrease firing speed -->
<cost>75</cost>
<bp>3</bp>
<droneImage>dizzydrone</droneImage>
<weaponBlueprint>DRONE_MISSILE</weaponBlueprint>
<rarity>4</rarity>
</droneBlueprint>

</shipBlueprint>
User avatar
Gencool
Posts: 409
Joined: Sun Jun 16, 2013 1:21 pm

Re: [Tutorial] New Guide on creating weapons

Postby Gencool » Fri Sep 11, 2015 8:58 am

Heyya dizzy
I can't check the code out properly as i'm posting from mobile, but at a glace it looks like your drone blueprint is nested in your ship blueprint.

You should separate them- check out the normal blueprint files for examples.
ImageImageImage
- Gencool (aka Puppetsquid) -- I make weird stuff
dizzy_xc
Posts: 37
Joined: Thu Sep 10, 2015 9:48 am

Re: [Tutorial] New Guide on creating weapons

Postby dizzy_xc » Fri Sep 11, 2015 9:42 am

Gencool wrote:Heyya dizzy
I can't check the code out properly as i'm posting from mobile, but at a glace it looks like your drone blueprint is nested in your ship blueprint.

You should separate them- check out the normal blueprint files for examples.



Hi, thank you, Gencool. Yes the drones are nested in my ship blueprint. I thought if I made a ship ftl file that any custom weapons or drones needed to go in the same file. Thats not the case?

Edit: So far, Ive browsed many ship ftl folders and havent found a ship made that comes with custom drones. So sadly theres not a lot to go on.

Edit2: Ok, lol, that was enough of a clue to go on! Thank you! I got it working now! WHOOT! Thx Gencool!
dizzy_xc
Posts: 37
Joined: Thu Sep 10, 2015 9:48 am

Re: [Tutorial] New Guide on creating weapons

Postby dizzy_xc » Fri Sep 25, 2015 4:25 am

Thank you for your help, guys. I'm running into another problem. I have the animation working to an extent for my new gun. Here's a copy of the code and the two images. One is the weapon art and the other is the charge status. So Im not sure how to get the two to work together. Does anyone know how to make this charge laser work to where the black bars light up with my green charge lights?

I also tried changing the y offset for the mount and the guns all disappeared. lol. So I changed it back. lol, voodoo magic. Oh well, Ill tackle that later.

Here's the problem Im running into, as Ive got the weapon to show up, but I cant get the black bars to charge up green... I have two .png files, one is the animation of the gun, the other is the green charge status as it charges its 6 shots. Do I even know what Im talking about here? I think I need to add another animation to it to make the charge work, but I dont know how to combine them if thats even what you are supposed to do or not... :shock:

Here's the code, and I dont know what <boost> does. I also list the weapon blueprint and dont know what <iconimage> is.

Code: Select all

<animSheet name="chargelaser6" w="1300" h="48" fw="50" fh="48">weapons/laser_charger6_base.png</animSheet>
<weaponAnim name="chargelaser6">
   <sheet>chargelaser6</sheet>
   <desc length="26" x="0" y="0"/>
   <chargedFrame>7</chargedFrame>
   <fireFrame>8</fireFrame>
   <firePoint  x="33" y="16"/>
   <mountPoint x="8" y="37"/>
   <boost></boost>
</weaponAnim>


Code: Select all

<weaponBlueprint name="LASER_BATTLESTAR">
   <type>LASER</type>
   <title>Battlestar Main Batteries</title>
   <short>MAIN_BATT</short>
   <tip>tip_charge</tip>
   <desc>Forward firing heavy cannons and gun turrets comprise the Main Batteries of Pegasus. Fire individually or in Salvo mode.</desc>
   <tooltip>Charges up to 7 shots, 1 damage each. Fire, Breach and Shield Pierce potential. Good fire rate. High power cost.</tooltip>
   <damage>1</damage>
   <shots>1</shots>
   <sp>0</sp>
   <fireChance>2</fireChance>
   <breachChance>2</breachChance>
   <cooldown>3</cooldown>
   <power>4</power>
   <cost>200</cost>
   <bp>2</bp>
   <rarity>3</rarity>
   <image>laser_light2</image>
   <chargeLevels>6</chargeLevels>
   <launchSounds>
      <sound>flak</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>chargelaser6</weaponArt>
   <iconImage>laser_charge4</iconImage> (<---! Whats this line???)
</weaponBlueprint>


ImageImage

***EDIT: Thanks to Rad-82, here is the code I need for my .png and <boost> is where the animation tag needed to go.

Code: Select all

<animSheet name="chargelaser6_charge" w="300" h="48" fw="50" fh="48">weapons/laser_charger6_charges.png</animSheet>
<anim name="chargelaser6_charge">
   <sheet>chargelaser6_charge</sheet>
   <desc length="6" x="0" y="0"/>
   <time>1.0</time>
</anim>


Also, inside <firePoint x="33" y="16"/> it needs to read this: <firePoint x="33" y="16" charge="6"/>
RetroNova10
Posts: 15
Joined: Tue Oct 20, 2015 2:30 pm

Re: [Tutorial] New Guide on creating weapons

Postby RetroNova10 » Tue Oct 20, 2015 2:35 pm

Great tutorial! After following step I and II, I tried testing the .FTL... but nothing has changed in the game whatsoever. I changed the power level on the Kestrel, and it did nothing.
Some_Random_Noob
Posts: 21
Joined: Thu Feb 11, 2016 2:27 am

Re: [Tutorial] New Guide on creating weapons

Postby Some_Random_Noob » Mon Feb 15, 2016 7:35 pm

I'm doing this, but these steps don't work for me. My code is:
<weaponBlueprint name="TEST_WEAPON"> <!-- #essential -->
<type>LASER</type> <!-- #essential -->
<title>Test</title> <!-- #essential -->
<short>Test</short> <!-- #essential -->
<desc>Very weak laser.</desc> <!-- #essential -->
<tooltip>Only one shot, one damage per shot.</tooltip> <!-- #essential -->
<damage>1</damage>
<shots>1</shots> <!-- #essential if its a Laser weapon-->
<sp>0</sp>
<fireChance>1</fireChance>
<breachChance>0</breachChance>
<cooldown>10</cooldown> <!-- #essential -->
<power>1</power> <!-- #essential -->
<cost>20</cost> <!-- #essential -->
<bp>2</bp>
<rarity>0</rarity> <!-- #essential -->
<image>laser_light1</image> <!-- #essential -->
<launchSounds> <!-- #essential -->
<sound>lightLaser1</sound>
<sound>lightLaser2</sound>
<sound>lightLaser3</sound>
</launchSounds>
<hitShipSounds> <!-- #essential -->
<sound>hitHull2</sound>
<sound>hitHull3</sound>
</hitShipSounds>
<hitShieldSounds> <!-- #essential -->
<sound>hitShield1</sound>
<sound>hitShield2</sound>
<sound>hitShield3</sound>
</hitShieldSounds>
<missSounds> <!-- #essential -->
<sound>miss</sound>
</missSounds>
<weaponArt>laser_burst_1</weaponArt> <!-- #essential -->
</weaponBlueprint>
and it is in blueprints.xml.append. I am using Notepad to edit it. Even if I get a working mod, go into blueprints.xml.append and change 1 small detail (like cooldown), the mod fails when I repack it into a zip file. My mods seem to fail if I even touch the APPEND files. What am I doing wrong?
User avatar
mr_easy_money
Posts: 625
Joined: Fri May 29, 2015 9:05 pm

Re: [Tutorial] New Guide on creating weapons

Postby mr_easy_money » Mon Feb 15, 2016 9:01 pm

Some_Random_Noob wrote:I'm doing this, but these steps don't work for me.

huh? I tried doing that myself and it worked fine. nothing showed up because it isn't listed in a ship, and will never appear in stores (rarity is 0)

Let's troubleshoot!
Some_Random_Noob wrote:Even if I get a working mod, go into blueprints.xml.append and change 1 small detail (like cooldown), the mod fails when I repack it into a zip file. My mods seem to fail if I even touch the APPEND files. What am I doing wrong?

I'll go through what I did.
1. created an empty file 'blueprints.xml.append'
2. copied your code into the file and saved the file
3. inserted this file into a folder called 'data'
4. selected 'data' and sent it to a compressed zipped folder 'data.zip'
5. renamed 'data.zip' to 'data.ftl'
6. placed 'data.ftl' in the mods folder of Slipstream Mod Manager and ran SMM
Some_Random_Noob
Posts: 21
Joined: Thu Feb 11, 2016 2:27 am

Re: [Tutorial] New Guide on creating weapons

Postby Some_Random_Noob » Tue Feb 16, 2016 7:48 pm

mr_easy_money wrote:
Some_Random_Noob wrote:I'm doing this, but these steps don't work for me.

huh? I tried doing that myself and it worked fine. nothing showed up because it isn't listed in a ship, and will never appear in stores (rarity is 0)

Let's troubleshoot!
Some_Random_Noob wrote:Even if I get a working mod, go into blueprints.xml.append and change 1 small detail (like cooldown), the mod fails when I repack it into a zip file. My mods seem to fail if I even touch the APPEND files. What am I doing wrong?

I'll go through what I did.
1. created an empty file 'blueprints.xml.append'
2. copied your code into the file and saved the file
3. inserted this file into a folder called 'data'
4. selected 'data' and sent it to a compressed zipped folder 'data.zip'
5. renamed 'data.zip' to 'data.ftl'
6. placed 'data.ftl' in the mods folder of Slipstream Mod Manager and ran SMM

That's exactly what I did. It did not work.
meklozz
Posts: 350
Joined: Wed Sep 23, 2015 9:11 am

Re: [Tutorial] New Guide on creating weapons

Postby meklozz » Tue Feb 16, 2016 7:51 pm

Firstly, it would be helpful if you specified what 'does not work' mean. Crash, errors, no reaction?

Other than that, if you uploaded it, it should not be to hard to see what the problem is.