Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
this is GSC modding for beginners
#1
[/font]Before we start Im a currently a beginner as well so if I make a mistake please correct me, thanks.

Firstly, What is a GSC file?

Definition:

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 :
http://www.itsmods.com/forum/Thread-ItsModsloader.html

Secondly:
Gamescripts:
http://www.itsmods.com/forum/Thread-Call...ipt-s.html

Thirdly: Dvar List:
http://www.itsmods.com/forum/Thread-Comp...rdump.html
Weapons Dvar List:
http://www.itsmods.com/forum/Thread-All-...DVARS.html

Modding:
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:

Code:

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

for(;Wink
{
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.

Commands:
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:

Code:

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

for(;Wink
{
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

Command:
self setPerk(specialty_name);

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



Final Code:

Code:

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

for(;Wink
{
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.

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

Loading:
For those of you who dont know how to load the mod into black ops well your in luck:

1)Place _rank.gsc into itsmodloaders mod folder :
Itsmodsloader\mod\maps\mp\gametypes\_rank.gsc
2) Run the exe.
3)Run the game.
4)Play your mods.
5)IMPORTANT : DISABLE VAC WHILE LAYING IN PRIVATE MATCH
Settings/VAC/ NO


Quote:
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:

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
[[functionvaraible]](arguments);

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


HAVE FUN!

Well thats pretty much it =]

FIRST
first
N3wbiebrayden11039[at]gmail.com" class="mycode_email
Reply

#2
We dont need itsmodsloader anymore.
[Image: lQDUjba.jpg]
Reply

#3
Put the codes in code tags.
Reply

#4
use code tags and btw:

http://www.itsmods.com/forum/Thread-Gsc-...nners.html

already posted...
[Image: b_560_95_1.png]
Reply

#5
I lol'ed
Reply

#6
[Image: stop_repost.jpg]
Reply

#7
wow 1:1 copy paste, links are broken and no tags...next time be more creative and copy paste the whole thread
This thread has been moved to the boards archive.
Contact a moderator in case you want to contribute to this thread.
Reply



Possibly Related Threads…
Thread Author Replies Views Last Post
  [Request] Request for Assistance with Modding COD: BO using Mod Tools one1lion 9 6,673 09-17-2013, 21:04
Last Post: one1lion
  Help Modding Zombie Mode DarthKiller 3 4,888 07-09-2013, 21:08
Last Post: Nekochan
  Why there are no modding for Frostbite Engine RaZ 2 3,335 03-30-2013, 17:14
Last Post: Pozzuh
  Modding online custom classes? jarniboi 0 2,586 03-12-2013, 00:21
Last Post: jarniboi
  [Tutorial] Modding Terraria Pozzuh 5 10,777 01-12-2013, 22:27
Last Post: Xeramon
  How or why did you start modding COD games? Bloodfocus 12 7,652 12-25-2012, 13:08
Last Post: alvarogt95
Thumbs Down Help help Modding new fingerweak 1 2,158 10-11-2012, 23:18
Last Post: Rendflex
  Bo modding help needed SamuelGrund 6 4,262 08-30-2012, 15:39
Last Post: SamuelGrund
  Modding tools for BF3 are a scary business Pozzuh 12 8,657 08-18-2012, 15:35
Last Post: Arteq
  Not sure if glitch or modding :S Arteq 5 3,802 08-11-2012, 13:08
Last Post: Metro-Police#45

Forum Jump:


Users browsing this thread:
1 Guest(s)

Forum Powered By MyBB, Theme by © 2002-2024 Melroy van den Berg.