Post: [Tutorial] How to properly recompress and inject without having a blackscreen !
09-24-2010, 07:43 AM #1
Gendjisan
A.k.a. Bushigan
(adsbygoogle = window.adsbygoogle || []).push({}); Hello, here is my way...

I have make video tut because i don't known good english for making tut in english...sorry Smile

Note : Don't forget to Tank's me if i help you :whistle:

1 : Decompress the patch_mp.ff

Video link : You must login or register to view this content.

2 : Exemple of extracting .gsc (_utility.gsc) into 0000b4a0.dat

Video link : You must login or register to view this content.

3 : Mod a .gsc file (_utility.gsc) and recompress it

Video link : You must login or register to view this content.

4 : Mod blocks and inject it to patch_mp.ff

Video link : You must login or register to view this content.

Originally posted by leukotic View Post
Alright, I worked on this written tut for the last few hours. So please, thank for my effort! Even though the videos are only a few mins long, it takes a while to describe and write this stuff out Happy


Take note I changed the first section about unpacking the patch (different from video). I figure this way it will help people understand whats happening better.

Also Gendjisan feel free to put this in the OP. Although a mention that I wrote it up would be nice Smile




Decompress the patch_mp.ff




1. Create a folder called "pack" on your desktop and place offzip.exe and packzip.exe into this folder.
2. Open up command prompt. Type in the following:

    cd desktop /pack


3. Get yourself a unmodified patch_mp.ff file and place it into the same folder as offzip.exe and packzip.exe.
4. Inside this same folder (the "pack" folder) make another folder named "stuff".
5. Go back to command prompt and type the following:

    offzip.exe -a -z -15 patch_mp.ff stuff 0


Hit enter.

6. You will now see 22 files in the folder "stuff". The patch is decompressed.






Exemple of extracting .gsc (_utility.gsc) into 0000b4a0.dat




1. Goto your stuff folder, and open up the file "0000b4a0.dat" in HxD.
2. Hit CTRL + E, now enter these numbers for the start and end offsets.

Start: 903F
End: C31E

Hit Ok.

3. Copy the selected area. (CTRL + C)
4. Press CTRL + N to open up a new HxD file. Then press CTRL + C to paste into that file.
5. Go ahead and save this file as "_utility_compressed.gsc" (without the quotes of course). And make sure to save it into the "stuff" folder.
6. Close HxD






Mod a .gsc file (_utility.gsc) and recompress it




1. Go back to your command prompt and type the following:

    offzip.exe -a -z -15 stuff/_utility_compressed.gsc stuff 0


Hit enter.

2. You will now see a file in the "stuff" folder named "00000002.dat". Open this up in notepad.
3. Delete the following:

    /*
saveModel()
{
info["model"] = self.model;
info["viewmodel"] = self getViewModel();
attachSize = self getAttachSize();
info["attach"] = [];

assert(info["viewmodel"] != ""); // No viewmodel was associated with the player's model

for(i = 0; i < attachSize; i++)
{
info["attach"][i]["model"] = self getAttachModelName(i);
info["attach"][i]["tag"] = self getAttachTagName(i);
info["attach"][i]["ignoreCollision"] = self getAttachIgnoreCollision(i);
}

return info;
}

loadModel(info)
{
self detachAll();
self setModel(info["model"]);
self setViewModel(info["viewmodel"]);

attachInfo = info["attach"];
attachSize = attachInfo.size;

for(i = 0; i < attachSize; i++)
self attach(attachInfo[i]["model"], attachInfo[i]["tag"], attachInfo[i]["ignoreCollision"]);
}
*/

/*
=============
///ScriptDocBegin
"Name: delayThread( <delay>, <function>, <arg1>, <arg2>, <arg3>, <arg4> )"
"Summary: Delaythread is cool! It saves you from having to write extra script for once off commands. Note you don’t have

to thread it off. Delaythread is that smart!"
"Module: Utility"
"MandatoryArg: <delay> : The delay before the function occurs"
"MandatoryArg: <delay> : The function to run."
"OptionalArg: <arg1> : parameter 1 to pass to the process"
"OptionalArg: <arg2> : parameter 2 to pass to the process"
"OptionalArg: <arg3> : parameter 3 to pass to the process"
"OptionalArg: <arg4> : parameter 4 to pass to the process"
"OptionalArg: <arg5> : parameter 5 to pass to the process"
"Example: delayThread( 3, ::flag_set, "player_can_rappel" );
"SPMP: both"
///ScriptDocEnd
=============
*/



4. Save the now modded file (CTRL + S) and close notepad.
5. In your "stuff" folder, create a new text document named "_utility_recomp_mod.gsc"
6. Go back to your command prompt and type the following:

    packzip.exe -o 0x00000002 -w -15 stuff/00000002.dat stuff/_utility_recomp_mod.gsc 


Press enter.

7. Open up "_utility_compressed.gsc" and "_utility_recomp_mod.gsc" into HxD
8. Goto the "_utility_recomp_mod.gsc" tab in HxD and enter the following at the begining of the file

78 DA

Go ahead and overwrite the two 00 00 that are there.

9. Scroll to the bottom of the "_utility_recomp_mod.gsc" file. Take note of where the last entry is (the last offset).

To figure this out simply click your mouse to the right of the last Hex entry. Then look at the bottom left of HxD. It will tell you what the offset is on the area you have clicked.

10. Once you find the offset, click on the "_utility_compressed.gsc" tab in Hxd. Now goto the top menu and click "search" then click "Goto". This is where you enter the offset you found on the "_utility_recomp_mod.gsc" file.

11. Click search and it will bring your cursor to the right place. Now highlight everything after that point (all the way down the file). Then copy it (CTRL + C)

12. Go back to the "_utility_recomp_mod.gsc" and scroll down the the bottom. After the last entry you paste all the data you just copied. You will see the additions are red in color.

