import{_ase,oasa,cast,Qaso}from"./chunks/framework.1169fbc9.js";constb=JSON.parse('{"title":"The-Modding-Tree","description":"","frontmatter":{},"headers":[],"relativePath":"public/gamedevtree/docs/!general-info.md","filePath":"public/gamedevtree/docs/!general-info.md","lastUpdated":1701137241000}'),n={name:"public/gamedevtree/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.YoucaneitheraddalayerdirectlyinthelayersobjectinlayersSupportjs,ordeclareitinanotherfileandthendo"<code>addLayer(layername,layerdata)</code>"(goodforbreakingthingsupintosmallerfiles).Theexistinglayersarejustexamplesandcanbefreelydeleted.Youcanalsousethemasreferencesandabaseforyourownlayers.</p><p>ThefirstthingyouneedtodoistoeditthemodInfoatthetopofgame.jstosetyourmodID(astring).AuniquemodIdwillpreventyourmod'ssavesfromconflictingwithothermods.</p><p>Mostofthetime,youwon'tneedtodivedeepintothecodetocreatethings,butyoustillcanifyoureallywantto.</p><p>TheModdingTreeusesbreak_eternity.jstostorelargevalues.ThismeansthatmanynumbersareDecimalobjects,andmustbetreateddifferently.Forexample,youhavetouse<code>newDecimal(x)</code>tocreateaDecimalvalueinsteadofaplainnumber,andperformoperationsonthembycallingfunctions.e.g,insteadof<code>x=x+y</code>,use<code>x=x.add(y)</code>.</p><p>Almostallvaluescanbeeitheraconstantvalue,oradynamicvalue.Dynamicvaluesaredefinedbyputtingafunctionthatreturnswhatthevalueshouldbeatanygiventime.</p><p>AlldisplaytextcanbebasicHTMLinstead(Butyoucan'tusemostVuefeaturesthere).</p><h1id="table-of-contents"tabindex="-1">TableofContents:<aclass="header-anchor"href="#table-of-contents"aria-label="Permalinkto"TableofContents:""></a></h1><h2id="general"tabindex="-1">General:<aclass="header-anchor"href="#general"aria-label="Permalinkto"General:""></a></h2><ul><li><ahref="./getting-started">GettingStarted</a>:GettingyourowncopyofthecodesetupwithGithubDesktop.</li><li><ahref="./main-mod-info">Mainmodinfo</a>:Howtosetupgeneralthingsforyourmodinmod.js.</li><li><ahref="./basic-layer-breakdown">Basiclayerbreakdown</a>:Breakingdownthecomponentsofalayerwithminimalfeatures.</li><li><ahref="./layer-features">Layerfeatures</a>:Explanationsofallofthedifferentpropertiesthatyoucangivealayer.</li><li><ahref="./custom-tab-layouts">CustomTabLayouts</a>:Anoptionalwaytogiveyourtabsadifferentlayout.Youcanevencreateentirelynewcomponentstouse.</li><li><ahref="./updating-tmt">UpdatingTMT</a>:UsingGithubDesktoptoupdateyourmod'sversionofTMT.</li></ul><h2id="common-components"tabindex="-1">Commoncomponents<aclass="header-anchor"href="#common-components"aria-label="Permalinkto"Commoncomponents""></a></h2><ul><li><ahref="./upgrades">Upgrades</a>:Howtocreateupgradesforalayer.</li><li><ahref="./milestones">Milestones</a>:Howtocreatemilestonesforalayer.</li><li><ahref="./buyables">Buyables</a>:Createrebuyableupgradesforyourlayer(withtheoptiontomakethemrespec-able).CanbeusedtomakeEnhancersorSpaceBuildings.</li><li><ahref="./clickables">Clickables</a>:Amoregeneralizedvariantofbuyables,foranykindofthingthatissometimesclickable.BetweentheseandBuyables,youcandojustaboutanything.</li></ul><h2id="other-components"tabindex="-1">Othercomponents<aclass="header-anchor"href="#other-components"aria-label="Permalinkto"Othercomponents""></a></h2><ul><li><ahref="./challenges">Challenges</a>:Howtocreatechallengesforalayer.</li><li><ahref="./bars">Bars</a>:Displaysomeinformation