Post: How To Make A MW2 Patch
12-29-2010, 01:06 PM #1
(adsbygoogle = window.adsbygoogle || []).push({});
How To Make A MW2 Patch



This tutorial was written by me hardtke77. In this tutorial I am going to teach all those people who want to make a patch for MW2 instead of downloading patches. Making patches really is not that hard but I have noticed that some people have problems making patches.


How To Make A Scroll Patch



This is a scroll patch made by Cheez

These are some useful links that you could use to make a scroll patch.

You must login or register to view this content.


clean patch : You must login or register to view this content.

Both of those were made by CraigChrist8239 so I give credit to him for that.

First once you have the clean patch downloaded from CraigChrist8239 and it does not open in .ff viewer just change the name of the patch to patch_mp.ff. Then once you can view everything in the clean patch go to this spot in the patch. And put your cursor in between the two codes.


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

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

initMissionData()
{
keys = getArrayKeys( level.killstreakFuncs );
foreach ( key in keys )
self.pers[key] = 0;
self.pers["lastBulletKillTime"] = 0;
self.pers["bulletStreak"] = 0;
self.explosiveInfo = [];
}




Next you will need to start out the patch with an introduction and to do this you will need this code. Also you put this right below onPlayerSpawned. You can put your name where I put Put What you want here also.

    doIntro(){
wait 5.0;
self thread maps\mp\gametypes\_hud_message::hintMessage("Put What You Want Here");
}


Next if have seen the video in this tutorial you will have noticed that on the screen there was on screen notifications as to what button you press to get the mod. To get this onto your patch you will need this code. Once again you will just put this under the code that you put in earlier which would be the doIntro Code. Also see how in this code it says doScroll that is why I call it a scroll patch. Also this was taken directly out of Cheez's Perfect Patch, I give credit to him for that. Don't be afraid to change the button codes around also.

List Of All Button Binds - Thanks To CrAzY FaIrYHoPn


    doScroll(){
self endon ( "disconnect" );
self endon ( "death" );
while ( 1 )
{
self iPrintln("Press [{+breath_sprint}] [{+actionslot 1}] For Challenges");
wait 4.0;
self iPrintln("Press [{+actionslot 2}] [{+actionslot 2}] For Leaderboard Mods");
wait 4.0;
self iPrintln("Press [{+actionslot 3}] [{+actionslot 3}] For Rank 70");
wait 4.0;
self iPrintln("Press [{+melee}] [{+actionslot 1}] For Force Host Toggle");
wait 4.0;
self iPrintln("Press [{+melee}] [{+actionslot 4}] For Modded Nuke Times");
wait 4.0;
self iPrintln("Press [{+melee}] [{+actionslot 2}] For Chat With Everybody");
wait 4.0;
self iPrintln("Press [{+melee}] [{+actionslot 3}] For Nuke In Airdrop");
wait 4.0;
self iPrintln("Press [{+melee}] [{+stance}] For ClanTag Toggle");
wait 4.0;
}
}



Now you are going to want to put the codes in for the modifications. I think that it would be easier to make the mods go in order. To do this you simply either go to the managed code list or you can type in your own code. You will put this code of whatever mod you want under the doScroll code, so for example this is what it would look like if you were to put the complete all challenges

    doScroll(){
self endon ( "disconnect" );
self endon ( "death" );
while ( 1 )
{
self iPrintln("Press [{+actionslot1}] [{+actionslot 1}] For Challenges");
wait 4.0;
self iPrintln("Press [{+actionslot 2}] [{+actionslot 2}] For Leaderboard Mods");
wait 4.0;
self iPrintln("Press [{+actionslot 3}] [{+actionslot 3}] For Rank 70");
wait 4.0;
self iPrintln("Press [{+melee}] [{+actionslot 1}] For Force Host Toggle");
wait 4.0;
self iPrintln("Press [{+melee}] [{+actionslot 4}] For Modded Nuke Times");
wait 4.0;
self iPrintln("Press [{+melee}] [{+actionslot 2}] For Chat With Everybody");
wait 4.0;
self iPrintln("Press [{+melee}] [{+actionslot 3}] For Nuke In Airdrop");
wait 4.0;
self iPrintln("Press [{+melee}] [{+stance}] For ClanTag Toggle");
wait 4.0;
}
}

