Difference between revisions of "Template:Alchemy tree"
From SpiralKnights
BlarghBlargh (Talk | contribs) m (Forgot, dont need Template: for templates.) |
BlarghBlargh (Talk | contribs) (Attempting to add an endRow parameter, but it isn't updating in the template... maybe saving will do it?) |
||
Line 12: | Line 12: | ||
rows : The number of rows the cell should take up [defaults to 1]<br> | rows : The number of rows the cell should take up [defaults to 1]<br> | ||
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.]<br> | 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.]<br> | ||
+ | endRow : Adds a <nowiki>{{SKWindow/NewRow}} signifying the end of a crafting branch [defaults to false]<br> | ||
== Instructions to Create a Tree == | == Instructions to Create a Tree == | ||
Line 20: | Line 21: | ||
3. Add in the Alchemy path header.<br> | 3. Add in the Alchemy path header.<br> | ||
4. For each cell, call this template. The ordering of each cells should be from left to right.<br> | 4. For each cell, call this template. The ordering of each cells should be from left to right.<br> | ||
− | 5. When an alchemy line terminates, | + | 5. When an alchemy line terminates, set endRow=True.<br> |
6. Finish the table and close the SKWindowsmall template.<br> | 6. Finish the table and close the SKWindowsmall template.<br> | ||
<br> | <br> | ||
Line 41: | Line 42: | ||
<nowiki>{{</nowiki>{{PAGENAME}}<nowiki>|name=|rows=6}}</nowiki><br> | <nowiki>{{</nowiki>{{PAGENAME}}<nowiki>|name=|rows=6}}</nowiki><br> | ||
<nowiki>{{</nowiki>{{PAGENAME}}<nowiki>|name=Brandish|rows=6}}</nowiki><br> | <nowiki>{{</nowiki>{{PAGENAME}}<nowiki>|name=Brandish|rows=6}}</nowiki><br> | ||
− | <nowiki>{{</nowiki>{{PAGENAME}}<nowiki>|name=Cautery Sword|rows=1 | + | <nowiki>{{</nowiki>{{PAGENAME}}<nowiki>|name=Cautery Sword|rows=1|endRow=True}}</nowiki><br> |
− | + | ||
<nowiki>{{</nowiki>{{PAGENAME}}<nowiki>|name=Nightblade|rows=2}}</nowiki><br> | <nowiki>{{</nowiki>{{PAGENAME}}<nowiki>|name=Nightblade|rows=2}}</nowiki><br> | ||
<nowiki>{{</nowiki>{{PAGENAME}}<nowiki>|name=Silent Nightblade|rows=2}}</nowiki><br> | <nowiki>{{</nowiki>{{PAGENAME}}<nowiki>|name=Silent Nightblade|rows=2}}</nowiki><br> | ||
− | <nowiki>{{</nowiki>{{PAGENAME}}<nowiki>|name=Acheron|rows=1 | + | <nowiki>{{</nowiki>{{PAGENAME}}<nowiki>|name=Acheron|rows=1|endRow=True}}</nowiki><br> |
− | + | <nowiki>{{</nowiki>{{PAGENAME}}<nowiki>|name=Obsidian Edge|rows=1|endRow=True}} </nowiki><br> | |
− | <nowiki>{{</nowiki>{{PAGENAME}}<nowiki>|name=Obsidian Edge|rows=1 | + | |
− | + | ||
<nowiki>{{</nowiki>{{PAGENAME}}<nowiki>|name=Fireburst Brandish|rows=1}}</nowiki><br> | <nowiki>{{</nowiki>{{PAGENAME}}<nowiki>|name=Fireburst Brandish|rows=1}}</nowiki><br> | ||
<nowiki>{{</nowiki>{{PAGENAME}}<nowiki>|name=Blazebrand|rows=1}} </nowiki><br> | <nowiki>{{</nowiki>{{PAGENAME}}<nowiki>|name=Blazebrand|rows=1}} </nowiki><br> | ||
− | <nowiki>{{</nowiki>{{PAGENAME}}<nowiki>|name=Combuster|rows=1 | + | <nowiki>{{</nowiki>{{PAGENAME}}<nowiki>|name=Combuster|rows=1|endRow=True}} </nowiki><br> |
− | + | ||
<nowiki>{{</nowiki>{{PAGENAME}}<nowiki>|name=Iceburst Brandish|rows=1}}</nowiki><br> | <nowiki>{{</nowiki>{{PAGENAME}}<nowiki>|name=Iceburst Brandish|rows=1}}</nowiki><br> | ||
<nowiki>{{</nowiki>{{PAGENAME}}<nowiki>|name=Blizzbrand|rows=1}} </nowiki><br> | <nowiki>{{</nowiki>{{PAGENAME}}<nowiki>|name=Blizzbrand|rows=1}} </nowiki><br> | ||
− | <nowiki>{{</nowiki>{{PAGENAME}}<nowiki>|name=Glacius|rows=1 | + | <nowiki>{{</nowiki>{{PAGENAME}}<nowiki>|name=Glacius|rows=1|endRow=True}} </nowiki><br> |
− | + | ||
<nowiki>{{</nowiki>{{PAGENAME}}<nowiki>|name=Shockburst Brandish|rows=1}}</nowiki><br> | <nowiki>{{</nowiki>{{PAGENAME}}<nowiki>|name=Shockburst Brandish|rows=1}}</nowiki><br> | ||
<nowiki>{{</nowiki>{{PAGENAME}}<nowiki>|name=Boltbrand|rows=1}}</nowiki><br> | <nowiki>{{</nowiki>{{PAGENAME}}<nowiki>|name=Boltbrand|rows=1}}</nowiki><br> | ||
− | <nowiki>{{</nowiki>{{PAGENAME}}<nowiki>|name=Voltedge|rows=1}}</nowiki><br> | + | <nowiki>{{</nowiki>{{PAGENAME}}<nowiki>|name=Voltedge|rows=1|endRow=True}}</nowiki><br> |
<nowiki>{{!}}}</nowiki><br> | <nowiki>{{!}}}</nowiki><br> | ||
<nowiki>}}</nowiki><br> | <nowiki>}}</nowiki><br> | ||
Line 73: | Line 69: | ||
{{{{PAGENAME}}|name=|rows=6}} | {{{{PAGENAME}}|name=|rows=6}} | ||
{{{{PAGENAME}}|name=Brandish|rows=6}} | {{{{PAGENAME}}|name=Brandish|rows=6}} | ||
− | {{{{PAGENAME}}|name=Cautery Sword|rows=1 | + | {{{{PAGENAME}}|name=Cautery Sword|rows=1|endRow=True}} |
− | + | ||
{{{{PAGENAME}}|name=Nightblade|rows=2}} | {{{{PAGENAME}}|name=Nightblade|rows=2}} | ||
{{{{PAGENAME}}|name=Silent Nightblade|rows=2}} | {{{{PAGENAME}}|name=Silent Nightblade|rows=2}} | ||
− | {{{{PAGENAME}}|name=Acheron|rows=1 | + | {{{{PAGENAME}}|name=Acheron|rows=1|endRow=True}} |
− | + | {{{{PAGENAME}}|name=Obsidian Edge|rows=1|endRow=True}} | |
− | {{{{PAGENAME}}|name=Obsidian Edge|rows=1 | + | |
− | + | ||
{{{{PAGENAME}}|name=Fireburst Brandish|rows=1}} | {{{{PAGENAME}}|name=Fireburst Brandish|rows=1}} | ||
{{{{PAGENAME}}|name=Blazebrand|rows=1}} | {{{{PAGENAME}}|name=Blazebrand|rows=1}} | ||
− | {{{{PAGENAME}}|name=Combuster|rows=1 | + | {{{{PAGENAME}}|name=Combuster|rows=1|endRow=True}} |
− | + | ||
{{{{PAGENAME}}|name=Iceburst Brandish|rows=1}} | {{{{PAGENAME}}|name=Iceburst Brandish|rows=1}} | ||
{{{{PAGENAME}}|name=Blizzbrand|rows=1}} | {{{{PAGENAME}}|name=Blizzbrand|rows=1}} | ||
− | {{{{PAGENAME}}|name=Glacius|rows=1 | + | {{{{PAGENAME}}|name=Glacius|rows=1|endRow=True}} |
− | + | ||
{{{{PAGENAME}}|name=Shockburst Brandish|rows=1}} | {{{{PAGENAME}}|name=Shockburst Brandish|rows=1}} | ||
− | {{{{PAGENAME}}|name=Boltbrand|rows=1}} | + | {{{{PAGENAME}}|name=Boltbrand|rows=1|endRow=False}} |
− | {{{{PAGENAME}}|name=Voltedge|rows=1}} | + | {{{{PAGENAME}}|name=Voltedge|rows=1|endRow=True}} |
{{!}}} | {{!}}} | ||
}} | }} | ||
</noinclude><includeonly> | </noinclude><includeonly> | ||
− | {{#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> | + | {{#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| }} }} {{#if: {{{endRow|}}} | {{SKWindow/NewRow}} | }}</includeonly> |
Revision as of 23:21, 22 January 2015
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.]
endRow : Adds a {{SKWindow/NewRow}} signifying the end of a crafting branch [defaults to false]<br>
== Instructions to Create a Tree ==
1. Start a SKWindowsmall.<br>
2. Create a table within the SKWindowsmall template with style="background: #114255;".<br>
3. Add in the Alchemy path header.<br>
4. For each cell, call this template. The ordering of each cells should be from left to right.<br>
5. When an alchemy line terminates, set endRow=True.<br>
6. Finish the table and close the SKWindowsmall template.<br>
<br>
'''Tips and Tricks'''<br>
It is easiest to copy the structure from either an existing tree or the example code below.<br>
The number of "rows" in the parameters, is the number of possible items that can be crafted from the current item.<br>
Despite not having any "craftable" items, empty spaces before items must be placed with correct rows to ensure the table is output correctly.<br>
== Example Code and Appearance ==
*As a note: Copy the code from the template page, not the template code.
'''The code:'''<br>
<nowiki>{{SKWindowsmall
| width = 50%
| title = {{PAGENAME}}'s alchemy path
| body = {{{SKWindow/NewRow}} style="background: #114255;"
{{Alchemy paths header|width5=20%}}
{{SKWindow/NewRow}}
{{Alchemy tree|name=|rows=6}}
{{Alchemy tree|name=|rows=6}}
{{Alchemy tree|name=Brandish|rows=6}}
{{Alchemy tree|name=Cautery Sword|rows=1|endRow=True}}
{{Alchemy tree|name=Nightblade|rows=2}}
{{Alchemy tree|name=Silent Nightblade|rows=2}}
{{Alchemy tree|name=Acheron|rows=1|endRow=True}}
{{Alchemy tree|name=Obsidian Edge|rows=1|endRow=True}}
{{Alchemy tree|name=Fireburst Brandish|rows=1}}
{{Alchemy tree|name=Blazebrand|rows=1}}
{{Alchemy tree|name=Combuster|rows=1|endRow=True}}
{{Alchemy tree|name=Iceburst Brandish|rows=1}}
{{Alchemy tree|name=Blizzbrand|rows=1}}
{{Alchemy tree|name=Glacius|rows=1|endRow=True}}
{{Alchemy tree|name=Shockburst Brandish|rows=1}}
{{Alchemy tree|name=Boltbrand|rows=1}}
{{Alchemy tree|name=Voltedge|rows=1|endRow=True}}
{{!}}}
}}
Provides a table as appears here:
Alchemy tree's alchemy path | ||||||||||||||||||||||||
|