From Dark and Darker Wiki

(transclude)
 
m (Added comments. Changed whitespace structure from C style to Python style.)
Line 1: Line 1:
<includeonly><!--
<includeonly><!--


// vars: reset
vars: reset
-->{{#vardefine:sep|}}<!--
-->{{#vardefine:sep|}}<!--
-->{{#vardefine:page|}}<!--
-->{{#vardefine:page|}}<!--
-->{{#vardefine:heading|}}<!--
-->{{#vardefine:heading|}}<!--
//vars: set
 
-->{{#vardefine:sep|<!--
Determine the position of "#" character within $1
-->{{#pos:{{{1}}}|#}}<!-- position of "#" character within $1
-->{{#vardefine:sep|{{#pos:{{{1}}}|#}} }}<!--
-->}}<!--
Store everything in front of the "#" character in $1 (or $1 unchanged if it contains no "#" character)
-->{{#vardefine:page|<!--
-->{{#vardefine:page|{{#sub:{{{1}}}|0|{{#var:sep}} }} }}<!--
-->{{#sub:{{{1}}}|0|{{#var:sep}}}}<!-- everything in front of the "#" character in $1 (or $1 unchanged if it contains no "#" character)
If Sep isn't empty, store everything behind the "#" character
-->}}<!--
-->{{#if:{{#var:sep}}|<!--
-->{{#if:{{#var:sep}}|<!--
-->{{#vardefine:heading|<!--
-->{{#vardefine:heading|{{#sub:{{{1}}}|{{#expr:{{#var:sep}}+1}}|}} }} }}<!--
-->{{#sub:{{{1}}}|{{#expr:{{#var:sep}}+1}}|}}<!-- everything behind the "#" character in $1
-->}}<!--
-->}}<!--
 


//actual transclusion:
//actual transclusion:
-->{{#if:{{{section|}}}<!--
-->{{#if:{{{section|}}}<!--
-->|{{#lst:{{#var:page}}|{{{section}}}}}<!-- transclude a defined section from the page
Transclude a defined section from the page
-->|<!--
-->|{{#lst:{{#var:page}}|{{{section}}}}}<!--
-->{{#if:{{#var:sep}}<!--
Transclude heading (part after the "#" character in $1)
-->|{{#lsth:{{#var:page}}|{{#var:heading}}}}<!-- transclude heading (part after the "#" character in $1)
-->|{{#if:{{#var:sep}}<!--
-->|{{:{{#var:page}}}}<!-- transclude entire page
-->|{{#lsth:{{#var:page}}|{{#var:heading}} }}<!--
-->}}<!--
-->|{{:{{#var:page}} }} }} }}<!--
-->}}<!--
 
 
--></includeonly><noinclude>
--></includeonly><noinclude>
Example:
Example:<pre style="width:fit-content">{{Transclude|Weapons#Rarity}}</pre>
 
<pre>
{{Transclude|Weapons#Rarity}}</pre>
 
{{Transclude|Weapons#Rarity}}
{{Transclude|Weapons#Rarity}}
</noinclude>
</noinclude>

Revision as of 17:05, 8 April 2024

Example:

{{Transclude|Weapons#Rarity}}

Weapons can improve and become stronger as their rarity level increases. A weapon's rarity typically reflects its level of power, with higher rarity weapons providing more damage output and other attributes that can enhance the player's performance in combat.

There are 7 rarities in the game.

Poor | Common | Uncommon | Rare | Epic | Legendary | Unique

Uncommon rarity adds up to 1 new enchantment.

Rare rarity adds up to 2 new enchantments.

Epic rarity adds up to 3 new enchantments.

Legendary rarity adds up to 4 new enchantments.

Unique rarity adds 5 enchantments and may add a special effect varying based on weapon. A list of these effects can be found at Artifacts