13. Now go ahead and highlight all the red stuff you just pasted. But leave the four "FF FF FF FF" at the bottom (don't highlight that, just all the red above it).

14. After you have highlighted that stuff, goto the HxD menu click "Edit" then find the "Fill Selection" option. Click on it. Then hit Ok. This will fill the highlighted area in with 00's. Now go ahead and save this.

15. Close all the HxD tabs.





Mod blocks and inject it to patch_mp.ff




1. Open up the files "_utility_recomp_mod.gsc" and "0000b4a0.dat" into HxD.
2. Goto the "0000b4a0.dat"tab in Hxd and hit CTRL + E. Tye in the following for start and end offsets.

Start: 903f
End: c31e

Hit Ok

3. Now goto the "_utility_recomp_mod.gsc" tab and press CTRL + A to select all. Then hit CTRL + C to copy.
4. Go back to the "0000b4a0.dat" tab and click "Edit" in the menu bar then click "Paste Write"
5. Now you will see all the red from what you just pasted. Scroll to the top of all the red stuff. if you look just a few rows up from the red, you will see a line of "FF FF FF FF". Just to the left of these FF's are 4 letters/numbers (which is next to a 00 00).

6. Minimize HxD and goto your "stuff" folder. Right click on the "00000002.dat" file and hit "Properties". You are looking for a number, which is the "Size" number (just above "Size on disk"). Go ahead and copy this, or write down the number
.
7. Head on over to google and type the following

     XXXXX to hexadecimal


Where the XXXXX is, replace with the number you found for the size of the file. So for example, if the file size was 60,273 bytes you would type "60273 to hexadecimal" on google. Once you get the number which will look similar to this 0xEB71, write it down or remember this number (ignore the 0x part).

8. Go back to HxD. The 4 letters to the left of the "FF FF FF FF" is where you are going to enter the hexadecimal you converted on google. Just go ahead and overwrite the 4 letters/numbers that are there. The difference will be marked in red. Once you do this, go ahead and save the file and close HxD.

9. Goto your command prompt and type in the following:

{code]packzip.exe -o 0x0000b4a0 -w -15 stuff/0000b4a0.dat patch_mp.ff{/code]

Hit enter.

10. Now open up your newly packed patch_mp.ff file in HxD. Goto offset 1E (this is just a few rows down from the top).

You will see three sets of numbers/letters. For example mine is 03 8C 7A. Now scroll to the bottom if the file, at the very bottom you will see a 00 followed by a 01 (the last 4 offsets in the file). Click to the left of the 00 offset.

Now this offset should match the numbers above that you found.

For example my offset for the 00 is 38C7A which is what is located at the top of the file (mine was 03 8C 7A). Make sure this matches. If not, then change the letters/numbers at offset 1E to make it match.





That's it, if done correctly you should have a modded patch. Smile :y:
Last edited by Gendjisan ; 09-24-2010 at 01:06 PM.

The following 53 users say thank you to Gendjisan for this useful post:

1337UNO, airghisla, AlabamaHit, bigfishbad, Blackstorm, bootboys, brentos69, Carbon0x, Chris ^_^, chris01, clizzzzz, defwegwreh, DiJiTaLNiCk, eddydiep, Gandi, GNDOOOR_KILLER, gola, Grandad Trotter, IDontbreak, iPooPublic, jb2203, jubz-2k10, Karoolus, leukotic, makizar, Mateen, Mezzid, ModThatGame, Moose Tamer, Mr Phobik, mtuck317, NGUKHI, Nolzad0, NOTANOOB, OXx_Cut_xXO, PHgua, PS3LUV3R, rico4u2day2, riotmost, Ritztro, RJP101, Sarmas, Shoot12, Solid Snake, That Guy_, TheGodZeus, Traxx, Tzee, x_DaftVader_x, XJ18, YourWelcomeN00b, zarma08, ZoneTw0
09-26-2010, 05:37 PM #146
Freezing-HOT
iiRoAM - Maori Stylezz
Originally posted by Aaken View Post
Successfully converted dudeitsbrian v2 patch to ps3!

Will release it later to premium, i think. Happy


do it do it do it Happy
09-26-2010, 07:50 PM #147
Mateen
pretty chill guy
I get passed the BSOD, but get an error about end of file
09-26-2010, 11:36 PM #148
dm430
I defeated!
Originally posted by Gendjisan View Post
Hello, here is my way...

I have make video tut because i don't known good english for making tut in english...sorry Smile

Note : Don't forget to Tank's me if i help you :whistle:

1 : Decompress the patch_mp.ff

Video link : You must login or register to view this content.

2 : Exemple of extracting .gsc (_utility.gsc) into 0000b4a0.dat

Video link : You must login or register to view this content.

3 : Mod a .gsc file (_utility.gsc) and recompress it

Video link : You must login or register to view this content.

4 : Mod blocks and inject it to patch_mp.ff

Video link : You must login or register to view this content.


hey buddy whats up just wanted to tell you your vids are down :( so if i could be so blunt to ask you if you would upload to youtube i can supplie you with the full version of camtasiaSmile
09-26-2010, 11:40 PM #149
leukotic
Climbing up the ladder
Originally posted by XxprokillahxX View Post
i would go against that dude... its a powerful patch... and half of premiums would abuse its power (deranking etc.)


What else in there is abuse worthy aside from de-ranking? I may have to port this myself to see what it can do :Y:

The following user thanked leukotic for this useful post:

Mateen
09-26-2010, 11:41 PM #150
Raymo5
Mario!
Great Tutorial.
09-27-2010, 12:52 AM #151
AlabamaHit
ROLL TIDE!!!
I'm about to give, up....There is somethign defently not right.

I'm not even in the missions. I'm doing event.gsc. Everytime is black screen.

Process I'm doing.

And before anyone says it is the ./ is it no. That is just using the same directory I'm in.

    
offzip.exe -a -z -15 patch_mp.ff ./ 0

Then delete all but the file I need. 0000b4a0.dat

I open that. Copy all of the events save to new file. event_comp.gsc

Then I decompress that.

offzip.exe -a -z -15 event_comp.gsc ./ 0

That gives me the 00000002.dat

Now this is a modded patch I'm doing. They ahve in DVARs the clan tag. I change it to mine. Kinda. I leave it at 4 letters. So I'm just changing it to FtW* it is three different letters.

I create a new file event_recomp.gsc

Now I do this to pack it back.

packzip.exe -o 0x00000002 -w -15 00000002.dat event_recomp.gsc

Now open up event_comp.gsc and event_recomp.gsc

I change header 78 DA On the recomp.gsc of course.
Now i go to the bottom on mine it is 1028

Now I copy from there down. from the comp.gsc, add it to bottom of recomp.gsc.

Now There are 4 offsets with stuff there. I have cahnged to 00s and have left them, BOTH gave me black screen. So I will say this time I changed all to 00s execpt for the yyyy at the end.

Now saved that file.

I open up 0000b4a0.dat and recomp.gsc in the hxd. I paste it back in with the right click like in the video not contol +v (im not sure if there is a difference from contol + v and control +b in hxd or not) but I do ti like the video. which wold be the control +b. and yes i have tried both.

Now I have it in my 0000b4a0.dat

now to put back in patch i do this.

packzip.exe -o 0x0000b4a0 -w -15 0000b4a0.dat patch_mp.ff


there may be a small typo in there i didn't proof read. But you should understand that.

As you can see that is the way everyone says is correct is it Not???
09-27-2010, 01:29 AM #152
Originally posted by AlabamaHit View Post
I'm about to give, up....There is somethign defently not right.

I'm not even in the missions. I'm doing event.gsc. Everytime is black screen.

Process I'm doing.

And before anyone says it is the ./ is it no. That is just using the same directory I'm in.

    
offzip.exe -a -z -15 patch_mp.ff ./ 0

Then delete all but the file I need. 0000b4a0.dat

I open that. Copy all of the events save to new file. event_comp.gsc

Then I decompress that.

offzip.exe -a -z -15 event_comp.gsc ./ 0

That gives me the 00000002.dat

Now this is a modded patch I'm doing. They ahve in DVARs the clan tag. I change it to mine. Kinda. I leave it at 4 letters. So I'm just changing it to FtW* it is three different letters.

I create a new file event_recomp.gsc

Now I do this to pack it back.

packzip.exe -o 0x00000002 -w -15 00000002.dat event_recomp.gsc

Now open up event_comp.gsc and event_recomp.gsc

I change header 78 DA On the recomp.gsc of course.
Now i go to the bottom on mine it is 1028

Now I copy from there down. from the comp.gsc, add it to bottom of recomp.gsc.

Now There are 4 offsets with stuff there. I have cahnged to 00s and have left them, BOTH gave me black screen. So I will say this time I changed all to 00s execpt for the yyyy at the end.

Now saved that file.

I open up 0000b4a0.dat and recomp.gsc in the hxd. I paste it back in with the right click like in the video not contol +v (im not sure if there is a difference from contol + v and control +b in hxd or not) but I do ti like the video. which wold be the control +b. and yes i have tried both.

Now I have it in my 0000b4a0.dat

now to put back in patch i do this.

packzip.exe -o 0x0000b4a0 -w -15 0000b4a0.dat patch_mp.ff


there may be a small typo in there i didn't proof read. But you should understand that.

As you can see that is the way everyone says is correct is it Not???


alrite i know you dont like me but oh well.. here is my very last hint.

maybe the headers and footers you want for each gsc are not zlib headers and footers at all....
09-27-2010, 01:42 AM #153
PS3LUV3R
Too Beast
Originally posted by AlabamaHit View Post
I'm about to give, up....There is somethign defently not right.

I'm not even in the missions. I'm doing event.gsc. Everytime is black screen.

Process I'm doing.

And before anyone says it is the ./ is it no. That is just using the same directory I'm in.

    
offzip.exe -a -z -15 patch_mp.ff ./ 0

Then delete all but the file I need. 0000b4a0.dat

I open that. Copy all of the events save to new file. event_comp.gsc

Then I decompress that.

offzip.exe -a -z -15 event_comp.gsc ./ 0

That gives me the 00000002.dat

Now this is a modded patch I'm doing. They ahve in DVARs the clan tag. I change it to mine. Kinda. I leave it at 4 letters. So I'm just changing it to FtW* it is three different letters.

I create a new file event_recomp.gsc

Now I do this to pack it back.

packzip.exe -o 0x00000002 -w -15 00000002.dat event_recomp.gsc

Now open up event_comp.gsc and event_recomp.gsc

I change header 78 DA On the recomp.gsc of course.
Now i go to the bottom on mine it is 1028

Now I copy from there down. from the comp.gsc, add it to bottom of recomp.gsc.

Now There are 4 offsets with stuff there. I have cahnged to 00s and have left them, BOTH gave me black screen. So I will say this time I changed all to 00s execpt for the yyyy at the end.

Now saved that file.

I open up 0000b4a0.dat and recomp.gsc in the hxd. I paste it back in with the right click like in the video not contol +v (im not sure if there is a difference from contol + v and control +b in hxd or not) but I do ti like the video. which wold be the control +b. and yes i have tried both.

Now I have it in my 0000b4a0.dat

now to put back in patch i do this.

packzip.exe -o 0x0000b4a0 -w -15 0000b4a0.dat patch_mp.ff


there may be a small typo in there i didn't proof read. But you should understand that.

As you can see that is the way everyone says is correct is it Not???


Seems like you're doing everything right. And I'm pretty sure events isn't split. Maybe you're not copying to the right offsets?

A problem I had was using paste insert instead of paste write. MAKE SURE you use that when copying your recomp into b4a0. That was messing me up the whole time lol.

---------- Post added at 08:42 PM ---------- Previous post was at 08:40 PM ----------

Originally posted by XxprokillahxX View Post
alrite i know you dont like me but oh well.. here is my very last hint.

maybe the headers and footers you want for each gsc are not zlib headers and footers at all....


0.o say what?

I don't even understand what you're saying but, since my way works, I guess I have those right? Lol.
09-27-2010, 02:53 AM #154
AlabamaHit
ROLL TIDE!!!
Originally posted by XxprokillahxX View Post
alrite i know you dont like me but oh well.. here is my very last hint.

maybe the headers and footers you want for each gsc are not zlib headers and footers at all....


Naw dude we are cool. Just some of the thigns you where doing I felt was wrong. That never made me not like you. Just disagreed with what you where doing.

But as far as the header and footer, I'm pretty sure it is zlip.. The header is 78DA, and footer ends in YYYY. In patch before I mess with it....

But defently sounds odd right?

Originally posted by PS3LUV3R View Post
Seems like you're doing everything right. And I'm pretty sure events isn't split. Maybe you're not copying to the right offsets?

A problem I had was using paste insert instead of paste write. MAKE SURE you use that when copying your recomp into b4a0. That was messing me up the whole time lol.

---------- Post added at 08:42 PM ---------- Previous post was at 08:40 PM ----------



0.o say what?

I don't even understand what you're saying but, since my way works, I guess I have those right? Lol.


Yeah, i have made sure I wasn't making little mistakes.

Most defently using my recomp to copy back in the b4a0.,

Defently using right offsets. I took screen shot of it lol. Cause I thought the same thing Smile

Copyright © 2024, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo