[Tutorial] Superluminal Guides

Discuss and distribute tools and methods for modding. Moderator - Grognak
User avatar
kartoFlane
Posts: 1488
Joined: Mon Jan 14, 2013 10:20 pm

[Tutorial] Superluminal Guides

Postby kartoFlane » Tue Apr 16, 2013 3:20 pm

Figured that I'd finally get around to compiling some sort of guide, as to not spam the development topic with questions and replies... :E
So, included herein will be several guides regarding topics that are not covered by the documentation. Should there be an issue that requires explanation, I'll update the topic with a new post.

THIS THREAD PERTAINS TO PRE-AE VERSION OF SUPERLUMINAL AND IS NOT BEING MAINTAINED.

Table of Contents:
  1. How To Create .ftl Packages
  2. Loading Mods in Superluminal
  3. Creating Automated (No-Crew) Ships
  4. Placing Artillery Origin
  5. Manually Linking Doors
  6. Creating 0x0 (non-targetable) Rooms

Image

1. How To Create .ftl Packages
First of all, read the "For Developers" description in GMM's thread.

.ftl files are simply .zip files, but with a changed extension. You can change extensions exactly the same way you rename files - however, in order to do this, you need to have extensions shown - here's how. Then, you simply change the ".zip" to ".ftl", and you're done - any warnings about the file becoming unusable can be safely ignored.
(you can also change it from ".ftl" to ".zip" and unpack the archives to get to the mod's contents)

Other than that, the only thing that differs between ordinary zip and ftl is the directory structure - fancy name, but it only means that the archive has to have several appropriately named directories, so that GMM knows where to put stuff.

The diagram below shows the structure of a simple ship mod. The .ftl file - which is the same as a .zip file - contains two directories: data and img.
Image
In order to understand which files belong where, it might be a good idea to unpack the .dat archives that come with FTL - you'll need them anyway if you want to mod anything.
In those archives:
The data directory contains all of the text files, which describe every element of the game and its statistics.
The audio directory contains all of the sounds used in the game.
The fonts directory contains fonts used by the game.
The img directory contains every graphic used in the game.

Now look at the diagram again - see that it also has two folders named data and img? That's because .ftl files simply mirror the structure of the .dat archives - that's why the directories have to have specific names, that way GMM knows where to put their contents.
Same thing goes for files - however, if your mod were to include a blank file named blueprints.xml you'd break the game. This is because GMM would take your modded file and replace the original with it.
In order to deal with this, we have to use the .append extension. Including this after (or before) the main extension (.xml in this case) instructs GMM to merge the two files, by appending the contents of the mod's file at the end of the original file. This allows not only for smaller mod sizes, but also helps to avoid major mod conflicts. You should use it every time you wish to change anything in the orignal data files.
Last edited by kartoFlane on Wed Jul 30, 2014 8:51 pm, edited 8 times in total.
Superluminal2 - a ship editor for FTL
User avatar
kartoFlane
Posts: 1488
Joined: Mon Jan 14, 2013 10:20 pm

Re: [Tutorial] Superluminal Guides

Postby kartoFlane » Tue Apr 16, 2013 3:21 pm

2. Loading Mods In Superluminal

Since version 13-4-23, Superluminal can automatically install mods in its archives. To do this, go to File > Include Mod, and select the file you wish to add - it can be either an entire .ftl package, or separate .xml (.append), .txt or .png files.
Installing via .ftl package is preferred, though.
Disclaimer: keep in mind that if your ship uses modded content, you will also have to install the mod that contains the content whenever you want to play the ship. Otherwise the game will crash.

The editor has to be restarted for the changes to take effect.

Image
3. Creating Automated (No-Crew) Ships

Automated ships are ships that start without any crew initially. Also, automated ships have all systems appearing to be manned by non-experienced crew.
In order for a ship to be exported as an automated ship, simply leave all crew spinners at 0.

Image
4. Placing Artillery Origin

If your ship is going to use the artillery system, it needs to have enough weapon mounts -- artillery always uses the fifth (5th) weapon mount, so even if your ship has only 2 or 3 weapon slots, you need to place a total of 5 weapon mounts in order for it to work correctly.

You can edit already placed mounts by double-clicking on them with the Selection Tool [Q]. The Index field is the number of the weapon mount, and can be edited to swap mounts around.
Weapon mount with Index = 5 is always considered the artillery mount, if the ship has this system assigned.

If your ship has more than 4 weapon slots:
- without the artillery system assigned, weapons will use corresponding mounts - 5th weapon 5th mount, etc.
- with the artillery system assigned, 5th weapon will use the 6th mount - 6th weapon 7th mount, etc.
Last edited by kartoFlane on Fri Dec 27, 2013 6:27 pm, edited 9 times in total.
Superluminal2 - a ship editor for FTL
User avatar
kartoFlane
Posts: 1488
Joined: Mon Jan 14, 2013 10:20 pm

Re: [Tutorial] Superluminal Guides

Postby kartoFlane » Tue Apr 16, 2013 3:22 pm

5. Manually Linking Doors

Normally doors are automatically linked by the editor to correct rooms during exporting. However, you can override this process for select doors and link them to rooms on your own. This allows you to create gateways between rooms, even if they’re not physically connected, effectively making split-design ships playable.

An important thing to note, though - this exploits a bug in FTL, the game's door system was not meant to be used that way, so some oddities and weird crew behaviour are to be expected.

In order to do this, select the Door Tool [E], and while holding down Shift, click on the door you wish to link and drag the mouse cursor (while still holding the mouse button down) to the room you wish to link the door to.
Doing this with the left mouse button sets up the left/top room ID, while with right mouse button – right/bottom room ID.
Releasing the button while the cursor hovers over empty space (where there is no room present) will reset it to default value, meaning the reset'd ID will be subject to automated linking.

Doors that have been linked by hand show lines connecting them to the rooms when selected. Purple means left/top room, while teal means right/bottom room.
Example usage; consider a 1x1 room with the door at its bottom wall. The left/top ID will be automatically linked to the 1x1 room. You can set the right/bottom ID to any room you like, allowing the crew to move from the 1x1 room to the room of your choosing.
In order to allow the crew to move back to the 1x1 room, you will have to place another door, and link to the 1x1 room.

Example of manually linked doors and rooms, that allow crew to move from one to the other and vice versa:
Image

Version 13-8-20 introduced an alternate way of linking doors. With the Selection Tool [Q], double-click on an already placed door to open its properties.
From there, you can set the IDs by first clicking on a Select Room button, and them clicking once on a room you wish the door to be linked to.
You can reset the ID to be automatically linked by the editor by pressing Reset button.

The first ID is the top/left ID, second is bottom/right. -2 means the ID will be automatically linked, -1 means airlock. Values 0 and above are indices of rooms the door is linked to.
Last edited by kartoFlane on Sun Aug 25, 2013 9:15 pm, edited 5 times in total.
Superluminal2 - a ship editor for FTL
TheOriginalBastard
Posts: 7
Joined: Tue Apr 16, 2013 4:35 pm

Re: [Tutorial] Superluminal Guides

Postby TheOriginalBastard » Tue Apr 16, 2013 6:06 pm

I really don't mean this to sound rude :D So keep that in mind, I'm just frustrated.


I've read and reread that post for GMM... and I still don't understand how to make a .zip into a .ftl.

In the way I read it, I can just rename the whatever.zip to whatever.ftl and it should work?

When you rename yaddayadda.ftl to .zip it gives you a warning, but when you rename it to .ftl it stays a zip file?

SOOOO CONFUSED.
boa13
Posts: 829
Joined: Mon Sep 17, 2012 11:42 pm

Re: [Tutorial] Superluminal Guides

Postby boa13 » Tue Apr 16, 2013 9:52 pm

TheOriginalBastard wrote:In the way I read it, I can just rename the whatever.zip to whatever.ftl and it should work?

Yes. :)

