Template:EntityClassPage: Difference between revisions

From Arx Libertatis Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
 
(44 intermediate revisions by the same user not shown)
Line 24: Line 24:


-->
-->
<div style="float: right">
<div style="margin-left: 10px; float: right; clear: right">
<center><b>{{#var:entity_class_name}} entity class</b></center>
<center><b>{{#var:entity_class_name}} entity class</b></center>
<table class="wikitable">
<table class="wikitable">
Line 31: Line 31:
<td><center><b>{{GameMessage|{{#var:entity_class_description}}}}</b></center></td>
<td><center><b>{{GameMessage|{{#var:entity_class_description}}}}</b></center></td>
</tr>
</tr>
{{#if:{{{parent|}}}|
<tr>
<th scope="row" style="text-align: left">Parent class</th>
<td><center>[[parent class::{{{parent}}}| ]]{{EntityClass|{{{parent}}}}}</center></td>
</tr>
}}
<tr>
<tr>
<th scope="row" style="text-align: left">Type</th>
<th scope="row" style="text-align: left">Type</th>
<td><center><b>[[type::{{{type}}}| ]]{{EntityClassPage_type_{{{type|npc}}}}}</b></center></td>
<td><center><b>[[entity type::{{{type}}}| ]]{{EntityClassPage_type_{{{type|npc}}}}}</b></center></td>
</tr>
</tr>
<tr>
<tr>
Line 40: Line 46:
</tr>
</tr>
<tr>
<tr>
<th scope="row" style="text-align: left">Script</th>
<th scope="row" style="text-align: left">Script name</th>
<td><center><code>{{#var:entity_class_script}}</code></center></td>
<td><center><code>{{#var:entity_class_script}}</code></center></td>
</tr>
</tr>
<tr>
<tr>
<th scope="row" style="text-align: left">Path</th>
<th scope="row" style="text-align: left">Script path</th>
<td><center><code>{{#var:entity_class_path}}</code></center></td>
<td><center><code>{{#var:entity_class_path}}</code></center></td>
</tr>
</tr>
{{#if:{{{scripttype|}}}|
<tr>
<th scope="row" style="text-align: left">Script £type</th>
<td><center><code>[[script type::{{{scripttype}}}| ]]{{{scripttype}}}</code></center></td>
</tr>
}}
</table>
</table>
</div>
</div>
<includeonly>
<includeonly>
[[Category:Entity Classes]]
[[Category:Entity Classes]]<!--
{{EntityClassPage_category_{{{type|npc}}}}}
 
 
  Define classes inherited by this class (including itself for convenience)
 
-->[[inherits class::{{{id}}}| ]]<!--
-->{{#if:{{{parent|}}}|<!--
  -->{{#arraydefine:entity_superclasses|{{#ask: [[Category:Entity Classes]] [[class::{{{parent}}}]] | ?inherits class= | mainlabel=- | limit=1000 | format=array}}}}<!--
  -->{{#arrayprint:entity_superclasses||@class|[[inherits class::@class| ]]}}<!--
-->}}<!--
 
 
  Display the class parent and child classes to the user
 
-->
{{#if:{{{parent|}}}|<p>{{#var:entity_class_plural_name}} are a type of {{EntityClass|{{{parent}}}}}.</p>}}
{{EntityClassPage_category_{{{type|npc}}}}}<!--
-->{{#arraydefine:entity_subclasses|{{#ask: [[Category:Entity Classes]] [[parent class::{{{id}}}]] | ?class= | mainlabel=- | limit=1000 | format=array}}}}<!--
-->{{#ifeq:0|{{#arraysize:entity_subclasses}}||<p>
There are the following subtypes of {{#var:entity_class_plural_name}}:
<ul>
{{#arrayprint:entity_subclasses||@class|<li>{{EntityClass|@class}}}}
</ul>
</p>
}}<!--
 


{{#arraydefine:spawining_spells|{{#ask: [[Category:Spells]] [[spawns entity class::{{{id}}}]] | ?# | mainlabel=- | limit=1000 | format=array}}}}
  Custom description
{{#ifeq:0|{{#arraysize:spawining_spells}}||
 
-->{{{1|}}}
<!--
 
 
  List instances of this class
 
-->{{#ifeq:|{{#show: {{FULLPAGENAME}} | ?entity id }}|<!--
-->{{#arraydefine:entity_class_instances|{{#ask: [[Category:Entities]] [[has class::{{{id}}}]] | ?=# | mainlabel=- | limit=1000 | format=array}}}}<!--
-->{{#ifeq:0|{{#arraysize:entity_class_instances}}||
=== Notable {{#var:entity_class_plural_name}} ===
<p>
The following {{#var:entity_class_name}} entities exist:
<ul>
{{#arrayprint:entity_class_instances||@entity|<li>[[@entity]] <small><font color=gray> - <code>{{#show: @entity | ?entity id }}</code></font></small>}}
</ul>
</p>
|}}|}}<!--
 
 
  List spells spawning entities of this class
 
-->{{#arraydefine:spawining_spells|{{#ask: [[Category:Spells]] [[spawns entity class::{{{id}}}]] | ?=# | mainlabel=- | limit=1000 | format=array}}}}<!--
-->{{#ifeq:0|{{#arraysize:spawining_spells}}||
=== Summon spells ===
=== Summon spells ===
<p>
{{#var:entity_class_plural_name}} can be created with the following spells:
{{#var:entity_class_plural_name}} can be created with the following spells:
<ul>
<ul>
{{#arrayprint:spawining_spells||@spell|<li>{{Spell|@spell}}}}
{{#arrayprint:spawining_spells||@spell|<li>{{Spell|@spell}}}}
</ul>
</ul>
}}
</p>
</includeonly>
}}<!--
 
 
--></includeonly><noinclude>
 
== Usage ==
 
Template for entity class pages
 
Parameters:
 
* <code>id</code>  (required) - unique id used to find this entity class
* <code>type</code>  (required) - entity type for this class - see [[Property:entity type]]
* <code>name</code>  (default: <code><nowiki>{{{PAGENAME}}}</nowiki></code>) - friendly name of the entity class
* <code>plural name</code>  (default: <code><nowiki>{{{name}}}s</nowiki></code>) - name for multiple of this class
* <code>description</code>  (default: <code><nowiki>description_{{{id|chicken}}}</nowiki></code>) - key for the localised entity class description
* <code>script</code>  (default: <code><nowiki>{{{id}}}</nowiki></code>) - script name for this entity class
* <code>path</code> - script path for this entity class - default depends on type:
** <code>npc</code>: <code><nowiki>npc/{{{script}}}</nowiki></code>
** <code>item</code>: <code><nowiki>items/{{{script}}}</nowiki></code>
* <code>scripttype</code> script £type for this entity class

Latest revision as of 02:19, 14 April 2020

EntityClassPage entity class
Description
A chicken. [e]
Type
NPC
ID
chicken
Script name
chicken_base
Script path
npc/chicken_base


Usage

Template for entity class pages

Parameters:

  • id (required) - unique id used to find this entity class
  • type (required) - entity type for this class - see Property:entity type
  • name (default: {{{PAGENAME}}}) - friendly name of the entity class
  • plural name (default: {{{name}}}s) - name for multiple of this class
  • description (default: description_{{{id|chicken}}}) - key for the localised entity class description
  • script (default: {{{id}}}) - script name for this entity class
  • path - script path for this entity class - default depends on type:
    • npc: npc/{{{script}}}
    • item: items/{{{script}}}
  • scripttype script £type for this entity class