Difference between revisions of "Template:Treatise"

From Stoneshard wiki
Jump to navigation Jump to search
old>Realpsojed
(conditions for existence of skills, formatting fix)
(Undo revision 53742 by Psojed (talk))
Tag: Undo
 
(16 intermediate revisions by 3 users not shown)
Line 1: Line 1:
<includeonly>{| width=300px;
<includeonly>{| width=300px;
|style="text-align:center;"|<span style="font-size: 20px;">{{Translate|{{ROOTPAGENAME}}|Treatises}}</span><br>
|style="text-align:center;"|<span style="font-size: 20px;">{{Translate|{{ROOTPAGENAME}}|Treatises}}</span><br>
<span style="text-align:center;color:#9d9a9a;">{{#if: {{#titleparts: {{PAGENAME}} | 1 | 2}} | {{#ifeq: {{PAGENAME}} | {{ROOTPAGENAME}}/Tooltip | {{:{{ROOTPAGENAME}}|BookAuthor}} | {{Translate|{{ROOTPAGENAME}} BookAuthor|Treatises}}}} | {{:{{ROOTPAGENAME}}|BookAuthor}}}}</span><hr style="height:2px;background-color:#33323f;box-shadow: 0 2px #13121d;margin: 10px 0 10px 0;">
<span style="text-align:center;color:#9d9a9a;">{{#if: {{#titleparts: {{PAGENAME}} | 1 | 2}} | {{#ifeq: {{PAGENAME}} | {{ROOTPAGENAME}}/Tooltip | {{:{{ROOTPAGENAME}}|BookAuthor}} | {{Translate|{{ROOTPAGENAME}} BookAuthor|Treatises}}}} | {{:{{ROOTPAGENAME}}|BookAuthor}}}}</span>{{Tooltip rule}}
|-
|-
|'''"{{#if: {{#titleparts: {{PAGENAME}} | 1 | 2}} | {{#ifeq: {{PAGENAME}} | {{ROOTPAGENAME}}/Tooltip | {{:{{ROOTPAGENAME}}|BookName}} | {{Translate|{{ROOTPAGENAME}} BookName|Treatises}}}} | {{:{{ROOTPAGENAME}}|BookName}}}}"'''<br>
|'''"{{#if: {{#titleparts: {{PAGENAME}} | 1 | 2}} | {{#ifeq: {{PAGENAME}} | {{ROOTPAGENAME}}/Tooltip | {{:{{ROOTPAGENAME}}|BookName}} | {{Translate|{{ROOTPAGENAME}} BookName|Treatises}}}} | {{:{{ROOTPAGENAME}}|BookName}}}}"'''<br>
|-
|-
|style="color:#9d9a9a;"|<br>{{#if: {{#titleparts: {{PAGENAME}} | 1 | 2}} | {{#ifeq: {{PAGENAME}} | {{ROOTPAGENAME}}/Tooltip | {{:{{ROOTPAGENAME}}|LearnText}} | {{Translate|{{ROOTPAGENAME}} LearnText|Treatises}}}} | {{:{{ROOTPAGENAME}}|LearnText}}}}<br><br>
|style="color:#9d9a9a;"|<br>{{#if: {{#titleparts: {{PAGENAME}} | 1 | 2}} | {{#ifeq: {{PAGENAME}} | {{ROOTPAGENAME}}/Tooltip | Allows you to learn the following {{#sub: {{ROOTPAGENAME}}|0|{{#expr: {{#pos:{{ROOTPAGENAME}}|Treatise}} - 1}}}} abilities: | {{Translate|{{ROOTPAGENAME}} LearnText|Treatises}}}} | Allows you to learn the following {{#sub: {{ROOTPAGENAME}}|0|{{#expr: {{#pos:{{ROOTPAGENAME}}|Treatise}} - 1}}}} abilities:}}<br><br>
|-
|-
|<div style="float: left;">{{#if: {{#titleparts: {{PAGENAME}} | 1 | 2}} | {{#ifeq: {{PAGENAME}} | {{ROOTPAGENAME}}/Tooltip|<!--
|<div style="float: left;">{{#if: {{#titleparts: {{PAGENAME}} | 1 | 2}} | {{#ifeq: {{PAGENAME}} | {{ROOTPAGENAME}}/Tooltip|<!--
-->{{#if: {{:{{ROOTPAGENAME}}|ActiveSkills1}}|{{cl|active|{{:{{ROOTPAGENAME}}|ActiveSkill1}}}}|}}<br><!--
-->{{#if: {{:{{ROOTPAGENAME}}|ActiveSkill1}}|{{cl|active|{{:{{ROOTPAGENAME}}|ActiveSkill1}}}}|}}<!--
-->{{#if: {{:{{ROOTPAGENAME}}|ActiveSkills2}}|{{cl|active|{{:{{ROOTPAGENAME}}|ActiveSkill2}}}}|}}<br><!--
-->{{#if: {{:{{ROOTPAGENAME}}|ActiveSkill2}}|<br>{{cl|active|{{:{{ROOTPAGENAME}}|ActiveSkill2}}}}|}}<!--
-->{{#if: {{:{{ROOTPAGENAME}}|ActiveSkills3}}|{{cl|active|{{:{{ROOTPAGENAME}}|ActiveSkill3}}}}|}}<br><!--
-->{{#if: {{:{{ROOTPAGENAME}}|ActiveSkill3}}|<br>{{cl|active|{{:{{ROOTPAGENAME}}|ActiveSkill3}}}}|}}<!--
-->{{#if: {{:{{ROOTPAGENAME}}|ActiveSkills4}}|{{cl|active|{{:{{ROOTPAGENAME}}|ActiveSkill4}}}}|}}<br><!--
-->{{#if: {{:{{ROOTPAGENAME}}|ActiveSkill4}}|<br>{{cl|active|{{:{{ROOTPAGENAME}}|ActiveSkill4}}}}|}}<!--
-->{{#if: {{:{{ROOTPAGENAME}}|ActiveSkills5}}|{{cl|active|{{:{{ROOTPAGENAME}}|ActiveSkill5}}}}|}}|<!--
-->{{#if: {{:{{ROOTPAGENAME}}|ActiveSkill5}}|<br>{{cl|active|{{:{{ROOTPAGENAME}}|ActiveSkill5}}}}|}}|<!--
-->{{#if: {{:{{ROOTPAGENAME}}|ActiveSkills1}}|{{cl|active|{{ROOTPAGENAME}}/{{SUBPAGENAME}}|{{Translate|{{ROOTPAGENAME}} ActiveSkill1|Treatises}}}}|}}<br><!--
-->{{#if: {{:{{ROOTPAGENAME}}|ActiveSkill1}}|{{cl|active|{{:{{ROOTPAGENAME}}|ActiveSkill1}}/{{#titleparts: {{PAGENAME}} | 1 | 2}}|{{Translate|{{ROOTPAGENAME}} ActiveSkill1|Treatises}}}}|}}<!--
-->{{#if: {{:{{ROOTPAGENAME}}|ActiveSkills2}}|{{cl|active|{{ROOTPAGENAME}}/{{SUBPAGENAME}}|{{Translate|{{ROOTPAGENAME}} ActiveSkill2|Treatises}}}}|}}<br><!--
-->{{#if: {{:{{ROOTPAGENAME}}|ActiveSkill2}}|<br>{{cl|active|{{:{{ROOTPAGENAME}}|ActiveSkill2}}/{{#titleparts: {{PAGENAME}} | 1 | 2}}|{{Translate|{{ROOTPAGENAME}} ActiveSkill2|Treatises}}}}|}}<!--
-->{{#if: {{:{{ROOTPAGENAME}}|ActiveSkills3}}|{{cl|active|{{ROOTPAGENAME}}/{{SUBPAGENAME}}|{{Translate|{{ROOTPAGENAME}} ActiveSkill3|Treatises}}}}|}}<br><!--
-->{{#if: {{:{{ROOTPAGENAME}}|ActiveSkill3}}|<br>{{cl|active|{{:{{ROOTPAGENAME}}|ActiveSkill3}}/{{#titleparts: {{PAGENAME}} | 1 | 2}}|{{Translate|{{ROOTPAGENAME}} ActiveSkill3|Treatises}}}}|}}<!--
-->{{#if: {{:{{ROOTPAGENAME}}|ActiveSkills4}}|{{cl|active|{{ROOTPAGENAME}}/{{SUBPAGENAME}}|{{Translate|{{ROOTPAGENAME}} ActiveSkill4|Treatises}}}}|}}<br><!--
-->{{#if: {{:{{ROOTPAGENAME}}|ActiveSkill4}}|<br>{{cl|active|{{:{{ROOTPAGENAME}}|ActiveSkill4}}/{{#titleparts: {{PAGENAME}} | 1 | 2}}|{{Translate|{{ROOTPAGENAME}} ActiveSkill4|Treatises}}}}|}}<!--
-->{{#if: {{:{{ROOTPAGENAME}}|ActiveSkills5}}|{{cl|active|{{ROOTPAGENAME}}/{{SUBPAGENAME}}|{{Translate|{{ROOTPAGENAME}} ActiveSkill5|Treatises}}}}|}}}}|<!--
-->{{#if: {{:{{ROOTPAGENAME}}|ActiveSkill5}}|<br>{{cl|active|{{:{{ROOTPAGENAME}}|ActiveSkill5}}/{{#titleparts: {{PAGENAME}} | 1 | 2}}|{{Translate|{{ROOTPAGENAME}} ActiveSkill5|Treatises}}}}|}}}}|<!--
-->{{#if: {{:{{ROOTPAGENAME}}|ActiveSkills1}}|{{cl|active|{{:{{ROOTPAGENAME}}|ActiveSkill1}}}}|}}<br><!--
-->{{#if: {{:{{ROOTPAGENAME}}|ActiveSkill1}}|{{cl|active|{{:{{ROOTPAGENAME}}|ActiveSkill1}}}}|}}<!--
-->{{#if: {{:{{ROOTPAGENAME}}|ActiveSkills2}}|{{cl|active|{{:{{ROOTPAGENAME}}|ActiveSkill2}}}}|}}<br><!--
-->{{#if: {{:{{ROOTPAGENAME}}|ActiveSkill2}}|<br>{{cl|active|{{:{{ROOTPAGENAME}}|ActiveSkill2}}}}|}}<!--
-->{{#if: {{:{{ROOTPAGENAME}}|ActiveSkills3}}|{{cl|active|{{:{{ROOTPAGENAME}}|ActiveSkill3}}}}|}}<br><!--
-->{{#if: {{:{{ROOTPAGENAME}}|ActiveSkill3}}|<br>{{cl|active|{{:{{ROOTPAGENAME}}|ActiveSkill3}}}}|}}<!--
-->{{#if: {{:{{ROOTPAGENAME}}|ActiveSkills4}}|{{cl|active|{{:{{ROOTPAGENAME}}|ActiveSkill4}}}}|}}<br><!--
-->{{#if: {{:{{ROOTPAGENAME}}|ActiveSkill4}}|<br>{{cl|active|{{:{{ROOTPAGENAME}}|ActiveSkill4}}}}|}}<!--
-->{{#if: {{:{{ROOTPAGENAME}}|ActiveSkills5}}|{{cl|active|{{:{{ROOTPAGENAME}}|ActiveSkill5}}}}|}}}}</div>{{clear}}
-->{{#if: {{:{{ROOTPAGENAME}}|ActiveSkill5}}|<br>{{cl|active|{{:{{ROOTPAGENAME}}|ActiveSkill5}}}}|}}}}</div>{{clear}}
<div style="float: left;">{{#if: {{#titleparts: {{PAGENAME}} | 1 | 2}} | {{#ifeq: {{PAGENAME}} | {{ROOTPAGENAME}}/Tooltip|<!--
<div style="float: left;">{{#if: {{#titleparts: {{PAGENAME}} | 1 | 2}} | {{#ifeq: {{PAGENAME}} | {{ROOTPAGENAME}}/Tooltip|<!--
-->{{#if: {{:{{ROOTPAGENAME}}|PassiveSkills1}}|{{cl|orange|{{:{{ROOTPAGENAME}}|PassiveSkill1}}}}|}}<br><!--
-->{{#if: {{:{{ROOTPAGENAME}}|PassiveSkill1}}|{{cl|orange|{{:{{ROOTPAGENAME}}|PassiveSkill1}}}}|}}<!--
-->{{#if: {{:{{ROOTPAGENAME}}|PassiveSkills2}}|{{cl|orange|{{:{{ROOTPAGENAME}}|PassiveSkill2}}}}|}}<br><!--
-->{{#if: {{:{{ROOTPAGENAME}}|PassiveSkill2}}|<br>{{cl|orange|{{:{{ROOTPAGENAME}}|PassiveSkill2}}}}|}}<!--
-->{{#if: {{:{{ROOTPAGENAME}}|PassiveSkills3}}|{{cl|orange|{{:{{ROOTPAGENAME}}|PassiveSkill3}}}}|}}<br><!--
-->{{#if: {{:{{ROOTPAGENAME}}|PassiveSkill3}}|<br>{{cl|orange|{{:{{ROOTPAGENAME}}|PassiveSkill3}}}}|}}<!--
-->{{#if: {{:{{ROOTPAGENAME}}|PassiveSkills4}}|{{cl|orange|{{:{{ROOTPAGENAME}}|PassiveSkill4}}}}|}}<br><!--
-->{{#if: {{:{{ROOTPAGENAME}}|PassiveSkill4}}|<br>{{cl|orange|{{:{{ROOTPAGENAME}}|PassiveSkill4}}}}|}}<!--
-->{{#if: {{:{{ROOTPAGENAME}}|PassiveSkills5}}|{{cl|orange|{{:{{ROOTPAGENAME}}|PassiveSkill5}}}}|}}|<!--
-->{{#if: {{:{{ROOTPAGENAME}}|PassiveSkill5}}|<br>{{cl|orange|{{:{{ROOTPAGENAME}}|PassiveSkill5}}}}|}}|<!--
-->{{#if: {{:{{ROOTPAGENAME}}|PassiveSkills1}}|{{cl|orange|{{ROOTPAGENAME}}/{{SUBPAGENAME}}|{{Translate|{{ROOTPAGENAME}} PassiveSkill1|Treatises}}}}|}}<br><!--
-->{{#if: {{:{{ROOTPAGENAME}}|PassiveSkill1}}|{{cl|orange|{{:{{ROOTPAGENAME}}|PassiveSkill1}}/{{#titleparts: {{PAGENAME}} | 1 | 2}}|{{Translate|{{ROOTPAGENAME}} PassiveSkill1|Treatises}}}}|}}<!--
-->{{#if: {{:{{ROOTPAGENAME}}|PassiveSkills2}}|{{cl|orange|{{ROOTPAGENAME}}/{{SUBPAGENAME}}|{{Translate|{{ROOTPAGENAME}} PassiveSkill2|Treatises}}}}|}}<br><!--
-->{{#if: {{:{{ROOTPAGENAME}}|PassiveSkill2}}|<br>{{cl|orange|{{:{{ROOTPAGENAME}}|PassiveSkill2}}/{{#titleparts: {{PAGENAME}} | 1 | 2}}|{{Translate|{{ROOTPAGENAME}} PassiveSkill2|Treatises}}}}|}}<!--
-->{{#if: {{:{{ROOTPAGENAME}}|PassiveSkills3}}|{{cl|orange|{{ROOTPAGENAME}}/{{SUBPAGENAME}}|{{Translate|{{ROOTPAGENAME}} PassiveSkill3|Treatises}}}}|}}<br><!--
-->{{#if: {{:{{ROOTPAGENAME}}|PassiveSkill3}}|<br>{{cl|orange|{{:{{ROOTPAGENAME}}|PassiveSkill3}}/{{#titleparts: {{PAGENAME}} | 1 | 2}}|{{Translate|{{ROOTPAGENAME}} PassiveSkill3|Treatises}}}}|}}<!--
-->{{#if: {{:{{ROOTPAGENAME}}|PassiveSkills4}}|{{cl|orange|{{ROOTPAGENAME}}/{{SUBPAGENAME}}|{{Translate|{{ROOTPAGENAME}} PassiveSkill4|Treatises}}}}|}}<br><!--
-->{{#if: {{:{{ROOTPAGENAME}}|PassiveSkill4}}|<br>{{cl|orange|{{:{{ROOTPAGENAME}}|PassiveSkill4}}/{{#titleparts: {{PAGENAME}} | 1 | 2}}|{{Translate|{{ROOTPAGENAME}} PassiveSkill4|Treatises}}}}|}}<!--
-->{{#if: {{:{{ROOTPAGENAME}}|PassiveSkills5}}|{{cl|orange|{{ROOTPAGENAME}}/{{SUBPAGENAME}}|{{Translate|{{ROOTPAGENAME}} PassiveSkill5|Treatises}}}}|}}}}|<!--
-->{{#if: {{:{{ROOTPAGENAME}}|PassiveSkill5}}|<br>{{cl|orange|{{:{{ROOTPAGENAME}}|PassiveSkill5}}/{{#titleparts: {{PAGENAME}} | 1 | 2}}|{{Translate|{{ROOTPAGENAME}} PassiveSkill5|Treatises}}}}|}}}}|<!--
-->{{#if: {{:{{ROOTPAGENAME}}|PassiveSkills1}}|{{cl|orange|{{:{{ROOTPAGENAME}}|PassiveSkill1}}}}|}}<br><!--
-->{{#if: {{:{{ROOTPAGENAME}}|PassiveSkill1}}|{{cl|orange|{{:{{ROOTPAGENAME}}|PassiveSkill1}}}}|}}<!--
-->{{#if: {{:{{ROOTPAGENAME}}|PassiveSkills2}}|{{cl|orange|{{:{{ROOTPAGENAME}}|PassiveSkill2}}}}|}}<br><!--
-->{{#if: {{:{{ROOTPAGENAME}}|PassiveSkill2}}|<br>{{cl|orange|{{:{{ROOTPAGENAME}}|PassiveSkill2}}}}|}}<!--
-->{{#if: {{:{{ROOTPAGENAME}}|PassiveSkills3}}|{{cl|orange|{{:{{ROOTPAGENAME}}|PassiveSkill3}}}}|}}<br><!--
-->{{#if: {{:{{ROOTPAGENAME}}|PassiveSkill3}}|<br>{{cl|orange|{{:{{ROOTPAGENAME}}|PassiveSkill3}}}}|}}<!--
-->{{#if: {{:{{ROOTPAGENAME}}|PassiveSkills4}}|{{cl|orange|{{:{{ROOTPAGENAME}}|PassiveSkill4}}}}|}}<br><!--
-->{{#if: {{:{{ROOTPAGENAME}}|PassiveSkill4}}|<br>{{cl|orange|{{:{{ROOTPAGENAME}}|PassiveSkill4}}}}|}}<!--
-->{{#if: {{:{{ROOTPAGENAME}}|PassiveSkills5}}|{{cl|orange|{{:{{ROOTPAGENAME}}|PassiveSkill5}}}}|}}}}</div>
-->{{#if: {{:{{ROOTPAGENAME}}|PassiveSkill5}}|<br>{{cl|orange|{{:{{ROOTPAGENAME}}|PassiveSkill5}}}}|}}}}</div>
|-
|-
|style="color:#9d7969;text-align:justify"|<hr style="height:2px;background-color:#33323f;box-shadow: 0 2px 13121d;margin: 10px 0 10px 0;">{{#if: {{#titleparts: {{PAGENAME}} | 1 | 2}} | {{#ifeq: {{PAGENAME}} | {{ROOTPAGENAME}}/Tooltip | {{:{{ROOTPAGENAME}}|Description}} | {{Translate|{{ROOTPAGENAME}} Description|Treatises}}}} | {{:{{ROOTPAGENAME}}|Description}}}}<div style="float: right;">[[File:Gold_Icon.png|18px|alt={{Translate|Price|Properties}}|link=|{{Translate|Price|Properties}}]]{{c|white|{{:{{ROOTPAGENAME}}|Price}}}}</div><br>
|style="color:#9d7969;text-align:justify"|{{Tooltip rule}}{{#if: {{#titleparts: {{PAGENAME}} | 1 | 2}} | {{#ifeq: {{PAGENAME}} | {{ROOTPAGENAME}}/Tooltip | {{:{{ROOTPAGENAME}}|Description}} | {{Translate|{{ROOTPAGENAME}} Description|Treatises}}}} | {{:{{ROOTPAGENAME}}|Description}}}}<div style="float: right;">[[File:Gold_Icon.png|18px|alt={{Translate|Price|Properties}}|link=|{{Translate|Price|Properties}}]]{{c|white|{{:{{ROOTPAGENAME}}|Price}}}}</div><br>
|-
|-
|style="text-align:center;"|[[File:{{#if:{{{Image|}}}|{{{Image}}}|{{ROOTPAGENAME}}.png}}|link={{#ifeq:{{SUBPAGENAME}}|Tooltip|{{BASEPAGENAME}}|{{PAGENAME}}/Tooltip}}|alt={{Translate|{{ROOTPAGENAME}}|Treatises}}|{{Translate|{{ROOTPAGENAME}}|Treatises}}]]
|style="text-align:center;"|[[File:{{#if:{{{Image|}}}|{{{Image}}}|{{ROOTPAGENAME}}.png}}|class=image2x|link={{#ifeq:{{SUBPAGENAME}}|Tooltip|{{BASEPAGENAME}}|{{PAGENAME}}/Tooltip}}|alt={{Translate|{{ROOTPAGENAME}}|Treatises}}|{{Translate|{{ROOTPAGENAME}}|Treatises}}]]
|}
|}
</includeonly><noinclude>{{doc}}
</includeonly><noinclude>{{doc}}


[[Category:Tooltip templates]]</noinclude>
[[Category:Tooltip templates]]</noinclude>

Latest revision as of 20:22, 16 August 2022

Template-info.png Documentation

This is treatise template created for use together with the Template:Tooltip hover box template on a specific treatise's page or treatise's tooltip page.

Usage: The page itself must contain the treatise's data before this Template works. For example, if I wanted to create the Geomantic Treatise I page, I'll add this code to the start of the page and modify the values:

<includeonly>{{#switch: {{{1}}}
|BookAuthor=Written by Joran of Brynn
|BookName=Travelling notes on my journey to Biest
|LearnText=Allows to learn some geomantic abilities:
|ActiveSkill1=Runic Boulder
|ActiveSkill2=Stone Armor
|PassiveSkill1=Rune of Enfeeblement
|Description=A rather chaotic journal by a professor of linguistics who taught in Brynn a century ago. Perhaps the most fascinating read of the entire Grammar curriculum at Brynn University.
|Price=400
|Image=
|#default = }}</includeonly>

This data is invisible on the page itself, thanks to the includeonly tags.


Next, copy this code to Geomantic Treatise I or Geomantic Treatise I/Tooltip or Geomantic Treatise I/anything page:

{{ {{{1|Tooltip hover box}}}
|title= {{Treatise}}
}}

It will automatically load the treatise's data and fill them into this format. Go to Geomantic Treatise I to see the result.