1
0
Fork 0
mirror of https://github.com/Acamaeda/The-Modding-Tree.git synced 2024-11-22 00:21:32 +00:00

Update README.md

This commit is contained in:
Harley White 2020-09-24 19:32:24 -04:00 committed by GitHub
parent 46447e4caf
commit 1115a84d3e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -6,9 +6,18 @@ You still need to add nodes to the tree in the HTML, add hotkeys, and do any non
Layer features! In no particular order Layer features! In no particular order
~~~~~~Defining features~~~~~~ -----Layer-defining features-----
startData: An object containing the default values for any saved data in this layer, including resources, toggles, upgrades, and more. startData() - Returns an object containing the default values for any saved data in this layer, including resources, toggles, upgrades, and more.
Required:
unl: a bool determining if it is unlocked or not
points: a Decimal, the main currency for the layer
Useful:
total: A decimal, tracks total amount of main currency
best: A decimal, tracks highest amount of main currency
order: used to keep track of relevant layers unlocked before this one.
upgrades, milestones, challs: Empty arrays. Needed if you are using the corresponding feature in this layer
color: A color associated with this layer, used in many places. (A string in hex format with a #) color: A color associated with this layer, used in many places. (A string in hex format with a #)
@ -20,8 +29,7 @@ effect() - Optional, returns the current strength of any effects derived from th
effectDescription() - Optional, returns a description of the effect this layer has effectDescription() - Optional, returns a description of the effect this layer has
-----Prestige formula features-----
~~~~~~Prestige formula features~~~~~~
baseResource: The resource that determines how much of the main currency you gain on reset. baseResource: The resource that determines how much of the main currency you gain on reset.
@ -41,3 +49,30 @@ canBuyMax() - Only needed for static layers, used to determine if buying max is
gainMult(), gainExp() - Used to determine the multiplier and exponent on resource gain from upgrades and boosts and such. Plug all of them in here. gainMult(), gainExp() - Used to determine the multiplier and exponent on resource gain from upgrades and boosts and such. Plug all of them in here.
onPrestige(gain) - Optional, Triggers when this layer prestiges, just before you gain the currency. Can be used to have secondary resource gain on prestige, or to recalculate things or whatnot.
-----Other features-----
doReset(resettingLayer) - Optional, is triggered when a layer on a row greater than or equal to this one. If you use it, you can choose what to keep via milestones and such. Without it, the default is to reset everything on the row, but only if it was triggered by a higher layer.
convertToDecimal() - Only needed if you have non-standard Decimal values in startData, to these values from strings to Decimals after loading.
layerShown() - Returns a bool determining if this layer's node should be visible on the tree.
update(diff) - Optional, part of the main loop, use it for any passive resource production or time-based things. diff is the time since the last update.
automate() - Optional, use it to activate any autobuyers or auto-resets or similar on this layer, if appropriate.
updateTemp() - Optional, use it to update anything in the "temp" object.
resetsNothing() - Optional, returns true if this layer shouldn't trigger any resets.
incr_order: Optional, an array of layer names, their order will increase by 1 when this one is first unlocked. Can be empty.
branches: Optional, an array of pairs consisting of a layer name and a number from 1 to 3. When this layer is visible, for each pair, there will be a branch from this layer to the other layer with a color determined by the number.
-----Upgrades-----
-----Milestones-----
-----Challenges-----