Anonymous
×
Create a new article
Write your page title here:
We currently have 632 articles on SpellForce Wiki - Rohens encyclopedia. Type your article name above or click on one of the titles below and start writing!



SpellForce Wiki - Rohens encyclopedia

Template:CoE Item: Difference between revisions

Basara (talk | contribs)
No edit summary
Basara (talk | contribs)
No edit summary
 
(78 intermediate revisions by the same user not shown)
Line 1: Line 1:
<noinclude>
{{CoE Styles}}
{{CoE Styles}}
==CoE Item==
Inserts a item for CoE. Typical items are abilities, statuses, room expansions, artifacts, recipes, ingredients, etc.


{{#css:
===Example Preview===


.tooltip-short, .tooltip, .tooltip-long {
<div class="item-block">
  position: relative;
<div>
   -webkit-transition: all 0.3s ease-in-out 0s;
   <div class="item-icon">[[Image:SF CoE Icon Battle Robe.png|75px|link=Battle Robe]]</div>
   transition: all 0.3s ease-in-out 0s;
   <h4><div class="item-title">[[Battle Robe|Battle Robe]]</div></h4>
  display: inline-block;
</div>
   color: #07f;
   <div class="item-subtitle">Artifact, Ingredient, Light Armor</div>
}
<div>
.tooltip-short:hover, .tooltip:hover, .tooltip-long:hover {
   <div class="item-threshold>[[Image:SF CoE Elemental 2.png|50px|link=|Elemental Threshold]] [[Image:SF CoE Life 1.png|25px|link=|Life Threshold]]</div>
  color: #fff!important;
   <div class="item-cost>[[Image:SF CoE Item Gold Cost.png|30px|link=|Gold Value]] 10</div>
   cursor: pointer;
</div>
}
   <div class="item-block-splitter">[[Image:SF CoE Item Block Splitter.png|320px|link=]]</div>
.tooltip-short a { 
   <div class="item-text">+2 Speed</div>
  position: absolute; 
   <div class="item-text">Grants <div class="tooltip-wrapper"> [[Quick Reflexes|Qiuck reflexes]]<div class="tooltip"><span style="margin: 5px; display: block;height: auto; max-width: 250px;" border="0">[[Image:SF CoE Ability Quick Reflexes.png]]</span></div></div></div>
  display: block; 
</div>
  visibility: hidden; 
  opacity: 0; 
  transition: all .3s; 
   border-radius: 5px; 
  box-shadow: 0 0 20px #444 inset; 
  padding: 3px 5px 3px 5px; 
   top: -150px;
  left: -5px;
  z-index: 9999999;
  border: 1px solid #514d4d;
}
.tooltip a { 
   position: absolute; 
  display: block; 
  visibility: hidden; 
  opacity: 0; 
  transition: all .3s; 
  border-radius: 5px; 
   box-shadow: 0 0 20px #444 inset; 
  padding: 3px 5px 3px 5px; 
  top: -250px;
  left: -5px;
  z-index: 9999999;
  border: 1px solid #514d4d;
}
.tooltip-long a{ 
  position: absolute; 
  display: block; 
  visibility: hidden; 
  opacity: 0; 
  transition: all .3s; 
  border-radius: 5px; 
  box-shadow: 0 0 20px #444 inset; 
  padding: 3px 5px 3px 5px;
  top: -500px;
  left: -5px;
  z-index: 9999999;
  border: 1px solid #514d4d;
}
.tooltip-short a img, .tooltip a img, .tooltip-long a img {
  display: block;
  border: 1px solid #444;
  max-width: 360px;
  height: auto;
}
.tooltip-short a:after, .tooltip a:after, .tooltip-long a:after {
  content: " ";
  border-style: solid;
  border-width: 7px 7px 0px 7px;
  border-color: rgba(55, 64, 70, 0.5) transparent transparent transparent;
  transition-duration: 0s;
  transform-origin: top;
  transform: translateX(-50%) scaleY(1);
  position: absolute;
  left: 5%;
  bottom: -7px;
}
.tooltip-short:hover a, .tooltip:hover a, .tooltip-long:hover a{       
    visibility: visible;       
    opacity: 1;   
}
.tooltip b:before, .tooltip b:before, .tooltip-long b:before {
  content: "";
  position: absolute;
  width: 100%;
  height: 2px;
  bottom: 0;
  left: 0;
  background-color: #333;
  visibility: hidden;
  -webkit-transform: scaleX(0);
  transform: scaleX(0);
  -webkit-transition: all 0.3s ease-in-out 0s;
  transition: all 0.3s ease-in-out 0s;
}
.tooltip-short b:hover:before, .tooltip b:hover:before, .tooltip-long b:hover:before {
  visibility: visible;
  background-color: #0c96ff!important;
  -webkit-transform: scaleX(1);
  transform: scaleX(1);
}


===Example Usage===
<nowiki>
{{CoE Item </nowiki><br><nowiki>
|title = Battle Robe </nowiki><br><nowiki>
|linked = Battle Robe </nowiki><br><nowiki>
|sub-title = Artifact, Ingredient, Light Armor </nowiki><br><nowiki>
|icon = SF CoE Icon Battle Robe.png </nowiki><br><nowiki>
|value-gold = 10 </nowiki><br><nowiki>
|value-elemental = 2 </nowiki><br><nowiki>
|value-life = 1 </nowiki><br><nowiki>
|line-1 = +2 Speed. </nowiki><br><nowiki>
|line-2 = Grants </nowiki><br><nowiki>
|tooltip-2-type = tooltip-short </nowiki><br><nowiki>
|tooltip-2 = Quick Reflexes </nowiki><br><nowiki>
|tooltip-2-img = SF CoE Ability Quick Reflexes.png </nowiki><br><nowiki>
}}
}}
</nowiki>


