Call of Duty 5: MP - Map GSC File

From COD Modding & Mapping Wiki
Revision as of 04:32, 11 November 2008 by CoDEmanX (talk | contribs)
Jump to navigation Jump to search

Create A Map Script File

1: Create a new Notepad or TextPad file and open it.
2: Copy the following into the file.

main()
{
	//maps\mp\mp_yourmapname_fx::main();		
	maps\mp\_load::main();
	
	//maps\mp\_compass::setupMiniMap("compass_map_mp_yourmapname");

	// If the team nationalites change in this file,
	// you must update the team nationality in the level's csc file as well!
	game["allies"] = "marines";
	game["axis"] = "german";
	game["attackers"] = "axis";
	game["defenders"] = "allies";
	game["allies_soldiertype"] = "german";
	game["axis_soldiertype"] = "german";

	setdvar( "r_specularcolorscale", "1" );
	setdvar("compassmaxrange","2100");

}

3: Save the file in

raw\maps\mp\mp_yourmapname.gsc

Remember that when saving you may have to select "All Files" as it night save your file as "mp_yourmapname.gsc.txt" and that's no good.


Editing Your Script File

  • maps\mp\mp_yourmapname_fx::main();
    • Calls the main() function of maps\mp\mp_yourmapname_fx.gsc, this is used for FXs.
  • maps\mp\_load::main();
    • Calls the main() function of maps\mp\_load.gsc
    • Required for just about everything, always leave alone.
  • maps\mp\_compass::setupMiniMap("compass_map_mp_yourname");
    • Change it to the material name of you minimap texture.
  • game["allies"] = "marines";
  • game["axis"] = "german";
    • Change the nationality at the end to change the respective team nationality.
      • "marines", "russian", "german", "japanese"
  • game["attackers"] = "axis";
  • game["defenders"] = "allies";
    • Change to what role you want each team to play.
  • game["allies_soldiertype"] = "german";
  • game["axis_soldiertype"] = "german";
    • This sets the clothing for each team.
      • "german" or "pacific"


Combining With Your Map

  • Make sure your file is properly saved and updated in
\raw\maps\mp\mp_yourmapname.gsc
  • Open the CoDWaW Compile Tools application and go to the "Level Compiling" tab.
  • Build your Fast File then click on "Update Zone File".
  • Look for
rawfile,maps/mp/mp_yourmapname.gsc

on the right. If its missing then create the entry

  • Rebuild your Fast File and test the map.


Sources: Treyarch's Wiki