Tutorials Navigation

Tutorials: 12,432 Categories: 33
Total Views: 23,616,716

How to GSC Mod Call of Duty

Tutorial Name: How to GSC Mod Call of Duty  

Category: Xbox 360 Miscellaneous

Submitted By: Sulfur

Date Added:

Comments: 45

Views: 37,677



Chapter 1: Understanding the Basics
Chapter 2: Binding
Chapter 3: Commands
Chapter 4: Dvars
Chapter 5: Useful Dvars
Chapter 6: Scripts
Chapter 7: Automatic Stats
Chapter 8: Experience
Chapter 9: Editing Killstreaks
Chapter 10: Useful Script Functions
Chapter 11: Ending Note


Chapter 1 : Understanding the Basics
Before diving into all the information that I have about GSC Modding, there are some things that you should know. The following terms are used a lot throughout the book, so familiarize yourself with them:
Binding: assigning a command to a button on the Controller.
Dvars: developer variables that normally refer to the settings of the game.

When editing any GSC file, you never want to change the size of the file. Therefore, when using a hex editor, you want to overwrite, rather than insert words. Changing the size guarantees that the file will not run properly.


Chapter 2 : Binding
Binding can be used to carry out a wide variety of tasks. The only file that you will binding multiplayer controls in is the code_post_gfx_mp.ff . There are two different ways you can edit the file. The way I'm going to show you below is more reliable. As long as you correctly hex the values, nothing should go wrong. Open up the code_post_gfx_mp.ff in a hex editor. Cut the first 11 bytes of the file out and paste them into a new document. You'll need the bytes later on down the road, don't lose them. After you've deleted the bytes, open up SimplyZip and navigate your way over to ZLIB.

After you've decompressed the file, there should be a new file in the same directory. Open the new file with a hex editor. Search (Ctrl + F) for button_config_alpha.cfg. The first result that pops up is the one you want.

The following words define the different Xbox buttons in hex:
BUTTON_A (A Button)
BUTTON_B (B Button)
BUTTON_X (X Button)
BUTTON_Y (Y Button)
BUTTON_START (Start Button)
BUTTON_BACK (Back Button)
BUTTON_RSHLDR (Primary Grenade Button)
BUTTON_LSHLDR (Special Grenade Button)
BUTTON_RTRIG (Shoot Button)
BUTTON_RSTICK (Melee Button)
BUTTON_LSTICK (Sprint Button)

Before writing bind, you must make sure to put two periods before it with the hex codes of 0D and 0A in that order. Then you have to designate which button you will be binding on the controller. After designating the button you write a quotation mark, which marks the beginning of the command itself. To end the command, you end the quotation mark. There are many commands that you can bind to buttons. Please refer to Chapter 3 for a list of commands. Now that you've gotten all your binds down, you're going to want to compress the file the same way you decompressed it with SimplyZip. Instead of checking decompress, however, you will be checking compress. Then, you have to add the 11 bytes back that you deleted after compressing the file.


Chapter 3 : Commands
Call of Duty developers put a lot of commands into the game to help them create it. They didn't realize that players would be able to access some of them later on down the road. The following commands are very useful:
ClientKick 0 (Kicks the client that you have specified, in this case 0)
Exec (Executes a .cfg file)
Fast_Restart (Restarts the map, which is sometimes needed to enable certain dvars)
Give Ammo (Gives you an automatic refill on ammunition)
Give All (Gives you all the guns in multiplayer, including the developer weapon)
Give Airstrike_Mp (Gives you an airstrike)
Give Helicopter_Mp (Gives you a helicopter)
Give Radar_Mp (Gives you UAV)
God (Gives you infinite health)
Noclip (Gives you infinite health and allows you to fly through the map)


Chapter 4 : Dvars
Dvars control a lot of different aspects of the game. There are a few different ways that you can activate dvars in the game, and outside of the game. The first way is to bind the dvar to a button. In order to do so you simply have to replace the command with a dvar. Dvars always have some text and then a value afterward. Look at the example below:

self setClientDvar( "cg_laserForceOn", "1" );

