Post: TUTORIAL How to edit a Zombieland Patch
01-24-2011, 04:42 PM #1
Hawkin
Lord of the Undead
(adsbygoogle = window.adsbygoogle || []).push({}); OK everyone has been asking me how they can edit their own Zombie patch. So I decided to make this post to help people out with that. Zombieland is made up of basically 3 key gsc files. There are other files but these are the only ones you need to edit.
_missions.gsc
_humanzombiesetup.gsc
_custommapedits.gsc

This is not a thread for total nubes . You need to know how to decompress and recompress a patch. There are many threads telling you how to do this. You must login or register to view this content.

You can start with my Zombieland Patch, or most patches based off of the original Zombieland. Here is my Zombieland Patch 3.1.1
You must login or register to view this content.

You need these files Most are available at the Tutorial link on Decompressing above, the others can be googled and downloaded for free.
packzip.exe and offzip.exe files
notepad++
hex editor
windows xp, vista, or 7

1. Install hex editor, and notepad++ then restart your pc.
2. Create a fold on your desktop called patch put the packzip.exe and offzip.exe files in there as well as the patch_mp.ff file
3. Open the command prompt and type: cd desktop/patch
4. Then type: offzip -a -z -15 patch_mp.ff ./ 0
This will decompress the patch file into many files with weird numbers and letters (these are the file offsets) you only need the files 0000b4a0.dat, 00014f51.dat, and 24ef6.dat. so delete the rest. (do not delete the patch_mp.ff or packzip or offzip)
5. Follow the tutorial link above to decompress the missions.gsc file.
6. You can use the same method to decompress the other 2 files. Just change the offsets and the dat files used as follows. Here is the offset information to get the 2 gsc files decompressed and ready to edit.
7. custommapedits.gsc is in 14f51.dat and 24ef6.dat between the offsets fd18 - 11f45
Humanzombiesetup.gsc can be found in 14f51.dat between the offsets ba78 - ec67
Missions.gsc can be found in b4a0.dat & 14f51.dat between the offsets d7d2 - 1061c
8. You can edit the uncompressed gsc files with notepad++ Use the link below to learn more about gsc coding.

You must login or register to view this content.

9. You have to recompress the gsc files back into the patch_mp.ff file as described in the decompressing/recompress tutorial.

