import{_ase,casa,oast,a9aso}from"./chunks/framework.D8PMdl4T.js";consty=JSON.parse('{"title":"The-Modding-Tree","description":"","frontmatter":{},"headers":[],"relativePath":"public/lit/docs/!general-info.md","filePath":"public/lit/docs/!general-info.md","lastUpdated":1604787966000}'),n={name:"public/lit/docs/!general-info.md"},r=o('<h1id="the-modding-tree"tabindex="-1">The-Modding-Tree<aclass="header-anchor"href="#the-modding-tree"aria-label="Permalink to "The-Modding-Tree""></a></h1><p>Themainwaytoaddcontentisthroughcreatinglayers.Youcaneitheraddalayerdirectlyinthelayersobjectin<ahref="/js/layerSupport.js">layerSupport.js</a>,ordeclareitinanotherfileandregisteritbycalling<code>addLayer(layername,layerdata)</code>.Thereisanexamplelayerregistrationin<ahref="/js/layers.js">layers.js</a>showingtherecommendedmethod.Itisjustanexampleandcanbefreelydeleted.Youcanalsouseitasareferenceorabaseforyourownlayers.</p><p>ThefirstthingyouneedtodoisfilloutthemodInfoobjectatthetopof<ahref="/js/mod.js">mod.js</a>tosetyourmod'sname,ID(astring),andotherinformation.AuniquemodIdwillpreventyourmod'ssavesfromconflictingwithothermods.Notethatchangingthisafterpeoplehavestartedplayingwillresettheirsaves.</p><p>Mostofthetime,youwon'tneedtodivedeepintothecodetocreatethings,butyoustillcanifyoureallywantto,forexampletoaddnewVuecomponentsin<ahref="/js/v.js">v.js</a>.</p><p>TheModdingTreeuses<ahref="https://github.com/Patashu/break_eternity.js"target="_blank"rel="noreferrer">break_eternity.js</a>tostorelargevalues.Thismeansthatmanynumbersare<code>Decimal</code>objects,andmustbetreateddifferently.Forexample,youhavetouse<code>newDecimal(x)</code>tocreatea<code>Decimal</code>valueinsteadofaplainnumber,andperformoperationsonthembycallingfunctions.e.g,insteadof<code>x=x+y</code>,use<code>x=x.add(y)</code>.Keepinmindthisalsoappliestocomparisonoperators,whichshouldbereplacedwithcallingthe<code>.gt</code>,<code>.gte</code>,<code>.lt</code>,<code>.lte</code>,<code>.eq</code>,and<code>.neq</code>functions.Seethe<ahref="https://github.com/Patashu/break_eternity.js"target="_blank"rel="noreferrer">break_eternity.js</a>docsformoredetailsonworkingwith<code>Decimal</code>values.</p><p>Almostallvaluescanbeeitheraconstantvalue,oradynamicvalue.Dynamicvaluesaredefinedbyputtingafunctionthatreturnswhatthevalueshouldbeatanygiventime.</p><p>AlldisplaytextcanusebasicHTMLelements(Butyoucan'tusemostVuefeaturesthere).</p><p>Whilereadingthisdocumentation,thefollowingkeywillbeusedwhendescribingfeatures:</p><ul><li>Nolabel:Thisisrequiredandthegamemaycrashifitisn'tincluded.</li><li><strong>sometimesrequired</strong>:Thisismayberequired,dependingonotherthingsinthelayer.</li><li><strong>optional</strong>:Youcanleavethisoutifyoudon'tintendtousethatfeatureforthelayer.</li><li><strong>assignedautomagically</strong>:Thisvaluewillbesetautomaticallyandoverrideanyvalueyouset.</li><li><strong>deprecated</strong>:Thisfeatureisnotrecommendedtobeusedanymore,andmayberemovedinfutureversionsofTMT.</li></ul><h2id="table-of-contents"tabindex="-1">TableofContents<aclass="header-anchor"href="#table-of-contents"aria-label="Permalinkto"TableofContents""></a></h2><h3id="general"tabindex="-1">General<aclass="header-anchor"href="#general"aria-label="Permalinkto"General""></a></h3><ul><li><ahref="./getting-started">GettingStarted</a>:GettingyourowncopyofthecodesetupwithGithubDesktop.</li><li><ahref="./main-mod-info">Mainmodinfo</a>:Howtosetupgeneralthingsforyourmodin<ahref="/js/mod.js">mod.js</a>.</li><li><ahref="./basic-layer-breakdown">Basiclayerbreakdown</a>:Breakingdownthecomponentsof