This article is about adding new fillTypes. This can be done as part of a map mod or as part of a different mod, like a production.
Adding the fillType is mostly the same for both types of mods.
Fill Types can somewhat be split into two categories:
- Pallet only fill types
- Loose fill types
Fill types are added via a "fillTypes.xml" file. In maps this is usually named "maps_fillTypes.xml" for other mods it can be named something else, but should contain "fillTypes" in the name to indicate clearly what it contains.
Structure of the fillTypes xml
The fillTypes xml consists of several parts, some of which are only needed for specific fillTypes.
- fillTypeConverters - this section is only needed for some fillTypes, like new grass types that can be tedded into hay
- fillTypes - in this section the actual fillTypes are defined
- fillTypeCategories - this section determines where which fillType can be used, eg which fillTypes can go into a regular grain trailer
- fillTypeSounds - in this section fillTypes can be assigned specific sounds used when loading/tipping/overloading the fillType ingame (eg patotoes sound different then wheat when tipped onto the ground)
Every fillType has to have an entry in the fillTypes section and should have an entry in the fillTypeCategories section.
The fillTypeConverters section is only needed in specific circumstances.
The fillTypeSounds section is optional. When you do not define it, your fillTypes will use a generic sound by default.
The fillType definition
Each fill type has a fillType definition in the fillTypes section.
The opening tag contains general information like the internally used name, the name as displayed ingame (usually as a l10n reference) and whether or not this fill type should be visible in the price menu.
The physics tag contains information about the mass and the surface angle of the fill type.
The economy tag contains the information about the price and potential fluctuation of the price over the ingame year.
The image tag contains the path to the hud icon.
The textures tag contains the paths to the fillPlane textures (this is not needed for pallet only fill types).
The pallet tag contains the path to the pallet xml for this fill type (this is needed for ALL fill types, but for bulk fill types can be set to a default basegame fillable pallet).
Pallet only fill types
These are fill types that only exist in a pallet form. Most products from productions are pallet only fill types (eg preserved beetroot/carrot/parsnip). These fill types cannot be put eg in a trailer or tipped on the ground. They are always in a pallet. (eg you get a pallet from a production and you sell the pallet)
To create a pallet only fill type, you need a custom pallet and a hud icon (this is the icon that is displayed in the menus and next to the fill level indicator bar ingame to represent the fill type). fillPlane textures are not required.
The hud icon has to be a 256x256px, BC7 with 3 Mipmaps.
For information on making a custom pallet, see the Pallet section below.
Loose material fill types
These are fill types for loose material like grain, wood chips, etc. Things that can be loaded into a trailer and tipped to the ground.
If your new fill type should be able to be tipped to the ground, it can usually only be added with a map, as making it possible to tip it to the ground requires adding an additional channel to a densityMap, which is part of a map.
Loose material fill types need fillPlane textures, as these are the textures used to show the fill type in a trailer or on the ground.
These are the textures required:
- fillPlane diffuse - 1024x1024px, 9 Mipmaps, BC7
- fillPlane normal - 1024x1024px, 9 Mipmaps, BC1 - "green", world/object space normal map, NOT "purple" tangent space normal map!
- displacement - 32x32px, 1 Mipmap, BC4
- height - 512x512px, 8 Mipmaps, BC4
- fillPlane distance - 256x256px, 7 Mipmaps, BC7
- hud icon - 256x256px, 3 Mipmaps, BC7
The height texture can be created by scaling down the normal and then converting it to greyscale. The displacement texture can then be created by scaling the height texture down.
While loose material fill types also should have a pallet, as long as they are added to the "BULK" fill type category, they can use the basegame fillable pallet and thus do not need a custom pallet to be created.
Fill type categories
WIP
Fill type sounds
WIP
Fill type converters
WIP
Custom pallets
WIP