You are viewing our Forum Archives. To view or take place in current topics click here.
[TuT] .gsc modding for beginners
Posted:

[TuT] .gsc modding for beginnersPosted:

-ScHmIdTy
  • Powerhouse
Status: Offline
Joined: Mar 10, 201113Year Member
Posts: 470
Reputation Power: 18
Status: Offline
Joined: Mar 10, 201113Year Member
Posts: 470
Reputation Power: 18
So this is my very first tutorial... I am going to show you how to make a simple yet effective mod for mw2.
I use alteriw.net's mw2 to test mods


Ok lets get started...

What you need:
- alteriw.net's Mw2.
- A text editor of your choice.
- winRar/7zip. To move the .gsc file to the .iwd file.
- The Test2 folder I have [ Register or Signin to view external links. ] Which includes a fresh _rank.gsc file

How to get started:
1. If you have never used mods with alteriw.net you need to create a mods folder in the main directory. (where you start up mw2)

2. Now you move the mod you downloaded from [ Register or Signin to view external links. ] to that mod folder (if you havent extracted it do so now)

3. You then use 7zip/WinRar to open the .iwd file. Keep clicking until you cant go any further and you should see a _rank.gsc, open that up. And let the noob modding commence.

How to mod the .gsc file:
Since you opened _rank.gsc you know should see a whole bunch of words, parenthesis and brackets. What you want to do is to press Ctrl + f and you want to type in onPlayerSpawned().

You now should see this:

onPlayerSpawned()
{
   self endon("disconnect");

   for(;;)
   {
      self waittill("spawned_player");
   }
}


What you want to do is to put this code
**
DoStuff()
{
self takeAllWeapons();
self giveWeapon("deserteaglegold_mp", 0, false );
self giveMaxAmmo("deserteaglegold_mp");

self _clearPerks();
self maps\mp\perks\_perks::givePerk("specialty_fastreload");
}


After onPlayerSpawned(), So it looks like this

onPlayerSpawned()
{
   self endon("disconnect");

   for(;;)
   {
      self waittill("spawned_player");
   }
}

DoStuff()
{
self takeAllWeapons();
self giveWeapon("deserteaglegold_mp", 0, false );
self giveMaxAmmo("deserteaglegold_mp");

self _clearPerks();
self maps\mp\perks\_perks::givePerk("specialty_fastreload");
}


Now you have your very own mod. But it wont do anything just yet, we need to call DoStuff() under onPlayerSpawned() To do so put

self thread DoStuff();


Like so

onPlayerSpawned()
{
   self endon("disconnect");

   for(;;)
   {
      self waittill("spawned_player");

      self thread DoStuff();
   }
}


Save the file. Load mw2, once loaded and you havent done anything with it yet go to the console and type in

fs_game mods/Test2;vid_restart


Pick your favorite map and enjoy the gold desert eagle

Press 1 or 2 to get your deagle ;)



On a sidenote this is my tut and i did not take this from anywhere else. lol so if i have made a mistake feel free to correct me, I wont bite.



If you seeing an error or your having a hard time loading the mod or your just not that good with .gsc modding feel free to pm me


**- let me explain how this mod works
DoStuff()
{
self takeAllWeapons();
self giveWeapon("deserteaglegold_mp", 0, false );
self giveMaxAmmo("deserteaglegold_mp");

self _clearPerks();
self maps\mp\perks\_perks::givePerk("specialty_fastreload");
}


first we have. Which the game runs and puts into language for it.

DoStuff()
{
}


Second we have the inside part

self takeAllWeapons(); //this cmd is so SIMPLE but yet its a key piece of information. It tells the game to take away your weapon So if you have a cmd that gives you a weapon it doesnt crash the game
self giveWeapon("deserteaglegold_mp", 0, false ); //this gives us a weapon
self giveMaxAmmo("deserteaglegold_mp"); //and this cmd is special as well. If we wouldnt have had this cmd our Deagle wouldnt come to life, well because it wouldnt have ammo

self _clearPerks(); //takes your beginning perks
self maps\mp\perks\_perks::givePerk("specialty_fastreload"); //gives you a perk

And thats how this mod works

#2. Posted:
Cynder
  • TTG Addict
Status: Offline
Joined: May 15, 201113Year Member
Posts: 2,848
Reputation Power: 122
Status: Offline
Joined: May 15, 201113Year Member
Posts: 2,848
Reputation Power: 122
thanks this will help some people
Jump to:
You are viewing our Forum Archives. To view or take place in current topics click here.