Treescript
Jump to navigation
Jump to search
Treescript is a language created by User:TJC games. It is an unholy combination of JavaScript, Python, and Lua, made for an incredibly niche modding API for a random idle game made by an 8-year-old somewhere.
Basic information
In treescript, most things are methods, variables, or functions. Methods are used with
method args: contents
. Variables are assigned with standard JSON definitions, but Break_Eternity.js is prioritised over standard JS numbers.
Step-by-step creation
Base layer
Every tree needs layers, defined with the layer macro:
layer p: format: symbol: P colour: #38ac34 position: 0,0 data: layerShown: () return true pointName: prestige points name: prestige prestige: type: normal requires: 10 exponent: 0.5 saved: points: 0 hotkeys: p: description: P: Reset for prestige points function: () if canReset p then doReset p
Everything here expect hotkeys and prestige is required. If prestige is missing, it assumes that you cannot reset on this layer.