Difference between revisions of "Template:Alchemy tree"

From SpiralKnights

Jump to: navigation, search
m (Maybe not 80px for width...)
m (documentation plugged in - making sure didn't break anything)
 
(129 intermediate revisions by one other user not shown)
Line 1: Line 1:
<noinclude>
 
Testing for alch tree templates.
 
</noinclude>
 
 
<includeonly>
 
<includeonly>
{{#if: {{{name}}} | {{SKWindow/Cell|1=[[{{{name}}}]]<br>[[Image:Equipment-{{{name}}}_icon.png|40px|link={{{name}}}]]|2=center|3=center|5={{{rows}}}|6=120px|7={{#expr: 80*{{{rows}}} }}px|background=#c7dbea }} | {{SKWindow/Cell|5={{{rows}}}|background=#114255| }} }}
+
{{#if: {{{name|}}} | {{#if: {{{minSize|}}} | {{!}} colspan="1" rowspan="{{{rows|1}}}" align="left" valign="middle" style="width:{{#ifeq: {{{rows|1}}}|1|20em;|13em;}} height:*; background:#c7dbea; color:#000000; font-size: normal; padding: 2px 5px 2px 5px; border-radius: 5px; -moz-border-radius: 5px; -webkit-border-radius: 5px; -khtml-border-radius: 5px; -icab-border-radius: 5px; -o-border-radius: 5px;" {{!}} <span style="float: left; margin: 0px; padding: 0px 5px 0px 0px;">[[Image:Equipment-{{{name}}}_icon.png | {{#ifexpr: {{{rows|1}}} < 3 | {{#expr: {{{rows|1}}}*5+15}}px | 40px }} | link={{{name}}}|{{{name}}} ]] </span> <span style="height: {{#expr: {{{rows|1}}}*3}}em;" >[[{{{name}}}]] </span> | {{SKWindow/Cell|1=[[Image:Equipment-{{{name}}}_icon.png | 40px | link={{{name}}}|{{{name}}} ]] <br> [[{{{name}}}]] | 2=center | 3=middle| 5={{{rows|1}}} | background=#c7dbea }} }} | {{SKWindow/Cell|5={{{rows|1}}}|background=#114255| }} }}</includeonly><noinclude>
</includeonly>
+
{{documentation}}</noinclude>

Latest revision as of 13:10, 31 January 2015

[edit] [purge] Template documentation

Usage

This is a template structure used for creating alchemy trees.

Parameters

Required
None.

Optional
name : The name of the item to appear in the tree [defaults to blank].
rows : The number of rows the cell should take up [defaults to 1]
minSize : Set to true to pack the cell as small as possible. Reduces icon size, removes padding, and attempts to align text as strategically as possible. [defaults to blank, the "normal" setting.] Use this for items that have huge trees, like the Padded Cap.

Instructions to Create a Tree

1. Start a SKWindowsmall.
2. Create a table within the SKWindowsmall template with style="background: #114255;".
3. Add in the Alchemy path header.
4. For each cell, call this template. The ordering of each cells should be from left to right.
5. When an alchemy line terminates, add a {{SKWindow/NewRow}} to continue onto the next line.
6. Finish the table and SKWindowsmall template.

Tips and Tricks
It is easiest to copy the structure from either an existing tree or the example code below.
The number of "rows" in the parameters, is the number of possible items that can be crafted from the current item.
Despite not having any "craftable" items, empty spaces before items must be placed with correct rows to ensure the table is output correctly.

Example Code and Appearance

The code:

The raw code does not go on individual pages, it is used to build a table for an item's tree that is copy/pasted onto the relevant pages for that item, make a table on a page of the lowest-star item like so:

1) Magic Hood/alchemy path
2) then paste it onto all the relevant pages with something like: {{:Magic Hood/alchemy path}} in the alchemy path section.


{{SKWindowsmall
| width = *
| title = {{PAGENAME}}'s alchemy path
| body = {{{SKWindow/NewRow}} style="background: #114255;"
{{Alchemy paths header}}
{{SKWindow/NewRow}}
{{Alchemy tree|rows=3}}
{{Alchemy tree|rows=3}}
{{Alchemy tree|rows=3|name=Magic Hood}}
{{Alchemy tree|rows=3|name=Elemental Hood}}
{{Alchemy tree|rows=3|name=Miracle Hood}}
{{Alchemy tree|name=Chaos Cowl}}
{{SKWindow/NewRow}}
{{Alchemy tree|name=Divine Veil}}
{{SKWindow/NewRow}}
{{Alchemy tree|name=Grey Feather Cowl}}
{{!}}}
}}


Provides a table as appears here:

Alchemy tree's alchemy path
☆☆☆☆☆ ★☆☆☆☆ ★★☆☆☆ ★★★☆☆ ★★★★☆ ★★★★★
Magic Hood
Magic Hood
Elemental Hood
Elemental Hood
Miracle Hood
Miracle Hood
Chaos Cowl
Chaos Cowl
Divine Veil
Divine Veil
Grey Feather Cowl
Grey Feather Cowl
Personal tools