mirror of
https://github.com/Acamaeda/The-Modding-Tree.git
synced 2024-11-22 00:21:32 +00:00
Updated docs, made layer type default to none
This commit is contained in:
parent
d94b225a6f
commit
9a4302b56a
8 changed files with 60 additions and 12 deletions
|
@ -1,5 +1,7 @@
|
|||
# The Modding Tree changelog:
|
||||
|
||||
- Added an infobox component. Thank you to thepaperpilot for this contribution!
|
||||
- Layer type is now optional, and defaults to "none".
|
||||
- Fixed the "blank" component breaking if only specifying the height.
|
||||
- Fixed some numbers not displaying with enough digits.
|
||||
- Made a few more things able to be functions.
|
||||
|
|
|
@ -22,23 +22,32 @@ that returns what the value should be at any given time.
|
|||
|
||||
All display text can be basic HTML instead (But you can't use most Vue features there).
|
||||
|
||||
## Table of Contents:
|
||||
# Table of Contents:
|
||||
|
||||
## General:
|
||||
|
||||
- [Getting Started](getting-started.md): Getting your own copy of the code set up with Github Desktop.
|
||||
- [Main mod info](main-mod-info.md): How to set up general things for your mod in mod.js.
|
||||
- [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.
|
||||
- [Custom Tab Layouts](custom-tab-layouts.md): An optional way to give your tabs a different layout.
|
||||
You can even create entirely new components to use.
|
||||
- [Updating TMT](updating-tmt.md): Using Github Desktop to update your mod's version of TMT.
|
||||
|
||||
## Common components
|
||||
|
||||
- [Upgrades](upgrades.md): How to create upgrades for a layer.
|
||||
- [Milestones](milestones.md): How to create milestones for a layer.
|
||||
- [Challenges](challenges.md): How to create challenges for a layer.
|
||||
- [Buyables](buyables.md): Create rebuyable upgrades for your layer (with the option to make them respec-able).
|
||||
Can be used to make Enhancers or Space Buildings.
|
||||
- [Clickables](clickables.md): A more generalized variant of buyables, for any kind of thing that is sometimes clickable.
|
||||
Between these and Buyables, you can do just about anything.
|
||||
|
||||
## Other components
|
||||
|
||||
- [Challenges](challenges.md): How to create challenges for a layer.
|
||||
- [Bars](bars.md): Display some information as a progress bar, gague, or similar. They are highly customizable,
|
||||
and can be horizontal and vertical as well.
|
||||
- [Custom Tab Layouts](custom-tab-layouts.md): An optional way to give your tabs a different layout.
|
||||
You can even create entirely new components to use.
|
||||
- [Subtabs and Microtabs](subtabs-and-microtabs.md): Create subtabs for your tabs, as well as "microtab" components that you can put inside the tabs.
|
||||
- [Achievements](milestones.md): How to create achievements for a layer (or for the whole game).
|
||||
- [Updating TMT](updating-tmt.md): Using Github Desktop to update your mod's version of TMT.
|
||||
- [Infoboxes](infoboxes.md): Boxes containing text that can be shown or hidden.
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# Buyables
|
||||
# Bars
|
||||
|
||||
Bars let you display information in a more direct way. It can be a progress bar, health bar, capacity gague, or anything else.
|
||||
|
||||
|
@ -26,7 +26,7 @@ Features:
|
|||
|
||||
- display(): **optional**, A function that returns text to be displayed on top of the bar, can use HTML.
|
||||
|
||||
- unlocked(): **optional**, A function returning a bool to determine if the buyable is visible or not. Default is unlocked.
|
||||
- unlocked(): **optional**, A function returning a bool to determine if the bar is visible or not. Default is unlocked.
|
||||
|
||||
- baseStyle, fillStyle, borderStyle, textStyle: **Optional**, Apply CSS to the unfilled portion, filled portion, border, and
|
||||
display text on the bar, in the form of an object where the keys are CSS attributes, and the values are the
|
||||
|
|
|
@ -2,6 +2,8 @@
|
|||
|
||||
Clickables are any kind of thing that you can click for an effect. They're a more generalized version of Buyables.
|
||||
|
||||
DO NOT USE THESE TO MAKE THINGS THAT YOU CLICK REPEATEDLY FOR A BONUS BECAUSE THOSE ARE AWFUL.
|
||||
|
||||
There are several differences between the two. One is that a buyable's saved data is its amount as a Decimal, while
|
||||
Clickables store a "state" which can be a number or string, but not Decimal, array, or object).
|
||||
Buyables have a number of extra features which you can see on their page.
|
||||
|
|
34
docs/infoboxes.md
Normal file
34
docs/infoboxes.md
Normal file
|
@ -0,0 +1,34 @@
|
|||
# Infoboxes
|
||||
|
||||
Infoboxes are good for displaying "lore", or story elements, as well as for explaining complicated things.
|
||||
|
||||
In the default tab layout, the first infobox will be displayed at the very top of the tab.
|
||||
|
||||
Infoboxes are defined like other Big Features:
|
||||
|
||||
```js
|
||||
infoboxes: {
|
||||
infobox: {
|
||||
display() {return "Blah"},
|
||||
etc
|
||||
}
|
||||
etc
|
||||
}
|
||||
```
|
||||
|
||||
Features:
|
||||
|
||||
- title: The text displayed above the main box. Can be a function to be dynamic, and can use basic HTML.
|
||||
|
||||
- body: The text displayed inside the box. Can be a function to be dynamic, and can use basic HTML.
|
||||
|
||||
- style, titleStyle, bodyStyle: **Optional**, Apply CSS to the infobox, or to the title button or body of the infobox,
|
||||
in the form of an object where the keys are CSS attributes, and the values are the Values for
|
||||
those attributes (both as strings).
|
||||
|
||||
- unlocked(): **optional**, A function returning a bool to determine if the infobox is visible or not. Default is unlocked.
|
||||
|
||||
- layer: **Assigned automagically**. It's the same value as the name of this layer, so you can do player[this.layer].points or similar
|
||||
|
||||
- id: **Assigned automagically**. It's the "key" which the bar was stored under, for convenient access.
|
||||
The bar in the example's id is "bigBar".
|
|
@ -46,8 +46,6 @@ Key:
|
|||
- effectDescription: **optional**, A function that returns a description of this effect.
|
||||
If the text stays constant, it can just be a string.
|
||||
|
||||
- lore: **optional**, Displays some text (can use basic HTML) in a box at the top of the layer tab, unless the player has hidden the lore in the settings.
|
||||
|
||||
- layerShown(): A function returning a bool which determines if this layer's node should be visible on the tree.
|
||||
It can also return "ghost", which will hide the layer, but its node will still take up space in the tree.
|
||||
|
||||
|
@ -96,10 +94,13 @@ Key:
|
|||
- achievements: Kind of like milestones, but with a different display style and some other differences. Extra features are on the way at a later date!
|
||||
[Explanations are in a separate file.](achievements.md)
|
||||
|
||||
- infoboxes: Displays some text in a box that can be shown or hidden.
|
||||
[Explanations are in a separate file.](infoboxes.md)
|
||||
|
||||
|
||||
## Prestige formula features
|
||||
|
||||
- type: Determines which prestige formula you use.
|
||||
- type: **optional**, Determines which prestige formula you use. Defaults to "none".
|
||||
"normal": The amount of currency you gain is independent of its current amount (like Prestige).
|
||||
formula before bonuses is based on `baseResource^exponent`
|
||||
"static": The cost is dependent on your total after reset.
|
||||
|
|
|
@ -468,7 +468,7 @@ addLayer("f", {
|
|||
},
|
||||
)
|
||||
|
||||
// A side layer with achievements
|
||||
// A side layer with achievements, with no prestige
|
||||
addLayer("a", {
|
||||
startData() { return {
|
||||
unlocked: true,
|
||||
|
@ -476,7 +476,6 @@ addLayer("a", {
|
|||
}},
|
||||
color: "yellow",
|
||||
resource: "achievement power",
|
||||
type: "none",
|
||||
row: "side",
|
||||
layerShown() {return true},
|
||||
tooltip() { // Optional, tooltip displays when the layer is locked
|
||||
|
|
|
@ -126,6 +126,7 @@ function updateLayers(){
|
|||
if(layers[layer].unlockOrder === undefined) layers[layer].unlockOrder = []
|
||||
if(layers[layer].gainMult === undefined) layers[layer].gainMult = new Decimal(1)
|
||||
if(layers[layer].gainExp === undefined) layers[layer].gainExp = new Decimal(1)
|
||||
if(layers[layer].type === undefined) layers[layer].type = "none"
|
||||
|
||||
let row = layers[layer].row
|
||||
if(!ROW_LAYERS[row]) ROW_LAYERS[row] = {}
|
||||
|
|
Loading…
Reference in a new issue