1
0
Fork 0
mirror of https://github.com/Acamaeda/The-Modding-Tree.git synced 2024-11-27 02:21:46 +00:00
The-Modding-Tree/docs/basic-layer-breakdown.md

39 lines
1.9 KiB
Markdown
Raw Normal View History

2020-10-01 05:30:59 +00:00
# Basic layer breakdown
2021-06-14 05:37:12 +00:00
This is a relatively minimal layer with few features. Most things will require additional features.
```js
2020-10-26 20:45:22 +00:00
addLayer("p", {
startData() { return { // startData is a function that returns default data for a layer.
unlocked: true, // You can add more variables here to add them to your layer.
points: new Decimal(0), // "points" is the internal name for the main resource of the layer.
}},
color: "#4BDC13", // The color for this layer, which affects many elements.
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 amount of baseResource.
requires: new Decimal(10), // The amount of the base needed to gain 1 of the prestige currency.
// Also the amount required to unlock the layer.
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.
},
2021-06-14 05:37:12 +00:00
gainExp() { // Returns the exponent to your gain of the prestige resource.
2020-10-26 20:45:22 +00:00
return new Decimal(1)
},
2021-05-11 01:24:24 +00:00
layerShown() { return true }, // Returns a bool for if this layer's node should be visible in the tree.
upgrades: {
// Look in the upgrades docs to see what goes here!
},
2020-10-26 20:45:22 +00:00
})
```