deep3r
Member
Basic Fast File Modding GSCs
This is a pretty good break down of Black Ops Modding for JTAGs this we be a tutorial on modding the .GSC of Fast Files for Call Of Duty, Black Ops.
This will help people from getting possible errors when modding their Patches. K-brizzles tutorial can help you on statements. My tutorial is to help you run scripts without getting errors and to describe what scripts do.
The first thing we need to talk about is cheat protection and Dvars, so people don't have trouble using Dvars. As alot of you may know Treyarch did a pretty good job with cheat protection to stop people changing the Dvar values. This of course shouldn't matter because Dvars are read-only and cannot be changed. Scripts are read and write so with scripts the possibility are endless because you can edit what it'll do unlike Dvars you can just editing the values. As you may know in Modern Warefare 2 unlimited Ammo dvar was removed but someone released a Script which was just the same as using Unlimited Ammo. So removing the Cheat Protection and using Dvars is not required.
None of the following is from any Fast Files these codes are off the top of my head. So none of these codes will work so please head to K-brizzles tutorial on Statements.
First I'll be teaching you
OnPlayerConnect is useful because if you only want to run a thread once or set a person with a varaible once.
Alright this code is pretty simple as you can see "self.ANYTHING = 0;" which means that the variable "ANYTHING" will be equal to "0" so when the player connects to the game it'll set this variable.
When people spawn they will begin to do the thread called "DoThread".
We will look at the
This will tell the function or thread when to stop so "self endon("disconnect");" will stop the thread from running if the player gets disconnected. "self endon("death"):" will stop the thread if the player dies.
Next you can see that "if(self.ANYTHING == 0)" this will mean that if the Variable ANYTHING is equal to 0 then it'll do the command and are around the Braces {braces} which in the case is "self iPrintlnbold("texthere"); self.ANYTHING = 1;" which mean it'll only run the command "iPrintlnbold("texthere"); self.ANYTHING = 1;" if the varible "ANYTHING" is equal to 0. Let's just say the player only just connected and spawned that means it would do this but after they died because the Variable has been set to 1 and it'll only run the commands if the variable is equal to 0 it'll only set the variable to one if the play has just connected to the game.
Dvar Changing Values
We're going to add the DVAR to have a clip size extra large.
To do this, lets get the add dvar code:
And fill it with our own values:
This will mean the the value of that Dvar has now been set to 50 which will then Multiply the Clip Size by the value set in this case it's 50 so if you're clip originally was 10 then you're clip will be 500.
In another Dvar to make M-16s automatic.
This will mean how long it'll take before they are able to shoot the gun again like the M-16 can't be automatic no matter have fast you push the trigger because the gun has to cool down. So in this case the value is set to 0 which will mean an M-16 won't have cool down time.
Braces
Next thing you will notice in the code is the brace system, as I like to refer to it.
How it works:
- "{" depicts that the line after will be ONE more tab in.
- "}" depicts the code before will be ONE more tab in.
Self waittil("player_spawned");
This is what you'll need to make threads happen or setting variable when the variable is set in this case we need to use a thread in missions.GSC.
In this case it'll "waittill" the player has spawned until it does the thread called do Mods(); but you'll need to created a new thread called "doMods()" or it'll give an error "Unknown function".
This will mean when they spawn text will show on the screen saying "Text-Here" but if they die the Text will disappear but it'll stop running the command if the player dies.
This will give a Syntax error because the amount of braces opened in thread haven't been closed.
Self waittil("player_spawned");
This is what you'll need to make threads happen or setting variable when the variable is set in this case we need to use a thread in missions.GSC.
In this case it'll "waittill" the player has spawned until it does the thread called do Mods(); but you'll need to created a new thread called "doMods()" or it'll give an error "Unknown function".
This will mean when they spawn text will show on the screen saying "Text-Here" but if they die the Text will disappear but it'll stop running the command if the player dies.
This will give a Syntax error because the amount of braces opened in thread haven't been closed.
Tutorial Created by Deep3r
If you have any thing you want be to talk about in Fast File modding please ask and i'll add it to the tutorial. I'll also be adding working codes that've found in this thread.
This is a pretty good break down of Black Ops Modding for JTAGs this we be a tutorial on modding the .GSC of Fast Files for Call Of Duty, Black Ops.
This will help people from getting possible errors when modding their Patches. K-brizzles tutorial can help you on statements. My tutorial is to help you run scripts without getting errors and to describe what scripts do.
The first thing we need to talk about is cheat protection and Dvars, so people don't have trouble using Dvars. As alot of you may know Treyarch did a pretty good job with cheat protection to stop people changing the Dvar values. This of course shouldn't matter because Dvars are read-only and cannot be changed. Scripts are read and write so with scripts the possibility are endless because you can edit what it'll do unlike Dvars you can just editing the values. As you may know in Modern Warefare 2 unlimited Ammo dvar was removed but someone released a Script which was just the same as using Unlimited Ammo. So removing the Cheat Protection and using Dvars is not required.
None of the following is from any Fast Files these codes are off the top of my head. So none of these codes will work so please head to K-brizzles tutorial on Statements.
First I'll be teaching you
Code:
OnPlayerConnect
OnPlayerConnect is useful because if you only want to run a thread once or set a person with a varaible once.
Code:
onplayerconnect
{
self.ANYTHING = 0;
}
onplayerspawned
{
self thread doTHREAD();
}
doThread()
{
self endon ("disconnect")
self endon ("death")
{
if (self.ANYTHING==0) {
self iPrintlnBold("texthere");
self.ANYTHING = 1;
}
}
}
Alright this code is pretty simple as you can see "self.ANYTHING = 0;" which means that the variable "ANYTHING" will be equal to "0" so when the player connects to the game it'll set this variable.
When people spawn they will begin to do the thread called "DoThread".
We will look at the
Code:
self endon("disconnect");
self endon("death");
This will tell the function or thread when to stop so "self endon("disconnect");" will stop the thread from running if the player gets disconnected. "self endon("death"):" will stop the thread if the player dies.
Next you can see that "if(self.ANYTHING == 0)" this will mean that if the Variable ANYTHING is equal to 0 then it'll do the command and are around the Braces {braces} which in the case is "self iPrintlnbold("texthere"); self.ANYTHING = 1;" which mean it'll only run the command "iPrintlnbold("texthere"); self.ANYTHING = 1;" if the varible "ANYTHING" is equal to 0. Let's just say the player only just connected and spawned that means it would do this but after they died because the Variable has been set to 1 and it'll only run the commands if the variable is equal to 0 it'll only set the variable to one if the play has just connected to the game.
Dvar Changing Values
We're going to add the DVAR to have a clip size extra large.
To do this, lets get the add dvar code:
Code:
setDvar( "dvar", value );
And fill it with our own values:
Code:
setDvar( "player_clipsizemultiplier", 50 );
This will mean the the value of that Dvar has now been set to 50 which will then Multiply the Clip Size by the value set in this case it's 50 so if you're clip originally was 10 then you're clip will be 500.
In another Dvar to make M-16s automatic.
Code:
setDvar( "player_fireburstcooldown", 0);
This will mean how long it'll take before they are able to shoot the gun again like the M-16 can't be automatic no matter have fast you push the trigger because the gun has to cool down. So in this case the value is set to 0 which will mean an M-16 won't have cool down time.
Braces
Next thing you will notice in the code is the brace system, as I like to refer to it.
How it works:
- "{" depicts that the line after will be ONE more tab in.
- "}" depicts the code before will be ONE more tab in.
Code:
Example()
{
If (self.name == "deep3r")
{
// Code Here
}
else
{
// Code Here
}
}
Self waittil("player_spawned");
This is what you'll need to make threads happen or setting variable when the variable is set in this case we need to use a thread in missions.GSC.
Code:
monitorFallDistance()
{
self endon("disconnect");
for(;;) {
self waittill("spawned_player");
self thread doMods();
}
}
In this case it'll "waittill" the player has spawned until it does the thread called do Mods(); but you'll need to created a new thread called "doMods()" or it'll give an error "Unknown function".
Code:
monitorFallDistance()
{
self endon("disconnect");
for(;;) {
self waittill("spawned_player");
self thread doMods();
}
}
doMods()
{
self endon("disconnect");
self endon("death");
{
self iPrintlnbold("Text-here");
}
}
This will mean when they spawn text will show on the screen saying "Text-Here" but if they die the Text will disappear but it'll stop running the command if the player dies.
Code:
doMods()
{
self endon("disconnect");
self endon("death");
{
self iPrintlnbold("Text-here");
}
This will give a Syntax error because the amount of braces opened in thread haven't been closed.
Self waittil("player_spawned");
This is what you'll need to make threads happen or setting variable when the variable is set in this case we need to use a thread in missions.GSC.
Code:
monitorFallDistance()
{
self endon("disconnect");
for(;;) {
self waittill("spawned_player");
self thread doMods();
}
}
In this case it'll "waittill" the player has spawned until it does the thread called do Mods(); but you'll need to created a new thread called "doMods()" or it'll give an error "Unknown function".
Code:
monitorFallDistance()
{
self endon("disconnect");
for(;;) {
self waittill("spawned_player");
self thread doMods();
}
}
doMods()
{
self endon("disconnect");
self endon("death");
{
self iPrintlnbold("Text-here");
}
}
This will mean when they spawn text will show on the screen saying "Text-Here" but if they die the Text will disappear but it'll stop running the command if the player dies.
Code:
doMods()
{
self endon("disconnect");
self endon("death");
{
self iPrintlnbold("Text-here");
}
This will give a Syntax error because the amount of braces opened in thread haven't been closed.
Tutorial Created by Deep3r
If you have any thing you want be to talk about in Fast File modding please ask and i'll add it to the tutorial. I'll also be adding working codes that've found in this thread.