import{_ase,casa,oast,daso}from"./app.1a35c4a8.js";constp=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('<h1id="the-modding-tree"tabindex="-1">The-Modding-Tree<aclass="header-anchor"href="#the-modding-tree"aria-hidden="true">#</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-hidden="true">#</a></h2><h3id="general"tabindex="-1">General<aclass="header-anchor"href="#general"aria-hidden="true">#</a></h3><ul><li><ahref="./getting-started">GettingStarted</a>:Gettingyourowncopyofthe