MTN provides map makers creative freedom, allowing one to move objects and buildings that were previously static in nature. With the tools provided by SMAPI, a map maker needs to set up a Content Pack mod with some additional files to provide MTN with needed information. This information to allow proper functionality is must be provided within a particular file: farmType.json. It must be exactly as named, capital T and everything.

The farmType.json is a typical JSON file. (If you are unfamiliar with JSON, you can read about it At the official website. To simply put, is it the format that is used to exchange data, and is very popular within the Stardew Valley Modding Community). If you were to look at Community Farm's farmType.json file, you will see you have quite a bit of options. This article is to explain, in detail, the basics along with the essentials that need to be present within farmType.json.

The absolute bare minimum that is needed in the farmType.json is the following:


{
"Description": "Example Farm_This is where the description of the farm would go, it appears when the mouse hovers over the icon during the creation of a new game.",
"farmMapFile": "Farm_Community",
"Folder": "Example",
"ID": 105,
"Name": "FarmExample",
"version": 1.2.2
}

The example above contains the absolute minimum needed in order to properly register your content pack as a MTN map. The fields do the following:

  • Description - Provides a quick description of the farm during new game creation. This is viewed when a player hovers over the clickable icon. An underscore "_" symbol is needed to provide Stardew Valley the distinct difference between the name of the farm, and the small description. (In MTN 1.3, this will change, but the underscore symbol will still be supported, and thus backwards compatible).
  • farmMapFile - The filename of the base farm map (your custom farm). By default, this will be looking for the file in .xnb form. Other options exist (that will be explained a lil bit later) to read it in .tbin form.
  • Folder - The name of the folder your content pack is in.
  • ID - This is the farm ID pertaining to your particular farm. It is an integer value (whole number) that must be above 11, but below 2.1 billion. It is used to communicate which farm to load in multiplayer, as well as the maps themselves in single player.
  • Name - The name of the farm. This is used for systematic reasons.
  • Version - The MTN version said community pack was developed for. This is for backwards compatibility. This should always be the latest MTN version at the current time you developed your community pack.

This is the bare minimum requirement to register your map in MTN. If one were to start a game on your new map, they would instantly notice the farm house only contains a bed! Starting with a bare house is a tad disappointing, luckily there are options as a map maker to set the starting furniture. There are three ways to add furniture, "furnitureLayoutFromCanon", "furnitureList" and "objectList".

**note: MTN 1.2.3-beta will contain "furnitureList" and "objectList" capability. This was disabled due to some changes with multiplayer (and Cabin settings). 

The first option, "furnitureLayoutFromCanon", takes an integer (whole number) value from 0 to 4. 

{
"furnitureLayoutFromCanon": 0,
}

This value will take the layout of the furniture in the farmhouse from one of the canon maps, and copy it over at the start. The numerical values below show their corresponding farms:
  • 0 - Standard Farmhouse's furniture layout.
  • 1 - Riverland Farmhouse's furniture layout.
  • 2 - Forest Farmhouse's furniture layout.
  • 3 - Hill-top Farmhouse's furniture layout.
  • 4 - Wilderness Farmhouse's furniture layout.

Each layout can be viewed in the Stardew Valley's Official Wiki page on Farmhouse. 

The second/third option to use to add furniture to farmhouses at the start of the game is "furnitureList" and "objectList". These can be used in conjunction with "furnitureLayoutFromCanon". They are not mutually exclusive. 


{
"furnitureList": [
{
"fid": 1120,
"x": 56,
"y": 6
},
{
"fid": 1106,
"x": 8,
"y": 8
}
]
}


The example above would add two pieces of furniture to the farmhouse at the start of a new game, pertaining to the farm map. 
  • fid - The furniture id pertaining to the piece of furniture (in the game code of SDV, this is the same as parentSheetIndex)
  • x - The x tile coordinate, where the furniture will be placed.
  • y - The y tile coordinate, where the furniture will be placed.

Note: the square brackets [ ] represent a list of entries to a particular field. This allows more than 1 piece of furniture to be entered into furnitureList.
objectList behaves in a similar way. However, this list pertains to chests and packages (like the seeds you get at the beginning of the game.

{
"objectList": [
{
"x": 3,
"y": 7,
"items": [
{
"itemId": 472,
"amount": 15
}
]
}
]
}

The example above would generate a small package, where 15 Parsnip seeds are within. Just like the start of any vanilla game.

Lastly, just before you started a new game, you probably notice the icon for the custom farm was a white farm house with a red question mark, this can be seen in MTN/res/icon.png in the MTN mod. If you want to set your own icon, you use the following in your farmType.json

{
"Icon": "icon.png"
}


Here the value for "Icon" is the file name, including the file extension. The file extension should be .png, and the size of the icon should be 22 by 22 pixels.

Article information

Added on

Edited on

Written by

SgtPicklesDotVeggie

0 comments

REPORT BUG
Top