mirror of
https://github.com/Acamaeda/The-Modding-Tree.git
synced 2025-05-13 21:31:10 +00:00
The rest of 1.3.1
This commit is contained in:
parent
d6eeb9b50b
commit
d0e657bc5b
15 changed files with 287 additions and 142 deletions
|
@ -2,7 +2,7 @@
|
|||
|
||||
This is a very minimal layer with minimal features. Most things will require additional features.
|
||||
If you're curious about "() =>", it's a weird notation that lets you use either a value or function in the same slot,
|
||||
and treats it like a function. If you're using an actual function there, you can replace it with the normal notation.
|
||||
and treats it like a function. You can use it to make actual functions, but it breaks things then.
|
||||
|
||||
```js
|
||||
p: {
|
||||
|
|
|
@ -33,7 +33,7 @@ Features:
|
|||
for having x of this buyable. Can return a value or an object containing multiple values.
|
||||
|
||||
- display(): A function returning everything that should be displayed on the rebuyable after the title, likely
|
||||
including the description, amount bought, cost, and current effect.
|
||||
including the description, amount bought, cost, and current effect. Can use basic HTML.
|
||||
|
||||
- unl(): A function returning a bool to determine if the buyable is visible or not.
|
||||
|
||||
|
@ -43,6 +43,8 @@ Features:
|
|||
|
||||
- buyMax(): **optional**, A function that implements buying as many of the buyable as possible.
|
||||
|
||||
- style(): **Optional**, A function returning a CSS object, which affects this buyable.
|
||||
|
||||
- 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 id for this buyable.
|
|
@ -24,16 +24,16 @@ Challenges are stored in the following format:
|
|||
Each challenge should have an id where the first digit is the row and the second digit is the column.
|
||||
Individual Challenges can have these features:
|
||||
|
||||
- name: Name of the challenge, can be a string or a function
|
||||
- name: Name of the challenge, can be a string or a function. Can use basic HTML.
|
||||
|
||||
- desc: A description of what makes the challenge a challenge. *You will need to implement these elsewhere*
|
||||
It can also be a function that returns updating text.
|
||||
It can also be a function that returns updating text. Can use basic HTML.
|
||||
|
||||
- reward: A description of the reward's effect. *You will also have to implement the effect where it is applied.*
|
||||
It can also be a function that returns updating text.
|
||||
It can also be a function that returns updating text. Can use basic HTML.
|
||||
|
||||
- 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.
|
||||
Can return a value or an object containing multiple values. Can use basic HTML.
|
||||
|
||||
- effectDisplay(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.
|
||||
|
@ -54,6 +54,7 @@ By default, challenges use basic Points for the goal. You can change that using
|
|||
- currencyLayer: **optional**, the internal name of the layer that currency is stored in.
|
||||
If it's part of a layer, omit.
|
||||
|
||||
- style(): **Optional**, A function returning a CSS object, which affects this challenge.
|
||||
|
||||
- layer: **Assigned automagically**. It's the same value as the name of this layer, so you can do player[this.layer].points or similar
|
||||
|
||||
|
|
|
@ -51,13 +51,7 @@ Key:
|
|||
],
|
||||
```
|
||||
|
||||
- branches: **optional**, determines what lines should appear on the tree when this layer is visible.
|
||||
An array of pairs consisting of a layer name and a number from 1 to 3.
|
||||
A branch will appear connecting this layer to the correspodnding layer, with the color based on the number.
|
||||
You should add the branch value to the layer that is unlocked second.
|
||||
|
||||
- style: A CSS object containing any CSS that should affect this layer's whole tab.
|
||||
Can also be a function returning a dynamic CSS object.
|
||||
- style(): A function returning a CSS object containing any CSS that should affect this layer's whole tab.
|
||||
|
||||
- tabFormat: Use this if you want to add extra things to your tab or change the layout.
|
||||
|
||||
|
@ -81,7 +75,6 @@ Key:
|
|||
[Explanations are in a separate file.](subtabs-and-microtabs.md)
|
||||
|
||||
|
||||
(subtabs-and-microtabs.md):
|
||||
# Prestige formula features
|
||||
|
||||
- baseResource: The name of the resource that determines how much of the main currency you gain on reset.
|
||||
|
@ -115,6 +108,19 @@ Key:
|
|||
Can be used to have secondary resource gain on prestige, or to recalculate things or whatnot.
|
||||
|
||||
|
||||
# Tree/node features
|
||||
|
||||
- branches: **optional**, determines what lines should appear on the tree when this layer is visible.
|
||||
An array of pairs consisting of a layer name and a number from 1 to 3.
|
||||
A branch will appear connecting this layer to the correspodnding layer, with the color based on the number.
|
||||
You should add the branch value to the layer that is unlocked second.
|
||||
|
||||
- nodeStyle(): **optional**, a function returning a CSS object, styles this layer's node on the tree
|
||||
|
||||
- tooltip() / tooltipLocked(): **optional** Functions that return text, which is the tooltip for the node when the layer
|
||||
is unlocked or locked, respectively. By default the tooltips behave the same as in the original Prestige Tree.
|
||||
|
||||
|
||||
# Other features
|
||||
|
||||
- doReset(resettingLayer): **optional**, is triggered when a layer on a row greater than or equal to this one does a reset.
|
||||
|
@ -147,6 +153,16 @@ Key:
|
|||
- should_notify: **optional**, a function to return true if this layer should be highlighted in the tree.
|
||||
The layer will automatically be highlighted if you can buy an upgrade whether you have this or not.
|
||||
|
||||
- componentStyles: **optional**, An object that contains a set of functions returning CSS objects.
|
||||
Each of these will be applied to any components on the layer with the type of its id. Example:
|
||||
|
||||
```js
|
||||
componentStyles: {
|
||||
"chall"() {return {'height': '200px'}},
|
||||
"prestige-button"() {return {'color': '#AA66AA'}},
|
||||
},
|
||||
```
|
||||
|
||||
|
||||
# Custom Prestige type only
|
||||
(No effect otherwise)
|
||||
|
|
|
@ -16,10 +16,10 @@ You can use hasMilestone(layer, id) to determine if the player has a given miles
|
|||
Milestone features:
|
||||
|
||||
- requirementDesc: A string describing the requirement for unlocking this milestone. Suggestion: Use a "total".
|
||||
It can also be a function that returns updating text.
|
||||
It can also be a function that returns updating text. Can use basic HTML.
|
||||
|
||||
- effectDesc: A string describing the reward for having the milestone. *You will have to implement the reward elsewhere.*
|
||||
It can also be a function that returns updating text.
|
||||
It can also be a function that returns updating text. Can use basic HTML.
|
||||
|
||||
- done(): A function returning a boolean to determine if the milestone has been fulfilled.
|
||||
|
||||
|
@ -31,6 +31,10 @@ Milestone features:
|
|||
|
||||
**Tip:** Toggles are not de-set if the milestone becomes locked! In this case, you should also check if the player has the milestone.
|
||||
|
||||
- style(): **Optional**, A function returning a CSS object, which affects this milestone.
|
||||
|
||||
- unl(): A function returning a boolean to determine if the milestone should be shown. If absent, it is always shown.
|
||||
|
||||
- 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 id for this milestone.
|
||||
|
|
|
@ -44,9 +44,9 @@ Normal subtabs and microtab subtabs both use the same features:
|
|||
|
||||
- content: The tab layout code for the subtab, in [the tab layout format](custom-tab-layouts.md)
|
||||
|
||||
- style: **Optional**, A CSS object or function returning a CSS object, which affects the CSS when in that subtab.
|
||||
- style(: **Optional**, A function returning a CSS object, which affects the CSS when in that subtab.
|
||||
|
||||
- buttonStyle: **Optional**, A CSS object or function returning that CSS object, which affects the appearance of the button for that subtab.
|
||||
- buttonStyle(): **Optional**, A function returning a CSS object, which affects the appearance of the button for that subtab.
|
||||
|
||||
- unl(): **Optional**, a function to determine if the button for this subtab should be visible. By default, a subtab is always unlocked.
|
||||
(You can't use the "this" keyword in this function.)
|
|
@ -26,16 +26,16 @@ Each upgrade should have an id where the first digit is the row and the second d
|
|||
Individual upgrades can have these features:
|
||||
|
||||
- title: **optional**, displayed at the top in a larger font
|
||||
It can also be a function that returns updating text.
|
||||
It can also be a function that returns updating text. Can use basic HTML.
|
||||
|
||||
- desc: A description of the upgrade's effect. *You will also have to implement the effect where it is applied.*
|
||||
It can also be a function that returns updating text.
|
||||
It can also be a function that returns updating text. Can use basic HTML.
|
||||
|
||||
- effect(): **optional**, A function that calculates and returns the current values of any bonuses from the upgrade.
|
||||
Can return a value or an object containing multiple values.
|
||||
|
||||
- effectDisplay(effects): **optional**, A function that returns a display of the current effects of the upgrade with
|
||||
formatting. Default behavior is to just display the a number appropriately formatted.
|
||||
formatting. Default behavior is to just display the a number appropriately formatted. Can use basic HTML.
|
||||
|
||||
- cost: A Decimal for the cost of the upgrade. By default, upgrades cost the main prestige currency for the layer.
|
||||
|
||||
|
@ -50,6 +50,8 @@ By default, upgrades use the main prestige currency for the layer. You can inclu
|
|||
- currencyLayer: **optional**, the internal name of the layer that currency is stored in.
|
||||
If it's not in a layer (like Points), omit.
|
||||
|
||||
- style(): **Optional**, A function returning a CSS object, which affects this upgrade.
|
||||
|
||||
- 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 id for this upgrade.
|
Loading…
Add table
Add a link
Reference in a new issue