Advanced Modding – Farming
Farm_Crops.DBF
This file defines the types of crops that can be grown in farms.
When you add a new crop, you must also add a corresponding item in Product_Types.DBF (See the page about modding Products for details).
E.g. To add a new crop Blueberry, you should add a new record in both Farm_Crops.DBF and Product_Types.DBF sharing the same item code. Since the item code is limited to 8 characters, you may choose a code like “BLUEBERR” for representing Blueberry.
Field | Type | Length / Range | Description |
---|---|---|---|
PLANT_CODE | Character | 8 chars | The item code of the plant. |
ITEM_CODE | Character | 8 chars | The item code of the plant product. It is the same as PLANT_CODE if the plant is the product itself (e.g. strawberry). It is different from PLANT CODE if the plant and the product are different (e.g. sugarcane and sugar). |
SOW | Numeric | 1 to 12 | The sowing month. |
HARVEST | Numeric | 1 to 12 | The harvesting month. |
TEMP | Numeric | 1 to 9 | Suitable temperature (The game currently does not use this field. Reserved for future use) |
RAIN | Numeric | 1 to 9 | Suitable rainfall (The game currently does not use this field. Reserved for future use) |
Farm_Livestock.DBF
This file defines the types of livestock that can be raised in farms.
When you add a new type of livestock, you must also add a corresponding item in Product_Types.DBF (See the page about modding Products for details).
The new records in Farm_Livestock.DBF and Product_Types.DBF should share the same item code so that they are linked to each other.
The new record to be added to Product_Types.DBF should fall under the product class “LSTOCK” (meaning Livestock). You may see existing livestock records in Product_Types.DBF, such as Pig or Chicken for reference.
Field | Type | Length / Range | Description |
---|---|---|---|
LSTOCK | Character | 8 chars | The item code of the livestock. |
PRODUCT1 | Character | 8 chars | Each type of livestock can be set to produce a maximum of 3 types of products. This is the item code of the first livestock product. |
PRODUCT2 | Character | 8 chars | This is the item code of the second livestock product.
|
PRODUCT3 | Character | 8 chars | This is the item code of the third livestock product.
|
IMAGES
If you have added a new type of livestock in a Livestock Raising Unit or a new livestock product in a Livestock Processing Unit, besides adding new product image, you will also have to add a new image for the Livestock Raising Unit or the Livestock Processing Unit, as shown below.
The image should be placed in the IMAGES\JOBS\FARM folder and the image size should be 150×120 pixels.
(For more details about how to add images in a MOD, click here to see the page How to Make a MOD)
The file name of the images should follow the item code of the livestock or livestock product that you have added.
You may also modify existing ones if you wish.
Farm_Livestock_Products.DBF
This file defines the types of livestock products that are produced in farms.
When you add a newlivestock product, you must also add a corresponding item in Product_Types.DBF (See the page about modding Products for details).
The new records in Farm_Livestock_Prodcuts.DBF and Product_Types.DBF should share the same item code so that they are linked to each other.
The new record to be added to Product_Types.DBF should fall under the product class “LPRODUCT” (meaning Livestock Products) or “LSEMI” (meaning Livestock Semi-products). You may see existing livestock records in Product_Types.DBF, such as Frozen Pork (Livestock Product) or Leather (Livestock Semi-product) for reference.
Field | Type | Length / Range | Description |
---|---|---|---|
ITEM_CODE | Character | 8 chars | The item code of the livestock product. |
SPEED | Numeric | 1 to 999 | The production speed of the livestock product. 100 is the standard production speed.Larger than 100 means faster than the standard production speed. (e.g. 150 means 150% of the standard speed.)Smaller than 100 means slower than the standard production speed. (e.g. 70 means 70% of the standard speed.) |
SMONTH | Numeric | 1 to 12 | The starting month of the production of the livestock product. e.g. Set it to 1 if the product is being produced all year round. |
EMONTH | Numeric | 1 to 12 | The ending month of the production of the livestock product. E.g. set it to 12 if the product is being produced all year round. |
NOTE:
For numeric variables, if you enter a value that is outside the Range listed above, the game will automatically correct it when it loads the DBF files.
Please check out this modding tutorial about how to add a new crop type Blackberry to the game. Click here to read the tutorial now.