The Seasons mask is a bitvector map (also known as a grle file or an infolayer) that contains a mask used by Seasons to determine if the area is inside or outside. Or technically. whether the terrain at the area is accessible from the air. If there is a roof above, then it is not accessible. Also when there is a road shape on top it is not accessible.
The mask is used to place snow only outside of sheds and not under road objects. It is also used to determine whether bales and swath (grass, hay and straw) is inside a building or outside.
This infolayer has to be implemented by any map that wants ultimate support for Seasons.
Note that when a map does not have a Seasons mask, the tipCol layer will be used as a fallback (this is new in Seasons 19). There have been major changes between Farming Simulator 17 and 19 that made a simplified system possible (and also the fallback). The tipCol is only used for snow. Bales will not rot until a custom mask is supplied.
In this guide you will learn all steps of adding the Seasons mask to a map.
- Creating and installing the mask file
- Painting the mask
- Adding masks to custom placeables
Creating and installing the mask file
To create the mask, duplicate the tipCol file from your map and name it
Next the map.xml has to be updated to let Seasons know where the mask is.
<map> ... <seasons> <mask filename="map/seasonsMask.grle" /> <!-- point to the mask file --> </seasons> ... </map>
To paint the infolayer the file also needs to be added to the map i3d file:
<Files> ... <File fileId="100000" filename="seasonsMask.png" /> <!-- note to use .png here instead of .grle --> ... </Files> ... <InfoLayer name="tipCol" fileId="64" numChannels="1" runtime="true"/> <InfoLayer name="farmland" fileId="65" numChannels="2"/> <InfoLayer name="seasons" fileId="100000" numChannels="1"/> <!-- new -->
You now have a mask based on your tip collisions. This is not required but highly recommended, as no snow can be picked up where tip collision is active. On its turn, tip collision is normally active where a shovel or other tool can’t get to the tip, like below road objects.
Painting the mask
The next and final step is to paint any changes you want on the mask.
To start painting, use the same tools as with the farmland and tipcol layers: the infolayer tool. In the terrain box, select the
seasons. Use an Add and Subtract tool on your mouse, and start painting away using value
Anywhere painted with 1 (shown as white in the editor), Seasons considers inside. (This is equivalent to the tipCol where white is also collision).
You should paint:
- Inside buildings
- Inside lakes (possibly handled by the tipCol)
If you have static animal pens you can also clean up those:
- Animal troughs
- Wool spawnpoint
- Other pallet spawnpoints
Adding masks to custom placeables
With the new placeable system in Farming Simulator 19 come new masks. In Seasons17 the whole clearArea of the placeable was automatically masked so no snow fell inside sheds. This is not possible in Farming Simulator 19 as placeables are now bigger and more varied. Especially animal pens have different requirements.
If your map uses custom animal pens that can be placed by the player, you should supply new masks. If the pens are placed by you in items.xml, you can also mask directly in the map Seasons mask, and disable masking inside the placeable.
The areas are created in the same way as the clearAreas, foliageAreas, and so on. Any area with a mask will not have snow and will be treated as inside.
<placeable> ... <seasons> <maskAreas> <maskArea ... /> </maskAreas> </seasons> ... </placeable>
Disabling automatic masking fallback
If you do not want to block any snow for your placeable, for example because it does not have a open footprint, or because you already mask it in the map, you can disable automatic masking by setting an empty mask.
Use the following mask definition in your placeable:
<placeable> ... <seasons> <maskAreas> <!-- empty list so there is no masking --> </maskAreas> </seasons> ... </placeable>
This will tell Seasons that there is a custom mask, being: no areas.
The masks can be tested in-game by dropping snow using the
rmAddSnow 1 console command. Use
rmResetSnow to remove all snow.