• 5 Vote(s) - 3.4 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[Tutorial] .Gsc Modding for Beginners
.Gsc modding for beginners

Before we start I’m also currently a beginner as well so if I make a mistake please correct me, thanks.

Firstly, What is a GSC file?

Quote: The difference between PC modding and console (Xbox 360) modding: console mods require you to have a modded "patch_mp.ff". These patches consist out of modded . Gsc files, basically the heart of the game.
Gsc modding is quite simple once you get the hang of it this tutorial will go over the basics for black ops gsc modding. When you download a mod have u ever wondered why modders use _rank.gsc file it is because it has the OnPlayerSpawned thread .There are many .gsc files you can use (in the gamescripts see below).

Getting Started:
Firstly we will need Itsmodsloader to load the mods :


Thirdly: Dvar List:
Weapons Dvar List:

Open Gamescripts/maps/mp/gametypes/_rank.gsc and you will see lots of code take a look and familiarise yourself with some of theses codes as you will need many of them to mod .Then search (Control + F) and enter in: onPlayerSpawned

You will now see this:

    self endon("disconnect");

        self waittill("spawned_player");

This code is one part of what makes the gsc file run.
onPlayerSpawned() = Thread name
; = The semi colon ends a command.
As you can see there are many brackets in the one paragraph of code. The { bracket in gsc coding means opening line of code and this bracket } ends the line(Think of it like a sentence) . These brackets are a vital component of gsc modding and must be included or else you will get many errors.

Now we know some basics of gsc modding we will want to add some commands so that we can do HEAPS of awesome things ingame.

So I want my favourite gun the Famas with Dual clips and silencer + Reflex sight when I spawn:

Famas command:
Self giveWeapon ( " famas_reflex_dualclip_silencer_mp " );

The code above^^ is the code used to get your gun and its attachments and camouflage.
For any other gun:
giveWeapon(weaponname, 0, calcWeaponOptions ( <camo>, <lens>, <reticle>, <tag>, <emblem> ));

Tip: When adding any gun make sure to have _mp if its in multiplayer and have the gun name etc between the quotes “”.

So now what??? We add it to the OnPlayerSpawned() Thread:

    self endon("disconnect");

        self waittill("spawned_player");
                                self giveWeapon ( "famas_reflex_dualclip_silencer_mp", 0, false );
Yay! We now have a Famas when we spawn lol. Now I want to give myself a perk

self setPerk(specialty_name);

Ill give myself : Lightweight
self setPerk("specialty_Lightweight");

Final Code:

    self endon("disconnect");

        self waittill("spawned_player");
giveWeapon ( "famas_reflex_dualclip_silencer_mp", 0, false );
        self setPerk("specialty_Lightweight");

Awesome now we have Lightweight AND Famas. Feel free to change the code to suite yourself.

Make sure you are on _rank.gsc and then save it ( Control + S ). Now we will want to test this mod.

For those of you who don’t know how to load the mod into black ops well your in luck:

1)Place _rank.gsc into itsmodloader’s mod folder :
2) Run the exe.
3)Run the game.
4)Play your mods.
Settings/VAC/ NO

Info:VAC2 DETECTED - use in private matches with sv_vac 0
Want to play legit after that?
1. Close the game.
2. Close Steam.
3. Restart Steam.
4. Start the game without any hacks loaded.

Extra Info:
All Credits go to TMS_Killingdyl (loll) for this useful information about variables:

Quote:Variables in gsc does not have to be defined by type like in more complex scripts neither does it have to be defined before use.
There are only 4 types of variables.
Int - Integer (5, 0, -5)
Float - Decimal number (5.6034)
String - Text String ("Hi")
Boolean - True or False

int(string) turns a string "1" to the integer 1

There are different ways variables stored in gsc
self.variable = "Killingdyl"; - stores the variable attached to whatever self is, most of the time its a player
level.variable = “Random Text"; - stores the variable to the level, resets if map_restart(true);
functionvariable = ::function; - stores a function into a variable
position = (x, y, z); - position is an array with 3 values
angle = (pitch, yaw, roll); - angle is an array with 3 values
array = []; - defines an array, doing this will clear any previous values inside the array
array[value] = []; - defines multi-dimensional arrays, clears any previous values.
To call the functionvariable you do it like this

Variables are used in if-else statements. You can use the following evaluators.
== - equal to
!= - not equal to
> - greater than
< - less than
>= - greater than or equal to
<= - less than or equal to

For variables that are defined true or false, in if statements you can use the following.
if(variable) - this is the same as if(variable == true)
if(!variable) - this is the same as if(variable == false)
true == 1 and false == 0


Well that’s pretty much it =]

Deffinately a chance in our christmas price competition.
(12-24-2010, 09:25)surtek Wrote: Deffinately a chance in our christmas price competition.

you want me to copy paste mine over?
depends on if you want to win something or not

good work aosma8
(12-24-2010, 11:35)d0h! Wrote: depends on if you want to win something or not

want can i win?
i think to learn gsc copy a gun game and edit it i will start to understandt stuff.. and than boom!
if you dig true the world... what comes up first your feet or your head ;qq
nice tuturial.
(12-25-2010, 11:28)TheSaboteur Wrote: i think to learn gsc copy a gun game and edit it i will start to understandt stuff.. and than boom!

But people like things to be explained to them right?

@Eekhorn: Thanks
cashed my mod and i cant go back.. now i have to restart
RTD V2.7 RELEASE STATUS: Rolls Finished, debugging
I can't open the: Thirdly: Dvar List:

Forum Jump:

Users browsing this thread: 1 Guest(s)