Call of Duty 5: Custom Maps Minimap Mod Fix

From COD Modding & Mapping Wiki
Revision as of 15:33, 26 February 2009 by Zeroy (talk | contribs) (New page: Image:Nutshell.png This tutorial explains how to add minimap with the current version of the Modtools. == THE PROBLEM == Basically, in order for a custom map to get its minimap to ...)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

This tutorial explains how to add minimap with the current version of the Modtools.


THE PROBLEM

Basically, in order for a custom map to get its minimap to show on the teams menu, the map maker has to start using mapsTable.csv file, as there is a reference in there to a materials file which will show the minimap:

From tactical_map.inc:

itemDef
{
style WINDOW_STYLE_SHADER
name "mini_map2_overlay"
rect ORIGIN_MAP_FRAME MAP_WIDTH MAP_WIDTH RIGHTITEM_ALIGN VERTICAL_ALIGN_TOP
origin MAP_OFFSET
forecolor 1 1 1 1
exp material( tableLookup( "mp/mapsTable.csv", 0, dvarString( mapname ), 7 ) )
visible when ( SHOULD_SHOW_MAP );
decoration
}

The materials file it references is called:

compass_overlay_map_YOURMAP

So, under the Treyarch design, each map maker has to make a mapstable.csv with their own map-specific stuff in it:

a0,b1,c2,d3,e4,f5,g6,h7,i8,j9,k10
maxnum_map,14,,,,,,,,,
#mapname,#allies characters,#axis characters,#mapname,#mapimage,#index,#description,#mapoverlay,#map size description,#vehicles,#splitscreen
mp_airfield,pacific,pacific,MPUI_AIRFIELD,loadscreen_mp_airfield,0,MPUI_DESC_MAP_AIRFIELD,compass_overlay_map_airfield,LARGE,NO,NO
mp_asylum,german,german,MPUI_ASYLUM,loadscreen_mp_asylum,1,MPUI_DESC_MAP_ASYLUM,compass_overlay_map_asylum,MEDIUM,NO,YES
mp_castle,pacific,pacific,MPUI_CASTLE,loadscreen_mp_castle,2,MPUI_DESC_MAP_CASTLE,compass_overlay_map_castle,MEDIUM,NO,YES
mp_shrine,pacific,pacific,MPUI_SHRINE,loadscreen_mp_shrine,3,MPUI_DESC_MAP_SHRINE,compass_overlay_map_shrine,LARGE,NO,YES
mp_courtyard,pacific,pacific,MPUI_COURTYARD,loadscreen_mp_courtyard,4,MPUI_DESC_MAP_COURTYARD,compass_overlay_map_courtyard,SMALL,NO,YES
mp_dome,german,german,MPUI_DOME,loadscreen_mp_dome,5,MPUI_DESC_MAP_DOME,compass_overlay_map_dome,SMALL,NO,YES
mp_downfall,german,german,MPUI_DOWNFALL,loadscreen_mp_downfall,6,MPUI_DESC_MAP_DOWNFALL,compass_overlay_map_downfall,LARGE,YES,NO
mp_hangar,pacific,pacific,MPUI_HANGAR,loadscreen_mp_hangar,7,MPUI_DESC_MAP_HANGAR,compass_overlay_map_hangar,MEDIUM,NO,YES
mp_makin,pacific,pacific,MPUI_MAKIN,loadscreen_mp_makin,8,MPUI_DESC_MAP_MAKIN,compass_overlay_map_makin,MEDIUM,NO,YES
mp_outskirts,german,german,MPUI_OUTSKIRTS,loadscreen_mp_outskirts,9,MPUI_DESC_MAP_OUTSKIRTS,compass_overlay_map_outskirts,LARGE,YES,NO
mp_roundhouse,german,german,MPUI_ROUNDHOUSE,loadscreen_mp_roundhouse,10,MPUI_DESC_MAP_ROUNDHOUSE,compass_overlay_map_roundhouse,MEDIUM,YES,NO
mp_seelow,german,german,MPUI_SEELOW,loadscreen_mp_seelow,11,MPUI_DESC_MAP_SEELOW,compass_overlay_map_seelow,LARGE,YES,NO
mp_suburban,german,german,MPUI_SUBURBAN,loadscreen_mp_suburban,12,MPUI_DESC_MAP_SUBURBAN,compass_overlay_map_suburban,MEDIUM,NO,YES
mp_YOURMAP,german,german,MPUI_YOURMAP,loadscreen_mp_YOURMAP,12,MPUI_DESC_MAP_YOURMAP,compass_overlay_map_YOURMAP,SIZE_OF_YOURMAP,NO,YES
dlc,pacific,pacific,MP_DLC_MAPS,download_screen,13,PLATFORM_DLCMAPS,compass_overlay_map_blank,MEDIUM,NO,NO

You are supposed to:

  • Change the max map number from 13 to 14
  • Put in all the details about your map, including the material file compass_overlay_map_YOURMAP

So, having done all that, you compile it with your map, right? Wrong! It dont work! For some strange reason, the game's executable wont pick the custom mapstable.csv file up from inside a map. I dont know if this is a directory thing (I susupect it is - another example of how the "Games for Windows" has broken the game), but whatever it is, the result is the same: compiling mapsTable.csv inside a custom map's .FF file wont work.

What you are supposed to do; what Treyarch intend for you to do (I think), is compile it in a mod.ff file.

So, now Treyarch have mappers making mods as well to run their maps.

What if a server Admin wants to run a number of different maps, and a mod? Well, he would have to have a mod.ff file for every map, and also one for his mod (say AWE5 for example).

So, its another thing nerffed up, as obviously, you cant run more than 1 mod.ff file at a time from a mod folder.

WORK AROUND

What about modders making a single custom mapsTable.csv file for all the custom maps released? Well, yes: that would work, but would mean the modder would have to update the mod.ff file in order to accomodate every new custom map release.

Not very practicable.

So, this is where modders have to think around corners, and out-side the box. I came up with this method:

Each modder will have to build a menu file into his mod.ff file, with a materials file, and this will give a UNIVERSAL method of showing the minimap for every single map made - custom and stock.

  • First, you need to grab some assets from COD4:
 raw/materials/compass_overlay_map_blank
 raw/image/empty_overlay.iwi
  • Make a change to:
ui_mp/ tactical_map.inc

And this is the change:

itemDef
{
style WINDOW_STYLE_SHADER
name "mini_map2_overlay"
rect ORIGIN_MAP_FRAME MAP_WIDTH MAP_WIDTH RIGHTITEM_ALIGN VERTICAL_ALIGN_TOP
origin MAP_OFFSET
forecolor 1 1 1 1
exp material( compass_overlay_map_blank )
visible when ( SHOULD_SHOW_MAP );
decoration
}

Basically, it just takes mapstable.csv completely out of the equation, and replaces it with a universal "See Through" image file - empty_overlay.iwi.

  • Compile the materials and menu file in with your mod.ff and include empty_overlay.iwi in with the rest of your image files in your mods IWD file.

BINGO! Instant minimap for every map going!

By Tally