Page 1 of 1

What do you use to edit code?

Posted: Wed Jan 16, 2013 2:07 am
by Classic
I'm new to the modding scene, and I was planning on taking my first steps into game development by making a mod for FTL. I was experimenting with the coding/scripting in the data.dat, and it was pretty tedious to write some code, pack the data, launch FTL, and find out that somewhere in the code, there was an error. So I was wondering, was there a better way to edit the xml files than notepad? I have seen FTL overdrive and I am willing to learn LUA in order to use it, but I was wondering if there was a program any of you all use to write code. Thanks for any replies and suggestions.

Re: What do you use to edit code?

Posted: Wed Jan 16, 2013 3:22 am
by Kieve
There really isn't a better way at the moment. Personally, I haven't found XML-editing with notepad to be all that bothersome, but KuroSaru recently posted a GUI tool for .DAT files. I'm not sure if there's any particular advantage or disadvantage to it, as I haven't tried it yet, but if you find the current methods tedious, that might be a simpler alternative.

It might also be handy to write a quick batch (.BAT) file to ease the repacking process. Something simple you can toss in FTL\resources to speed things up considerably.

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

This is the one I run - I'm still using WinXP, so it's likely to be slightly different for Vista / Win7-8 users. Does save me the tedium of opening up CMD and retyping the whole /ch dir ... set of lines in every time though.

Re: What do you use to edit code?

Posted: Thu Jan 17, 2013 5:51 am
by thashepherd
I edit the XML in Notepad++ instead of standard notepad.

Kieve's script is pretty slick - I manually .zip my development folder and add it using GMM instead.

Re: What do you use to edit code?

Posted: Thu Jan 17, 2013 7:44 am
by Classic
Thanks for the input guys. So it seems I'll be using notepad or notepad++ to mod until FTL Overdrive is released and learn LUA scripting. Notepad is ok, it's just that I wish I could have it catch my mistakes when I don't see them! As for packing/unpacking, I use this little program I found on the forums. I just leave it open and press the "pack" button when I want to test code. I hope to make some good mods in the future, so keep leaving input in here guys!