Page 1 of 1

[MODDING] Where to begin?

Posted: Fri Sep 21, 2012 7:07 am
by SinragnokOfThirteen
I have no clue where to begin on learning how to mod. If there's anyone that can help me with where to start, that would be great. I have a huge headache over trying to figure out what should be done in order to start. Use simple terms, I'm of lesser intelligence. :oops:

Some information:
No experience with any computer languages.
I tried understanding CaptainShooby's tutorial, I'm afraid I can't understand it or it's just because of it being far, FAR into the night.
I downloaded ftldat and the pack/unpack.bat for data and resource but I have no clue what git is.
I'm not sure how to use command prompt.

Re: [MODDING] Where to begin?

Posted: Fri Sep 21, 2012 7:41 am
by Kieve
The best place to start, I'd say, would be with this thread here:
viewtopic.php?f=4&t=2645
marksteele did a great job of hunting down and organizing most of the mod threads in circulation, which means easy access to the various guides.

As far as "getting started" goes, it really depends on what you want to do. If you're looking to add / replace content (new ships, weapons, or other assets that require graphics) you'll need to use FTLdat to unpack the resource.dat file. And if you're only interested in events, new sectors, other stuff that can be made with existing art, data.dat is the only one you'll need to concern yourself with. If you're having trouble figuring out how to use it, this is the thread you want:
viewtopic.php?f=4&t=1920

Once you actually have the files unpacked and ready to work with, I'm sure the rest of the pieces will fall into place more easily. ;)

Re: [MODDING] Where to begin?

Posted: Fri Sep 21, 2012 8:00 am
by SinragnokOfThirteen
I have no clue what these two are as I downloaded the ftldat as a zip. "ftldat -h, ftldat pack -h"

Unpacking is what I seem to have trouble with primarily. All I know is that using wordpad/notepad to try to edit any values seems to mess up the .dat file. I don't seem to get the "CLI of choice:" part in CaptainShooby's tutorial, making a note I've also seen CLI at the git website. That also brings me to another question: Is git required?

I'd like to be adding content such as ships like your Obsidian Cruisier (it's awesome, I'd like to be able to help on that), events, sectors, and new alien races. Do take it literally that I know nothing of coding and modding.

Re: [MODDING] Where to begin?

Posted: Fri Sep 21, 2012 5:32 pm
by Kieve
What operating system do you use? I can try to help but windows command-line has some variances just between XP, Vista, and 7. And if you're on Linux or Mac, I can't help at all.

Re: [MODDING] Where to begin?

Posted: Fri Sep 21, 2012 11:02 pm
by SinragnokOfThirteen
I use Windows 7 last time I checked. Also, thank you very much for helping me.

Re: [MODDING] Where to begin?

Posted: Sat Sep 22, 2012 3:22 am
by SinragnokOfThirteen
If anyone else can help, that'd be great too. I'm willing to test mods as well.

Re: [MODDING] Where to begin?

Posted: Sat Sep 22, 2012 3:46 am
by Kieve
Win 7... alright.
Well the first thing you'll want to do is install FTLDat. I'm assuming you at least have it already, but if not:
viewtopic.php?f=4&t=1920

Once it's installed, you run it from the windows command line prompt. There's a few ways to do this. If you don't use the shift+right click method, you'll need to navigate to the folder where FTL (game) is installed.
Generally CMD starts off with something like

Code: Select all

C:\Documents and Settings\YourName>_

(the underscore is a blinky cursor, not actually an underscore)
To get where you need to go, type in:

Code: Select all

C:\Documents and Settings\YourName>cd C:\"file path of FTL game"\resources

Example:

Code: Select all

C:\Documents and Settings\YourName>cd C:\Games\Faster Than Light\resources

CMD should then put you in the proper directory.

Code: Select all

C:\Games\Faster Than Light\resources>_

Once you're in the right place, type the command to unpack the files.

Code: Select all

C:\Games\Faster Than Light\resources>ftldat unpack data.dat
C:\Games\Faster Than Light\resources>ftldat unpack resource.dat

Having done this, you should now have two folders in your \resources\ directory, with all of the game's assets. Now all those tutorials about tweaking XML files and weapon creation / ship building should make a lot more sense :)

Note: Be sure you back up both files. I do this by copying and renaming the copy as .bak, personally (you get a warning about changing file type but it doesn't actually affect the file). Whenever you want to re-pack the files with your edited changes, go through the same steps as above but type "ftldat pack (data/resources).dat" instead.

Re: [MODDING] Where to begin?

Posted: Sat Sep 22, 2012 4:40 am
by SinragnokOfThirteen
You are a savior. ; -; I was racking my brains out on how to do everything! Hopefully, with every you taught me, I can learn a bit easier with those tutorials now. Hope I can make something noteworthy for these forums. Thanks again!

Re: [MODDING] Where to begin?

Posted: Sat Sep 22, 2012 5:22 am
by Kieve
Glad I could be of help!
Also, I will say that for raw packing/unpacking of the two .DAT files, it's considerably easier to write yourself a simple batch program.
Short version: a batch file (.bat) is a text file with windows-specific scripting functions written in. When renamed to .bat, it becomes a functioning executable and will run whatever scripts you've set for it. For our purposes, that means instead of going through CMD and typing in "cd [filepath] / ftldat pack/unpack..." every time, you can just write a short executable script to do it for you.
I'm not sure if mine works on 7 or not - I think the "set" function might be specific to XP - but it reads about as follows.

Code: Select all

@ECHO OFF
:BEGIN
CLS

ECHO ....FTLDAT..........
ECHO [1] Pack Data
ECHO [2] Pack Resources
ECHO [3] Unpack Data
ECHO [4] Unpack Resources
SET /P sel=
IF "%sel%" == "1" (
   ftldat pack data.dat
)
IF "%sel%"== "2" (
   ftldat pack resource.dat
)
IF "%sel%" == "3" (
   ftldat unpack data.dat
)
IF "%sel%" == "4" (
   ftldat unpack resource.dat
)
@PAUSE

When placed in "...\resources" folder it'll offer up a choice to pack / unpack the data and resource .dat's. Saved me a lot of time with quick edits & tweaks.