Page 1 of 14

[Modding] R&D and current findings

Posted: Sun Sep 16, 2012 5:13 pm
by CaptainShooby
Greetings.

I'm CaptainShooby and I think it would be helpful to gather information about modding FTL under a single thread.
I also have a thread running on Reddit: http://www.reddit.com/r/ftlgame/comment ... _findings/

GOOD NEWS EVERYONE
I contacted the author of the FTLWiki and he kindly set up some modding sections in there.
I suggest we add all our discoveries there from now on.

http://ftlwiki.com/wiki/Home
http://ftlwiki.com/wiki/Mods
http://ftlwiki.com/wiki/Modding_Guide


ftldat by bas thank you!
a tool for unpacking and packing of the FTL .dat files Findings
I'm currently working on custom sectors and events. My findings and progress so far: I'm also writing a tutorial/guide on everything I do so that I can help others as well.
I have to rethink the structure of my guide, but most of the content for the first part is ready.

If you are modding FTL as well, please comment and share your findings!

edit: update

Re: [Modding] R&D and current findings

Posted: Sun Sep 16, 2012 5:18 pm
by Techercizer
Thanks for the heads up. I'm going to try and mod my ship/crew names so I don't have to keep changing them every time.

Re: [Modding] R&D and current findings

Posted: Sun Sep 16, 2012 5:20 pm
by StealthCl0wn
Using the DRM free version, I seem to be unable to mod anything, as the changes either don't show or cause crashes.

Re: [Modding] R&D and current findings

Posted: Sun Sep 16, 2012 5:32 pm
by CaptainShooby
StealthCl0wn wrote:Using the DRM free version, I seem to be unable to mod anything, as the changes either don't show or cause crashes.
I think I read somewhere that the DRM version has a read-only folder structure. You have to move the data.dat and resource.dat files out of there and unpack them elsewhere. You can then make changes, repack and move them back in to the original folder. Let us know if this works!

Re: [Modding] R&D and current findings

Posted: Sun Sep 16, 2012 5:46 pm
by StealthCl0wn
CaptainShooby wrote:
StealthCl0wn wrote:Using the DRM free version, I seem to be unable to mod anything, as the changes either don't show or cause crashes.
I think I read somewhere that the DRM version has a read-only folder structure. You have to move the data.dat and resource.dat files out of there and unpack them elsewhere. You can then make changes, repack and move them back in to the original folder. Let us know if this works!
Right so, I'm using two .bat files to automate it.


@echo off
ftldat unpack data.dat c:\users\user\desktop
ftldat unpack resources.dat c:\users\user\desktop

The "pack" .bat looks the same, but what should I set the filepath as? AFAIK I set it to the "data" folder it creates and it still crashes.

Re: [Modding] R&D and current findings

Posted: Sun Sep 16, 2012 5:58 pm
by CaptainShooby
The "pack" .bat looks the same, but what should I set the filepath as? AFAIK I set it to the "data" folder it creates and it still crashes.
Without additional parameters, ftldat tries to find the unpacked folders in its own directory. You are currently creating them on your desktop, so change your pack.bat to this:

Code: Select all

@echo off
ftldat pack c:\users\user\desktop\data.dat c:\users\user\desktop\data.dat-unpacked
ftldat pack c:\users\user\desktop\resource.dat c:\users\user\desktop\resource.dat-unpacked
Note that you don't really have to unpack and pack the resource.dat if you are not making changes to audio, graphics or fonts.

This should create the new data.dat and resource.dat files on your desktop. You then place these in the original resources -folder. Now, unless you've made changes that themselves cause crashing, everything should work.

Currently, it's hard to know what kind of changes we can implement without crashes so it's better to make small ones and run a lot of testing in between.

Re: [Modding] R&D and current findings

Posted: Sun Sep 16, 2012 6:20 pm
by Zuriki
The room layout (shipname.txt) file is like this

Code: Select all

X_OFFSET
<number> [<number>*35 offsets the entire ship in the X axis]
Y_OFFSET
<number> [<number>*35 offsets the entire ship in the Y axis]
VERTICLE
<number> [<number> offsets the entire ship in the Y axis by this many pixels]
ELLIPSES [The shield graphic uses these parameters]
<width>
<height>
<x-offset>
<y-offset>
ROOM
<id> [Unique ID]
<x> [How many tiles from 0 the room is on the X-axis]
<y> [How many tiles from 0 the room is on the Y-axis]
<w> [How wide is the room]
<h> [How tall is the room]
DOOR
<x> [How many tiles from 0 the door is on the X-axis]
<y> [How many tiles from 0 the door is on the Y-axis]
<room (left/up)> [The room ID to the left (verticle) or above (horizontal) this door]
<room (right/down)> [The room ID to the right (verticle) or below (horizontal) this door]
<verticle/horizontal> [0 = verticle, 1 = horizontal : Door snaps to the left or top wall of that tile always]

Re: [Modding] R&D and current findings

Posted: Sun Sep 16, 2012 6:26 pm
by CaptainShooby
Zuriki wrote:The room layout (shipname.txt) file is like this
Whoa, nice work Zuriki!

My post will quickly become huge if I add all our findings.. Hmm.
I guess we should start adding this stuff to the wiki: http://ftlwiki.com/wiki/Home

Re: [Modding] R&D and current findings

Posted: Sun Sep 16, 2012 7:58 pm
by Zuriki
Could you point me to the file that allows you to disable the rebel fleet?

Re: [Modding] R&D and current findings

Posted: Sun Sep 16, 2012 8:07 pm
by CaptainShooby
Zuriki wrote:Could you point me to the file that allows you to disable the rebel fleet?
You can change this via events.xml
  • Find the event "START_GAME" and/or "START_BEACON"
  • Add <modifyPursuit amount="-100000"/>
When these events trigger, it will set the pursuit value to whatever you wish. -100000 is a bit overkill, but it works. "START_GAME" is triggered when you start a new game and "START_BEACON" is the default event for new sectors.

I've also added a link to a fresh data.dat file with nothing but these changes and instructions on how to use it:
http://www.reddit.com/r/ftlgame/comment ... et/c6911ii