10. An example of a simple edit is to change the cost of items in the shop. In notepad++ open missions.gsc
11. hit control +f (find) and type: costinit hit enter until you get to something like this.---------------
CostInit()
{
level.itemCost = [];
level.itemCost["ammo"] = 100;
level.itemCost["LMG"] = 100;
level.itemCost["Assault Rifle"] = 75;
level.itemCost["Machine Pistol"] = 25;
level.itemCost["Sniper Rifle"] = 50;
level.itemCost["Explosive Bullets"] = 1450;
level.itemCost["Sentry"] = 250;
level.itemCost["Unlimited"] = 800;
level.itemCost["Nuke"] = 1990;
level.itemCost["Riot"] = 100;
level.itemCost["Teleport"] = 750;
level.itemCost["TeleportZ"] = 600;
level.itemCost["Akimbo"] = 50;
level.itemCost["Eotech"] = 50;
level.itemCost["Mine"] = 75;
level.itemCost["FMJ"] = 50;
level.itemCost["Silencer"] = 10;
level.itemCost["XMags"] = 25;
level.itemCost["ROF"] = 10;
level.itemCost["Invisibility"] = 700;
level.itemCost["Poltergeist"] = 900;
level.itemCost["Flash"] = 600;
level.itemCost["Turtle"] = 300;
level.itemCost["HTurtle"] = 150;
level.itemCost["Hare"] = 300;
level.itemCost["humanhp"] = 250;
level.itemCost["health"] = 50;
level.itemCost["Thermal"] = 50;
level.itemCost["ThrowingKnife"] = 260;
level.itemCost["SteadyAim"] = 25;
level.itemCost["SteadyAimPro"] = 5;
level.itemCost["SleightOfHand"] = 25;
level.itemCost["SleightOfHandPro"] = 5;
level.itemCost["SitRep"] = 5;
level.itemCost["SitRepPro"] = 20;
level.itemCost["StoppingPower"] = 195;
level.itemCost["StoppingPowerPro"] = 5;
level.itemCost["ColdBlooded"] = 190;
level.itemCost["ColdBloodedPro"] = 10;
level.itemCost["Ninja"] = 200;
level.itemCost["NinjaPro"] = 100;
level.itemCost["Lightweight"] = 95;
level.itemCost["LightweightPro"] = 5;

12. Changing any of these numbers will change the cost of the item in the shop.

13. In CustomMapEdit.gsc you can make map changes to many of the maps. However some maps are found in humanzombieedits.gsc

Here is an example of what the code for Underpass looks like:

Underpass()
{
CreateWalls((-1201, 617, 435), (-1089, 823, 465));
CreateElevator((618, 255, 380), (-1100, 2666, 494));
CreateElevator((-3253, 552, 423), (1178, 2280, 253));
CreateElevator((3631, 347, 299), (3825, 1111, 395));
CreateElevator((4608, 671, 656), (540, 1479, 552));
CreateHiddenFlag((3389, 3394, 395), (531, -1536, 1500));
CreateElevator((-2886, -392, 2195), (-464, 2078, 369));
CreateAsc((636, 2529, 507), (621, 2529, 699), 0, 5);
CreateAsc((-1281, 2000, 415), (-1281, 2000, 675), 0, 5);
CreateTurret((-1281, 2100, 620), (0, -90, 0));
CreateBlocks((-1110, 708, 430), (0, 0, 0));
CreateBlocks((-510, 571, 565), (0, 90, 0));
CreateRamps((4388, 1903, 62Cool Man (aka Tustin), (4508, 2528, 450));
CreateWalls((-326, 1229, 363), (-524, 1229, 419));
CreateElevator((-1616, 2660, 616), (-1685, 1692, 2009));
}
Example:
CreateElevator is the command to create a teleport flag
CreateElevator((x1, y1, z1), (x2, y2, z2));
the first set of xyz numbers is the location of the flag that teleports you the 2nd set of xyz number is the location you will land. You can get these numbers from a standard infection from most CL patches, or from my zombieland 3.1.1 patch. (three numbers in white that look like this on your screen (-1616, 2660, 616)
x and y are your position on the ground where z is elevation (how high of low you are) remember that the Z reading on your screen is the position of your head not you feet.

CreateAsc is the command to make a floating care package
CreateAsc((x1, y1, z1), (x2, y2, z2)), a, b);
xyz is almost always the same in each command locations. the first set is where the care package starts, and the second is where it stops. It travels in a loop going from 1 to 2 to and so on.
a=angle Just always leave as 0
b=time the amount of time it take to get from point 1 to point 2 5 is good.

The are many more commands you will have to figure out on your own, but here are a few more.
Create walls, turrets, and blocks should be self explanatory.
HiddenFlag is a flag that will not show up on radar.
Grid is a flat surface of Care Packages xyz1 is one corner xyz2 is the diagonal corner, same goes for walls.
Doors are the hardest to figure because of dealing with the angels, and for me it still trail and error. A poor explaination of each command for the maps can be found in humanzomiesetup.gsc from line 124 to line 588 (approx)

Example:
CreateDoors(open, close, angle, size, height, hp, range)
this is what the header of a build command thread looks like.
you can see from this when comparing to an actual door line command (below) that open is the XYZ position of the door when open. close is the XYZ position of the door when closed. You also see that open, close, and angle all require 3 numbers. Where as size, height, hp, and range, require just 1 number. (I am still unsure what Range is.)
CreateDoors((1386, 7960, 235), (1386, 7845, 235 ), (90,90, 90), 3, 2, 50, 75);

Well, I hope this will give you a basic understanding of the Zombie patch format. Good luck and watch your syntax errors.

-Hawkin
(adsbygoogle = window.adsbygoogle || []).push({});

The following 26 users say thank you to Hawkin for this useful post:

.DeadlyMoDz25, |ManiaC|, 890popbox, A_lugie, anddrew, Bigbadpaul2, bigboybobby14, Blackstorm, DrDoomBringer, GodDrinksPepsi, hydro_122499, Jannis96, keithfin, littlecarlos, Mr__Shalemari, mrkhlgt, Mw2-, Plurals, skillz369, soebred, tjhash, uhChad, woofdawg233, ww2gamer3, xd366, ZzXr3V0LuTi0NzZ
02-02-2011, 05:22 PM #29
Hey me and my friend have been starting to code after looking at some zombieland patches i love this thread... great job! :black::black:
02-02-2011, 05:41 PM #30
Hawkin
Lord of the Undead
Originally posted by anddrew View Post
don't you mean 1f45?


no it's 14f51

---------- Post added at 11:32 AM ---------- Previous post was at 11:29 AM ----------

Originally posted by anddrew View Post
do you think you could copy + paste the .gsc's?
they don't show up in ffviewer :(
[/url]


If you are going to use FF Viewer you need the Xbox version of the patch. It only works with XBOX Patches. Also the syntax checker is next to useless.

---------- Post added at 11:42 AM ---------- Previous post was at 11:32 AM ----------

Originally posted by anddrew View Post


you could use You must login or register to view this content.


Fine but don't ask for me to re-compress it for you.
I also don't know what version this was. 3.1 or 3.2 It was a backup as I am releasing V3.3 very soon (Maybe today). So you need to use all three together. If you mix and match them with a different versions THEY WILL NOT WORK. The gsc's not listed below are the same in 3.1 and 3.2. and don't matter.

You must login or register to view this content.

You must login or register to view this content.

You must login or register to view this content.

---------- Post added at 11:50 AM ---------- Previous post was at 11:42 AM ----------

Originally posted by anddrew View Post
getting these errors:

-Function Error: Unknown Function "isalive()"
etc...
-Syntax Error: Missing ';' on line 1396
-Syntax Error: Uneven amount of quotes " on line 581
-Syntax Error: Uneven amount of quotes " on line 747
-Syntax Error: Uneven amount of quotes " on line 1003
-Syntax Error: Uneven amount of quotes ' on line 9
-Syntax Error: Uneven amount of quotes ' on line 747
-Syntax Error: Uneven amount of open brackets [] on line 10
-Syntax Error: Uneven amount of open parentheses () on line 748

help? they're your codes Winky Winky


What syntax checker are you using? Thats not FF Viewer it's Much better. I want that.
However all the function errors you can ignore. it just means it is referring to a thread not in that GSC.
The Uneven errors must be things that you changed, because otherwise the patch would not work. It means you are missing a { and a } and a ; and a "

Given how long the original post of errors was you are actually missing many of those symbols. If you don't understand the basics of C++ you will not be able to edit this patch. Look online you will find many tutorials for C++.

---------- Post added at 11:53 AM ---------- Previous post was at 11:50 AM ----------

Originally posted by mrkhlgt View Post
Sorry for more noobish question but how would you add or change shop items, I would like to be able to buy c4 & claymores in human shop menu. is it just adding additional lines under the CostInit() section or will this just show on menu but buy nothing. Also i would like to change player menu buttons as i play with controls flipped and when im zombie in last stand with throwing knife everyone gets kicked.:cry:


Way too complicated for me to explain, but to add a new store item you would have to make many changes in missions.gsc and humanzombiessetup.gsc

Menu listing, the cost, the action to buy the item, then the thread of what that item actually does. Not to mention you would have to create a new page in the menu. I just did this for v3.3 and it was not easy. The kicking bit I made better in v3.3 by default it will always try to kick you, which it can't. Plus I got rid of final stand.

---------- Post added at 11:59 AM ---------- Previous post was at 11:53 AM ----------

Originally posted by slice741 View Post
Yo, i did everything in the discription, and i add a whole bunch of stuff to highrise, but when i went onto the game, it automaticcally went back to the map that u created, can u tell me y this happened so i can fix it??


You must of left my code in there, you need to add your code in the same place mine is. you can delete my edits or add yours to mine. it must still be in the same thread that looks like:

Highrise()
{ EDITSINHERE;
}

---------- Post added at 12:01 PM ---------- Previous post was at 11:59 AM ----------

Originally posted by slice741 View Post


HighRise()
{
HiddenFlag((3012, 11351, 3420), (-55, 20296, 1910));

}

if u could tell me whats wrong with this, it would be greatly appreciated Smile


It's CreateHiddenFlag((3012, 11351, 3420), (-55, 20296, 1910));

---------- Post added at 12:41 PM ---------- Previous post was at 12:01 PM ----------

Somebody asked me this in a PM but I thought I'd include it here:
can u make a tut on how to extract bunkers from zombie patches and put it in a normal patch..
i get sytax errors
Underpass()
{
CreateWalls((-1201, 617, 435), (-1089, 823, 465));
CreateElevator((618, 255, 380), (-1100, 2666, 494));
etc
}

You'd have to put in every command thread for each command you use. They are in HumanZombieSetup. example the line CreateWalls tells it to run this thread:

    CreateWalls(start, end)
{
D = Distance((start[0], start[1], 0), (end[0], end[1], 0));
H = Distance((0, 0, start[2]), (0, 0, end[2]));
blocks = roundUp(D/55);
height = roundUp(H/30);
CX = end[0] - start[0];
CY = end[1] - start[1];
CZ = end[2] - start[2];
XA = (CX/blocks);
YA = (CY/blocks);
ZA = (CZ/height);
TXA = (XA/4);
TYA = (YA/4);
Temp = VectorToAngles(end - start);
Angle = (0, Temp[1], 90);
for(h = 0; h < height; h++){
block = spawn("script_model", (start + (TXA, TYA, 10) + ((0, 0, ZA) * h)));
block setModel("com_plasticcase_friendly");
block.angles = Angle;
block Solid();
block CloneBrushmodelToScriptmodel( level.airDropCrateCollision );
wait 0.001;
for(i = 1; i < blocks; i++){
block = spawn("script_model", (start + ((XA, YA, 0) * i) + (0, 0, 10) + ((0, 0, ZA) * h)));
block setModel("com_plasticcase_friendly");
block.angles = Angle;
block Solid();
block CloneBrushmodelToScriptmodel( level.airDropCrateCollision );
wait 0.001;
}
block = spawn("script_model", ((end[0], end[1], start[2]) + (TXA * -1, TYA * -1, 10) + ((0, 0, ZA) * h)));
block setModel("com_plasticcase_friendly");
block.angles = Angle;
block Solid();
block CloneBrushmodelToScriptmodel( level.airDropCrateCollision );
wait 0.001;
}
}

Each line in map design is just running a thread. If you don't include the thread you will get an error. you would also have to include the create map commands to tell it on MapX to draw the stuff you want. It might be easier to add the CL patch to a gutted zombie patch then the way you are doing it.

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

anddrew, mrkhlgt
02-02-2011, 05:47 PM #31
anddrew
League Champion
Originally posted by Hawkin View Post
I am a pro god. (shortened and fake quote Winky Winky)


yes you are Winky Winky
sorry about filling up your message box with my quotes and questions :/

I shall try them out, I will also try to remember the syntax checker
here you go:
You must login or register to view this content.
not mine.

The following user thanked anddrew for this useful post:

Hawkin
02-02-2011, 06:33 PM #32
Hawkin
Lord of the Undead
thanx for the help but im still getting errors and i don't know why
i added
createwalls
create ramps
create blocks
-----------------------------------------
If you are getting errors check your syntax, because you shouldn't be. Or maybe you still have a command you didn't add like createturrets createelevator (flags) creategrids (floors)

However for the maps to actually draw, I was thinking about it, and you should really add a new gsc like custommapedits.gsc to your patch. Or you can add this to your init() on missions.gsc
    level thread initMap();


Then this must go somewhere in missions.gsc

    initMap()
{
level.doCustomMap = 0;
level.doorwait = 2;
level.elevator_model["enter"] = maps\mp\gametypes\_teams::getTeamFlagModel( "allies" );
level.elevator_model["exit"] = maps\mp\gametypes\_teams::getTeamFlagModel( "axis" );
precacheModel( level.elevator_model["enter"] );
precacheModel( level.elevator_model["exit"] );
wait 1;
if(getDvar("mapname") == "mp_afghan"){ /** Afghan **/
level thread Afghan();
level.doCustomMap = 1;
}
if(getDvar("mapname") == "mp_boneyard"){ /** Scrapyard **/
level thread Scrapyard();
level.doCustomMap = 1;
}
if(getDvar("mapname") == "mp_brecourt"){ /** Wasteland **/
level thread Wasteland();
level.doCustomMap = 1;
}
if(getDvar("mapname") == "mp_checkpoint"){ /** Karachi **/
level thread Karachi();
level.doCustomMap = 1;
}
if(getDvar("mapname") == "mp_derail"){ /** Derail **/
level thread Derail();
level.doCustomMap = 1;
}
if(getDvar("mapname") == "mp_estate"){ /** Estate **/
level thread Estate();
level.doCustomMap = 1;
}
if(getDvar("mapname") == "mp_favela"){ /** Favela **/
level thread Favela();
level.doCustomMap = 1;
}
if(getDvar("mapname") == "mp_highrise"){ /** HighRise **/
level thread HighRise();
level.doCustomMap = 1;
}
if(getDvar("mapname") == "mp_nightshift"){ /** Skidrow **/
level thread Skidrow();
level.doCustomMap = 1;
}
if(getDvar("mapname") == "mp_invasion"){ /** Invasion **/
level thread Invasion();
level.doCustomMap = 1;
}
if(getDvar("mapname") == "mp_quarry"){ /** Quarry **/
level thread Quarry();
level.doCustomMap = 1;
}
if(getDvar("mapname") == "mp_rundown"){ /** Rundown **/
level thread Rundown();
level.doCustomMap = 1;
}
if(getDvar("mapname") == "mp_rust"){ /** Rust **/
level thread Rust();
level.doCustomMap = 1;
}
if(getDvar("mapname") == "mp_subbase"){ /** SubBase **/
level thread SubBase();
level.doCustomMap = 1;
}
if(getDvar("mapname") == "mp_terminal"){ /** Terminal **/
level thread Terminal();
level.doCustomMap = 1;
}
if(getDvar("mapname") == "mp_underpass"){ /** Underpass **/
level thread Underpass();
level.doCustomMap = 1;
}
if(getDvar("mapname") == "mp_overgrown"){ /** Overgrown **/
level thread Overgrown();
level.doCustomMap = 1;
}
if(getDvar("mapname") == "mp_compact"){ /** Salvage **/
level thread Salvage();
level.doCustomMap = 1;
}
if(getDvar("mapname") == "mp_complex"){ /** Bailout **/
level thread Bailout();
level.doCustomMap = 1;
}
if(getDvar("mapname") == "mp_crash"){ /** Crash **/
level thread Crash();
level.doCustomMap = 1;
}
if(getDvar("mapname") == "mp_storm"){ /** Storm **/
level thread Storm();
level.doCustomMap = 1;
}
if(getDvar("mapname") == "mp_strike"){ /** Strike **/
level thread Strike();
level.doCustomMap = 1;
}
if(getDvar("mapname") == "mp_vacant"){ /** Vacant **/
level thread Vacant();
level.doCustomMap = 1;
}
if(getDvar("mapname") == "mp_fuel2"){ /** Fuel **/
level thread Fuel();
level.doCustomMap = 1;
}
if(getDvar("mapname") == "mp_trailerpark"){ /** Trailer Park **/
level thread Park();
level.doCustomMap = 1;
}
if(getDvar("mapname") == "mp_abandon"){ /** Carnival **/
level thread Carnival();
level.doCustomMap = 1;
}
if(level.doCustomMap == 1){
level.gameState = "starting";
level thread CreateMapWait();
} else {
level.gameState = "starting";
wait 15;
level notify("CREATED");
}
}


You can take out the maps you don't want to use if you do it right. you should also have something like this in your missions.gsc file somewhere.

    CreateMapWait()
{
for(i = 30; i > 0; i--)
{
level.TimerText destroy();
level.TimerText = level createServerFontString( "objective", 1.5 );
level.TimerText setPoint( "CENTER", "CENTER", 0, -100 );
level.TimerText setText("^3Building Map: " + i);

wait 1;
}
level notify("CREATED");
foreach(player in level.players)
{ player VisionSetNakedForPlayer(getDvar("mapname"), 0);
}
}


It's alot of stuff you need to add. I may still be forgetting something.

The following user thanked Hawkin for this useful post:

anddrew
02-02-2011, 09:24 PM #33
this has been a bunch of help Happy
02-02-2011, 09:39 PM #34
you are very good at explaining :p
02-03-2011, 02:26 AM #35
OMG!! thnx man, im so happy right now ^_^ thnx lots
02-03-2011, 04:47 AM #36
IKILLU2014
Toaster...
I love how people are having trouble with this. I did them all in a matter of 15 mins and did it on both 3.1 and 3.2
02-03-2011, 01:38 PM #37
Ok i've edited everyting I wanted too and it works great thank yu very much, but I want to add in the mod menu from the older 2.2V but the bad thing is the 22 valid block files are different and there is no f14 file so how would I edit that in??
Thanks
Hawkie

Copyright © 2026, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo