Dawn of Man

Dawn of Man

Not enough ratings
Creating Environments for Dawn of Man
By martiño
How to create environments to use in scenarios for Dawn of Man
   
Award
Favorite
Favorited
Unfavorite
Intro


This is a guide on how to create environments for Dawn of Man.

Environments are used in scenarios, if you don't know what scenarios are please read the scenario creation guide first.

Environments define the terrain, trees, resources and seasons in a game.

Creating an environment for your scenarios is optional, as you can use one of the builtin ones:

eurasia - Standard environment, used in the Continental Dawn freeplay scenario.
eurasia_north - Longer winters, few resources, only perennial trees, used in the The Northlands freeplay scenario.
eurasia_conflict - Like eurasia but with less resources, used in the Ancient Warriors freeplay scenario.
eurasia_warm - More resources, shorter winters. Used in Creative Mode.

There are other scenarios tailored to some of the challenges too, like: eurasia_flatlands and eurasia_glacial.

You can download the buitin scenarios from here[madrugaworks.com]

If you have any questions, issues or feedback, please post in our modding board.
Basics
Environments must have xml extension, and must be located the Environments subfolder relative to the scenario definition file.

So if your scenario is called my_scenario.scn.xml and your environment is in Environments/my_environment.xml, you can then reference it from the scenario like this:

<location id="main" seed="5492625" environment="my_environment" map_location="0.35,0.35"/>
Main Options
We will be using most of the options in eurasia_flatlands to illustrate this section.

Most options in the environment file are optional, if not present the defaults will be used.

TERRAIN

<noise_amplitudes values="0.0 0.03 0.2 0.154 0.097 0.045 0.025 0.005"/>

Terrain in Dawn of Man, like in most games, is generated by combining noise of different frequencies: Large mountains are low-frequency high amplitude, small bumps are high-frequency low amplitude.

This line allows you to modify the amplitudes of the different noise layers, the initial numbers define the amplitudes of the low-frequencies (the height of large mountains), and the later numbers define the amplitudes of the high_frequencies (the height of the small bumps).


TERRAIN FEATURES

<trees values="Oak Birch Beech Rye Einkorn Emmer Flax BitterVetch Chickpeas Lentils Peas Blackberry Blueberry Raspberry Strawberry Chestnut Pear Cherry Service"/>
What trees are present in the level.
See here[madrugaworks.com] for a list of trees.

<global_tree_density value="1"/>
The global tree density in the environment, allowed values go from 0 to 1.

<deposits values="Flint"/>
What types of deposit are present in the level.
See here[madrugaworks.com] for a list of deposits.

<distance_height_offset value="0.02"/>
How much bigger are mountains at the edge of map.

<resource_factor value="0.75"/>
The amount of resources in the map. 1.0 is the default.

<ford_distance_factor value="1.5"/>
The average distance between river fords, 1.0 is the default.


MISC

<backdrop_scale value="1.0, 0.25, 1.0"/>
Change the size of backdrops (the mountains you see beyond the map).

<sun_angle_factor value="0.8"/>
How high is the sun in the sky, 1.0 is the default.
Seasons
You can alter various season options by adding code like this:

<seasons> <season id="Spring" setup_id="Spring" duration="0.25" precipitation_chance="0.25" windy_chance="0.5" very_windy_chance="0.1" fish_boost="0.5"> <min_temperature value="5"/> <max_temperature value="25"/> </season> <season id="Summer" setup_id="Summer" duration="0.25" precipitation_chance="0.0" windy_chance="0.25"> <min_temperature value="20"/> <max_temperature value="35"/> </season> <season id="Fall" setup_id="Fall" duration="0.25" precipitation_chance="0.25" windy_chance="0.5" very_windy_chance="0.1"> <min_temperature value="5"/> <max_temperature value="25"/> </season> <season id="Winter" setup_id="Winter" snow_setup_id="WinterSnow" duration="0.25" precipitation_chance="0.5" windy_chance="0.5" very_windy_chance="0.5" reduced_fauna="true"> <min_temperature value="-15"/> <max_temperature value="10.0"/> </season> </seasons>

For each season you can define some parameters, like duration, rain chance, wind parameters etc...

duration: How long this season is, in terms of a fraction of a year, all season durations have to add up to 1.

precipitation_chance: How likely it is to rain/snow in this season.

windy_chance/very_windy_chance: How likely it is for it to be windy/very windy in this season.

reduced_fauna: Define whether this season has reduced fauna, in which case the number of animals will match the min value defined in scenario, or not, in which case the number of animals will be the max value defined in scenario.

fish_boost: Fish in banks will replenish by this amount at the beginning of this season.

min_temperature/max_temperature: Temperature will randomly oscillate between these 2 values (in Celsius).
Object distribution
Environments allow you to alter the placement of all environment objects, in the same way us developers do.
Environment objects are divided in 4 categories: Trees, Details, Props and Deposits, please see the Terrain Entity ID list[madrugaworks.com] for a list of the objects of each type.

