Call of Duty 5: Minimap: Difference between revisions

From COD Modding & Mapping Wiki
Jump to navigation Jump to search
mNo edit summary
 
(7 intermediate revisions by 2 users not shown)
Line 13: Line 13:


==Prepare your map==
==Prepare your map==
*In your map, you'll have to add two objects indicating the corners of your map. To do this, we right click with the mouse in the 2D grid, then click 'misc' and 'prefab'. Now go to '[root]/map_source/prefabs/' and select minimap_corner.map
*Using the caulk texture and in the Z axis view draw a square (best if both sides have same length) that cover the play area of your map


*Now press Space, to copy the object, and place the 2 corners in the right position. One in the top-right corner, and one in the bottom-left corner, both should be around the highest building's roof in height. Also, try to limit the unplayable space inside the square of the 2 corners.
*Add two script_origin indicating the corners of your map. To do this, right click with the mouse in the 2D grid, then click 'script' and 'script_origin'.
 
*With the newly created script_origin selected press N to bring up the properties and input the following key/value:
 
key: targetname
Value: minimap_corner
 
*Now press Space, to copy the object, and place the 2 corners in corner of the Caulked square you draw previously. One in the top-right corner, and one in the bottom-left corner, both should be around the highest building's roof in height. Also, try to limit the unplayable space inside the square of the 2 corners.




Line 27: Line 34:


==Take the screenshot==
==Take the screenshot==
Before we can run the map, create a new shortcut for Call of Duty 5 (either copy an existing one or create one from '[root]/CodWWmp.exe').


*Right click the shortcut, go to Properties and to the first text field (after 'Destination' I suppose) add the following text (append it) put this text at the end:
*Launch your map by using the Launcher Tab "Run Game";
*Select MP and the mp_usermaps mod from the drop down
*Set to 1 some of the options, as shown below:


+set thereisacow 1337 +set developer 1 +set developer_script 1 + set sv_pure 0 +devmap [mapname] +set r_fullscreen


*Now double click the new shortcut. When the map has loaded, [[Call of Duty 5: Console usage|bring up the console]] and enter '/exec minimap'. This will get rid of all HUD elements. Now type '/scr_minimap_height 20000'. 20,000 indicates how high we will be taken and will probably be too high. Adjust the height by re-entering the command till the white box fits in the screen (try to make it as big as possible). Now [[Call of Duty 4: Screenshots|take a screenshot]].
[[Image:minimap_launcher.png]]
 
 
*Notice also the following custom command to actually run the map:
 
+devmap mp_yourmap
 
*When in the game bring up the console and enter  
 
/exec minimap
 
This will get rid of all HUD elements + FXs.  
 
*Now type  
 
/scr_minimap_height 10000
 
20,000 indicates how high we will be taken and will probably be too high. Adjust the height by re-entering the command till the white box fits in the screen (try to make it as big as possible).  
 
*Now [[Call of Duty 4: Screenshots|take a screenshot]] using the key assign for that (F12 is default).


*I suggest you use Photoshop, if you have it, Paint Shop Pro or Gimp can do the job as well but Paint is just a little too basic.
*I suggest you use Photoshop, if you have it, Paint Shop Pro or Gimp can do the job as well but Paint is just a little too basic.
Line 40: Line 66:


==Add it to your map==
==Add it to your map==
*Bring up the [[Call of Duty 5: Assets Manager|Asset Manager]], and click File -> Open. Go to '[root]/source_data/' and open 'levels.gdt'.
*Bring up the [[Call of Duty 5: Asset Manager Explained|Asset Manager]], and click File -> Open.  
*Go to  
 
[root]/source_data/
 
and open 'levels.gdt'.


*On the left side, click 'material', and press 'New Entry'. In the textbox enter 'compass_map_[mapname]'. Now simply be sure the right panel looks exactly like this:
*On the left side, click 'material', and press 'New Entry'. In the textbox enter 'compass_map_[mapname]'. Now simply be sure the right panel looks exactly like this:
Line 50: Line 81:
*When you're done, click PC Convert -> Current Asset Only. If no errors appear, you've done it right.
*When you're done, click PC Convert -> Current Asset Only. If no errors appear, you've done it right.


*In '[root]/raw/images/' a new image has appeared, called 'compass_map_[mapname].iwi'. [[Call of Duty 4: .IWD file|Copy this into your [mapname].iwd, in the images directory]]. Now go to '[root]/raw/maps/mp/[mapname].gsc' and open it using Notepad (if it doesn't yet exists, copy one from an existing map, and rename that map's name to your map name) and add the following (or modify) lines:
*In  
 
[root]/raw/images/
 
a new image has appeared, called 'compass_map_[mapname].iwi'. [[Call of Duty 4: .IWD file|Copy this into your [mapname].iwd, in the images directory]]. Now go to '[root]/raw/maps/mp/[mapname].gsc' and open it using Notepad (if it doesn't yet exists, copy one from an existing map, and rename that map's name to your map name) and add the following (or modify) lines:


  maps\mp\_compass::setupMiniMap("compass_map_[mapname]");
  maps\mp\_compass::setupMiniMap("compass_map_[mapname]");
Line 61: Line 96:
  material,compass_map_[mapname]
  material,compass_map_[mapname]


*Now you should [[Call of Duty 5: Releasing General|finalise your map and run it]] your map and run it. The compass should now work.
*Now you should [[Call of Duty 5: Mapping MP#Releasing a Map|finalise your map and run it]] your map and run it. The compass should now work.






--[[User:Zeroy|Zeroy.]] 11:53, 10 November 2008 (UTC)
--[[User:Zeroy|Zeroy.]] 11:53, 10 November 2008 (UTC)

Latest revision as of 19:22, 8 March 2009

This tutorial will explain you how you can create a minimap for your multiplayer map.


Throughout this tutorial I will use '[mapname]' and '[root]'. Single-quote around text simply indicate where it starts and ends, and should never be copied along. Basically, you should replace '[mapname]' with your map name, include the 'mp_' prefix. '[root]' indicates the root directory of your Call of Duty 5 installation, for most users this would probably be

C:/Program Files/Activision/Call of Duty 5 World At War/

but it can differ depending on where you installed it (obviously ^^).

Prepare your map

  • Using the caulk texture and in the Z axis view draw a square (best if both sides have same length) that cover the play area of your map
  • Add two script_origin indicating the corners of your map. To do this, right click with the mouse in the 2D grid, then click 'script' and 'script_origin'.
  • With the newly created script_origin selected press N to bring up the properties and input the following key/value:
key: targetname
Value: minimap_corner
  • Now press Space, to copy the object, and place the 2 corners in corner of the Caulked square you draw previously. One in the top-right corner, and one in the bottom-left corner, both should be around the highest building's roof in height. Also, try to limit the unplayable space inside the square of the 2 corners.




  • Now fully recompile your map (you can check 'fast' and uncheck 'extra' in Light Options, as well as uncheck 'Connect Paths'). Move the '[mapname].ff' and '[mapname]_load.ff' files (which are located in '[root]/zone/english/') to '[root]/usermaps/[mapname]/' (create those directories if they do not yet exist). Also place the .iwd, if you have one already, in the same directory.

Take the screenshot

  • Launch your map by using the Launcher Tab "Run Game";
  • Select MP and the mp_usermaps mod from the drop down
  • Set to 1 some of the options, as shown below:



  • Notice also the following custom command to actually run the map:
+devmap mp_yourmap
  • When in the game bring up the console and enter
/exec minimap

This will get rid of all HUD elements + FXs.

  • Now type
/scr_minimap_height 10000

20,000 indicates how high we will be taken and will probably be too high. Adjust the height by re-entering the command till the white box fits in the screen (try to make it as big as possible).

  • I suggest you use Photoshop, if you have it, Paint Shop Pro or Gimp can do the job as well but Paint is just a little too basic.
  • Cut out the square _inside_ the white border, add some nice effect you like (I suggest a black fade from the sides), resize it to 512x512 (be sure to have 'Bicubic Sharper' selected in Photoshop) and save it as a .tga (Targa) file of 24 bits per pixel in '[root]/texture_assets/' (create the directory if it's not yet there).

Add it to your map

[root]/source_data/

and open 'levels.gdt'.

  • On the left side, click 'material', and press 'New Entry'. In the textbox enter 'compass_map_[mapname]'. Now simply be sure the right panel looks exactly like this:



  • When you're done, click PC Convert -> Current Asset Only. If no errors appear, you've done it right.
  • In
[root]/raw/images/

a new image has appeared, called 'compass_map_[mapname].iwi'. Copy this into your [mapname].iwd, in the images directory. Now go to '[root]/raw/maps/mp/[mapname].gsc' and open it using Notepad (if it doesn't yet exists, copy one from an existing map, and rename that map's name to your map name) and add the following (or modify) lines:

maps\mp\_compass::setupMiniMap("compass_map_[mapname]");
setdvar("compassmaxrange","2000");
  • The compassmaxrange value should be changed to what you like. The lower the number, the shorter the minimap's range, but the more precise.
material,compass_map_[mapname]


--Zeroy. 11:53, 10 November 2008 (UTC)