Skip to content
View in the app

A better way to browse. Learn more.

ResHax

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.
Help us keep the site running.

Possible next features of QuickBMS

Featured Replies

  • Author
  • Localization

aluigi, posted Sun Apr 07, 2019 5:29 pm (46583)


This is the problem:
Code:
math LENGTH -= 1
...
math LENGTH = 1
math LENGTH a LENGTH
math LENGTH * 2
math LENGTH -= 2

quickbms performs only one inverted operation while here you have 4 additional operations.

Additionally the 'a' operator is the abs() which can't be reverted.
  • Replies 679
  • Views 56
  • Created
  • Last Reply

Top Posters In This Topic

  • Author
  • Localization

Shokoniraya, posted Sun Apr 07, 2019 5:35 pm (46586)


aluigi wrote:
This is the problem:
Code:
math LENGTH -= 1
...
math LENGTH = 1
math LENGTH a LENGTH
math LENGTH * 2
math LENGTH -= 2

quickbms performs only one inverted operation while here you have 4 additional operations.

Additionally the 'a' operator is the abs() which can't be reverted.


can you do something for that?
  • Author
  • Localization

aluigi, posted Sun Apr 07, 2019 5:59 pm (46589)


Nothing.

The only thing I can do, maybe, is adding more math operators, maybe 2 instead of 1 (math OFFSET * 0x800; math OFFSET BASE_OFF)

Anyway in this specific case it looks more like a limitation of the script.
  • Author
  • Localization

Shokoniraya, posted Sun Apr 07, 2019 7:03 pm (46592)


aluigi wrote:
Nothing.

The only thing I can do, maybe, is adding more math operators, maybe 2 instead of 1 (math OFFSET * 0x800; math OFFSET BASE_OFF)

Anyway in this specific case it looks more like a limitation of the script.

2 instead of 1? thats better than nothing for now, no way to add more at all?
script limited and now, using just two math for now, so 2 math is good for now
  • Author
  • Localization

Shokoniraya, posted Sun Apr 07, 2019 7:06 pm (46593)


another idea
Code:
xmath LENGTH "LENGTH a LENGTH * 2 - 4"

using more operation in xmath
  • Author
  • Localization

aluigi, posted Sun Apr 07, 2019 7:25 pm (46594)


I have added support for 4 reversed operators. They are a lot considering that just one was enough.

xmath isn't supported in reimport mode at the moment (and it can't be supported due to how xmath works).
  • Author
  • Localization

Shokoniraya, posted Sun Apr 07, 2019 9:47 pm (46596)


aluigi wrote:
I have added support for 4 reversed operators. They are a lot considering that just one was enough.

xmath isn't supported in reimport mode at the moment (and it can't be supported due to how xmath works).


good! but maximum better be more operators for some special text files, because in normally, need more math for some special files if xmath not supported in reimport (even with limiting the script!)
please set it to 6 if xmath not working in reimporting
can you set it just to more operators at all and upload a beta release?
  • Author
  • Localization

Shokoniraya, posted Sun Apr 07, 2019 11:02 pm (46599)


look at this
Code:
for i
findloc HEADING_HEADER binary "\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
goto HEADING_HEADER
getdstring DUMMY_1 12
get MAIN_SIZE long
math MAIN_SIZE_F == MAIN_SIZE
get MATHER long
get NAMER long
getdstring DUMMY_2 NAMER
get DUMMY_3 long
get SIZE_FAKE long
math SIZE_FAKE_F == SIZE_FAKE
math MAIN_SIZE_F -= SIZE_FAKE_F
math MAIN_SIZE_F -= MATHER
math MAIN_SIZE -= MATHER
math MAIN_SIZE -= MAIN_SIZE_F
savepos OFFSET
getdstring DUMMY_4 SIZE_FAKE
slog "" OFFSET MAIN_SIZE
getdstring DUMMY_5 12
next i


set it to 20, that will make it better for such scripts, its turn to a problem in reimporting!
  • Author
  • Localization

aluigi, posted Sun Apr 07, 2019 11:03 pm (46600)


Yes, just uploaded.

I have set it to 10 because there is very few memory taken, but in the final release I will set it to 8 because it may have some small effect on the speed in some rare situations... after all 8 is really a lot!
  • Author
  • Localization

Shokoniraya, posted Sun Apr 07, 2019 11:05 pm (46601)


aluigi wrote:
Yes, just uploaded.

I have set it to 10 because there is very few memory taken, but in the final release I will set it to 8 because it may have some small effect on the speed in some rare situations... after all 8 is really a lot!

10 is good, one of my script has 9! :oops: or a way to set it by hand?
  • Author
  • Localization

aluigi, posted Sun Apr 07, 2019 11:05 pm (46602)


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?
  • Author
  • Localization

Shokoniraya, posted Sun Apr 07, 2019 11:08 pm (46604)


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!
  • Author
  • Localization

Shokoniraya, posted Sun Apr 07, 2019 11:09 pm (46605)


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!
  • Author
  • Localization

aluigi, posted Sun Apr 07, 2019 11:11 pm (46606)


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
  • Author
  • Localization

Shokoniraya, posted Mon Apr 08, 2019 9:54 am (46623)


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?
  • Author
  • Localization

aluigi, posted Mon Apr 08, 2019 10:22 am (46626)


'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.
  • Author
  • Localization

Shokoniraya, posted Mon Apr 08, 2019 1:21 pm (46649)


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))
  • Author
  • Localization

aluigi, posted Mon Apr 08, 2019 1:28 pm (46653)


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

math SIZE ^ NUMBER
  • Author
  • Localization

Shokoniraya, posted Tue Apr 09, 2019 2:12 pm (46700)


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

Locres_script.zip

  • Author
  • Localization

aluigi, posted Tue Apr 09, 2019 6:39 pm (46717)


math LENGTH n LENGTH

'n' does exactly the negative->positive and positive->negative work.
  • Author
  • Localization

aluigi, posted Tue Apr 09, 2019 6:44 pm (46718)


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:
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
  • Author
  • Localization

Shokoniraya, posted Tue Apr 09, 2019 6:53 pm (46719)


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
  • Author
  • Localization

aluigi, posted Tue Apr 09, 2019 7:58 pm (46724)


I'm checking where is the problem.
  • Author
  • Localization

aluigi, posted Tue Apr 09, 2019 8:12 pm (46726)


I guess the problem is that in reimport mode only constant numbers are supported and not variables, will work on that
  • Author
  • Localization

aluigi, posted Tue Apr 09, 2019 8:30 pm (46729)


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

I still have to fix another small thing
Guest
This topic is now closed to further replies.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.