</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-a0fd61f4data-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><!----></header><divclass="VPLocalNav fixed reached-top"data-v-5a346dfedata-v-79c8c1df><!----><divclass="VPLocalNavOutlineDropdown"style="--vp-vh:0px;"data-v-79c8c1dfdata-v-1c15a60a><buttondata-v-1c15a60a>Return to top</button><!----></div></div><!----><divclass="VPContent"id="VPContent"data-v-5a346dfedata-v-669faec9><divclass="VPDoc has-aside"data-v-669faec9data-v-6b87e69f><!--[--><!--]--><divclass="container"data-v-6b87e69f><divclass="aside"data-v-6b87e69f><divclass="aside-curtain"data-v-6b87e69f></div><divclass="aside-container"data-v-6b87e69f><divclass="aside-content"data-v-6b87e69f><divclass="VPDocAside"data-v-6b87e69fdata-v-3f215769><!--[--><!--]--><!--[--><!--]--><divclass="VPDocAsideOutline"role="navigation"data-v-3f215769data-v-d330b1bb><divclass="content"data-v-d330b1bb><divclass="outline-marker"data-v-d330b1bb></div><divclass="outline-title"role="heading"aria-level="2"data-v-d330b1bb>On this page</div><navaria-labelledby="doc-outline-aria-label"data-v-d330b1bb><spanclass="visually-hidden"id="doc-outline-aria-label"data-v-d330b1bb> Table of Contents for current page </span><ulclass="root"data-v-d330b1bbdata-v-d0ee3533><!--[--><!--]--></ul></nav></div></div><!--[--><!--]--><divclass="spacer"data-v-3f215769></div><!--[--><!--]--><!----><!--[--><!--]--><!--[--><!--]--></div></div></div></div><divclass="content"data-v-6b87e69f><divclass="content-container"data-v-6b87e69f><!--[--><!--]--><!----><mainclass="main"data-v-6b87e69f><divstyle="position:relative;"class="vp-doc _public_lit_docs_basic-layer-breakdown"data-v-6b87e69f><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 github-dark vp-code-dark"><code><spanclass="line"><spanstyle="color:#B392F0;">addLayer</span><spanstyle="color:#E1E4E8;">(</span><spanstyle="color:#9ECBFF;">"p"</span><spanstyle="color:#E1E4E8;">, {</span></span>
<spanclass="line"><spanstyle="color:#E1E4E8;"></span><spanstyle="color:#B392F0;">startData</span><spanstyle="color:#E1E4E8;">() { </span><spanstyle="color:#F97583;">return</span><spanstyle="color:#E1E4E8;"> { </span><spanstyle="color:#6A737D;">// startData is a function that returns default data for a layer. </span></span>
<spanclass="line"><spanstyle="color:#E1E4E8;"> unlocked: </span><spanstyle="color:#79B8FF;">true</span><spanstyle="color:#E1E4E8;">, </span><spanstyle="color:#6A737D;">// You can add more variables here to add them to your layer.</span></span>
<spanclass="line"><spanstyle="color:#E1E4E8;"> points: </span><spanstyle="color:#F97583;">new</span><spanstyle="color:#E1E4E8;"></span><spanstyle="color:#B392F0;">Decimal</span><spanstyle="color:#E1E4E8;">(</span><spanstyle="color:#79B8FF;">0</span><spanstyle="color:#E1E4E8;">), </span><spanstyle="color:#6A737D;">// "points" is the internal name for the main resource of the layer.</span></span>
<spanclass="line"><spanstyle="color:#E1E4E8;"> color: </span><spanstyle="color:#9ECBFF;">"#4BDC13"</span><spanstyle="color:#E1E4E8;">, </span><spanstyle="color:#6A737D;">// The color for this layer, which affects many elements.</span></span>
<spanclass="line"><spanstyle="color:#E1E4E8;"> resource: </span><spanstyle="color:#9ECBFF;">"prestige points"</span><spanstyle="color:#E1E4E8;">, </span><spanstyle="color:#6A737D;">// The name of this layer's main prestige resource.</span></span>
<spanclass="line"><spanstyle="color:#E1E4E8;"> row: </span><spanstyle="color:#79B8FF;">0</span><spanstyle="color:#E1E4E8;">, </span><spanstyle="color:#6A737D;">// The row this layer is on (0 is the first row).</span></span>
<spanclass="line"></span>
<spanclass="line"><spanstyle="color:#E1E4E8;"> baseResource: </span><spanstyle="color:#9ECBFF;">"points"</span><spanstyle="color:#E1E4E8;">, </span><spanstyle="color:#6A737D;">// The name of the resource your prestige gain is based on.</span></span>
<spanclass="line"><spanstyle="color:#E1E4E8;"></span><spanstyle="color:#B392F0;">baseAmount</span><spanstyle="color:#E1E4E8;">() { </span><spanstyle="color:#F97583;">return</span><spanstyle="color:#E1E4E8;"> player.points }, </span><spanstyle="color:#6A737D;">// A function to return the current amount of baseResource.</span></span>
<spanclass="line"></span>
<spanclass="line"><spanstyle="color:#E1E4E8;"> requires: </span><spanstyle="color:#F97583;">new</span><spanstyle="color:#E1E4E8;"></span><spanstyle="color:#B392F0;">Decimal</span><spanstyle="color:#E1E4E8;">(</span><spanstyle="color:#79B8FF;">10</span><spanstyle="color:#E1E4E8;">), </span><spanstyle="color:#6A737D;">// The amount of the base needed to gain 1 of the prestige currency.</span></span>
<spanclass="line"><spanstyle="color:#E1E4E8;"></span><spanstyle="color:#6A737D;">// Also the amount required to unlock the layer.</span></span>
<spanclass="line"></span>
<spanclass="line"><spanstyle="color:#E1E4E8;"> type: </span><spanstyle="color:#9ECBFF;">"normal"</span><spanstyle="color:#E1E4E8;">, </span><spanstyle="color:#6A737D;">// Determines the formula used for calculating prestige currency.</span></span>
<spanclass="line"><spanstyle="color:#E1E4E8;"> exponent: </span><spanstyle="color:#79B8FF;">0.5</span><spanstyle="color:#E1E4E8;">, </span><spanstyle="color:#6A737D;">// "normal" prestige gain is (currency^exponent).</span></span>
<spanclass="line"></span>
<spanclass="line"><spanstyle="color:#E1E4E8;"></span><spanstyle="color:#B392F0;">gainMult</span><spanstyle="color:#E1E4E8;">() { </span><spanstyle="color:#6A737D;">// Returns your multiplier to your gain of the prestige resource.</span></span>
<spanclass="line"><spanstyle="color:#E1E4E8;"></span><spanstyle="color:#F97583;">return</span><spanstyle="color:#E1E4E8;"></span><spanstyle="color:#F97583;">new</span><spanstyle="color:#E1E4E8;"></span><spanstyle="color:#B392F0;">Decimal</span><spanstyle="color:#E1E4E8;">(</span><spanstyle="color:#79B8FF;">1</span><spanstyle="color:#E1E4E8;">) </span><spanstyle="color:#6A737D;">// Factor in any bonuses multiplying gain here.</span></span>
<spanclass="line"><spanstyle="color:#E1E4E8;"></span><spanstyle="color:#B392F0;">gainExp</span><spanstyle="color:#E1E4E8;">() { </span><spanstyle="color:#6A737D;">// Returns your exponent to your gain of the prestige resource.</span></span>
<spanclass="line"><spanstyle="color:#E1E4E8;"></span><spanstyle="color:#B392F0;">layerShown</span><spanstyle="color:#E1E4E8;">() { </span><spanstyle="color:#F97583;">return</span><spanstyle="color:#E1E4E8;"></span><spanstyle="color:#79B8FF;">true</span><spanstyle="color:#E1E4E8;"> } </span><spanstyle="color:#6A737D;">// Returns a bool for if this layer's node should be visible in the tree.</span></span>
<spanclass="line"><spanstyle="color:#24292E;"></span><spanstyle="color:#6F42C1;">startData</span><spanstyle="color:#24292E;">() { </span><spanstyle="color:#D73A49;">return</span><spanstyle="color:#24292E;"> { </span><spanstyle="color:#6A737D;">// startData is a function that returns default data for a layer. </span></span>
<spanclass="line"><spanstyle="color:#24292E;"> unlocked: </span><spanstyle="color:#005CC5;">true</span><spanstyle="color:#24292E;">, </span><spanstyle="color:#6A737D;">// You can add more variables here to add them to your layer.</span></span>
<spanclass="line"><spanstyle="color:#24292E;"> points: </span><spanstyle="color:#D73A49;">new</span><spanstyle="color:#24292E;"></span><spanstyle="color:#6F42C1;">Decimal</span><spanstyle="color:#24292E;">(</span><spanstyle="color:#005CC5;">0</span><spanstyle="color:#24292E;">), </span><spanstyle="color:#6A737D;">// "points" is the internal name for the main resource of the layer.</span></span>
<spanclass="line"><spanstyle="color:#24292E;"> color: </span><spanstyle="color:#032F62;">"#4BDC13"</span><spanstyle="color:#24292E;">, </span><spanstyle="color:#6A737D;">// The color for this layer, which affects many elements.</span></span>
<spanclass="line"><spanstyle="color:#24292E;"> resource: </span><spanstyle="color:#032F62;">"prestige points"</span><spanstyle="color:#24292E;">, </span><spanstyle="color:#6A737D;">// The name of this layer's main prestige resource.</span></span>
<spanclass="line"><spanstyle="color:#24292E;"> row: </span><spanstyle="color:#005CC5;">0</span><spanstyle="color:#24292E;">, </span><spanstyle="color:#6A737D;">// The row this layer is on (0 is the first row).</span></span>
<spanclass="line"></span>
<spanclass="line"><spanstyle="color:#24292E;"> baseResource: </span><spanstyle="color:#032F62;">"points"</span><spanstyle="color:#24292E;">, </span><spanstyle="color:#6A737D;">// The name of the resource your prestige gain is based on.</span></span>
<spanclass="line"><spanstyle="color:#24292E;"></span><spanstyle="color:#6F42C1;">baseAmount</span><spanstyle="color:#24292E;">() { </span><spanstyle="color:#D73A49;">return</span><spanstyle="color:#24292E;"> player.points }, </span><spanstyle="color:#6A737D;">// A function to return the current amount of baseResource.</span></span>
<spanclass="line"></span>
<spanclass="line"><spanstyle="color:#24292E;"> requires: </span><spanstyle="color:#D73A49;">new</span><spanstyle="color:#24292E;"></span><spanstyle="color:#6F42C1;">Decimal</span><spanstyle="color:#24292E;">(</span><spanstyle="color:#005CC5;">10</span><spanstyle="color:#24292E;">), </span><spanstyle="color:#6A737D;">// The amount of the base needed to gain 1 of the prestige currency.</span></span>
<spanclass="line"><spanstyle="color:#24292E;"></span><spanstyle="color:#6A737D;">// Also the amount required to unlock the layer.</span></span>
<spanclass="line"></span>
<spanclass="line"><spanstyle="color:#24292E;"> type: </span><spanstyle="color:#032F62;">"normal"</span><spanstyle="color:#24292E;">, </span><spanstyle="color:#6A737D;">// Determines the formula used for calculating prestige currency.</span></span>
<spanclass="line"><spanstyle="color:#24292E;"> exponent: </span><spanstyle="color:#005CC5;">0.5</span><spanstyle="color:#24292E;">, </span><spanstyle="color:#6A737D;">// "normal" prestige gain is (currency^exponent).</span></span>
<spanclass="line"></span>
<spanclass="line"><spanstyle="color:#24292E;"></span><spanstyle="color:#6F42C1;">gainMult</span><spanstyle="color:#24292E;">() { </span><spanstyle="color:#6A737D;">// Returns your multiplier to your gain of the prestige resource.</span></span>
<spanclass="line"><spanstyle="color:#24292E;"></span><spanstyle="color:#D73A49;">return</span><spanstyle="color:#24292E;"></span><spanstyle="color:#D73A49;">new</span><spanstyle="color:#24292E;"></span><spanstyle="color:#6F42C1;">Decimal</span><spanstyle="color:#24292E;">(</span><spanstyle="color:#005CC5;">1</span><spanstyle="color:#24292E;">) </span><spanstyle="color:#6A737D;">// Factor in any bonuses multiplying gain here.</span></span>
<spanclass="line"><spanstyle="color:#24292E;"></span><spanstyle="color:#6F42C1;">gainExp</span><spanstyle="color:#24292E;">() { </span><spanstyle="color:#6A737D;">// Returns your exponent to your gain of the prestige resource.</span></span>
<spanclass="line"><spanstyle="color:#24292E;"></span><spanstyle="color:#6F42C1;">layerShown</span><spanstyle="color:#24292E;">() { </span><spanstyle="color:#D73A49;">return</span><spanstyle="color:#24292E;"></span><spanstyle="color:#005CC5;">true</span><spanstyle="color:#24292E;"> } </span><spanstyle="color:#6A737D;">// Returns a bool for if this layer's node should be visible in the tree.</span></span>