ZenHAX

Free Game Research Forum | Official QuickBMS support | twitter @zenhax | SSL HTTPS://zenhax.com
It is currently Fri Nov 27, 2020 2:42 am

All times are UTC




Post new topic  Reply to topic  [ 496 posts ]  Go to page Previous 121 22 23 24 25 Next
Author Message
PostPosted: Wed Nov 04, 2020 2:51 pm 
User avatar

Joined: Sat Sep 15, 2018 5:22 am
Posts: 352
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?


Top
   
PostPosted: Thu Nov 05, 2020 5:29 pm 
Site Admin
User avatar

Joined: Wed Jul 30, 2014 9:32 pm
Posts: 11814
Is that problem happening only with The Evil Within?

How did you test the data compressed by quickbms with Winrar?


Top
   
PostPosted: Thu Nov 05, 2020 5:38 pm 
User avatar

Joined: Sat Sep 15, 2018 5:22 am
Posts: 352
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?


Top
   
PostPosted: Thu Nov 05, 2020 5:53 pm 
Site Admin
User avatar

Joined: Wed Jul 30, 2014 9:32 pm
Posts: 11814
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.


Top
   
PostPosted: Fri Nov 06, 2020 2:36 am 
User avatar

Joined: Sat Sep 15, 2018 5:22 am
Posts: 352
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

Code:
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:
inject NANE OFFSET SIZE
(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


Top
   
PostPosted: Fri Nov 06, 2020 8:34 am 
Site Admin
User avatar

Joined: Wed Jul 30, 2014 9:32 pm
Posts: 11814
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.


Top
   
PostPosted: Fri Nov 06, 2020 10:00 am 
User avatar

Joined: Sat Sep 15, 2018 5:22 am
Posts: 352
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


Top
   
PostPosted: Fri Nov 06, 2020 1:38 pm 
Site Admin
User avatar

Joined: Wed Jul 30, 2014 9:32 pm
Posts: 11814
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.


Top
   
PostPosted: Fri Nov 06, 2020 2:26 pm 
User avatar

Joined: Sat Sep 15, 2018 5:22 am
Posts: 352
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


Top
   
PostPosted: Fri Nov 06, 2020 2:45 pm 
Site Admin
User avatar

Joined: Wed Jul 30, 2014 9:32 pm
Posts: 11814
Wow, what a huge mess :D

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.


Top
   
PostPosted: Fri Nov 06, 2020 3:08 pm 
User avatar

Joined: Sat Sep 15, 2018 5:22 am
Posts: 352
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

aluigi wrote:
Scripts are meant to be something simple with just few lines.
i can do it in that way
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


Top
   
PostPosted: Sat Nov 07, 2020 4:15 pm 
Site Admin
User avatar

Joined: Wed Jul 30, 2014 9:32 pm
Posts: 11814
Just for personal testing I added a Reimport command.
It works like the Append command:
Code:
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


Top
   
PostPosted: Sat Nov 07, 2020 9:12 pm 
User avatar

Joined: Sat Sep 15, 2018 5:22 am
Posts: 352
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

Code:
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


Attachments:
my_test.zip [492 Bytes]
Downloaded 22 times
Top
   
PostPosted: Sun Nov 08, 2020 8:33 am 
Site Admin
User avatar

Joined: Wed Jul 30, 2014 9:32 pm
Posts: 11814
That's already possible with -s:
Code:
quickbms.exe -s "math NOCRC = 1 ; math JUST_PRINT = 1" script.bms output_folder


Top
   
PostPosted: Tue Nov 10, 2020 9:01 pm 
Site Admin
User avatar

Joined: Wed Jul 30, 2014 9:32 pm
Posts: 11814
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.

Code:
Example:
SLog NAME OFFSET SIZE string 0 i
Output:
[1] my string

Code:
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:
Example:
SLog NAME OFFSET SIZE string 0 ""
Output:
[my string]

May it be useful?


Top
   
PostPosted: Wed Nov 11, 2020 12:23 am 
User avatar

Joined: Sat Sep 15, 2018 5:22 am
Posts: 352
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."


Top
   
PostPosted: Wed Nov 11, 2020 8:34 am 
Site Admin
User avatar

Joined: Wed Jul 30, 2014 9:32 pm
Posts: 11814
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


Top
   
PostPosted: Wed Nov 11, 2020 11:05 pm 
User avatar

Joined: Sat Sep 15, 2018 5:22 am
Posts: 352
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


Top
   
PostPosted: Thu Nov 12, 2020 10:26 am 
Site Admin
User avatar

Joined: Wed Jul 30, 2014 9:32 pm
Posts: 11814
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.


Top
   
PostPosted: Fri Nov 13, 2020 8:23 am 
Site Admin
User avatar

Joined: Wed Jul 30, 2014 9:32 pm
Posts: 11814
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).


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 496 posts ]  Go to page Previous 121 22 23 24 25 Next

All times are UTC


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:
Powered by phpBB® Forum Software © phpBB Limited