Difference between revisions of "Magic Effect"

1,039 bytes added ,  15 October
→‎Magic Item Description: fully documented the rules for text replacement, including an edge-case for bold text that I found via RE (though I've not verified it in-game)
(→‎Magic Item Description: <GLOBAL=ID> is supported here too, per reverse-engineering)
(→‎Magic Item Description: fully documented the rules for text replacement, including an edge-case for bold text that I found via RE (though I've not verified it in-game))
Line 131: Line 131:
* In the description of any [[Spell]], [[Enchantment]], [[Potion]], [[Scroll]], or [[Shout]] that uses the Effect, unless that item has a description of its own (which overrides any inherited descriptions).
* In the description of any [[Spell]], [[Enchantment]], [[Potion]], [[Scroll]], or [[Shout]] that uses the Effect, unless that item has a description of its own (which overrides any inherited descriptions).


This text field supports four special text replacement tags:
This text field supports text replacement tags similar to [[Text Replacement|those found in quest text]]. Text replacement tags will be displayed as bold text.


* '''<mag>:''' Magnitude
;&lt;mag&gt;
* '''<dur>:''' Duration
: The effect's magnitude. If the effect has been flagged as having no magnitude, then nothing is displayed.
* '''<area>:''' Area
;&lt;dur&gt;
* '''<global=EditorID>:''' The current value of the [[Global]] with the given <code>EditorID</code>.
: The effect's duration. If the effect has been flagged as having no duration, then nothing is displayed.
* '''<'''[TEXT]'''>:''' Bolds and enlarges the text enclosed in angle brackets <>
;&lt;area&gt;
** Note: including a period character ('.') anywhere within the angle brackets will result in that period and all text after it being truncated from the description. To bold whole sentences/phrases, '''<'''place the period outside the brackets, like this'''>'''.
: The effect's area. If the effect has been flagged as having no area, then nothing is displayed.
;&lt;global=''EditorID''&gt;
: The current value of the [[Global]] with the given editor ID. If no such global exists, then nothing is displayed. (Writing "&lt;global&gt;" has the same effect as failing to specify a valid global: nothing is displayed.)


This is the same basic syntax as [[Text Replacement|quest text replacement]]: <code>&lt;Token.Subtoken=Target&gt;</code>.
This is the same basic syntax as [[Text Replacement|quest text replacement]]: <code>&lt;Token.Subtoken=Target&gt;</code>, where the "subtoken" and "target" are optional (and ignored) unless noted above. When an unrecognized token is encountered, the token name is displayed in bold, but the subtoken name and target value are thrown away. This means that you can bold any text you want inside of an effect description, but only if that text doesn't contain a period (which denotes a subtoken) or an equal sign (which denotes a target). For example, <code>&lt;Hello, Dragonborn. How are you?&gt;</code> will be rendered as "'''Hello, Dragonborn'''" in bold, while <code>&lt;Hello, Dragonborn&gt;. &lt;How are you?&gt;</code> will be rendered as "'''Hello, Dragonborn'''. '''How are you?'''" Similarly, <code>&lt;E = MC squared&gt;</code> should be rendered as "'''E '''", while <code>&lt;E&gt; = &lt;MC squared&gt;</code> should be rendered as "'''E''' = '''MC squared'''".


====Papyrus Scripts====
====Papyrus Scripts====
142

edits