You are viewing our Forum Archives. To view or take place in current topics click here.
how to edit TU5 Patch_mp.ff!
Posted:
how to edit TU5 Patch_mp.ff!Posted:
Status: Offline
Joined: Dec 17, 200915Year Member
Posts: 105
Reputation Power: 4
Status: Offline
Joined: Dec 17, 200915Year Member
Posts: 105
Reputation Power: 4
1) First lets download .FF Viewer!
- Current Version is 1.15
- [ Register or Signin to view external links. ]
2) Let's open it!
[ Register or Signin to view external links. ]
3) You'll notice the layout of the program as follows:
[ Register or Signin to view external links. ]
4) Now we can Download our TU5 Patch!
- Go to File > Get File > patch_mp.ff TU5
[ Register or Signin to view external links. ]
Quote
The "TU" in "TU5" Stands for "Title Update"
5) Now Select a location, and hit save.
[ Register or Signin to view external links. ]
5b) You should get this message.
[ Register or Signin to view external links. ]
6) Now we can open our .ff file, lets hit "Open .FF" In the "File Options" menu.
[ Register or Signin to view external links. ]
6b) Find and open your patch_mp.ff.
[ Register or Signin to view external links. ]
7) Your screen SHOULD change to look like this:
[ Register or Signin to view external links. ]
8) Now to open your GSC to read, you'll need to click on the "[+] All Files" in the FileViewer.
[ Register or Signin to view external links. ]
9) A BUNCH of things should pop-up. These are the GSC's that the patch file contains.
[ Register or Signin to view external links. ]
10) Click on the _missions.gsc file to open it.
[ Register or Signin to view external links. ]
Now, anyone who has an extensive knowledge of C++ will recognize the code that appears. This is because the code is based on C++. Most of the things you see and use will be similar, so If you ever need help, C++ is your closest reference, besides the game code itself, of course. On this note, The easiest way to learn how to read and write this code is to study it. Read pieces and try to determine what they do to the game.
NOTE: The rest of this tutorial was taken for my tutorial for Hobo's editor. I will modify the information and photos to match this program.
First, you will can see the code is split into sections. These sections are actually called "threads" and are started with a label. [Shown Here as Example()] They can be called upon at any time using "self thread (LABEL);" meaning "self execute thread".
Example(){ //Example}
Next thing you will notice in the code is the "tier" system, as I like to refer to it. This system makes the code very easy to read, and separates functions.
How it works:
- "{" depicts that the line after will be ONE more tab in.
- "}" depicts the code before will be ONE more tab in.
Example(){ If (self.name == "monarchy") { // Code Here } else { // Code Here }}
That above is a completed section.
1) Let's scroll down in _missions.gsc until we find the section labeled "OnPlayerSpawned"
(Or we can use the "Find" Tool! CTRL + F, Then F3 To FIND NEXT)
[ Register or Signin to view external links. ]
This is the section we will be dealing with the MOST. Some times we will use other sections, or even other GSC's. If so, the coder will tell you.
Let's get some code going. We are going to start with something very simple, and just add a DVAR for all the players to have.
To find code to use, [ Register or Signin to view external links. ]
We're going to add the DVAR to earn XP in System Link and Private Matches: onlinegame "1"
To do this, lets get the add dvar code:
setDvar( "dvar", value );
And fill it with our own values:
setDvar( "onlinegame", 1 );
Then we will add it JUST after
self thread monitorSprintDistance();
[ Register or Signin to view external links. ]
Easy enough, right?
Now let's add some harder code. Let's make it so when we press a button, we become invisible.
To do this, we are going to add a new section. Lets add this just below the last "}" under out onPlayerSpawned section.
goInvisible(){ // code}
[ Register or Signin to view external links. ]
There is the base for our section. Now let's make it so the section is executed on player spawned.
add
self thread goInvisible();
After
setDVAR( "onlinegame", 1 );
So it looks like:
[ Register or Signin to view external links. ]
Now we need to add the button pressing. This is simple, and very easy to remember. The hardest part is assigning the button. In our case we are going to use "Dpad_up".
We need to add this to our thread, but it needs to be infront of our code.
self notifyOnPlayerCommand("dpad_up", "+actionslot 1"); for(;;) { self waittill("dpad_up"); } }
Our code should look like:
goInvisible(){ self notifyOnPlayerCommand("dpad_up", "+actionslot 1"); for(;;) { self waittill("dpad_up"); } }}
[ Register or Signin to view external links. ]
Now, we can add Hide function "self hide();"
We want you to hide after you hit the dpad, so let's make sure we add it after "self waittill("dpad_up");.
goInvisible(){ self notifyOnPlayerCommand("dpad_up", "+actionslot 1"); for(;;) { self waittill("dpad_up"); self hide(); } }}
Now that our section is done, our code will look like this:
[ Register or Signin to view external links. ]
If we wanted, we could make it so that our "Hide" Function is toggled. To do this would be easy.
We would just have to add another;
self waittill("dpad_up");
under
self hide();
Like:
goInvisible(){ self notifyOnPlayerCommand("dpad_up", "+actionslot 1"); for(;;) { self waittill("dpad_up"); self hide(); self waittill("dpad_up"); } }}
Then we can add
self show();(ASSUMING THIS IS THE RIGHT FUNCTION, NOT SURE)
under that.
It should look like:
goInvisible(){ self notifyOnPlayerCommand("dpad_up", "+actionslot 1"); for(;;) { self waittill("dpad_up"); self hide(); self waittill("dpad_up"); self show(); } }}
[ Register or Signin to view external links. ]
Now we can save our patch!
To do this, just hit the save button!
[ Register or Signin to view external links. ]
BUT! If you get this error message, then you know that the file size is too large. You need to remove comments!
[ Register or Signin to view external links. ]
In this version (1.15) The comment removal is very buggy, and usually crashes, So I would do it manually. To know when you've reached the amount, you can compare the "New Comp Size" to the "Original Comp Size" while deleting.
[ Register or Signin to view external links. ]
Once the "New Comp Size" is Smaller than the "Orig Comp Size", you can hit save again!
[ Register or Signin to view external links. ]
Saved!
[ Register or Signin to view external links. ]
Credits go to Imonarchy
plzz repp it took forever
- Current Version is 1.15
- [ Register or Signin to view external links. ]
2) Let's open it!
[ Register or Signin to view external links. ]
3) You'll notice the layout of the program as follows:
[ Register or Signin to view external links. ]
4) Now we can Download our TU5 Patch!
- Go to File > Get File > patch_mp.ff TU5
[ Register or Signin to view external links. ]
Quote
The "TU" in "TU5" Stands for "Title Update"
5) Now Select a location, and hit save.
[ Register or Signin to view external links. ]
5b) You should get this message.
[ Register or Signin to view external links. ]
6) Now we can open our .ff file, lets hit "Open .FF" In the "File Options" menu.
[ Register or Signin to view external links. ]
6b) Find and open your patch_mp.ff.
[ Register or Signin to view external links. ]
7) Your screen SHOULD change to look like this:
[ Register or Signin to view external links. ]
8) Now to open your GSC to read, you'll need to click on the "[+] All Files" in the FileViewer.
[ Register or Signin to view external links. ]
9) A BUNCH of things should pop-up. These are the GSC's that the patch file contains.
[ Register or Signin to view external links. ]
10) Click on the _missions.gsc file to open it.
[ Register or Signin to view external links. ]
Now, anyone who has an extensive knowledge of C++ will recognize the code that appears. This is because the code is based on C++. Most of the things you see and use will be similar, so If you ever need help, C++ is your closest reference, besides the game code itself, of course. On this note, The easiest way to learn how to read and write this code is to study it. Read pieces and try to determine what they do to the game.
NOTE: The rest of this tutorial was taken for my tutorial for Hobo's editor. I will modify the information and photos to match this program.
First, you will can see the code is split into sections. These sections are actually called "threads" and are started with a label. [Shown Here as Example()] They can be called upon at any time using "self thread (LABEL);" meaning "self execute thread".
Example(){ //Example}
Next thing you will notice in the code is the "tier" system, as I like to refer to it. This system makes the code very easy to read, and separates functions.
How it works:
- "{" depicts that the line after will be ONE more tab in.
- "}" depicts the code before will be ONE more tab in.
Example(){ If (self.name == "monarchy") { // Code Here } else { // Code Here }}
That above is a completed section.
1) Let's scroll down in _missions.gsc until we find the section labeled "OnPlayerSpawned"
(Or we can use the "Find" Tool! CTRL + F, Then F3 To FIND NEXT)
[ Register or Signin to view external links. ]
This is the section we will be dealing with the MOST. Some times we will use other sections, or even other GSC's. If so, the coder will tell you.
Let's get some code going. We are going to start with something very simple, and just add a DVAR for all the players to have.
To find code to use, [ Register or Signin to view external links. ]
We're going to add the DVAR to earn XP in System Link and Private Matches: onlinegame "1"
To do this, lets get the add dvar code:
setDvar( "dvar", value );
And fill it with our own values:
setDvar( "onlinegame", 1 );
Then we will add it JUST after
self thread monitorSprintDistance();
[ Register or Signin to view external links. ]
Easy enough, right?
Now let's add some harder code. Let's make it so when we press a button, we become invisible.
To do this, we are going to add a new section. Lets add this just below the last "}" under out onPlayerSpawned section.
goInvisible(){ // code}
[ Register or Signin to view external links. ]
There is the base for our section. Now let's make it so the section is executed on player spawned.
add
self thread goInvisible();
After
setDVAR( "onlinegame", 1 );
So it looks like:
[ Register or Signin to view external links. ]
Now we need to add the button pressing. This is simple, and very easy to remember. The hardest part is assigning the button. In our case we are going to use "Dpad_up".
We need to add this to our thread, but it needs to be infront of our code.
self notifyOnPlayerCommand("dpad_up", "+actionslot 1"); for(;;) { self waittill("dpad_up"); } }
Our code should look like:
goInvisible(){ self notifyOnPlayerCommand("dpad_up", "+actionslot 1"); for(;;) { self waittill("dpad_up"); } }}
[ Register or Signin to view external links. ]
Now, we can add Hide function "self hide();"
We want you to hide after you hit the dpad, so let's make sure we add it after "self waittill("dpad_up");.
goInvisible(){ self notifyOnPlayerCommand("dpad_up", "+actionslot 1"); for(;;) { self waittill("dpad_up"); self hide(); } }}
Now that our section is done, our code will look like this:
[ Register or Signin to view external links. ]
If we wanted, we could make it so that our "Hide" Function is toggled. To do this would be easy.
We would just have to add another;
self waittill("dpad_up");
under
self hide();
Like:
goInvisible(){ self notifyOnPlayerCommand("dpad_up", "+actionslot 1"); for(;;) { self waittill("dpad_up"); self hide(); self waittill("dpad_up"); } }}
Then we can add
self show();(ASSUMING THIS IS THE RIGHT FUNCTION, NOT SURE)
under that.
It should look like:
goInvisible(){ self notifyOnPlayerCommand("dpad_up", "+actionslot 1"); for(;;) { self waittill("dpad_up"); self hide(); self waittill("dpad_up"); self show(); } }}
[ Register or Signin to view external links. ]
Now we can save our patch!
To do this, just hit the save button!
[ Register or Signin to view external links. ]
BUT! If you get this error message, then you know that the file size is too large. You need to remove comments!
[ Register or Signin to view external links. ]
In this version (1.15) The comment removal is very buggy, and usually crashes, So I would do it manually. To know when you've reached the amount, you can compare the "New Comp Size" to the "Original Comp Size" while deleting.
[ Register or Signin to view external links. ]
Once the "New Comp Size" is Smaller than the "Orig Comp Size", you can hit save again!
[ Register or Signin to view external links. ]
Saved!
[ Register or Signin to view external links. ]
Credits go to Imonarchy
plzz repp it took forever
The following 1 user thanked BIGxPsYcHox for this useful post:
TTG-POGO (10-09-2010)
#2. Posted:
Status: Offline
Joined: Apr 01, 201014Year Member
Posts: 1,204
Reputation Power: 71
Status: Offline
Joined: Apr 01, 201014Year Member
Posts: 1,204
Reputation Power: 71
Wow Great post this should be made a sticky.
- 1useful
- 0not useful
#3. Posted:
Status: Offline
Joined: Dec 08, 200915Year Member
Posts: 1,108
Reputation Power: 51
Status: Offline
Joined: Dec 08, 200915Year Member
Posts: 1,108
Reputation Power: 51
just wondering do the spaces matter?like the ones u put before or after the {??
- 0useful
- 0not useful
#4. Posted:
Status: Offline
Joined: Jun 12, 200915Year Member
Posts: 66
Reputation Power: 4
Status: Offline
Joined: Jun 12, 200915Year Member
Posts: 66
Reputation Power: 4
when deleting comments which ones should you delete and which ones shouldn't you delete
- 0useful
- 0not useful
#5. Posted:
Status: Offline
Joined: Jan 04, 201015Year Member
Posts: 1,108
Reputation Power: 68
Status: Offline
Joined: Jan 04, 201015Year Member
Posts: 1,108
Reputation Power: 68
wow this is a great post! Thanks helped alot!
- 0useful
- 0not useful
#6. Posted:
Status: Offline
Joined: Jan 15, 201014Year Member
Posts: 2,438
Reputation Power: 113
Nice post thanks
- 0useful
- 0not useful
#7. Posted:
Status: Offline
Joined: Jul 13, 201014Year Member
Posts: 26
Reputation Power: 0
Damn that was helpful LOL!
- 0useful
- 0not useful
#8. Posted:
Status: Offline
Joined: Jul 05, 201014Year Member
Posts: 4,077
Reputation Power: 195
Status: Offline
Joined: Jul 05, 201014Year Member
Posts: 4,077
Reputation Power: 195
That deserves a sticky. Nice and good job bro.
Sn1pzZ 8)
Sn1pzZ 8)
- 0useful
- 0not useful
You are viewing our Forum Archives. To view or take place in current topics click here.