Actions

Template

Difference between revisions of "Itembox"

From Unofficial Stationeers Wiki

 
(47 intermediate revisions by 3 users not shown)
Line 1: Line 1:
 +
<includeonly>
 
{{Infobox
 
{{Infobox
| name = Itembox
+
| name = Itembox
| title = {{{name|}}}
+
| title = {{{name|}}}
| image =  {{{image|}}}
+
| image =  {{{image|}}}
| label2 = Stacks
+
| header19 = {{ #if: {{{stacks|}}}{{{autoignition|}}}{{{flashpoint|}}}{{{paintable|}}} | Properties <!--
| data2 = {{{stacks|}}}
+
-->{{Infobox | decat = yes | child = yes
| label4 = Paintable
+
    | label1 = Stacks
| data4 = {{{paintable|}}}
+
    | data1 = {{#if: {{{stacks|}}} |
| label6 = Constructing Options
+
      {{#iferror:
| data6 = {{{constructs|}}}
+
        {{#expr: {{{stacks|}}}+1 }}
| header60 = {{ #if: {{{createdwith|}}} | Recipe}}
+
        | {{{stacks|}}} |
| label62 = Created With
+
        {{#ifexpr: {{{stacks|}}} = 1 | No | Yes ({{{stacks|}}}) }}
| data62 = {{{createdwith|}}}
+
      }}
| label64 = Cost
+
    }}
| data64 = {{{cost|}}}
+
    | label2 = Paintable
<!-- New recipe style -->
+
    | data2 = {{{paintable|}}}
| header65 = {{ #if: {{{recipe_machine1|}}} | Recipes}}
+
    | label3 = Autoignition
| label67 = [[{{{recipe_machine1|}}}]]
+
    | data3 = {{{autoignition|}}}
| data67 = {{{recipe_cost1|}}}
+
    | label4 = Flashpoint
| label70 = [[{{{recipe_machine2|}}}]]
+
    | data4 = {{{flashpoint|}}}
| data70 = {{{recipe_cost2|}}}
+
  }}
| label72 = [[{{{recipe_machine3|}}}]]
+
}}
| data72 = {{{recipe_cost3|}}}
+
| label6 = Constructing Options
 
+
| data6 = {{{constructs|}}}
| label30 = Used With
+
| label7 = Used With
| data30 = {{{usedwith|}}}
+
| data7 = {{{usedwith|}}}
| label32 = Max Input Power
+
| label8 = Max Input Power
| data32 = {{{maxinpower|}}}
+
| data8 = {{{maxinpower|}}}
| label34 = Max Output Power
+
| label9 = Max Output Power
| data34 = {{{maxoutpower|}}}
+
| data9 = {{{maxoutpower|}}}
| label36 = Max Pressure
+
| label10 = Max Pressure
| data36 = {{{maxpressure|}}}
+
| data10 = {{{maxpressure|}}}
| label37 = Pressure Range
+
| label11 = Pressure Range
| data37 = {{{pressurerange|}}}
+
| data11 = {{{pressurerange|}}}
| label38 = Max Temperature
+
| label12 = Max Temperature
| data38 = {{{maxtemp|}}}
+
| data12 = {{{maxtemp|}}}
| label39 = Temperature Range
+
| label13 = Temperature Range
| data39 = {{{temprange|}}}
+
| data13 = {{{temprange|}}}
| label40 = Logic Parameters
+
| label14 = Volume
| data40 = {{{logic|}}}
+
| data14 = {{{volume|}}}
| label42 = Volume
+
| header20 = {{ #if: {{{createdwith|}}} | Recipe <!-- Old recipe style
| data42 = {{{volume|}}}
+
-->{{Infobox | decat = yes | child = yes
| label43 = Hash ID
+
    | label1 = Created With
| data43 = {{{hashid|}}}
+
    | data1 = {{{createdwith|}}}
| label44 = Prefab Hash
+
    | label2 = Cost
| data44 = {{{prefabhash|}}}
+
    | data2 = {{{cost|}}}
| label45 = Prefab Name
+
    }}
| data45 = {{{prefabname|}}}
+
  }}
| label46 = Slot Class
+
| header21 = {{ #if: {{{recipe_machine1|}}} | Recipes <!-- New recipe style
| label46 = {{{slot_class|}}}
+
-->{{Infobox | decat = yes | child = yes
| label47 = Sorting Class
+
    | label1 = [[{{{recipe_machine1|}}}]]
| data47 = {{{sorting_class|}}}
+
    | data1 = {{{recipe_cost1|}}}
}}<includeonly>[[Category:Items]]</includeonly>
+
    | label4 = [[{{{recipe_machine2|}}}]]
 +
    | data4 = {{{recipe_cost2|}}}
 +
    | label6 = [[{{{recipe_machine3|}}}]]
 +
    | data6 = {{{recipe_cost3|}}}
 +
  }}
 +
}}
 +
| header22 = {{ #if: {{{logic|}}}{{{prefabhash|}}}{{{prefabname|}}}{{{slot_class|}}}{{{sorting_class|}}}{{{hashid|}}} | Logic <!--
 +
-->{{Infobox | decat = yes | child = yes
 +
    | label1 = Item Hash
 +
    | data1 = {{#if: {{{prefabhash|}}} | <span style="font-family: monospace;">{{{prefabhash|}}}</span> | {{#if: {{{hashid|}}}| <span style="font-family: monospace;">{{{hashid|}}}</span> }} }}
 +
    | label2 = Item Name
 +
    | data2 = {{#if: {{{prefabname|}}} | <span style="font-family: monospace;">{{{prefabname|}}}</span>}}
 +
    | label3 = Logic Classes
 +
    | data3 = {{#if: {{{slot_class|}}}| <div style="font-family: monospace;">{{{slot_class|}}}</div> }}{{#if: {{{sorting_class|}}}|<div style="font-family: monospace;">{{{sorting_class|}}}</div> }}
 +
    | label4 = Logic Parameters
 +
    | data4 = {{{logic|}}}
 +
  }}
 +
}}
 +
| header23 = {{ #if: {{{nutrition|}}}{{{quality|}}}{{{growthtime|}}}{{{moodbonus|}}} | Food <!--
 +
-->{{Infobox | decat = yes | child = yes
 +
    | label1 = Food Nutrition
 +
    | data1 = {{{nutrition|}}}
 +
    | label2 = Food Quality
 +
    | data2 = {{{quality|}}}
 +
    | label3 = Growth Time
 +
    | data3 = {{{growthtime|}}}
 +
    | label4 = Mood Bonus
 +
    | data4 = {{{moodbonus|}}}
 +
  }}
 +
}}
 +
}} [[Category:Items]] {{ #if: {{{nutrition|}}}{{{quality|}}}{{{moodbonus|}}} | [[Category:Food]] }} {{ #if: {{{constructs|}}} | [[Category:Kits]] }} {{ #if: {{{createdwith|}}}{{{cost|}}} | [[Category:Itembox with old style recipe]] }} {{ #if: {{{prefabhash|}}}{{{hashid|}}} | | [[Category:Infobox without prefab data]] }} {{ #if: {{{prefabname|}}} | | [[Category:Infobox without prefab data]] }} {{ #if: {{{slot_class|}}}{{{sorting_class|}}} | | [[Category:Itembox without logic classes]] }} {{#ifeq: {{{slot_class}}}|SlotClass.Tool|[[Category:Tools]]|}} </includeonly>
 
<noinclude>{{Documentation}}</noinclude>
 
<noinclude>{{Documentation}}</noinclude>

Latest revision as of 11:32, 4 August 2024

Template documentation[view] [edit] [history] [purge]
item's name
item's image
Constructing Options item's constructing variations
Used With usedwith
Max Input Power item's maximum input power
Max Output Power item's maximum output power
Max Pressure item's maximum pressure
Pressure Range item's pressure range
Max Temperature item's maximum temperature
Temperature Range item's temperature range
Volume item's volume
Properties
Stacks item's stacks (number only)
Paintable item is paintable
Recipe
Created With old style item's recipe machine
Cost old style item's recipe cost
Recipes
new style recipe machine (1) new style recipe machine (1) cost
new style recipe machine (2) new style recipe machine (2) cost
new style recipe machine (3) new style recipe machine (3) cost
Logic
Item Hash item's prefab. hash
Item Name item's prefab. name
Logic Classes
item's slot class when in a slot (SlotClass.None, etc)
item's sorting class (used in Logic Sorter) (SortingClass.Default, etc)
Logic Parameters item's logic parameter
Food
Food Nutrition item's nutrition
Food Quality item's quality
Growth Time item's growth time

Example[edit]

The following code produces the box presented on the right. All possible arguments are utilized in this example.

{{Itembox
 |            name = item's name
 |           image = item's image
 |          stacks = item's stacks (number only)
 |       paintable = item is paintable
 |      constructs = item's constructing variations
 |     createdwith = old style item's recipe machine
 |            cost = old style item's recipe cost
 | recipe_machine1 = new style recipe machine (1)
 |    recipe_cost1 = new style recipe machine (1) cost
 | recipe_machine2 = new style recipe machine (2)
 |    recipe_cost2 = new style recipe machine (2) cost
 | recipe_machine3 = new style recipe machine (3)
 |    recipe_cost3 = new style recipe machine (3) cost
 |        usedwith = usedwith
 |      maxinpower = item's maximum input power
 |     maxoutpower = item's maximum output power
 |     maxpressure = item's maximum pressure
 |   pressurerange = item's pressure range
 |         maxtemp = item's maximum temperature
 |       temprange = item's temperature range
 |           logic = item's logic parameter
 |          volume = item's volume
 |      prefabhash = item's prefab. hash
 |      prefabname = item's prefab. name
 |      slot_class = item's slot class when in a slot (SlotClass.None, etc)
 |   sorting_class = item's sorting class (used in Logic Sorter) (SortingClass.Default, etc)
 |       nutrition = item's nutrition value (if food)
 |         quality = item's quality rating (if food)
 |      growthtime = item's growth time (if plant)
}}

Template[edit]

Here's a blank example you can copy to fill in the data

{{Itembox
 |            name = 
 |           image = 
 |          stacks = 
 |       paintable = 
 |      constructs = 
 |     createdwith = 
 |            cost = 
 | recipe_machine1 = 
 |    recipe_cost1 = 
 | recipe_machine2 = 
 |    recipe_cost2 = 
 | recipe_machine3 = 
 |    recipe_cost3 = 
 |        usedwith = 
 |      maxinpower = 
 |     maxoutpower = 
 |     maxpressure = 
 |   pressurerange = 
 |         maxtemp = 
 |       temprange = 
 |           logic = 
 |          volume = 
 |      prefabhash = 
 |      prefabname =
 |      slot_class =
 |   sorting_class =
 |       nutrition =
 |         quality =
 |      growthtime =
}}