QuickBMS errors [programming, scripting, quickbms.exe tool... NOT games]
-
- Site Admin
- Posts: 12984
- Joined: Wed Jul 30, 2014 9:32 pm
Re: QuickBMS errors [programming, scripting, quickbms.exe tool... NOT games]
Use the latest version of quickbms and then use reimport2.bat.
This new method has some limitations too, it depends by the format of the archive.
This new method has some limitations too, it depends by the format of the archive.
-
- Posts: 2
- Joined: Sun Mar 18, 2018 10:04 pm
Re: QuickBMS errors [programming, scripting, quickbms.exe tool... NOT games]
aluigi wrote:Use the latest version of quickbms and then use reimport2.bat.
This new method has some limitations too, it depends by the format of the archive.
The archive file is data.win. The file including parts for translation is STRG.txt.
Reimport2 doesn't allow to import bigger size file.

-
- Posts: 35
- Joined: Fri Dec 15, 2017 1:42 pm
Re: QuickBMS errors [programming, scripting, quickbms.exe tool... NOT games]
The tool threw me an error when I tried to decompress this data chunk with zlib:
while I can decompress it without problems through HexEdit.
while I can decompress it without problems through HexEdit.
-
- Site Admin
- Posts: 12984
- Joined: Wed Jul 30, 2014 9:32 pm
Re: QuickBMS errors [programming, scripting, quickbms.exe tool... NOT games]
It works perfectly, remember that if you use "comtype zlib" you have also give a decompressed size value which is same/bigger than the real decompressed size, only zlib_noerror and unzip_dynamic do the job automatically:
Code: Select all
comtype zlib_noerror # or unzip_dynamic
get SIZE asize
clog "" 0 SIZE SIZE
-
- Posts: 35
- Joined: Fri Dec 15, 2017 1:42 pm
Re: QuickBMS errors [programming, scripting, quickbms.exe tool... NOT games]
I actually did specified an unzip size but it still gave me the error saying
"Error: the compressed zlib/deflate input is wrong or incomplete (-5)".
This is the code I'm using for the simple test:
However zlib_noerror does work though.
"Error: the compressed zlib/deflate input is wrong or incomplete (-5)".
This is the code I'm using for the simple test:
Code: Select all
comtype zlib
get Name basename
string Name + ".dcp"
get ZSize asize
set Size long ZSize
math Size * 20
clog Name 0 ZSize Size
However zlib_noerror does work though.
-
- Site Admin
- Posts: 12984
- Joined: Wed Jul 30, 2014 9:32 pm
Re: QuickBMS errors [programming, scripting, quickbms.exe tool... NOT games]
Your script is correct but your dump is incomplete so the zlib library returns an error if the input is not perfect, in fact the zlib format has a crc at the end to check the input.
zlib_noerror simply ignores these errors and doesn't consider the decompressed size.
zlib_noerror simply ignores these errors and doesn't consider the decompressed size.
-
- Posts: 35
- Joined: Fri Dec 15, 2017 1:42 pm
Re: QuickBMS errors [programming, scripting, quickbms.exe tool... NOT games]
aluigi wrote:in fact the zlib format has a crc at the end to check the input.
I never knew that before. That will make sense. The file I'm dealing with has no fields about the compressed size or unzip size while HexEdit will crash if I decompress the whole compressed chunk directly, so I have to perform a decompression on every piece of data splitted by the zlib magic "\x78\x01" in this case. Guess I'd have to use the noerror method then.
-
- Site Admin
- Posts: 12984
- Joined: Wed Jul 30, 2014 9:32 pm
Re: QuickBMS errors [programming, scripting, quickbms.exe tool... NOT games]
or you can just use offzip on the whole data/memory and it will do the job for you automatically, it's just its primary purpose 
http://aluigi.altervista.org/mytoolz.htm#offzip