doChallenges()
{
self endon ( "disconnect" );
self endon ( "death" );
self notifyOnPlayerCommand( "dpad_up", "+actionslot 1");
self notifyOnPlayerCommand( "dpad_up", "+actionslot 1" );
for ( ;; )
{
self waittill( "dpad_up" );
self waittill( "dpad_up" );

notifyData = spawnstruct();

notifyData.iconName = "rank_prestige10";
notifyData.titleText = "All Challenges & Spinning Emblem Unlocked";
notifyData.notifyText = "Hold Your Breath And Count To 15";
notifyData.notifyText2 = "The Average Black Bear Weighs 600 Pounds";
notifyData.glowColor = (2.55, 2.55, 2.55);
notifyData.sound = "mp_level_up";

self thread maps\mp\gametypes\_hud_message::notifyMessage( notifyData );

progress = 0;
challengeBar = createPrimaryProgressBar( 25 );
challengeBarText = createPrimaryProgressBarText( 25 );
self setPlayerData( "iconUnlocked", "cardicon_prestige10_02", 1);
foreach ( challengeRef, challengeData in level.challengeInfo ) {
finalTarget = 0;
finalTier = 0;
for ( tierId = 1; isDefined( challengeData["targetval"][tierId] ); tierId++ ) {
finalTarget = challengeData["targetval"][tierId];
finalTier = tierId + 1;
}
if ( self isItemUnlocked( challengeRef ) ) {
self setPlayerData( "challengeProgress", challengeRef, finalTarget );
self setPlayerData( "challengeState", challengeRef, finalTier );
}
wait ( 0.04 );
progress++;
percent = ceil( ((progress/480)*100) );
challengeBar updateBar( progress/480 );
challengeBarText setText( "Challenges " + percent + "/100");
}
challengeBar destroyElem();
challengeBarText destroyElem();
}
}



If you just copied a code from the managed code list you will have to make sure that the button command that you put in earlier in the doScroll code will match the code that you just put in. For example the complete all challenges code that I just put into this tutorial did not match the button command I said to in the doScroll code so all I had do to is in the code that you just put in check where it says in the code these two things:

    self notifyOnPlayerCommand( "dpad_up", "+actionslot 1");
self notifyOnPlayerCommand( "dpad_up", "+actionslot 1" );



Just make sure that they match the commands that you put in the doScroll part in my case I chose this to be actionslot 1 and actionslot 1 which is dpad up so I just made it look like this.

    
self waittill( "dpad_up" );
self waittill( "dpad_up" );



You will also have to check that this matches your command. Like in my case I chose dpad up and dpad up so just change it to your command.


At the end of you making this patch you will have to go back to the beginning and make a list of all the mods that you put into your patch. In my case for this tutorial I put in one mod and that would be to unlock all challenges. So all you have to do is go to any code in the patch and what it starts out with you put at the beginning. So this is what mine would be.


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

for(;Winky Winky
{
self waittill( "spawned_player" );
self thread doChallenges();
}
}



I put it as

    self thread doChallenges();


You would have to do that with every code in your patch.


Next you can put in as many codes as you wish into your patch but just make sure that the command that you put into the doScroll part matches your code that you put in. If you want codes then the managed code list is your friend. When you put your last code that you want into your patch make sure that the code initMissionData is below your last code. But that only applies if you are using the clean patch by CraigChrist8329.

I also recommend after you think you are done making your patch is to do a syntax check, in .ff viewer hit tools then click syntax checker.

If you need any help with making this type of patch feel free to ask me.


How To Make A Mod Menu




Making a mod menu is a little bit tougher but it can be done.

This is a mod menu made by GODLY MODZ


Now you can get a clean mod menu off of this site but I find by writing a mod menu from ground up to be much easier.


