Lucy Bextor – Oct 23, 2017
Being the only one wild animal available in Banished, deer attracts much attention and therefore legends created by Banished players abound. As it can be clear from the title, the text is focused on hunting cabin mechanics, hunters’ features, and deer behaving. Statement of different facts is proved by the game code accessible in the Mod Kit.
Many Banished players think grazing deer to be a decoration not influencing on food production. In reality (or better to say virtuality), any fawn, even the smallest one, is a great source of meat for your villagers. Experienced (or observant) players know the funny way citizens kill a deer: they come indecently close to it and perform mysterious movements with their hands in the air, after that the deer disappears and we only see the tremendous (even if it was a tiny fawn) piece of meat along with leather lying on the ground.
Let us return to our… venison. The number of meat being left after killing a deer is defined in TemplateRawMaterialVenison.rsc in the object RawMaterialDescription rawmaterial:
int _lowCreateCount = 160;
int _highCreateCount = 200;
The parameter lowCreateCount stands for the meat number from one deer killed by an uneducated hunter while highCreateCount stands for the educated case. It sounds a bit strange that an uneducated person cannot find the meat in a killed deer’s body, which an educated successfully extracts for his village, but the original game works exactly this way. As may be expected, the venison creation values can be changed by mods.
If the output meat amount depends on the number of deer had been killed by hunters (and the parameter of the meat amount in RawMaterialVenison.rsc), why hunters do not harvest all deer on their way? And is it possible to kill all deer on the map?
To answer the first question, we will probe into the code of a hunting cabin (Template/HunterLodge.rsc). The most important information is contained in the object HuntDescription hunt:
float _killTimeInMonths = 2.0;
This parameter determines the time until killing the next deer, and defined value «2» means «one deer per two months». Thus, the amount of workers has no influence on the building efficiency – with a deer having been killed, hunters will wait for 2 months to start pursuing another deer. However, they will visit the workplace regularly and in time, wandering aimlessly here and there.
Another important parameter (its importance will be clear in the next chapter) is located in RadiusDescription radius:
int _radius = 34;
The parameter, evidently, stands for the radius of hunters to track deer down around the cabin. To be killed by hunter, deer must not be in the radius, but within hunter’s sight. The sight radius seems to be located in the game core and not able to be changed by the Mod Kit.
This time we look for the information in the file of deer population (Template/PopulationDeer.rsc). Only several lines are important enough to be mentioned. We start with the object HerdDescription herd, containing main information about the herd.
int _maxAnimals = 10;
int _minAnimals = 5;
float _timeInAreaMonths = 1.0;
float _timeInAreaTolerance = 0.75;
int _grazeAreaSize = 8;
float _reproduceTimeInMonths = 12.0;
The parameters are very simple: maxAnimals – the maximum number of deer in a herd; minAnimals – respectively, the minimal one; grazeAreaSize – the size of the area where a herd is grazing until you scare them, after what they migrate to another area; timeInAreaMonths and timeInAreaTolerance stand for the total amount of months for deer to graze; reproduceTimeInMonths – time of offspring in months. The game starts with early spring (in March), so newborn fawns will appear next early spring. The number of offspring will be the same as the current number of deer in the herd but not more than maxAnimals. Sounds as parthenogenesis, huh?
If you exterminate all deer in the herd, next early spring the herd with minAnimals fawns will respawn anyway. This case I do not know how to name – miracle.
Until now, everything was simple. Before moving to the next object, I would like to tell you briefly about zone forming features, in which deer can (or cannot) graze. Debug menu provides modders with the great function that highlights with green colour zones, in which deer do not mind to pinch the grass. Deer ignore zones without colour, avoiding them with rapid pace – such zones, for example, appear after constructing any buildings in them. Zones also can be red and yellow, recovering and turning into green with time, if you have demolished the building.
Deer population layers in debug menu: deer ignore red and yellow colours meanwhile use green zones for grazing.
Now the most important part located in PopulationDescription population begins.
int _cellSize = 8;
int _largeCellSize = 64;
PathBits _allowedPathing = Fast | Faster | Normal | Obstacle;
PathBits _disallowedPathing = Immovable | Unusable | Occasional;
int _maxPopulationPerCell = 2;
bool _updateCells = true;
First, we will focus on zones. The map is divided into zones in two ways. The first splitting is done by the parameter largeCellSize dividing the map into many 64×64 squares. This parameter defines the square (zone) size for deer to migrate looking for a new pasture. The second way of dividing is defined by the parameter cellSize – in this case, map is split by 8×8 squares. These squares (zones) stand for land “estrangement” – they lose the green colour if you build anything there. If a building is located on the verge of two zones, then both will lose their colour and deer will ignore them. To understand the mechanics of losing the colour, we should know land types influencing on it.
Deer population layer at cellSize = 2.
Deer can pass through lands (and zones with such land will not lose the colour), listed in allowedPathing (Fast – dirt road, Faster – stone road, Normal – common land, Obstacle – resources lying on the land). Land types from disallowedPathing (Immovable – buildings, Unusable – mountains, Occasional – crops, orchards and pastures) force lands to lose the colour. There are also other land types but we do not need them. It can be interesting to mention remove tools to have Immovable type.
Land types display in debug menu.
When the zone changes its type to any listed in disallowedPathing, it loses green colour and attractiveness for deer. Square recovers its colour after changing the land type to allowed one.
Deer population layers: colour changes during cutting trees.
The parameter maxPopulationPerCell is rather simple: it defines the population maximum number in the zone of largeCellSize (64×64) size. The Boolean type parameter updateCells is simple too: it stands for the update of little zones. However, the result of changing parameter is amazing: value false disables colour update. You can construct as many buildings as you want, and deer will anyway graze in the town.
Deer population layer with value «false» in updateCells.
Unfortunately, I could not manage to understand what parameters populationIncreasePerMonth and populationDecreasePerHarvest stand for.
The venison amount gained by three hunters in one cabin (left), two hunters in two cabins (centre), one hunter in one cabin (right).
Instead of conclusion, I will give the most significant facts for players:
Note: the information above is valid only for the original game without any modification!