System25 / drxtract

Macromedia Director 5 DRI and DRX files data extractor
GNU General Public License v2.0
22 stars 4 forks source link

Better documentation, or more generic tools #9

Closed malespiaut closed 1 year ago

malespiaut commented 1 year ago

Hello,

I've tried your tools for an old Macromedia Director 4.0.4 game.

All of the resource files are .DXR and not .DRX, so I couldn't use your drxtract tool.

Using the command drxtract pc ../intro.dxr ./ returns the following error:

DEBUG:root:riffxtract pc ../intro.dxr ./
ERROR:root: File format is not XFIR
DEBUG:root:vwlbxtract ./
Traceback (most recent call last):
  File "vwlbxtract", line 75, in <module>
    for f in os.listdir(os.path.join(sys.argv[1], BINDIR)):
FileNotFoundError: [Errno 2] No such file or directory: './bin'
DEBUG:root:fmapxtract ./
Traceback (most recent call last):
  File "fmapxtract", line 163, in <module>
    for f in os.listdir(os.path.join(sys.argv[1], BINDIR)):
FileNotFoundError: [Errno 2] No such file or directory: './bin'
DEBUG:root:casxtract pc ./
ERROR:root: './bin' is not a directory
DEBUG:root:vwscxtract ./
Traceback (most recent call last):
  File "vwscxtract", line 1074, in <module>
    for f in os.listdir(os.path.join(sys.argv[1], BINDIR)):
FileNotFoundError: [Errno 2] No such file or directory: './bin'

I've used ProjectorRays to do that, which produced a lot of .bin files with different names (ie: BITD-100.bin, CLUT-50.bin, `Lscr-93.bin', and so on.).

I've first tried to convert all the BITD-xx.bin files to BMPs with bitd2bmp

bitd2bmp ./ BITD-100.bin

But I got the error message ERROR:root: './data.json' is not a file. Making an empty JSON file with touch data.json will result in another error message: ERROR:root: 'BITD-100.bin' does not end in .BITD. And renaming BITD-100.bin too 100.BITD will just crash bitd2json:

Traceback (most recent call last):
  File "bitd2bmp", line 921, in <module>
    json_data = json.loads(text)
  File "/usr/lib/python3.10/json/__init__.py", line 346, in loads
    return _default_decoder.decode(s)
  File "/usr/lib/python3.10/json/decoder.py", line 337, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/usr/lib/python3.10/json/decoder.py", line 355, in raw_decode
    raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

I don't know what is this data.json file is supposed to be. I thought that it maybe should be generated with clut2json, but this software itself is looking for a data.json.

So my question is the following: can your tools be used to extract content when the DXR have been extracted with another tool? Or could you please have a little write-up about the proper usage of each tools?

System25 commented 1 year ago

Hi Marc, I'll try to document better the different commands when I have time.

These scripts have been created to be used all together and some of them generate files that other needs. For example bitd2bmp needs the data.json that is generated by the casxtract script (the data.json file contains the information of that bitmap in the Director "casting"). And casxtract scripts needs several files with the casting information that should have been extracted by riffxtract from the director file.

In order to use something different from riffxtract you will need to create manually two directories (./bin and ./cas), put every file that is included inside the director file in the ./bin directory and the run drxtract. If everything works you will find the images (and most of the other casting elements) inside the ./cas directory.

But normally the first step is trying with "mac" instead o "pc", because sometimes the Director files that we try to extract were generated by using a Mac instead of a PC.

So please try using "drxtract mac ../intro.dxr ./" and let me know if it works.

Best regards!

System25 commented 1 year ago

Hi Marc, I just documented the commands. Please take a look into: https://github.com/System25/drxtract/wiki/Drxtract-scripts

Best regards