User:Gorgon/Sandbox/Sandbox Charlie: Difference between revisions

From Avlis Wiki
Jump to navigation Jump to search
m (Always forgetting something...)
m (spell name description tweaks)
 
(30 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{#switch:
<b>[[Magic:{{{School}}}|{{{School}}}]]</b> {{{Subschool}}} {{{Descriptors}}} <br>
  {{lc:              <!--Lower case the result-->
<b>[[Magic:Level|Level]]:</b> {{{Level}}}<br>
    <!--If no or empty "demospace" parameter then detect namespace-->
<b>[[Magic:Innate Level|Innate Level]]:</b> {{{Innate Level}}}<br>
    {{#if:{{{demospace|}}}
<b>[[Magic:Components|Component(s)]]:</b> {{{Components}}} <br>
    | {{{demospace}}}
<b>[[Magic:Casting Time|Casting Time]]:</b> {{{Casting Time}}} <br>
    | {{#if:{{{page|}}}
<b>[[Magic:Range|Range]]:</b> {{{Range}}} <br>
      | <!--Detect the namespace in the "page" parameter-->
<b>[[Magic:Target|Target]]:</b> {{{Target}}} <br>
        {{#ifeq:{{NAMESPACE:{{{page}}} }}|{{TALKSPACE:{{{page}}} }}
<b>[[Magic:Duration|Duration]]:</b> {{{Duration}}} <br>
        | talk
<b>[[Magic:Counter|Counter(s)]]:</b> {{{Counters}}}<br>
        | {{SUBJECTSPACE:{{{page}}} }}
<b>[[Magic:Saving Throw|Saving Throw]]:</b> {{{Saving Throw}}} <br>
        }}
<b>[[Magic:Spell Resistance|Spell Resistance]]:</b> {{{Spell Resistance}}} <br>
      | <!--No "demospace" or "page" parameters, so detect actual namespace-->
<b>[[Magic:Metamagic|Metamagic]]:</b> {{{Metamagic}}}<br>
        {{#ifeq:{{NAMESPACE}}|{{TALKSPACE}}
<b>[[Magic:Energy Substitution|Energy Substitution]]:</b> {{{Energy Substitution}}}<br>
        | talk
        | {{SUBJECTSPACE}}
        }}
      }}
    }}
  }}
<!-- Only one of the lines below will be executed -->
<!-- Respecting empty parameters on purpose -->
| main        <!--"demospace=main" or {{SUBJECTSPACE}}={{ns:0}}=""-->
|            = {{{main| {{{other|}}} }}}
| talk      = {{{talk| {{{other|}}} }}}
| user      = {{{user| {{{other|}}} }}}
| avlis wiki = {{{avlis wiki| {{{other|}}} }}}
| file
| image      = {{{file| {{{image| {{{other|}}} }}} }}}
| mediawiki  = {{{mediawiki| {{{other|}}} }}}
| template  = {{{template| {{{other|}}} }}}
| help      = {{{help| {{{other|}}} }}}
| category  = {{{category| {{{other|}}} }}}
| other
| #default  = {{{other|}}}   <!--"demospace=other" or a new namespace-->


}}<!--End switch--><noinclude>
{{{Description}}}
<noinclude>


==Template data==


== Template:Ns detect (Namespace detect) ==
<templatedata>
 
