Template:SpellCategory

From Noita Wiki
Jump to navigation Jump to search


Configuration for spell categories.


See also:

  • {{SpellCategory/links}} - to insert a list of spells in the tagged spell category
  • {{SpellCategory/summary}} - to transclude common information for a given tag into spell pages

Spell Related templates

  • {{SpellSequence}} - Render ordered spell sequences using your own templates.
  • {{SpellIcon}} - Render individual spell icons
  • Module:Wand - this lua module handles querying cargo for data, and rendering the Wand2 template.

Motivation

The aim here is to reduce duplication/inconsistency in how families of spells, or common effects, are explained and described. As well as to provide more opportunities to discover related information.

How to

  1. Create a category with a name like "Spells that ..." or "Spells which ..." etc., that describes the category.
  2. Add the {{SpellCategory}} template to the newly created category page, specifying a unique tag for the category.
  3. Add the unique tag to the tags field on all spell pages you wish to include.
  4. Also add the {{SpellCategory/links}} template into spell pages defining categories, to display a list of other spells sharing the same tags.
  5. Add information to the category's describe subpage, and transclude it into multiple spell pages using {{SpellCategory/summary}}.
Example 1:

Example of a category page:

{{SpellCategory
|name     = {{FULLPAGENAME}}
|tag      = friendlyfire
|sortKey  = friendlyfire
|title    = Friendly Fire
|subtitle = Spells that can harm you as well as your enemies.
|}}

Create a Category

Example 2:
{{SpellCategory
|tag       = multipleprojectile
|title     = Multiple Projectile
|subtitle  = Spells that produce multiple projectiles per cast
|}}
Result:

Spell Category: Spells that produce multiple projectiles per cast

Summary

  • Edit on subpage: /describe
  • Transclude with template: {{SpellCategory/summary}}
Example 2.1:
{{SpellCategory/summary|category={{{category|}}} }}
Result:

todo


List of members

Example 2.2:
{{SpellCategory/links|category={{{category|}}} }}
Result:

todo


Transclude: Summary

This template transcludes the /summary subpage of the Category, where you can edit the information shared between the member spells.

Example 3:
{{SpellCategory/summary|tag=multipleprojectile}}
Result:

Template:SpellCategory/summary

Transclude: Links

This template uses a {{SpellQueryGroup}} to produce a set of links to pages in this spell category.

Example 4:
{{SpellCategory/links|tag=multipleprojectile}}
Result:
multipleprojectile Spells
Spells grouped by the tag: 'multipleprojectile'