31-01-2005, 09:05 AM
|
#9
|
Join Date: Oct 2004
Location: Opole, Poland
Posts: 14,276
|
By serious hacking I meant something like stuff I did with Bloodrayne recently. To quote:
Quote:
Next part of my post is a lot of tech talk, so those who don't have a modicum of technical savvy can skip it altogether.
It needs a degree of basics of hexadecimal file editing to understand. To utilize what I'm explaining, you'll need a hex editor as well, Hex Workshop (v2.01 - very old one) does the job nicely.
The "control sum" in fact does as I have guessed before count the number of bytes, but not of entire file - only the length of the scripts. It is made by two bytes at offset 08-09h, IN REVERSE (for those who have not encountered this yet, it means that these offsets are read by the game backwards). For example, in AR_GH_BARRACKS.SCB it is 7C45, which means that the scripts are 457C hex bytes long, which transfers to 17788 bytes decimally.
Actual scripts begin at offet 0Ch and end with the 00 byte after :initSectionEnd.
However, as far as it has allowed me to insert a decimal into the timer before the kill command on the lift soldiers, attempting to add or delete a command _still_ caused a crash.
After the end of the scripts there is a lot of bytes that might be garbage, but might as well be not. They are comprised of hexadecimally recorded numbers (backwards again), 4 bytes long each, and their number seems to be equal to the number recorded in 04-05h (recorded, you guessed it, backwards). They seem to be related somehow to the script commands as well - there are as many of these segments as there are commands in the script block separated by the 00h values.
Therefore, deleting two commands (the kill timer garbage), combined with decreasing the value at byte 04h by 2 AND removing the last two of the "garbage" strings resulted in the patch actually working and not locking up at the beginning of the level.
By reversing the same procedure to confirm that this method works, I have modified SCB of the Church level so that Extruded View and Dilated Perception are aivaible there. Guess what, it works. The game does not lock up loading it (soo many of my early attempts resulted in crashes...), and all the abilities work as intended. I have first copied and pasted the script commands that enable Dilated Perception and Extruded View into the beginning of the script, taking note of the number of bytes the sequence has, increased the byte counter by appropriate number, then increased the command number by two (as I have pasted two commands). Two "garbage segments" were added then. It does not really matter what their numbers are, just that the number in each is successive to the previous one.
|
__________________
"God. Can't you people see I'm trying to commit a crime against science and nature here?"
-- Reed Richards
|
                       
|
|