Mixed Seeds Component

From wiki
Revision as of 06:51, 14 December 2017 by DeamonHunter (Talk | contribs) (Update Page.)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Category:Component Modding are all optional properties that can be added to any file. Components are useful in extending the original files with even more information, such as the cost of the item or whether the block can be broken by a weapon.

On this page, we go over the Mixed Seeds component, signified by the following;

"mixedSeeds": {
  "plantOptions": [
    =Content=
  ]
}

Mixed Seeds components are used to complement Mixed Seeds Items. They provide all of the categories of plants that should, and should not, be included when the mixed seeds are used. This only contains functional differences, as the item contains the visual differences.

When and How to use

Mixed Seeds component is needed to specify what plants are to be gotten when a Mixed Seeds Items.

To start off with first, you will need to create a Mixed Seeds Item that is fully configured. Once that is done, you can add the following below the last property of the file;

"mixedSeeds": {
  "plantOptions": [
    {
      "chance": 100.0,
      "plantCategories": [
        "crop"
      ],
      "excludeCategories": [
        "bush",
        "tree",
        "gold",
        "large"
      ]
    },
    {
      "chance": 1.0,
      "plantCategories": [
        "potato"
      ]
    },
  ]
}

This file can end up looking fairly large, but that depends on how many different types of plants that you want. The first thing is that all information is kept within a secondary property #"plantOptions". Plant Options is a list of things, known as blobs in game. These blobs can contain 3 properties, the first of which is #"plantCategories". This property contains all of the categories that you would like on a plant, and if the plant matches at least 1 category, it is chosen. Next is #"excludeCategories", which is the opposite of #"plantCategories". If the plant has any of these categories, it cannot be chosen. #"excludeCategories" takes precedent over #"plantCategories". The final option, is "chance", which is the weighted chance that this section is chosen over others. In the section above, this amounts to plants with "potatoes" being a slightly more common plant over all others. (This is due to potatoes appearing in both sections.)

Config Options

All config options must be inside the body of;

"mixedSeeds": {
  =Config Here=
}

"plantOptions"

This is where the majority of the meat of this component is. This is a list of items that all have the same properties. This will often look like;

"plantOptions" : [
  {
    =Content=
  },
  {
    =Content=
  }
]

Though in many cases only one section is used.

"chance"

Valid options (Float): A positive decimal number.

Default Value: No default value is specified. Always need to provide your own.


This is the relative chance of this section being chosen. The actual chance of this section is given by chance/TotalChance


"excludeCategories"

Valid options (List of Strings): A list of strings that contain categories.

Default Value: Can be omitted. No options are excluded.


This is a list of all the categories that you want excluded from being used. In game, this is used to stop larger, and more profitable plants, from spawning. Takes precedent over "plantCategories".


"plantCategories"

Valid options (List of Strings): A list of strings that contain categories.

Default Value: Can be omitted. No options are excluded.


This is a list of all the categories that you want included. If the item has at least one of these categories, it is included.