Difference between revisions of "Template:NGSItem"
MoonRunestar (talk | contribs) (Add category) |
MoonRunestar (talk | contribs) (Was going to add suggested values, but it don't works. Include what I was going to add into a block for now.) |
||
(5 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
− | <onlyinclude><span style="white-space: nowrap">{{ #if: {{{Icon|}}} | {{Icons|{{{Icon}}}}} }} {{ #if: {{{PageName|}}} | [[{{{PageName}}}{{ #if: {{{RealName|}}}|{{!}}{{{RealName}}}}}]] | {{{RealName}}} }} {{ #if: {{{Amount|}}} | ×{{{Amount}}} }}</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 9: | Line 9: | ||
results in this: | results in this: | ||
− | {{NGSItem|Icon=NGS Sword|PageName=Swords_(NGS)|RealName=Prim Sword}} | + | {{NGSItem|Icon=NGS Sword|PageName=Swords_(NGS)|RealName=Prim Sword}}. |
but if you don't include a PageName, it won't be linked: | but if you don't include a PageName, it won't be linked: | ||
− | {{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. | 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. | ||
Line 20: | Line 20: | ||
Results in this: | Results in this: | ||
− | {{NGSItem|Icon=NGS Tool|RealName=N-Grinder|Amount=50}} | + | {{NGSItem|Icon=NGS Tool|RealName=N-Grinder|Amount=50}}. |
}} | }} | ||
+ | |||
+ | == TODO== | ||
+ | When suggested values are implement, add the following to the UI Icon entry: | ||
+ | <nowiki>, | ||
+ | "suggestedvalues": [ | ||
+ | "NGS Sword", | ||
+ | "NGS Partizan", | ||
+ | "NGS Wired Lances", | ||
+ | "NGS Double Saber", | ||
+ | "NGS Knuckles", | ||
+ | "NGS Twin Daggers", | ||
+ | "NGS Gunslash", | ||
+ | "NGS Dual Blades", | ||
+ | "NGS Assault Rifle", | ||
+ | "NGS Twin Machine Guns", | ||
+ | "NGS Bullet Bow", | ||
+ | "NGS Rod", | ||
+ | "NGS Wand", | ||
+ | "NGS Talis", | ||
+ | "NGS Jet Boots, | ||
+ | "NGS Ability Capsule", | ||
+ | "NGS Tool", | ||
+ | "NGS Music Disc", | ||
+ | "NGS Pass", | ||
+ | "NGS Material", | ||
+ | "NGS Fruit", | ||
+ | "NGS Meat", | ||
+ | "NGS Mineral", | ||
+ | "NGS Seafood", | ||
+ | "NGS Vegetable", | ||
+ | "NGS Booster", | ||
+ | "NGS Consumable", | ||
+ | "NGS Ticket"]</nowiki> | ||
<templatedata> | <templatedata> | ||
{ | { | ||
− | + | "description": "Use this template on NGS pages to display an item name that does not line-break. Optionally, a UI icon can be included.", | |
− | + | "format": "inline", | |
− | + | "params": { | |
− | + | "Icon": { | |
− | + | "label": "UI Icon", | |
− | + | "description": "The small icon that is used in-game. This appears to the left of the item name.", | |
− | + | "type": "string", | |
− | + | "example": "NGS Sword", | |
− | + | "suggested": true | |
− | + | }, | |
− | + | "PageName": { | |
− | + | "label": "Page Name", | |
− | + | "description": "This is the page that clicking the name of the item will link to. If not specified, then the item name on the page will not have a link.", | |
− | + | "type": "string", | |
− | + | "example": "Swords_(NGS)", | |
− | + | "suggested": true | |
− | + | }, | |
− | + | "RealName": { | |
− | + | "label": "Real Name", | |
− | + | "description": "This is the name of the item visible in-game. This is required.", | |
− | + | "type": "string", | |
− | + | "example": "Prim Sword", | |
− | + | "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" | |
− | + | } | |
− | + | }, | |
+ | "paramOrder": [ | ||
+ | "Icon", | ||
+ | "RealName", | ||
+ | "PageName", | ||
+ | "Amount" | ||
+ | ] | ||
} | } | ||
</templatedata> | </templatedata> | ||
− | [[Category: | + | [[Category:Templates]] |
</noinclude> | </noinclude> |
Latest revision as of 10:06, 9 October 2022
{{{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. |
TODO
When suggested values are implement, add the following to the UI Icon entry: , "suggestedvalues": [ "NGS Sword", "NGS Partizan", "NGS Wired Lances", "NGS Double Saber", "NGS Knuckles", "NGS Twin Daggers", "NGS Gunslash", "NGS Dual Blades", "NGS Assault Rifle", "NGS Twin Machine Guns", "NGS Bullet Bow", "NGS Rod", "NGS Wand", "NGS Talis", "NGS Jet Boots, "NGS Ability Capsule", "NGS Tool", "NGS Music Disc", "NGS Pass", "NGS Material", "NGS Fruit", "NGS Meat", "NGS Mineral", "NGS Seafood", "NGS Vegetable", "NGS Booster", "NGS Consumable", "NGS Ticket"]
Use this template on NGS pages to display an item name that does not line-break. Optionally, a UI icon can be included.
Parameter | Description | Type | Status | |
---|---|---|---|---|
UI Icon | Icon | The small icon that is used in-game. This appears to the left of the item name.
| String | suggested |
Real Name | RealName | This is the name of the item visible in-game. This is required.
| String | required |
Page Name | PageName | This is the page that clicking the name of the item will link to. If not specified, then the item name on the page will not have a link.
| String | suggested |
Amount of Item | Amount | This is the amount of the item. If you only get one of the item, then ignore this. Optional.
| Number | optional |