LFD File editing
LFD File editing
- Ace Antilles
- Posts: 7901
- Joined: Sat Jan 22, 2000 12:01 am
- Contact:
What editing programs still work to extract files from the LFD document format?
Stuff that's used in classic X-wing and TIE Fighter games.
I found LfdReader online but can't see anyway to make it work.
https://github.com/MikeG621/LfdReader
Stuff that's used in classic X-wing and TIE Fighter games.
I found LfdReader online but can't see anyway to make it work.
https://github.com/MikeG621/LfdReader
- JaggedFel
- Posts: 435
- Joined: Wed Sep 06, 2006 11:01 pm
- Contact:
What in particular are you trying to extract? LFR is simply a library that I incorporate into other programs. There's a lot of different things that can go into an LFD file, so I don't have a master "down them all" program to extract/swap resources.
Ye Olde Galactic Empire Mission Editor v1.15.6
Current software WIPs: TIE Layout and Cutscene Editor, TIE/XvT Cockpit Editor
Libraries / Format specs: *.tie, *.plt, *.tfr, *.lfd , *.act, *.dat image files, *.fnt
Current software WIPs: TIE Layout and Cutscene Editor, TIE/XvT Cockpit Editor
Libraries / Format specs: *.tie, *.plt, *.tfr, *.lfd , *.act, *.dat image files, *.fnt
- Ace Antilles
- Posts: 7901
- Joined: Sat Jan 22, 2000 12:01 am
- Contact:
Well I want to see what resource files can be seen and I suppose be nosey lol
I want to see if any of the old game images can be extracted. For example combat chamber pictures, voices, uniforms, backdrops, who knows.
I remember for example there used to be ways to edit cockpits in the old games and planets?
Scumm Revisited doesn't seem to go it so I wonder if there are any programs out there that do.
- JaggedFel
- Posts: 435
- Joined: Wed Sep 06, 2006 11:01 pm
- Contact:
Plenty of the old stuff can be pulled.
Combat chamber cutscene/layouts are done with normal images that can be pulled, voices are wrapped WAV files, uniforms should also be normal images, backdrops are ACT files, which originally were in the LFDs but for the later releases were done as separate files...
So, the list of what I've got. Some of these were designed for the original games, not current GOG/Steam builds, and relied on auto-detection so they can't work these days without some rewrites. I've also got a couple CLI tools I wrote just to help open things up, extract the binary and reverse engineer everything.
Fonts:
LucasartsFntEditor - for the separate FNT (font) files, located in the main directory. This is for all platforms, X-wing through XWA.
LfdFontReader - should give itself away, those fonts are in EMPIRE.LFD, INSTALL.LFD and TITLE.LFD
Images:
LfdImageReader - I used as a tool for extracting and testing. Haven't updated it years, needs an overhaul and it's not posted to git. Probably should. Can extract LFD:DELT images and single frames from LFD:ANIM animations, but I didn't add editing capability
PaletteReader - Another one I should probably upload to git, this one's real useful (and works!) because it shows the color indexes used by the images stored in the LFD:PLTT resource, this gives you indexes and RGB values. Depending on where the image is used, it may require multiple palettes to get the full color definition.
TieLayoutEditor - Something I started, but never finished. Displays the layouts like the concourse and cutscenes defined by the LFD:FILM resource, shows where images are, which animations are used, lists the audio cues, lists the PLTTs, etc. In its current state, doesn't do much more than display, although you can poke a couple of the top-level FILM settings. Decent candidate to post to git, at least so it's not lost. The idea was make this a one-stop to do overhauls and conversions.
XwingActEditor - Read/write backdrops
TieCockpitEditor - like the Layout Editor, but for cockpits and much more complete as a reader, can view the LFD:PANL resource.
Other:
TIE File Reader - Specifically made to update certain text strings in STRINGS.DAT and a couple LFDs (LFD:TEXT resource), mostly related to ship modding. Needs overhaul.
TieSoundEditor - Read/write the WAV files, which are LFD:VOIC (voice) and LFD:BLAS (blast? ie, sound effects) resources.
YOGEME also has the ability to update the image and text used in the Battle selection concourse.
Combat chamber cutscene/layouts are done with normal images that can be pulled, voices are wrapped WAV files, uniforms should also be normal images, backdrops are ACT files, which originally were in the LFDs but for the later releases were done as separate files...
So, the list of what I've got. Some of these were designed for the original games, not current GOG/Steam builds, and relied on auto-detection so they can't work these days without some rewrites. I've also got a couple CLI tools I wrote just to help open things up, extract the binary and reverse engineer everything.
Fonts:
LucasartsFntEditor - for the separate FNT (font) files, located in the main directory. This is for all platforms, X-wing through XWA.
LfdFontReader - should give itself away, those fonts are in EMPIRE.LFD, INSTALL.LFD and TITLE.LFD
Images:
LfdImageReader - I used as a tool for extracting and testing. Haven't updated it years, needs an overhaul and it's not posted to git. Probably should. Can extract LFD:DELT images and single frames from LFD:ANIM animations, but I didn't add editing capability
PaletteReader - Another one I should probably upload to git, this one's real useful (and works!) because it shows the color indexes used by the images stored in the LFD:PLTT resource, this gives you indexes and RGB values. Depending on where the image is used, it may require multiple palettes to get the full color definition.
TieLayoutEditor - Something I started, but never finished. Displays the layouts like the concourse and cutscenes defined by the LFD:FILM resource, shows where images are, which animations are used, lists the audio cues, lists the PLTTs, etc. In its current state, doesn't do much more than display, although you can poke a couple of the top-level FILM settings. Decent candidate to post to git, at least so it's not lost. The idea was make this a one-stop to do overhauls and conversions.
XwingActEditor - Read/write backdrops
TieCockpitEditor - like the Layout Editor, but for cockpits and much more complete as a reader, can view the LFD:PANL resource.
Other:
TIE File Reader - Specifically made to update certain text strings in STRINGS.DAT and a couple LFDs (LFD:TEXT resource), mostly related to ship modding. Needs overhaul.
TieSoundEditor - Read/write the WAV files, which are LFD:VOIC (voice) and LFD:BLAS (blast? ie, sound effects) resources.
YOGEME also has the ability to update the image and text used in the Battle selection concourse.
Ye Olde Galactic Empire Mission Editor v1.15.6
Current software WIPs: TIE Layout and Cutscene Editor, TIE/XvT Cockpit Editor
Libraries / Format specs: *.tie, *.plt, *.tfr, *.lfd , *.act, *.dat image files, *.fnt
Current software WIPs: TIE Layout and Cutscene Editor, TIE/XvT Cockpit Editor
Libraries / Format specs: *.tie, *.plt, *.tfr, *.lfd , *.act, *.dat image files, *.fnt
- Ace Antilles
- Posts: 7901
- Joined: Sat Jan 22, 2000 12:01 am
- Contact:
Yeah it's images I would like to look at for example. I don't want to edit the old game, just extract.JaggedFel wrote: ↑Sun Jun 07, 2020 7:51 pmPlenty of the old stuff can be pulled.
Combat chamber cutscene/layouts are done with normal images that can be pulled, voices are wrapped WAV files, uniforms should also be normal images, backdrops are ACT files, which originally were in the LFDs but for the later releases were done as separate files...
TieLayoutEditor sounds cool.
These are all cool programs but unless I am totally thick, and please treat me like I am, I have no idea how to make them work!
Everything is a .CS file and I have no idea what to do with them. I don't have any associated programs.
I'm used to nice simple programs you click on an EXE.
Help me Jagged Fel. You're my only hope.
- JaggedFel
- Posts: 435
- Joined: Wed Sep 06, 2006 11:01 pm
- Contact:
Well, apparently I never attached the zip file for the Act or Cockpit editors. Oops. They're there now. Go to the Release tab to grab the zip file, make sure each program lives in its own folder; they've been built at different times with different versions of the DLLs so I can't guarantee everything will work if you dump it all into one spot.
I'll work on cleaning up the other three so they can be posted with clean builds.
I'll work on cleaning up the other three so they can be posted with clean builds.
Ye Olde Galactic Empire Mission Editor v1.15.6
Current software WIPs: TIE Layout and Cutscene Editor, TIE/XvT Cockpit Editor
Libraries / Format specs: *.tie, *.plt, *.tfr, *.lfd , *.act, *.dat image files, *.fnt
Current software WIPs: TIE Layout and Cutscene Editor, TIE/XvT Cockpit Editor
Libraries / Format specs: *.tie, *.plt, *.tfr, *.lfd , *.act, *.dat image files, *.fnt
- Ace Antilles
- Posts: 7901
- Joined: Sat Jan 22, 2000 12:01 am
- Contact:
SNIP all my previous comments.JaggedFel wrote: ↑Sun Jun 07, 2020 11:07 pmWell, apparently I never attached the zip file for the Act or Cockpit editors. Oops. They're there now. Go to the Release tab to grab the zip file, make sure each program lives in its own folder; they've been built at different times with different versions of the DLLs so I can't guarantee everything will work if you dump it all into one spot.
I'll work on cleaning up the other three so they can be posted with clean builds.
AHA a break through now I am beginning to see. Sorry I'm not used to this GitHub. I had not even seen the release Tab.
Thanks for your patience. I look forward to seeing the other programs working
-
- Posts: 185
- Joined: Sun May 05, 2002 11:01 pm
- Contact:
I would be interested in Lfd Reader release as well.
- JaggedFel
- Posts: 435
- Joined: Wed Sep 06, 2006 11:01 pm
- Contact:
Posted PaletteReader, took a bit more rewriting than I thought to get that current. Will work on LIR next since that's the one you really want, I know that's going to take some work.
Ye Olde Galactic Empire Mission Editor v1.15.6
Current software WIPs: TIE Layout and Cutscene Editor, TIE/XvT Cockpit Editor
Libraries / Format specs: *.tie, *.plt, *.tfr, *.lfd , *.act, *.dat image files, *.fnt
Current software WIPs: TIE Layout and Cutscene Editor, TIE/XvT Cockpit Editor
Libraries / Format specs: *.tie, *.plt, *.tfr, *.lfd , *.act, *.dat image files, *.fnt
- Ace Antilles
- Posts: 7901
- Joined: Sat Jan 22, 2000 12:01 am
- Contact:
Thanks a lot. Appreciate the effortJaggedFel wrote: ↑Fri Jun 12, 2020 5:20 pmPosted PaletteReader, took a bit more rewriting than I thought to get that current. Will work on LIR next since that's the one you really want, I know that's going to take some work.
I also find it interesting looking into this stuff even if it's outdated lol
Same way as Michals Twitter page has classic things on it
-
- Posts: 185
- Joined: Sun May 05, 2002 11:01 pm
- Contact:
Cool! Thank you.JaggedFel wrote: ↑Fri Jun 12, 2020 5:20 pmPosted PaletteReader, took a bit more rewriting than I thought to get that current. Will work on LIR next since that's the one you really want, I know that's going to take some work.
Looking forward to LFD reader!
- JaggedFel
- Posts: 435
- Joined: Wed Sep 06, 2006 11:01 pm
- Contact:
Okay, LFD Image Reader is now up. I mention it in the readme, but there are going to be some images where the colors are obviously wrong. That's due to how TIE layers palettes on top of each other and this was originally written before I knew how to do the layouts. So no matter the assumptions I make with how I handle the palettes there were always going to be some that look weird.
Ye Olde Galactic Empire Mission Editor v1.15.6
Current software WIPs: TIE Layout and Cutscene Editor, TIE/XvT Cockpit Editor
Libraries / Format specs: *.tie, *.plt, *.tfr, *.lfd , *.act, *.dat image files, *.fnt
Current software WIPs: TIE Layout and Cutscene Editor, TIE/XvT Cockpit Editor
Libraries / Format specs: *.tie, *.plt, *.tfr, *.lfd , *.act, *.dat image files, *.fnt
- JaggedFel
- Posts: 435
- Joined: Wed Sep 06, 2006 11:01 pm
- Contact:
So I've uploaded Tie Layout Editor, it puts together the scenes, but you can see how some things were done. CITY split the background into two halves, the various AWARDS are half-images that are mirrored, etc. Very rough, nowhere near complete (there's a whole missing form that will show the events and run the timers, etc).
Ye Olde Galactic Empire Mission Editor v1.15.6
Current software WIPs: TIE Layout and Cutscene Editor, TIE/XvT Cockpit Editor
Libraries / Format specs: *.tie, *.plt, *.tfr, *.lfd , *.act, *.dat image files, *.fnt
Current software WIPs: TIE Layout and Cutscene Editor, TIE/XvT Cockpit Editor
Libraries / Format specs: *.tie, *.plt, *.tfr, *.lfd , *.act, *.dat image files, *.fnt
- Ace Antilles
- Posts: 7901
- Joined: Sat Jan 22, 2000 12:01 am
- Contact:
Hi. I tried that out recently but I kept getting a crash?JaggedFel wrote: ↑Sat Jun 13, 2020 1:37 pmOkay, LFD Image Reader is now up. I mention it in the readme, but there are going to be some images where the colors are obviously wrong. That's due to how TIE layers palettes on top of each other and this was originally written before I knew how to do the layouts. So no matter the assumptions I make with how I handle the palettes there were always going to be some that look weird.
I forgot to post. I'm away right now but I'll check it out again soon and post the error.
Thanks for your efforts
-
- Posts: 185
- Joined: Sun May 05, 2002 11:01 pm
- Contact:
Cool, thank you. I will check both new programs out!
- Ace Antilles
- Posts: 7901
- Joined: Sat Jan 22, 2000 12:01 am
- Contact:
Hi. Everytime I open a LFD I get a crash. The program starts ok but it's only when I click to open an LFD.JaggedFel wrote: ↑Sat Jun 13, 2020 1:37 pmOkay, LFD Image Reader is now up. I mention it in the readme, but there are going to be some images where the colors are obviously wrong. That's due to how TIE layers palettes on top of each other and this was originally written before I knew how to do the layouts. So no matter the assumptions I make with how I handle the palettes there were always going to be some that look weird.
I'm trying to use it on the Steam version. Does it only work on the original CD version maybe?
Here's a pic if you want more info let me know but I hope it makes sense
You do not have the required permissions to view the files attached to this post.
- JaggedFel
- Posts: 435
- Joined: Wed Sep 06, 2006 11:01 pm
- Contact:
It definitely works with Steam, that's the one it finds on my computer (I've also got original copies). Is the directory shown correct with where your Steam install is? That error either means it doesn't really exist, or there's weird permissions issues.
Ye Olde Galactic Empire Mission Editor v1.15.6
Current software WIPs: TIE Layout and Cutscene Editor, TIE/XvT Cockpit Editor
Libraries / Format specs: *.tie, *.plt, *.tfr, *.lfd , *.act, *.dat image files, *.fnt
Current software WIPs: TIE Layout and Cutscene Editor, TIE/XvT Cockpit Editor
Libraries / Format specs: *.tie, *.plt, *.tfr, *.lfd , *.act, *.dat image files, *.fnt
- Ace Antilles
- Posts: 7901
- Joined: Sat Jan 22, 2000 12:01 am
- Contact:
Yeah that's my Steam install but it's not the C drive, regular default.
Maybe I'll move it there and see if it makes a difference. Thanks
- JaggedFel
- Posts: 435
- Joined: Wed Sep 06, 2006 11:01 pm
- Contact:
Shouldn't, my Steam is on E drive. Can you just open the LFD with notepad or something? It'll be gibberish, but I want to make sure it's not permissions-based.
Ye Olde Galactic Empire Mission Editor v1.15.6
Current software WIPs: TIE Layout and Cutscene Editor, TIE/XvT Cockpit Editor
Libraries / Format specs: *.tie, *.plt, *.tfr, *.lfd , *.act, *.dat image files, *.fnt
Current software WIPs: TIE Layout and Cutscene Editor, TIE/XvT Cockpit Editor
Libraries / Format specs: *.tie, *.plt, *.tfr, *.lfd , *.act, *.dat image files, *.fnt
- Ace Antilles
- Posts: 7901
- Joined: Sat Jan 22, 2000 12:01 am
- Contact:
I can open it with Notepad with no extra need to ask permission etc.
It seems to be a .Net issue maybe? Here's a longer code from the crash
Code: Select all
See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.
************** Exception Text **************
System.IO.DirectoryNotFoundException: Could not find a part of the path 'D:\Games\Steam EXTRA\steamapps\common\STAR WARS Tie Fighter\remastered\RESOURCE\EMPIRE.LFD'.
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share)
at Idmr.LfdReader.LfdFile..ctor(String filePath)
at Idmr.LfdImageReader.MainForm.opnFile_FileOk(Object sender, CancelEventArgs e)
at System.Windows.Forms.FileDialog.OnFileOk(CancelEventArgs e)
at System.Windows.Forms.FileDialog.HandleVistaFileOk(IFileDialog dialog)
************** Loaded Assemblies **************
mscorlib
Assembly Version: 4.0.0.0
Win32 Version: 4.8.4180.0 built by: NET48REL1LAST_B
CodeBase: file:///C:/Windows/Microsoft.NET/Framework64/v4.0.30319/mscorlib.dll
----------------------------------------
LFD Image Reader
Assembly Version: 1.2.7469.15170
Win32 Version: 1.2.0.0
CodeBase: file:///D:/Games/Games%20Files/X-Wing%20Trilogy/Editors/LFD%20Image%20Reader/LFD%20Image%20Reader.exe
----------------------------------------
System.Windows.Forms
Assembly Version: 4.0.0.0
Win32 Version: 4.8.4150.0 built by: NET48REL1LAST_C
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms/v4.0_4.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System
Assembly Version: 4.0.0.0
Win32 Version: 4.8.4001.0 built by: NET48REL1LAST_C
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System/v4.0_4.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Drawing
Assembly Version: 4.0.0.0
Win32 Version: 4.8.3752.0 built by: NET48REL1
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Drawing/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
System.Configuration
Assembly Version: 4.0.0.0
Win32 Version: 4.8.3752.0 built by: NET48REL1
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Configuration/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
----------------------------------------
System.Core
Assembly Version: 4.0.0.0
Win32 Version: 4.8.4180.0 built by: NET48REL1LAST_B
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Core/v4.0_4.0.0.0__b77a5c561934e089/System.Core.dll
----------------------------------------
System.Xml
Assembly Version: 4.0.0.0
Win32 Version: 4.8.3752.0 built by: NET48REL1
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.dll
----------------------------------------
Idmr.LfdReader
Assembly Version: 1.2.2.15168
Win32 Version: 1.2.2.0
CodeBase: file:///D:/Games/Games%20Files/X-Wing%20Trilogy/Editors/LFD%20Image%20Reader/Idmr.LfdReader.DLL
----------------------------------------
************** JIT Debugging **************
To enable just-in-time (JIT) debugging, the .config file for this
application or computer (machine.config) must have the
jitDebugging value set in the system.windows.forms section.
The application must also be compiled with debugging
enabled.
For example:
<configuration>
<system.windows.forms jitDebugging="true" />
</configuration>
When JIT debugging is enabled, any unhandled exception
will be sent to the JIT debugger registered on the computer
rather than be handled by this dialog box.
- JaggedFel
- Posts: 435
- Joined: Wed Sep 06, 2006 11:01 pm
- Contact:
Wth.
Okay, so I added a button to redefine where TIE is located in the attached zip. Select the TIE95.EXE with it, then try opening an LFD.
If that doesn't work, try copying the RESOURCE directory and TIE95.exe to a different location, and then re-select the new TIE95 and try again.
Okay, so I added a button to redefine where TIE is located in the attached zip. Select the TIE95.EXE with it, then try opening an LFD.
If that doesn't work, try copying the RESOURCE directory and TIE95.exe to a different location, and then re-select the new TIE95 and try again.
You do not have the required permissions to view the files attached to this post.
Ye Olde Galactic Empire Mission Editor v1.15.6
Current software WIPs: TIE Layout and Cutscene Editor, TIE/XvT Cockpit Editor
Libraries / Format specs: *.tie, *.plt, *.tfr, *.lfd , *.act, *.dat image files, *.fnt
Current software WIPs: TIE Layout and Cutscene Editor, TIE/XvT Cockpit Editor
Libraries / Format specs: *.tie, *.plt, *.tfr, *.lfd , *.act, *.dat image files, *.fnt
- Ace Antilles
- Posts: 7901
- Joined: Sat Jan 22, 2000 12:01 am
- Contact:
That seems to have worked. Thanks a lot!JaggedFel wrote: ↑Fri Jun 19, 2020 12:12 amWth.
Okay, so I added a button to redefine where TIE is located in the attached zip. Select the TIE95.EXE with it, then try opening an LFD.
If that doesn't work, try copying the RESOURCE directory and TIE95.exe to a different location, and then re-select the new TIE95 and try again.
Really appreciate your skill and efforts on such old games
- JaggedFel
- Posts: 435
- Joined: Wed Sep 06, 2006 11:01 pm
- Contact:
Good. So did it work when you selected the original location, or when you moved it?
Ye Olde Galactic Empire Mission Editor v1.15.6
Current software WIPs: TIE Layout and Cutscene Editor, TIE/XvT Cockpit Editor
Libraries / Format specs: *.tie, *.plt, *.tfr, *.lfd , *.act, *.dat image files, *.fnt
Current software WIPs: TIE Layout and Cutscene Editor, TIE/XvT Cockpit Editor
Libraries / Format specs: *.tie, *.plt, *.tfr, *.lfd , *.act, *.dat image files, *.fnt
- Ace Antilles
- Posts: 7901
- Joined: Sat Jan 22, 2000 12:01 am
- Contact:
I selected the exe file in the location it was before
- JaggedFel
- Posts: 435
- Joined: Wed Sep 06, 2006 11:01 pm
- Contact:
Alright. Well, in that case I have no idea what happened, other than maybe the registry value it uses to find the Steam location had a bad character in it that throws it off, since the location itself obviously works fine. I'll fix it up to handle this kind of thing properly and leave the "Ace" button in there so there's a manual workaround.
Ye Olde Galactic Empire Mission Editor v1.15.6
Current software WIPs: TIE Layout and Cutscene Editor, TIE/XvT Cockpit Editor
Libraries / Format specs: *.tie, *.plt, *.tfr, *.lfd , *.act, *.dat image files, *.fnt
Current software WIPs: TIE Layout and Cutscene Editor, TIE/XvT Cockpit Editor
Libraries / Format specs: *.tie, *.plt, *.tfr, *.lfd , *.act, *.dat image files, *.fnt