Possible next features of QuickBMS

Doubts, help and support about QuickBMS and other game research tools
Shokoniraya
Posts: 416
Joined: Sat Sep 15, 2018 5:22 am

Re: Possible next features of QuickBMS

Post by Shokoniraya »

aluigi wrote:Please note that 8 (or 10) is for each variable and not for the whole script.
In your example MAIN_SIZE has only 2 operations, MAIN_SIZE_F 3, SIZE_FAKE_F 1.

What script has 9 operations per variable?


i cant find script and i renamed with a name that i didnt read it as well, not this scripts in posts, a ps3 script had 9 math!
Shokoniraya
Posts: 416
Joined: Sat Sep 15, 2018 5:22 am

Re: Possible next features of QuickBMS

Post by Shokoniraya »

aluigi wrote:Please note that 8 (or 10) is for each variable and not for the whole script.
In your example MAIN_SIZE has only 2 operations, MAIN_SIZE_F 3, SIZE_FAKE_F 1.

What script has 9 operations per variable?


i cant find script and i renamed with a name that i didnt read it as well, not this scripts in posts, a ps3 script had 9 math but i dont know where i put it!
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: Possible next features of QuickBMS

Post by aluigi »

9 math operations per variable is really crazy, it's like:

get SIZE long
math SIZE - 1
math SIZE n SIZE
math SIZE * 2
math SIZE + 1
math SIZE * 10
math SIZE - 2

they are only 6 and I have never seen a real usage like this in a script.
Anyway if you will find that script I will be curious to see it :D
Shokoniraya
Posts: 416
Joined: Sat Sep 15, 2018 5:22 am

Re: Possible next features of QuickBMS

Post by Shokoniraya »

aluigi wrote:9 math operations per variable is really crazy, it's like:

get SIZE long
math SIZE - 1
math SIZE n SIZE
math SIZE * 2
math SIZE + 1
math SIZE * 10
math SIZE - 2

they are only 6 and I have never seen a real usage like this in a script.
Anyway if you will find that script I will be curious to see it :D


can you add math SIZE a SIZE in reimport?
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: Possible next features of QuickBMS

Post by aluigi »

'a' is the absolute value.
It means that if SIZE is -100 or 100 the result will be 100, so if you have 100 you don't know what was the original value.
I suggest you to use 'n' which means:
-100 = 100
100 = -100

Anyway I will add 'a' in reimport mode that will convert the value to negative, it's wrong 50% of times.
Shokoniraya
Posts: 416
Joined: Sat Sep 15, 2018 5:22 am

Re: Possible next features of QuickBMS

Post by Shokoniraya »

aluigi wrote:'a' is the absolute value.
It means that if SIZE is -100 or 100 the result will be 100, so if you have 100 you don't know what was the original value.
I suggest you to use 'n' which means:
-100 = 100
100 = -100

Anyway I will add 'a' in reimport mode that will convert the value to negative, it's wrong 50% of times.


but you can set it in temp, and i have a question, is there any way to xor a number?(not a file!, just one of value in header (like SIZE long))
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: Possible next features of QuickBMS

Post by aluigi »

XOR works in both the way so it's fully supported in reimport mode.

math SIZE ^ NUMBER
Shokoniraya
Posts: 416
Joined: Sat Sep 15, 2018 5:22 am

Re: Possible next features of QuickBMS

Post by Shokoniraya »

aluigi wrote:XOR works in both the way so it's fully supported in reimport mode.

math SIZE ^ NUMBER


i dont think so, check it, (a) absolute value is no longer used in script and just xor added to number
numbers are negative, but 0xFF can do exactly what i want (set number to a normal value)
but can't support in reimport and numbers will not set as xored values
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: Possible next features of QuickBMS

Post by aluigi »

math LENGTH n LENGTH

'n' does exactly the negative->positive and positive->negative work.
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: Possible next features of QuickBMS

Post by aluigi »

In UE4 unicode is negative and must be multiplied by 2, it's implemented in unreal_tournament_4.bms and it's very simple:

Code: Select all

startfunction GET_NAME
    get NAMESZ signed_long
    if NAMESZ >= 0
        getdstring NAME NAMESZ
    else
        math NAMESZ n NAMESZ
        math NAMESZ * 2
        getdstring NAME NAMESZ
        set NAME unicode NAME
    endif
endfunction
Shokoniraya
Posts: 416
Joined: Sat Sep 15, 2018 5:22 am

Re: Possible next features of QuickBMS

Post by Shokoniraya »

i know sir aluigi, but my problem is not calculating to export!
n not working in reimporting too (export is fine for ^ or a and even n!)
negative values (size block) will turn to normal numbers in rewriting values (but must be same as original values type), thats the problem, not anything else
quickbms will set positive number for a negative number in size block
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: Possible next features of QuickBMS

Post by aluigi »

I'm checking where is the problem.
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: Possible next features of QuickBMS

