Creating a Basic Day of Defeat Map: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
Line 73: Line 73:


These values are important, write them down or take again a screenshot.
These values are important, write them down or take again a screenshot.
Finally, create a text file called <code><mapname>.txt</code> in <code><game dir>\overviews\</code>. This file will define the precise numbers needed to align the overview.
Example of the overview script with the example settings:
// Overview description file for MAPNAME
global
{
      ZOOM 1.51
      ORIGIN -608.00 288.00 136.00
      ROTATED 1
}
layer
{
    IMAGE "overviews/MAPNAME.bmp"
    HEIGHT -305.00
}
Of course replace <code>MAPNAME</code> with the name of your actual map.


== Conclusion ==
== Conclusion ==

Revision as of 18:13, 14 August 2023

This Article focusses on creating a basic Map that can be recognized as a Day of Defeat map. Basics like creating brushes and entities should already be known.

Creating Spawnpoints

Each team should spawn be far away from each other. The entities to create spawnpoints are info_player_axis for the Axis Team and info_player_allies for the Allied Team.

Please make sure you have at least 16 spawn points per team and widely spaced to ensure that there is no telefragging. The only reason why these entities would be used alone is for testing purposes; without any objective entities the map serves no purpose. These entities are what it takes for the map to be recognized as a Day of Defeat map. In order for the map to operate, with objectives, there is a wide variety possible.

Spawning British Troops

By default only American Soldiers are spawning at the info_player_allies entity. If you want to spawn british troops you have to place and edit the info_doddetect entity. If you change the detect_allies_country (Country for Allied team) Attribute you can select between "United States " and " British ".

Placing Locations

It is possible for Players to reveal their location to Teammates with help of the dod_location entity. If a player puts %l in their "say" text, the name of the closest location or dod_control_point will be put in its place.

To define such a location name just place a dod_location entity in the map an write the desired description of the location in the Name of this location Attribute.

Game Modes

Day of Defeat comes by default with the following Game Modes. How to set up your Map for these can be found here:

Creating an Overview Map

Day of Defeat have a mini-map mode, that shows a level overview and projects players and objects on that map. An overview map is an image made from in-game screenshots and should be created once a new map is finished.

Todo: Explain the creation of creating a Overview Map.
Tip.pngTip:Creating a overview map should be one of your last tasks by creating a Map for Day o Defeat, so the overview matches with the actual Map.

Preparations

Open Day of Defeat and select to the Options Menu, then select the Video Tab.

Write down the following:

  • Resolution
  • Display Mode
  • Any checkboxes that are checked and unchecked

Then close the game and proceed with the next step.

Configuring Day of Defeat for creating a overview

In your Steam Library, right-click on Day of Defeat, choose Properties then Set Launch Options.

In the opened Command Line add the following Command Line Options (if there are already Command Line Options make a backup of them and remove them before adding the following ones):

-nojoy -console -developer -dev -windowed -w 1024 -h 768

Click on OK and exit the Property Window.

Creating the overview screenshot and description file

Open Day of Defeat again, it will open now in the Resolution 1024x768 and in windowed mode. Open the Map you want to create the overview for and join a Team.

Tap the m key until the map/minimap is gone then enter the developer console (default ~ key) and type in the following commands:

hud_draw 0

r_drawviewmodel 0

sv_cheats 1

dev_overview 2

After entering these commands you should now view on top of your map. Use your movement keys to move around and center the overview of your map, if you need to zoom in or out use the mouse 1 & mouse 2 buttons. Take a screenshot (default F5 key), to open the developer console again and type:

dev_overview 1

The developer console now shows you the exact position of the screen, this is relevant to create a perfect fit of the overview. It should look like this:

Overview: Zoom 1.51, Map Origin (-608.00, 288.00, 136.00), Z Min 577.00, Z Max -305.00, Rotated 1

These values are important, write them down or take again a screenshot.

Finally, create a text file called <mapname>.txt in <game dir>\overviews\. This file will define the precise numbers needed to align the overview.

Example of the overview script with the example settings:

// Overview description file for MAPNAME
global
{
     ZOOM 1.51
     ORIGIN -608.00 288.00 136.00
     ROTATED 1
}
layer
{
    IMAGE "overviews/MAPNAME.bmp"
    HEIGHT -305.00
}

Of course replace MAPNAME with the name of your actual map.

Conclusion

If you have worked through all the points mentioned above, you have managed to create a basic Map for Day of Defeat.