Main Page
Difference between revisions of "Template:NGSItem"
Jump to navigation
Jump to search
MoonRunestar (talk | contribs) (correct example) |
MoonRunestar (talk | contribs) (Add additional documentation, and amount feature) |
||
Line 1: | Line 1: | ||
− | <onlyinclude><span style="white-space: nowrap">{{ #if: {{{Icon|}}} | {{Icons|{{{Icon}}}}} }} {{ #if: {{{PageName|}}} | [[{{{PageName}}}{{ #if: {{{RealName|}}}|{{!}}{{{RealName}}}}}]] | {{{RealName}}} |}}</span></onlyinclude> | + | <onlyinclude><span style="white-space: nowrap">{{ #if: {{{Icon|}}} | {{Icons|{{{Icon}}}}} }} {{ #if: {{{PageName|}}} | [[{{{PageName}}}{{ #if: {{{RealName|}}}|{{!}}{{{RealName}}}}}]] | {{{RealName}}} }} {{ #if: {{{Amount|}}} | ×{{{Amount}}} }}</span></onlyinclude> |
<noinclude> | <noinclude> | ||
{{Documentation|content= | {{Documentation|content= | ||
Line 7: | Line 7: | ||
Writing the following: | Writing the following: | ||
<pre>{{NGSItem|Icon=NGS Sword|PageName=Swords_(NGS)|RealName=Prim Sword}}</pre> | <pre>{{NGSItem|Icon=NGS Sword|PageName=Swords_(NGS)|RealName=Prim Sword}}</pre> | ||
− | + | results in this: | |
{{NGSItem|Icon=NGS Sword|PageName=Swords_(NGS)|RealName=Prim Sword}} | {{NGSItem|Icon=NGS Sword|PageName=Swords_(NGS)|RealName=Prim Sword}} | ||
Line 14: | Line 14: | ||
{{NGSItem|Icon=NGS Sword|RealName=Prim Sword}} | {{NGSItem|Icon=NGS Sword|RealName=Prim Sword}} | ||
+ | |||
+ | You can also specify the amount of the item, which is great for items like Materials that you get multiple of for example, like N-Grinders. | ||
+ | |||
+ | <pre>{{NGSItem|Icon=NGS Tool|RealName=N-Grinder|Amount=50}}</pre> | ||
+ | Results in this: | ||
+ | |||
+ | {{NGSItem|Icon=NGS Tool|RealName=N-Grinder|Amount=50}} | ||
+ | |||
}} | }} | ||
<templatedata> | <templatedata> | ||
Line 40: | Line 48: | ||
"example": "Prinm Sword", | "example": "Prinm Sword", | ||
"required": true | "required": true | ||
+ | }, | ||
+ | "Amount": { | ||
+ | "label": "Amount of Item", | ||
+ | "description": "This is the amount of the item. If you only get one of the item, then ignore this. Optional.", | ||
+ | "type": "number" | ||
+ | "example": "50", | ||
} | } | ||
} | } |
Revision as of 12:08, 28 November 2021
{{{RealName}}}
This template is intended to be used on NGS pages to list the names of items, while showing a UI icon and preventing a line break mid-name.
Example
Writing the following:
{{NGSItem|Icon=NGS Sword|PageName=Swords_(NGS)|RealName=Prim Sword}}
results in this:
but if you don't include a PageName, it won't be linked:
Prim Sword
You can also specify the amount of the item, which is great for items like Materials that you get multiple of for example, like N-Grinders.
{{NGSItem|Icon=NGS Tool|RealName=N-Grinder|Amount=50}}
Results in this:
N-Grinder ×50
Editors can experiment in this template's sandbox (create) and testcases (create) pages. Subpages of this template. |
Syntax error in JSON.