[Tutorial] New Guide on creating weapons

Discuss and distribute tools and methods for modding. Moderator - Grognak
Some_Random_Noob
Posts: 21
Joined: Thu Feb 11, 2016 2:27 am

Re: [Tutorial] New Guide on creating weapons

Postby Some_Random_Noob » Wed Feb 17, 2016 12:22 am

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

There is no effect. For example, I made a mod with 10 weapons all with rarity of 1, so one was bound to come up eventually. I went through 6-8 stores without seeing one. However, for any pre-made mods I downloaded, I found modded weapons after 2-3 stores. Also, when I try to upload it to Superluminal nothing appears, but working mods have their weapons appear.
meklozz
Posts: 350
Joined: Wed Sep 23, 2015 9:11 am

Re: [Tutorial] New Guide on creating weapons

Postby meklozz » Wed Feb 17, 2016 6:50 pm

Sounds sketchy. Can't you try adding it to a ship to see whether it works at all, or at least use MTE to generate a larger number of stores?
And maybe double check things like your file structure in the archive and the file names.
Some_Random_Noob
Posts: 21
Joined: Thu Feb 11, 2016 2:27 am

Re: [Tutorial] New Guide on creating weapons

Postby Some_Random_Noob » Fri Feb 19, 2016 10:06 pm

meklozz wrote:Sounds sketchy. Can't you try adding it to a ship to see whether it works at all, or at least use MTE to generate a larger number of stores?
And maybe double check things like your file structure in the archive and the file names.

I downloaded a weapons mod, and literally only shortened the cooldown of 1 random weapon by 1 second, repacked it and ran it. The new mod did not work, even though it is pretty much the same thing as the template mod.
meklozz
Posts: 350
Joined: Wed Sep 23, 2015 9:11 am

Re: [Tutorial] New Guide on creating weapons

Postby meklozz » Fri Feb 19, 2016 10:17 pm

Well, if you won't try and check these things, could you at least upload a repacked file like this somewhere?

And you wrote no mods you edit work at all? Did you try using another program to make the archive, maybe?
The_Bear
Posts: 225
Joined: Mon Jan 04, 2016 5:57 pm

Re: [Tutorial] New Guide on creating weapons

Postby The_Bear » Mon Feb 22, 2016 8:28 pm

I made a new weapon but when I load it to superluminal and search for it it says it isn't there.

The blueprint:

Code: Select all

</weaponBlueprint>
<weaponBlueprint name="MYSTERY_BEAM">
   <type>BEAM</type>
   <tip>tip_beams</tip>
   <title>Mystery Beam</title>
   <short>Mystery Beam</short>
   <desc>A powerful beam weapon, the glaive beam was based on it but it was to expensive to make so they made it less powerful.</desc>
   <tooltip>A powerful beam weapon.</tooltip>
   <damage>4</damage>
   <sp>0</sp>
   <fireChance>1</fireChance>
   <breachChance>0</breachChance>
   <cooldown>60</cooldown>
   <power>1</power>
   <cost>70</cost>
   <bp>7</bp>
   <rarity>0</rarity>
   <length>80</length>
   <image>beam_contact</image>
   <launchSounds>
      <sound>beam2</sound>
   </launchSounds>
   <weaponArt>boss_3_strip8</weaponArt>
</weaponBlueprint>

The animation:

Code: Select all

<animSheet name="MYSTERY_BEAM" w="264" h="65" fw="33" fh="65">weapons/boss_3_strip8.png</animSheet>

</weaponAnim>
<weaponAnim name="MYSTERY_BEAM">
   <sheet>MYSTERY_BEAM</sheet>
   <desc length="8" x="0" y="0"/>
   <chargedFrame>1</chargedFrame>
   <fireFrame>2</fireFrame>
   <firePoint  x="16" y="25"/>
   <mountPoint x="0" y="0"/>
   <chargeImage>weapons/boss_3_glow.png</chargeImage>
</weaponAnim>