{
This template is based on <span class="plainlinks">[http://www.mediawiki.org/wiki/Template:Namespace_detect Template:Namespace detect]</span>.
    "description": "Spell template parameter descriptions.\nNote: All parameter values (except the 'Description') should be in uppercase unless using full sentences. Try to keep any description of effects in the 'Description' parameter.",
 
    "format": "block",
It uses the original markup, modified for Avlis wiki namespaces. The documentation below was copied to this template, since we do not use [[Wikipedia:Wikipedia:Template_documentation#How_to_create_a_documentation_subpage | documentation sub-pages]]. It has also been modified for Avlis namespaces, and most of the <span class="plainlinks">[http://www.mediawiki.org/wiki/MediaWiki MediaWiki]</span> specific information, links and sub-templates have either been removed, or modified for the Avlis wiki. It has been reformatted, and several sections modified for improved clarity.
    "params": {
 
        "Name": {
See the <span class="plainlinks">[http://www.mediawiki.org/wiki/Template:Namespace_detect/doc original template documentation]</span> for further details.
            "label": "Spell Name",
 
            "description": "The name of the spell that shows in the main [[Magic:Spell_List|Spell List]] and spell school category lists.\n- It should match the page name, but without any underscores.\n- All words in the spell name use [[Wikipedia:Title_case|Title Case]]. All words are capitalized, except for minor words (typically articles, short prepositions, and some conjunctions) that are not the first or last word of the spell name.",
 
            "example": "Cone of Cold",
== Template documentation ==
            "type": "line",
 
            "required": true
This is the '''<nowiki>{{ns detect}}</nowiki>''' (Namespace detect) meta-template.
        },
 
        "School": {
It helps other templates detect what type of namespace they are used in.
            "label": "School",
 
            "description": "The [[Magic:School|Magical School]] to which the spell belongs.",
It detects and groups all of the different <span class="plainlinks">[http://wiki.avlis.org/mediawiki/api.php?action=query&meta=siteinfo&siprop=namespaces namespaces]</span> used on the Avlis wiki into several types:
            "type": "line",
 
            "suggestedvalues": [
:'''main''' = Main/article namespace, as in normal Avlis wiki articles.
                "Abjuration",
:'''talk''' = Any talk namespace, such as page names that start with "Talk:", "User talk:", "File talk:" and so on.
                "Conjuration",
:'''user, avlis wiki, file, mediawiki, template, help, and category''' = The other namespaces, except for talk namespace pages.
                "Divination",
:'''other''' = Any namespaces that were not specified as a parameter to the template. ''See the '''Note:''' in the "[[#Parameters | Parameters]]" section below.''
                "Enchantment",
 
                "Evocation",
''For backwards compatibility, this template also understands the old name '''image''' for '''file'''. But using '''image''' is now deprecated.''
                "Illusion",
 
                "Necromancy",
 
                "Transmutation",
=== Usage ===
                "Universal"
 
            ],
'''Note:''' The following examples use multiple lines for improved readability. All of them can be written as single lines as well.
            "required": true
 
        },
E.g., <code><nowiki>{{ns detect | main = Article text | talk = Talk page text | other = Other pages text}}</nowiki></code> for the first example below.
        "Subschool": {
 
            "label": "Sub-School",
 
            "description": "The [[Magic:Subschool|Sub-School]] to which the spell belongs.\n- Only [[Magic:Conjuration|Conjuration]], [[Magic:Enchantment|Enchantment]], and [[Magic:Illusion|Illusion]] schools can have a sub-school.\n- Include a link to the specific sub-school entry when adding one, and place it inside of round (brackets).",
This template takes one or more parameters, named after the different namespace types listed above. Like this:
            "example": "([[Magic:Conjuration#Calling|Calling]]) / ([[Magic:Enchantment#Compulsion|Compulsion]])",
 
            "type": "line",
<pre style="white-space: pre">
            "default": "",
{{ns detect
            "suggestedvalues": [
| main  = Article text
                "([[Magic:Conjuration#Calling|Calling]])",
| talk  = Talk page text
                "([[Magic:Conjuration#Creation|Creation]])",
| other = Other pages text
                "([[Magic:Conjuration#Healing|Healing]])",
}}
                "([[Magic:Conjuration#Summoning|Summoning]])",
</pre>
                "([[Magic:Enchantment#Charm|Charm]])",
 
                "([[Magic:Enchantment#Compulsion|Compulsion]])",
If the template is in a main (article) namespace page, it will return this:
                "([[Magic:Illusion#Figment|Figment]])",
 
                "([[Magic:Illusion#Glamer|Glamer]])",
:{{<!-- ns detect -->User:Gorgon/Sandbox/Sandbox Charlie| demospace=main
                "([[Magic:Illusion#Pattern|Pattern]])",
| main  = Article text
                "([[Magic:Illusion#Phantasm|Phantasm]])",
| talk  = Talk page text
                "([[Magic:Illusion#Shadow|Shadow]])"
| other = Other pages text
            ]
}}
        },
 
        "Descriptors": {
If the template is used in any other namespace page than a main (article), or a talk page, it will return this:
            "label": "Descriptors",
 
            "description": "[[Magic:Descriptors|Descriptors]] indicate the nature of a spell.\n- Include a link to the specific [[Magic:Descriptors|Descriptors]] entry when adding one.\n- Spells may have multiple descriptors, and they should all be inside a set of square [ brackets ].",
:{{<!-- ns detect -->User:Gorgon/Sandbox/Sandbox Charlie
            "example": "[ [[Magic:Descriptors#Acid|Acid]] ] / [ [[Magic:Descriptors#Good|Good]], [[Magic:Descriptors#Evil|Evil]] ]",
| main  = Article text
            "type": "line",
| talk  = Talk page text
            "default": "",
| other = Other pages text
            "suggestedvalues": [
}}
                "[ [[Magic:Descriptors#Acid|Acid]] ]",
 
                "[ [[Magic:Descriptors#Chaotic|Chaotic]] ]",
 
                "[ [[Magic:Descriptors#Cold|Cold]] ]",
The example above made the template return something for all other namespace page types. But if we don't use the '''other''' parameter, or leave it empty, then it will not return anything for the other namespace page types. Like this:
                "[ [[Magic:Descriptors#Darkness|Darkness]] ]",
 
                "[ [[Magic:Descriptors#Death|Death]] ]",
<pre style="white-space: pre">
                "[ [[Magic:Descriptors#Disease|Disease]] ]",
{{ns detect
                "[ [[Magic:Descriptors#Divine|Divine]] ]",
| file    = File page text
                "[ [[Magic:Descriptors#Electricity|Electricity]] ]",
| category = Category page text
                "[ [[Magic:Descriptors#Evil|Evil]] ]",
| other    =
                "[ [[Magic:Descriptors#Fear|Fear]] ]",
}}
                "[ [[Magic:Descriptors#Fire|Fire]] ]",
</pre>
                "[ [[Magic:Descriptors#Force|Force]] ]",
 
                "[ [[Magic:Descriptors#Good|Good]] ]",
In any pages, other than file and category namespace pages, the code above will render nothing.
                "[ [[Magic:Descriptors#Language-dependent|Language-dependent]] ]",
<!-- Do not remove this one. It is supposed to render nothing, but we have it here for testing purposes. -->
                "[ [[Magic:Descriptors#Lawful|Lawful]] ]",
:{{<!-- ns detect -->User:Gorgon/Sandbox/Sandbox Charlie
                "[ [[Magic:Descriptors#Light|Light]] ]",
| file    = File page text
                "[ [[Magic:Descriptors#Mind-affecting|Mind-affecting]] ]",
| category = Category page text
                "[ [[Magic:Descriptors#Negative|Negative]] ]",
| other    =
                "[ [[Magic:Descriptors#Nature|Nature]] ]",
}}
                "[ [[Magic:Descriptors#Paralyze|Paralyze]] ]",
 
                "[ [[Magic:Descriptors#Poison|Poison]] ]",
 
                "[ [[Magic:Descriptors#Positive|Positive]] ]",
By using an empty parameter, you can make it so the template doesn't render anything for a specific namespace type page. Like this:
                "[ [[Magic:Descriptors#Sonic|Sonic]] ]",
 
                "[ [[Magic:Descriptors#Teleportation|Teleportation]] ]",
<pre style="white-space: pre">
                "[ [[Magic:Descriptors#Weapon_Enchantment|Weapon Enchantment]] ]"
{{ns detect
            ]
| main  =
        },
| other = Other pages text
        "Level": {
}}
            "label": "Class/Domain Levels",
</pre>
            "description": "[[Magic:Level|Level]] shows abbreviations for each class that can cast this spell and at what level it is cast. It also indicates if a spell is a domain spell and at what its level is cast.\n- Standard spellcasting class abbreviations are: Brd, Clr, Drd, Pal, Rgr, Sor/Wiz.\n- Include a link to the [[Magic:Level|domain]] entry when adding one (see the included example for [[Magic:Haste|Haste]]).",
 
            "example": "Brd 3, Sor/Wiz 3, [[Magic:Level#Travel|Travel 5]]",
The code above will render nothing when in main (article) namespace pages, but will return this when in other namespace type pages:
            "type": "line",
 
            "required": true
:{{<!-- ns detect -->User:Gorgon/Sandbox/Sandbox Charlie
        },
| main  =
        "Innate Level": {
| other = Other pages text
            "label": "Innate Level",
}}
            "description": "[[Magic:Innate_Level|Innate Level]] is the level number of the the spell when there is no reference to a particular spellcasting class. Typically, the innate level is the lowest spell level among all the classes that can cast the spell (check the 'Innate' column for the spell in [https://nwn.wiki/display/NWN1/spells.2da spells.2da]).\n- The innate level is used when a class-dependent spell level cannot be determined, such as a spell cast from an item. It is also used when countering the spell with [[nwn:Counterspell|universal counter spells]].",
 
            "type": "number",
 
            "required": true
As an extended example of empty parameter usage, if you need to assign the same value to more than one namespace type parameter as a result, and the value is a larger block of code, it is inefficient to duplicate the same code for multiple parameter values. Instead, you can use empty parameters to return nothing for namespace type pages that you don't want the value used in (all except the ones you need), and then use the '''other''' parameter value to return the result of your block of code for the namespace type pages that you do want it in. Like this:
        },
 
        "Components": {
<pre style="white-space: pre">
            "label": "Components",
{{ns detect
            "description": "[[Magic:Components|Components]] indicates what the character must do to cast the spell. Spells in NWN only use V (Verbal) and/or S (Somatic) as components unless they include extra component code (see: [https://nwn.wiki/display/NWN1/spells.2da spells.2da - 'VS']).",
| talk = | avlis wiki = | file = | mediawiki = | help = | category =
            "type": "line",
| other = {{{|Result of large, multi-line block of code.}}}
            "suggestedvalues": [
}}
                "V",
</pre>
                "S",
                "V, S"
For the result below, when in main (article), user and template namespace pages, the code above will use the '''other''' parameter value, since those 3 namespace types weren't included as parameters. When in all other namespace type pages, nothing is returned, since they all have empty values:
            ],
 
            "required": true
:{{<!-- ns detect -->User:Gorgon/Sandbox/Sandbox Charlie
        },
| talk = | avlis wiki = | file = | mediawiki = | help = | category =
        "Casting Time": {
| other = {{{|Result of large, multi-line block of code.}}}
            "label": "Casting Time",
}}
            "description": "[[Magic:Casting_Time|Casting Time]] in NWN is 1 Action. The actual casting time can vary by a few seconds, but you can cast 1 spell per round as an action (more actions while hasted, quickened, and so on).",
 
            "type": "line",
 
            "default": "1 Action",
=== Demospace and page ===
            "required": true
 
        },
For testing and demonstration purposes, this template can take two parameters, named '''demospace''' and '''page'''. Only assign a value to one of these in your template. If both have values assigned, then only the '''demospace''' parameter will be used.
        "Range": {
 
            "label": "Target Range",
'''Demospace''' understands any of the namespace type names used by this template, including the '''other''' namespace type. It tells the template to behave like it is in a specific namespace type page. Like this:
            "description": "[[Magic:Range|Range]] is the maximum distance from the caster at which the spell can affect a target.\n- Ranges are: (P) Personal - 0m, (T) Touch - 2.25m, (S) Short - 8m, (M) Medium - 20m, (L) Long - 40m.",
 
            "type": "line",
<pre style="white-space: pre">
            "suggestedvalues": [
{{ns detect
                "P",
| main      = Article text
                "T",
| other    = Other pages text
                "S",
| demospace = main
                "M",
}}
                "L"
</pre>
            ],
 
            "required": true
No matter what namespace the code above is used in, it will return this:
        },
 
        "Target": {
:{{<!-- ns detect -->User:Gorgon/Sandbox/Sandbox Charlie
            "label": "Target",
| main      = Article text
            "description": "[[Magic:Target|Target]] lists what is affected and the area of effect.\n- Format begins with either 'Caster', 'Target', or 'Area', optionally followed by the area of effect size. If the target can be either an object or area location, then use both.\n- Standard AoE sizes (non-standard sizes are also used): Personal, Single, Small - 1.67m, Medium - 3.33m, Large - 5.0m, Huge - 6.67m, Gargantuan  - 8.33m, Colossal - 10m.",
| other    = Other pages text
            "example": "Caster: Personal / Target: Single / Area: Medium / Target/Area: 14m Cone",
| demospace = main
            "type": "line",
}}
            "required": true
 
        },
 
        "Duration": {
The '''page''' parameter instead takes a "namespace:pagename" value. It makes this template behave as if rendered in that page's namespace type. The page name doesn't have to be an existing page. Like this:
            "label": "Duration",
 
            "description": "[[Magic:Duration|Duration]] is how long the spell lasts.\n- Standard durations are: Instantaneous, Permanent, Concentration, Discharge, or a timed duration value.\n- If the duration line ends with '(D)', the character can dismiss the spell at will (e.g., [[Magic:Shapechange|Shapechange]]).\n- Discharge means the same as 'Permanent (D)', with it only dispelled by the caster (e.g., Shifter forms if they were spells).\n- Avlis spell durations are all measured in 'real life' seconds or minutes. 'In game' time (i.e. the 20 RL minutes per game hour server setting) has no effect on hooked spell durations. There are no 'hour per level' or 'per day' hooked spells in Avlis (all old hour durations are '4 minutes', and day durations are '96 minutes').\n- The term 'turn' no meaning in NWN, and should always be replaced with 'minute'.\n- A 'round' does have special meaning in NWN, but as far as spell durations, it is '6 seconds' ('round' may be included for completeness).\n- You may use the suggested values as a base and edit them to suit your needs. See the examples.",
<pre style="white-space: pre">
            "example": "Instantaneous / 1 Round (6 Seconds)/2 Levels  / 1 Minute/Level / 4 Minutes/Level / 96 Minutes",
{{ns detect
            "type": "line",
| user  = User page text
            "suggestedvalues": [
| other = Other pages text
                "Instantaneous",
| page  = User:Example
                "Permanent",
}}
                "Concentration",
</pre>
                "Discharge",
 
                "1 Round (6 Seconds)/Level",
No matter what namespace the code above is used in, it will return this:
                "1 Minute/Level",
 
                "4 Minutes/Level",
:{{<!-- ns detect -->User:Gorgon/Sandbox/Sandbox Charlie
                "96 Minutes"
| user  = User page text
            ],
| other = Other pages text
            "required": true
| page  = User:Example
        },
}}
        "Counters": {
 
            "label": "Counters",
'''Note:''' The value of '''page''' is only used to determine the namespace type of that page. The "pagename" part of the "namespace:pagename" value isn't used for anything, but is required by the '''<nowiki>{{NAMESPACE}}</nowiki>''', '''<nowiki>{{TALKSPACE}}</nowiki>''' and '''<nowiki>{{SUBJECTSPACE}}</nowiki>''' magic words that are used by the '''<nowiki>{{ns detect}}</nowiki>''' template (see: [http://www.mediawiki.org/wiki/Help:Magic_words#Namespaces Help:Magic words#Namespaces]). The '''demospace''' parameter is usually a better choice for setting an alternate namespace type in testing, unless you need to use a "namespace:pagename" value.
            "description": "[[Magic:Counter|Counters]] is a list of additional counter spells. This is a required parameter. If the spell doesn't have extra counters, or you don't know them, always use the default value of '--' (do not use 'None').\n- Include a link to the spell entry when adding one (see the included example for [[Magic:Entangle|Entangle]]).",
 
            "example": "[[Magic:Freedom of Movement|Freedom of Movement]]",
 
            "type": "line",
It may be convenient to define the '''demospace''' and/or '''page''' parameters as (optional) named parameters by the page using your template, and send them on to the '''<nowiki>{{ns detect}}</nowiki>''' template.
            "default": "--",
 
            "required": true
E.g., A sandbox page in a userspace <code>User:Example/sandbox</code> for testing your template '''<nowiki>{{mytemplate}}</nowiki>''' as if it was in the main namespace:
        },
 
        "Saving Throw": {
:'''Code in User:Example/sandbox:''' <code><nowiki>{{mytemplate | demospace = main}}</nowiki></code> or <code><nowiki>{{mytemplate | page = Example page}}</nowiki></code>
            "label": "Saving Throw",
 
            "description": "[[Magic:Saving_Throw|Saving Throw]] lists if the spell allows a save, what type(s), and the effects.\n- Anything more than a few words should be in the main 'Description'. Get the general save info in there and they can read on if they need to.",
:'''Note:''' There is no "Main:" prefix on pages in the main namespace, so only the <code>Example page</code> "pagename" is required.
            "example": "Fortitude: Negates, Will: Half / Reflex 1/2 (Evasion Ineffective) / Will And Fortitude: Partial",
 
            "type": "line",
:''This also allows testing other namespaces types from the same sandbox page by changing the parameter values, even using preview mode.''
            "suggestedvalues": [
 
                "None",
Then in your '''<nowiki>{{mytemplate}}</nowiki>''' template, do like this:
                "Fortitude",
 
                "Reflex",
<pre style="white-space: pre">
                "Will"
{{ns detect
            ],
| main      = Article text
            "required": true
| other    = Other pages text
        },
| demospace = {{{demospace|}}}
        "Spell Resistance": {
| page      = {{{page|}}}
            "label": "Spell Resistance",
}}
            "description": "[[Magic:Spell_Resistance|Spell Resistance]] shows if spell resistance (SR) resists this spell.\n- Do not guess. If you don't know, leave it blank.",
</pre>
            "type": "line",
 
            "default": "",
These parameters will be used by the template only if defined by the page using your template. If both the '''demospace''' and '''page''' parameters are empty, or undefined, then the template will detect namespace types as usual for the page. As described above, if both the '''demospace''' and '''page''' parameters have values assigned, then only the '''demospace''' parameter will be used.
            "suggestedvalues": [
 
                "No",
 
                "Yes"
=== Parameters ===
            ]
 
        },
List of all parameters:
        "Metamagic": {
 
            "label": "Metamagic",
<pre style="white-space: pre">
            "description": "[[Magic:Metamagic|Metamagic]] that can be use with this spell.\n- This can be a bit complicated to set correctly. [https://nwn.wiki/display/NWN1/spells.2da spells.2da 'MetaMagic'] determines what a caster can do with spell metamagic feats, but the code determines what effects can happen. Metamagic rods and other sources override (ignore) spells.2da settings, but they will not do anything if the code doesn't support it.\n- Do not guess. If you don't know, and don't have access to code source to confirm it, only add what you are sure of.\n- Do not say 'None'. Leave it blank instead. There are many custom metamagic types that will almost certainly work, even if the standard ones don't.\n- Do not use custom Avlis metamagic values here (only the types in the example). None of the custom metamagic applies to specific spells, and it should be obvious if they affect certain spell types.",
{{ns detect
            "example": "Extend, Empower, Maximize, Silent, Still, Quicken",
| main      =
            "type": "line",
| talk      =
            "default": ""
| user      =
        },
| avlis wiki =
        "Energy Substitution": {
| file      =
            "label": "Energy Substitution",
| mediawiki  =
            "description": "[[Magic:Energy_Substitution|Energy Substitution]] shows if the spell can use energy substitution.\n- This is enabled in the spell code, and can be used with metamagic rods.\n- Do not guess. If you don't know, leave it blank.",
| template  =
            "type": "line",
| help      =
            "default": "",
| category  =
            "suggestedvalues": [
| other      =
                "No",
| demospace  = {{{demospace|}}}
                "Yes"
              One of: main, talk, user, avlis wiki,
            ]
                      file, mediawiki, template,
        },
                      help, category, other
        "Description": {
| page      = {{{page|}}} E.g., User:Example
            "label": "Spell Description",
}}
            "description": "Details of what the spell does and how it works.\n- Only add details for what a spell actually does in game terms. This is about the facts.\n- [[Wikipedia:WYSIWYG|WYSIWYG]] in game, and nothing more. Do not add imagined or flowery descriptive details.\n- Do not include details about what a spell is supposed to do, whether or not a fix/update may happen in the future. Only describe the current spell behavior. The wiki can be updated if/when changes are made.",
</pre>
            "type": "unbalanced-wikitext",
 
            "required": true
'''Note:''' Empty values for the '''main''' through '''category''' parameters are different than not including (defining) them. An undefined parameter (i.e, one you do not include in your template usage) will use the result of the '''other''' parameter when in that namespace type. Any that are defined, but not assigned a value (i.e, included in the template usage, but nothing after the = ) will render nothing when used in that namespace type.
        }
 
    },
 
    "paramOrder": [
=== Technical details ===
        "Name",
 
        "School",
If you intend to use <span class="plainlinks">[http://www.mediawiki.org/wiki/Help:Tables wikitables]</span> as parameter values in this template, then you need to know this:
        "Subschool",
 
        "Descriptors",
<span class="plainlinks">[http://www.mediawiki.org/wiki/Help:Templates Templates]</span> have a problem handling parameter data that contains pipes "<code>|</code>", unless the pipe is inside another template <code><nowiki>{{name|param1}}</nowiki></code>, or inside a piped link <code><nowiki>[[Help:Template|help]]</nowiki></code>. Therefore templates can not handle wikitables as input, unless you escape them by using the '''<nowiki>{{!}}</nowiki>''' magic word (parser function - see: <span class="plainlinks">[http://www.mediawiki.org/wiki/Help:Magic_words#Other Help:Magic words#Other]</span>). This makes it hard to use wikitables as parameters in templates. Instead, the usual solution is to use [[Wikipedia:Help:HTML_in_wikitext | HTML wikimarkup]] for the table code, which is more robust.
        "Level",
 
        "Innate Level",
'''''Note:''' [[Template:!]] functionality was replaced in MediaWiki version 1.24 by the '''<nowiki>{{!}}</nowiki>''' magic word, and the template is ignored when using it.''
        "Components",
 
        "Casting Time",
<!-- [[Category:Templates|{{PAGENAME}}]] --></noinclude>
        "Range",
        "Target",
        "Duration",
        "Counters",
        "Saving Throw",
        "Spell Resistance",
        "Metamagic",
        "Energy Substitution",
        "Description"
    ]
}
</templatedata>
</noinclude>

Latest revision as of 00:22, 5 January 2024

[[Magic:{{{School}}}|{{{School}}}]] {{{Subschool}}} {{{Descriptors}}}
Level: {{{Level}}}
Innate Level: {{{Innate Level}}}
Component(s): {{{Components}}}
Casting Time: {{{Casting Time}}}
Range: {{{Range}}}
Target: {{{Target}}}
Duration: {{{Duration}}}
Counter(s): {{{Counters}}}
Saving Throw: {{{Saving Throw}}}
Spell Resistance: {{{Spell Resistance}}}
Metamagic: {{{Metamagic}}}
Energy Substitution: {{{Energy Substitution}}}

{{{Description}}}


Template data

<templatedata> {

   "description": "Spell template parameter descriptions.\nNote: All parameter values (except the 'Description') should be in uppercase unless using full sentences. Try to keep any description of effects in the 'Description' parameter.",
   "format": "block",
   "params": {
       "Name": {
           "label": "Spell Name",
           "description": "The name of the spell that shows in the main Spell List and spell school category lists.\n- It should match the page name, but without any underscores.\n- All words in the spell name use Title Case. All words are capitalized, except for minor words (typically articles, short prepositions, and some conjunctions) that are not the first or last word of the spell name.",
           "example": "Cone of Cold",
           "type": "line",
           "required": true
       },
       "School": {
           "label": "School",
           "description": "The Magical School to which the spell belongs.",
           "type": "line",
           "suggestedvalues": [
               "Abjuration",
               "Conjuration",
               "Divination",
               "Enchantment",
               "Evocation",
               "Illusion",
               "Necromancy",
               "Transmutation",
               "Universal"
           ],
           "required": true
       },
       "Subschool": {
           "label": "Sub-School",
           "description": "The Sub-School to which the spell belongs.\n- Only Conjuration, Enchantment, and Illusion schools can have a sub-school.\n- Include a link to the specific sub-school entry when adding one, and place it inside of round (brackets).",
           "example": "(Calling) / (Compulsion)",
           "type": "line",
           "default": "",
           "suggestedvalues": [
               "(Calling)",
               "(Creation)",
               "(Healing)",
               "(Summoning)",
               "(Charm)",
               "(Compulsion)",
               "(Figment)",
               "(Glamer)",
               "(Pattern)",
               "(Phantasm)",
               "(Shadow)"
           ]
       },
       "Descriptors": {
           "label": "Descriptors",
           "description": "Descriptors indicate the nature of a spell.\n- Include a link to the specific Descriptors entry when adding one.\n- Spells may have multiple descriptors, and they should all be inside a set of square [ brackets ].",
           "example": "[ Acid ] / [ Good, Evil ]",
           "type": "line",
           "default": "",
           "suggestedvalues": [
               "[ Acid ]",
               "[ Chaotic ]",
               "[ Cold ]",
               "[ Darkness ]",
               "[ Death ]",
               "[ Disease ]",
               "[ Divine ]",
               "[ Electricity ]",
               "[ Evil ]",
               "[ Fear ]",
               "[ Fire ]",
               "[ Force ]",
               "[ Good ]",
               "[ Language-dependent ]",
               "[ Lawful ]",
               "[ Light ]",
               "[ Mind-affecting ]",
               "[ Negative ]",
               "[ Nature ]",
               "[ Paralyze ]",
               "[ Poison ]",
               "[ Positive ]",
               "[ Sonic ]",
               "[ Teleportation ]",
               "[ Weapon Enchantment ]"
           ]
       },
       "Level": {
           "label": "Class/Domain Levels",
           "description": "Level shows abbreviations for each class that can cast this spell and at what level it is cast. It also indicates if a spell is a domain spell and at what its level is cast.\n- Standard spellcasting class abbreviations are: Brd, Clr, Drd, Pal, Rgr, Sor/Wiz.\n- Include a link to the domain entry when adding one (see the included example for Haste).",
           "example": "Brd 3, Sor/Wiz 3, Travel 5",
           "type": "line",
           "required": true
       },
       "Innate Level": {
           "label": "Innate Level",
           "description": "Innate Level is the level number of the the spell when there is no reference to a particular spellcasting class. Typically, the innate level is the lowest spell level among all the classes that can cast the spell (check the 'Innate' column for the spell in spells.2da).\n- The innate level is used when a class-dependent spell level cannot be determined, such as a spell cast from an item. It is also used when countering the spell with universal counter spells.",
           "type": "number",
           "required": true
       },
       "Components": {
           "label": "Components",
           "description": "Components indicates what the character must do to cast the spell. Spells in NWN only use V (Verbal) and/or S (Somatic) as components unless they include extra component code (see: spells.2da - 'VS').",
           "type": "line",
           "suggestedvalues": [
               "V",
               "S",
               "V, S"
           ],
           "required": true
       },
       "Casting Time": {
           "label": "Casting Time",
           "description": "Casting Time in NWN is 1 Action. The actual casting time can vary by a few seconds, but you can cast 1 spell per round as an action (more actions while hasted, quickened, and so on).",
           "type": "line",
           "default": "1 Action",
           "required": true
       },
       "Range": {
           "label": "Target Range",
           "description": "Range is the maximum distance from the caster at which the spell can affect a target.\n- Ranges are: (P) Personal - 0m, (T) Touch - 2.25m, (S) Short - 8m, (M) Medium - 20m, (L) Long - 40m.",
           "type": "line",
           "suggestedvalues": [
               "P",
               "T",
               "S",
               "M",
               "L"
           ],
           "required": true
       },
       "Target": {
           "label": "Target",
           "description": "Target lists what is affected and the area of effect.\n- Format begins with either 'Caster', 'Target', or 'Area', optionally followed by the area of effect size. If the target can be either an object or area location, then use both.\n- Standard AoE sizes (non-standard sizes are also used): Personal, Single, Small - 1.67m, Medium - 3.33m, Large - 5.0m, Huge - 6.67m, Gargantuan  - 8.33m, Colossal - 10m.",
           "example": "Caster: Personal / Target: Single / Area: Medium / Target/Area: 14m Cone",
           "type": "line",
           "required": true
       },
       "Duration": {
           "label": "Duration",
           "description": "Duration is how long the spell lasts.\n- Standard durations are: Instantaneous, Permanent, Concentration, Discharge, or a timed duration value.\n- If the duration line ends with '(D)', the character can dismiss the spell at will (e.g., Shapechange).\n- Discharge means the same as 'Permanent (D)', with it only dispelled by the caster (e.g., Shifter forms if they were spells).\n- Avlis spell durations are all measured in 'real life' seconds or minutes. 'In game' time (i.e. the 20 RL minutes per game hour server setting) has no effect on hooked spell durations. There are no 'hour per level' or 'per day' hooked spells in Avlis (all old hour durations are '4 minutes', and day durations are '96 minutes').\n- The term 'turn' no meaning in NWN, and should always be replaced with 'minute'.\n- A 'round' does have special meaning in NWN, but as far as spell durations, it is '6 seconds' ('round' may be included for completeness).\n- You may use the suggested values as a base and edit them to suit your needs. See the examples.",
           "example": "Instantaneous / 1 Round (6 Seconds)/2 Levels  / 1 Minute/Level / 4 Minutes/Level / 96 Minutes",
           "type": "line",
           "suggestedvalues": [
               "Instantaneous",
               "Permanent",
               "Concentration",
               "Discharge",
               "1 Round (6 Seconds)/Level",
               "1 Minute/Level",
               "4 Minutes/Level",
               "96 Minutes"
           ],
           "required": true
       },
       "Counters": {
           "label": "Counters",
           "description": "Counters is a list of additional counter spells. This is a required parameter. If the spell doesn't have extra counters, or you don't know them, always use the default value of '--' (do not use 'None').\n- Include a link to the spell entry when adding one (see the included example for Entangle).",
           "example": "Freedom of Movement",
           "type": "line",
           "default": "--",
           "required": true
       },
       "Saving Throw": {
           "label": "Saving Throw",
           "description": "Saving Throw lists if the spell allows a save, what type(s), and the effects.\n- Anything more than a few words should be in the main 'Description'. Get the general save info in there and they can read on if they need to.",
           "example": "Fortitude: Negates, Will: Half / Reflex 1/2 (Evasion Ineffective) / Will And Fortitude: Partial",
           "type": "line",
           "suggestedvalues": [
               "None",
               "Fortitude",
               "Reflex",
               "Will"
           ],
           "required": true
       },
       "Spell Resistance": {
           "label": "Spell Resistance",
           "description": "Spell Resistance shows if spell resistance (SR) resists this spell.\n- Do not guess. If you don't know, leave it blank.",
           "type": "line",
           "default": "",
           "suggestedvalues": [
               "No",
               "Yes"
           ]
       },
       "Metamagic": {
           "label": "Metamagic",
           "description": "Metamagic that can be use with this spell.\n- This can be a bit complicated to set correctly. spells.2da 'MetaMagic' determines what a caster can do with spell metamagic feats, but the code determines what effects can happen. Metamagic rods and other sources override (ignore) spells.2da settings, but they will not do anything if the code doesn't support it.\n- Do not guess. If you don't know, and don't have access to code source to confirm it, only add what you are sure of.\n- Do not say 'None'. Leave it blank instead. There are many custom metamagic types that will almost certainly work, even if the standard ones don't.\n- Do not use custom Avlis metamagic values here (only the types in the example). None of the custom metamagic applies to specific spells, and it should be obvious if they affect certain spell types.",
           "example": "Extend, Empower, Maximize, Silent, Still, Quicken",
           "type": "line",
           "default": ""
       },
       "Energy Substitution": {
           "label": "Energy Substitution",
           "description": "Energy Substitution shows if the spell can use energy substitution.\n- This is enabled in the spell code, and can be used with metamagic rods.\n- Do not guess. If you don't know, leave it blank.",
           "type": "line",
           "default": "",
           "suggestedvalues": [
               "No",
               "Yes"
           ]
       },
       "Description": {
           "label": "Spell Description",
           "description": "Details of what the spell does and how it works.\n- Only add details for what a spell actually does in game terms. This is about the facts.\n- WYSIWYG in game, and nothing more. Do not add imagined or flowery descriptive details.\n- Do not include details about what a spell is supposed to do, whether or not a fix/update may happen in the future. Only describe the current spell behavior. The wiki can be updated if/when changes are made.",
           "type": "unbalanced-wikitext",
           "required": true
       }
   },
   "paramOrder": [
       "Name",
       "School",
       "Subschool",
       "Descriptors",
       "Level",
       "Innate Level",
       "Components",
       "Casting Time",
       "Range",
       "Target",
       "Duration",
       "Counters",
       "Saving Throw",
       "Spell Resistance",
       "Metamagic",
       "Energy Substitution",
       "Description"
   ]

} </templatedata>