Page 1 of 1

StructItemScript

Posted: Fri Oct 29, 2010 11:14 pm
by WhoElseButMe
That's right you read the title correctly, these are very much real and I'm going to give you the break down of how they're constructed.

Its a unique data type in the sense that its 2 parts, part one is the data type part 2 is the number of bytes in the script
Code Snip It, includes the next items DataType

Code: Select all

000F2C00DB162E3534C3000060C30000
02F0080000160B9D338316398FF0B607
164DF45724164E08B24B07161F31FA28
02F10800002402F208000000001B0000

Lets break that code down to better understand a StructItemScript
000F2C00 - this is the DataType, 0x00000F00; Falls perfectly in place with all other structure item DataTypes the only difference is the last 2 bytes are actually the script size. 2C00 = 44 bytes

DB162E35 - The script name - Disqualify_Script
34C30000 - The offset to the start of the script
60C30000 - The offset to the next DataType after the script

The next byte is the start of the script and this is where our byte count starts. These scripts are constructed like THPS3/4 where a new instruction starts with byte 0x02 and is followed by a 4 byte value. The value for a StructItemScript is actually a total item count of the entire script.

02 F0080000 - new instruction + item count
16 0B9D3383 - Translates to: SetPart
16 398FF0B6 07 16 4DF45724 - Translates to: part = body
16 4E08B24B 07 16 1F31FA28 - Translates to: desc_id = MaleBody
02 F1080000 - new instruction + item count
24 - Translates to: endfunction
02 F2080000 - new instruction + item count; This is the count for the next DataType.
00 - padding, all pak scripts are padded by %4 meaning the end of the data ends at either byte 0, 4, 8, C. This is the last byte in our script, byte 44.
001B0000 - New DataType which equals StructItemQbKey

%

Re: StrcutItemScript

Posted: Sat Oct 30, 2010 5:25 am
by Cyber-Ninja95
Wow thats cool I think I may have schizophrenia or may be high I have been seeing things. "and have been realy paranoid. any way yeah keep up the good work. :wtf?:

Re: StructItemScript

Posted: Mon Dec 13, 2010 5:27 pm
by sMo0g™
How you translate this codes? :DD