Template:Power
From Fax Encyclopedicus
Line 1: | Line 1: | ||
- | ==={{{name}}}=== | + | <includeonly>==={{{name|{{PAGENAME}}}}}=== |
- | {{{disc}}} ({{{subdisc}}}) [{{{desc}}}]< | + | <!-- |
- | '''Level:''' {{{level}}}< | + | |
- | '''Display:''' {{{disp}}}< | + | -->{{ #if: {{{disc|}}} | {{{disc}}} <!-- no discipline entry --> }}<!-- |
- | '''Manifesting Time:''' {{{time}}}< | + | |
- | '''Range:''' {{{range}}}< | + | -->{{ #if: {{{subdisc|}}} | ({{{subdisc}}}) | <!-- no subdiscipline entry --> }}<!-- |
- | '''Target:''' {{{target}}}< | + | |
- | '''Effect:''' {{{effect}}}< | + | -->{{ #if: {{{desc|}}} | [{{{desc}}}] | <!-- no descriptor entry --> }}<!-- |
- | + | ||
- | '''Duration:''' {{{dur}}}< | + | -->{{ #if: {{{class1|}}} | |
- | '''Saving Throw:''' {{{save}}}< | + | * '''Level:''' {{{class1}}} {{{class1level}}}<!-- |
- | '''Power Resistance:''' {{{PR}}}< | + | -->{{ #if: {{{class2|}}} | , {{{class2}}} {{{class2level}}}<!-- |
- | '''Power Points:''' {{{PP}}} | + | -->{{ #if: {{{class3|}}} | , {{{class3}}} {{{class3level}}}<!-- |
+ | -->{{ #if: {{{class4|}}} | , {{{class4}}} {{{class4level}}}<!-- | ||
+ | -->{{ #if: {{{class5|}}} | , {{{class5}}} {{{class5level}}}<!-- | ||
+ | -->{{ #if: {{{class6|}}} | , {{{class6}}} {{{class6level}}}<!-- | ||
+ | -->{{ #if: {{{class7|}}} | , {{{class7}}} {{{class7level}}}<!-- | ||
+ | -->{{ #if: {{{class8|}}} | , {{{class8}}} {{{class8level}}}<!-- | ||
+ | -->{{ #if: {{{class9|}}} | , {{{class9}}} {{{class9level}}}<!-- | ||
+ | -->{{ #if: {{{classX|}}} | , {{{classX}}} {{{classXlevel}}}<!-- | ||
+ | -->| <!-- no 10th class entry --> }}<!-- | ||
+ | -->| <!-- no 9th class entry --> }}<!-- | ||
+ | -->| <!-- no 8th class entry --> }}<!-- | ||
+ | -->| <!-- no 7th class entry --> }}<!-- | ||
+ | -->| <!-- no 6th class entry --> }}<!-- | ||
+ | -->| <!-- no 5th class entry --> }}<!-- | ||
+ | -->| <!-- no 4th class entry --> }}<!-- | ||
+ | -->| <!-- no 3rd class entry --> }}<!-- | ||
+ | -->| <!-- no 2nd class entry --> }}<!-- | ||
+ | -->| <!-- no 1st class entry, maybe plain level: | ||
+ | |||
+ | -->{{ #if: {{{level|}}} | | ||
+ | * '''Level:''' {{{level}}} | <!-- no level entry --> }} }}<!-- | ||
+ | |||
+ | -->{{ #if: {{{disp|}}} | | ||
+ | * '''Display:''' {{{disp}}} | <!-- no display entry --> }}<!-- | ||
+ | |||
+ | -->{{ #if: {{{time|}}} | | ||
+ | * '''Manifesting Time:''' {{{time}}} | <!-- no casting time entry --> }}<!-- | ||
+ | |||
+ | -->{{ #if: {{{range|}}} | | ||
+ | * '''Range:''' {{{range}}} | <!-- no range entry --> }}<!-- | ||
+ | |||
+ | -->{{ #if: {{{target|}}} | | ||
+ | * '''Target:''' {{{target}}} | <!-- no target entry --> }}<!-- | ||
+ | |||
+ | -->{{ #if: {{{effect|}}} | | ||
+ | * '''Effect:''' {{{effect}}} | <!-- no effect entry --> }}<!-- | ||
+ | |||
+ | -->{{ #if: {{{dur|}}} | | ||
+ | * '''Duration:''' {{{dur}}} | <!-- no duration entry --> }}<!-- | ||
+ | |||
+ | -->{{ #if: {{{save|}}} | | ||
+ | * '''Saving Throw:''' {{{save}}} | <!-- no saving throw entry --> }}<!-- | ||
+ | |||
+ | -->{{ #if: {{{PR|}}} | | ||
+ | * '''Power Resistance:''' {{{PR}}} | <!-- no power resistance entry --> }}<!-- | ||
+ | |||
+ | -->{{ #if: {{{PP|}}} | | ||
+ | * '''Power Points:''' {{{PP}}} | <!-- no power point entry --> }}<!-- | ||
+ | |||
+ | -->{{ #ifeq: {{NAMESPACE}} | Template | <!-- don't include templates in the categories --> | <!-- | ||
+ | |||
+ | -->{{ #if: {{{nocat|}}} | <!-- don't categorize when nocat is set --> | | ||
+ | |||
+ | [[Category:{{{type|Powers}}}]]<!-- | ||
+ | |||
+ | -->{{ #if: {{{noclasscat|}}} | <!-- don't categorize for each class; use level | ||
+ | |||
+ | -->{{ #if: {{{nolevelcat|}}} | <!-- unless nolevelcat is also set --> | <!-- | ||
+ | |||
+ | -->{{ #if: {{{level|}}} | | ||
+ | [[Category:{{{type|Powers}}} (Level {{{level}}})]] | <!-- | ||
+ | |||
+ | no level entry supplied | ||
+ | --> }} <!-- | ||
+ | nolevelcat false | ||
+ | --> }} <!-- | ||
+ | noclasscat set | ||
+ | --> | <!-- | ||
+ | noclasscat not set, doing class categorization: | ||
+ | |||
+ | -->{{ #if: {{{class1|}}} | | ||
+ | [[Category:{{{class1|}}} {{{type|Powers}}}]]{{ #if: {{{nolevelcat|}}} | <!-- don't categorize if nolevelcat is set --> | | ||
+ | [[Category:{{{class1|}}} {{{type|Powers}}} (Level {{{class1level}}})]] }}<!-- | ||
+ | |||
+ | -->{{ #if: {{{class2|}}} | | ||
+ | [[Category:{{{class2|}}} {{{type|Powers}}}]]{{ #if: {{{nolevelcat|}}} | <!-- don't categorize if nolevelcat is set --> | | ||
+ | [[Category:{{{class2|}}} {{{type|Powers}}} (Level {{{class2level}}})]] }}<!-- | ||
+ | |||
+ | -->{{ #if: {{{class3|}}} | | ||
+ | [[Category:{{{class3|}}} {{{type|Powers}}}]]{{ #if: {{{nolevelcat|}}} | <!-- don't categorize if nolevelcat is set --> | | ||
+ | [[Category:{{{class3|}}} {{{type|Powers}}} (Level {{{class3level}}})]] }}<!-- | ||
+ | |||
+ | -->{{ #if: {{{class4|}}} | | ||
+ | [[Category:{{{class4|}}} {{{type|Powers}}}]]{{ #if: {{{nolevelcat|}}} | <!-- don't categorize if nolevelcat is set --> | | ||
+ | [[Category:{{{class4|}}} {{{type|Powers}}} (Level {{{class4level}}})]] }}<!-- | ||
+ | |||
+ | -->{{ #if: {{{class5|}}} | | ||
+ | [[Category:{{{class5|}}} {{{type|Powers}}}]]{{ #if: {{{nolevelcat|}}} | <!-- don't categorize if nolevelcat is set --> | | ||
+ | [[Category:{{{class5|}}} {{{type|Powers}}} (Level {{{class5level}}})]] }}<!-- | ||
+ | |||
+ | -->{{ #if: {{{class6|}}} | | ||
+ | [[Category:{{{class6|}}} {{{type|Powers}}}]]{{ #if: {{{nolevelcat|}}} | <!-- don't categorize if nolevelcat is set --> | | ||
+ | [[Category:{{{class6|}}} {{{type|Powers}}} (Level {{{class6level}}})]] }}<!-- | ||
+ | |||
+ | -->{{ #if: {{{class7|}}} | | ||
+ | [[Category:{{{class7|}}} {{{type|Powers}}}]]{{ #if: {{{nolevelcat|}}} | <!-- don't categorize if nolevelcat is set --> | | ||
+ | [[Category:{{{class7|}}} {{{type|Powers}}} (Level {{{class7level}}})]] }}<!-- | ||
+ | |||
+ | -->{{ #if: {{{class8|}}} | | ||
+ | [[Category:{{{class8|}}} {{{type|Powers}}}]]{{ #if: {{{nolevelcat|}}} | <!-- don't categorize if nolevelcat is set --> | | ||
+ | [[Category:{{{class8|}}} {{{type|Spells}}} (Level {{{class8level}}})]] }}<!-- | ||
+ | |||
+ | -->{{ #if: {{{class9|}}} | | ||
+ | [[Category:{{{class9|}}} {{{type|Powers}}}]]{{ #if: {{{nolevelcat|}}} | <!-- don't categorize if nolevelcat is set --> | | ||
+ | [[Category:{{{class9|}}} {{{type|Powers}}} (Level {{{class9level}}})]] }}<!-- | ||
+ | |||
+ | -->{{ #if: {{{classX|}}} | | ||
+ | [[Category:{{{classX|}}} {{{type|Powers}}}]]{{ #if: {{{nolevelcat|}}} | <!-- don't categorize if nolevelcat is set --> | | ||
+ | [[Category:{{{classX|}}} {{{type|Powers}}} (Level {{{classXlevel}}})]] }}<!-- | ||
+ | |||
+ | --> | <!-- no 10th class entry --> }}<!-- | ||
+ | --> | <!-- no 9th class entry --> }}<!-- | ||
+ | --> | <!-- no 8th class entry --> }}<!-- | ||
+ | --> | <!-- no 7th class entry --> }}<!-- | ||
+ | --> | <!-- no 6th class entry --> }}<!-- | ||
+ | --> | <!-- no 5th class entry --> }}<!-- | ||
+ | --> | <!-- no 4th class entry --> }}<!-- | ||
+ | --> | <!-- no 3rd class entry --> }}<!-- | ||
+ | --> | <!-- no 2nd class entry --> }}<!-- | ||
+ | --> | <!-- no 1st class entry, maybe plain level: | ||
+ | |||
+ | -->{{ #if: {{{nolevelcat|}}} | <!-- unless nolevelcat is also set --> | <!-- | ||
+ | |||
+ | -->{{ #if: {{{level|}}} | | ||
+ | [[Category:{{{type|Powers}}} (Level {{{level}}})]] | <!-- | ||
+ | |||
+ | no level entry supplied | ||
+ | --> }} <!-- | ||
+ | nolevelcat false | ||
+ | --> }} <!-- | ||
+ | class1 not set | ||
+ | --> }}<!-- | ||
+ | noclasscat not set | ||
+ | --> }}<!-- | ||
+ | nocat not set | ||
+ | --> }}<!-- | ||
+ | not template | ||
+ | --> }}<!-- | ||
+ | |||
+ | --></includeonly><noinclude><!-- | ||
+ | |||
+ | -->This template is used to create spell (or similar) entries. The syntax is as follows; italics entries are optional. | ||
+ | <nowiki>{{Spell</nowiki> | ||
+ | | ''type'' = The type of effect being described. Defaults to "Powers"; | ||
+ | used for categorizing, so use plurals. | ||
+ | | ''name'' = The power's name. Defaults to the page's name. | ||
+ | | ''disc'' = The power's discipline. If omitted, the Discipline line is omitted | ||
+ | (including sub-discipline and descriptors). | ||
+ | | ''subschool'' = The power's sub-discipline. The parentheses are added by the template. | ||
+ | | ''desc'' = The power's descriptor(s). Brackets are added by the template. | ||
+ | | ''comp'' = The power's display. Defaults omitted. | ||
+ | | ''time'' = The power's manifesting time. Defaults omitted. | ||
+ | | ''range'' = The power's range. Defaults omitted. | ||
+ | | ''target'' = The power's target. Defaults omitted. | ||
+ | | ''effect'' = The power's effect. Defaults omitted. | ||
+ | | ''dur'' = The power's duration. Defaults omitted. | ||
+ | | ''save'' = The power's saving throw(s). Defaults omitted. | ||
+ | | ''PR'' = "yes" or "no" to whether PR applies. Defaults omitted. | ||
+ | | ''PP'' = The power's base Power Point cost. Defaults omitted. | ||
+ | | ''class1'' = The first class that can use the power. Defaults omitted, | ||
+ | and omits all classes and levels below. | ||
+ | | ''class1level'' = The power's level for the first class | ||
+ | | ''class2'' = Second class | ||
+ | | ''class2level'' = Second class's power level | ||
+ | ... | ||
+ | | ''class9'' = Ninth class | ||
+ | | ''class9level'' = Ninth class's power level | ||
+ | | ''classX'' = Tenth class; template only supports 10 classes | ||
+ | | ''classXlevel'' = Tenth class's power level | ||
+ | | ''level'' = Power level, not tied to a class. | ||
+ | Used only if no classes are used. | ||
+ | | ''nocat'' = If set at all, page with this template is | ||
+ | not categorized at all. | ||
+ | | ''noclasscat'' = If set at all, page with this template is | ||
+ | not added to each class's categories. | ||
+ | | ''nolevelcat'' = If set at all, page with this template is | ||
+ | not added to each level's categories. | ||
+ | }} | ||
+ | |||
+ | Any time <tt>class#</tt> is used, the corresponding <tt>class#level</tt> '''must''' also be assigned. The <tt>level</tt> parameter is ignored if <tt>class1</tt> is set, '''unless''' <tt>noclasscat</tt> is set and <tt>nolevelcat</tt> is not, in which case it may be used for categorization. If any <tt>class#</tt> is not set, all greater numbers are ignored. | ||
+ | |||
+ | This template assigns pages to the [[:Category:Powers]] category (assuming <tt>type</tt> is left to default), and to the individual categories given by "<tt>class#</tt> Powers" and "<tt>class#</tt> Powers (Level <tt>class#level</tt>)". To remove this behavior, use <tt>nocat</tt>, <tt>noclasscat</tt>, and/or <tt>nolevelcat</tt> (primarily used when a page has a list of powers and to use these categories would insert the page in ''every'' level's category). Templates are never categorized in this manner. | ||
+ | |||
+ | == Example == | ||
+ | <pre>{{Power | ||
+ | | name = Energy Ray | ||
+ | | disc = Psychokinesis | ||
+ | | desc = see text | ||
+ | | class1 = Psion | ||
+ | | class1level = 1 | ||
+ | | class2 = Wilder | ||
+ | | class2level = 1 | ||
+ | | disp = Auditory | ||
+ | | time = 1 standard action | ||
+ | | range = Close (25 ft. + 5 ft./2 levels) | ||
+ | | effect = Ray | ||
+ | | dur = Instantaneous | ||
+ | | save = None | ||
+ | | PR = Yes | ||
+ | | PP = 1 | ||
+ | }}</pre> | ||
+ | |||
+ | {{Power | ||
+ | | name = Energy Ray | ||
+ | | disc = Psychokinesis | ||
+ | | desc = see text | ||
+ | | class1 = Psion | ||
+ | | class1level = 1 | ||
+ | | class2 = Wilder | ||
+ | | class2level = 1 | ||
+ | | disp = Auditory | ||
+ | | time = 1 standard action | ||
+ | | range = Close (25 ft. + 5 ft./2 levels) | ||
+ | | effect = Ray | ||
+ | | dur = Instantaneous | ||
+ | | save = None | ||
+ | | PR = Yes | ||
+ | | PP = 1 | ||
+ | }} | ||
+ | |||
+ | [[Category:Wiki Templates]] | ||
+ | </noinclude> |