No edit summary |
(add image_class, change param order, add categories) |
||
(8 intermediate revisions by 4 users not shown) | |||
Line 1: | Line 1: | ||
<templatedata> | <templatedata> | ||
{ | { "description": "Displays an infobox containing a character's details.", | ||
"params": { | "params": { | ||
"headercolor": { | "headercolor": { | ||
"label": "Header color", | |||
"description": "The header's background color.", | "description": "The header's background color.", | ||
"type": "string", | "type": "string", | ||
"suggested": true | "suggested": true, | ||
"default": "#3366CC" | |||
}, | }, | ||
"headerfontcolor": { | "headerfontcolor": { | ||
"label": "Header font color", | |||
"description": "The header's text color.", | "description": "The header's text color.", | ||
"type": "string", | "type": "string", | ||
"suggested": true | "suggested": true, | ||
"default": "#ffffff" | |||
}, | }, | ||
"image": { | "image": { | ||
"description": " | "label": "NPC image", | ||
"description": "The file name for the image to be displayed. It should clearly show the NPC in its usual appearance.", | |||
"type": "wiki-file-name", | |||
"example": "Uboa.png", | |||
"required": true | |||
}, | |||
"role": { | |||
"label": "Role", | |||
"description": "The NPC's purpose.", | |||
"example": "Gives the [[Yume 2kki:Effects#Boy|Boy]] effect", | |||
"type": "string", | |||
"required": true | |||
}, | |||
"Collectibles": { | |||
"label": "Collectibles", | |||
"description": "Collectibles that you can unlock by interacting with the NPC.", | |||
"example": "WP #87, Menu Theme #65", | |||
"type": "string", | "type": "string", | ||
" | "aliases": [ | ||
"Wallpapers", | |||
"Menu" | |||
], | |||
"required": true | |||
}, | }, | ||
" | "Events": { | ||
"description": " | "label": "Events", | ||
"type": "string" | "description": "Events associated with this NPC.", | ||
"type": "string", | |||
"required": true | |||
}, | }, | ||
"location": { | "location": { | ||
"description": "The NPC's location.", | "label": "Location", | ||
"description": "The NPC's location, or a comma-separated list of locations.", | |||
"type": "string", | "type": "string", | ||
" | "required": true | ||
}, | }, | ||
"size": { | "size": { | ||
"label": "Size", | |||
"description": "The NPC's physical size.", | "description": "The NPC's physical size.", | ||
"example": "Standard", | |||
"type": "string", | "type": "string", | ||
"suggested": true | "suggested": true | ||
}, | }, | ||
"killable": { | "killable": { | ||
"description": "Whether the NPC | "label": "Killable?", | ||
" | "description": "Whether the NPC is able to be killed using the game's weapon effect.", | ||
"suggestedvalues": ["Yes","No"], | |||
"type": "string", | "type": "string", | ||
"suggested": true | "suggested": true | ||
}, | }, | ||
" | "species": { | ||
"description": "The | "label": "Species", | ||
"description": "The in-game species of the NPC.", | |||
"type": "string" | "type": "string" | ||
}, | }, | ||
" | "notes": { | ||
"description": " | "label": "Misc. Notes", | ||
"description": "Any further notes on the NPC that are important enough to include in the box.", | |||
"type": "string" | "type": "string" | ||
}, | }, | ||
" | "name": { | ||
" | "label": "Display Name", | ||
" | "description": "Overrides using the page name as the header text. If the name of the character should be changed on the wiki, move the page instead of using this parameter.", | ||
"type": "string", | "type": "string", | ||
" | "autovalue": "{{PAGENAME}}" | ||
}, | }, | ||
" | "headerfontsize": { | ||
" | "label": "Header font size", | ||
" | "description": "The header's font size as a percentage.", | ||
"type": "string", | "type": "string", | ||
" | "default": "200%" | ||
}, | |||
"imagewidth": { | |||
"label": "Image width", | |||
"description": "The image width in px.", | |||
"type": "number", | |||
"default": "250" | |||
}, | }, | ||
" | "image_class": { | ||
"description": " | "label": "Image class", | ||
"description": "A CSS class to apply to the image.", | |||
"type": "string", | "type": "string", | ||
" | "default": "pixel-perfect" | ||
}, | |||
"caption": { | |||
"label": "Image caption", | |||
"description": "A corresponding caption for the image, visible if a value is provided.", | |||
"type": "string" | |||
} | } | ||
}, | }, | ||
"format": "{{_\n|_ = _\n}}", | |||
"format": "{{_\n|_ = _\n}}" | "paramOrder": [ | ||
"name", | |||
"headercolor", | |||
"headerfontcolor", | |||
"headerfontsize", | |||
"image", | |||
"imagewidth", | |||
"image_class", | |||
"caption", | |||
"role", | |||
"Collectibles", | |||
"Events", | |||
"location", | |||
"size", | |||
"killable", | |||
"species", | |||
"notes" | |||
] | |||
} | } | ||
</templatedata> | </templatedata> | ||
==General usage== | |||
<pre style="line-height:1.6;"> | |||
{{NPCBox | |||
|name = Uboa | |||
|headercolor = #000000 | |||
|headerfontcolor = #ffffff | |||
|image = Uboa.png | |||
|role = Traps [[Yume Nikki:Madotsuki|Madotsuki]] in [[Yume Nikki:Poniko's House#Uboa's Trap|Uboa's Trap]] | |||
|Collectibles = None | |||
|Events = [[Yume Nikki:Events#Uboa|Uboa]] | |||
|location = [[Yume Nikki:Poniko's House|Poniko's House]], [[Yume Nikki:Uboa's Trap|Uboa's Trap]] | |||
|size = Standard | |||
|killable = No | |||
|species = | |||
|notes = | |||
}} | |||
</pre> | |||
will return: | |||
{{NPCBox | |||
|name = Uboa | |||
|headercolor = #000000 | |||
|headerfontcolor = #ffffff | |||
|image = Uboa.png | |||
|role = Traps [[Yume Nikki:Madotsuki|Madotsuki]] in [[Yume Nikki:Poniko's House#Uboa's Trap|Uboa's Trap]] | |||
|Collectibles = None | |||
|Events = [[Yume Nikki:Events#Uboa|Uboa]] | |||
|location = [[Yume Nikki:Poniko's House|Poniko's House]], [[Yume Nikki:Uboa's Trap|Uboa's Trap]] | |||
|size = Standard | |||
|killable = No | |||
|species = | |||
|notes = | |||
}} | |||
<noinclude>__NOTOC__ [[Category:Template documentation]]</noinclude> | |||
<includeonly>__NOEDITSECTION__ | |||
[[Category:Infobox templates]] | |||
[[Category:Character templates]] | |||
</includeonly> |
Latest revision as of 01:50, 19 November 2024
Displays an infobox containing a character's details.
Parameter | Description | Type | Status | |
---|---|---|---|---|
Display Name | name | Overrides using the page name as the header text. If the name of the character should be changed on the wiki, move the page instead of using this parameter.
| String | optional |
Header color | headercolor | The header's background color.
| String | suggested |
Header font color | headerfontcolor | The header's text color.
| String | suggested |
Header font size | headerfontsize | The header's font size as a percentage.
| String | optional |
NPC image | image | The file name for the image to be displayed. It should clearly show the NPC in its usual appearance.
| File | required |
Image width | imagewidth | The image width in px.
| Number | optional |
Image class | image_class | A CSS class to apply to the image.
| String | optional |
Image caption | caption | A corresponding caption for the image, visible if a value is provided. | String | optional |
Role | role | The NPC's purpose.
| String | required |
Collectibles | Collectibles Wallpapers Menu | Collectibles that you can unlock by interacting with the NPC.
| String | required |
Events | Events | Events associated with this NPC. | String | required |
Location | location | The NPC's location, or a comma-separated list of locations. | String | required |
Size | size | The NPC's physical size.
| String | suggested |
Killable? | killable | Whether the NPC is able to be killed using the game's weapon effect.
| String | suggested |
Species | species | The in-game species of the NPC. | String | optional |
Misc. Notes | notes | Any further notes on the NPC that are important enough to include in the box. | String | optional |
General usage
{{NPCBox |name = Uboa |headercolor = #000000 |headerfontcolor = #ffffff |image = Uboa.png |role = Traps [[Yume Nikki:Madotsuki|Madotsuki]] in [[Yume Nikki:Poniko's House#Uboa's Trap|Uboa's Trap]] |Collectibles = None |Events = [[Yume Nikki:Events#Uboa|Uboa]] |location = [[Yume Nikki:Poniko's House|Poniko's House]], [[Yume Nikki:Uboa's Trap|Uboa's Trap]] |size = Standard |killable = No |species = |notes = }}
will return:
Uboa | |
---|---|
Basic Info | |
Role | Traps Madotsuki in Uboa's Trap |
Collectibles | None |
Events | Uboa |
Location | |
Other | |
Size | Standard |
Killable? | No |