mirror of
https://github.com/Acamaeda/The-Modding-Tree.git
synced 2024-11-24 17:31:50 +00:00
Fixed some formatting issues in docs
This commit is contained in:
parent
857a423a58
commit
6d7e424fae
6 changed files with 12 additions and 63 deletions
|
@ -12,7 +12,7 @@ The Modding Tree uses break_eternity.js to store large values. This means that m
|
||||||
and must be treated differently.
|
and must be treated differently.
|
||||||
|
|
||||||
|
|
||||||
##Table of Contents:
|
## Table of Contents:
|
||||||
|
|
||||||
- [Basic layer breakdown](basic-layer-breakdown.md): Breaking down the components of a layer with minimal features.
|
- [Basic layer breakdown](basic-layer-breakdown.md): Breaking down the components of a layer with minimal features.
|
||||||
- [Layer features](layer-features.md): Explanations of all of the different properties that you can give a layer.
|
- [Layer features](layer-features.md): Explanations of all of the different properties that you can give a layer.
|
||||||
|
|
|
@ -2,8 +2,7 @@
|
||||||
|
|
||||||
This is a very minimal layer with minimal features. Most things will require additional features:
|
This is a very minimal layer with minimal features. Most things will require additional features:
|
||||||
|
|
||||||
``
|
``p: {
|
||||||
p: {
|
|
||||||
startData() { return { // startData is a function that returns default data for a layer.
|
startData() { return { // startData is a function that returns default data for a layer.
|
||||||
unl: false, // You can add more variables here to add them to your layer.
|
unl: false, // 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.
|
points: new Decimal(0), // "points" is the internal name for the main resource of the layer.
|
||||||
|
@ -31,5 +30,4 @@ p: {
|
||||||
},
|
},
|
||||||
|
|
||||||
layerShown() {return true}, // Returns a bool for if this layer's node should be visible in the tree.
|
layerShown() {return true}, // Returns a bool for if this layer's node should be visible in the tree.
|
||||||
},
|
}, ``
|
||||||
``
|
|
|
@ -5,7 +5,7 @@ the player can reset the purchases to get their currency back.
|
||||||
|
|
||||||
Buyables should be formatted like this:
|
Buyables should be formatted like this:
|
||||||
|
|
||||||
``buyables: {
|
`` buyables: {
|
||||||
rows: # of rows
|
rows: # of rows
|
||||||
cols: # of columns
|
cols: # of columns
|
||||||
respec() {}, **optional**, implement it to reset things and give back your currency.
|
respec() {}, **optional**, implement it to reset things and give back your currency.
|
||||||
|
@ -16,7 +16,7 @@ Buyables should be formatted like this:
|
||||||
etc
|
etc
|
||||||
}
|
}
|
||||||
etc
|
etc
|
||||||
}``
|
} ``
|
||||||
|
|
||||||
Features:
|
Features:
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
Custom tab layouts can be used to do basically anything in a tab window, especially combined with the "style" layer feature. The tabFormat feature is an array of things, like this:
|
Custom tab layouts can be used to do basically anything in a tab window, especially combined with the "style" layer feature. The tabFormat feature is an array of things, like this:
|
||||||
|
|
||||||
``tabFormat: ["main-display",
|
`` tabFormat: ["main-display",
|
||||||
["prestige-button", function(){return "Melt your points into "}],
|
["prestige-button", function(){return "Melt your points into "}],
|
||||||
["raw-html", function() {return "<button onclick='console.log(`yeet`)'>'HI'</button>"}],
|
["raw-html", function() {return "<button onclick='console.log(`yeet`)'>'HI'</button>"}],
|
||||||
["display-text",
|
["display-text",
|
||||||
|
@ -10,7 +10,7 @@ Custom tab layouts can be used to do basically anything in a tab window, especia
|
||||||
{"color": "red", "font-size": "32px", "font-family": "Comic Sans MS"}],
|
{"color": "red", "font-size": "32px", "font-family": "Comic Sans MS"}],
|
||||||
"blank",
|
"blank",
|
||||||
["toggle", ["c", "beep"]],
|
["toggle", ["c", "beep"]],
|
||||||
"milestones", "blank", "blank", "upgrades"]``
|
"milestones", "blank", "blank", "upgrades"] ``
|
||||||
|
|
||||||
It is a list of components, which can be either just a name, or an array with arguments. If it's an array, the first item is the name of the component, the second is the data passed into it, and the third (optional) is a CSS object,
|
It is a list of components, which can be either just a name, or an array with arguments. If it's an array, the first item is the name of the component, the second is the data passed into it, and the third (optional) is a CSS object,
|
||||||
which applies its style to the component.
|
which applies its style to the component.
|
||||||
|
|
|
@ -8,7 +8,7 @@ Key:
|
||||||
- **sometimes required**: This is may be required, depending on other things in the layer.
|
- **sometimes required**: This is may be required, depending on other things in the layer.
|
||||||
- **optional**: You can leave this out if you don't intend to use that feature for the layer.
|
- **optional**: You can leave this out if you don't intend to use that feature for the layer.
|
||||||
|
|
||||||
#Layer Definition features
|
# Layer Definition features
|
||||||
|
|
||||||
- startData(): A function to return the default save data for this layer. Add any variables you have to it.
|
- startData(): A function to return the default save data for this layer. Add any variables you have to it.
|
||||||
Any nonstandard Decimal variables need to be added to convertToDecimal as well.
|
Any nonstandard Decimal variables need to be added to convertToDecimal as well.
|
||||||
|
@ -48,7 +48,7 @@ Key:
|
||||||
- tabFormat: Use this if you want to add extra things to your tab or change the layout.
|
- tabFormat: Use this if you want to add extra things to your tab or change the layout.
|
||||||
|
|
||||||
|
|
||||||
#Big features
|
# Big features
|
||||||
|
|
||||||
- upgrades: A grid of one-time purchases which can have unique upgrade conditions, currency costs, and bonuses.
|
- upgrades: A grid of one-time purchases which can have unique upgrade conditions, currency costs, and bonuses.
|
||||||
[Explanations are in a separate file.](upgrades.md)
|
[Explanations are in a separate file.](upgrades.md)
|
||||||
|
@ -64,7 +64,7 @@ Key:
|
||||||
[Explanations are in a separate file.](buyables.md)
|
[Explanations are in a separate file.](buyables.md)
|
||||||
|
|
||||||
|
|
||||||
#Prestige formula features
|
# Prestige formula features
|
||||||
|
|
||||||
- baseResource: The name of the resource that determines how much of the main currency you gain on reset.
|
- baseResource: The name of the resource that determines how much of the main currency you gain on reset.
|
||||||
|
|
||||||
|
@ -96,7 +96,7 @@ Key:
|
||||||
Can be used to have secondary resource gain on prestige, or to recalculate things or whatnot.
|
Can be used to have secondary resource gain on prestige, or to recalculate things or whatnot.
|
||||||
|
|
||||||
|
|
||||||
#Other features
|
# Other features
|
||||||
|
|
||||||
- doReset(resettingLayer): **optional**, is triggered when a layer on a row greater than or equal to this one does a reset.
|
- doReset(resettingLayer): **optional**, is triggered when a layer on a row greater than or equal to this one does a reset.
|
||||||
If you use it, you can choose what to keep via milestones and such.
|
If you use it, you can choose what to keep via milestones and such.
|
||||||
|
|
|
@ -23,53 +23,4 @@ Milestone features:
|
||||||
The toggles can toggle a given boolean value in a layer.
|
The toggles can toggle a given boolean value in a layer.
|
||||||
It is defined as an array of paired items, one pair per toggle. The first is the internal name of the layer
|
It is defined as an array of paired items, one pair per toggle. The first is the internal name of the layer
|
||||||
the value being toggled is stored in, and the second is the internal name of the variable to toggle.
|
the value being toggled is stored in, and the second is the internal name of the variable to toggle.
|
||||||
(e.g. [["b", "auto"], ["g", "auto"])
|
(e.g. [["b", "auto"], ["g", "auto"])
|
||||||
|
|
||||||
#Challenges
|
|
||||||
|
|
||||||
Challenges are stored in the following format:
|
|
||||||
|
|
||||||
```challs: {
|
|
||||||
rows: # of rows
|
|
||||||
cols: # of columns
|
|
||||||
11: {
|
|
||||||
name: "Ouch",
|
|
||||||
etc
|
|
||||||
}
|
|
||||||
etc
|
|
||||||
}```
|
|
||||||
|
|
||||||
You can use inChall(layer, id) and hasChall(layer, id) to determine if the player is currently in a challenge,
|
|
||||||
or has completed the challenge, respectively. These are useful for implementing effects.
|
|
||||||
|
|
||||||
Each challenge should have an id where the first digit is the row and the second digit is the column.
|
|
||||||
Individual upgrades can have these features:
|
|
||||||
|
|
||||||
- name: Name of the challenge
|
|
||||||
|
|
||||||
- desc: A description of what makes the challenge a challenge. *You will need to implement these elsewhere*
|
|
||||||
|
|
||||||
- reward: A description of the reward's effect. *You will also have to implement the effect where it is applied.*
|
|
||||||
|
|
||||||
- effect(): **optional**, A function that calculates and returns the current values of any bonuses from the reward.
|
|
||||||
Can return a value or an object containing multiple values.
|
|
||||||
|
|
||||||
- effectDisp(effects): **optional**, A function that returns a display of the current effects of the reward with
|
|
||||||
formatting. Default behavior is to just display the a number appropriately formatted.
|
|
||||||
|
|
||||||
- goal: A Decimal for the cost of the upgrade. By default, the goal is in basic Points.
|
|
||||||
|
|
||||||
- unl(): A function returning a bool to determine if the challenge is unlocked or not.
|
|
||||||
|
|
||||||
- onComplete() - **optional**, this function will be called when the challenge is completed when previously incomplete.
|
|
||||||
|
|
||||||
- countsAs: **optional**, If a challenge combines the effects of other challenges in this layer, you can use this.
|
|
||||||
An array of challenge ids. The player is effectively in all of those challenges when in the current one.
|
|
||||||
|
|
||||||
By default, challenges use basic Points for the goal. You can change that using these features.
|
|
||||||
- currencyDisplayName: **optional**, the name to display for the currency for the goal
|
|
||||||
- currencyInternalName: **optional**, the internal name for that currency
|
|
||||||
- currencyLayer: **optional**, the internal name of the layer that currency is stored in.
|
|
||||||
If it's part of a layer, omit.
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue