Go Back   the Magicball Network > Forums > LBA Modifications > LBA Modifications - General

Welcome to the Magicball Network.

You are currently viewing our site as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact contact us.

Reply
 
Thread Tools
  #1  
Old 2017-08-20, 12:00
jmimu's Avatar
jmimu jmimu is offline
Magic Level: Yellow Ball
 
Join Date: Dec 2011
Location: Paris
Posts: 23
Alone in the Dark PAK Editor

Hi there!
I'm currently working on Free in the Dark and in order to understand the file format, I'm creating a PAK editor.

A windows binary of the first version of the editor (0.01) is there :
http://jmimu.free.fr/AITD_PakEdit/AI..._win_v0.01.zip
For now, only text and background images are implemented.

I'd be glad to have your comments and help!



Getting Started
---------------
Make a copy of your original PAK files.
Run AITD_PakEdit.
Open a database corresponding to the game (AITD1_PAK_DB.json for AITD1).
Open a PAK.
You see every file in the PAK, with there description and type from the database.
You can modify them and overwrite database (and send it to me for next release!).
When selecting a file, you can export it depending of its type.
For now only pictures and texts can be exported.
You can then modify the exported files, and re-import them.
Overwrite the PAK file (a .PAK.BAK file will be created to save previous version).
Run the game with the new PAK.

DO NOT distribute PAK files!

The sources of FITD and the editor (AITD_PakEdit) are there :
http://https://github.com/jmimu/FITD
Reply With Quote
  #2  
Old 2017-08-22, 09:17
jmimu's Avatar
jmimu jmimu is offline
Magic Level: Yellow Ball
 
Join Date: Dec 2011
Location: Paris
Posts: 23
Hi, thank you.
Yes I saw your work. You played with compressed data?
I hope it will be useful for model extraction.

I just used Free in the Dark uncompression functions, yaz0r did all the hard work!

You can extract a bmp file form a PAK, modify it with any soft that will respect the palette (like GIMP), import it back into the PAK, overwrite the PAK and play.

I don't know about the exe risk, I don't use windows.
But you can compile it yourself and be up-to-date.
Reply With Quote
  #3  
Old 2017-08-23, 23:19
jmimu's Avatar
jmimu jmimu is offline
Magic Level: Yellow Ball
 
Join Date: Dec 2011
Location: Paris
Posts: 23
Wah! It's great!
I didn't look at sound files, I'm working on the rooms and cameras for now, but it's a good surprise, thank you!

For the picture problem, it may be a bug. Can you tell me the size of your BMP file? It should be around 65.1 kB.
I use Linux, and I have no problem, even with the windows version in wine.
Reply With Quote
  #4  
Old 2017-08-24, 08:56
jmimu's Avatar
jmimu jmimu is offline
Magic Level: Yellow Ball
 
Join Date: Dec 2011
Location: Paris
Posts: 23
Compression set to 0 and disk and real size to fa00 is perfect.
Can you send me your modified picture by PM?

You can try to import a picture you just exported, without modification...
Reply With Quote
  #5  
Old 2017-08-26, 09:34
jmimu's Avatar
jmimu jmimu is offline
Magic Level: Yellow Ball
 
Join Date: Dec 2011
Location: Paris
Posts: 23
Thanks for the sound names!

It seems your picture has an offset of 40 bytes/pixels. I use Qt picture functions, so it should be read correctly even if the format is not exactly the one expected.
The BMP I export have 14 bytes of file header, 40 bytes image of header, 1024 bytes of palette and 64000 bytes of pixels.
Your offset seems as big as the image of header, strange!

And I think you see 64 kibi-bytes, that is 65 kilo-bytes.
Reply With Quote
  #6  
Old 2017-08-27, 22:00
jmimu's Avatar
jmimu jmimu is offline
Magic Level: Yellow Ball
 
