Configuring 2D Map – DayZ
(edit for 1.06) |
Lou Montana (talk | contribs) m (Text replacement - "Category:DayZ:Terrain_Editing" to "{{GameCategory|dayz|Terrain Editing}}") |
||
(3 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
{{TOC|side}} | |||
== Overview == | |||
==Overview== | |||
DayZ supports generating a 2D map from the terrain data, which means this map is always up-to-date and does not require any other maintenance. It supports any terrain (including community made) with the limitation of showing only the map of currently loaded terrain (world). | DayZ supports generating a 2D map from the terrain data, which means this map is always up-to-date and does not require any other maintenance. It supports any terrain (including community made) with the limitation of showing only the map of currently loaded terrain (world). | ||
==Base configuration== | == Base configuration == | ||
By default, the GUI map layout with ''MapWidgetClass'' is displayed after executing an action on the map item (''ActionUnfoldMap'') and the configuration is included on the map item (located at ''DZ\gear\navigation\config.cpp''). Since update 1.06, map item has been made world independent with an ability to customise its visual look (as an item in 3D world) based on the currently loaded terrain. To configure this map item for your terrain, provide these paremeters in your world config: | By default, the GUI map layout with ''MapWidgetClass'' is displayed after executing an action on the map item (''ActionUnfoldMap'') and the configuration is included on the map item (located at ''DZ\gear\navigation\config.cpp''). Since update 1.06, map item has been made world independent with an ability to customise its visual look (as an item in 3D world) based on the currently loaded terrain. To configure this map item for your terrain, provide these paremeters in your world config: | ||
Line 35: | Line 33: | ||
The map UI can be also created independently of the map item, but then you will need to override in your mod a ''RscMapControl'' class (located in bin\config.cpp - it is recommended to base off the values that are at ''DZ\gear\navigation\config.cpp''). | The map UI can be also created independently of the map item, but then you will need to override in your mod a ''RscMapControl'' class (located in bin\config.cpp - it is recommended to base off the values that are at ''DZ\gear\navigation\config.cpp''). | ||
==Location labels== | |||
== Location labels == | |||
Location labels is a feature of a 2D map, which is not tied to any specific map object and is defined within a CfgWorlds entry of a terrain (''class Names''). Following game config example shows how one can be configured: | Location labels is a feature of a 2D map, which is not tied to any specific map object and is defined within a CfgWorlds entry of a terrain (''class Names''). Following game config example shows how one can be configured: | ||
Line 42: | Line 41: | ||
class CfgWorlds | class CfgWorlds | ||
{ | { | ||
class CAWorld; | |||
class YourTerrain: CAWorld | |||
{ | |||
/* .. */ | |||
/* locations definition */ | |||
class Names | |||
{ | |||
class location_name | |||
{ | |||
name="LocationName"; | |||
position[]={11339.77,14391.05}; | |||
type="locationtype"; | |||
}; | |||
}; | |||
/* end of locations definition */ | |||
/* .. */ | |||
}; | |||
}; | }; | ||
</syntaxhighlight> | </syntaxhighlight> | ||
Line 70: | Line 69: | ||
! Name !! Icon !! Notes | ! Name !! Icon !! Notes | ||
|- | |- | ||
| Capital || none || | | Capital || none || {{hl|c= Used for biggest settlements.}} | ||
|- | |- | ||
| City || none || | | City || none || {{hl|c= Used for mid-sized settlements.}} | ||
|- | |- | ||
| Village || none || | | Village || none || {{hl|c= Used for small settlements.}} | ||
|- | |- | ||
| Local || none || | | Local || none || {{hl|c= Used for miscellaneous locations.}} | ||
|- | |- | ||
| Marine || none || | | Marine || none || {{hl|c= Used for coastal locations (bays) or in-land water bodies.}} | ||
|- | |- | ||
| Ruin || DZ\gear\navigation\data\map_ruin_ca || | | Ruin || DZ\gear\navigation\data\map_ruin_ca || {{hl|c= Used for castles.}} | ||
|- | |- | ||
| Camp || DZ\gear\navigation\data\map_camp_ca || | | Camp || DZ\gear\navigation\data\map_camp_ca || {{hl|c= Used for summer camps.}} | ||
|- | |- | ||
| Hill || DZ\gear\navigation\data\map_hill_ca || | | Hill || DZ\gear\navigation\data\map_hill_ca || {{hl|c= Used for mountains.}} | ||
|- | |- | ||
| ViewPoint || DZ\gear\navigation\data\map_viewpoint_ca || | | ViewPoint || DZ\gear\navigation\data\map_viewpoint_ca || {{hl|c= Used for places with nice views (without text usually).}} | ||
|- | |- | ||
| RockArea || DZ\gear\navigation\data\map_rock_ca || | | RockArea || DZ\gear\navigation\data\map_rock_ca || {{hl|c= Used for larger parts with lot of rocks around.}} | ||
|- | |- | ||
| RailroadStation || DZ\gear\navigation\data\map_station_ca || | | RailroadStation || DZ\gear\navigation\data\map_station_ca || {{hl|c= Used for rail stations.}} | ||
|- | |- | ||
| IndustrialSite || DZ\gear\navigation\data\map_factory_ca || | | IndustrialSite || DZ\gear\navigation\data\map_factory_ca || {{hl|c= Used for large industrial areas.}} | ||
|- | |- | ||
| LocalOffice || DZ\gear\navigation\data\map_govoffice_ca || | | LocalOffice || DZ\gear\navigation\data\map_govoffice_ca || {{hl|c= Used for local offices (with Public Address System panels).}} | ||
|- | |- | ||
| BorderCrossing || DZ\gear\navigation\data\map_border_cross_ca || | | BorderCrossing || DZ\gear\navigation\data\map_border_cross_ca || {{hl|c= Used for border crossings.}} | ||
|- | |- | ||
| VegetationBroadleaf || DZ\gear\navigation\data\map_broadleaf_ca || | | VegetationBroadleaf || DZ\gear\navigation\data\map_broadleaf_ca || {{hl|c= Used for larger forest areas.}} | ||
|- | |- | ||
| VegetationFir || DZ\gear\navigation\data\map_fir_ca || | | VegetationFir || DZ\gear\navigation\data\map_fir_ca || {{hl|c= Used for larger forest areas.}} | ||
|- | |- | ||
| VegetationPalm || DZ\gear\navigation\data\map_palm_ca || | | VegetationPalm || DZ\gear\navigation\data\map_palm_ca || {{hl|c= Used for larger forest areas.}} | ||
|- | |- | ||
| VegetationVineyard || DZ\gear\navigation\data\map_vineyard_ca | | VegetationVineyard || DZ\gear\navigation\data\map_vineyard_ca || {{hl|c= Used for vineyards.}} | ||
|} | |} | ||
Changes in this config do not require map to be re-binarized. | Changes in this config do not require map to be re-binarized. | ||
==Values for map property== | == Values for map property == | ||
Each map object (p3d) can contain a named property called '''map''' in geometry LOD. This defines how such object should look like on the 2D map. There can be 4 cases basically: | Each map object (p3d) can contain a named property called '''map''' in geometry LOD. This defines how such object should look like on the 2D map. There can be 4 cases basically: | ||
Line 122: | Line 121: | ||
! Name !! Icon !! Hides BBox !! Notes | ! Name !! Icon !! Hides BBox !! Notes | ||
|- | |- | ||
| track || none || no || | | track || none || no || {{hl|c= Width of the road included, color defined by the game config (class MapDefaults).}} | ||
|- | |- | ||
| road || none || no || | | road || none || no || {{hl|c= Width of the road included, color defined by the game config (class MapDefaults).}} | ||
|- | |- | ||
| main road || none || no || | | main road || none || no || {{hl|c= Width of the road included, color defined by the game config (class MapDefaults).}} | ||
|- | |- | ||
| power lines || none || yes || | | power lines || none || yes || {{hl|c= Color defined by the game config (class MapDefaults).}} | ||
|- | |- | ||
| railway || none || yes || | | railway || none || yes || {{hl|c= Color defined by the game config (class MapDefaults).}} | ||
|- | |- | ||
| house || none || no || | | house || none || no || {{hl|c= Color derived from the geometry LOD.}} | ||
|- | |- | ||
| fence || none || no || | | fence || none || no || {{hl|c= Color derived from the geometry LOD.}} | ||
|- | |- | ||
| wall || none || no || | | wall || none || no || {{hl|c= Color derived from the geometry LOD.}} | ||
|- | |- | ||
| hide || none || yes || | | hide || none || yes || {{hl|c= Use to hide object (default value).}} | ||
|- | |- | ||
| bush || dz\gear\navigation\data\map_bush_ca || yes || | | bush || dz\gear\navigation\data\map_bush_ca || yes || {{hl|c= }} | ||
|- | |- | ||
| small tree || dz\gear\navigation\data\map_smalltree_ca || yes || | | small tree || dz\gear\navigation\data\map_smalltree_ca || yes || {{hl|c= Used for small trees (orchards). They do not form forests triangles.}} | ||
|- | |- | ||
| tree || dz\gear\navigation\data\map_tree_ca || yes || | | tree || dz\gear\navigation\data\map_tree_ca || yes || {{hl|c= Used for solitary trees. Forest triangles are created (based on ''CfgWorlds'' parameter ''minTreesInForestSquare'').}} | ||
|- | |- | ||
| rock || dz\gear\navigation\data\map_rock_ca || yes || | | rock || dz\gear\navigation\data\map_rock_ca || yes || {{hl|c= Used on large rock cliffs. Rock triangles are created (based on ''CfgWorlds'' parameter ''minRocksInRockSquare'').}} | ||
|- | |- | ||
| fuelstation || dz\gear\navigation\data\map_fuelstation_ca || yes || | | fuelstation || dz\gear\navigation\data\map_fuelstation_ca || yes || {{hl|c= }} | ||
|- | |- | ||
| lighthouse || dz\gear\navigation\data\map_lighthouse_ca || yes || | | lighthouse || dz\gear\navigation\data\map_lighthouse_ca || yes || {{hl|c= }} | ||
|- | |- | ||
| stack || dz\gear\navigation\data\map_stack_ca || yes || | | stack || dz\gear\navigation\data\map_stack_ca || yes || {{hl|c= }} | ||
|- | |- | ||
| transmitter || dz\gear\navigation\data\map_transmitter_ca || yes || | | transmitter || dz\gear\navigation\data\map_transmitter_ca || yes || {{hl|c= }} | ||
|- | |- | ||
| watertower || dz\gear\navigation\data\map_watertower_ca || yes || | | watertower || dz\gear\navigation\data\map_watertower_ca || yes || {{hl|c= }} | ||
|- | |- | ||
| shipwreck || dz\gear\navigation\data\map_shipwreck_ca || yes || | | shipwreck || dz\gear\navigation\data\map_shipwreck_ca || yes || {{hl|c= }} | ||
|- | |- | ||
| monument || dz\gear\navigation\data\map_monument_ca || yes || | | monument || dz\gear\navigation\data\map_monument_ca || yes || {{hl|c= }} | ||
|- | |- | ||
| busstop || dz\gear\navigation\data\map_busstop_ca || yes || | | busstop || dz\gear\navigation\data\map_busstop_ca || yes || {{hl|c= }} | ||
|- | |- | ||
| fountain || dz\gear\navigation\data\map_fountain_ca || yes || | | fountain || dz\gear\navigation\data\map_fountain_ca || yes || {{hl|c= }} | ||
|- | |- | ||
| waterpump || dz\gear\navigation\data\map_waterpump_ca || yes || | | waterpump || dz\gear\navigation\data\map_waterpump_ca || yes || {{hl|c= }} | ||
|- | |- | ||
| hospital || dz\gear\navigation\data\map_hospital_ca || no || | | hospital || dz\gear\navigation\data\map_hospital_ca || no || {{hl|c= }} | ||
|- | |- | ||
| store || dz\gear\navigation\data\map_store_ca || no || | | store || dz\gear\navigation\data\map_store_ca || no || {{hl|c= }} | ||
|- | |- | ||
| police || dz\gear\navigation\data\map_police_ca || no || | | police || dz\gear\navigation\data\map_police_ca || no || {{hl|c= Police department.}} | ||
|- | |- | ||
| firedep || dz\gear\navigation\data\map_firedep_ca || no || | | firedep || dz\gear\navigation\data\map_firedep_ca || no || {{hl|c= Fire department.}} | ||
|- | |- | ||
| tsign || dz\gear\navigation\data\map_tsign_ca || yes || | | tsign || dz\gear\navigation\data\map_tsign_ca || yes || {{hl|c= Tourist directional sign.}} | ||
|- | |- | ||
| tshelter || dz\gear\navigation\data\map_tshelter_ca || yes || | | tshelter || dz\gear\navigation\data\map_tshelter_ca || yes || {{hl|c= Tourist shelter.}} | ||
|- | |- | ||
| tourism || dz\gear\navigation\data\map_tourism_ca || yes || | | tourism || dz\gear\navigation\data\map_tourism_ca || yes || {{hl|c= Usually used on pub-like objects.}} | ||
|- | |- | ||
| cross || dz\gear\navigation\data\map_cross_ca || yes || | | cross || dz\gear\navigation\data\map_cross_ca || yes || {{hl|c= Solitary crosses.}} | ||
|- | |- | ||
| chapel || dz\gear\navigation\data\map_chapel_ca || no || | | chapel || dz\gear\navigation\data\map_chapel_ca || no || {{hl|c= Small churches - chapels.}} | ||
|- | |- | ||
| church || dz\gear\navigation\data\map_church_ca || no || | | church || dz\gear\navigation\data\map_church_ca || no || {{hl|c= Big churches.}} | ||
|- | |- | ||
| view-tower || dz\gear\navigation\data\map_viewtower_ca || yes || | | view-tower || dz\gear\navigation\data\map_viewtower_ca || yes || {{hl|c= Used on small view-towers.}} | ||
|- | |- | ||
| quay || dz\gear\navigation\data\map_quay_ca || yes || | | quay || dz\gear\navigation\data\map_quay_ca || yes || {{hl|c= Not used at the moment. Can be used for selected pier objects.}} | ||
|- | |- | ||
| bunker || dz\gear\navigation\data\map_bunker_ca || yes || | | bunker || dz\gear\navigation\data\map_bunker_ca || yes || {{hl|c= Not used at the moment.}} | ||
|- | |- | ||
| fortress || dz\gear\navigation\data\map_fortress_ca || yes || | | fortress || dz\gear\navigation\data\map_fortress_ca || yes || {{hl|c= Not used at the moment.}} | ||
|- | |- | ||
| rocks || dz\gear\navigation\data\map_rock_ca || yes || | | rocks || dz\gear\navigation\data\map_rock_ca || yes || {{hl|c= Not used at the moment.}} | ||
|- | |- | ||
| ruin || dz\gear\navigation\data\map_ruin_ca || no || | | ruin || dz\gear\navigation\data\map_ruin_ca || no || {{hl|c= Not used at the moment, it is recommended to use location type Ruin instead.}} | ||
|} | |} | ||
Changes of the map property in the models require map to be re-binarized. | Changes of the map property in the models require map to be re-binarized. | ||
{{GameCategory|dayz|Terrain Editing}} |
Latest revision as of 00:18, 25 April 2023
Overview
DayZ supports generating a 2D map from the terrain data, which means this map is always up-to-date and does not require any other maintenance. It supports any terrain (including community made) with the limitation of showing only the map of currently loaded terrain (world).
Base configuration
By default, the GUI map layout with MapWidgetClass is displayed after executing an action on the map item (ActionUnfoldMap) and the configuration is included on the map item (located at DZ\gear\navigation\config.cpp). Since update 1.06, map item has been made world independent with an ability to customise its visual look (as an item in 3D world) based on the currently loaded terrain. To configure this map item for your terrain, provide these paremeters in your world config:
class CfgWorlds
{
class CAWorld;
class YourTerrain: CAWorld
{
// map item name (default value is #STR_CfgVehicles_ChernarusMap0)
mapDisplayNameKey = "";
// map item description (default value is #STR_CfgVehicles_ChernarusMap1)
mapDescriptionKey = "";
// closed map item texture (default value is dz\gear\navigation\data\map_chernarus_co.paa)
mapTextureClosed = "";
// opened map item texture (check dz\structures\signs\tourist\data\karta_co.paa to see how it should look like)
mapTextureOpened = "";
// opened map item legend part (check dz\structures\signs\tourist\data\karta_side_co.paa to see how it should look like)
mapTextureLegend = "";
// 2D map overlay map for this world (see dz\gear\navigation\data\usermap for an example - it is basically same like proper satellite texture for the terrain just with different sort of info)
userMapPath = "";
};
};
After configuring this, you can freely use item called ChernarusMap (do not be confused by its name) on your terrain while using custom textures and text that fits your terrain.
The map UI can be also created independently of the map item, but then you will need to override in your mod a RscMapControl class (located in bin\config.cpp - it is recommended to base off the values that are at DZ\gear\navigation\config.cpp).
Location labels
Location labels is a feature of a 2D map, which is not tied to any specific map object and is defined within a CfgWorlds entry of a terrain (class Names). Following game config example shows how one can be configured:
class CfgWorlds
{
class CAWorld;
class YourTerrain: CAWorld
{
/* .. */
/* locations definition */
class Names
{
class location_name
{
name="LocationName";
position[]={11339.77,14391.05};
type="locationtype";
};
};
/* end of locations definition */
/* .. */
};
};
name parameter can be also a string from the stringtable database (can be localized). position is a 2D position, specified in meters. Please keep in mind that positioning multiple labels close to each other can lead in some not being visible at all. Available values for the type parameter are in the following table:
Name | Icon | Notes |
---|---|---|
Capital | none | Used for biggest settlements. |
City | none | Used for mid-sized settlements. |
Village | none | Used for small settlements. |
Local | none | Used for miscellaneous locations. |
Marine | none | Used for coastal locations (bays) or in-land water bodies. |
Ruin | DZ\gear\navigation\data\map_ruin_ca | Used for castles. |
Camp | DZ\gear\navigation\data\map_camp_ca | Used for summer camps. |
Hill | DZ\gear\navigation\data\map_hill_ca | Used for mountains. |
ViewPoint | DZ\gear\navigation\data\map_viewpoint_ca | Used for places with nice views (without text usually). |
RockArea | DZ\gear\navigation\data\map_rock_ca | Used for larger parts with lot of rocks around. |
RailroadStation | DZ\gear\navigation\data\map_station_ca | Used for rail stations. |
IndustrialSite | DZ\gear\navigation\data\map_factory_ca | Used for large industrial areas. |
LocalOffice | DZ\gear\navigation\data\map_govoffice_ca | Used for local offices (with Public Address System panels). |
BorderCrossing | DZ\gear\navigation\data\map_border_cross_ca | Used for border crossings. |
VegetationBroadleaf | DZ\gear\navigation\data\map_broadleaf_ca | Used for larger forest areas. |
VegetationFir | DZ\gear\navigation\data\map_fir_ca | Used for larger forest areas. |
VegetationPalm | DZ\gear\navigation\data\map_palm_ca | Used for larger forest areas. |
VegetationVineyard | DZ\gear\navigation\data\map_vineyard_ca | Used for vineyards. |
Changes in this config do not require map to be re-binarized.
Values for map property
Each map object (p3d) can contain a named property called map in geometry LOD. This defines how such object should look like on the 2D map. There can be 4 cases basically:
- hidden from the map
- icon only
- icon and bounding box
- special case (roads, railway)
If you do not specify this property, it is automatically assumed that object will not be visible = default value for this property is map=hide.
Name | Icon | Hides BBox | Notes |
---|---|---|---|
track | none | no | Width of the road included, color defined by the game config (class MapDefaults). |
road | none | no | Width of the road included, color defined by the game config (class MapDefaults). |
main road | none | no | Width of the road included, color defined by the game config (class MapDefaults). |
power lines | none | yes | Color defined by the game config (class MapDefaults). |
railway | none | yes | Color defined by the game config (class MapDefaults). |
house | none | no | Color derived from the geometry LOD. |
fence | none | no | Color derived from the geometry LOD. |
wall | none | no | Color derived from the geometry LOD. |
hide | none | yes | Use to hide object (default value). |
bush | dz\gear\navigation\data\map_bush_ca | yes | -No content provided- |
small tree | dz\gear\navigation\data\map_smalltree_ca | yes | Used for small trees (orchards). They do not form forests triangles. |
tree | dz\gear\navigation\data\map_tree_ca | yes | Used for solitary trees. Forest triangles are created (based on CfgWorlds parameter minTreesInForestSquare). |
rock | dz\gear\navigation\data\map_rock_ca | yes | Used on large rock cliffs. Rock triangles are created (based on CfgWorlds parameter minRocksInRockSquare). |
fuelstation | dz\gear\navigation\data\map_fuelstation_ca | yes | -No content provided- |
lighthouse | dz\gear\navigation\data\map_lighthouse_ca | yes | -No content provided- |
stack | dz\gear\navigation\data\map_stack_ca | yes | -No content provided- |
transmitter | dz\gear\navigation\data\map_transmitter_ca | yes | -No content provided- |
watertower | dz\gear\navigation\data\map_watertower_ca | yes | -No content provided- |
shipwreck | dz\gear\navigation\data\map_shipwreck_ca | yes | -No content provided- |
monument | dz\gear\navigation\data\map_monument_ca | yes | -No content provided- |
busstop | dz\gear\navigation\data\map_busstop_ca | yes | -No content provided- |
fountain | dz\gear\navigation\data\map_fountain_ca | yes | -No content provided- |
waterpump | dz\gear\navigation\data\map_waterpump_ca | yes | -No content provided- |
hospital | dz\gear\navigation\data\map_hospital_ca | no | -No content provided- |
store | dz\gear\navigation\data\map_store_ca | no | -No content provided- |
police | dz\gear\navigation\data\map_police_ca | no | Police department. |
firedep | dz\gear\navigation\data\map_firedep_ca | no | Fire department. |
tsign | dz\gear\navigation\data\map_tsign_ca | yes | Tourist directional sign. |
tshelter | dz\gear\navigation\data\map_tshelter_ca | yes | Tourist shelter. |
tourism | dz\gear\navigation\data\map_tourism_ca | yes | Usually used on pub-like objects. |
cross | dz\gear\navigation\data\map_cross_ca | yes | Solitary crosses. |
chapel | dz\gear\navigation\data\map_chapel_ca | no | Small churches - chapels. |
church | dz\gear\navigation\data\map_church_ca | no | Big churches. |
view-tower | dz\gear\navigation\data\map_viewtower_ca | yes | Used on small view-towers. |
quay | dz\gear\navigation\data\map_quay_ca | yes | Not used at the moment. Can be used for selected pier objects. |
bunker | dz\gear\navigation\data\map_bunker_ca | yes | Not used at the moment. |
fortress | dz\gear\navigation\data\map_fortress_ca | yes | Not used at the moment. |
rocks | dz\gear\navigation\data\map_rock_ca | yes | Not used at the moment. |
ruin | dz\gear\navigation\data\map_ruin_ca | no | Not used at the moment, it is recommended to use location type Ruin instead. |
Changes of the map property in the models require map to be re-binarized.