(update some parts, add notice to update other parts) |
(update doc) |
||
Line 1: | Line 1: | ||
{{ | {{PropertySetting}} | ||
==Description== | ==Description== | ||
{{BadgeListNavbar}} | {{BadgeListNavbar}} | ||
Line 78: | Line 78: | ||
|} | |} | ||
==Parameters== | ==Parameters== | ||
<templatedata>{ "description": "","params": { | <templatedata>{ | ||
"description": "The badge template handles both subobject data and table row presentation.", | |||
"format": "{{_\n|_ = _\n}}", | |||
"params": { | |||
"id": { | "id": { | ||
"label": "Badge ID", | "label": "Badge ID", | ||
"type": "line", | "type": "line", | ||
"description": "The id of the badge, taken from https://github.com/ynoproject/ynobadges/tree/master/badges | "description": "The id of the badge, taken from https://github.com/ynoproject/ynobadges/tree/master/badges.", | ||
"required": true, | "required": true, | ||
"example": "akako" | "example": "akako" | ||
}, | }, | ||
"type": { | "type": { | ||
"label": " | "label": "Game", | ||
"type": "line", | "type": "line", | ||
"description": "The wiki namespace the badge belongs to | "description": "The wiki namespace the badge belongs to.", | ||
"example": " | "example": "Dotflow", | ||
"required": true | |||
" | |||
}, | }, | ||
"Icon": { | "Icon": { | ||
"label": " | "label": "Icon(s)", | ||
"type": "wiki-file-name", | "type": "wiki-file-name", | ||
"description": "The filename(s) of the badge to present in the table, without the ''File:'' prefix. If animated, put the gif first and separate using commas. Image files on the wiki usually have different names than on the YNOproject github.", | "description": "The filename(s) of the badge to present in the table, without the ''File:'' prefix. If animated, put the gif first and separate using commas. Image files on the wiki usually have different names than on the YNOproject github.", | ||
"example": "Akako Gif Bdg.gif, AkakoStill Bdg.png", | "example": "Akako Gif Bdg.gif, AkakoStill Bdg.png", | ||
" | "required": true | ||
}, | |||
"Icon_bg": { | |||
"label": "Icon Background Override", | |||
"type": "line", | |||
"description": "Set a hex code to use for the background of an ''Icon'' cell, to potentially clear any visibility issues.", | |||
"example": "#3498db", | |||
"suggestedvalues": ["#CCC"] | |||
}, | }, | ||
"Name": { | "Name": { | ||
Line 107: | Line 115: | ||
"description": "The name of the badge as presented in YNOproject itself, or as found in https://github.com/ynoproject/ynobadges/blob/master/lang/en.json.", | "description": "The name of the badge as presented in YNOproject itself, or as found in https://github.com/ynoproject/ynobadges/blob/master/lang/en.json.", | ||
"example": "White Scarlet Akako", | "example": "White Scarlet Akako", | ||
" | "required": true | ||
}, | |||
"Traits": { | |||
"label": "Traits", | |||
"type": "line", | |||
"description": "Any traits the badge may have, such as hidden or secret. Separate multiple traits using commas. Possible values: Is hidden, Is Secret, Has secret condition, Has secret map, Has parent.", | |||
"example": "Has secret condition, Has secret map" | |||
}, | |||
"Parent": { | |||
"label": "Secret Badge Parent", | |||
"type": "line", | |||
"description": "The badge ID of this badge's parent, if this badge has the trait \"Has parent\"." | |||
}, | }, | ||
"Location": { | "Location": { | ||
"label": "Badge Location(s)", | "label": "Badge Location(s)", | ||
"type": "wiki-page-name", | "type": "wiki-page-name", | ||
"description": "The locations that the badge is found in, if any, without the namespace. Found on the | "description": "The locations that the badge is found in, if any, without the namespace. Found on the website (the github only provides Map IDs).", | ||
"example": "White Scarlet Exhibition" | "example": "White Scarlet Exhibition" | ||
}, | }, | ||
"Description": { | "Description": { | ||
"label": " | "label": "Description", | ||
"type": "content", | "type": "content", | ||
"description": "The description of the badge, if any." | "description": "The description of the badge, if any.", | ||
"suggested": true | |||
}, | }, | ||
"Condition": { | "Condition": { | ||
"label": " | "label": "Unlock Conditions", | ||
"type": "content", | "type": "content", | ||
"description": "The condition of the badge, as found on the site or in https://github.com/ynoproject/ynobadges/blob/master/lang/en.json.", | "description": "The condition of the badge, as found on the site or in https://github.com/ynoproject/ynobadges/blob/master/lang/en.json.", | ||
"example": "Show Akako in the White Scarlet Exhibition all of the effects she likes", | "example": "Show Akako in the White Scarlet Exhibition all of the effects she likes", | ||
" | "required": true | ||
}, | }, | ||
"Notes": { | "Notes": { | ||
Line 135: | Line 155: | ||
"label": "Badge Author(s)", | "label": "Badge Author(s)", | ||
"type": "line", | "type": "line", | ||
"description": "Badge artist names. If multiple, separate using | "description": "Badge artist names. If multiple, separate using the & symbol.", | ||
"example": "Rose", | "example": "Rose", | ||
" | "required": true | ||
}, | }, | ||
"Batch": { | "Batch": { | ||
"label": "Batch Number", | "label": "Batch Number", | ||
"type": "number", | "type": "number", | ||
"description": "The batch which contained the badge. Can be found by checking the commit history on github. For badges prior to 2022-05-06, specify 'Date' instead.", | "description": "The batch which contained the badge. Can be found by checking the badge file or commit history on github. For badges prior to 2022-05-06, you may need to specify 'Date' instead.", | ||
"suggested": true, | "suggested": true, | ||
"example": "26" | "example": "26" | ||
Line 149: | Line 169: | ||
"label": "Release Date", | "label": "Release Date", | ||
"type": "date", | "type": "date", | ||
"description": " | "description": "Provide the date the badge was released if there is no batch number, or if the batch number may be inaccurate/not specific.", | ||
"example": "2022-10-05" | "example": "2022-10-05" | ||
}}}</templatedata> | }}}</templatedata> | ||
==Sample== | ==Sample== | ||
<!-- Add the template code example here --> | <!-- Add the template code example here --> | ||
Line 180: | Line 185: | ||
|Badge name references a [https://www.youtube.com/watch?v=8ER6sXss5EU ''Yume Nikki'' remix of the same name]. | |Badge name references a [https://www.youtube.com/watch?v=8ER6sXss5EU ''Yume Nikki'' remix of the same name]. | ||
|WikiOdd | |WikiOdd | ||
|2023-12-01<br>Batch 86 | |2023-12-01<br>Batch 86 | ||
|} | |} | ||
Revision as of 05:35, 27 August 2024
This template automatically sets Semantic MediaWiki properties on pages. This may include creating subobjects. Please only use this template as intended. |
Description
Formats the table entries in subpages of YNOproject:Badges. It may be useful as it creates badge subobjects that point a "Badge/Location" property to any locations the badge appears in.
Technically there is no use for the template for YNOproject badges since they never have a location attached to them. You can still use it to auto-format the table row if you wish, but it's best to add normal table entries instead, to avoid lag.
Syntax
On the badge page you should already have a table that begins using {{badge/Start}}.
The template is used after the table beginning. Here is an empty example for a table with 1 entry:
{{badge/Start}} {{badge|type= |id = |Icon = |Name = |Traits = |Parent = |Location = |Description = |Condition = |Author = |Batch = }} |}
Each badge entry should be written in that format. Not every field is required.
The "id" parameter is absolutely required for the template to work. However, it is hidden from the table itself, only present as a title when hovering on the badge name.
The most important parameters for the actual function of the template are the "id" and "Location" fields, so endevour to at least add those (if available). Normal wikitext for formatting a table should still work even if it is surrounded by the badge template calls. If a badge has no "Location" field then it would be OK to use this normal wikitext as the subobject the template creates would be useless anyways if no location is specified.
After adding all badges, make sure to end the table with:
|}
Usage
The template creates a subobject with the id as a name. For example, using the template with id=fc_moai
in page YNOproject:Badges/Yume Nikki
would create the subobject YNOproject:Badges/Yume Nikki#fc_moai
. The subobject is also given properties related to the badge.
Property | Function | Datatype |
---|---|---|
Badge/Author | Each author for a badge is listed as a value for this property. | Text |
Badge/Batch | The batch the badge was released in, taken from the ynobadges commits page. Badges before 2022-05-06 will not have a batch number and would only have a date. | Number |
Badge/Date | The date on which the badge was added to ynobadges: this may not be the day it was made available on the website. This is automatically filled in using {{Badge/Batch2Date}} if a batch number is provided (recommended), and must be manually provided otherwise. | Date |
Badge/Icon | The icon of the badge. In many cases both an animated version (.gif) and a static version (.png) as separate values. | Page (in file namespace) |
Is part of game | The game the badge is from. Taken from the type/Namespace parameter, or from the subpage name by default. | TBA |
Badge/ID | The ID of the badge, same as the subobject name. | Text |
Badge/Location | The location of the badge. Can be multiple. This lists the badge subobject as an incoming property of that location. | Page |
Badge/Name | The name of the badge as presented in YNOproject. | Text |
Badge/Is hidden | Sets to true for badges with the hidden property in YNOproject. | Boolean |
Parameters
The badge template handles both subobject data and table row presentation.
Parameter | Description | Type | Status | |
---|---|---|---|---|
Badge ID | id | The id of the badge, taken from https://github.com/ynoproject/ynobadges/tree/master/badges.
| Line | required |
Game | type | The wiki namespace the badge belongs to.
| Line | required |
Icon(s) | Icon | The filename(s) of the badge to present in the table, without the ''File:'' prefix. If animated, put the gif first and separate using commas. Image files on the wiki usually have different names than on the YNOproject github.
| File | required |
Icon Background Override | Icon_bg | Set a hex code to use for the background of an ''Icon'' cell, to potentially clear any visibility issues.
| Line | optional |
Badge Name | Name | The name of the badge as presented in YNOproject itself, or as found in https://github.com/ynoproject/ynobadges/blob/master/lang/en.json.
| Line | required |
Traits | Traits | Any traits the badge may have, such as hidden or secret. Separate multiple traits using commas. Possible values: Is hidden, Is Secret, Has secret condition, Has secret map, Has parent.
| Line | optional |
Secret Badge Parent | Parent | The badge ID of this badge's parent, if this badge has the trait "Has parent". | Line | optional |
Badge Location(s) | Location | The locations that the badge is found in, if any, without the namespace. Found on the website (the github only provides Map IDs).
| Page name | optional |
Description | Description | The description of the badge, if any. | Content | suggested |
Unlock Conditions | Condition | The condition of the badge, as found on the site or in https://github.com/ynoproject/ynobadges/blob/master/lang/en.json.
| Content | required |
Notes | Notes | Any notes you wish to give regarding the badge. For example, you can point out a game reference that you spotted in the badge description. | Content | optional |
Badge Author(s) | Author | Badge artist names. If multiple, separate using the & symbol.
| Line | required |
Batch Number | Batch | The batch which contained the badge. Can be found by checking the badge file or commit history on github. For badges prior to 2022-05-06, you may need to specify 'Date' instead.
| Number | suggested |
Release Date | Date | Provide the date the badge was released if there is no batch number, or if the batch number may be inaccurate/not specific.
| Date | optional |
Sample
Icon | Name | BP | 🌟 | Location | Description | Condition | Notes | Author | Date/Batch |
---|---|---|---|---|---|---|---|---|---|
Rain and Flowers | 🤐 🗺 |
Sky Garden: Crossover Garden | Visit the white tulip passage between Sky Garden and Ghost World | Badge name references a Yume Nikki remix of the same name. | WikiOdd | 2023-12-01 Batch 86 |
The table start and end are provided, as is necessary.