Apiary Component

From wiki
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 Apiary component, signified by the following;

"apiray": {
  =Content=
}

Apiary components are used to add customisation to the functionality of the Apiary Tile. This component includes some aesthetic and functional changes. This Apiary component also complements the Apiary Helper Component, which provides information on tiles meant to go into the apiary.

When and How to use

Apiary component is needed whenever you want to make an Apiary. Specifically, an apiary component is needed whenever a Tile has it Tile#"tileStateKind" equal to "staxel.tileState.Apiary". Otherwise Apiary component will do nothing.

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

"apiary": {
  "beeEffect": "staxel.particle.gatherable.Bees",
  "rallyStages": [
    0,
    10,
    200
  ],
  "maxBeeCount": 10,
  "beesPerDay": 1,
  "produceWaitDays": 7,
  "collectionStage": 3
},

These all look like a bunch of numbers, but they all play a different role. This file can take a bit of mucking around to get the "right" values. A small tip is to make this file, then come back and edit it after a day has passed.

"beeEffect" is the Particle Spawner that the game will use to show bees. "maxBeeCount" is the maximum amount of worker bees that can be in the Apiary. "beesPerDay" is the number of bees that will spawn per day if a queen is present. "produceWaitDays" is the amount of time that needs to pass when bees are producing, to make produce. "collectionStage" is the amount of particles per second during the collection stage. The final one "rallyStages" is a little more complicated. "rallyStages" is a list of numbers which specify how many particles to spawn at a specific time. This time is dependent on how many bees are in the apiary and the number of rally stages there are. Specifically it works like (BeeCount/MaxBeeCount) * Number of Rally stages rounded up. (e.g. if 3/10 * 5 = 1.5 = Second rally stage).

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


Config Options

All config options must be inside the body of;

"apiary": {
  =Config Here=
}

"beeBlastEffect"

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

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


This is the particle system that it will be used whenever a bee gets placed into the Apiary.


"beeEffect"

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

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


This is the particle system that it will be used to show what stage bees are in and how many bee's there are.


"beesPerDay"

Valid options (Integer): A positive integer number.

Default Value: If not specified, will spawn a single bee per day.


The amount of bees that will spawn per day if a bee is present in the Apiary. (i.e. When the bees are Rallying.)


"collectionStage"

Valid options (Float): A positive decimal number.

Default Value: If not specified, will spawn 3 particles per second.


The amount of particles spawned per second when bees are in their collection stage. (i.e. When the apiary is full of bees.)


"maxBeeCount"

Valid options (Integer): A positive integer number.

Default Value: If not specified, the maximum amount of bees will be 10.


The maximum amount of bees in the apiary. Once this is reached, the bees will produce honey.


"produceWaitDays"

Valid options (Integer): A positive integer number.

Default Value: If not specified, will take 7 days to produce.


This is the number of days bees will have to be in their producing stage (Full apiary) in order to make produce.


"rallyStages"

Valid options (List of Floats.): A list of positive decimal numbers.

Default Value: If not specified, will have 0 particles spawn during rallying stage.


This is the number of particles it will spawn depending on if the game has reached it. The math formula for what rally stage used is (BeeCount/MaxBeeCount) * Number of Rally Stages rounded up. (e.g. if 3/10 * 5 = 1.5 = Second rally stage).