Join Date: Dec 2011
Location: Paris
Posts: 23
Qt is the library I use for the GUI and some other things, like image reading (http://doc.qt.io/qt-5/qimage.html).

It seems you're using the floppy disk version (the CD version has 105 sound samples).
I saw that the camera PAKs are a little different. You have something in the name column in the editor? In the CD version there is nothing. The text is 20 bytes long, maybe I did something wrong then the name is not empty.
I'll check.
Reply With Quote
  #7  
Old 2017-08-27, 22:19
jmimu's Avatar
jmimu jmimu is offline
Magic Level: Yellow Ball
 
Join Date: Dec 2011
Location: Paris
Posts: 23
Here is a new version of the editor:
http://jmimu.free.fr/AITD_PakEdit/AI..._win_v0.02.zip

Floors can be exported in a very basic Collada format.
The cameras don't have correct focal and orientation (maybe even position if there are several rooms).

(Blender and Alone seems to have different perspectives, maybe it's not a good idea to use it for camera positioning.)

Changelog
---------
v0.02:
* split database between floppy and cd versions
* import/export VOX
* export picture with palette (PRESENT.PAK and some in ITD_RESS.PAK)
* start export floors

May still be buggy with floppy version...

Last edited by jmimu; 2017-08-27 at 22:35.
Reply With Quote
  #8  
Old 2017-08-28, 20:19
jmimu's Avatar
jmimu jmimu is offline
Magic Level: Yellow Ball
 
Join Date: Dec 2011
Location: Paris
Posts: 23
Ok, the bug you had is fixed!
The files in your PAKs have names, mine don't.
The name is 20 bytes long, and I wrote it after the data, instead of before.
Since my names are 0 bytes long, there was no difference.

The windows version is fixed: http://jmimu.free.fr/AITD_PakEdit/AITD_PakEdit_win_v0.02.zip

Can you tell me which version of AITD you are using?
Reply With Quote
  #9  
Old 2017-08-30, 11:19
jmimu's Avatar
jmimu jmimu is offline
Magic Level: Yellow Ball
 
Join Date: Dec 2011
Location: Paris
Posts: 23
Hi!
In fact I was wrong, GOG version is the CD one, and I was using the floppy one.
The music on the CD version are audio CD tracks, and the voices are in VOC files (not copied to hard disk).
I have no crash with etage export... can you run the editor in command line and tell me if there is a message?

If somebody want to see Derceto in 3d, here are the collada exports (very early stage, camera are not oriented, many things are missing):
http://jmimu.free.fr/AITD_PakEdit/IN...lada_alpha.zip
Reply With Quote
  #10  
Old 2017-09-02, 10:07
xesf's Avatar
xesf xesf is offline
Magic Ball Master
 
Join Date: Sep 2002
Location: Dublin
Posts: 7,762
Great work jmimu, keep it up.
__________________
LBA2Remake v0.4.0 released - open source re-implementation of the LBA 2 original engine for the web.
[Play on Browser]|[Changes]|[Github]


The Sacred Carrot website
Reply With Quote
  #11  
Old 2017-09-03, 11:29
jmimu's Avatar
jmimu jmimu is offline
Magic Level: Yellow Ball
 
Join Date: Dec 2011
Location: Paris
Posts: 23
Thank you!

The windows bug for collada export is fixed.
Reply With Quote
  #12  
Old 2017-09-09, 17:11
jmimu's Avatar
jmimu jmimu is offline
Magic Level: Yellow Ball
 
Join Date: Dec 2011
Location: Paris
Posts: 23
Yes!
Now the camera focal and orientation works perfectly.
The joke is that you have to translate the camera in the direction it's looking, not only using its x,y,z.
You also have to take into account the 6/5 ratio due to pixel stretching.


(view from Blender)

Version 0.03 for windows:
http://jmimu.free.fr/AITD_PakEdit/AI..._win_v0.03.zip
Reply With Quote
  #13  
Old 2017-09-10, 10:02
jmimu's Avatar
jmimu jmimu is offline
Magic Level: Yellow Ball
 
Join Date: Dec 2011
Location: Paris
Posts: 23
Import is not possible for now, since export is not completed.
You're right, there is something wrong in ETAGE04, I'll investigate.

The carpet is a sceZone, used to change the step sound.
I forced it to be below the floor with a height of 1. In reality it goes from the floor to the ceiling, but like this it'll obstruct the view.
Reply With Quote
  #14  
Old 2017-09-12, 22:16
jmimu's Avatar
jmimu jmimu is offline
Magic Level: Yellow Ball
 
Join Date: Dec 2011
Location: Paris
Posts: 23
The crash is when reading the camera zones info. It seems to be a bug in FITD. These data are not used for now in the export.

- When importing the collada file in Blender you already have all the cameras.
- Select one and press <ctrl>+<numpad 0> to seen what the camera sees.
- Set the render resolution to 320*240 (or anything else with the same 4/3 ratio).
- Set a background image https://en.wikibooks.org/wiki/Blende...kground_Images
- you can improve camera clipping
Reply With Quote
  #15  
Old 2017-09-17, 21:00
jmimu's Avatar
jmimu jmimu is offline
Magic Level: Yellow Ball
 
Join Date: Dec 2011
Location: Paris
Posts: 23
Hi!
Here is a new version of the editor: http://jmimu.free.fr/AITD_PakEdit/AI..._win_v0.04.zip
Collada file can be imported to alter hardCols and sceZones (more info in README.md).
Reply With Quote
  #16  
Old 2017-09-20, 20:04
jmimu's Avatar
jmimu jmimu is offline
Magic Level: Yellow Ball
 
Join Date: Dec 2011
Location: Paris
Posts: 23
No, HardCols and SceZones are parts of AITD's rooms.
HardCols are the boxes that represent the obstacles.
SceZones are areas on the floor, like the carpet in the attic, that may represent an event trigger, like a different step sound.
Reply With Quote
  #17  
Old 2017-10-04, 09:18
jmimu's Avatar
jmimu jmimu is offline
Magic Level: Yellow Ball
 
Join Date: Dec 2011
Location: Paris
Posts: 23
Hi, I'm working on background overlay modification, the last thing needed to be able to add or remove obstacles in rooms.
Reply With Quote
  #18  
Old 2017-10-12, 23:38
Tigrou Tigrou is offline
Magic Level: Yellow Ball
 
Join Date: Oct 2017
Posts: 2
@MrQuetch : i don't know what happened to my previous message, it just disappeared. So I re-post it :

I have been working on AITD engine over the last years so I think I can help.

Here is some info about files used in the game (from a note that I wrote previously) :

Quote:
CAMERAXX.PAK : all background camera images (in 320x200 8-bit 256 color). Can be open in photoshop as RAW images.
ENDSEQ.PAK : contains various resources (eg : backgrounds) related to end sequence of the game (after boss is defeated)
ETAGEXX.PAK : room and cameras information. can be open in room viewer.
ENGLISH.PAK : 00000000.dat : english translation for game objects and also user interface/messages
other files are text contained in books.
LISTANIM/LISTANI2.PAK : 3D models skeletal animation (using bones).
LISTBODY/LISTBOD2.PAK : 3D models. Can be open in room viewer.
LISTLIFE.PAK : room scripts
LISTMUS.PAK : music soundtrack (ADL format)
LISTSAMP.PAK : sound samples (8000 Hz 8bit mono VOC files). Can be open in many audio programs like GoldWave.
LISTTRAK.PAK : pre-recorded 2D paths for actors (eg : when player is climbing stairs)
PRESENT.PAK : screenshots of the game shown while it is in attract mode
ITD_RESS.PAK : various GUI/gfx data for the game (eg : menus, fonts, ...)
VARS.ITD/DEFINES.ITD : initial value of internal VARS/CVARS variables used in the game
PRIORITY.ITD : priority of the sound samples. It seems the number of sound samples the game
can play at the same time is limited. Some sound samples have priority over the others.
OBJECTS.ITD : a table with all objects used in the game and their properties (eg : name, room, 3D position, ... )
Some projects you might take a look at :

Free In the Dark (i'm not the original author): you already know about this one. My repository is a fork from somaen. I have made some bugs fixes.

Room viewer : A tool that I made mainly for speedrunning. Among many things, it allows to view room colliders, camera areas and 3D models / animation.

QuickBMS : a tool to extract the PAK files from the game. To use with this script

Last edited by Tigrou; 2017-10-14 at 02:40.
Reply With Quote
  #19  
Old 2017-10-23, 11:52
jmimu's Avatar
jmimu jmimu is offline
Magic Level: Yellow Ball
 
Join Date: Dec 2011
Location: Paris
Posts: 23
Hi,
Thank you Tigrou for the information, it's great to have you here!
I've looked at room viewer, but I'm using wine and have no text displayed.

How did you find out the data formats?
Reply With Quote
  #20  
Old 2018-05-21, 23:57
xesf's Avatar
xesf xesf is offline
Magic Ball Master
 
Join Date: Sep 2002
Location: Dublin
Posts: 7,762
Have a look st the FITD, free in the dark. You should be able to see the code in the residualvm.
__________________
LBA2Remake v0.4.0 released - open source re-implementation of the LBA 2 original engine for the web.
[Play on Browser]|[Changes]|[Github]


The Sacred Carrot website
Reply With Quote
  #21  
Old 2018-06-01, 20:23
kelvinb kelvinb is offline
Magic Level: Yellow Ball
 
Join Date: May 2018
Posts: 4
I believe they only have win32 version, 64bit version available on ubuntu
Reply With Quote
  #22  
Old 2020-04-24, 05:43
hobbestheprince hobbestheprince is offline
Magic Level: Yellow Ball
 
Join Date: Feb 2007
Posts: 3
Sorry for reviving this post but ...

It’s a shame nothing came to fruition on this. I have always wanted to make models that are authentic to the original series with similar tools they used back in the day. Any new info come out about this that I can’t seem to find on here in regards to a model editor or application to at least get the same look?
Reply With Quote
  #23  
Old 2020-04-24, 10:45
xesf's Avatar
xesf xesf is offline
Magic Ball Master
 
Join Date: Sep 2002
Location: Dublin
Posts: 7,762
There are no fully completed tools like we have for LBA.
But here are few things available in github that people can use it to create them.
Search for FITD (free in the dark) and few things will pop.
__________________
LBA2Remake v0.4.0 released - open source re-implementation of the LBA 2 original engine for the web.
[Play on Browser]|[Changes]|[Github]


The Sacred Carrot website
Reply With Quote
Reply

Tags
aitd, editor, fitd, pak

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
About the editor Mazaka151 LbaNet 0 2011-01-26 18:05
All-in-one editor, etc? ContiX LBA Modifications - General 16 2006-09-13 02:27
LBA Savegame Editor (new one) Master Cheater Dear moderators 4 2003-12-06 20:19
The Two Dreams about the one Dark Tower and the one Dark Lord. Gustav Sweden Off topic 6 2003-01-09 22:34
Editor soccerdan2002 General 1 2002-07-26 17:59


All times are GMT +2. The time now is 18:09.


News Feed
Powered by vBulletin®
Copyright ©2000 - 2021, Jelsoft Enterprises Ltd.
Copyright ©2000 - 2021, the Magicball Network