http://aluigi.altervista.org/mytoolz.htm#offzip
-
- Posts: 35
- Joined: Fri Dec 15, 2017 1:42 pm
Re: QuickBMS errors [programming, scripting, quickbms.exe tool... NOT games]
I was wondering if it would perform a complete decompression either method.
-
- Posts: 18
- Joined: Tue May 29, 2018 9:07 pm
Re: QuickBMS errors [programming, scripting, quickbms.exe tool... NOT games]
There's a bug with arrays. If you use a different name (not value, name) as accessor index from any names that were used to initialize it, it won't work properly.
To elaborate, this will work:
This will not work:
To elaborate, this will work:
Code: Select all
set ID long 0
set TEST[ID] string "pootis"
set POOTIS TEST[ID]
This will not work:
Code: Select all
set ID long 0
set TEST[ID] string "pootis"
set IX long 0
set POOTIS TEST[IX]
-
- Site Admin
- Posts: 12984
- Joined: Wed Jul 30, 2014 9:32 pm
Re: QuickBMS errors [programming, scripting, quickbms.exe tool... NOT games]
There are 2 bugs in those scripts:
- the variable with name pootis and the constant string "pootis" can't coexist
- that feature you are using there is not the (get/put/sort)array one, that's the experimental multi-dimensional array which works in a different way in which the multiple dimensions (VAR[X][Y][Z][W]) are possible by using a trick. long story short TEST[ID] and TEST[IX] are two completely different things
- the variable with name pootis and the constant string "pootis" can't coexist
- that feature you are using there is not the (get/put/sort)array one, that's the experimental multi-dimensional array which works in a different way in which the multiple dimensions (VAR[X][Y][Z][W]) are possible by using a trick. long story short TEST[ID] and TEST[IX] are two completely different things
-
- Posts: 218
- Joined: Wed Jul 19, 2017 5:04 am
Re: QuickBMS errors [programming, scripting, quickbms.exe tool... NOT games]
Hello Aluigi
i have a question...
i want to start Scripting with QuickBMS, i just know (Lua), how can i start and Learn to write bms scripts?
i have a question...
i want to start Scripting with QuickBMS, i just know (Lua), how can i start and Learn to write bms scripts?
-
- Site Admin
- Posts: 12984
- Joined: Wed Jul 30, 2014 9:32 pm
Re: QuickBMS errors [programming, scripting, quickbms.exe tool... NOT games]
The bms language is extremely simple, most of the work is reverse engineering the file formats for which you usually need a hex editor.
My suggestion is to take a look at the various scripts written for the various samples provided on the forum.
Every script shorter than 10 lines is a good candidate for learning
My suggestion is to take a look at the various scripts written for the various samples provided on the forum.
Every script shorter than 10 lines is a good candidate for learning

-
- Posts: 1
- Joined: Wed Jul 04, 2018 12:58 pm
Re: QuickBMS errors [programming, scripting, quickbms.exe tool... NOT games]
what does -m3 means on make?? i dont have that it throws error
thread -lssl -lcrypto -DDISABLE_MCRYPT -DDISABLE_TOMCRYPT -ldl
cc: error: unrecognized command line option '-m3'make: *** [Makefile:43: all] Error 1
I think my question is cc you put -m3 whats that?
ah its m32 i cant built this on my 64 bit.. because you state it cause problem on 64 bit natively.. hmm
thread -lssl -lcrypto -DDISABLE_MCRYPT -DDISABLE_TOMCRYPT -ldl
cc: error: unrecognized command line option '-m3'make: *** [Makefile:43: all] Error 1
I think my question is cc you put -m3 whats that?
ah its m32 i cant built this on my 64 bit.. because you state it cause problem on 64 bit natively.. hmm
-
- Site Admin
- Posts: 12984
- Joined: Wed Jul 30, 2014 9:32 pm
Re: QuickBMS errors [programming, scripting, quickbms.exe tool... NOT games]
You can try removing -m32, it will work without problems.
I use -m32 in Makefile for being sure that there are no problems with some external code (pre-compiled functions and so on) and for sharing the resulting binary on the website.
I use -m32 in Makefile for being sure that there are no problems with some external code (pre-compiled functions and so on) and for sharing the resulting binary on the website.
-
- Posts: 561
- Joined: Tue Oct 13, 2015 1:26 pm
Re: QuickBMS errors [programming, scripting, quickbms.exe tool... NOT games]
How suppress the "Press ENTER or close the window to quit" message?
-
- Site Admin
- Posts: 12984
- Joined: Wed Jul 30, 2014 9:32 pm
-
- Posts: 5
- Joined: Thu Aug 09, 2018 12:32 pm
Re: QuickBMS errors [programming, scripting, quickbms.exe tool... NOT games]
moderate to another room, thanks
Last edited by abcdekabcd on Fri Aug 10, 2018 1:08 am, edited 1 time in total.
-
- Site Admin
- Posts: 12984
- Joined: Wed Jul 30, 2014 9:32 pm
Re: QuickBMS errors [programming, scripting, quickbms.exe tool... NOT games]
As written in the title of the topic where you are posting... "NOT games", so you are OT.
Anyway some games that use that nxpk format have their files encrypted and therefore you can't extract them.
Anyway some games that use that nxpk format have their files encrypted and therefore you can't extract them.
-
- Posts: 4
- Joined: Sun Aug 19, 2018 5:24 pm
Re: QuickBMS errors [programming, scripting, quickbms.exe tool... NOT games]
off-topic, moved
Last edited by haiwood on Mon Aug 20, 2018 7:16 pm, edited 1 time in total.