</svg></a><!--]--></div></div></div><!--]--><!--]--></div></div></div><!--[--><!--]--><buttontype="button"class="VPNavBarHamburger hamburger"aria-label="mobile navigation"aria-expanded="false"aria-controls="VPNavScreen"data-v-ccf7ddecdata-v-e5dd9c1c><spanclass="container"data-v-e5dd9c1c><spanclass="top"data-v-e5dd9c1c></span><spanclass="middle"data-v-e5dd9c1c></span><spanclass="bottom"data-v-e5dd9c1c></span></span></button></div></div></div></div><divclass="divider"data-v-ccf7ddec><divclass="divider-line"data-v-ccf7ddec></div></div></div><!----></header><divclass="VPLocalNav empty fixed"data-v-5d98c3a5data-v-a6f0e41e><divclass="container"data-v-a6f0e41e><!----><divclass="VPLocalNavOutlineDropdown"style="--vp-vh:0px;"data-v-a6f0e41edata-v-17a5e62e><buttondata-v-17a5e62e>Return to top</button><!----></div></div></div><!----><divclass="VPContent"id="VPContent"data-v-5d98c3a5data-v-1428d186><divclass="VPDoc has-aside"data-v-1428d186data-v-39a288b8><!--[--><!--]--><divclass="container"data-v-39a288b8><divclass="aside"data-v-39a288b8><divclass="aside-curtain"data-v-39a288b8></div><divclass="aside-container"data-v-39a288b8><divclass="aside-content"data-v-39a288b8><divclass="VPDocAside"data-v-39a288b8data-v-3f215769><!--[--><!--]--><!--[--><!--]--><navaria-labelledby="doc-outline-aria-label"class="VPDocAsideOutline"data-v-3f215769data-v-a5bbad30><divclass="content"data-v-a5bbad30><divclass="outline-marker"data-v-a5bbad30></div><divaria-level="2"class="outline-title"id="doc-outline-aria-label"role="heading"data-v-a5bbad30>On this page</div><ulclass="VPDocOutlineItem root"data-v-a5bbad30data-v-b933a997><!--[--><!--]--></ul></div></nav><!--[--><!--]--><divclass="spacer"data-v-3f215769></div><!--[--><!--]--><!----><!--[--><!--]--><!--[--><!--]--></div></div></div></div><divclass="content"data-v-39a288b8><divclass="content-container"data-v-39a288b8><!--[--><!--]--><mainclass="main"data-v-39a288b8><divstyle="position:relative;"class="vp-doc _public_gamedevtree_docs_basic-layer-breakdown"data-v-39a288b8><div><h1id="basic-layer-breakdown"tabindex="-1">Basic layer breakdown <aclass="header-anchor"href="#basic-layer-breakdown"aria-label="Permalink to "Basic layer breakdown""></a></h1><p>This is a very minimal layer with minimal features. Most things will require additional features.</p><divclass="language-js vp-adaptive-theme"><buttontitle="Copy Code"class="copy"></button><spanclass="lang">js</span><preclass="shiki shiki-themes github-light github-dark vp-code"tabindex="0"><code><spanclass="line"><spanstyle="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> p</span><spanstyle="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: {</span></span>
<spanclass="line"><spanstyle="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> startData</span><spanstyle="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">() { </span><spanstyle="--shiki-light:#D73A49;--shiki-dark:#F97583;">return</span><spanstyle="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> { </span><spanstyle="--shiki-light:#6A737D;--shiki-dark:#6A737D;">// startData is a function that returns default data for a layer. </span></span>
<spanclass="line"><spanstyle="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> unlocked: </span><spanstyle="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">false</span><spanstyle="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, </span><spanstyle="--shiki-light:#6A737D;--shiki-dark:#6A737D;">// You can add more variables here to add them to your layer.</span></span>
<spanclass="line"><spanstyle="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> points: </span><spanstyle="--shiki-light:#D73A49;--shiki-dark:#F97583;">new</span><spanstyle="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> Decimal</span><spanstyle="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><spanstyle="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">0</span><spanstyle="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">), </span><spanstyle="--shiki-light:#6A737D;--shiki-dark:#6A737D;">// "points" is the internal name for the main resource of the layer.</span></span>
<spanclass="line"><spanstyle="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> color</span><spanstyle="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><spanstyle="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">"#FE0102"</span><spanstyle="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, </span><spanstyle="--shiki-light:#6A737D;--shiki-dark:#6A737D;">// The color for this layer, which affects many elements</span></span>
<spanclass="line"><spanstyle="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> resource</span><spanstyle="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><spanstyle="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">"prestige points"</span><spanstyle="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, </span><spanstyle="--shiki-light:#6A737D;--shiki-dark:#6A737D;">// The name of this layer's main prestige resource</span></span>
<spanclass="line"><spanstyle="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> row</span><spanstyle="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><spanstyle="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">0</span><spanstyle="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, </span><spanstyle="--shiki-light:#6A737D;--shiki-dark:#6A737D;">// The row this layer is on (0 is the first row)</span></span>
<spanclass="line"></span>
<spanclass="line"><spanstyle="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> baseResource</span><spanstyle="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><spanstyle="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">"points"</span><spanstyle="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, </span><spanstyle="--shiki-light:#6A737D;--shiki-dark:#6A737D;">// The name of the resource your prestige gain is based on</span></span>
<spanclass="line"><spanstyle="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> baseAmount</span><spanstyle="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">() {</span><spanstyle="--shiki-light:#D73A49;--shiki-dark:#F97583;">return</span><spanstyle="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> player.points}, </span><spanstyle="--shiki-light:#6A737D;--shiki-dark:#6A737D;">// A function to return the current value of that resource</span></span>
<spanclass="line"></span>
<spanclass="line"><spanstyle="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> requires</span><spanstyle="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><spanstyle="--shiki-light:#D73A49;--shiki-dark:#F97583;">new</span><spanstyle="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> Decimal</span><spanstyle="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><spanstyle="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">200</span><spanstyle="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">), </span><spanstyle="--shiki-light:#6A737D;--shiki-dark:#6A737D;">// The amount of the base needed to gain 1 of the prestige currency.</span></span>
<spanclass="line"><spanstyle="--shiki-light:#6A737D;--shiki-dark:#6A737D;"> // Also the amount required to unlock the layer.</span></span>
<spanclass="line"><spanstyle="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> type</span><spanstyle="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><spanstyle="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">"normal"</span><spanstyle="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, </span><spanstyle="--shiki-light:#6A737D;--shiki-dark:#6A737D;">// Determines the formula used for calculating prestige currency.</span></span>
<spanclass="line"><spanstyle="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> exponent</span><spanstyle="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><spanstyle="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">0.5</span><spanstyle="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, </span><spanstyle="--shiki-light:#6A737D;--shiki-dark:#6A737D;">// "normal" prestige gain is (currency^exponent)</span></span>
<spanclass="line"></span>
<spanclass="line"><spanstyle="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> gainMult</span><spanstyle="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">() { </span><spanstyle="--shiki-light:#6A737D;--shiki-dark:#6A737D;">// Returns your multiplier to your gain of the prestige resource</span></span>
<spanclass="line"><spanstyle="--shiki-light:#D73A49;--shiki-dark:#F97583;"> return</span><spanstyle="--shiki-light:#D73A49;--shiki-dark:#F97583;"> new</span><spanstyle="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> Decimal</span><spanstyle="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><spanstyle="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">1</span><spanstyle="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) </span><spanstyle="--shiki-light:#6A737D;--shiki-dark:#6A737D;">// Factor in any bonuses multiplying gain here</span></span>
<spanclass="line"><spanstyle="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> gainExp</span><spanstyle="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">() { </span><spanstyle="--shiki-light:#6A737D;--shiki-dark:#6A737D;">// Returns your exponent to your gain of the prestige resource</span></span>
<spanclass="line"><spanstyle="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> layerShown</span><spanstyle="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">() {</span><spanstyle="--shiki-light:#D73A49;--shiki-dark:#F97583;">return</span><spanstyle="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> true</span><spanstyle="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">}, </span><spanstyle="--shiki-light:#6A737D;--shiki-dark:#6A737D;">// Returns a bool for if this layer's node should be visible in the tree.</span></span>