Difference between revisions of "Template:Crafting Grid"

From Electrical Age
Jump to: navigation, search
(Created page with "<div class="craftgrid" style="float:{{#if:{{{float|}}}|{{{float}}}|left}};"><div style="left:0px; top:0px; width:256px; height:132px; position:relative;"> <div style="left:0p...")
 
(Removed links to missing nyan cat page.)
 
(21 intermediate revisions by 2 users not shown)
Line 1: Line 1:
<div class="craftgrid" style="float:{{#if:{{{float|}}}|{{{float}}}|left}};"><div style="left:0px; top:0px; width:256px; height:132px; position:relative;">
+
<includeonly>
<div style="left:0px; top:0px; width:256px; height:132px;">[[Image:Crafting_GUI.png|256px|link=|alt=]]</div><!--
+
<div class="craftgrid" align="left">
 
+
    <div style="left:0px; top:0px; width:256px; height:132px; position:relative;z-index: 0;">
-->{{#if:{{{A1|}}}|<div style="left:14px; top:9px; width:32px; height:32px; position:absolute;">
+
    <div style="left:0px; top:0px; width:256px; height:132px;">[[Image:Crafting_GUI.png|256px|link=|alt=]]</div>
[[Image:{{#if:{{{A1-image|}}}|{{{A1-image}}}|Grid_{{{A1}}}.png}}|32px|link={{#if:{{{A1-link|}}}|{{{A1-link}}}|{{{A1}}}}}|alt={{{A1}}}]]
+
    <!-- Row 1 -->
</div>}}<!--
+
    <div style="z-index:2; position: absolute; top: 14px; left: 14px;">[[File:Grid_{{{1|None}}}.png|32px|link={{{1|}}}]]</div>
-->{{#if:{{{A2|}}}|<div style="left:14px; top:45px; width:32px; height:32px; position:absolute;">
+
    <div style="z-index:2; position: absolute; top: 14px; left: 50px;">[[File:Grid_{{{2|None}}}.png|32px|link={{{2|}}}]]</div>
[[Image:{{#if:{{{A2-image|}}}|{{{A2-image}}}|Grid_{{{A2}}}.png}}|32px|link={{#if:{{{A2-link|}}}|{{{A2-link}}}|{{{A2}}}}}|alt={{{A2}}}]]
+
    <div style="z-index:2; position: absolute; top: 14px; left: 86px;">[[File:Grid_{{{3|None}}}.png|32px|link={{{3|}}}]]</div>
</div>}}<!--
+
    <!-- Row 2 -->
-->{{#if:{{{A3|}}}|<div style="left:14px; top:81px; width:32px; height:32px; position:absolute;">
+
    <div style="z-index:2; position: absolute; top: 50px; left: 14px;">[[File:Grid_{{{4|None}}}.png|32px|link={{{4|}}}]]</div>
[[Image:{{#if:{{{A3-image|}}}|{{{A3-image}}}|Grid_{{{A3}}}.png}}|32px|link={{#if:{{{A3-link|}}}|{{{A3-link}}}|{{{A3}}}}}|alt={{{A3}}}]]
+
    <div style="z-index:2; position: absolute; top: 50px; left: 50px;">[[File:Grid_{{{5|None}}}.png|32px|link={{{5|}}}]]</div>
</div>}}<!--
+
    <div style="z-index:2; position: absolute; top: 50px; left: 86px;">[[File:Grid_{{{6|None}}}.png|32px|link={{{6|}}}]]</div>
 
+
    <!-- Row 3 -->
-->{{#if:{{{B1|}}}|<div style="left:50px; top:9px; width:32px; height:32px; position:absolute;">
+
    <div style="z-index:2; position: absolute; top: 86px; left: 14px;">[[File:Grid_{{{7|None}}}.png|32px|link={{{7|}}}]]</div>
[[Image:{{#if:{{{B1-image|}}}|{{{B1-image}}}|Grid_{{{B1}}}.png}}|32px|link={{#if:{{{B1-link|}}}|{{{B1-link}}}|{{{B1}}}}}|alt={{{B1}}}]]
+
    <div style="z-index:2; position: absolute; top: 86px; left: 50px;">[[File:Grid_{{{8|None}}}.png|32px|link={{{8|}}}]]</div>
</div>}}<!--
+
    <div style="z-index:2; position: absolute; top: 86px; left: 86px;">[[File:Grid_{{{9|None}}}.png|32px|link={{{9|}}}]]</div>
-->{{#if:{{{B2|}}}|<div style="left:50px; top:45px; width:32px; height:32px; position:absolute;">
+
    <!-- Result -->
[[Image:{{#if:{{{B2-image|}}}|{{{B2-image}}}|Grid_{{{B2}}}.png}}|32px|link={{#if:{{{B2-link|}}}|{{{B2-link}}}|{{{B2}}}}}|alt={{{B2}}}]]
+
    <div style="z-index:2; position: absolute; top: 50px; left: 202px;">[[File:Grid_{{{result|None}}}.png|32px|link={{{result|}}}]]</div>
</div>}}<!--
+
    <div style="z-index:2; position: absolute; top: 66px; left: 226px; color: #FFFFFF; font-size: 16px; font-family: Courier New;"><b>{{{number|}}}</b></div>
-->{{#if:{{{B3|}}}|<div style="left:50px; top:81px; width:32px; height:32px; position:absolute;">
+
</div>
[[Image:{{#if:{{{B3-image|}}}|{{{B3-image}}}|Grid_{{{B3}}}.png}}|32px|link={{#if:{{{B3-link|}}}|{{{B3-link}}}|{{{B3}}}}}|alt={{{B3}}}]]
+
</includeonly>
</div>}}<!--
+
<noinclude>
+
==== How to use? ====
-->{{#if:{{{C1|}}}|<div style="left:86px; top:9px; width:32px; height:32px; position:absolute;">
+
<code>
[[Image:{{#if:{{{C1-image|}}}|{{{C1-image}}}|Grid_{{{C1}}}.png}}|32px|link={{#if:{{{C1-link|}}}|{{{C1-link}}}|{{{C1}}}}}|alt={{{C1}}}]]
+
{{Crafting_Grid<br />|1=A1|2=A2|3=A3<br />|4=B1|5=B2|6=B3<br />|7=C1|8=C2|9=C3<br />|result=D1|number=n}}
</div>}}<!--
+
</code><br /><br />
-->{{#if:{{{C2|}}}|<div style="left:86px; top:45px; width:32px; height:32px; position:absolute;">
+
The materials are in table like this:
[[Image:{{#if:{{{C2-image|}}}|{{{C2-image}}}|Grid_{{{C2}}}.png}}|32px|link={{#if:{{{C2-link|}}}|{{{C2-link}}}|{{{C2}}}}}|alt={{{C2}}}]]
+
    A1|A2|A3
</div>}}<!--
+
    B1|B2|B3
-->{{#if:{{{C3|}}}|<div style="left:86px; top:81px; width:32px; height:32px; position:absolute;">
+
    C1|C2|C3
[[Image:{{#if:{{{C3-image|}}}|{{{C3-image}}}|Grid_{{{C3}}}.png}}|32px|link={{#if:{{{C3-link|}}}|{{{C3-link}}}|{{{C3}}}}}|alt={{{C3}}}]]
+
and the result is the item/block that will come out of the crafting. The number is used if the recipe produces multiple ouput items.  To prepare the images, create 32x32 picture of the item with transparent background and name it Grid_<name of the item>.png. The PNG suffix is very important and must be LOWERCASE or it won't work!
</div>}}<!--
+
Something like this will come out:
+
{{Crafting_Grid|1=Copper_Ingot|2=Rubber|3=Copper_Ingot|4=Rubber|5=Copper_Ingot|6=Rubber|7=Copper_Ingot|8=Rubber|9=Copper_Ingot|result=Rubber}}
-->{{#if:{{{Output|}}}|<div style="left:202px; top:45px; width:32px; height:32px; position:absolute;">
+
</noinclude>
[[Image:{{#if:{{{Output-image|}}}|{{{Output-image}}}|Grid_{{{Output|}}}.png}}|32px|link={{#if:{{{Output-link|}}}|{{{Output-link}}}|{{{Output}}}}}|alt={{{Output}}}]]
 
</div>}}<!--
 
-->{{#if:{{{OA|}}}|
 
<div style="left:210px; top:65px; width:64px; height:24px; position:absolute; overflow:hidden;">
 
{{Grid/Crafting Square Numbers|{{{OA|}}}
 
                }}
 
</div>
 
}}</div></div>{{#if:{{{nobreak|}}}||<br style="clear: left" />}}
 

Latest revision as of 07:37, 20 February 2015


How to use?

{{Crafting_Grid
|1=A1|2=A2|3=A3
|4=B1|5=B2|6=B3
|7=C1|8=C2|9=C3
|result=D1|number=n}}


The materials are in table like this:

   A1|A2|A3
   B1|B2|B3
   C1|C2|C3

and the result is the item/block that will come out of the crafting. The number is used if the recipe produces multiple ouput items. To prepare the images, create 32x32 picture of the item with transparent background and name it Grid_<name of the item>.png. The PNG suffix is very important and must be LOWERCASE or it won't work! Something like this will come out:

Grid Copper Ingot.png
Grid Rubber.png
Grid Copper Ingot.png
Grid Rubber.png
Grid Copper Ingot.png
Grid Rubber.png
Grid Copper Ingot.png
Grid Rubber.png
Grid Copper Ingot.png
Grid Rubber.png