From Dark and Darker Wiki

m (Removed unwanted linebreaks)
m (Added logic to not display a subsection if there is no data for it.)
Line 16: Line 16:
             If neither Boss nor Miniboss, add to monsters array
             If neither Boss nor Miniboss, add to monsters array
             -->{{#arraydefine:monsters|{{#arrayprint:monsters}},{{#var:current}}}}}}}}
             -->{{#arraydefine:monsters|{{#arrayprint:monsters}},{{#var:current}}}}}}}}
}}
}}<!--
==Bosses==
-->{{#ifeq:{{#arraysize:bosses}}|0||
<h2>Bosses</h2>
<ul>{{#loop: i
<ul>{{#loop: i
     |1
     |1
     |{{#expr:{{#arraysize:bosses}}-1}}
     |{{#expr:{{#arraysize:bosses}}-1}}
     |{{#vardefine:current|{{ #arrayindex:bosses | {{ #var:i }}}}}}<!--
     |{{#vardefine:current|{{ #arrayindex:bosses | {{ #var:i }}}}}}<!--
     -->{{#if:{{#var:current}}|<li>[[{{#var:current}}]]</li>}}
     --><li>[[{{#var:current}}]]</li>
}}</ul>
}}</ul>}}<!--
==Mini Bosses==
-->{{#ifeq:{{#arraysize:minibosses}}|0||
<h2>Mini Bosses</h2>
<ul>{{#loop: i
<ul>{{#loop: i
     |1
     |1
     |{{#expr:{{#arraysize:minibosses}}-1}}
     |{{#expr:{{#arraysize:minibosses}}-1}}
     |{{#vardefine:current|{{ #arrayindex:minibosses | {{ #var:i }}}}}}<!--
     |{{#vardefine:current|{{ #arrayindex:minibosses | {{ #var:i }}}}}}<!--
     -->{{#if:{{#var:current}}|<li>[[{{#var:current}}]]</li>}}
     --><li>[[{{#var:current}}]]</li>
}}</ul>
}}</ul>}}<!--
==Monsters==
-->{{#ifeq::{{#arraysize:monsters}}|0||
<h2>Monsters</h2>
<ul>{{#loop: i
<ul>{{#loop: i
     |1
     |1
     |{{#expr:{{#arraysize:monsters}}-1}}
     |{{#expr:{{#arraysize:monsters}}-1}}
     |{{#vardefine:current|{{ #arrayindex:monsters | {{ #var:i }}}}}}<!--
     |{{#vardefine:current|{{ #arrayindex:monsters | {{ #var:i }}}}}}<!--
     -->{{#if:{{#var:current}}|<li>[[{{#var:current}}]]</li>}}
     --><li>[[{{#var:current}}]]</li>
}}</ul></includeonly><noinclude>
}}</ul>}}</includeonly><noinclude>
Example: <pre> {{GenerateMonsterRace|Skeleton}} </pre>
Example: <pre> {{GenerateMonsterRace|Skeleton}} </pre>
{{GenerateRacePage|Skeleton}}
{{GenerateRacePage|Skeleton}}
</noinclude>
</noinclude>

Revision as of 03:34, 21 February 2024

Example:

 {{GenerateMonsterRace|Skeleton}} 

Monsters

  • [[]]