2020-10-01 05:30:59 +00:00
|
|
|
# Basic layer breakdown
|
2020-10-01 02:55:38 +00:00
|
|
|
|
2020-10-03 19:45:47 +00:00
|
|
|
This is a very minimal layer with minimal features. Most things will require additional features.
|
2020-10-10 03:26:27 +00:00
|
|
|
|
2020-10-01 02:55:38 +00:00
|
|
|
|
2020-10-01 19:57:47 +00:00
|
|
|
```js
|
2020-10-01 05:45:05 +00:00
|
|
|
p: {
|
2020-10-01 02:55:38 +00:00
|
|
|
startData() { return { // startData is a function that returns default data for a layer.
|
2020-10-13 03:08:19 +00:00
|
|
|
unlocked: false, // You can add more variables here to add them to your layer.
|
2020-10-01 04:08:01 +00:00
|
|
|
points: new Decimal(0), // "points" is the internal name for the main resource of the layer.
|
2020-10-01 02:55:38 +00:00
|
|
|
}},
|
|
|
|
|
2020-10-10 03:26:27 +00:00
|
|
|
color: "#FE0102", // The color for this layer, which affects many elements
|
2020-10-01 02:55:38 +00:00
|
|
|
resource: "prestige points", // The name of this layer's main prestige resource
|
|
|
|
row: 0, // The row this layer is on (0 is the first row)
|
|
|
|
|
|
|
|
baseResource: "points", // The name of the resource your prestige gain is based on
|
|
|
|
baseAmount() {return player.points}, // A function to return the current value of that resource
|
|
|
|
|
2020-10-13 00:48:06 +00:00
|
|
|
requires: new Decimal(200), // The amount of the base needed to gain 1 of the prestige currency.
|
2020-10-03 19:45:47 +00:00
|
|
|
// Also the amount required to unlock the layer.
|
2020-10-01 02:55:38 +00:00
|
|
|
|
|
|
|
type: "normal", // Determines the formula used for calculating prestige currency.
|
|
|
|
exponent: 0.5, // "normal" prestige gain is (currency^exponent)
|
|
|
|
|
|
|
|
gainMult() { // Returns your multiplier to your gain of the prestige resource
|
|
|
|
return new Decimal(1) // Factor in any bonuses multiplying gain here
|
|
|
|
},
|
|
|
|
gainExp() { // Returns your exponent to your gain of the prestige resource
|
|
|
|
return new Decimal(1)
|
|
|
|
},
|
|
|
|
|
|
|
|
layerShown() {return true}, // Returns a bool for if this layer's node should be visible in the tree.
|
2020-10-01 19:57:47 +00:00
|
|
|
},
|
|
|
|
```
|