ZenHAX

Free Game Research Forum | Official QuickBMS support | twitter @zenhax | SSL HTTPS://zenhax.com
It is currently Mon Sep 16, 2019 6:48 am

All times are UTC




Post new topic  Reply to topic  [ 526 posts ]  Go to page Previous 122 23 24 25 26 27 Next
Author Message
PostPosted: Sun Apr 07, 2019 11:08 pm 
User avatar

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


Top
   
PostPosted: Sun Apr 07, 2019 11:09 pm 
User avatar

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


Top
   
PostPosted: Sun Apr 07, 2019 11:11 pm 
Site Admin
User avatar

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


Top
   
PostPosted: Mon Apr 08, 2019 9:54 am 
User avatar

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


Top
   
PostPosted: Mon Apr 08, 2019 10:22 am 
Site Admin
User avatar

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


Top
   
PostPosted: Mon Apr 08, 2019 1:21 pm 
User avatar

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


Top
   
PostPosted: Mon Apr 08, 2019 1:28 pm 
Site Admin
User avatar

Joined: Wed Jul 30, 2014 9:32 pm
Posts: 10569
XOR works in both the way so it's fully supported in reimport mode.

math SIZE ^ NUMBER


Top
   
PostPosted: Tue Apr 09, 2019 2:12 pm 
User avatar

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


Attachments:
Locres_script.zip [23.34 KiB]
Downloaded 18 times
Top
   
PostPosted: Tue Apr 09, 2019 6:39 pm 
Site Admin
User avatar

Joined: Wed Jul 30, 2014 9:32 pm
Posts: 10569
math LENGTH n LENGTH

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


Top
   
PostPosted: Tue Apr 09, 2019 6:44 pm 
Site Admin
User avatar

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


Top
   
PostPosted: Tue Apr 09, 2019 6:53 pm 
User avatar

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


Top
   
PostPosted: Tue Apr 09, 2019 7:58 pm 
Site Admin
User avatar

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


Top
   
PostPosted: Tue Apr 09, 2019 8:12 pm 
Site Admin
User avatar

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


Top
   
PostPosted: Tue Apr 09, 2019 8:30 pm 
Site Admin
User avatar

Joined: Wed Jul 30, 2014 9:32 pm
Posts: 10569
Yes, that one was the problem.
Good catch, well done.

I still have to fix another small thing


Top
   
PostPosted: Tue Apr 09, 2019 9:28 pm 
Site Admin
User avatar

Joined: Wed Jul 30, 2014 9:32 pm
Posts: 10569
The new beta is online.


Top
   
PostPosted: Wed Apr 10, 2019 11:06 am 
User avatar

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


Top
   
PostPosted: Wed Apr 10, 2019 12:16 pm 
User avatar

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


Top
   
PostPosted: Wed Apr 10, 2019 12:43 pm 
User avatar

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


Top
   
PostPosted: Wed Apr 10, 2019 5:22 pm 
Site Admin
User avatar

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

Quote:
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.

Quote:
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.

Quote:
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.


Top
   
PostPosted: Thu Apr 11, 2019 8:25 am 
User avatar

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


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 526 posts ]  Go to page Previous 122 23 24 25 26 27 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