Difference between revisions of "Template:Book"
From sureai
(Possible fix for incorrect template stacking) |
Codered999 (Talk | contribs) (Complete restructure for smart Spell Tome handling) |
||
Line 1: | Line 1: | ||
− | {| style = "float: right; border-collapse: collapse; margin: 5px 5px 10px 20px; width: 300px; clear: right; " | + | {| style = "float: right; border-collapse: collapse; margin: 5px 5px 10px 20px; width: 300px; max-width: 400px; clear: right; " |
− | | colspan = "4" style = "background: RGB(147, 56, 56); border-radius: 5px; text-align: center; color: white; font-weight: bold; " | <div style = "font-size: 150%; padding: 0 10px; " >{{{name|{{PAGENAME}}}}}</div> {{#if: {{{formid|}}} | (FormID: {{{formid}}}) |}} | + | | colspan = "4" style = "background: RGB(147, 56, 56); border-radius: 5px; text-align: center; color: white; font-weight: bold; " | <div style = "font-size: 150%; padding: 0 10px; " >{{{name|{{PAGENAME}}}}}{{#ifeq: {{{type|}}} | Spell Tome | <nowiki> [Book]</nowiki> | |}}</div> {{#if: {{{formid|}}} | (FormID: {{{formid}}}) |}} |
− | |- | + | |-{{#ifeq: {{{type|}}} | Spell Tome | style="display: none;" |}} |
| style = "text-align: right; padding-right: 10px; width: 35%; " | '''Editor Name''' | | style = "text-align: right; padding-right: 10px; width: 35%; " | '''Editor Name''' | ||
− | | colspan = 3 style = "font-family: monospace; " | {{{editorname|-}}} | + | | colspan = "3" style = "font-family: monospace; " | {{{editorname|-}}} |
|- | |- | ||
| style = "text-align: right; padding-right: 10px; width: 35%; " | '''Type''' | | style = "text-align: right; padding-right: 10px; width: 35%; " | '''Type''' | ||
− | | style = "width: | + | | style = "width: 25%; " | {{{type|-}}} |
− | | style = "text-align: right; padding-right: 10px; width: 25%; " | + | | {{#ifeq: {{{type|}}} | Spell Tome | <div align = "right" style = "padding-right: 10px; " >[[File:EN-Weight.png|25x25px]]</div> | <span style = "text-align: right; padding-right: 10px; width: 25%; " > '''FormID'''</span>}} |
− | | style = "width: 25%; " | + | | {{#ifeq: {{{type|}}} | Spell Tome | {{{weight|}}} | <span style = "width: 25%; " >{{{formid|-}}}</span>}} |
− | |- | + | |- {{#ifeq: {{{type|}}} | Spell Tome | style="display: none;" |}} |
| style = "text-align: right; padding-right: 10px; " | [[File:EN-Cost.png|25x25px]] | | style = "text-align: right; padding-right: 10px; " | [[File:EN-Cost.png|25x25px]] | ||
| {{{value|-}}} | | {{{value|-}}} | ||
| style = "text-align: right; padding-right: 10px; " | [[File:EN-Weight.png|25x25px]] | | style = "text-align: right; padding-right: 10px; " | [[File:EN-Weight.png|25x25px]] | ||
− | | {{{weight|-}}} | + | | style = "text-alight: left; " |{{{weight|-}}} |
+ | |- {{#ifeq: {{{type|}}} | Spell Tome | | style="display: none;" }} | ||
+ | | colspan: "4" | <hr> | ||
+ | |- {{#ifeq: {{{type|}}} | Spell Tome | | style="display: none;" }} | ||
+ | | style = "text-align: right; padding: 0 10px 0 5px; width: 20%; " | '''Rank''' | ||
+ | | style = "text-align: center; width: 35%; " | '''Editor Name''' | ||
+ | | style = "text-align: center; padding-left: 5px; width: 30%; " | '''FormID''' | ||
+ | | style = "text-align: right; padding: 0 15px 0 5px; width: 15%; " | [[File:EN-Cost.png|25x25px]] | ||
+ | |- {{#ifeq: {{{type|}}} | Spell Tome | {{#ifexpr: {{{rank}}} >= 1 | | style="display: none;" }} | style="display: none;" }} | ||
+ | | style = "font-family: times; font-size: 125%; text-align: right; padding-right: 10px; " | I | ||
+ | | style = "text-align: center; " | {{{r1editorname|}}} | ||
+ | | style = "text-align: center; padding-left: 5px; " | {{{r1formid|}}} | ||
+ | | style = "text-align: right; padding: 0 15px 0 5px; " | {{{r1cost|}}} | ||
+ | |- {{#ifeq: {{{type|}}} | Spell Tome | {{#ifexpr: {{{rank}}} >= 2 | | style="display: none;" }} | style="display: none;" }} | ||
+ | | style = "font-family: times; font-size: 125%; text-align: right; padding-right: 10px; " | II | ||
+ | | style = "text-align: center; " | {{{r2editorname|}}} | ||
+ | | style = "text-align: center; padding-left: 5px; " | {{{r2formid|}}} | ||
+ | | style = "text-align: right; padding: 0 15px 0 5px; " | {{{r2cost|}}} | ||
+ | |- {{#ifeq: {{{type|}}} | Spell Tome | {{#ifexpr: {{{rank}}} >= 3 | | style="display: none;" }} | style="display: none;" }} | ||
+ | | style = "font-family: times; font-size: 125%; text-align: right; padding-right: 10px; " | III | ||
+ | | style = "text-align: center; " | {{{r3editorname|}}} | ||
+ | | style = "text-align: center; padding-left: 5px; " | {{{r3formid|}}} | ||
+ | | style = "text-align: right; padding: 0 15px 0 5px; " | {{{r3cost|}}} | ||
+ | |- {{#ifeq: {{{type|}}} | Spell Tome | {{#ifexpr: {{{rank}}} >= 4 | | style="display: none;" }} | style="display: none;" }} | ||
+ | | style = "font-family: times; font-size: 125%; text-align: right; padding-right: 10px; " | IV | ||
+ | | style = "text-align: center; " | {{{r4editorname|}}} | ||
+ | | style = "text-align: center; padding-left: 5px; " | {{{r4formid|}}} | ||
+ | | style = "text-align: right; padding: 0 15px 0 5px; " | {{{r4cost|}}} | ||
+ | |- {{#ifeq: {{{type|}}} | Spell Tome | {{#ifexpr: {{{rank}}} >= 5 | | style="display: none;" }} | style="display: none;" }} | ||
+ | | style = "font-family: times; font-size: 125%; text-align: right; padding-right: 10px; " | V | ||
+ | | style = "text-align: center; " | {{{r5editorname|}}} | ||
+ | | style = "text-align: center; padding-left: 5px; " | {{{r5formid|}}} | ||
+ | | style = "text-align: right; padding: 0 15px 0 5px; " | {{{r5cost|}}} | ||
+ | |- {{#ifeq: {{{type|}}} | Spell Tome | {{#ifexpr: {{{rank}}} >= 6 | | style="display: none;" }} | style="display: none;" }} | ||
+ | | style = "font-family: times; font-size: 125%; text-align: right; padding-right: 10px; " | VI | ||
+ | | style = "text-align: center; " | {{{r6editorname|}}} | ||
+ | | style = "text-align: center; padding-left: 5px; " | {{{r6formid|}}} | ||
+ | | style = "text-align: right; padding: 0 15px 0 5px; " | {{{r6cost|}}} | ||
|- | |- | ||
| colspan = "4" style = "background: RGB(147, 56, 56); border-radius: 5px; text-align: center; color: white; font-weight: bold; " | Locations | | colspan = "4" style = "background: RGB(147, 56, 56); border-radius: 5px; text-align: center; color: white; font-weight: bold; " | Locations | ||
− | |- | + | |- {{#ifeq: {{{type|}}} | Spell Tome | style="display: none;" | |}} |
| colspan = "4" style = "text-align: justify; width: 100%; " | | | colspan = "4" style = "text-align: justify; width: 100%; " | | ||
− | {{{locations|-}}} | + | {{{locations|}}} |
+ | |- {{#ifeq: {{{type|}}} | Spell Tome | | style="display: none;" }} | ||
+ | | style = "font-family: times; font-size: 125%; text-align: right; padding-right: 10px; " | I | ||
+ | | colspan = "3" style = "text-align: left; " | | ||
+ | {{{r1locations|}}} | ||
+ | |- {{#ifeq: {{{type|}}} | Spell Tome | | style="display: none;" }} | ||
+ | | style = "font-family: times; font-size: 125%; text-align: right; padding-right: 10px; " | II | ||
+ | | colspan = "3" style = "text-align: left; " | | ||
+ | {{{r2locations|}}} | ||
+ | |- {{#ifeq: {{{type|}}} | Spell Tome | | style="display: none; " }} | ||
+ | | style = "font-family: times; font-size: 125%; text-align: right; padding-right: 10px; " | III | ||
+ | | colspan = "3" style = "text-align: left; " | | ||
+ | {{{r3locations|}}} | ||
+ | |- {{#ifeq: {{{type|}}} | Spell Tome | | style="display: none; " }} | ||
+ | | style = "font-family: times; font-size: 125%; text-align: right; padding-right: 10px; " | IV | ||
+ | | colspan = "3" style = "text-align: left; " | | ||
+ | {{{r4locations|}}} | ||
+ | |- {{#ifeq: {{{type|}}} | Spell Tome | | style="display: none; " }} | ||
+ | | style = "font-family: times; font-size: 125%; text-align: right; padding-right: 10px; " | V | ||
+ | | colspan = "3" style = "text-align: left; " | | ||
+ | {{{r5locations|}}} | ||
+ | |- {{#ifeq: {{{type|}}} | Spell Tome | | style="display: none; " }} | ||
+ | | style = "font-family: times; font-size: 125%; text-align: right; padding-right: 10px; " | VI | ||
+ | | colspan = "3" style = "text-align: left; " | | ||
+ | {{{r6locations|}}} | ||
|} | |} | ||
<noinclude> | <noinclude> | ||
== Usage == | == Usage == | ||
=== Parameters === | === Parameters === | ||
− | '' | + | ''Required'' |
− | * '''Text Parameters:''' name, | + | * '''Text Parameters:''' <nowiki>type, rank*</nowiki> |
+ | ''Optional'' | ||
+ | * '''Text Parameters:''' <nowiki>name, editorname, formid, value, weight, locations, r#editorname*, r#formid*, r#cost*, r#locations*</nowiki> | ||
+ | |||
+ | Where the prefix '''''r#''''' determines the rank that value represents, between '''r1''' and '''r6'''. (i.e. r1level describes the level requirement for the Rank I version of the spell, r2level describes the level requirement for Rank II, etc.) | ||
+ | |||
If the parameter "name" is not set, the template will use the current page's name (without the namespace) as a name. | If the parameter "name" is not set, the template will use the current page's name (without the namespace) as a name. | ||
+ | |||
+ | <span style = "font-size: 90%;" >''<nowiki>*Only if parameter "type" is set to "Spell Tome".</nowiki>''</span> | ||
== Examples == | == Examples == | ||
+ | <pre> | ||
+ | {{Book | ||
+ | |name = Flame Bite | ||
+ | |type = Spell Tome | ||
+ | |weight = 1 | ||
+ | |rank = 6 | ||
+ | |||
+ | |r1editorname = _00E_SpellFlammenbiss | ||
+ | |r2editorname = _09E_SpellFlammenbiss | ||
+ | |r3editorname = _16E_SpellFlammenbiss | ||
+ | |r4editorname = _24E_SpellFlammenbiss | ||
+ | |r5editorname = _32E_SpellFlammenbiss | ||
+ | |r6editorname = _42E_SpellFlammenbiss | ||
+ | |||
+ | |r1formid = 00044F13 | ||
+ | |r2formid = 00085658 | ||
+ | |r3formid = 0012E139 | ||
+ | |r4formid = 0012E13A | ||
+ | |r5formid = 0012E13B | ||
+ | |r6formid = 0012E13C | ||
+ | |||
+ | |r1cost = 28 | ||
+ | |r2cost = 48 | ||
+ | |r3cost = 60 | ||
+ | |r4cost = 120 | ||
+ | |r5cost = 200 | ||
+ | |r6cost = 300 | ||
+ | |||
+ | |r1locations = | ||
+ | * Abandoned Tower | ||
+ | |r2locations = | ||
+ | * Old Dothûlgrad, Workshop | ||
+ | |r3locations = | ||
+ | |r4locations = | ||
+ | * Duneville's Crypt | ||
+ | * Monastery | ||
+ | |r5locations = | ||
+ | * Vyn - Enderal (-37, 26) @ Z: 2150.131348 | ||
+ | |r6locations = | ||
+ | }} | ||
+ | </pre> | ||
+ | |||
+ | <div style="display: inline-block; "> | ||
+ | {{Book | ||
+ | |name = Flame Bite | ||
+ | |type = Spell Tome | ||
+ | |weight = 1 | ||
+ | |rank = 6 | ||
+ | |||
+ | |r1editorname = _00E_SpellFlammenbiss | ||
+ | |r2editorname = _09E_SpellFlammenbiss | ||
+ | |r3editorname = _16E_SpellFlammenbiss | ||
+ | |r4editorname = _24E_SpellFlammenbiss | ||
+ | |r5editorname = _32E_SpellFlammenbiss | ||
+ | |r6editorname = _42E_SpellFlammenbiss | ||
+ | |||
+ | |r1formid = 00044F13 | ||
+ | |r2formid = 00085658 | ||
+ | |r3formid = 0012E139 | ||
+ | |r4formid = 0012E13A | ||
+ | |r5formid = 0012E13B | ||
+ | |r6formid = 0012E13C | ||
+ | |||
+ | |r1cost = 28 | ||
+ | |r2cost = 48 | ||
+ | |r3cost = 60 | ||
+ | |r4cost = 120 | ||
+ | |r5cost = 200 | ||
+ | |r6cost = 300 | ||
+ | |||
+ | |r1locations = | ||
+ | * Abandoned Tower | ||
+ | |r2locations = | ||
+ | * Old Dothûlgrad, Workshop | ||
+ | |r3locations = | ||
+ | |r4locations = | ||
+ | * Duneville's Crypt | ||
+ | * Monastery | ||
+ | |r5locations = | ||
+ | * Vyn - Enderal (-37, 26) @ Z: 2150.131348 | ||
+ | |r6locations = | ||
+ | }} | ||
+ | </div> | ||
+ | |||
<pre> | <pre> | ||
{{Book | {{Book |
Revision as of 20:08, 21 March 2017
Book
| |||
Editor Name | - | ||
Type | - | FormID | - |
- | - | ||
Locations | |||
Usage
Parameters
Required
- Text Parameters: type, rank*
Optional
- Text Parameters: name, editorname, formid, value, weight, locations, r#editorname*, r#formid*, r#cost*, r#locations*
Where the prefix r# determines the rank that value represents, between r1 and r6. (i.e. r1level describes the level requirement for the Rank I version of the spell, r2level describes the level requirement for Rank II, etc.)
If the parameter "name" is not set, the template will use the current page's name (without the namespace) as a name.
*Only if parameter "type" is set to "Spell Tome".
Examples
{{Book |name = Flame Bite |type = Spell Tome |weight = 1 |rank = 6 |r1editorname = _00E_SpellFlammenbiss |r2editorname = _09E_SpellFlammenbiss |r3editorname = _16E_SpellFlammenbiss |r4editorname = _24E_SpellFlammenbiss |r5editorname = _32E_SpellFlammenbiss |r6editorname = _42E_SpellFlammenbiss |r1formid = 00044F13 |r2formid = 00085658 |r3formid = 0012E139 |r4formid = 0012E13A |r5formid = 0012E13B |r6formid = 0012E13C |r1cost = 28 |r2cost = 48 |r3cost = 60 |r4cost = 120 |r5cost = 200 |r6cost = 300 |r1locations = * Abandoned Tower |r2locations = * Old Dothûlgrad, Workshop |r3locations = |r4locations = * Duneville's Crypt * Monastery |r5locations = * Vyn - Enderal (-37, 26) @ Z: 2150.131348 |r6locations = }}
{{Book |name = The Wiki Book |type = Lore |editorname =__00_wiki_book_01 |formid = D34DB33F |value = 200 |weight = 2.5 |locations = * The Internet * SureAI Headquarters * Holomay's Talk Page }}
The Wiki Book (FormID: D34DB33F) | |||
Editor Name | __00_wiki_book_01 | ||
Type | Lore | FormID | D34DB33F |
200 | 2.5 | ||
Locations
| |||
|
{{Book}}