To alter the location of objects in the environment you need to add this sort of code to the environment file:

<OBJECT_TYPE_override_prototypes> <OBJECT_TYPE_override_prototype> // Object parameters </OBJECT_TYPE_override_prototype> <OBJECT_TYPE_override_prototype> // Object parameters </OBJECT_TYPE_override_prototype> </OBJECT_TYPE_override_prototypes>

Where OBJECT_TYPE is one of "tree", "detail" , "prop" or "deposit" (with no quotes).

For each object you can specify one of several parameters. Only the id is required, if any of the other parameters are missing the defaults are used.

id. The name of the object, use the IDs from the Terrain Entity ID list[madrugaworks.com]

density. The amount of objects of this type to place, has to be in the range [0, 1]

min_altitude, max_altitude. The min and max altitudes at which this object is placed, in meters. 0 means water level, negative values might make sense for certain objects like reeds or rocks that are placed underwater.

min_angle, max_angle. The min and max slope angles in degrees at which this object is placed. Values range from 0 (flat), to 60 (very steep). Negative values of up to -10 are allowed to ensure you get max density at 0 degrees, as there is a transition zone.

min_humidity, max_humidity. Only valid for detail objects. The min and max humidity at which this detail object is placed, humidity is close to 1 near rivers and forests, and 0 in other places.

Some examples:

Cover the entire map in flowers:
<detail_override_prototypes> <detail_override_prototype> <id value="DetailFlowers"/> <density value="1" /> <min_altitude value="0" /> <max_altitude value="100"/> <min_angle value="-10" /> <max_angle value="85"/> <min_humidity value="0" /> <max_humidity value="1"/> </detail_override_prototype> </detail_override_prototypes>
Note the -10 min angle, this is because there is a transition zone between the areas with and without detail, so the -10 angle ensures we get 100% details in flat areas.

Place flint and copper deposits in flat sections of map:
<deposit_override_prototypes> <deposit_override_prototype> <id value="Flint"/> <min_angle value="0" /> <max_angle value="20"/> </deposit_override_prototype> <deposit_override_prototype> <id value="Copper"/> <min_angle value="0" /> <max_angle value="20"/> </deposit_override_prototype> </deposit_override_prototypes>

Cover map with birches:
<global_tree_density value="1"/> <tree_override_prototypes> <tree_override_prototype><id value="Birch"/> <density value="1" /> <min_altitude value="-10.0" /> <max_altitude value="100"/> <min_angle value="-10" /> <max_angle value="60"/> </tree_override_prototype> </tree_override_prototypes>

Place a ton megaliths in slopes:
<prop_override_prototypes> <prop_override_prototype> <id value="Megalith"/> <density value="1" /> <min_altitude value="-2.5" /> <max_altitude value="100"/> <min_angle value="40" /> <max_angle value="55"/> </prop_override_prototype> </prop_override_prototypes>
Environments and savegames
If you release a scenario to the Steam Workshop, and you then change it's environment in a way that alters the terrain or objects in any way, you are very likely going to break the savegames for the people that are using it.

If you want people that had savegames with the old version of the environment to be able to keep on playing them, the best option is to duplicate the scenario, name it something else like my_scenario_v2.scn.xml, and tag the old one as hidden by adding the <visible value="false"/> tag in it (note this goes in the scenario file, not the environment file). This way people won't be able to start a game using the old version, but will still be able to load savegames that use it.
21 Comments
Is it possible to modify the total duration of the years, make all seasons longer?
Fartman 29 Aug, 2020 @ 4:37pm 
Hey,
How can I increase the amount of resource in a mine? I have looked in the enviroment file, set the
resource_factor value="1000"/> , but my mineables are still around 10 to 20 units ( depending on resource ).
Any info?
Thanks!
tanyfilina 15 Aug, 2020 @ 10:53pm 
Is it possible to make rivers wider?
martiño  [author] 8 May, 2020 @ 1:07am 
This can only be done in scenarios
SanzSeraph 7 May, 2020 @ 8:08am 
Is there a way to associate animal populations with specific environments, or can that only be done in scenario files?
Gorby 18 Apr, 2020 @ 3:53pm 
For things like the deposit overrides, how can we find the default values for density, min/max angles and altitudes?
svilenov 11 Apr, 2020 @ 12:51am 
This modding tool is quite useful for adjusting the environment parameters:

https://dawn-of-man-mod-gen.netlify.com

martiño  [author] 20 Feb, 2020 @ 3:48am 
michaelmozzie 8 Feb, 2020 @ 12:39pm 
Please could you explain what you mean by this "...must be located the Environments subfolder relative to the scenario definition file." I tried making a floder in my scenario folder titled "Environments" and inside that I put an xml file entitled "my_environment", then referred to it in my scene file, but when I load the game and scenario it can't find my_environment...
Primeval Angel 1 Feb, 2020 @ 9:21am 
Where can I find all trees values?