Can anyone see whats wrong?
User avatar
kartoFlane
Posts: 1488
Joined: Mon Jan 14, 2013 10:20 pm

Re: [Tutorial] New Guide on creating weapons

Postby kartoFlane » Tue Feb 23, 2016 6:02 pm

@The_Bear
These two tags:

Code: Select all

</weaponBlueprint>
</weaponAnim>

They're the (most likely) reason it doesn't work correctly (assuming this isn't a copy & paste error). Those are closing tags -- as the name implies, they close any other tag that was opened before them (that's why you see pairs like <type> and </type>, etc [not <type/> though, that's called a self-closing tag, and is completely valid]). It's possible that when FTL encounters such a tag that has no matching opening tag, it figures that it's reached the end of the file, and doesn't read any further data.

@Some_Random_Noob
If mods you edit consistently don't work, despite the changes being extremely simple as you write, then as meklozz says, it's likely that you repack them wrong. SMM expects .ftl files to have a strict directory structure, if they don't follow it, then the manager will report that in the console window, by displaying a warning like 'unexpected inner path' or something along those lines.
Superluminal2 - a ship editor for FTL
Some_Random_Noob
Posts: 21
Joined: Thu Feb 11, 2016 2:27 am

Re: [Tutorial] New Guide on creating weapons

Postby Some_Random_Noob » Sun Feb 28, 2016 10:15 pm

kartoFlane wrote:@The_Bear
These two tags:

Code: Select all

</weaponBlueprint>
</weaponAnim>

They're the (most likely) reason it doesn't work correctly (assuming this isn't a copy & paste error). Those are closing tags -- as the name implies, they close any other tag that was opened before them (that's why you see pairs like <type> and </type>, etc [not <type/> though, that's called a self-closing tag, and is completely valid]). It's possible that when FTL encounters such a tag that has no matching opening tag, it figures that it's reached the end of the file, and doesn't read any further data.

@Some_Random_Noob
If mods you edit consistently don't work, despite the changes being extremely simple as you write, then as meklozz says, it's likely that you repack them wrong. SMM expects .ftl files to have a strict directory structure, if they don't follow it, then the manager will report that in the console window, by displaying a warning like 'unexpected inner path' or something along those lines.

How should I be repacking them? I send the APPEND files to a zip file, and then change the file to a .ftl file.
User avatar
kartoFlane
Posts: 1488
Joined: Mon Jan 14, 2013 10:20 pm

Re: [Tutorial] New Guide on creating weapons

Postby kartoFlane » Mon Feb 29, 2016 2:36 pm

.append files should be located inside a folder called 'data' inside the zip file. So what you'd want to do is put your .append files inside a 'data' folder, then send that folder to a zip file.
Superluminal2 - a ship editor for FTL
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 Mar 01, 2016 12:56 am

kartoFlane wrote:.append files should be located inside a folder called 'data' inside the zip file. So what you'd want to do is put your .append files inside a 'data' folder, then send that folder to a zip file.

They are. Here is what my files look like:
http://imgur.com/a/LfJ1g
meklozz
Posts: 350
Joined: Wed Sep 23, 2015 9:11 am

Re: [Tutorial] New Guide on creating weapons

Postby meklozz » Tue Mar 01, 2016 5:46 am

Some_Random_Noob wrote:
kartoFlane wrote:.append files should be located inside a folder called 'data' inside the zip file. So what you'd want to do is put your .append files inside a 'data' folder, then send that folder to a zip file.

They are. Here is what my files look like:
http://imgur.com/a/LfJ1g

How about what they look like in an archive? I hope you're not packing the whole test_mod folder into that, it won't work. Data needs to be directly in the archive. Like /mod.ftl/data/blueprints.xml.append, not /mod.ftl/test_mod/data/blueprints.xml.append.

If it's not that, (and though I hate to sound like a broken record), it could really make it simple if you took such a modified file and uploaded it somewhere like dropbox or zippyshare (for short term files it's fast with no account or anything, but I think they only keep them for a month).