TheOriginalBastard wrote:When you rename yaddayadda.ftl to .zip it gives you a warning, but when you rename it to .ftl it stays a zip file?

It is always a zip file, just with different letters after the dot in the file name. Changing the name does not change the file contents, it remains a valid zip file.
Forum janitor — If you spot spam, PM me the URL and/or the username of the spammer.
I have powers, moderator powers. I am not keen on using them, but will do so if needed.
TheOriginalBastard
Posts: 7
Joined: Tue Apr 16, 2013 4:35 pm

Re: [Tutorial] Superluminal Guides

Postby TheOriginalBastard » Tue Apr 16, 2013 10:25 pm

boa13 wrote:
TheOriginalBastard wrote:In the way I read it, I can just rename the whatever.zip to whatever.ftl and it should work?

Yes. :)

TheOriginalBastard wrote:When you rename yaddayadda.ftl to .zip it gives you a warning, but when you rename it to .ftl it stays a zip file?

It is always a zip file, just with different letters after the dot in the file name. Changing the name does not change the file contents, it remains a valid zip file.



Thank you :)
User avatar
kartoFlane
Posts: 1488
Joined: Mon Jan 14, 2013 10:20 pm

Re: [Tutorial] Superluminal Guides

Postby kartoFlane » Wed Apr 17, 2013 10:18 pm

I wrote up a short explanation of the .ftl format, in lieu of the GMM quote - not sure if it's actually going to be any helpful, though...
Superluminal2 - a ship editor for FTL
Vuliev
Posts: 15
Joined: Wed Jan 23, 2013 6:19 am

Re: [Tutorial] Superluminal Guides

Postby Vuliev » Wed Apr 24, 2013 3:53 am

I'm having a little bit of trouble getting shield graphics to work. I'd just done some playing with weapon system power, repacked the ship into an .ftl, and then ran it through GMM. In game, though, the shield graphic was gone. I tried just repacking the original ship (no changes), and it did the same thing. Any idea what I should do to fix it?
User avatar
kartoFlane
Posts: 1488
Joined: Mon Jan 14, 2013 10:20 pm

Re: [Tutorial] Superluminal Guides

Postby kartoFlane » Wed Apr 24, 2013 9:31 am

Huh, weird. I'm not having such issues. Could you post the ftl file here?
Superluminal2 - a ship editor for FTL
DryEagle
Posts: 363
Joined: Thu Oct 04, 2012 11:17 am

Re: [Tutorial] Superluminal Guides

Postby DryEagle » Wed Apr 24, 2013 10:11 am

With split-doors, the important thing to realise is that doors in FTL are not like physical doors, i.e. they aren't portals to another room. Instead, they are simply checkpoints, that the crew must move through while pathing to the room of choice. The checkpoints tell them which 2 rooms are linked by any given 'door', and they will simply move through these in order until they reach their destination, no matter how illogically they might be connected.

Also if you move through more than one set of split-room doors, or move diagonally through them, the crew will start going through the subsequent ones in the wrong direction, for whatever reason; this adds significant travel time to their movement, so be sure to keep it in mind when designing your ship.
All ships I have created include custom weapons, graphics etc:
Image
ImageImageImageImage