QuickBMS errors [programming, scripting, quickbms.exe tool... NOT games]
-
- Posts: 416
- Joined: Sat Sep 15, 2018 5:22 am
Re: QuickBMS errors [programming, scripting, quickbms.exe tool... NOT games]
deflate fails in The Evil Within, but i found out that new winrar versions of winrar can decode it as well, problem is old file i guess. some games using old library (i'm using a old version of winrar, becuase it's faster)
kzip_deflate_compress fails too, compressed file is same as deflate
but ZOPFLI_DEFLATE_COMPRESS worked in both game and winrar!
and one other thing, zlib still fails in games, there is a dll that called Ionic.Zip and it's working on most of games, can you add it to QuickBMS, sir aluigi?
kzip_deflate_compress fails too, compressed file is same as deflate
but ZOPFLI_DEFLATE_COMPRESS worked in both game and winrar!
and one other thing, zlib still fails in games, there is a dll that called Ionic.Zip and it's working on most of games, can you add it to QuickBMS, sir aluigi?
-
- Site Admin
- Posts: 12984
- Joined: Wed Jul 30, 2014 9:32 pm
Re: QuickBMS errors [programming, scripting, quickbms.exe tool... NOT games]
Is that problem happening only with The Evil Within?
How did you test the data compressed by quickbms with Winrar?
How did you test the data compressed by quickbms with Winrar?
-
- Posts: 416
- Joined: Sat Sep 15, 2018 5:22 am
Re: QuickBMS errors [programming, scripting, quickbms.exe tool... NOT games]
winrar compressed binary works on the game, but QuickBMS not
and there is same problem with zlib too
can you add a official version of those compression libraries?
and there is same problem with zlib too
can you add a official version of those compression libraries?
-
- Site Admin
- Posts: 12984
- Joined: Wed Jul 30, 2014 9:32 pm
Re: QuickBMS errors [programming, scripting, quickbms.exe tool... NOT games]
If the problems happen only with that game... there are no probems
That game is a problem itself since even the zlib library returns errors with its compressed data.
So do you have problems with other games? If yes, what games?
I don't know what you mean with "official versions" since zlib and deflate are just standard algorithms with various implementations of different libraries and some settings.
AdvanceCOMP uses code from the old 7-zip and is used in MAME and other software:
https://en.wikipedia.org/wiki/AdvanceCOMP
zlib.dat is produced by its old version since now it relies on zopfli.
That game is a problem itself since even the zlib library returns errors with its compressed data.
So do you have problems with other games? If yes, what games?
I don't know what you mean with "official versions" since zlib and deflate are just standard algorithms with various implementations of different libraries and some settings.
AdvanceCOMP uses code from the old 7-zip and is used in MAME and other software:
https://en.wikipedia.org/wiki/AdvanceCOMP
zlib.dat is produced by its old version since now it relies on zopfli.
-
- Posts: 416
- Joined: Sat Sep 15, 2018 5:22 am
Re: QuickBMS errors [programming, scripting, quickbms.exe tool... NOT games]
some games using customized zlib, i think thats the reason
and can you add a reserved variable for reimport mode?
if reimport enabled, then IMPORT_MODE = 1
and can you add a command similar to log, but just for injecting binary into the file?
(with injecting from MEMORY_FILE support too)
im not talking about reimport features
just a simple command for injecting binary, no reversing or imporing and variable operators, to use in export mode too, please accept it
it could be verry useful
i know that it's possible to do it in reimport mode, but it's good to have similar thing in export mode too
your program is a powerful generic tool. this is really needed
thank you sir aluigi
and can you add a reserved variable for reimport mode?
if reimport enabled, then IMPORT_MODE = 1
Code: Select all
if IMPORT_MODE = 1
math OFFSET x 2048
endif
and can you add a command similar to log, but just for injecting binary into the file?
Code: Select all
inject NANE OFFSET SIZE
im not talking about reimport features
just a simple command for injecting binary, no reversing or imporing and variable operators, to use in export mode too, please accept it
it could be verry useful
i know that it's possible to do it in reimport mode, but it's good to have similar thing in export mode too
your program is a powerful generic tool. this is really needed
thank you sir aluigi
-
- Site Admin
- Posts: 12984
- Joined: Wed Jul 30, 2014 9:32 pm
Re: QuickBMS errors [programming, scripting, quickbms.exe tool... NOT games]
What games?
Now I use a different library for compressing data instead of advancecomp, I uploaded only quickbms.exe here:
https://aluigi.altervista.org/beta/quickbms_exe.zip
Please use the zlib.dat script and let me know if that's ok.
Currently I don't see how I can implement something like that import_mode/inject thing for various reasons.
Now I use a different library for compressing data instead of advancecomp, I uploaded only quickbms.exe here:
https://aluigi.altervista.org/beta/quickbms_exe.zip
Please use the zlib.dat script and let me know if that's ok.
Currently I don't see how I can implement something like that import_mode/inject thing for various reasons.
-
- Posts: 416
- Joined: Sat Sep 15, 2018 5:22 am
Re: QuickBMS errors [programming, scripting, quickbms.exe tool... NOT games]
game like LIMBO, The Evil Within 1 & 2, ps2 game such as ghost rider, ps3 like life is strange, splinter cell, valiant heart
except The Evil Within and LIMBO, rest of them can works fine with ZOPFLI
and about that command, it's really useful to have a injector on export mode, for creating a file from scratch or some file editing if we want to do it with hand totally, sometimes i need to dump some files when i write a importer script, and there is same story when i want to use a exporter, but i just want to export a file and replace a binary at same time, it just really annoying, i just have to choose between import or export at one script, i get this problem many times and i have to make same copy of script with different name and just for a little change, and when i want to update a part of code, i have to edit many other bms files too, maybe you seeing this as a unnecessary command, but it helps a lot to have some option in exporting and importing at once, i know reversing is not easily in such case, but i'm talking about a command without any reverse features and just for injecting binary within a file with increasing and enlarging input file
many times i had to make same script just for a little change
please accept it sir aluigi, i know you can done this with making same functions of reimport3
dump NAME OFFSET SIZE
inject NAME OFFSET SIZE
except The Evil Within and LIMBO, rest of them can works fine with ZOPFLI
and about that command, it's really useful to have a injector on export mode, for creating a file from scratch or some file editing if we want to do it with hand totally, sometimes i need to dump some files when i write a importer script, and there is same story when i want to use a exporter, but i just want to export a file and replace a binary at same time, it just really annoying, i just have to choose between import or export at one script, i get this problem many times and i have to make same copy of script with different name and just for a little change, and when i want to update a part of code, i have to edit many other bms files too, maybe you seeing this as a unnecessary command, but it helps a lot to have some option in exporting and importing at once, i know reversing is not easily in such case, but i'm talking about a command without any reverse features and just for injecting binary within a file with increasing and enlarging input file
many times i had to make same script just for a little change
please accept it sir aluigi, i know you can done this with making same functions of reimport3
dump NAME OFFSET SIZE
inject NAME OFFSET SIZE
-
- Site Admin
- Posts: 12984
- Joined: Wed Jul 30, 2014 9:32 pm
Re: QuickBMS errors [programming, scripting, quickbms.exe tool... NOT games]
So is the zlib.dat generated by the new quickbms.exe ok with those games?
It's a different library.
For the "inject" command I doubt I can do anything because what you pasted means:
dump NAME OFFSET SIZE: I guess you mean log, so extract the file on the output folder
inject NAME OFFSET SIZE: get the file NAME from the output folder (???) and reimport it
Doesn't have any sense in this way, it would dump and reinject the same file and in any case the files are dumped and taken from the same output folder.
Then why should you change the scripts?
The reimport mode is made just to not change any script.
It's a different library.
For the "inject" command I doubt I can do anything because what you pasted means:
dump NAME OFFSET SIZE: I guess you mean log, so extract the file on the output folder
inject NAME OFFSET SIZE: get the file NAME from the output folder (???) and reimport it
Doesn't have any sense in this way, it would dump and reinject the same file and in any case the files are dumped and taken from the same output folder.
Then why should you change the scripts?
The reimport mode is made just to not change any script.
-
- Posts: 416
- Joined: Sat Sep 15, 2018 5:22 am
Re: QuickBMS errors [programming, scripting, quickbms.exe tool... NOT games]
you got this totally wrong sir aluigi, that not what i meant
dump {NAME} {OFFSET} {SIZE}
a command that able to dump files even if reimport mode enabled
inject {NAME} {OFFSET} {SIZE}
to injecting file without any reimport features, just like opening hex editor and replace some byte
(no size or offset block rewriting/updating)
REIMPORT_MODE
a reserved variable, set to 1 if reimport mode enabled, if not, then set to 0
http://www.mediafire.com/file/ci1lbcjli ... p.zip/file
please download this file, it will clear everything, i know it will be a unused command in many cases, but it's not! please and please add these 3 options to QuickBMS
i know reimport mode created for reversing and maybe it's look like that i'm saying this like a child and i didn't think on many things, but that's not true
we can have reversing and exporting options at one script (reversing and editing, not just importing)
QuickBMS is so automatically, that's what i meant, i hope you understand with take a good looking at pk_injection_crc.bms
dump {NAME} {OFFSET} {SIZE}
a command that able to dump files even if reimport mode enabled
inject {NAME} {OFFSET} {SIZE}
to injecting file without any reimport features, just like opening hex editor and replace some byte
(no size or offset block rewriting/updating)
REIMPORT_MODE
a reserved variable, set to 1 if reimport mode enabled, if not, then set to 0
http://www.mediafire.com/file/ci1lbcjli ... p.zip/file
please download this file, it will clear everything, i know it will be a unused command in many cases, but it's not! please and please add these 3 options to QuickBMS
i know reimport mode created for reversing and maybe it's look like that i'm saying this like a child and i didn't think on many things, but that's not true
we can have reversing and exporting options at one script (reversing and editing, not just importing)
QuickBMS is so automatically, that's what i meant, i hope you understand with take a good looking at pk_injection_crc.bms
-
- Site Admin
- Posts: 12984
- Joined: Wed Jul 30, 2014 9:32 pm
Re: QuickBMS errors [programming, scripting, quickbms.exe tool... NOT games]
Wow, what a huge mess
How do you plan to use an "inject" command?
It would take the file from the output folder, not much sense.
I checked the scripts you provided and definitely you need to use a programming language.
Scripts are meant to be something simple with just few lines.
How do you plan to use an "inject" command?
It would take the file from the output folder, not much sense.
I checked the scripts you provided and definitely you need to use a programming language.
Scripts are meant to be something simple with just few lines.
-
- Posts: 416
- Joined: Sat Sep 15, 2018 5:22 am
Re: QuickBMS errors [programming, scripting, quickbms.exe tool... NOT games]
i can do it with, i know what i'm saying! names can be done with _temp folder! if there is no output, so that means i can use current dictionary of bat file as well
http://www.mediafire.com/file/ahd74kr34 ... t.zip/file
The Evil Within still crashes and limbo works fine
i can do inject thing too, but take many times and so much memory works and my laptop is weak!
please accept it sir aluigi, that could be useful in many cases
http://www.mediafire.com/file/ahd74kr34 ... t.zip/file
The Evil Within still crashes and limbo works fine
i can do it in that wayaluigi wrote:Scripts are meant to be something simple with just few lines.
i can do inject thing too, but take many times and so much memory works and my laptop is weak!
please accept it sir aluigi, that could be useful in many cases
-
- Site Admin
- Posts: 12984
- Joined: Wed Jul 30, 2014 9:32 pm
Re: QuickBMS errors [programming, scripting, quickbms.exe tool... NOT games]
Just for personal testing I added a Reimport command.
It works like the Append command:
Obviously the files are taken from the output folder so they must already be there.
No idea if it can be useful at all but who knows.
Please let me know what you think.
For the normal writing of data in the input file I ever suggest to use getdstring + putdstring.
Beta:
https://aluigi.altervista.org/beta/quickbms_exe.zip
It works like the Append command:
Code: Select all
reimport 0: disable
reimport 1: like reimport.bat
reimport 2: like reimport2.bat
reimport 3: the reimport 3 mode
reimport: enable/disable the current mode
Obviously the files are taken from the output folder so they must already be there.
No idea if it can be useful at all but who knows.
Please let me know what you think.
For the normal writing of data in the input file I ever suggest to use getdstring + putdstring.
Beta:
https://aluigi.altervista.org/beta/quickbms_exe.zip
-
- Posts: 416
- Joined: Sat Sep 15, 2018 5:22 am
Re: QuickBMS errors [programming, scripting, quickbms.exe tool... NOT games]
like append? what a perfect idea!
i did some little tests and thats what needed to make a hand work script (hand work, i mean without many automatically things and with more options to have, sorry for my limited grammar)
putdstring works fine too
i think it can be useful for saving time and make a script with many options, like a real program!
and it can be better if there was a command line option to make reserved byte with value 1
for example: quickbms.exe -command "NOCRC,JUST_PRINT" -o -w file.bms file.dat
i attached my test
i did some little tests and thats what needed to make a hand work script (hand work, i mean without many automatically things and with more options to have, sorry for my limited grammar)
putdstring works fine too
i think it can be useful for saving time and make a script with many options, like a real program!
and it can be better if there was a command line option to make reserved byte with value 1
for example: quickbms.exe -command "NOCRC,JUST_PRINT" -o -w file.bms file.dat
Code: Select all
if NOCRC != 1
put CRC_VALUE long
else
get LAST_CRC_BLOCK long
endif
if JUST_PRINT != 1
log NAME OFFSET SIZE
else
print "%NAME%"
endif
i attached my test
-
- Site Admin
- Posts: 12984
- Joined: Wed Jul 30, 2014 9:32 pm
Re: QuickBMS errors [programming, scripting, quickbms.exe tool... NOT games]
That's already possible with -s:
Code: Select all
quickbms.exe -s "math NOCRC = 1 ; math JUST_PRINT = 1" script.bms output_folder
-
- Site Admin
- Posts: 12984
- Joined: Wed Jul 30, 2014 9:32 pm
Re: QuickBMS errors [programming, scripting, quickbms.exe tool... NOT games]
I was thinking about an additional field for the SLog option, a tag, basically just a variable that is used as prefix for the string.
It's just an idea that may be useful for helping the translations and maybe also for adding sections (for example by using "" and producing [name of section]).
May it be useful?
Code: Select all
Example:
SLog NAME OFFSET SIZE string 0 i
Output:
[1] my string
Code: Select all
Example:
SLog NAME OFFSET SIZE string 0 "content of a variable"
Output:
[content of a variable] my string
It's just an idea that may be useful for helping the translations and maybe also for adding sections (for example by using "" and producing [name of section]).
Code: Select all
Example:
SLog NAME OFFSET SIZE string 0 ""
Output:
[my string]
May it be useful?
-
- Posts: 416
- Joined: Sat Sep 15, 2018 5:22 am
Re: QuickBMS errors [programming, scripting, quickbms.exe tool... NOT games]
well, i worked on it on a little times ago
i made this solution to make my text tools with bms scripts and with id and not to have all lines to import just a single line
http://www.mediafire.com/file/nj3id1754 ... l.zip/file
download srt_tool.zip and extract it in a empty folder
well, there is a late_shift.srt, and batch files and bms script to do export and import automatically
click on Subtitle_Dialog[.srt]_export.bat and all of .srt files in current folder (such as late_shift.srt) will extract to their own folder (late_shift.srt_files), and goto late_shift.srt_files folder and open dialogs.txt, in dialog number 5 on line 6, you can see this text: 5="Nine-twenty."
you can remove all of texts in dialogs.txt and just left just 5="Nine-twenty."
you can also remove " in start or end of string or do it in different ways
5="Nine-twenty."
5="Nine-twenty.
5=Nine-twenty."
5=Nine-twenty.
4="Nine-ten to my left, thank you sir. Nine-ten."
6="Nine-twenty, thank you."
5="Nine-twenty."
6="Nine-twenty, thank you."
4="Nine-ten to my left, thank you sir. Nine-ten."
5="Nine-twenty."
6="Nine-twenty, thank you."
5="Nine-twenty."
4="Nine-ten to my left, thank you sir. Nine-ten."
no matters which line came first
if you take a look in #DATA_BASE folder, there is two folder in it (library and scripts)
library has exe files and in scripts\operators you can see some different scripts, (most of them are same but in different encoding (UTF-8 or UTF-16, LE or BE) and some other handy scripts
_text_spliter_tabler_utf8_none.bms used in srt tool, you can check bat files
but there is two problem
\ problem and = problem
\ problem
i know that backslash (\) used for some reasons, like \n \f or \\ (for single \)
but what if someone use \k in a line? (you can hide\kill a monster by clicking left mouse button)
wrong cstring error?
in such case, we must use \\ (hide\\kill)
but translator don't know that and he simply write (blahblah\whatever) and he just write \ as \\
and how about a tag to breaking a line? instead of \n? like <br> for (0x0A) or <lf> for (0x0D)
= problem
id's can be string too
like this:
a_peson_ch1_p2="Nine-twenty."
id is a_peson_ch1_p2
what if id was a_peson=ch1_p2
a_peson=ch1_p2="Nine-twenty."
so import text will turn to this (ch1_p2="Nine-twenty.)
then = must replace to __
[b]a_peson__ch1_p2[\b]="Nine-twenty."
i made this solution to make my text tools with bms scripts and with id and not to have all lines to import just a single line
http://www.mediafire.com/file/nj3id1754 ... l.zip/file
download srt_tool.zip and extract it in a empty folder
well, there is a late_shift.srt, and batch files and bms script to do export and import automatically
click on Subtitle_Dialog[.srt]_export.bat and all of .srt files in current folder (such as late_shift.srt) will extract to their own folder (late_shift.srt_files), and goto late_shift.srt_files folder and open dialogs.txt, in dialog number 5 on line 6, you can see this text: 5="Nine-twenty."
you can remove all of texts in dialogs.txt and just left just 5="Nine-twenty."
you can also remove " in start or end of string or do it in different ways
5="Nine-twenty."
5="Nine-twenty.
5=Nine-twenty."
5=Nine-twenty.
4="Nine-ten to my left, thank you sir. Nine-ten."
6="Nine-twenty, thank you."
5="Nine-twenty."
6="Nine-twenty, thank you."
4="Nine-ten to my left, thank you sir. Nine-ten."
5="Nine-twenty."
6="Nine-twenty, thank you."
5="Nine-twenty."
4="Nine-ten to my left, thank you sir. Nine-ten."
no matters which line came first
if you take a look in #DATA_BASE folder, there is two folder in it (library and scripts)
library has exe files and in scripts\operators you can see some different scripts, (most of them are same but in different encoding (UTF-8 or UTF-16, LE or BE) and some other handy scripts
_text_spliter_tabler_utf8_none.bms used in srt tool, you can check bat files
but there is two problem
\ problem and = problem
\ problem
i know that backslash (\) used for some reasons, like \n \f or \\ (for single \)
but what if someone use \k in a line? (you can hide\kill a monster by clicking left mouse button)
wrong cstring error?
in such case, we must use \\ (hide\\kill)
but translator don't know that and he simply write (blahblah\whatever) and he just write \ as \\
and how about a tag to breaking a line? instead of \n? like <br> for (0x0A) or <lf> for (0x0D)
= problem
id's can be string too
like this:
a_peson_ch1_p2="Nine-twenty."
id is a_peson_ch1_p2
what if id was a_peson=ch1_p2
a_peson=ch1_p2="Nine-twenty."
so import text will turn to this (ch1_p2="Nine-twenty.)
then = must replace to __
[b]a_peson__ch1_p2[\b]="Nine-twenty."
-
- Site Admin
- Posts: 12984
- Joined: Wed Jul 30, 2014 9:32 pm
Re: QuickBMS errors [programming, scripting, quickbms.exe tool... NOT games]
Ok, I like the idea of using TAG= instead of [TAG].
Let's have a test drive, I just updated the beta executable:
http://aluigi.org/beta/quickbms_exe.zip
Section names remain with the original [TAG] format and they are ignored in reimport mode.
Sections can be set by using the "" tag.
Regarding the escape strings I prefer to keep it as-is because avoids confusion and errors, backslash escapes are widely used in programming languages including php and json, it's a standard.
While that thing of "Nine-twenty.", Nine-twenty., Nine-twenty." can't be used because strings are taken as-is from the file and games use any content including spaces at the beginning, quotes and so on.
The text must be exactly the one that will be reimported.
P.S.: yeah I posted this new feature in the wrong topic ahahaha
Let's have a test drive, I just updated the beta executable:
http://aluigi.org/beta/quickbms_exe.zip
Section names remain with the original [TAG] format and they are ignored in reimport mode.
Sections can be set by using the "" tag.
Regarding the escape strings I prefer to keep it as-is because avoids confusion and errors, backslash escapes are widely used in programming languages including php and json, it's a standard.
While that thing of "Nine-twenty.", Nine-twenty., Nine-twenty." can't be used because strings are taken as-is from the file and games use any content including spaces at the beginning, quotes and so on.
The text must be exactly the one that will be reimported.
P.S.: yeah I posted this new feature in the wrong topic ahahaha
-
- Posts: 416
- Joined: Sat Sep 15, 2018 5:22 am
Re: QuickBMS errors [programming, scripting, quickbms.exe tool... NOT games]
hmm... no ", no problem then
so can you just use tags instead of escape characters just in slog? like <br> <lf> and so on? i see no problem in it, because i always doing same
i know it's a standard, but tags would be better
and lines will import just line by line, not based on their id's
if i remove a line, rest of texts will import in previous ones
so can you just use tags instead of escape characters just in slog? like <br> <lf> and so on? i see no problem in it, because i always doing same
i know it's a standard, but tags would be better
and lines will import just line by line, not based on their id's
if i remove a line, rest of texts will import in previous ones
-
- Site Admin
- Posts: 12984
- Joined: Wed Jul 30, 2014 9:32 pm
Re: QuickBMS errors [programming, scripting, quickbms.exe tool... NOT games]
You can't imagine the huge mess that would be generated by using tags like those instead of escapes
Because yeah also tags would need their escapes when the characters <> are used in the text.
And <br><lf> aren't a standard, HTML is a standard so the alternatives are few.
Better staying with backslash escape which is universal.
Obviously we can implement any standard since it's just the matter of an encoding and decoding function to be used in quickbms.
The amount of work for me would not be much but it starts to be complicated to enable them in quickbms (command-line option? argument for slog? new command?).
I like the idea of the id.
I'm going to work on it, basically just by enhancing the new TAG argument I just implemented.
Something like a sequential numeric id if TAG is "" while the other TAG will be as is.
In reimport mode I can check if the TAG on file corresponds to the current TAG.
Very easy to implement.
Because yeah also tags would need their escapes when the characters <> are used in the text.
And <br><lf> aren't a standard, HTML is a standard so the alternatives are few.
Better staying with backslash escape which is universal.
Obviously we can implement any standard since it's just the matter of an encoding and decoding function to be used in quickbms.
The amount of work for me would not be much but it starts to be complicated to enable them in quickbms (command-line option? argument for slog? new command?).
I like the idea of the id.
I'm going to work on it, basically just by enhancing the new TAG argument I just implemented.
Something like a sequential numeric id if TAG is "" while the other TAG will be as is.
In reimport mode I can check if the TAG on file corresponds to the current TAG.
Very easy to implement.
-
- Site Admin
- Posts: 12984
- Joined: Wed Jul 30, 2014 9:32 pm
Re: QuickBMS errors [programming, scripting, quickbms.exe tool... NOT games]
I just updated both the quickbms_beta.zip and quickbms_exe.zip with the new feature.
Use the ID "" in Slog for the sequential ids.
Any other value of ID would just be used as-is, it's very useful when you already have ids coming from the language file itself (maybe a string or number read before).
Use the ID "" in Slog for the sequential ids.
Any other value of ID would just be used as-is, it's very useful when you already have ids coming from the language file itself (maybe a string or number read before).