===How to Use This Template & Parameters===


<noinclude>
Parameters define the data that gets be passed to the template. That's how the template "knows" what to display for you. They can loosely be called variables.
==CoE Tooltip Hover==
Inserts text that has an image display on mouse hover, inline with other article text. Uses the specified CoE Style.
 
;Types:
:tooltip-short : Intended for image HEIGHT less than 150px</li>
:tooltip : Intended for image HEIGHT between 150px and 250px</li>
:tooltip-long : Intended for image HEIGHT between 250px and 500px</li>
 
''Note: There is no tooltip type for tooltip images that with more than 500px height. The tooltip image will not be completely above the tooltip text in this case.''
 
;Styles:
:item-title : Standard Item/Ability/Status title
:item-subtitle : Standard subtitle (sub-classes, etc.)
:item-text : Standard description


===Usage===
''The ONLY required parameter is title.'' But if that is the only parameter you list, it will be an empty box (besides the item title).
<nowiki>
{{CoE Tooltip Hover
</nowiki><br><nowiki>
|type    = [tooltip-short] or [tooltip] or [tooltip-long] </nowiki>''defaults to tooltip if no class is included''<nowiki>
</nowiki><br><nowiki>
|style = [class from CoE Styles Template] </nowiki>''defaults to item-text if no class is included''<nowiki>
</nowiki><br><nowiki>
|pre-inline-text    = [text that goes before the tooltip] </nowiki>''OPTIONAL''<nowiki>
</nowiki><br><nowiki>
|hover-text      = [text that the tooltip defines]
</nowiki><br><nowiki>
|post-inline-text    = [text that goes after the tooltip] </nowiki>''OPTIONAL''<nowiki>
</nowiki><br><nowiki>
|image    = [tooltip image file name]
</nowiki><br><nowiki>
}}
</nowiki>


===Example Usage===
''THIS TEMPLATE'S'' parameters do not need to be used in order, but you do need to specify the parameter name, the = sign, and then the data/text you want to use, separated by the | sign. See the [[#See Example Usage|Example Usage]] section below.
<nowiki><span></nowiki>Grants
<nowiki>
{{Inline Tooltip Hover
</nowiki><br><nowiki>
|pre-inline-text = Grants
</nowiki><br><nowiki>
|text = Quick Reflexes
</nowiki><br><nowiki>
|post-inline-text = .
</nowiki><br><nowiki>
|image = Image:SF CoE Ability Quick Reflexes.png
</nowiki><br><nowiki>
}}
</span>
</nowiki>