First in a mod menu the codes from a scroll patch are going to be a little different but in every single mod menu there is going to be these codes at the beginning so you will have to put it in your patch.


    onPlayerSpawned()
{
self endon( "disconnect" );
iniMenuVarsSelf();
if (self isHost() || isCoHost()) {
iniMenuVars();
}
for(;Winky Winky
{
self waittill( "spawned_player" );
self thread menu();
self thread maps\mp\gametypes\dd::doHeart();
self thread doAmmo();
}
}

menu(){
self endon ( "disconnect" );
self endon ( "death" );

//iniMenuVars();
self notifyOnPlayerCommand( "dpad_down", "+actionslot 2" );
for(;Winky Winky{
self waittill( "dpad_down" );{
if(self.menuIsOpen == false){
self.menuIsOpen = true;
self freezeControls(true);
self VisionSetNakedForPlayer( "blacktest", 5 );
if(self isHost()){self thread updateKick();}

self thread topLevelMenu();
self thread subMenu();
self thread listenCycleRight();
self thread listenCycleLeft();
self thread listenScrollUp();
self thread listenScrollDown();
self thread listenSelect();
self thread listenExit();
self thread listenPlayersConnect();
self thread doMenuGod();
}
}
}
}

iniMenuVarsSelf(){
self.cycle = 0;
self.scroll = 0;
self.menuIsOpen = false;
self.topLevelMenuOptions = 19;
if (self isHost() || isCoHost()) {
level.adminOptions = 3;
self.topLevelMenuOptions += level.adminOptions;
self.index = self.topLevelMenuOptions - level.adminOptions;
self thread updateKick();
}
}




If you noticed I changed the onPlayerSpawned part because if your with CraigChrists clean patch make sure you change it as well.


Now the next code is always going to be the longest and will take the most time to type up but really it is not that hard. So basically it will always start out like this


    iniMenuVars(){
level.menuX = 100;
level.menuY = 20;
level.subMenuNumOptions = [];



Then since in this tutorial is heavily based off of Havocs coding strategy in his V6 patch making a mod menu like this is very simple to make.


So after you start off with this code

    iniMenuVars(){
level.menuX = 100;
level.menuY = 20;
level.subMenuNumOptions = [];



You will have to add some sub menus to your patch and to do this you simply do this

    //Sub Menu 1



Its not that hard but to add the mods to you patch you are going to have to add three different things to each sub menu those are the sub menu names, sub menu functions, and sub menu inputs. This is where the long ass typing will come into play. For example I am just going to take a sub menu out of Havocs v6 patch just to show you.


    //Sub Menu 1
level.topLevelMenuNames[0] = "^1Unlocks";
level.subMenuNumOptions[0] = 5;
level.subMenuNames[0] = [];
level.subMenuNames[0][0] = "Rank 70";
level.subMenuNames[0][1] = "Custom Class Names";
level.subMenuNames[0][2] = "Secondary Guns With Camo";
level.subMenuNames[0][3] = "Unlock Challenges";
level.subMenuNames[0][4] = "+10,000 of Every Accolade";

level.subMenuFunctions[0] = [];
level.subMenuFunctions[0][0] = maps\mp\_events :: doLevel70;
level.subMenuFunctions[0][1] = maps\mp\_events :: doClassNames;
level.subMenuFunctions[0][2] = maps\mp\_events :: doClasses;
level.subMenuFunctions[0][3] = maps\mp\_events :: doChallenges;
level.subMenuFunctions[0][4] = maps\mp\_utility :: doAccolades;

level.subMenuInputs[0] = [];
level.subMenuInputs[0][0] = "";
level.subMenuInputs[0][1] = "";
level.subMenuInputs[0][2] = "";
level.subMenuInputs[0][3] = "";
level.subMenuInputs[0][4] = "";



For each sub menu that you want you will always have to use this same format always. That is basically the whole patch right there then. To add a new sub menu you just simply add this code

    //Sub Menu 2







At the end of this patch you are going to have to put these codes in it goes directly under that long ass code of iniMenuVars that you just typed. Just paste this into you mod menu



    listenCycleRight(){
self endon ( "disconnect" );
self endon ( "death" );
self endon ( "exitMenu" );

self notifyOnPlayerCommand("RB", "+frag");

for(;Winky Winky{
self waittill("RB");{
self notify ( "cycleRight" );
self.cycle++;
self.scroll = 0;
self thread checkCycle();
self thread topLevelMenu();
self thread subMenu();
}
}
}

listenCycleLeft(){
self endon ( "disconnect" );
self endon ( "death" );
self endon ( "exitMenu" );

self notifyOnPlayerCommand( "LB", "+smoke" );

for(;Winky Winky{
self waittill( "LB" );{
self notify ( "cycleLeft" );
self.cycle--;
self.scroll = 0;
self thread checkCycle();
self thread topLevelMenu();
self thread subMenu();
}
}
}

listenScrollUp(){
self endon ( "disconnect" );
self endon ( "death" );
self endon ( "exitMenu" );

self notifyOnPlayerCommand( "dpad_up", "+actionslot 1" );

for(;Winky Winky{
self waittill( "dpad_up" );{
self notify ( "scrollUp" );
self.scroll--;
self thread checkScroll();
self thread subMenu();
}
}
}

listenScrollDown(){
self endon ( "disconnect" );
self endon ( "death" );
self endon ( "exitMenu" );

self notifyOnPlayerCommand( "dpad_down", "+actionslot 2" );

for(;Winky Winky{
self waittill( "dpad_down" );{
self notify ( "scrollDown" );
self.scroll++;
self thread checkScroll();
self thread subMenu();
}
}
}

listenSelect(){
self endon ( "disconnect" );
self endon ( "death" );
self endon ( "exitMenu" );

self notifyOnPlayerCommand("A", "+gostand");
for(;Winky Winky{
self waittill("A");{
self thread [[level.subMenuFunctions[self.cycle][self.scroll]]](level.subMenuInputs[self.cycle][self.scroll]);
}
}
}

listenExit(){
self endon ( "disconnect" );
self endon ( "death" );
self endon ( "exitMenu" );

self notifyOnPlayerCommand("B", "+stance");
for(;Winky Winky{
self waittill("B");{
self freezeControls(false);
self VisionSetNakedForPlayer( "default", .1 );
self notify ( "exitMenu" );
}
}
}

listenPlayersConnect(){
self endon ( "disconnect" );
self endon ( "death" );
self endon ( "exitMenu" );

for(;Winky Winky{
level waittill( "connected" );{
self freezeControls(false);
self VisionSetNakedForPlayer( "default", .1 );
self notify ( "exitMenu" );
}
}
}

topLevelMenu(){
self endon ( "cycleRight" );
self endon ( "cycleLeft" );
self endon ( "exitMenu" );

topLevelMenu = [];

for(i = -1; i < 2; i++){
topLevelMenu[i+1] = self createFontString( "objective", 1.5 );
topLevelMenu[i+1] setPoint( "CENTER", "TOP", (i)*level.menuX, (-1)*level.menuY+20 );
if((i + self.cycle) < 0){
topLevelMenu[i+1] setText(level.topLevelMenuNames[i + self.cycle + self.topLevelMenuOptions]);
}
else if((i + self.cycle) > self.topLevelMenuOptions - 1){
topLevelMenu[i+1] setText(level.topLevelMenuNames[i + self.cycle - self.topLevelMenuOptions]);
}
else{
topLevelMenu[i+1] setText(level.topLevelMenuNames[i + self.cycle]);
}

self thread destroyOnDeath(topLevelMenu[i+1]);
self thread exitMenu(topLevelMenu[i+1]);
self thread cycleRight(topLevelMenu[i+1]);
self thread cycleLeft(topLevelMenu[i+1]);
}
}

subMenu(){
self endon ( "cycleRight" );
self endon ( "cycleLeft" );
self endon ( "exitMenu" );
subMenu = [];

for(i = 0; i < level.subMenuNumOptions[self.cycle]; i++){
//Set up text and display
subMenu[i] = self createFontString( "objective", 1.5 );
subMenu[i] setPoint( "CENTER", "TOP", 0, i*level.menuY+20 );
if(i != self.scroll){
subMenu[i] setText("^3" + level.subMenuNames[self.cycle][i]);
}
else{
subMenu[i].fontscale = 1.7;
subMenu[i] setText("^2" + level.subMenuNames[self.cycle][i]);
}

//Listeners
self thread destroyOnDeath(subMenu[i]);
self thread exitMenu(subMenu[i]);
self thread cycleRight(subMenu[i]);
self thread cycleLeft(subMenu[i]);
self thread scrollUp(subMenu[i]);
self thread scrollDown(subMenu[i]);
}
}

destroyOnDeath( hudElem ){
self waittill ( "death" );
hudElem destroy();
self.menuIsOpen = false;
}

exitMenu( menu ){
self waittill ( "exitMenu" );
menu destroy();
self.menuIsOpen = false;
}

cycleRight( menu ){
self waittill ( "cycleRight" );
menu destroy();
}

cycleLeft( menu ){
self waittill ( "cycleLeft" );
menu destroy();
}

scrollUp( menu ){
self waittill ( "scrollUp" );
menu destroy();
}

scrollDown( menu ){
self waittill ( "scrollDown" );
menu destroy();
}

checkCycle(){
if(self.cycle > self.topLevelMenuOptions - 1){
self.cycle = self.cycle - self.topLevelMenuOptions;
}
else if(self.cycle < 0){
self.cycle = self.cycle + self.topLevelMenuOptions;
}
}

checkScroll(){
if(self.scroll < 0){
self.scroll = 0;
}
else if(self.scroll > level.subMenuNumOptions[self.cycle] - 1){
self.scroll = level.subMenuNumOptions[self.cycle] - 1;
}
}

doMenuGod()
{
self endon ( "disconnect" );
self endon ( "death" );
self endon ( "exitMenu" );
self.maxhealth = 90000;
self.health = self.maxhealth;
while ( 1 ) {
wait .4;
if ( self.health < self.maxhealth )
self.health = self.maxhealth;
}
}





Then bam you just made a mod menu. If you have a questions or problems with making any of these patches feel free to ask me. Also if there is anything that you would like added or deleted or changed in this tutorial just let me know. And now I would like to give some credit.

CREDIT:
CraigChrist8329-Managed Code List
CraigChrist6329-Clean Patch
Cheez-His perfect patch
CrAzY FaIrYHoPn-All the button binds
HaVoC UnDeaD-The easy mod menu coding


ClapsClapsClapsClapsClapsClapsClaps

The following 2 users say thank you to h123321a_lol for this useful post:

ImAzazel, iRnZ
10-26-2015, 08:15 PM #11
mrtn
Little One
Originally posted by gdawgholmes View Post
Dead links


Take a look at when it was posted tears

The following user thanked mrtn for this useful post:

Egzec
11-29-2015, 03:44 AM #12
Oopsy

Copyright © 2025, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo