Vorlage:Infobox Item: Unterschied zwischen den Versionen

Aus Eco - Deutsches Wiki
Wechseln zu:Navigation, Suche
[unmarkierte Version][unmarkierte Version]
K (1 Version importiert)
Keine Bearbeitungszusammenfassung
Zeile 1: Zeile 1:
<noinclude><!-- See [[Template:Infobox_Object]] for object items (furniture, crafting stations) -->
<includeonly>
{{#invoke:Infobox_Item|ItemMain}}
</includeonly>


<noinclude>
== Documentation ==
== Documentation ==
<pre>
{{Infobox_Item|name = 'Item name'}}
</pre>
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:
*[[Modul:Infobox_Item]]
*[[Modul:ItemData]]
*[[Modul:CraftingRecipes]].
== 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:
<pre>
<pre>
{{Infobox_Item
     |name = The name of an item.
     |name = Item name
     |group = Item group
     |type = Item category/type (If category=WorldObject then Object; If group=Items then Item; If group=Food then Food; If Group=Tools then Tool; If Group=Block Items then Block)
            (Colours for groups:
    |subtype = Resource, Seed, Crafting Station, Storage, Furniture
            #4b9130 for Food;
    |color = Item icon color (#4b9130 for Food; #517ab2 for Item, Object, Tool, Block; af8d33 for Skill Books, Skill Scrolls)
            #517ab2 for Items, World Object Items, Tools, Block Items, AvatarPart, Road Items;  
     |icon = ItemName_Icon.png
            #af8d33 for Skill Books, Skill Scrolls,)
     |created = Crafting station(s) crafted at, or "Resource"
     |image = ItemName_Icon.png (Game Icon)
     |calories = If type=Food then x,xxx otherwise hide
General
     |carbs = If type=Food then x.x otherwise hide (print 0.0 if no carbs)
     |created = Crafting station(s) crafted at, or N/A
     |protein = If type=Food then x.x otherwise hide (print 0.0 if no protein)
     |calories = If group=Food then x,xxx otherwise hide
     |fat = If type=Food then x.x otherwise hide (print 0.0 if no fat)
     |carbs = If group=Food then x.x otherwise hide (print 0.0 if no carbs)
     |vitamins = If type=Food then x.x otherwise hide (print 0.0 if no vitamins)
     |protein = If group=Food then x.x otherwise hide (print 0.0 if no protein)
     |carried = Backpack, Hands, Shovel
     |fat = If group=Food then x.x otherwise hide (print 0.0 if no fat)
     |weight =  If Has Value then xkg; If nil then 0kg
     |vitamins = If group=Food then x.x otherwise hide (print 0.0 if no vitamins)
     |stacklimit = 1, 10, 100
    |nutritiondensity = If group=Food then xcal otherwise hide   
     |fuel = If Has Value then x,xxxJ 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
     |itemid = ExampleItem
     |itemidnumber = type ID
     |itemidnumber = Item ID Number
     |objectid = Object ID
</pre>
     |recipeid = recipe ID   
If .footprint (Dimension) ~= nil, or group == 'Block Item' it will generate the following:
}}
<pre>
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
</pre>
If .mobile ~= nil it will generate the following:
<pre>
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
</pre>
If .itemTable.group == 'Road Items' it will generate the following:
<pre>
Road Object
    |image = ItemName_Placed.png
</pre>
</pre>


''Note:'' Put the tag between <code>&lt;noinclude&gt; &lt;/noinclude&gt;</code> tags for outdated transcluded pages.
''Note:'' Put the tag between <code>&lt;noinclude&gt; &lt;/noinclude&gt;</code> tags for outdated transcluded pages.


{{Infobox_Item
==Examples==
    |name = Name
 
    |type = Type
{{Infobox_Item|name = Elk Carcass}}
    |subtype = Subtype
{{Infobox_Item|name = Charcoal}}
    |color = #517ab2
 
    |icon = Paper.png
{{Infobox_Item|name = Huckleberries}}
    |created = [[Workbench]]
{{Infobox_Item|name = Prepared Meat}}
    |calories = 150
 
    |carbs = 0.0
{{Infobox_Item|name = Workbench}}
    |protein = 0.0
{{Infobox_Item|name = Bloomery}}
    |fat = 0.0
{{Infobox_Item|name = Bookshelf}}
    |vitamins = 0.0
 
    |carried = [[Backpack]]
{{Infobox_Item|name = Wind Turbine}}
    |weight = 10.00kg
 
    |stacklimit = 100
{{Infobox_Item|name = Iron Axe}}
    |fuel = 2,000J
    |itemid = DerpItem
    |itemidnumber = 123
    |objectid = DerpObject
    |recipeid = DerpRecipe 
}}


{{Infobox_Item|name = Coal}}
{{Infobox_Item|name = Brick}}
{{Infobox_Item|name = Cooking Skill Scroll}}
{{Infobox_Item|name = Trousers}}
{{Infobox_Item|name = Stockpile}}
{{Infobox_Item|name = Wood Cart}}
{{Infobox_Item|name = Blast Furnace}}
{{Infobox_Item|name = Water}}
[[Category:Infobox Templates]]
[[Category:Infobox Templates]]
[[Kategorie:Vorlagen]]
 
</noinclude><includeonly>{{#invoke:Infobox|ItemMain}}</includeonly>
</noinclude>

Version vom 19. September 2020, 09:14 Uhr


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

Elk Carcass could not be found in Module:ItemData.



Charcoal could not be found in Module:ItemData.



Huckleberries could not be found in Module:ItemData.



Prepared Meat could not be found in Module:ItemData.



Workbench could not be found in Module:ItemData.



Bloomery could not be found in Module:ItemData.



Bookshelf could not be found in Module:ItemData.



Wind Turbine could not be found in Module:ItemData.



Iron Axe could not be found in Module:ItemData.



Coal could not be found in Module:ItemData.



Brick could not be found in Module:ItemData.



Cooking Skill Scroll could not be found in Module:ItemData.



Trousers could not be found in Module:ItemData.



Stockpile could not be found in Module:ItemData.



Wood Cart could not be found in Module:ItemData.



Blast Furnace could not be found in Module:ItemData.



Water could not be found in Module:ItemData.