===Example Preview===
;Table Column Explanations
<span><div class="item-text">Grants <div class="tooltip-short"><b>Quick Reflexes<span style="margin: 5px; display: block;height: auto; max-width: 250px;" border="0">[[Image:SF CoE Ability Quick Reflexes.png]]</span></b></div></div>
:'''Parameter''' is the name for what you are describing.
:'''Value''' is the text/info you want to show.
:'''Example''' is what is shown in the Example Usage and Example Preview sections.


{| class="wikitable"
|+ Template Parameters
! Parameter
! Value
! Example
|-
|title
|The name of the item you are making. ** Header Level 4 **
|''Battle Robe''
|-
|linked
|Leave blank if you do NOT wish to link the item. List the name of the page to link to otherwise.
|''Battle Robe''
|-
|sub-title
|Sub-classes or categories the item falls into.
|''Artifact, Ingredient, Light Armor''
|-
|icon
|File name for the icon.
|''SF CoE Icon Battle Robe.png''
|-
|value-gold
|The gold value of the item.
|''10''
|-
|value-mana
|The mana value of the item.
|
|-
|value-elemental
|The elemental ([[Image:SF CoE Elemental 1.png|20px]]) value (ingredients, artifacts, etc.) or threshold (recipes, room extensions, etc.).
|''2''
|-
|value-life
|The life ([[Image:SF CoE Life 1.png|20px]]) value (ingredients, artifacts, etc.) or threshold (recipes, room extensions, etc.).
|''1''
|-
|value-death
|The death ([[Image:SF CoE Death 1.png|20px]]) value (ingredients, artifacts, etc.) or threshold (recipes, room extensions, etc.).
|
|-
|value-arcane
|The arcane ([[Image:SF CoE Arcane 1.png|20px]]) value (ingredients, artifacts, etc.) or threshold (recipes, room extensions, etc.).
|
|-
|value-amplifier
|The amplifier ([[Image:SF CoE Amplifier 1.png|20px]]) value (ingredients, artifacts, etc.).
|
|-
|line-1
|rowspan="4"|The [first / second / third / fourth] line of the description (before any link / tooltip text).
|''+2 Speed''
|-
|line-2
|''Grants''
|-
|line-3
|
|-
|line-4
|
|-
|line-1-link
|rowspan="4"|If there is no link / tooltip, do not use this parameter.<br>The linked text (can show tooltip display with mouse hover on computers).
|
|-
|line-2-link
|''Quick Reflexes''
|-
|line-3-link
|
|-
|line-4-link
|
|-
|line-1-link-page
|rowspan="4"|If there is no link / tooltip, do not use this parameter.<br>The link for the page that has the full data.<br>If the page title matches ''EXACTLY'' with the [line-#-link] text, you can leave this out and it will automatically link to that page. (The example is blank because the page name is also Quick Reflexes.)
|
|-
|line-2-link-page
|
|-
|line-3-link-page
|
|-
|line-4-link-page
|
|-
|tooltip-1-type
|rowspan="4"|If there is no tooltip, do not use this parameter.<br>Use "tooltip", "tooltip-short", or "tooltip-long" to determine how far above the text the tooltip image should begin.
|
|-
|tooltip-2-type
|''tooltip-short''
|-
|tooltip-3-type
|
|-
|tooltip-4-type
|
|-
|tooltip-1-img
|rowspan="4"|If there is no tooltip, do not use this parameter.<br>File name for the tooltip image.
|
|-
|tooltip-2-img
|''SF CoE Ability Quick Reflexes.png''
|-
|tooltip-3-img
|
|-
|tooltip-4-img
|
|-
|line-1-end
|rowspan="4"|If there is no link / tooltip, do not use this parameter.<br>Text that appears after a link / tooltip (if any).
|
|-
|line-2-end
|
|-
|line-3-end
|
|-
|line-4-end
|
|}


==Template Markup==
==Template Markup==
</noinclude>
</noinclude>


 
<div class="item-block">
<span><div style="display-inline" class="{{{style|item-text}}}">{{{pre-inline-text|}}} <div class="{{{type|tooltip}}}"><b>{{{text|tooltip}}}<span style="margin: 5px; display: block;height: auto; max-width: 250px;" border="0">[[{{{image|File:NoImage.png}}}]] {{{post-inline-text|}}}</span></b></div></div>
<div>
  <div class="item-icon">{{#if: {{{linked|}}} | [[Image:{{{icon|Icon Spacer.png}}}|75px|link={{{linked}}}]] | [[Image:{{#setmainimage: {{{icon|Icon Spacer.png}}} }}|75px|link=]]}}</div>
  <h4><div class="item-title">{{#if: {{{linked|}}} | [[{{{linked}}}|{{{title}}}]] | {{{title}}} }}</div></h4>
</div>
<div class="item-subtitle">{{{sub-title|}}}</div>
<div>
  <div class="item-threshold">[[Image:SF CoE Elemental {{{value-elemental|Spacer}}}.png|link=|Elemental Threshold]][[Image:SF CoE Life {{{value-life|Spacer}}}.png|link=|Life Threshold]][[Image:SF CoE Death {{{value-death|Spacer}}}.png|link=|Death Threshold]][[Image:SF CoE Arcane {{{value-arcane|Spacer}}}.png|link=|Arcane Threshold]][[Image:SF CoE Amplifier {{{value-amplifier|Spacer}}}.png|link=|Amplifier Value]]</div>
  <div class="item-cost">{{#ifexpr: {{{value-gold|}}} | [[Image:SF CoE Item Gold Cost.png|28px|link=|Gold]] {{{value-gold}}} | }}{{#ifexpr: {{{value-mana|}}} | [[Image:SF CoE Item Mana Cost.png|28px|link=|Mana]] {{{value-mana}}} | }}</div>
</div>
  <div class="item-block-splitter">[[Image:SF CoE Item Block Splitter.png|320px|link=]]</div>
{{#if: {{{line-1|}}} | <div class="item-text">{{{line-1|}}} {{#if: {{{line-1-link|}}} | <div class="tooltip-wrapper">[[{{{line-1-link-page| {{{line-1-link|}}} }}}|{{{line-1-link|}}}]]<div class="{{{tooltip-1-type|tooltip}}}"><span style="margin: 5px; display: block;height: auto; max-width: 250px;" border="0">[[Image:{{{tooltip-1-img|SF CoE Elemental Spacer.png}}}]]</span></div></div> | }} {{{line-1-end|}}}</div> | }} {{#if: {{{line-2|}}} | <div class="item-text">{{{line-2|}}} {{#if: {{{line-2-link|}}} | <div class="tooltip-wrapper">[[{{{line-2-link-page| {{{line-2-link|}}} }}}|{{{line-2-link|}}}]]<div class="{{{tooltip-2-type|tooltip}}}"><span style="margin: 5px; display: block;height: auto; max-width: 250px;" border="0">[[Image:{{{tooltip-2-img|SF CoE Elemental Spacer.png}}}]]</span></div></div> | }} {{{line-2-end|}}}</div> | }} {{#if: {{{line-3|}}} | <div class="item-text">{{{line-3|}}} {{#if: {{{line-3-link|}}} | <div class="tooltip-wrapper">[[{{{line-3-link-page| {{{line-3-link|}}} }}}|{{{line-3-link|}}}]]<div class="{{{tooltip-3-type|tooltip}}}"><span style="margin: 5px; display: block;height: auto; max-width: 250px;" border="0">[[Image:{{{tooltip-3-img|SF CoE Elemental Spacer.png}}}]]</span></div></div> | }} {{{line-3-end|}}}</div> | }} {{#if: {{{line-4|}}} | <div class="item-text">{{{line-4|}}} {{#if: {{{line-4-link|}}} | <div class="tooltip-wrapper">[[{{{line-4-link-page| {{{line-4-link|}}} }}}|{{{line-4-link|}}}]]<div class="{{{tooltip-4-type|tooltip}}}"><span style="margin: 5px; display: block;height: auto; max-width: 250px;" border="0">[[Image:{{{tooltip-4-img|SF CoE Elemental Spacer.png}}}]]</span></div></div> | }} {{{line-4-end|}}}</div> | }}
</div>

Latest revision as of 21:20, 9 October 2023


CoE Item

Inserts a item for CoE. Typical items are abilities, statuses, room expansions, artifacts, recipes, ingredients, etc.

Example Preview

Artifact, Ingredient, Light Armor
Elemental Threshold Life Threshold
Gold Value 10
+2 Speed

Example Usage

{{CoE Item
|title = Battle Robe
|linked = Battle Robe
|sub-title = Artifact, Ingredient, Light Armor
|icon = SF CoE Icon Battle Robe.png
|value-gold = 10
|value-elemental = 2
|value-life = 1
|line-1 = +2 Speed.
|line-2 = Grants
|tooltip-2-type = tooltip-short
|tooltip-2 = Quick Reflexes
|tooltip-2-img = SF CoE Ability Quick Reflexes.png
}}

How to Use This Template & Parameters

Parameters define the data that gets be passed to the template. That's how the template "knows" what to display for you. They can loosely be called variables.

The ONLY required parameter is title. But if that is the only parameter you list, it will be an empty box (besides the item title).

THIS TEMPLATE'S parameters do not need to be used in order, but you do need to specify the parameter name, the = sign, and then the data/text you want to use, separated by the | sign. See the Example Usage section below.

Table Column Explanations
Parameter is the name for what you are describing.
Value is the text/info you want to show.
Example is what is shown in the Example Usage and Example Preview sections.
Template Parameters
Parameter Value Example
title The name of the item you are making. ** Header Level 4 ** Battle Robe
linked Leave blank if you do NOT wish to link the item. List the name of the page to link to otherwise. Battle Robe
sub-title Sub-classes or categories the item falls into. Artifact, Ingredient, Light Armor
icon File name for the icon. SF CoE Icon Battle Robe.png
value-gold The gold value of the item. 10
value-mana The mana value of the item.
value-elemental The elemental () value (ingredients, artifacts, etc.) or threshold (recipes, room extensions, etc.). 2
value-life The life () value (ingredients, artifacts, etc.) or threshold (recipes, room extensions, etc.). 1
value-death The death () value (ingredients, artifacts, etc.) or threshold (recipes, room extensions, etc.).
value-arcane The arcane () value (ingredients, artifacts, etc.) or threshold (recipes, room extensions, etc.).
value-amplifier The amplifier () value (ingredients, artifacts, etc.).
line-1 The [first / second / third / fourth] line of the description (before any link / tooltip text). +2 Speed
line-2 Grants
line-3
line-4
line-1-link If there is no link / tooltip, do not use this parameter.
The linked text (can show tooltip display with mouse hover on computers).
line-2-link Quick Reflexes
line-3-link
line-4-link
line-1-link-page If there is no link / tooltip, do not use this parameter.
The link for the page that has the full data.
If the page title matches EXACTLY with the [line-#-link] text, you can leave this out and it will automatically link to that page. (The example is blank because the page name is also Quick Reflexes.)
line-2-link-page
line-3-link-page
line-4-link-page
tooltip-1-type If there is no tooltip, do not use this parameter.
Use "tooltip", "tooltip-short", or "tooltip-long" to determine how far above the text the tooltip image should begin.
tooltip-2-type tooltip-short
tooltip-3-type
tooltip-4-type
tooltip-1-img If there is no tooltip, do not use this parameter.
File name for the tooltip image.
tooltip-2-img SF CoE Ability Quick Reflexes.png
tooltip-3-img
tooltip-4-img
line-1-end If there is no link / tooltip, do not use this parameter.
Text that appears after a link / tooltip (if any).
line-2-end
line-3-end
line-4-end

Template Markup

{{{title}}}

Elemental ThresholdLife ThresholdDeath ThresholdArcane ThresholdAmplifier Value