Necessary map declarations

From Mod Wiki
Revision as of 11:40, 22 November 2007 by DavidE (talk | contribs)
An Advanced Map
1. Introduction and goals of the tutorial
2. Necessary map declarations
3. Caulk hull
4. Creating a simple terrain
5. Adding an atmosphere
6. Adding player spawns
7. Adding base structures
8. Adding base vehicles
9. Creating a constructible Bridge
10. Adding an MCP escort objective
11. Adding a Shield Generator hack objective
12. Creating a destructible objective
13. Adding Objective spawns and vehicles
14. Info Objectives
15. Deployzones
16. Playzones
17. Masks
18. Barebones Map script
19. Creating a command map
20. Levelshot

Here is a list of materials for assets created later on. Simply copy the text from the box below and save to materials/yourmapname.mtr Don't forget to find/replace 'etqwmap' with yourmapname.

#include <materials/commandmaps.include>

// ====================================================
// ETQW Map Megatexture materials
// ==================================================== 

material megatextures/etqwmap { useTemplate megatextures/default_ambient_spec< "etqwmap" > }
material megatextures/etqwmap_noshadows { useTemplate megatextures/default_ambient_spec_noshadows< "etqwmap"  > }
            
// ====================================================
// ETQW Map Command map materials
// ====================================================
 
material commandmaps/etqwmap
{
	templates/game/maps/cmMap( "commandmaps/etqwmap.tga" )
 }

// larger scale map for out of bounds area
material commandmaps/etqwmap_oob
{
	templates/game/maps/cmMap( "commandmaps/etqwmap_oob.tga" )
}

material commandmaps/etqwmap_territory_01 { 
	templates/game/maps/cmIcon( makealpha( commandmaps/etqwmap/etqwmap_ter01.tga ) )
}

material commandmaps/etqwmap_territory_02 { 
	templates/game/maps/cmIcon( makealpha( commandmaps/etqwmap/etqwmap_ter02.tga ) )
}

material commandmaps/etqwmap_territory_03 {
	templates/game/maps/cmIcon( makealpha( commandmaps/etqwmap/etqwmap_ter03.tga ) )
}

material commandmaps/etqwmap_territory_04 { 
	templates/game/maps/cmIcon( makealpha( commandmaps/etqwmap/etqwmap_ter04.tga ) )
}
 
material commandmaps/etqwmap_territory_05 { 
	templates/game/maps/cmIcon( makealpha( commandmaps/etqwmap/etqwmap_ter05.tga ) )
}

material levelshots/etqwmap { 
 	 sort gui
	{
 		blend blend
 		vertexColor
 		map nopicmip clamp	"levelshots/etqwmap"
	}
}

material levelshots/thumbs/etqwmap { 
	 sort gui
	{
		blend blend
		vertexColor
		map nopicmip clamp	"levelshots/thumbs/etqwmap"
	}
}

Here are the map definitions needed for a functioning map. Save these to def/yourmapname.def

#include "def/pathfinder.include"

heightMap heightmaps/etqwmap {
	heightMap "heightmaps/etqwmap.tga"
}

deployMask masks/etqwmap/mcp {
	mask		"masks/etqwmap/mcp.tga"
}

deployMask masks/etqwmap/default {
	mask		"masks/etqwmap/default.tga"
}

deployMask masks/etqwmap/mcp_route {
	mask		"masks/etqwmap/mcp_route.tga"
}

deployMask masks/etqwmap/playzone {
	mask		"masks/etqwmap/playzone.tga"
}

stringMap pathfinder_etqwmap {
	_pathfinder_default( "etqwmap", 20 )
	"playzone_0"					"etqwmap_playzone_path_and_heightmap"
 	"resolution_x_playzone_0"		"1280"
 	"resolution_y_playzone_0"		"1280"		
	"mg_resolution_x_playzone_0"	"1280"
	"mg_resolution_y_playzone_0"	"1280"	
}