Creating a Basic Day of Defeat Map: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
No edit summary
 
(13 intermediate revisions by the same user not shown)
Line 1: Line 1:
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.
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 ==
== Creating spawnpoints ==
Each team should spawn be far away from each other. The entities to create spawnpoints are <code>info_player_axis</code> for the Axis Team and <code>info_player_allies</code> for the Allied Team.
Each team should spawn be far away from each other. The entities to create spawnpoints are {{ent|info_player_axis_(GoldSrc)|alt=info_player_axis}} for the Axis Team and {{ent|info_player_allies_(GoldSrc)|alt=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.
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 ===
=== Spawning British Troops ===
By default only American Soldiers are spawning at the <code>info_player_allies</code> entity. If you want to spawn british troops you have to place and edit the <code>[[info_doddetect (GoldSrc)|info_doddetect]]</code> entity.
By default only American Soldiers are spawning at the {{ent|info_player_allies_(GoldSrc)|alt=info_player_allies}} entity. If you want to spawn british troops you have to place and edit the {{ent|info_doddetect_(GoldSrc)|alt=info_doddetect}} entity.
If you change the ''detect_allies_country (Country for Allied team)'' Attribute you can select between "United States " and " British ".
If you change the ''detect_allies_country (Country for Allied team)'' Attribute you can select between "United States " and " British ".


== Placing Locations ==
=== Creating a Observer spawnpoint===
It is possible for Players to reveal their location to Teammates with help of the [[dod_location]] entity. If a player puts {{code|%l}} in their "say" text, the name of the closest location or dod_control_point will be put in its place.
With the {{ent|info_player_observer_(GoldSrc)|alt=info_player_observer}} entity, you can create a point where observers spawn, normally when a player has just connected. Unlike the other <code>info_player_*</code> this entity can careless placed in the middle of the sky to give new players a nice overview over the best parts of your map.


To define such a location name just place a <code>dod_location</code> entity in the map an write the desired description of the location in the ''Name of this location'' Attribute.
== Placing locations ==
It is possible for Players to reveal their location to Teammates with help of the {{ent|dod_location_(GoldSrc)|alt=dod_location}} entity. If a player puts {{code|%l}} in their "say" text, the name of the closest location or {{ent|dod_control_point_(GoldSrc)|alt=dod_control_point}} will be put in its place.
 
To define such a location name just place a {{ent|dod_location_(GoldSrc)|alt=dod_location}} entity in the map an write the desired description of the location in the ''Name of this location'' Attribute.


== Game Modes ==
== 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:
Day of Defeat comes by default with the following Game Modes. How to set up your Map for these can be found here:
*[[Day of Defeat Object Destrucion Map]]
*[[Creating a Object Destruction Map for Day of Defeat|Creating a Object Destruction Map]]
*[[Day of Defeat Territorial Control Map]]
*[[Creating a Territorial Control Map for Day of Defeat|Creating a Territorial Control Map]]
*[[Day of Defeat Paratrooper Gamemode]]


== Creating an Overview Map ==
== 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 [[screenshot]]s and should be created once a new map is finished.
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 [[screenshot]]s and should be created once a new map is finished.
{{todo|Explain the creation of creating a Overview Map.}}
To learn how you can create such a overview see the Article [[Creating an Overview Map for Day of Defeat]].
{{tip|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):
 
<code>-nojoy -console -developer -dev -windowed -w 1024 -h 768</code>
 
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 {{key|m}} key until the map/minimap is gone then enter the [[developer console]] (default {{key|~}} key) and type in the following commands:
 
<code>
hud_draw 0
 
r_drawviewmodel 0
 
sv_cheats 1
 
dev_overview 2
</code>
 
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 {{key|mouse 1}} & {{key|mouse 2}} buttons.
Take a screenshot (default {{key|F5}} key), to open the developer console again and type:
 
<code>
dev_overview 1
</code>
 
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:
 
<code> Overview: Zoom 1.51, Map Origin (-608.00, 288.00, 136.00), Z Min 577.00, Z Max -305.00, Rotated 1</code>
 
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.
 
=== Converting the screenshot to .bmp ===
Steam saves the taken screenshots as '''.jpg''' files by default, to use the overview screenshot we need to convert it to '''.bmp''' to get it working in Day of Defeat.
 
In the Steam Library window, click the Menu ''View'' and choose ''Screenshots''then choose ''Show on disk''. Usually the bottom/last picture that is mostly numbers (like 20230907021558_1.jpg) is the picture you want.
 
Open the screenshot with Microsoft Paint or an Image Editor of your choice and export it as a ''.bmp'' file with maximum 256 colors. Export the image to your <code><game dir>\overviews\</code> folder.
 
=== Testing the overview and trouble shooting ===
Open Day of Defeat and run your Map to test of the overview is working. If not open the developer console to see any error messages.
 
These are the error messages you may encounter:


*'''ERROR: Error parsing overview file overviews/MAPNAME.txt. (, unkown)'''
== Creating an mission briefing ==
Check in your created overview script file the ORIGIN field and search for commas. Compare the Values in your script with the example script in this article and remove the commas.
[[File:Day of Defeat map briefing .png|250px|thumb|right|Example of a mission briefing in Day of Defeat on the open source map [https://github.com/cmbasnett/dod_kaust dod_kaust]. ]]
To know what the objectives for the players are in Day of Defeat is at every map start a mission briefing window.


*'''ERROR: Error parsing overview file overviews/MAPNAME.txt. ( unkown)'''
To develop such a briefing create in your mapfolder a Textfile with the same name of the map and insert your mission briefing.
Possibly missing the ending quote (") on the IMAGE line.


*'''ERROR: Unsupported image file format.'''
A mission briefing usually contains:
Check that the file extension is '''.bmp''' for the IMAGE and make sure its a image file with maximum 256 colors.
*The name of the creator with or without his realname or internet alias.
*A short backgroundstory of the scenario of the map.
*The objectives the allies have to fulfill to win.
*The objectives the axis have to fulfill to win.
<br>
*Optional: Credits or greetings.


If your overview is working you just need to revert the Command Line Options you entered earlier and insert the commands you backed up if there was any.
For inspiration it is useful to take a look at the mission briefings of the default Day of Defeat maps.


== Conclusion ==
== Conclusion ==

Latest revision as of 10:23, 16 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 ".

Creating a Observer spawnpoint

With the info_player_observer entity, you can create a point where observers spawn, normally when a player has just connected. Unlike the other info_player_* this entity can careless placed in the middle of the sky to give new players a nice overview over the best parts of your map.

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. To learn how you can create such a overview see the Article Creating an Overview Map for Day of Defeat.

Creating an mission briefing

Example of a mission briefing in Day of Defeat on the open source map dod_kaust.

To know what the objectives for the players are in Day of Defeat is at every map start a mission briefing window.

To develop such a briefing create in your mapfolder a Textfile with the same name of the map and insert your mission briefing.

A mission briefing usually contains:

  • The name of the creator with or without his realname or internet alias.
  • A short backgroundstory of the scenario of the map.
  • The objectives the allies have to fulfill to win.
  • The objectives the axis have to fulfill to win.


  • Optional: Credits or greetings.

For inspiration it is useful to take a look at the mission briefings of the default Day of Defeat maps.

Conclusion

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

See Releasing a Map how to destribute your Map and share it with others.