Users browsing this thread: 10 Guest(s)
[TUTORIAL] Making BMS Scripts; Post and get help with your BMS scripts!
1.) Yeah, I kinda meant that. When decoding you have to put in the full name (i.e: mainmenuJapanese.txt)
2.) I should have mentioned that you need a Unicode-able text editor in order to edit the text files. Notepad++ does the job just fine.
3.) Not much I can do about the line break character issue. Due to the way line breaks work it'd mess up re-encoding pretty badly if I set it up to insert the character automatically. For now, use the character you've been using.
4.) Thanks for reporting the issue! Fixed it. Re-download it from the same link before and it should get all the text now.

I definitely love seeing the progress you've made on this project. Hopefully once complete you'll release it so everyone can use it!
Reply
Thanked by:
(05-08-2017, 04:47 PM)ThatTrueStruggle Wrote: 3.) Not much I can do about the line break character issue. Due to the way line breaks work it'd mess up re-encoding pretty badly if I set it up to insert the character automatically. For now, use the character you've been using.
4.) Thanks for reporting the issue! Fixed it. Re-download it from the same link before and it should get all the text now.

I definitely love seeing the progress you've made on this project. Hopefully once complete you'll release it so everyone can use it!

Hello ThatTrueStruggle!

3.- Really not a problem!
4.- The new version worked and extracted all the text lines now from the "mainmenu" file.  But tryed in other ".mtx" files that are larger than the "mainmenu" one and chashed...  Showing the next message:

[Image: MTX2_TXT_Fail.png]

