pages/assets/public_kronos_docs_!general-info.md.DBOKRLme.js

1 line
6.8 KiB
JavaScript
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import{_ as e,q as a,p as t,ag as o}from"./chunks/framework.Sr2_9k8k.js";const b=JSON.parse('{"title":"The-Modding-Tree","description":"","frontmatter":{},"headers":[],"relativePath":"public/kronos/docs/!general-info.md","filePath":"public/kronos/docs/!general-info.md"}'),n={name:"public/kronos/docs/!general-info.md"},r=o('<h1 id="the-modding-tree" tabindex="-1">The-Modding-Tree <a class="header-anchor" href="#the-modding-tree" aria-label="Permalink to &quot;The-Modding-Tree&quot;"></a></h1><p>Making a game in The Modding Tree mostly involves defining parameters or functions on objects. If you aren&#39;t following the <a href="./getting-started">getting started guide</a>, you should start by <a href="./main-mod-info">setting up your basic mod info</a> in <a href="/js/mod.js">mod.js</a>. It&#39;s important to set a mod id to ensure saving works properly.</p><p>Beyond that, the main way to add content is through creating layers, often in <a href="/js/layers.js">layers.js</a>. You can add new layers by calling <code>addLayer(layername, layerdata)</code>. There is an example of a basic layer in <a href="/js/layers.js">layers.js</a> 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.</p><p>Most of the time, you won&#39;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 <a href="/js/components.js">components.js</a>.</p><p>The Modding Tree uses <a href="https://github.com/Patashu/break_eternity.js" target="_blank" rel="noreferrer">break_eternity.js</a> to store large values. This means that many numbers are <code>Decimal</code> objects, and must be treated differently. For example, you have to use <code>new Decimal(x)</code> to create a <code>Decimal</code> value instead of a plain number, and perform operations on them by calling functions. e.g, instead of <code>x = x + y</code>, use <code>x = x.add(y)</code>. Keep in mind this also applies to comparison operators, which should be replaced with calling the <code>.gt</code>, <code>.gte</code>, <code>.lt</code>, <code>.lte</code>, <code>.eq</code>, and <code>.neq</code> functions. See the <a href="https://github.com/Patashu/break_eternity.js" target="_blank" rel="noreferrer">break_eternity.js</a> docs for more details on working with <code>Decimal</code> values.</p><p>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.</p><p>All display text can use basic HTML elements (But you can&#39;t use most Vue features there).</p><p>While reading this documentation, the following key will be used when describing features:</p><ul><li>No label: This is required and the game may crash if it isn&#39;t included.</li><li><strong>sometimes required</strong>: This is may be required, depending on other things in the layer.</li><li><strong>optional</strong>: You can leave this out if you don&#39;t intend to use that feature for the layer.</li><li><strong>assigned automagically</strong>: This value will be set automatically and override any value you set.</li><li><strong>deprecated</strong>: This feature is not recommended to be used, because newer features are able to achieve the same thing in a better, easier way.</li></ul><h2 id="table-of-contents" tabindex="-1">Table of Contents <a class="header-anchor" href="#table-of-contents" aria-label="Permalink to &quot;Table of Contents&quot;"></a></h2><h3 id="general" tabindex="-1">General <a class="header-anchor" href="#general" aria-label="Permalink to &quot;General&quot;"></a></h3><ul><li><a href="./getting-started">Getting Started</a>: Getting your own copy of the code set up with Github Desktop.</li><li><a href="./main-mod-info">Main mod info</a>: How to set up general things for your mod in <a href="/js/mod.js">mod.js</a>.</li><li><a href="./basic-layer-breakdown">Basic layer breakdown</a>: Breaking down the components of a layer with minimal features.</li><li><a href="./layer-features">Layer features</a>: Explanations of all of the different properties that you can give a layer.</li><li><a href="./custom-tab-layouts">Custom Tab Layouts</a>: An optional way to give your tabs a different layout. You can even create entirely new components to use.</li><li><a href="./trees-and-tree-customization">Custom game layouts</a>: You can get rid of the tree tab, add buttons and other things to the tree, or even customize the tab&#39;s layout like a layer tab.</li><li><a href="./updating-tmt">Updating TMT</a>: Using Github Desktop to update your mod&#39;s version of TMT.</li></ul><h3 id="common-components" tabindex="-1">Common components <a class="header-anchor" href="#common-components" aria-label="Permalink to &quot;Common components&quot;"></a></h3><ul><li><a href="./upgrades">Upgrades</a>: How to create upgrades for a layer.</li><li><a href="./milestones">Milestones</a>: How to create milestones for a layer.</li><li><a href="./buyables">Buyables</a>: Create rebuyable upgrades for your layer (with the option to make them respec-able). Can be used to make Enhancers or Space Buildings, for example.</li><li><a href="./clickables">Clickables</a>: A more generalized variant of buyables, for any kind of thing that is sometimes clickable. Between these and Buyables, you can do just about anything.</li><li><a href="./achievements">Achievements</a>: How to create achievements for a layer (or for the whole game).</li></ul><h3 id="other-components-and-features" tabindex="-1">Other components and features <a class="header-anchor" href="#other-components-and-features" aria-label="Permalink to &quot;Other components and features&quot;"></a></h3><ul><li><a href="./challenges">Challenges</a>: How to create challenges for a layer.</li><li><a href="./bars">Bars</a>: Display some information as a progress bar, gauge, or similar. They are highly customizable, and can be horizontal and vertical as well.</li><li><a href="./subtabs-and-microtabs">Subtabs and Microtabs</a>: Create subtabs for your tabs, as well as &quot;microtab&quot; components that you can put inside the tabs. You can even use them to embed a layer inside another layer!</li><li>[Grids][grids.md]: Create a group buttons that behave the same, but have their own data. Good for map tiles, an inventory grid, and more!</li><li><a href="./infoboxes">Infoboxes</a>: Boxes containing text that can be shown or hidden.</li><li><a href="./trees-and-tree-customization">Trees</a>: Make your own trees. You can make non-layer button nodes too!</li><li><a href="./particles">Particle system</a>: Can be used to create particles for visual effects, but also interactable things like golden cookies or collectables.</li></ul>',16),i=[r];function s(l,d,c,h,u,m){return t(),a("div",null,i)}const g=e(n,[["render",s]]);export{b as __pageData,g as default};