Template:Infobox Item: Difference between revisions
[checked revision] | [checked revision] |
No edit summary |
|||
Line 1: | Line 1: | ||
<includeonly> | <includeonly> | ||
{{#invoke:Infobox_Item|ItemMain}} | {{#invoke:Infobox_Item|ItemMain}} | ||
[[Category:Infobox Templates]] | |||
</includeonly> | </includeonly> | ||
Line 8: | Line 9: | ||
{{Infobox_Item|name = 'Item name'}} | {{Infobox_Item|name = 'Item name'}} | ||
</pre> | </pre> | ||
This template can be used to grab details relevant to an item. It formats the results into an infobox. | This template can be used to grab details relevant to an item. It formats the results into an infobox. | ||
If the template is passed, this module creates a table using details from the following Modules: | If the template is passed, this module creates a table using details from the following Modules: | ||
*[[Module:Infobox_Item]] | *[[Module:Infobox_Item]] | ||
*[[Module:ItemData]] | *[[Module:ItemData]] | ||
*[[Module:CraftingRecipes]]. | *[[Module:CraftingRecipes]]. | ||
== Usage== | == Usage== | ||
===Parameters=== | ===Parameters=== | ||
; name | ; name | ||
: The name of an item. This pulls the description for that item. | : The name of an item. This pulls the description for that item. | ||
===Infobox Properies=== | ===Infobox Properies=== | ||
If .name is found it will generate the following: | If .name is found it will generate the following: | ||
Line 84: | Line 81: | ||
|image = ItemName_Placed.png | |image = ItemName_Placed.png | ||
</pre> | </pre> | ||
''Note:'' Put the tag between <code><noinclude> </noinclude></code> tags for outdated transcluded pages. | ''Note:'' Put the tag between <code><noinclude> </noinclude></code> tags for outdated transcluded pages. | ||
==Examples== | ==Examples== | ||
{{Infobox_Item|name = Elk Carcass}} | {{Infobox_Item|name = Elk Carcass}} | ||
{{Infobox_Item|name = Charcoal}} | {{Infobox_Item|name = Charcoal}} | ||
{{Infobox_Item|name = Huckleberries}} | {{Infobox_Item|name = Huckleberries}} | ||
{{Infobox_Item|name = Prepared Meat}} | {{Infobox_Item|name = Prepared Meat}} | ||
{{Infobox_Item|name = Workbench}} | {{Infobox_Item|name = Workbench}} | ||
{{Infobox_Item|name = Bloomery}} | {{Infobox_Item|name = Bloomery}} | ||
{{Infobox_Item|name = Bookshelf}} | {{Infobox_Item|name = Bookshelf}} | ||
{{Infobox_Item|name = Wind Turbine}} | {{Infobox_Item|name = Wind Turbine}} | ||
{{Infobox_Item|name = Iron Axe}} | {{Infobox_Item|name = Iron Axe}} | ||
{{Infobox_Item|name = Coal}} | {{Infobox_Item|name = Coal}} | ||
{{Infobox_Item|name = Brick}} | {{Infobox_Item|name = Brick}} | ||
{{Infobox_Item|name = Cooking Skill Scroll}} | {{Infobox_Item|name = Cooking Skill Scroll}} | ||
{{Infobox_Item|name = Trousers}} | {{Infobox_Item|name = Trousers}} | ||
{{Infobox_Item|name = Stockpile}} | {{Infobox_Item|name = Stockpile}} | ||
{{Infobox_Item|name = Wood Cart}} | {{Infobox_Item|name = Wood Cart}} | ||
{{Infobox_Item|name = Blast Furnace}} | {{Infobox_Item|name = Blast Furnace}} | ||
{{Infobox_Item|name = Water}} | {{Infobox_Item|name = Water}} | ||
</noinclude> | </noinclude> |
Revision as of 02:33, 22 February 2021
Documentation
{{Infobox_Item|name = 'Item name'}}
This template can be used to grab details relevant to an item. It formats the results into an infobox. If the template is passed, this module creates a table using details from the following Modules:
Usage
Parameters
- name
- The name of an item. This pulls the description for that item.
Infobox Properies
If .name is found it will generate the following:
|name = The name of an item. |group = Item group (Colours for groups: #4b9130 for Food; #517ab2 for Items, World Object Items, Tools, Block Items, AvatarPart, Road Items; #af8d33 for Skill Books, Skill Scrolls,) |image = ItemName_Icon.png (Game Icon) General |created = Crafting station(s) crafted at, or N/A |calories = If group=Food then x,xxx otherwise hide |carbs = If group=Food then x.x otherwise hide (print 0.0 if no carbs) |protein = If group=Food then x.x otherwise hide (print 0.0 if no protein) |fat = If group=Food then x.x otherwise hide (print 0.0 if no fat) |vitamins = If group=Food then x.x otherwise hide (print 0.0 if no vitamins) |nutritiondensity = If group=Food then xcal otherwise hide |carried = Backpack, Hands |weight = If weight ~= nil then xkg; If nil then 0kg |stacklimit = If maxStack ~= nil the x (1, 10, 100) |fuel = If fuel ~= nil then x,xxxJ otherwise hide |currency = If currency ~= nil then Yes otherwise hide IDs |itemid = ExampleItem |itemidnumber = Item ID Number
If .footprint (Dimension) ~= nil, or group == 'Block Item' it will generate the following:
World Object |image = ItemName_Placed.png Placement |Dimensions = If footprint ~= nil then x x x x x (X x Y x Z) otherwise hide |Material Tier = If materialTier ~= nil then Tier x otherwise hide (This is block Tiers) |Room Required = If ContainReq ~= nil then Yes otherwise hide |Room Size = if roomSizeReq ~= nil then xm³ otherwise hide |Room Materials = if itemTable.roomMatReq ~= nil then x otherwise hide Housing (.roomCategory ~= nil this section will be created otherwise hide) |Room Category = Bedroom, Bathroom, Kitchen, General, or Industrial (If not Industrial, the following will appear. Industrial will say ALL ROOM VALUE LOST) |Furniture Type = Type of furniture (such as light, shelves, seating...) |Value = Items Room Value |Dim. Return % = Dim. return of the object Power (If .engeryType ~= nil this section will appear otherwise hide all) |Energy Type: Mechanical, Electrical... |Grid Radius: xm |Engery Produced: xJ |Engery Used: xJ Fuel (If .fuelsUsed ~= nil this section will appear otherwise hide all) Fuels Used: List of items the objects use as fuel
If .mobile ~= nil it will generate the following:
Vehicle Object |image = ItemName_Placed.png Fuel (If .fuelsUsed ~= nil this section will appear otherwise hide all) Fuels Used: List of items the objects use as fuel
If .itemTable.group == 'Road Items' it will generate the following:
Road Object |image = ItemName_Placed.png
Note: Put the tag between <noinclude> </noinclude>
tags for outdated transcluded pages.
Examples
Script error: The function "ItemMain" does not exist.
Script error: The function "ItemMain" does not exist.
Script error: The function "ItemMain" does not exist.
Script error: The function "ItemMain" does not exist.
Script error: The function "ItemMain" does not exist.
Script error: The function "ItemMain" does not exist.
Script error: The function "ItemMain" does not exist.
Script error: The function "ItemMain" does not exist.
Script error: The function "ItemMain" does not exist.
Script error: The function "ItemMain" does not exist.
Script error: The function "ItemMain" does not exist.
Script error: The function "ItemMain" does not exist.
Script error: The function "ItemMain" does not exist.
Script error: The function "ItemMain" does not exist.
Script error: The function "ItemMain" does not exist.
Script error: The function "ItemMain" does not exist.
Script error: The function "ItemMain" does not exist.