====== ArmA 3 Terrain Config ====== [[https://www.pmctactical.org/forum/viewforum.php?f=68|ArmA 3 Forum]], [[:arma3|ArmA 3]], [[arma3:config|ArmA 3 Config]], [[arma3:missions|ArmA 3 Missions]], [[arma3:modeling|ArmA 3 3D Modeling]], [[arma3:scripting|ArmA 3 Scripting]], [[arma3:terrain|ArmA 3 Terrain]], [[arma3:texturing|ArmA 3 Texturing]], [[arma3:tools|ArmA 3 Tools]] **Everything you need to know about ArmA 3 Terrain WRP Config.cpp file** ====== Fully Working Example ====== **Fully working config.cpp example** ready to be copy-pasted and used in your terrain, only thing you need to do is replace "tut_tutorial_terrain" class and directory path names obviously. Important note: if you use pboProject later than v1.73 you must start the GUI, go to Setup and untick "-W warnings are errors" tick box. If you do not, this example config.cpp gives error and pboproject fails to pack a pbo. The error you would get is "warning:cfgSurfaces not defined" and "\\config.cpp: there are clutter errors in the config". class CfgPatches { class tut_tutorial_terrain { units[] = {}; weapons[] = {}; requiredVersion = 1; requiredAddons[] = { "A3_Map_Stratis" }; }; }; class CfgWorldList { class tut_tutorial_terrain{}; }; class CfgWorlds { class Stratis; class tut_tutorial_terrain: Stratis { cutscenes[] = {}; description = "TUT Tutorial Terrain"; worldName = "\tut\tut_tutorial_terrain\tut_tutorial_terrain.wrp"; author = "PMC"; pictureMap = "tut\tut_tutorial_terrain\data\picturemap_ca.paa"; pictureShot = "tut\tut_tutorial_terrain\data\ui_terrain_ca.paa"; newRoadsShape = "\tut\tut_tutorial_terrain\data\roads\roads.shp"; centerPosition[] = { 2560, 2560 }; ilsDirection[] = { 0, 0.08, 1 }; ilsPosition[] = { 0, 0 }; ilsTaxiIn[] = {}; ilsTaxiOff[] = {}; drawTaxiway = false; class SecondaryAirports{}; class ReplaceObjects{}; class Sounds { sounds[] = {}; }; class Animation { vehicles[] = {}; }; minTreesInForestSquare = 2; minRocksInRockSquare = 2; class Subdivision{}; class Names{}; }; }; ====== Tips ====== Veteran tip: don't take config.cpp from altis, stratis, tanoa or user made terrains, dont take it from outdated random tutorials. Take it only from PMC Editing Wiki! //We'll take it from here...// huh? :-) ====== Detailed Explanation ====== Lets go through the terrain config line by line (well lines that matter). ===== CfgPatches ===== This class is required in every addon. Basically this identifies the addon to arma3 engine. class CfgPatches In CfgPatches we have usually one class and here its the name of our terrain. class tut_tutorial_terrain Units is list of unit classes that this addon brings to the game, **it is not used for terrains**. units[] = { "name_of_my_character" }; Basically not used in terrains, requiredVersion could be used but nobody in the community has used in years. weapons[] = {}; requiredVersion = 1; Very important as it tells engine what addons has to be loaded before your terrain. For example all addons from where you inherit from, also terrain object addons where WRP is loading P3D's or textures need to be listed here. Here we inherit from bis stratis. If you have multiple addons to be required then separate the classes with , like "someAddon1", "someAddon2" etc requiredAddons[] = { "A3_Map_Stratis" }; List of terrains this addon adds to the game, usually just one, class name of your terrain. But if you have like summer or winter variations of the terrain, then add all the classes here. class CfgWorldList { class tut_tutorial_terrain{}; }; ===== CfgWorlds ===== Meat and bones of arma terrain configs :) class CfgWorlds ===== Inheriting Stratis ===== Extern class, this is the class name of stratis terrain. Any other classes where you inherit from needs to be added like this before you do the inheriting. class Stratis; ===== Terrain Class Name ===== Class name of your terrain and that it inherits from stratis terrain. "class myAddon: someOtherAddon" class tut_tutorial_terrain: Stratis ===== Cutscenes[] ===== List of cutscenes if you add these to your terrain. These are shown when you have the terrain loaded and you exit from mission editor or mission, multiplayer menu etc. cutscenes[] = { "myCutscene1", "myCutscene2" }; ===== Description ===== Name of your terrain to be shown in mission editor etc. Mission editor terrain name length is 52 characters until it gets cut-off. description = "TUT Tutorial Terrain"; ===== worldName ===== Path and file name to your terrain WRP file. worldName = "\tut\tut_tutorial_terrain\tut_tutorial_terrain.wrp"; ===== User Interface ===== See [[arma3:terrain:user-interface|ArmA 3 Terrain User Interface]]. author = "PMC http://www.pmctactical.org"; pictureMap = "tut\tut_tutorial_terrain\data\picturemap_ca.paa"; pictureShot = "tut\tut_tutorial_terrain\data\ui_terrain_ca.paa"; ===== Roads Shapefile ===== Shapefile for your roads, can be left "" empty if you dont have any roads or want to temporarily disable them. newRoadsShape = "\tut\tut_tutorial_terrain\data\roads\roads.shp"; ===== centerPosition[] ===== Center position of your terrain. Now dating back to good old OFP times some people (including PMC geeks, sorry) thought this location is //a interesting location on your terrain where you want mission editor to load when started//, but **this is not true**. Center position is **center position of your terrain**. Basically this is terrain size divided by two. Many missions use this to grab size of terrain (but also can be taken now from MapSize value). Trust me, put this on center coordinates of your terrain. centerPosition[] = { 2560, 2560 }; ===== ILS, Autopilot ===== Instrument Landing System (ILS) is basically landing autopilot. This is quite complicated config and there has been various tutorials how to configure airfield runways and taxiways so AI (or player using "Landing Autopilot") can use them. Not a guide how to setup ILS config but some words about [[arma:config:multiple_runways|secondary airports]]. ilsDirection[] = { 0, 0.08, 1 }; ilsPosition[] = { 0, 0 }; ilsTaxiIn[] = {}; ilsTaxiOff[] = {}; More ILS related stuff, the secondary airports are configured here. Draw taxiway just sets if taxiways are drawn at in-game map view. drawTaxiway = false; class SecondaryAirports{}; ===== ReplaceObjects ===== This was used back in OFP era to replace objects, like replace rock1 with rock2 or tree1 with tree2 etc, works on any object. I cant remember seeing any arma, arma2 or arma3 terrains that actually used this anymore. class ReplaceObjects{}; ===== Sounds ===== You got me, I dont know what this does, its always been empty in our terrains :) class Sounds { sounds[] = {}; }; ===== Animation ===== You got me, I dont know what this does, its always been empty in our terrains :) class Animation { vehicles[] = {}; }; ===== Subdivision ===== Not sure, this has something to do with the terrain elevation modification, like making your terrain more rough even though the heightmap is not, basically adding "artificial noise" between heightmap points. Don't really know as we have never used this successfully. class Subdivision{}; ===== (location) Names ===== Location names, keypoints, [[arma2:terrain:custom-keypoints-cfglocationtypes|CfgLocationTypes]] etc. The text you see at in-game map view, like city names etc. Class names can be written manually in text editor, or by terrain builder with its keypoints feature. class Names { class MyCity { name = "My City"; position[] = {3620.39,13092.82}; type = "NameCity"; demography = "CIV"; radiusA = 200.0; radiusB = 200.0; angle = 0.0; }; See also [[arma3:terrain:config-class-names-freeze|ArmA 3: Terrain config.cpp Class Names Freeze]]. ===== Clutter ===== Inherit from bis default clutter class, its used for creating new clutter classes. class DefaultClutter; Main clutter class. This example is from altis. class clutter { class StrBigFallenBranches_pine: DefaultClutter { model = "A3\Plants_F\Clutter\c_bigFallenBranches_pine.p3d"; affectedByWind = 0.0; swLighting = 0; scaleMin = 0.3; scaleMax = 0.7; }; ===== Unknown ===== No idea what these do. access = 3; worldId = 5; ===== mapSize ===== Terrain size in meters mapSize = 40960; ===== mapZone ===== mapZone is obsolete, not used in ArmA 3. ===== mapArea[] ===== mapArea[] is obsolete, not used in ArmA 3. ===== Lat / Lon ===== Terrain lat/lon coordinates, well DOH! longitude = 16.661; latitude = -35.152; ===== elevationOffset ===== This artificially increases the elevations in your terrain even though your heightmap is not really that high. We believe this to be meters, so elevationOffset = 100; would increase your terrain by hundred meters. elevationOffset = 0; ===== OutsideTerrain ===== Terrain beyond terrain... err WHAT? Heh yeah this is the synthetic terrain beyond your real terrain area, its randomly generated according to your "at the edge" terrain elevation and texture. You'll see when you walk up to the edge of your terrain. class OutsideTerrain { satellite = "A3\map_Altis\data\s_satout_co.paa"; enableTerrainSynth = 0; class Layers { class Layer0 { nopx = "A3\Map_Data\gdt_grass_green_nopx.paa"; texture = "A3\Map_Data\gdt_grass_green_co.paa"; }; }; colorOutside[] = {0.227451,0.27451,0.384314,1}; }; ===== Grid (map view) ===== In-game map view grid zoom levels and coordinates. This is fully working grid coodinates and zoom level config for a 40km terrain. Important to change on different sized terrains is the **offsetY** value which is as commented: Grid Size * Cell Size, aka terrain size in meters. class Grid { offsetX = 0; offsetY = 40960; // Grid * Cell class Zoom1 { zoomMax = 0.015; format = "XY"; formatX = "0000"; formatY = "0000"; stepX = 10; stepY = -10; }; class Zoom2 { zoomMax = 0.2; format = "XY"; formatX = "000"; formatY = "000"; stepX = 100; stepY = -100; }; class Zoom3 { zoomMax = 0.8; format = "XY"; formatX = "00"; formatY = "00"; stepX = 1000; stepY = -1000; }; class Zoom4 { zoomMax = 1; format = "XY"; formatX = "0"; formatY = "0"; stepX = 10000; stepY = -10000; }; }; ===== startDate ===== Mission editor default starting date and time. Not sure where else it is used as default. Note that the dates only support certain amount of years back, for example in VTE when we put startdate = "14/11/1965"; it has no effect as the engine doesnt support years so far back. Most effect this will have for terrains on remote locations on earth where if you set starting month and time to the "winter" time it might be dark even on 0900hrs in the morning. Usually its nice to have mission editor start in clear and sunny conditions. startTime = "12:00"; startDate = "21/6/2001"; ===== clutterGrid ===== Ground clutter setup, how far is your clutter drawn and the detail levels. clutterGrid = 1.2; clutterDist = 90; noDetailDist = 65; fullDetailDist = 10; ===== midDetailTexture ===== Not sure how to explain this but its the texture that is shown between satellite texture and ground detail textures, kind of like a transition texture. midDetailTexture = "A3\Map_Data\middle_mco.paa"; ===== Forest / Rock Squares ===== In-game map view shows forests as green blob area, this sets how many trees need to be in square (what is size of the square? dont ask me haha) before forest blob is drawn there. minTreesInForestSquare = 3; Same as above but for rocks which are drawn in the brow/gray-ish blob. minRocksInRockSquare = 3;