XeNTaX Forum Index
Forum MultiEx Commander Tools Tools Home
It is currently Tue Sep 26, 2017 12:19 pm

All times are UTC + 1 hour




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: [IKS] Dexter’s Laboratory – Mandark’s Lab - research & tools
PostPosted: Tue Mar 07, 2017 10:16 am 
Offline
mega-veteran
mega-veteran
User avatar

Joined: Thu Jul 26, 2012 5:06 pm
Posts: 222
Location: Poland, Łódź
Has thanked: 286 times
Have thanks: 68 times














You can make the ads go away by registering

Hello. I have written a set of functions in Python, which allows you to extract/replace text and graphics from game Dexter’s Laboratory – Mandark’s Lab.
This article will have 3 sections: Research info, translation tips and tool description.

* Research info *

Main archive is a DATA.BIN file, which contains everything except STR movies.
Code:
BIN file format:
4 bytes - number of files

//file entry
16 bytes - filename + padding
4 bytes - file size
4 bytes - file offset / 0x800


//file
x bytes - data
108 bytes - padding


For BIN file the best option is to use quickBMS script from aluigi:
Code:
# Dexter's Lab - Mandark's Lab?
# script for QuickBMS http://quickbms.aluigi.org

get FILES long
for i = 0 < FILES
    getdstring NAME 0x10
    get SIZE long
    get OFFSET long
    math OFFSET *= 0x800
    log NAME OFFSET SIZE
next i




TEX files are graphics which appears before each mission in the game.
Code:
TEX file format:
4 bytes - magic
2 bytes - width
2 bytes - height
x bytes - image data


TIM files are graphics which appears when game starts (ex. warner bros logo)
Code:
TIM file format:
8 bytes - magic
4 bytes - data size
4 bytes - ?
2 bytes - width
2 bytes - height
x bytes - image data


GEC files are graphics that appears on the screen when we are playing any mission in game.
I haven't finished research of this format so it is incomplete.
Code:
GEC file format:
//header
12 bytes - file name
4 bytes -  offset of number of images
4 bytes - offset of table of image offsets
4 bytes - offset garbage data
4 bytes - offset image data array
4 bytes - image data offset
2 bytes - number of images
2 bytes - ? (5dec)
2 bytes - ? (52dec)
2 bytes - ? (32dec)

//image offsets?
number of images*4 bytes - offset of image

//palette data???
x bytes - palette data

//graphic info array
8 bytes - image name
24 bytes - ???

//image data
number of images*x bytes - data




* Translation tips *

You can check polish translation here http://ikskoks.pl/dexters-laboratory-ma ... lszczenie/

DATA.BIN file: Just use aluigi's quick bms script for extracting and inserting files to main archive
TEX files: Extraxt tex file by tex_to_dds function, edit it in gimp, save image as A1RGB5 format and insert it by dds_to_tex function.
TIM files: as above, but use tim_to_dds and dds_to_tim functions.
STR files: I had troubles with replacing audio in these files. I tried to use STR Converter 1.1 but with no luck. But it is possible to replace movies (with no sounds). If someone has a way to replace audio here, please contact me.
BIN files: There is some text in bin level files. You can replace text in them easily by hex editor.
Dialogues: voice audio is mostly in separate BIN audio track. You can extraxt PCM audio using CDMage and Extractr.NET
GEC files: I think that it is possible to replace GEC images, but it aquire time to write good tool for that.
CUT files: in here you can find all cutscenes between missions.
SND/XND files: sound files, maybe they can be extracted by VAG/VAB/STR tools, but I haven't tried. PSound can play them.

There are also other files like BDT, GEL, LVL, REL, TCP, VRM and TOC but I haven't payed too much attention to them :p

* Tool description *
My tool has several functions that can be used in easy way.
Just go to the end of the script, uncomment function which you want to use and specify a valid path.

List of functions:
unpack_dexter - unpack DATA.BIN file
pack_dexter - unused
unpack_cut_files - extract almost all texts from game
pack_cut_files - packs text to game
tex_to_dds - extracts TEX images
dds_to_tex - imports TEX images
tim_to_dds - extracts TIM images
dds_to_tim - imports TIM images
gec_to_dds - partially extracts GEC images (this function isn't finished)


Attachments:


You do not have the required permissions to view the files attached to this post. Register to gain access.


_________________
http://ikskoks.pl/
https://www.facebook.com/ikskoks
Image


Last edited by ikskoks on Wed May 03, 2017 10:58 am, edited 1 time in total.

Top
 Profile  
 
 Post subject: Re: [IKS] Dexter’s Laboratory – Mandark’s Lab - research & t
PostPosted: Wed Mar 15, 2017 1:29 am 
Offline
veteran

Joined: Fri Mar 30, 2012 4:56 pm
Posts: 105
Has thanked: 11 times
Have thanks: 0 time
do you happen to know which files the models are stored in?


Top
 Profile  
 
 Post subject: Re: [IKS] Dexter’s Laboratory – Mandark’s Lab - research & t
PostPosted: Wed Mar 15, 2017 8:31 am 
Offline
mega-veteran
mega-veteran
User avatar

Joined: Thu Jul 26, 2012 5:06 pm
Posts: 222
Location: Poland, Łódź
Has thanked: 286 times
Have thanks: 68 times
Sorry, I have no idea. :p

_________________
http://ikskoks.pl/
https://www.facebook.com/ikskoks
Image


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group