Template:MaterialInfobox: Difference between revisions
Appearance
Content deleted Content added
Added image support |
|||
| (15 intermediate revisions by 4 users not shown) | |||
| Line 1: | Line 1: | ||
<infobox> |
|||
<onlyinclude>{{#infoboxbuilder: |
|||
<title source="name"><default>{{#switch: {{{grade}}} |
|||
| 0:Theme = eInfobox | 0:CustomModule = Module:Infobox Material |
|||
| 1:Type = Title |
|||
| 1:Label = NULL |
|||
| 1:ValueMethod = PreTitleIcon |
|||
| 1:Grade = {{{grade|}}} |
|||
| 1:Value = {{PAGENAME}} |
|||
| 2:Type = MainImage |
|||
| 2:Label = NULL |
|||
| 2:Value = {{{ModuleImage|}}} |
|||
| 3:Type = Line |
|||
| 3:Label = Grade |
|||
| 3:Value = {{{grade|}}} |
|||
| 4:Type = Custom |
|||
| 4:Label = tr |
|||
| 4:Value = <td colspan="2">Known uses</td> |
|||
| 4:CssClass = custom-listheader |
|||
| 5:Type = Custom |
|||
| 5:Label = |
|||
| 5:Value = {{{knownuses|}}} |
|||
| 5:ValueMethod = TableSplitRows |
|||
| 5:CssClass = custom-list |
|||
}} |
|||
<includeonly>[[Category:Materials]] |
|||
{{#switch:{{lc:{{{grade|}}}}} |
|||
| common |
| common |
||
| Common = [[ |
| Common = [[File:Common material.svg|34px|link=]] {{PAGENAME}} |
||
| rare |
| rare |
||
| Rare = [[ |
| Rare = [[File:Rare material.svg|34px|link=]] {{PAGENAME}} |
||
| standard |
| standard |
||
| Standard = [[ |
| Standard = [[File:Standard material.svg|34px|link=]] {{PAGENAME}} |
||
| very common |
| very common |
||
| Very Common |
| Very Common |
||
| Very common = [[ |
| Very common = [[File:Very common material.svg|34px|link=]] {{PAGENAME}} |
||
| very rare |
| very rare |
||
| Very Rare |
| Very Rare |
||
| Very rare = [[ |
| Very rare = [[File:Very Rare material.svg|34px|link=]] {{PAGENAME}} |
||
}}</default></title> |
|||
}} |
|||
<image source="image"/> |
|||
</includeonly> |
|||
<header>Classification</header> |
|||
</onlyinclude> |
|||
<data source="grade"><label>Grade</label><format>{{#switch: {{{grade}}} |
|||
<noinclude> |
|||
| common |
|||
<pre style="width: 300px"> |
|||
| Common = Common (Grade 2) [[Category:Common materials]] |
|||
{{CommodityInfobox |
|||
| rare |
|||
| ModuleImage = |
|||
| Rare = Rare (Grade 4) [[Category:Rare materials]] |
|||
| ⚫ | |||
| standard |
|||
| ⚫ | |||
| Standard = Standard (Grade 3) [[Category:Standard materials]] |
|||
| very common |
|||
| Very Common |
|||
| Very common = Very Common (Grade 1) [[Category:Very common materials]] |
|||
| very rare |
|||
| Very Rare |
|||
| Very rare = Very Rare (Grade 5) [[Category:Very rare materials]] |
|||
}}</format></data> |
|||
<data source="type"><label>Type</label><format>{{#switch: {{{type}}} |
|||
| E = [[Encoded Materials|Encoded Material]] [[Category:Encoded materials]] |
|||
| M = [[Manufactured Materials|Manufactured Material]] [[Category:Manufactured materials]] |
|||
| R = [[Raw Materials|Raw Material]] [[Category:Raw materials]] |
|||
}}</format></data> |
|||
<header>Recipes and Unlocks</header> |
|||
<data source="knownuses"/> |
|||
</infobox><includeonly>{{#if: {{NAMESPACE}} || [[Category:Materials]]}}</includeonly><noinclude> |
|||
Example usage:<pre> |
|||
{{MaterialInfobox |
|||
| image = |
|||
| ⚫ | |||
| type = |
|||
| ⚫ | |||
}} |
}} |
||
</pre> |
</pre> |
||
== Usage == |
== Usage == |
||
; |
;image: The image to display in the material infobox, preferably of the item as seen in the game. |
||
;grade:The grade or rating on how difficult it is to find. |
;grade: The grade or rating on how difficult it is to find. There are five grades: "Very Common", "Common", "Standard", "Rare", and "Very Rare". |
||
;type: The type of material, which indicates its source. There are three types: "E" (Encoded/Data), "M" (Manufactured), and "R" (Raw). |
|||
;knownuses:The known uses listed in the information of the material |
;knownuses: The known uses listed in the information of the material. Names must be exact in terms of both name and capitalisation, and ordered alphabetically. [[:Category:Icon templates|icon templates]] should precede each name: {{t|Material ship}} for ship Synthesis recipes and Technology Broker unlocks, {{t|Material Engineer}} for Engineer recipes, and {{t|SRV}} for SRV Synthesis recipes. |
||
[[Category:Infobox templates|{{PAGENAME}}]] |
|||
</noinclude> |
</noinclude> |
||
Latest revision as of 09:50, 3 March 2021
Example usage:
{{MaterialInfobox
| image =
| grade =
| type =
| knownuses =
}}
Usage
- image
- The image to display in the material infobox, preferably of the item as seen in the game.
- grade
- The grade or rating on how difficult it is to find. There are five grades: "Very Common", "Common", "Standard", "Rare", and "Very Rare".
- type
- The type of material, which indicates its source. There are three types: "E" (Encoded/Data), "M" (Manufactured), and "R" (Raw).
- knownuses
- The known uses listed in the information of the material. Names must be exact in terms of both name and capitalisation, and ordered alphabetically. icon templates should precede each name: {{Material ship}} for ship Synthesis recipes and Technology Broker unlocks, {{Material Engineer}} for Engineer recipes, and {{SRV}} for SRV Synthesis recipes.