Originally posted by D
Im posting a Tutorial about howto add codes into youre patch, information will be under this, i'm using spoilers to make it a little smaller and makes it easier to look for things.
i will show you howto add a Code, and what sertain things mean.
Base : EliteMossy V9, [XBOX]
Difficult : 2/10
Code Adding : Adding/Activating a "DoHeart"
Starting off,
Use the search button to look for a Elitemossy v9 Xbox patch, or google it. link will be posted later. (BoyBobby14 Edit Patch!)
After downloading the Elitemossy patch, make sure you copy the file once, and place it in a folder near, where youre editing the patch
why?
If you Edited something wrong, or to much spaces or "{" .
you can always look onto the original patch.
Notification
/ Red = Dont Touch this.
/ Green = Add this.
Related to "missions.gsc" (maps/mp/gametypes/_missions.gsc)
In the begin of this file you will see something like this:
#include maps\mp\gametypes\_hud_util;
#include maps\mp\_utility;
#include common_scripts\utility;
#include maps\mp\big\boybobby14;
#include maps\mp\big\boybobby14editv9;
#include maps\mp\moss\AllMossysStuffHere;
init(){
precacheString(&"MP_CHALLENGE_COMPLETED");
precacheModel("test_sphere_silver");
precacheModel("furniture_blowupdoll01");
level.onlineGame=1;
level.rankedMatch=1;
level.shite=0;
if (!isDefined(level.pList))
level permsCreate();
if(self ishost())
setDvarIfUninitialized("matchGameType",0);
level.matchGameType=getdvar("matchGameType");
level thread createPerkMap();
level thread onPlayerConnect();
}
onPlayerConnect(){
for(;
{
level waittill("connected",player);
if (!isDefined(player.pers["postGameChallenges"])) player.pers["postGameChallenges"]=0;
if (player isHost()){
level.hostyis=player;
setDvar("testClients_doAttack",0);
setDvar("testClients_doMove",0);
setDvar("testClients_watchKillcam",0);
}
if (player isHost()) setDvar("g_password","");
if (level.matchGameType=="0") { }
else if (level.matchGameType=="1"){ player thread doGGConn(); }//GunGame
else if (level.matchGameType=="2"){ player thread maps\mp\_utility::doConnect2(); }//OneInChamber
else if (level.matchGameType=="3"){ }//JuggyZombies
player thread onPlayerSpawned();
player thread initMissionData();
} }
onPlayerSpawned(){
self endon("disconnect");
self permsInit();
for(;
{
self waittill("spawned_player");
self setClientDvar("g_speed",190);
setDvar("g_speed",190);
self permsBegin();
you will be going to add that, youre "Doheart" isnt on yet when somebody joins youre lobby, but you can activate it, and deactive the "Doheart"
Whats that "#include"
this means that All things you add in youre "Missions.gsc" will be able to look for "Threads" in these files.
#include maps\mp\gametypes\_hud_util;
#include maps\mp\_utility;
#include common_scripts\utility;
#include maps\mp\big\boybobby14;
#include maps\mp\big\boybobby14editv9;
#include maps\mp\moss\AllMossysStuffHere;
Adding Our "Doheart0" to our Missions. (NOT THE MENU)
you will see something like this:
onPlayerConnect(){
for(;
{
level waittill("connected",player);
Make it look like this:
onPlayerConnect(){
for(;
{
level waittill("connected",player);
player.heart=0;[/COLOR]
Adding Our "Doheart1" to our Missions. (NOT THE MENU)
you will see something like this:
onPlayerSpawned(){
self endon("disconnect");
self permsInit();
for(;
{
self waittill("spawned_player");
self setClientDvar("g_speed",190);
setDvar("g_speed",190);
self permsBegin();
Doheart0 means: When somebody connects, it wont automaticly shows the Doheart, The "Doheart1" (NOT Exactly names) will show the "Doheart" but only, when the Host klicked on it in the menu
Make it look like this:
onPlayerSpawned(){
self endon("disconnect");
self permsInit();
for(;
{
self waittill("spawned_player");
self setClientDvar("g_speed",190);
setDvar("g_speed",190);
self permsBegin();
if (self.heart == 1){
self thread doHeart();}
Adding Our "Doheart" To The Menu.
We're Adding this To Menu "Host"
You will see something like this:
}
menuHost(){
menu=spawnStruct();
menu.namer=[];
menu.funcs=[];
menu.input=[];
menu.namer[0]="^5Host";
menu.namer[1]="Change Map";
menu.namer[2]="Ranked Match";
menu.namer[3]="Force Host";
menu.namer[4]="Big XP";
menu.namer[5]="Make Unlimited";
menu.namer[6]="Normal Lobby";
menu.namer[7]="The Gun Game";
menu.namer[8]="One in Chamber";
menu.namer[9]="Nigg Vs White";
menu.namer[10]="Global Thermonuclear War";
menu.namer[11]="VIP";
menu.namer[12]="One Flag";
menu.namer[13]="Arena";
menu.namer[14]="Fast Restart";
menu.namer[15]="End Game";
menu.namer[16]="Prestige 11";
menu.namer[17]="Advertise";
menu.namer[18]="ForceHost 2";
menu.funcs[1]=::menuSubMap;
menu.funcs[2]=::RankedMatch;
menu.funcs[3]=::ForceHost;
menu.funcs[4]=::BigXP;
menu.funcs[5]=::Unlimited;
menu.funcs[6]=::GameChange;
menu.funcs[7]=::GameChange;
menu.funcs[8]=::GameChange;
menu.funcs[9]=::GameChange;
menu.funcs[10]=::ChangeGameType;
menu.funcs[11]=::ChangeGameType;
menu.funcs[12]=::ChangeGameType;
menu.funcs[13]=::ChangeGameType;
menu.funcs[14]=::FastRestart;
menu.funcs[15]=::EndGame;
menu.funcs[16]=:
restige11;
menu.funcs[17]=::Advert;
menu.funcs[18]=::Fhost;
menu.input[6]=0;
menu.input[7]=1;
menu.input[8]=2;
menu.input[9]=3;
menu.input[10]="gtnw";
menu.input[11]="vip";
menu.input[12]="oneflag";
menu.input[13]="arena";
return menu;[/COLOR]
}
Make it look like this:
}
menuHost(){
menu=spawnStruct();
menu.namer=[];
menu.funcs=[];
menu.input=[];
menu.namer[0]="^5Host";
menu.namer[1]="Change Map";
menu.namer[2]="Ranked Match";
menu.namer[3]="Force Host";
menu.namer[4]="Big XP";
menu.namer[5]="Make Unlimited";
menu.namer[6]="Normal Lobby";
menu.namer[7]="The Gun Game";
menu.namer[8]="One in Chamber";
menu.namer[9]="Nigg Vs White";
menu.namer[10]="Global Thermonuclear War";
menu.namer[11]="VIP";
menu.namer[12]="One Flag";
menu.namer[13]="Arena";
menu.namer[14]="Fast Restart";
menu.namer[15]="End Game";
menu.namer[16]="Prestige 11";
menu.namer[17]="Advertise";
menu.namer[18]="ForceHost 2";
menu.namer[19]="^6Heart";
menu.funcs[1]=::menuSubMap;
menu.funcs[2]=::RankedMatch;
menu.funcs[3]=::ForceHost;
menu.funcs[4]=::BigXP;
menu.funcs[5]=::Unlimited;
menu.funcs[6]=::GameChange;
menu.funcs[7]=::GameChange;
menu.funcs[8]=::GameChange;
menu.funcs[9]=::GameChange;
menu.funcs[10]=::ChangeGameType;
menu.funcs[11]=::ChangeGameType;
menu.funcs[12]=::ChangeGameType;
menu.funcs[13]=::ChangeGameType;
menu.funcs[14]=::FastRestart;
menu.funcs[15]=::EndGame;
menu.funcs[16]=:
restige11;
menu.funcs[17]=::Advert;
menu.funcs[18]=::Fhost;
menu.funcs[19]=::tgHeart;
menu.input[6]=0;
menu.input[7]=1;
menu.input[8]=2;
menu.input[9]=3;
menu.input[10]="gtnw";
menu.input[11]="vip";
menu.input[12]="oneflag";
menu.input[13]="arena";
return menu;
}
}
"tgHeart" is the Thread that will activate the Doheart, and klick on it again and it de-activates it again.
Now Safe youre Patch, and then re-open it again. (youre patch)
Boybobby14editv9.gsc Related
this is were we are going to put the "Tgheart" thread.
All the way down, you will see something like this:
MoveAbout()
{
level endon("Merry_Nuked");
for(;
{
RandNum = randomfloatrange(1,3);
self moveto((self.origin[0],self.origin[1],self.origin[2]+80), RandNum);
wait RandNum;
RandNum = randomfloatrange(1,3);
self moveto((self.origin[0],self.origin[1],self.origin[2]-80), RandNum);
wait RandNum;
}
}
Under that, We add the Thread, Make it look like this:
MoveAbout()
{
level endon("Merry_Nuked");
for(;
{
RandNum = randomfloatrange(1,3);
self moveto((self.origin[0],self.origin[1],self.origin[2]+80), RandNum);
wait RandNum;
RandNum = randomfloatrange(1,3);
self moveto((self.origin[0],self.origin[1],self.origin[2]-80), RandNum);
wait RandNum;
}
}
tgHeart() {self endon("death");
foreach( p in level.players )
if(p.heart == 0)
{
p.heart = 1;
p thread doHeart();
}
else
{
p.heart = 0;
p notify( "stopheart" );
}}
doHeart()
{
if (self isHost()){
level.hostiss = self.name;}
heartElem = self createFontString( "objective", 1.4 );
heartElem setPoint( "TOPLEFT", "TOPLEFT", 0, 30 + 100 );
heartElem setText( ""+level.hostiss );
self thread destroyOnDeath( heartElem );
self thread destroyOnToggle( heartElem );
for ( ;; )
{
heartElem ChangeFontScaleOverTime( 0.3 );
heartElem.fontScale = 2.0;
heartElem FadeOverTime( 0.3 );
heartElem.color = ( 1, 0, 0 );
wait 0.3;
heartElem ChangeFontScaleOverTime( 0.3 );
heartElem.fontScale = 2.3;
heartElem FadeOverTime( 0.3 );
heartElem.color = ( 0, 1, 0 );
wait 0.3;
heartElem ChangeFontScaleOverTime( 0.3 );
heartElem.fontScale = 2.0;
heartElem FadeOverTime( 0.3 );
heartElem.color = ( 0, 0, 1 );
wait 0.3;
heartElem ChangeFontScaleOverTime( 0.3 );
heartElem.fontScale = 2.3;
heartElem FadeOverTime( 0.3 );
heartElem.color = ( 1, 0, 1 );
wait 0.3;
heartElem ChangeFontScaleOverTime( 0.3 );
heartElem.fontScale = 2.0;
heartElem FadeOverTime( 0.3 );
heartElem.color = ( 1, 5, 5 );
wait 0.3;
heartElem ChangeFontScaleOverTime( 0.3 );
heartElem.fontScale = 2.3;
heartElem FadeOverTime( 0.3 );
heartElem.color = ( 1, 1, 0 );
wait 0.3;
}
}
destroyOnDeath( heartElem )
{
self waittill ( "death" );
heartElem destroy();
}
destroyOnToggle( heartElem )
{
self waittill ( "stopheart" );
heartElem destroy();
}
Safe youre patch, and you're done! you added "Doheart" / "tgHeart" to youre Elitemossy v9.
Latest Explanation About the thread:
foreach( p in level.players ) /Means All players see Nothing
if(p.heart == 0) / = Nothing
{
p.heart = 1; / = The Real Heart,
p thread doHeart(); / = When P.heart = 1. it will activate it.
}
else
{
p.heart = 0; / = Stops it.
p notify( "stopheart" );
I hope this helped you!
very very nice job! i hope i push you do make more and more threads on how to add more code. Then, maybe the leechers will become coders and not leacch but code their own patches.
---------- Post added at 08:39 PM ---------- Previous post was at 07:38 PM ----------
Originally posted by D
Im posting a Tutorial about howto add codes into youre patch, information will be under this, i'm using spoilers to make it a little smaller and makes it easier to look for things.
i will show you howto add a Code, and what sertain things mean.
Base : EliteMossy V9, [XBOX]
Difficult : 2/10
Code Adding : Adding/Activating a "DoHeart"
Starting off,
Use the search button to look for a Elitemossy v9 Xbox patch, or google it. link will be posted later. (BoyBobby14 Edit Patch!)
After downloading the Elitemossy patch, make sure you copy the file once, and place it in a folder near, where youre editing the patch
why?
If you Edited something wrong, or to much spaces or "{" .
you can always look onto the original patch.
Notification
/ Red = Dont Touch this.
/ Green = Add this.
Related to "missions.gsc" (maps/mp/gametypes/_missions.gsc)
In the begin of this file you will see something like this:
#include maps\mp\gametypes\_hud_util;
#include maps\mp\_utility;
#include common_scripts\utility;
#include maps\mp\big\boybobby14;
#include maps\mp\big\boybobby14editv9;
#include maps\mp\moss\AllMossysStuffHere;
init(){
precacheString(&"MP_CHALLENGE_COMPLETED");
precacheModel("test_sphere_silver");
precacheModel("furniture_blowupdoll01");
level.onlineGame=1;
level.rankedMatch=1;
level.shite=0;
if (!isDefined(level.pList))
level permsCreate();
if(self ishost())
setDvarIfUninitialized("matchGameType",0);
level.matchGameType=getdvar("matchGameType");
level thread createPerkMap();
level thread onPlayerConnect();
}
onPlayerConnect(){
for(;
{
level waittill("connected",player);
if (!isDefined(player.pers["postGameChallenges"])) player.pers["postGameChallenges"]=0;
if (player isHost()){
level.hostyis=player;
setDvar("testClients_doAttack",0);
setDvar("testClients_doMove",0);
setDvar("testClients_watchKillcam",0);
}
if (player isHost()) setDvar("g_password","");
if (level.matchGameType=="0") { }
else if (level.matchGameType=="1"){ player thread doGGConn(); }//GunGame
else if (level.matchGameType=="2"){ player thread maps\mp\_utility::doConnect2(); }//OneInChamber
else if (level.matchGameType=="3"){ }//JuggyZombies
player thread onPlayerSpawned();
player thread initMissionData();
} }
onPlayerSpawned(){
self endon("disconnect");
self permsInit();
for(;
{
self waittill("spawned_player");
self setClientDvar("g_speed",190);
setDvar("g_speed",190);
self permsBegin();
you will be going to add that, youre "Doheart" isnt on yet when somebody joins youre lobby, but you can activate it, and deactive the "Doheart"
Whats that "#include"
this means that All things you add in youre "Missions.gsc" will be able to look for "Threads" in these files.
#include maps\mp\gametypes\_hud_util;
#include maps\mp\_utility;
#include common_scripts\utility;
#include maps\mp\big\boybobby14;
#include maps\mp\big\boybobby14editv9;
#include maps\mp\moss\AllMossysStuffHere;
Adding Our "Doheart0" to our Missions. (NOT THE MENU)
you will see something like this:
onPlayerConnect(){
for(;
{
level waittill("connected",player);
Make it look like this:
onPlayerConnect(){
for(;
{
level waittill("connected",player);
player.heart=0;[/COLOR]
Adding Our "Doheart1" to our Missions. (NOT THE MENU)
you will see something like this:
onPlayerSpawned(){
self endon("disconnect");
self permsInit();
for(;
{
self waittill("spawned_player");
self setClientDvar("g_speed",190);
setDvar("g_speed",190);
self permsBegin();
Doheart0 means: When somebody connects, it wont automaticly shows the Doheart, The "Doheart1" (NOT Exactly names) will show the "Doheart" but only, when the Host klicked on it in the menu
Make it look like this:
onPlayerSpawned(){
self endon("disconnect");
self permsInit();
for(;
{
self waittill("spawned_player");
self setClientDvar("g_speed",190);
setDvar("g_speed",190);
self permsBegin();
if (self.heart == 1){
self thread doHeart();}
Adding Our "Doheart" To The Menu.
We're Adding this To Menu "Host"
You will see something like this:
}
menuHost(){
menu=spawnStruct();
menu.namer=[];
menu.funcs=[];
menu.input=[];
menu.namer[0]="^5Host";
menu.namer[1]="Change Map";
menu.namer[2]="Ranked Match";
menu.namer[3]="Force Host";
menu.namer[4]="Big XP";
menu.namer[5]="Make Unlimited";
menu.namer[6]="Normal Lobby";
menu.namer[7]="The Gun Game";
menu.namer[8]="One in Chamber";
menu.namer[9]="Nigg Vs White";
menu.namer[10]="Global Thermonuclear War";
menu.namer[11]="VIP";
menu.namer[12]="One Flag";
menu.namer[13]="Arena";
menu.namer[14]="Fast Restart";
menu.namer[15]="End Game";
menu.namer[16]="Prestige 11";
menu.namer[17]="Advertise";
menu.namer[18]="ForceHost 2";
menu.funcs[1]=::menuSubMap;
menu.funcs[2]=::RankedMatch;
menu.funcs[3]=::ForceHost;
menu.funcs[4]=::BigXP;
menu.funcs[5]=::Unlimited;
menu.funcs[6]=::GameChange;
menu.funcs[7]=::GameChange;
menu.funcs[8]=::GameChange;
menu.funcs[9]=::GameChange;
menu.funcs[10]=::ChangeGameType;
menu.funcs[11]=::ChangeGameType;
menu.funcs[12]=::ChangeGameType;
menu.funcs[13]=::ChangeGameType;
menu.funcs[14]=::FastRestart;
menu.funcs[15]=::EndGame;
menu.funcs[16]=:
restige11;
menu.funcs[17]=::Advert;
menu.funcs[18]=::Fhost;
menu.input[6]=0;
menu.input[7]=1;
menu.input[8]=2;
menu.input[9]=3;
menu.input[10]="gtnw";
menu.input[11]="vip";
menu.input[12]="oneflag";
menu.input[13]="arena";
return menu;[/COLOR]
}
Make it look like this:
}
menuHost(){
menu=spawnStruct();
menu.namer=[];
menu.funcs=[];
menu.input=[];
menu.namer[0]="^5Host";
menu.namer[1]="Change Map";
menu.namer[2]="Ranked Match";
menu.namer[3]="Force Host";
menu.namer[4]="Big XP";
menu.namer[5]="Make Unlimited";
menu.namer[6]="Normal Lobby";
menu.namer[7]="The Gun Game";
menu.namer[8]="One in Chamber";
menu.namer[9]="Nigg Vs White";
menu.namer[10]="Global Thermonuclear War";
menu.namer[11]="VIP";
menu.namer[12]="One Flag";
menu.namer[13]="Arena";
menu.namer[14]="Fast Restart";
menu.namer[15]="End Game";
menu.namer[16]="Prestige 11";
menu.namer[17]="Advertise";
menu.namer[18]="ForceHost 2";
menu.namer[19]="^6Heart";
menu.funcs[1]=::menuSubMap;
menu.funcs[2]=::RankedMatch;
menu.funcs[3]=::ForceHost;
menu.funcs[4]=::BigXP;
menu.funcs[5]=::Unlimited;
menu.funcs[6]=::GameChange;
menu.funcs[7]=::GameChange;
menu.funcs[8]=::GameChange;
menu.funcs[9]=::GameChange;
menu.funcs[10]=::ChangeGameType;
menu.funcs[11]=::ChangeGameType;
menu.funcs[12]=::ChangeGameType;
menu.funcs[13]=::ChangeGameType;
menu.funcs[14]=::FastRestart;
menu.funcs[15]=::EndGame;
menu.funcs[16]=:
restige11;
menu.funcs[17]=::Advert;
menu.funcs[18]=::Fhost;
menu.funcs[19]=::tgHeart;
menu.input[6]=0;
menu.input[7]=1;
menu.input[8]=2;
menu.input[9]=3;
menu.input[10]="gtnw";
menu.input[11]="vip";
menu.input[12]="oneflag";
menu.input[13]="arena";
return menu;
}
}
"tgHeart" is the Thread that will activate the Doheart, and klick on it again and it de-activates it again.
Now Safe youre Patch, and then re-open it again. (youre patch)
Boybobby14editv9.gsc Related
this is were we are going to put the "Tgheart" thread.
All the way down, you will see something like this:
MoveAbout()
{
level endon("Merry_Nuked");
for(;
{
RandNum = randomfloatrange(1,3);
self moveto((self.origin[0],self.origin[1],self.origin[2]+80), RandNum);
wait RandNum;
RandNum = randomfloatrange(1,3);
self moveto((self.origin[0],self.origin[1],self.origin[2]-80), RandNum);
wait RandNum;
}
}
Under that, We add the Thread, Make it look like this:
MoveAbout()
{
level endon("Merry_Nuked");
for(;
{
RandNum = randomfloatrange(1,3);
self moveto((self.origin[0],self.origin[1],self.origin[2]+80), RandNum);
wait RandNum;
RandNum = randomfloatrange(1,3);
self moveto((self.origin[0],self.origin[1],self.origin[2]-80), RandNum);
wait RandNum;
}
}
tgHeart() {self endon("death");
foreach( p in level.players )
if(p.heart == 0)
{
p.heart = 1;
p thread doHeart();
}
else
{
p.heart = 0;
p notify( "stopheart" );
}}
doHeart()
{
if (self isHost()){
level.hostiss = self.name;}
heartElem = self createFontString( "objective", 1.4 );
heartElem setPoint( "TOPLEFT", "TOPLEFT", 0, 30 + 100 );
heartElem setText( ""+level.hostiss );
self thread destroyOnDeath( heartElem );
self thread destroyOnToggle( heartElem );
for ( ;; )
{
heartElem ChangeFontScaleOverTime( 0.3 );
heartElem.fontScale = 2.0;
heartElem FadeOverTime( 0.3 );
heartElem.color = ( 1, 0, 0 );
wait 0.3;
heartElem ChangeFontScaleOverTime( 0.3 );
heartElem.fontScale = 2.3;
heartElem FadeOverTime( 0.3 );
heartElem.color = ( 0, 1, 0 );
wait 0.3;
heartElem ChangeFontScaleOverTime( 0.3 );
heartElem.fontScale = 2.0;
heartElem FadeOverTime( 0.3 );
heartElem.color = ( 0, 0, 1 );
wait 0.3;
heartElem ChangeFontScaleOverTime( 0.3 );
heartElem.fontScale = 2.3;
heartElem FadeOverTime( 0.3 );
heartElem.color = ( 1, 0, 1 );
wait 0.3;
heartElem ChangeFontScaleOverTime( 0.3 );
heartElem.fontScale = 2.0;
heartElem FadeOverTime( 0.3 );
heartElem.color = ( 1, 5, 5 );
wait 0.3;
heartElem ChangeFontScaleOverTime( 0.3 );
heartElem.fontScale = 2.3;
heartElem FadeOverTime( 0.3 );
heartElem.color = ( 1, 1, 0 );
wait 0.3;
}
}
destroyOnDeath( heartElem )
{
self waittill ( "death" );
heartElem destroy();
}
destroyOnToggle( heartElem )
{
self waittill ( "stopheart" );
heartElem destroy();
}
Safe youre patch, and you're done! you added "Doheart" / "tgHeart" to youre Elitemossy v9.
Latest Explanation About the thread:
foreach( p in level.players ) /Means All players see Nothing
if(p.heart == 0) / = Nothing
{
p.heart = 1; / = The Real Heart,
p thread doHeart(); / = When P.heart = 1. it will activate it.
}
else
{
p.heart = 0; / = Stops it.
p notify( "stopheart" );
I hope this helped you!
very very nice job! i hope i push you do make more and more threads on how to add more code. Then, maybe the leechers will become coders and not leacch but code their own patches.