If you want to use another dvar, you simply swap out the text and value with the one you're looking for. However, using the above method poses a problem. How are you supposed to set the dvar back to normal again in case you don't like the results? Well, there's a solution to the problem. It's called toggling. Look at the example below:

self setClientDvar( "cg_laserForceOn", "1 0" );

In the example above, the first time you hit the A Button, the Laser will be Activated. The second time you hit the A Button, it will be deactivated. The third time, it will be Activated. You can have as many toggles as you want, but make sure you write them down somewhere because they can become very confusing in a short amount of time if you forget how many toggles you assigned to a button. Another thing you can do with binding is assign more than one command or dvar to a button, as shown below.

self setClientDvar( "cg_laserForceOn 1;jump_height 999" );

Notice that you must put a ; in between the two commands. If you were binding three different commands to the same button, then you would need another ;. Remember not to add any unnecessary spaces because that will cause the game to freeze. You do not need a space before or after the ;. Another way to activate dvars is to put them with the unbinds. Just like there are binds, there are unbinds. They are found at the top of each button configuration. You do not want to activate dvars with unbinding however. It just ends up being a complete mess. Right below each button configuration, there are unbinds. The first set of unbinds do not apply to the Xbox and can therefore be overwritten without causing any troubles. You can overwrite the Xbox unbinds, but if you're not careful about it, it could end up really screwing up your gameplay.

There is only one good reason to use dvars with unbinds. If you have a lot of dvars that you want to activate automatically without wasting some of your buttons, then unbinds are the way to go. When you go to the Default Configuration in the game, the dvars will automatically be activated. There is no way to deactivate them though. Make sure they are dvars that you want all game.

Activating dvars with unbinds works a little differently. You need two periods before every dvar with the hex codes of 0D and 0A in that order. Skip the two periods for the very first dvar, it is not needed. Then, you have to write set and the dvar. After writing the dvar, you need to include a space before writing the value in in quotation marks. After the second quotation mark, you can start another dvar immediately. If you are in the middle of an unbind when you're done writing in dvars, fill the rest of the unbind with spaces. Otherwise, the last dvar will not initiate properly. The third way of activating dvars is through configuration files. You want to use useless configuration files when doing so. Otherwise, you could screw up the way the game plays.

In case you don't see the hints that it's useless I'll point them out to you. First off, it is a developer .cfg. Most developer .cfgs are useless. Only developers used them and they weren't intended to be used for the game. So you can begin typing dvars in right after the period after .cfg


Chapter 5 : Useful Dvars
There are hundreds of dvars, and most of them aren't very useful, so I've made a list up for you of the most useful dvars (the value in parenthases is the value you'd most likely want):
bg_fallDamageMinHeight "999" (Sets the minimum height you must fall before receiving damage [0-999])
bg_fallDamageMaxHeight "999" (Sets the maximum height you must fall before receiving damage [0-999])
cg_firstPersonTracerChance "1" (Forces tracer rounds [0-1])
cg_tracerchance "1" (Forces tracer rounds [0-1])
cg_tracerlength "400" (Indicates the length of tracer rounds [0-9999])
cg_tracerSpeed "1500" (Indicates the speed of tracer rounds [0-9999])
cg_tracerWidth "6" (Indicates the width of tracer rounds [0-9999])
cg_laserForceOn "1" (Forces a laser to come out of the gun [0-1])
customclass1 "" (Sets the name of the first custom class [Text])
customclass2 "" (Sets the name of the second custom class [Text])
customclass3 "" (Sets the name of the third custom class [Text])
customclass4 "" (Sets the name of the fourth custom class [Text])
customclass5 "" (Sets the name of the fifth custom class [Text])
g_gravity "80" (Sets the gravity of the map [0-999])
g_speed "230" (Sets the walking pace [0-999])
jump_height "999" (Sets the player jump height [0-999])
motd "" (Sets the Message of the Day [Text])
onlinegame "1" (Forces ranked match in private match [0-1])
party_connectToOthers "0" (Forces host [0-1])
party_host "1" (Forces host [0-1])
party_iamhost "1" (Forces host [0-1])
party_maxplayers "12" (Sets the number of people that can join your private match [0-12])
player_burstFireCooldown "0" (Eliminates the wait between bursts on the M16 and M4 Carbine [0-999])
player_meleeRange "999" (Sets how far away players can melee each other [0-999])
player_sprintSpeedScale "2" (Increases sprinting speed by a factor of 2 [0-9])
player_sprintUnlimited "1" (Disables/enables unlimited sprinting [0-1])
player_sustainAmmo "1" (Sets finite ammo or infinite ammo [0-1])
player_weapRateMultipler "0.01" (Sets the speed of Double Tap [0-999])
player_weapReloadMultiplier "0.01" (Sets the reload speed of Sleight of Hand [0-999])
player_weapSpreadMultiplier "0.01" (Sets the precision of Steady Aim [0-999])
scr_game_graceperiod "10" (Sets the length of time before the match begins [0-999])
scr_hardcore "0" (Disables/enables hardcore mode [0-1])
scr_oldschool "0" (Disables/enables oldschool mode [0-1])
scr_player_numlives "0" (Infinite lives [0-9])
scr_forcerankedmatch "1" (Forces ranked match in private match [0-9])
scr_xpscale "999" (Sets the amount of experience you get in game [0-999])
sv_maxclients "12" (Sets the number of people that can join your private match [0-12])
timescale "1" (Sets the pace of the game [0-9])
ui_allow_teamchange "1" (Disables/enables team changing [0-1])
xblive_privatematch "1" (Forces ranked match in private match [0-1])


Chapter 6 : Useful Scripts

Scripts are lines of coding that are found in the patch_mp. Scripts are much more complicated than binds, dvars, and commands. If you write one character wrong in a script, the game will give you a script error every time you try to host a game, so be careful. To edit the file, you're going to want to use FF Viewer Legacy. Do NOT update the program, or else you will not be able to edit the file with FF Viewer. The first .gsc that I am going to show you how to edit is maps/mp/gametypes/_oldschool.gsc. For the scripts to work when dealing with the _oldschool.gsc, you have to be in oldschool mode. Therefore, you have some control over when they show up. The first thing you want to do with any .gsc is remove the comments. Just like all other files on the .iso you cannot change the size of it without causing trouble. To enable the script all the time, you have to go into the default_xboxlive.cfg in the code_post_gfx_mp and change the value for scr_oldschool to 1.

Search (Ctrl + F) for onPlayerSpawned(), and go to the second result. Create a similar format. Under onPlayerSpawned(), make sure you create a self thread for doWelcome(). Writing self iPrintln writes words in the bottom left hand corner whenever someone spawns. Writing self iPrintlnBold writes words in the middle of the screen whenever someone spawns. Writing wait 5 tells the server to wait 5 seconds before executing the next line


Chapter 7 : Automatic Stats
You're probably wondering how to set your stats automatically, so you don't have to worry about going through all the trouble of getting 200,000 kills for example, right? Well, most stats work, But you usually need to have another person in your lobby.

The highlighted text is where you are going to want to begin writing the script. Now, you can automatically set yourself to Level 55 (10th Prestige) but unfortunately there are normally a lot of glitches that accompany that. The best way to approach the problem is to set yourself to 10th Prestige, but earn Level 55 (which can be easily obtainable, which I will show you how to do later on down the road). Keep in mind that setting your statistics too high can easily get you reset. I have already been reset numerous times so I really don't have a good number to give you for the leaderboards. If you want to make sure you don't get reset, though, try to make it reasonable. Don't shoot for #1 on the Leaderboards because you'll probably get Reset/Banned in a few days.

You can change the values to whatever you'd like. Also, you do not have to include every statSet if you don't want to. You can simply delete the line of code and everything will still function right. Now that you've set the code, you're probably wondering how to initiate it. When you're in a ranked match, the code will initiate if you're host. The code will initiate for anyone in the lobby who has gotten at least one kill, so be careful with the code. You don't want to go around giving everyone free 10th Prestige and great stats. If you want to make sure you're the only one who gets it make sure it's a cage match and you have god mode on.


Chapter 8 : Experience

There are two primary ways to earn extra experience in the game. You can use dvars or scripts or even a combination of both which is what I prefer. The first way I am going to show you is with scripts. Look in the rank.gsc. Search (Ctrl + F) for registerScoreInfo.

Edit the values. The values: 4000 are the highest values that I would safely put in. If you are below a certain level, 4000 experience is the most you can get at one time. If you attempt to get more, the server will be disconnected. So, if the server gets disconnected right when you kill someone, that indicates that you have set the bar too high. The values that you input above apply to Team Deathmatch. If you want to edit the values in other gametypes you have to go to their .gscs. The first .gsc for gametypes is maps/mp/gametypes/dom.gsc. All the .gscs below it are gametypes until you hit maps/mp/gametypes/_tweakables.gsc. Maps/mp/gametypes/_tweakables is NOT a gametype. The other way to edit experience is to set the scr_xpscale dvar to a high number. The best way to deal with scr_xpscale is to assign different values to a bunch of different configuration files. Then, you execute those files with different buttons. In order to change the scr_xpscale, however, you WILL have to fast_restart. Otherwise, the changes will not take effect until the next game


Chapter 9 : Editing Killstreaks

There are a few different things you can do with killstreaks to make them more interesting. For one, you can edit how much experience you get for calling in a killstreak. Open up maps/mp/gametypes/_hardpoints.gsc. Search (Ctrl + F) for registerScoreInfo. Remember not to make the value too high. If you want to edit when you get killstreaks search for giveHardpointItemForStreak().

If you want to edit the height and speed of the airplanes in the airstrike search for callStrike( owner, coord, yaw ). Underneath it you will see the values for height and speed. They are self-explanatory. If you want to edit aspects of the helicopter, then you must move on to two new .gscs. First, look in maps/mp/gametypes/_copter.gsc. Right at the top you will notice some important aspects.
You can find a lot of things that deal with the velocity of the helicopter.

The next .gsc you'll want to look at is the maps/mp/_helicopter.gsc. Search (Ctrl + F) for scr_heli_loopmax. Here you can edit the Helicopters POWER.

Edit them before removing the comments because they have side notes next to them that describe what the values mean. That way you can make sense of the numbers that you are changing.


Chapter 10 : Useful Script Functions

There are a lot of functions that you should familiarize yourself with. They are used often and are very important (words highlighted in orange have a lot of different possible values):
self endon( "action" );
self waittill( "action" );
self iPrintln( "text" );
self iPrintlnBold( "text" );
self setClientDvar( "dvar", value );
self addInfDvar( "dvar", value );
self thread function;
self thread maps\mp\gametypes\_hud_message::hintMessage( "text" );
self waittill( "action" );
setDvar( "dvar", value );
visionSetNaked( "vision", transition time );
wait time;
Possible actions are:


Chapter 11 : Ending Note

This Tutorial took A LOT of time and I'd really appreciate it if you commented telling me what areas I can improve in this topic. This is not a NOOB FRIENDLY Tutorial. You must have a slight coding experience in order to understand this. You don't need to be that smart in it, But you do need to know things like what a dvar does.



Current rating: 6.63 by 246 users
Please take one second and rate this tutorial...

Not a Chance


"How to GSC Mod Call of Duty" :: Login/Create an Account :: 45 comments

If you would like to post a comment please signin to your account or register for an account.


Loke Don't you hate it when cool things get patched :(

yep :( 2020200020200020202


Don't you hate it when cool things get patched :(


Pro Will end upp trying this if it still works!

Refer to the comment by Latency. It's been patched and no longer works


Will end upp trying this if it still works!


Zoidberg Whoa this is extreme throwback.. Wonder if this still works.

No it doesn't anymore. It's been patched.


This actually pretty interesting. I never knew about this at all.


Wow, never knew how to do this, thank you


Whoa this is extreme throwback.. Wonder if this still works.



ummm. This was a tutorial. Not a modded lobby.

Lol Leecher much?

LOL retarded MUCH


Not bad.