# The Legend of Heroes: Trails in the Sky (DAT/DIR format) # # Written by Ekey (h4x0r) # # open DIR file for unpack # script for QuickBMS http://quickbms.aluigi.org
open FDDE DAT 0 open FDDE DIR 1
idstring "LB DIR" 1 goto 0x10 1
for getdstring NAME 16 1 get ZSIZE long 1 get SIZE long 1 get SIZE2 long 1 get CRC32 long 1 get OFFSET long 1
if NAME == "/_______.___" cleanexit endif
if ZSIZE == 0 log NAME OFFSET SIZE 0 else if ZSIZE == SIZE log NAME OFFSET SIZE 0 else #unknown compression :/ log NAME OFFSET ZSIZE 0 endif next
idstring "LB DAT" goto 0x10 get OFFSET long for get NEXT_OFFSET long if NEXT_OFFSET == 0 break endif xmath SIZE "NEXT_OFFSET - OFFSET" log "" OFFSET SIZE math OFFSET = NEXT_OFFSET next
idstring "LB DAT" goto 0x10 get OFFSET long for get NEXT_OFFSET long if NEXT_OFFSET == 0 break endif xmath SIZE "NEXT_OFFSET - OFFSET" log "" OFFSET SIZE math OFFSET = NEXT_OFFSET next
Thanks a lot , however, bms script can't get unzip the data because there are no SIZE values. https://www.sendspace.com/file/6wtuwb Although there are no SIZE valuse in dat files, is it possible to get SIZE values and unpack it by bms script?
Last edited by sigroon365 on Tue Nov 25, 2014 5:34 am, edited 4 times in total.
The script works with any game of Nihon Falcom that uses the same "LB DIR/DAT" format, so Dinosaur Resurrection too The TODO list of the next quickbms is quite big now so it's probably the right moment to start to implement everything and pushing the new version in the next weeks.