import{_ as e,c as a,o as t,d as o}from"./app.f001dff6.js";const p=JSON.parse('{"title":"The-Modding-Tree","description":"","frontmatter":{},"headers":[{"level":2,"title":"Table of Contents","slug":"table-of-contents","link":"#table-of-contents","children":[{"level":3,"title":"General","slug":"general","link":"#general","children":[]},{"level":3,"title":"Common components","slug":"common-components","link":"#common-components","children":[]},{"level":3,"title":"Other components and features","slug":"other-components-and-features","link":"#other-components-and-features","children":[]}]}],"relativePath":"public/lit/docs/!general-info.md","lastUpdated":null}'),n={name:"public/lit/docs/!general-info.md"},r=o('

The-Modding-Tree

The main way to add content is through creating layers. You can either add a layer directly in the layers object in layerSupport.js, or declare it in another file and register it by calling addLayer(layername, layerdata). There is an example layer registration in layers.js showing the recommended method. It is just an example and can be freely deleted. You can also use it as a reference or a base for your own layers.

The first thing you need to do is fill out the modInfo object at the top of mod.js to set your mod's name, ID (a string), and other information. A unique modId will prevent your mod's saves from conflicting with other mods. Note that changing this after people have started playing will reset their saves.

Most of the time, you won't need to dive deep into the code to create things, but you still can if you really want to, for example to add new Vue components in v.js.

The Modding Tree uses break_eternity.js to store large values. This means that many numbers are Decimal objects, and must be treated differently. For example, you have to use new Decimal(x) to create a Decimal value instead of a plain number, and perform operations on them by calling functions. e.g, instead of x = x + y, use x = x.add(y). Keep in mind this also applies to comparison operators, which should be replaced with calling the .gt, .gte, .lt, .lte, .eq, and .neq functions. See the break_eternity.js docs for more details on working with Decimal values.

Almost all values can be either a constant value, or a dynamic value. Dynamic values are defined by putting a function that returns what the value should be at any given time.

All display text can use basic HTML elements (But you can't use most Vue features there).

While reading this documentation, the following key will be used when describing features:

Table of Contents

General

Common components

Other components and features

',16),i=[r];function s(l,d,h,c,u,m){return t(),a("div",null,i)}const y=e(n,[["render",s]]);export{p as __pageData,y as default};