Basic Mod - Tutorial

Have a question about modding, modelling or skinning? Have a tutorial to post? Post here!

Moderator: Core Staff

Post Reply
User avatar
Mox09
CJ Wannabe
CJ Wannabe
Posts: 22
Joined: April 9th, 2010, 8:01 am
Location: St louis
Contact:

Basic Mod - Tutorial

Post by Mox09 » June 19th, 2010, 8:07 pm

Hey everyone i'm going to try to do my best at explaining how to make your first Call of duty mod. sorry for the spelling but this does work and i will give you a download link to the mod that i've made.

To Start of make a folder in your Call off Duty folder and name it firstmod

Image


in side the firstmod folder make a folder called MAPS

Image

in side the maps folder make one called MP


Image

in side the maps folder make one called Gametypes


Image

After you have done this and looks like just like images above you may go on to the next step.

Ok for this part you will want go to your Call of duty MAIN Folder and open pak9.pk3

Image

this is a image of whats inside the pak9.pk3
Image

Once inside pak9.pk3 click on maps then it will open a new folder. Click on mp and then it will open another folder click on gametypes once in gametypes folder find these 3 files

dm.gsc

dm.txt

_team.gsc

once you have found them drag them to your firstmod folder inside that gametypes folder.

Make sure looks like this.

Image

After you have done this and it looks like the images above you may go on to the the next step.

Warning: this is the hardest part of the modding and for people who have never messed with C++ codeing or anything in that way shouldnt try to do this.

TIP: Go downlaod Notepad++ it help you keep track of what line your on and if you have errors in your line of code.

Download http://sourceforge.net/projects/notepad-plus/

On to the modding part. Ok in side the Gametypes folder make a gsc file called _test.gsc

so it looks like this.

Image

Once thats done open the _test.gsc with notepad++

Image

To Start off i'm going to show you a Basic easy code. put this in side _test.gsc

Code: Select all

main()
{
 thread myfirstmod();
}

myfirstmod()
{
 self iprintlnbold ("You just made your first Mod!"); // iprintlnbold will make it show up in the middle of the screen.
 wait 0.5;
 self iprintln ("Congrats you did it!"); // iprintln will show up as a side message on your left side and not in the middle of the screen.
}
once doen save _test.gsc and close out of it and open dm.gsc.

inside dm.gsc push on your keybored ctrl + H and copy this Callback_PlayerConnect()and push enter. it will take you to that line. P.S if it wont let u edit then X out of dm.gsc and right click dm.gsc Uncheck read only and push apply then you can edit your dm.gsc.

On the player connect look for iprintln(&"MPSCRIPT_CONNECTED", self); add this code self maps\mp\gametypes\_test::main(); under iprintln(&"MPSCRIPT_CONNECTED", self); so looks just like how i have it.

Code: Select all


spawnPlayer()
{
	self notify("spawned");
	self notify("end_respawn");
	
	self maps\mp\gametypes\_test::main();

	resettimeout();

//	if(isDefined(self.shocked))
//	{
//		self stopShellshock();
//		self.shocked = undefined;
//	}

	self.sessionteam = "none";
	self.sessionstate = "playing";
	self.spectatorclient = -1;
	self.archivetime = 0;
		
	spawnpointname = "mp_deathmatch_spawn";
	spawnpoints = getentarray(spawnpointname, "classname");
	spawnpoint = maps\mp\gametypes\_spawnlogic::getSpawnpoint_DM(spawnpoints);

	if(isDefined(spawnpoint))
		self spawn(spawnpoint.origin, spawnpoint.angles);
	else
		maps\mp\_utility::error("NO " + spawnpointname + " SPAWNPOINTS IN MAP");

	self.statusicon = "";
	self.maxhealth = 100;
	self.health = self.maxhealth;

	if(!isDefined(self.pers["savedmodel"]))
		maps\mp\gametypes\_teams::model();
	else
		maps\mp\_utility::loadModel(self.pers["savedmodel"]);

	maps\mp\gametypes\_teams::givePistol();
	maps\mp\gametypes\_teams::giveGrenades(self.pers["weapon"]);

	self giveWeapon(self.pers["weapon"]);
	self giveMaxAmmo(self.pers["weapon"]);
	self setSpawnWeapon(self.pers["weapon"]);
	
	self setClientCvar("cg_objectiveText", &"DM_KILL_OTHER_PLAYERS");
}
Once you have done all this check everything and you may go onto making the pk3.

Go back to the first folder called Firstmod, Hlight maps folder right click it and go to Archive click it. it will open a page where says the name put zz_firstmod.pk3 once you have done push ok. it will make the files a pk3. once done take the maps folder and put it on your desktop and keep the pk3 in side firstmod.

then go in game click MODS find your mod folder called firstmod and click it it will X game then reload it again. once its loaded back go in to Create a server. uncheck inernet or lan server make it say none or no. once thats done disable punkbuster. before u click create server open console type /developer 1 that will help you find errors on what line you scewed up on if there is any :D.

Start your Server and Enjoy your First Call of Duty Mod.

If you need help my xfire is mox123456 and i can always help you.

If you can't understand my english i'm very sorry.

hope this helps.
You do not have the required permissions to view the files attached to this post.

Post Reply

Who is online

Users browsing this forum: No registered users and 19 guests