Having problems with injecting g1t Textures into Linkdata.bin (GUST /Koei/Tecmo)

BennyXCross

Well-Known Member
Newcomer
Joined
Sep 5, 2015
Messages
51
Reaction score
9
Trophies
0
XP
388
Country
Germany
Hello!
How do I inject the texture? Is there some kind of folder structure inside the LINKDATA.BIN? Because when I tried it, it just added the.g1t texture to the .BIN and the file size increased and it wasn't recognized inside the game (Dragon Quest Builders 2). Or do I have to rename the texture to .dat (though that also didn't work and it was added to the file size). I want to replace the texture inside the .BIN with my texture :\
 
Okay I've read a bit and that the file size increases is seemingly not a problem.
And it seems I have to recompress the g1t file again, but how do I do that? Arslan.bms unfortunately doesn't support reimporting. Maybe someone can help with writing a reimport-script or got a link to something like that?

Here's the script:

# Arslan: The Warriors of Legend / Dragon Quest Heroes (linkdata.idx/bin) (script 0.2.1)
# script for QuickBMS http://quickbms.aluigi.org

open FDDE "IDX"
open FDDE "BIN" 1

goto 0xc # guess the endianess by checking the SIZE field
get TMP long
goto 0
if TMP != 0
endian big
endif

get BIN_SIZE asize
for BIN_OFF = 0 != BIN_SIZE
get OFFSET longlong
get SIZE longlong
get ZSIZE longlong
get ZIP longlong
savepos BIN_OFF

if SIZE != 0
if ZIP == 0
log "" OFFSET SIZE 1
else
goto OFFSET 1
get CHUNK_SIZE long 1
get CHUNKS long 1
get SIZE long 1

math MODE = 0
comtype zlib
if CHUNK_SIZE == 0xffffffff
math MODE = 1
comtype deflate
math CHUNK_SIZE = 0x10000
endif

for x = 0 < CHUNKS
get CHUNK_ZSIZE long 1
putarray 0 x CHUNK_ZSIZE
next x

putvarchr MEMORY_FILE SIZE 0
log MEMORY_FILE 0 0
append
math PADDING_OFFSET = OFFSET
for x = 0 < CHUNKS
padding 0x80 1 PADDING_OFFSET
savepos PADDING_OFFSET 1
getarray CHUNK_ZSIZE 0 x
get MEM_SIZE asize MEMORY_FILE
math MEM_SIZE + CHUNK_ZSIZE
if MEM_SIZE == SIZE
savepos OFFSET 1
log MEMORY_FILE OFFSET CHUNK_ZSIZE 1
else
if MODE == 0
get CHUNK_ZSIZE long 1
endif
savepos OFFSET 1
clog MEMORY_FILE OFFSET CHUNK_ZSIZE CHUNK_SIZE 1
endif
goto CHUNK_ZSIZE 1 SEEK_CUR
next x
append
log "" 0 SIZE MEMORY_FILE
endif
endif
next
 

Site & Scene News

Popular threads in this forum