I tried the first version of MTX2TXT with these larger files (Don't know if being larger is the problem) and extracted some text but not all (The same issue as before), also the extracted text with the 1st version of MTX2TXT shows the next:

[Image: MTX2_TXT_Fail_02.png]

Here are the "larger" mtx files mentioned above: Download (FYI: This files are related to the lesson section in the game).

Thanks in advance.



The main menu is done (text and textures). Right now I'm transcribing the lesson section, it took me 4 hours to complete the first of three sections.  I think I'll do one per day.  Once I finish these, I can share with you the "Patch" if you want to test it.  Eventually, everything will be translated and of course, shared with the world to enjoy.

Quote:"Nothing for me that does not be for others" - Alejandro Jodorowsky



UPDATE:
Hello @ThatTrueStruggle! could you share the source code for MTX2TXT? So I can invest some time studying it and work with it.  Thanks in advance!!

zL
Reply
Thanked by:
But how I can use this script? And I want a stage model, how can I rip it?
Reply
Thanked by:
(05-25-2017, 02:40 PM)verdecillo66 Wrote: But how I can use this script? And I want a stage model, how can I rip it?

For which game you want to rip the stage model?  Try to give all the information you can about your situation, this post could have been the answer you are looking for.


zL
Reply
Thanked by:
What to do if header format is not so simple?

I have archive, where I can manually find (by signature) files (video) start and end but I can't find any pointer/offset/size. There is list of file names, but I can't find pointer/offset to file names or to start of list. Also, files in archive stored in alphabetical order, but in list order is different. Only clear number I found in header is number of files @ offset 0x14

Example file: http://www.mediafire.com/file/3xjxxyrr6a...rchive.unk
File names list in this archive located @ CC40 offset.
Reply
Thanked by:
Hello, Struggle.

i just followed your tutorial and tried to test extracting it, and something like this occur.

[Image: swDHKJ2.png]

i don't know if it was intention or some... well, i very new to this kind of BMS scripting. but somehow it managed to extract this files.
[Image: LUseZxT.png]

Anyway, great tutorial there. Though I may bit overwhelmed with some instructions. Unsure 

I just looking at some of the BMS script and compare to this, I can assume, that tutorial is beginner-level.
Current Project:

Detective Conan: Legacy of the British Empire (PS2)
Ar Tonelico: Melody of Elemia (PS2)
Half-Life (PC)
Reply
Thanked by:
(06-09-2017, 11:39 AM)PASAf Wrote: What to do if header format is not so simple?

I have archive, where I can manually find (by signature) files (video) start and end but I can't find any pointer/offset/size. There is list of file names, but I can't find pointer/offset to file names or to start of list. Also, files in archive stored in alphabetical order, but in list order is different. Only clear number I found in header is number of files @ offset 0x14

Example file: http://www.mediafire.com/file/3xjxxyrr6a...rchive.unk
File names list in this archive located @ CC40 offset.

The only thing I can tell you is that the files are compressed zlib files inside that archive.
Reply
Thanked by:
Hey there, I followed your tutorial and made the example script for the KYP format, and that was definitely a success, but I'm trying to do the same thing for the Legend of Korra's DAT files, which contain the models and textures for the game. I'm definitely not experienced at all when it comes to coding or scripting, so I essentially just renamed the file name in the script from KYP\x00 to DAT\x00 and tried it out as a quick test, but I can't extract anything from the .DAT file.

Here is a screenshot of the .DAT file opened up in a Hex editor (HxD, the one you linked in the tutorial) and a screenshot of my QuickBMS script loaded in QuickBMS (with the GUI). I also have attached the .DAT file and the script to my comment. The tutorial is really good, I just need some help figuring this stuff out.

The .DAT file I'm using as a example for my script
[Image: IcKjrm2l.png]

The script. At this point I've basically only changed the file format from the example script for the KYP files.
[Image: CT28eQxl.png]

https://drive.google.com/open?id=0B1CHDA...FJXUHZJb2s (Legend of Korra Platinum Studios .DAT Extract)

https://drive.google.com/open?id=0B1CHDA...EFiMFNqMWM (pl0000.dat)
Reply
Thanked by:
Code:
# The Legend of Korra *.DAT
# Written By Anex For QuickBMS

idstring "DAT\x00"
get FCOUNT long
xmath CHECK "FCOUNT - 0x1"
get HEADERSIZE long
get FOLDNAMPOINTER long
get FNAMEPOINTER long
goto HEADERSIZE
savepos OFFTABLE
goto FNAMEPOINTER
get FNSIZE long
savepos FNAMETB

for i = 0 < FCOUNT
    getdstring NAME FNSIZE
    savepos FNAMETB
    goto OFFTABLE

if i == CHECK
  get OFFSET long
  goto OFFSET
  goto 0 0 SEEKEND
  savepos OFF2
  xmath SIZE "OFF2 - OFFSET"    
else
  get OFFSET long
  get OFF2 long
  xmath SIZE "OFF2 - OFFSET"
  math OFFTABLE + 0x4
endif
    log NAME OFFSET SIZE
    goto FNAMETB
next i

You can't just take the KYP script and change the first value to "DAT\x00". This archive is a completely different format than the KYP test archive.
Reply
Thanked by:
(06-19-2017, 02:00 PM)Pingu! Wrote: You can't just take the KYP script and change the first value to "DAT\x00". This archive is a completely different format than the KYP test archive.

Ah okay, sorry I'm very new at this. I wasn't sure what to do so I figured I'd start by at trying to adapt the example script. Sorry about that. So is the above script in your post a better example of what I need to do?

Edit: And holy shit that script did the trick, it extracted everything from .Dat files! Thank you so much! I'll keep learning how to make these scripts, because I want to get the model files from these old Avatar games for the PS2, but thank you.
Reply
Thanked by: Pingus!
Sad 
Hello all, i am having some trouble with 3 different files from the world renowned critically acclaimed best-seller MiNi NiNJAS. I tried making some scripts, but they did really nothing and i had no idea what i was doing. I tried my best to follow the guide, but could really never decipher what the first four bytes were. 

I am trying to open the PRM, ANM and TEX files from the game to figure out where the 3d models are and to eventually make a tex unpacker/repacker.

 Could anyone help me in creating a code or explaining what i need to do? 

example file link
Reply
Thanked by:
(06-21-2017, 03:19 PM)Evidence.7z Wrote: Hello all, i am having some trouble with 3 different files from the world renowned critically acclaimed best-seller MiNi NiNJAS. I tried making some scripts, but they did really nothing and i had no idea what i was doing. I tried my best to follow the guide, but could really never decipher what the first four bytes were. 

I am trying to open the PRM, ANM and TEX files from the game to figure out where the 3d models are and to eventually make a tex unpacker/repacker.

 Could anyone help me in creating a code or explaining what i need to do? 

example file link
I have looked into the file using Notepad++ and it doesn't have a header, it just jumps into the DDS files it contains, and they all seem to be in DXT1 if that helps.
Reply
Thanked by:
In latency terms, they're headerless DDS files with DXT1 compression. So, I think the header needs to be recreated.
Reply
Thanked by:
Tongue 
Hi!  I'm sorry my first post on the site is to ask for help even after that fantastic tutorial you've put up...but...we both know what this is unfortunately.  Tongue  I spent about 4 hours working through your guide and tried 2 different hex editors to make sure my notepad+ plugin wasn't messing things up but I cannot seem to find out anything about the file archives that Divinity 2 Developer's Cut comes with.  The older versions of this game had working file pack/unpackers, those do not work on the new versions of the files since they repackaged the game for this special edition.  My husband is a pretty good scripter/programmer and spent a few hours looking into this as well with no luck.  I have found that the first sets of 4 chunks are the same in every file.  
05 00 00 00 01 00 00 00 04 00 00 00
It has a file list on the side, and that's pretty much all I can tell.  Was wondering if you could take a look at the smallest of the archive files and give us a clue on how to write this script?  It's only 96KB so I thought it'd be the easiest to peek into.  https://drive.google.com/open?id=0B6eDWb...VBaaTVwZmc  If you get time to look thank you very much, if not I'll survive.  I've made a few little mods for some other games and was just hoping to see what I could spice up in this one.
Reply
Thanked by:
(07-30-2017, 07:48 PM)SaraGames Wrote: Hi!  I'm sorry my first post on the site is to ask for help even after that fantastic tutorial you've put up...but...we both know what this is unfortunately.  Tongue  I spent about 4 hours working through your guide and tried 2 different hex editors to make sure my notepad+ plugin wasn't messing things up but I cannot seem to find out anything about the file archives that Divinity 2 Developer's Cut comes with.  The older versions of this game had working file pack/unpackers, those do not work on the new versions of the files since they repackaged the game for this special edition.  My husband is a pretty good scripter/programmer and spent a few hours looking into this as well with no luck.  I have found that the first sets of 4 chunks are the same in every file.  
05 00 00 00 01 00 00 00 04 00 00 00
It has a file list on the side, and that's pretty much all I can tell.  Was wondering if you could take a look at the smallest of the archive files and give us a clue on how to write this script?  It's only 96KB so I thought it'd be the easiest to peek into.  https://drive.google.com/open?id=0B6eDWb...VBaaTVwZmc  If you get time to look thank you very much, if not I'll survive.  I've made a few little mods for some other games and was just hoping to see what I could spice up in this one.

Hey no worries! This file is decently difficult if you're new to this kind of extraction, and it's really no problem that you guys didn't figure it out. The files were compressed using ZLIB compression, and the data offsets were a little tricky. Here's a script for the program QuickBMS to extract the files:

Code:
# Divinity II: Developer's Cut *.dv2
# Written By Anex For QuickBMS

get NULL longlong
get NULL long
get NULL short
get DATASTART long
get FTBSIZE long
savepos FNAMETABLE
getdstring SKIP FTBSIZE
get FCOUNT long
savepos OFFTABLE
comtype ZLIB

for i = 0 < FCOUNT
    goto FNAMETABLE
    get NAME string
    savepos FNAMETABLE
    goto OFFTABLE
    get DATAOFF long
    get ZSIZE long
    get SIZE long
    xmath OFFSET "DATASTART + DATAOFF"
    savepos OFFTABLE
    clog NAME OFFSET ZSIZE SIZE
next i

Just copy and paste the code into a text document and save it to your desktop. Grab QuickBMS, which can be found here, and follow the extraction tutorial inside of it. It's pretty self explanatory Tongue. If this script doesn't work on any other archives (please test them!), feel free to respond here, and please upload the archives that aren't compatible with the script, and I'll try to fix it up. Good luck!

~Pingu!
Reply
Thanked by: SaraGames


Forum Jump: