Feeder Component

From wiki
Revision as of 01:10, 21 November 2017 by DeamonHunter (Talk | contribs) (Missing period.)

(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 Feeder Component, signified by the following;

"feeder": {
  =Content=
}

Feeder Components are used to specify tiles that animals and pets can eat from. This component contains information about the capacity and type of food it can contain. This component also complements the Feeder Helper Component, which provides information on tiles meant to go into the feeder.

When and How to use

Feeder Component is used whenever you want to make a tile that animals can eat out of. Specifically, an Feeder component is needed whenever a Tile has it Tile#"tileStateKind" equal to "staxel.tileState.Feeder". Otherwise Feeder component will do nothing.

To start off with first, you will need to create a Tile with Tile#"tileStateKind" equal to "staxel.tileState.Feeder". Once that is done, you can add the following below the last property of the file;

"feeder": {
  "emptyFeederCode": "staxel.tileObject.animalFurniture.ChickenFeedAreaEmpty",
  "feedCapacity": 4,
  "feedKind": "chickenFeed"
}

If this is the empty tile, then do not include any properties inside of feeder.

"emptyFeederCode" is the code of the "Tile" you want to use when this tile is emptied. "feedCapacity" is the number of units this feeder can take. If it is empty then do not include. "feedKind" is the type of food that you want to use. Look at the specific Animal to look at their feed type.

With that, this component is complete. You may want to also look into Feeder Helper Component for making items/tiles go into the feeder.


Config Options

All config options must be inside the body of;

"feeder": {
  =Config Here=
}

"emptyFeederCode"

Valid options (String): A string containing a code to a Tile.

Default Value: If not specified, will treat this tile as the empty.


This is the tile to switch to when the food is gone. It will switch to this tile if currentFood = 0 and feedCapacity != 0.


"feedCapacity"

Valid options (Integer): A positive integer number.

Default Value: If not specified, will have 0 capacity.


This is the maximum amount of food this tile can use. If this is 0, then "emptyFeederCode" is not used, otherwise it will use "emptyFeederCode" when it runs out of food.


"feedKind"

Valid options (String): A string matching the food type an Farm Animal/Pet eats.

Default Value: If not specified, will not have any type.


This specifies what type of food this tile is for. This is especially needed to feed certain types of animals.