Post by aluigi »

I guess the problem is that in reimport mode only constant numbers are supported and not variables, will work on that
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: Possible next features of QuickBMS

Post by aluigi »

Yes, that one was the problem.
Good catch, well done.

I still have to fix another small thing
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: Possible next features of QuickBMS

Post by aluigi »

The new beta is online.
Shokoniraya
Posts: 416
Joined: Sat Sep 15, 2018 5:22 am

Re: Possible next features of QuickBMS

Post by Shokoniraya »

aluigi wrote:The new beta is online.

works fine! thank you!

need to ask you something, some offsets are normal, but padded in their location,
math OFFSET * 16 will turn them to another value,
for example, we have a file in offset 1280 (offset is 1280)
and in header, offset long is 1280 too. but game just can read offsets padded to 16, but how we can use math option? because long already is 1280, just like their real position! (long is 1280, if long was 80, we could do something and use math, but how about normal padded values?)
and i want to say, math OFFSET x 16 is fine or not good for that?
Shokoniraya
Posts: 416
Joined: Sat Sep 15, 2018 5:22 am

Re: Possible next features of QuickBMS

Post by Shokoniraya »

sir aluigi, don't release quickbms 0.9.3 for now
i want to tell two problem

problem 1:
when we using a dictionary name (a list for names to rename CRC to names), those CRCs that are not available in list of names, will not renamed to original crc and will show like this: 00000001.dat, 00000002.dat, 00000000a.dat and so on, but it must be renamed to CRC if name is not available in list, like this :154821484, 42972494, 247442 and so on

and another, problem 2:
names better be like this: 00000001.dat, 00000002.dat, 00000003.dat, 00000004.dat, 00000005.dat, 00000006.dat, 00000007.dat, 00000008.dat, 00000009.dat, 00000010.dat, 00000011.dat, 00000012.dat, 00000013.dat, 00000014.dat and so on, i mean dont use hex numbers as numbers

example code

Code: Select all

math NUM1 = 0
math NUM2 = 0
math NUM3 = 0
math NUM4 = 0
math NUM5 = 0
for i = 0 < 40
math NUM1 + 1

if NUM1 = 10
math NUM1 = 0
math NUM2 + 1
endif

if NUM2 = 10
math NUM2 = 0
math NUM3 + 1
endif

if NUM3 = 10
math NUM3 = 0
math NUM4 + 1
endif

if NUM4 = 10
math NUM4 = 0
math NUM5 + 1
endif

if NUM5 = 10
break
endif

string COUNTER p "%s%s%s%s%s%s" NUM5 NUM4 NUM3 NUM2 NUM1 ".dat"
log COUNTER 0 0
next i
Shokoniraya
Posts: 416
Joined: Sat Sep 15, 2018 5:22 am

Re: Possible next features of QuickBMS

Post by Shokoniraya »

and another idea to make quickbms complete ever!

better do something to add an option for edit config files, and export and import values to xml or a file and edit values, like xml files for coordination

like this

Code: Select all

X="204" Y="668" w="20" h="50"

dumping value to file as natural numbers and reimport to size blocks
it can helps alot to edit config files!
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: Possible next features of QuickBMS

Post by aluigi »

and i want to say, math OFFSET x 16 is fine or not good for that?

The "80" of your example is already aligned to 16 bytes, let's take 1234 instead, "math SIZE x 16" will result in 1248.
As far as I know the current beta is able to support alignment in reimport mode.
Do a test and let me know.

problem 1:
when we using a dictionary name (a list for names to rename CRC to names), those CRCs that are not available in list of names, will not renamed to original crc and will show like this: 00000001.dat, 00000002.dat, 00000000a.dat and so on, but it must be renamed to CRC if name is not available in list, like this :154821484, 42972494, 247442 and so on

It's something I can do it, yes.
It will break compatibility with files extracted in the past (what was 00000000.dat now would be 12345678.dat [hex is necessary]) but I think it's not a bad thing.

and another, problem 2:
names better be like this: 00000001.dat, 00000002.dat, 00000003.dat, 00000004.dat, 00000005.dat, 00000006.dat, 00000007.dat, 00000008.dat, 00000009.dat, 00000010.dat, 00000011.dat, 00000012.dat, 00000013.dat, 00000014.dat and so on, i mean dont use hex numbers as numbers

You can obtain decimal names with the command-line option -N, the option works in the quickbmsver command too.

better do something to add an option for edit config files, and export and import values to xml or a file and edit values, like xml files for coordination

That's complex, really complex. There are many types of configuration files with an unknown number of fields.
Not possible.
Shokoniraya
Posts: 416
Joined: Sat Sep 15, 2018 5:22 am

Re: Possible next features of QuickBMS

Post by Shokoniraya »

and please one other fix in slog

some characters are not visible in text editor and writing as space, can you set it to write as hex like /x01 or other hex numbers like old quickbms?