^Index
-2: Further properties of the .xml file and advanced terrain aesthetics-
In this chapter, we will go through the content of an xml file and how it alters its defined map.
2.1 Deleting all objects in a map the easy, or the sledgehammer way
Often when starting from an already created map, you want to delete all already existing objects. There are two ways to do this, inside the editor, done by pressing ctrl+a to select all objects, and then delete. Other times, if your maps has been broken and cannot be loaded properly into the engine, you may want to delete everything, or just sinle objects directly via the .xml file, this is how you do it:
All objects loaded into the map are defined like this:
Code: Select all
<ActorObjects>
*Stuff defining the characters loaded into the map*
*Stuff defining the weapons loaded into the map*
*Stuff defining the waypoints placed in the map*
</ActorObjects>
<EnvObjects>
*Stuff defining the objects loaded into the map*
</EnvObjects>
<Decals>
*Stuff defining the decals loaded into the map*
</Decals>
<Hotspots>
*Stuff defining the hotspots in the map*
</Hotspots> (or just <Hotspots />, if it's empty.)
In order to completely clear a map, simply remove everything inside the tags, until the code above becomes:
Code: Select all
<ActorObjects>
</ActorObjects>
<EnvObjects>
</EnvObjects>
<Decals>
</Decals>
<Hotspots>
</Hotspots>
Save your .xml, and load up your map, it should now be empty (apart from the terrain). When there's no player spawn point defined in the map, you'll just spawn randomly. To fix this, place a new character in the ingame editor, press ctrl+p to make it player controlled. Save your map with ctrl+s, and restart Overgrowth and reload the map. You should now spawn at the designated spawn point.
You now have a completely empty map to work with!
2.2 Detail maps
Detail maps are the textures that are shown on the terrain ingame. These are first defined in the maps .xml and then placed according to the map's weightmap. There is a maximum number of four detail maps per level. These are defined in the .xml in the following way:
Code: Select all
<DetailMaps>
<DetailMap colorpath="Data/Textures/Terrain/DetailTextures/snow.tga" normalpath="Data/Textures/Terrain/DetailTextures/snow_normal.tga" materialpath="Data/Materials/snow.xml" />
<DetailMap colorpath="Data/Textures/Terrain/DetailTextures/glacial.tga" normalpath="Data/Textures/Terrain/DetailTextures/glacial_normal.tga" materialpath="Data/Materials/ice.xml" />
<DetailMap colorpath="Data/Textures/Terrain/DetailTextures/pebbles.tga" normalpath="Data/Textures/Terrain/DetailTextures/pebbles_normal.tga" materialpath="Data/Materials/gravel.xml" />
<DetailMap colorpath="Data/Textures/Terrain/DetailTextures/dark_round_rocks.tga" normalpath="Data/Textures/Terrain/DetailTextures/dark_round_rocks_normal.tga" materialpath="Data/Materials/rocks.xml" />
</DetailMaps>
(example from 2_impressive_mountains.xml)
The detail map tag describes the paths to the texture that should be applied, its normal map, and its material path which gives the detail map properties like particles and footstep sound. The easiest way to alter the detail maps in your map is to copy-paste all <DetailMap>-tags from an already existing map, and overwrite the ones already in your map.
(Detail map-specific maps from impressive mountains.)
The detail maps are applied to the terrain based on the weightmap specified in the xml (see chapter 1.3). The weightmap distinguishes one of the four detail maps in the following fashion:
Red - Detail map #1
Blue - Detail map #2
Green - Detail map #3
Black - Detail map #4
These can be blended to create semi-transparent, overlapping detail maps. The color of the detail map is blended with the color map (also from chapter 1.3) to create the color shown ingame.
More info on the color map's effect on detail maps:
http://blog.wolfire.com/2009/12/Detail- ... r-matching
2.3 Detail objects
Detail objects are used to quickly apply static objects such as grass and smaller vegetation to your map. These objects are defined in the <DetailObjects>-tag:
Code: Select all
<DetailObjects>
*Detail object stuff, for example:*
<DetailObject obj_path="Data/Objects/Plants/Groundcover/Grass/WildGrass.xml" weight_path="Data/Textures/Terrain/sea_cliffs/sea_cliffs_grass_w.tga" density="10.000000" />
*End of example*
</DetailObjects>
The <DetailObject>-tag gives the path to the object used, and these objects are applied according to the image located in the weight_path. The density parameter describes the density at which the objects will be placed, higher density equals higher number of objects placed.
Ingame example. The yellow lines show where the result screenshot was taken from.
2.3 The sky
The sky is defined in the <Sky>-tag. A typcial sky looks like this:
Code: Select all
<Sky>
<DomeTexture>Data/Textures/skies/blue4.tga</DomeTexture>
<SunAngularRad>0.147508</SunAngularRad>
<SunColorAngle>348.177</SunColorAngle>
<RayToSun r0="0.823090" r1="0.310594" r2="-0.475451" />
<ExtraAO>0</ExtraAO>
</Sky>
The only thing you're not able to change in the ingame editor is the <DomeTexture> and <ExtraAO>. The <DomeTexture>-tag points to the image used as the skybox, the appearance of the sky. The <ExtraAO> is almost always set to 0, but cranking this up will increase the darkness in unlit parts of your map. Setting this to ~50 produces a decent ammount of darkness.
Chapter 2. summary
This concludes the more advanced stuff you're able to do by editing your maps .xml-file. The rest is done in the in game editor, which will be covered in the next chapters.