From 6d7e424faed458cab0dbfe8b228b9e430c2cf645 Mon Sep 17 00:00:00 2001 From: Acamaeda Date: Thu, 1 Oct 2020 01:35:14 -0400 Subject: [PATCH] Fixed some formatting issues in docs --- docs/!general-info.md | 2 +- docs/basic-layer-breakdown.md | 6 ++--- docs/buyables.md | 4 +-- docs/custom-tab-layouts.md | 4 +-- docs/layer-features.md | 8 +++--- docs/milestones.md | 51 +---------------------------------- 6 files changed, 12 insertions(+), 63 deletions(-) diff --git a/docs/!general-info.md b/docs/!general-info.md index a7419e1..3e72637 100644 --- a/docs/!general-info.md +++ b/docs/!general-info.md @@ -12,7 +12,7 @@ The Modding Tree uses break_eternity.js to store large values. This means that m 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. - [Layer features](layer-features.md): Explanations of all of the different properties that you can give a layer. diff --git a/docs/basic-layer-breakdown.md b/docs/basic-layer-breakdown.md index 9854146..cd62249 100644 --- a/docs/basic-layer-breakdown.md +++ b/docs/basic-layer-breakdown.md @@ -2,8 +2,7 @@ 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. 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. @@ -31,5 +30,4 @@ p: { }, layerShown() {return true}, // Returns a bool for if this layer's node should be visible in the tree. - }, -`` \ No newline at end of file + }, `` \ No newline at end of file diff --git a/docs/buyables.md b/docs/buyables.md index 9d30425..d85ae36 100644 --- a/docs/buyables.md +++ b/docs/buyables.md @@ -5,7 +5,7 @@ the player can reset the purchases to get their currency back. Buyables should be formatted like this: -``buyables: { +`` buyables: { rows: # of rows cols: # of columns respec() {}, **optional**, implement it to reset things and give back your currency. @@ -16,7 +16,7 @@ Buyables should be formatted like this: etc } etc -}`` +} `` Features: diff --git a/docs/custom-tab-layouts.md b/docs/custom-tab-layouts.md index 99fb50b..09e0c47 100644 --- a/docs/custom-tab-layouts.md +++ b/docs/custom-tab-layouts.md @@ -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: -``tabFormat: ["main-display", +`` tabFormat: ["main-display", ["prestige-button", function(){return "Melt your points into "}], ["raw-html", function() {return ""}], ["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"}], "blank", ["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, which applies its style to the component. diff --git a/docs/layer-features.md b/docs/layer-features.md index 16013a0..937730e 100644 --- a/docs/layer-features.md +++ b/docs/layer-features.md @@ -8,7 +8,7 @@ Key: - **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. -#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. 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. -#Big features +# Big features - 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) @@ -64,7 +64,7 @@ Key: [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. @@ -96,7 +96,7 @@ Key: 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. If you use it, you can choose what to keep via milestones and such. diff --git a/docs/milestones.md b/docs/milestones.md index 107b3ef..4c128e6 100644 --- a/docs/milestones.md +++ b/docs/milestones.md @@ -23,53 +23,4 @@ Milestone features: 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 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"]) - -#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. - - + (e.g. [["b", "auto"], ["g", "auto"]) \ No newline at end of file