What's new

[TUT] Black Ops .GSC Scripting

deep3r

deep3r

Member
Messages
453
Reaction score
301
Points
125
Sin$
0
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

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.
 
I am Jake

I am Jake

Enthusiast
Messages
222
Reaction score
29
Points
85
Sin$
0
ZOMG MAH GAWD TY TYTYTYTYTYYTYTYTYTYTY THANK YOU! ZOMG +REPSZZ
 
jester

jester

Retired
Retired
Legendary Veteran Mythical Veteran Scaling the Mountain
Messages
3,794
Reaction score
3,763
Points
650
Sin$
0

ThA PreTeNDeRz - Pretending to code/mod/reverse since 2010!

[ThA PreTeNDeRz] xI cHOcOLaTe
[ThA PreTeNDeRz] AiDaNzz
[ThA PreTeNDeRz] ArMaN 360

ThA PreTeNDeRz PROUDLY PRESENT:

REAL TIME HALO!!! Details here - http://paste2.org/p/939404
BLACK OPS GSC MODDING
 
Apathy

Apathy

Member
Programmer Modder Hardened Veteran
Messages
3,007
Reaction score
920
Points
455
Sin$
7
kbrizzle already posted his coding tutorial with a few added black ops tweaks in here
 
deep3r

deep3r

Member
Messages
453
Reaction score
301
Points
125
Sin$
0
kbrizzle already posted his coding tutorial with a few added black ops tweaks in here

His tutorial teaches you about statements that are used in Black ops, This is completely didn't this is showing you how Black ops scripts work and run.
 
XKLUTCHIN OUTX

XKLUTCHIN OUTX

Enthusiast
Messages
523
Reaction score
74
Points
95
Sin$
0
well can you change
Code:
setDvar( "player_fireburstcooldown", 0);
into this
Code:
player_fireburstcooldown "0"
to put in a code post
 
kiwimoosical

kiwimoosical

Getting There
Messages
1,123
Reaction score
474
Points
205
Sin$
7
kbrizzles is better :tongue:
Dvars are NOT read-only
ModdingDev's patch is going to be sex xD
 
deep3r

deep3r

Member
Messages
453
Reaction score
301
Points
125
Sin$
0
kbrizzles is better :tongue:
Dvars are NOT read-only
ModdingDev's patch is going to be sex xD

His is for statements and mine isn't. If you where to compare our tutorials you'd be stupid. K-brizzle tutorial is great and useful for statements.

Also Dvars are Read-Only... Please tell me how you can edit what a Dvar can do.

Stop trying to advertise on this site.
 
kiwimoosical

kiwimoosical

Getting There
Messages
1,123
Reaction score
474
Points
205
Sin$
7
Code:
SetDvarIfUninitialized("this is a new dvar that was written", 69);
That's how you write a dvar.

Flaming removed. :smile: ~Ells
 
deep3r

deep3r

Member
Messages
453
Reaction score
301
Points
125
Sin$
0
Code:
SetDvarIfUninitialized("this is a new dvar that was written", 69);
That's how you write a dvar. Stop actinv like you know everything because you hardly know anything you tool. Now you write a script that uses conditional statements to monitor and use that dvar... suck my **** you tool, I will do what I want :tongue:

To add, your tutorial doesn't show how the game engine processes anything, doesnt show proper usage of the games OOP features and is just horrible...

Please don't come on here and lick my *** at one point and then try be smart the next...

http://pastebin.com/sWmjT9j2

Since I released the .XEX the *** licking stop from everyone. It really makes no sense. You're not the only one.
 
kiwimoosical

kiwimoosical

Getting There
Messages
1,123
Reaction score
474
Points
205
Sin$
7
Haha, tool

That's not "licking your ***," that's asking if you want to make something with me you dumba**, don't be proud that you figured out how to remove RSA, its really not that hard... your a tool who thinks he's cool because he made a TU3 xex... your an imbusile who Thinks hes Smart, your really not. So please, stop acting like you know everything...
 
C

Crippler

Getting There
Messages
1,942
Reaction score
598
Points
230
Sin$
0
Haha, tool

That's not "licking your ***," that's asking if you want to make something with me you dumba**, don't be proud that you figured out how to remove RSA, its really not that hard... your a tool who thinks he's cool because he made a TU3 xex... your an imbusile who Thinks hes Smart, your really not. So please, stop acting like you know everything...
Reached my quota already?? :cursing: :cursing: :cursing: :cursing: :cursing:

It's the thought that counts rite Kiwi? :laugh:
 
irFrag

irFrag

Getting There
Messages
1,879
Reaction score
398
Points
190
Sin$
0
Haha, tool

That's not "licking your ***," that's asking if you want to make something with me you dumba**, don't be proud that you figured out how to remove RSA, its really not that hard... your a tool who thinks he's cool because he made a TU3 xex... your an imbusile who Thinks hes Smart, your really not. So please, stop acting like you know everything...
Being a **** about it doesn't help prove your point, Due to the fact that I don't like either of you I ain't choosing sides. However, If removing RSA was so easy why does the community need everything? It's an accomplishment out of him, His tutorial does what it does no need to argue about it. If you going to come here and be a **** and insults that my grandmother would use just go back to your s*** website. Please & Thank you. ******.
 
kiwimoosical

kiwimoosical

Getting There
Messages
1,123
Reaction score
474
Points
205
Sin$
7
Being a **** about it doesn't help prove your point, Due to the fact that I don't like either of you I ain't choosing sides. However, If removing RSA was so easy why does the community need everything? It's an accomplishment out of him, His tutorial does what it does no need to argue about it. If you going to come here and be a **** and insults that my grandmother would use just go back to your s*** website. Please & Thank you. ******.
Okay, first off I was just trying to tell him a portion of his tutorial was wrong, now I talked to him on AIM about it and its all good now, second, I wasn't acting as if him removing RSA was not an accomplishment for him, he was just actin like no one else could do it because he was the first to post it, third, who are you to talkagainst being a **** and then start acting like one, so shut your mouth skid, fourth, ifyour grandma talks like that, she's either insane, or awesome xD
So please, skid, go away, you were adopted, go back to your orphanage
 
irFrag

irFrag

Getting There
Messages
1,879
Reaction score
398
Points
190
Sin$
0
Okay, first off I was just trying to tell him a portion of his tutorial was wrong, now I talked to him on AIM about it and its all good now, second, I wasn't acting as if him removing RSA was not an accomplishment for him, he was just actin like no one else could do it because he was the first to post it, third, who are you to talkagainst being a **** and then start acting like one, so shut your mouth skid, fourth, ifyour grandma talks like that, she's either insane, or awesome xD
So please, skid, go away, you were adopted, go back to your orphanage
No, I'm being a **** with you cause you were being a **** to him ,and almost half of the people you talk to you are a **** to them. Your still going on with your s*** reply's too, Like I said.
"I may be adopted, but sir I am not a idiot" Don't bother replying. :tongue:
 
kiwimoosical

kiwimoosical

Getting There
Messages
1,123
Reaction score
474
Points
205
Sin$
7
No, I'm being a **** with you cause you were being a **** to him ,and almost half of the people you talk to you are a **** to them. Your still going on with your s*** reply's too, Like I said.
"I may be adopted, but sir I am not a idiot" Don't bother replying. :tongue:
Lol, like isaid, its all good between us, but let me make a correction. You are an idiotic orphan, I bet your british too :tongue:
 
teh1337

teh1337

Some call me the Dear Leader-most just say teh1337
Experienced Veteran Programmer Frame In Gold
Messages
1,555
Reaction score
2,224
Points
375
Sin$
0
Lol, like isaid, its all good between us, but let me make a correction. You are an idiotic orphan, I bet your british too :tongue:
Soz Fraggeh, but OWNT

and kiwi are u back from florida yet? i wanna script s*** and i need a skid to hlep
 
Top Bottom
Login
Register