×
Create a new article
Write your page title here:
We currently have 2,829 articles on YumeWiki. Type your article name above or click on one of the titles below and start writing!



    YumeWiki
    2,829Articles

    Template:Badge/doc: Difference between revisions

    (Created page with "==Description== <!--Short summary of what the main function of the template is--> Formats the table entries in YNOproject:Badges/Badge List, useful as it creates badge subobjects that point a "Badge/Location" property to any locations the badge appears in. Also creates other properties that may be useful.<br>Technically there is no use for the template in the section for YNOproject badges since they never have a location attached to them. ==Syntax== On the badge page...")
     
    mNo edit summary
    Line 44: Line 44:
    | style="text-align: center;" |<u>'''Author(s)'''</u>
    | style="text-align: center;" |<u>'''Author(s)'''</u>
    | style="text-align: center;" |<u>'''Release batch/Date'''</u></nowiki></pre>
    | style="text-align: center;" |<u>'''Release batch/Date'''</u></nowiki></pre>
    {{badge|type=Yume Nikki|
    |-
    |id = fc_moai
    {{#if:fc_moai||! colspan="{{#ifeq:Yume Nikki|YNOproject|7|8}}" {{!}}BELOW BADGE MISSING ID - PLEASE ADD
    |Icon = Nasu gold(badgeyn).gif, Nasu gold(badgeyn).png
    {{!}}-}}
    |Name = Tomb of the Moai
    |{{#if:Nasu gold(badgeyn).gif, Nasu gold(badgeyn).png|{{#arraymap: Nasu gold(badgeyn).gif, Nasu gold(badgeyn).png|,|item|[[File:item{{!}}center{{!}}frameless]]|<br>}}|''TBA''}}
    |Location = FC Dungeon
    |Tomb of the Moai
    |Description = What a nice statue!
    {{#ifeq:Yume Nikki|YNOproject||{{#if:FC Dungeon|{{!}}{{#arraymap:FC Dungeon|,|item|[[Yume Nikki:item{{!}}item]]|,\s|and}}|{{!}} style="background:#CDCDCD" ; {{!}}}}}}
    |Condition = Enter the moai head room in the FC Dungeon
    {{#if:What a nice statue!|{{!}}What a nice statue!|{{!}} style="background:#CDCDCD" ; {{!}}}}
    |Author = WikiOdd
    |Enter the moai head room in the FC Dungeon
    {{#if:|{{!}}{{{Notes}}}|{{!}} style="background:#CDCDCD" ; {{!}}}}
    |{{#arraymap:WikiOdd|,|item|item|,\s|and}}
    |''TBA''
    <span id="fc_moai">{{#if:Yume Nikki|{{#ifeq:Yume Nikki|YNOproject||
    {{#subobject:fc_moai
    |Badge/Icon = {{#arraymap:Nasu gold(badgeyn).gif, Nasu gold(badgeyn).png|,|item|File:item|,}}|+sep=,
    |Badge/Name = Tomb of the Moai
    |Badge/Location = {{#arraymap:FC Dungeon|,|item|Yume Nikki:item|,}}|+sep=,
    |Badge/Author = {{#arraymap:WikiOdd|,|item|item|,}}|+sep=,
    }}
    }}
    {{#if:|{{#subobject:fc_moai|Badge/Date = {{{Date}}}}}|{{#if:|{{#subobject:fc_moai|Badge/Date = {{{Batch}}}}}|}}}}
    }}}}</span>
    |}
    |}
    The table start and end are provided as is necessary.
    The table start and end are provided as is necessary.
    <noinclude>__NOTOC__ [[Category:Template Documentation]]</noinclude>
    <noinclude>__NOTOC__ [[Category:Template Documentation]]</noinclude>
    <includeonly>__NOEDITSECTION__</includeonly>
    <includeonly>__NOEDITSECTION__</includeonly>

    Revision as of 02:55, 12 July 2023

    Description

    Formats the table entries in YNOproject:Badges/Badge List, useful as it creates badge subobjects that point a "Badge/Location" property to any locations the badge appears in. Also creates other properties that may be useful.
    Technically there is no use for the template in the section for YNOproject badges since they never have a location attached to them.

    Syntax

    On the badge page you should already have a table that begins like this:

    {| style="width: 100%;" cellspacing="0" cellpadding="4" border="1"
    |-
    | style="text-align: center;" |<u>'''Icon(s)'''</u>
    | style="text-align: center;" |<u>'''Name'''</u>
    | style="text-align: center;" |<u>'''Location'''</u>
    | style="text-align: center;" |<u>'''Description'''</u>
    | style="text-align: center;" |<u>'''Condition(s)'''</u>
    | style="text-align: center;" |<u>'''Note(s)'''</u>
    | style="text-align: center;" |<u>'''Author(s)'''</u>
    | style="text-align: center;" |<u>'''Release batch/Date'''</u>

    The template is used after the table beginning. Here is an example input:

    {{badge|type=Yume Nikki|
    |id = fc_moai
    |Icon = Nasu gold(badgeyn).gif, Nasu gold(badgeyn).png
    |Name = Tomb of the Moai
    |Location = FC Dungeon
    |Description = What a nice statue!
    |Condition = Enter the moai head room in the FC Dungeon
    |Author = WikiOdd
    }}

    Each badge entry should be written in that format. Note there are more parameters that were absent in the example as they were not needed (not every field is required).
    The "id" parameter is absolutely required for the template to work, however, it is hidden from the table itself.
    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

    TBA

    Parameters

    Sample

    The example given in "Syntax" above would produce the following output:

    Icon(s) Name Location Description Condition(s) Note(s) Author(s) Release batch/Date</nowiki>
    Nasu gold(badgeyn).gif

    Nasu gold(badgeyn).png
    Tomb of the Moai FC Dungeon What a nice statue! Enter the moai head room in the FC Dungeon WikiOdd TBA

    The table start and end are provided as is necessary.