Difference between revisions of "Template:UserCharacterChecklist"

From Tokyo Afterschool Summoners
Jump to navigation Jump to search
(updated code to be more streamlined for easier edits)
m (i actually forgot to remove sorting)
 
(6 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{#vardefine:disabled|style="background-color: black;" {{!}} -}}{{#vardefine:checkmark|style="background-color: lime;" {{!}} ✔}}{{#vardefine:notmark|style="background-color: red;" {{!}} ✘}}
<includeonly>
{| class="wikitable sortable" style="width: 50%; text-align: center;"
{| class="wikitable" style="width: 50%; text-align: center;"
!Characters
!Characters
!☆3
!☆3
Line 6: Line 6:
!☆5
!☆5
|-
|-
{{#vardefine: setColor|inherit}}
{{
{{
   #forargs: c
   #forargs: c
   | key
   | character
   | value
   | flags
   | <nowiki/>
   | <nowiki/>
   {{!}}{{ #var:key }}{{
   {{ #if: {{ #pos: {{ #var: character }} | GroupColor }}
    #loop: star
    | {{ #vardefine: setColor|{{ #var: flags }} }}
    | 3
    | {{!}} style="background-color: {{ #if: {{ #var: setColor }} | {{ #var: setColor }} | inherit }};" {{!}} [[ {{ #var: character }} |<span style="color:black; font-weight: bold;">{{ #var: character }}</span> ]]{{
    | 3
      #loop: star
    | {{!}}{{!}}{{
      | 3
      #if: {{ #pos:{{ #explode:{{ #var:value }}|/|0 }} | {{ #var: star }} }}
      | 3
      |
      | {{!}}{{!}}{{
      {{ #var:checkmark }}
        #if: {{ #pos: {{ #explode: {{ #var: flags }}|/|0 }} | {{ #var: star }} }}
      |{{  
        | style="background-color: lime;" {{!}}
        #if: {{ #pos:{{ #explode:{{ #var:value }}|/|1 }} | {{ #var: star }} }}
        | {{  
        |
          #if: {{ #pos: {{ #explode: {{ #var: flags }}|/|1 }} | {{ #var: star }} }}
        {{ #var:notmark }}
          | style="background-color: red;" {{!}}
        |
          | style="background-color: black;" {{!}} -
         {{ #var:disabled }}
         }}
       }}
       }}
     }}
     }}
    {{!}}-
   }}
   }}
  {{!}}-
}}
}}
|}
|}
</includeonly><noinclude>
=Template Usage=
The template is fairly simple to use, you just have to make sure that the variables are CASE-SENSITIVE; otherwise you will end up with a broken template.
This template is only used to checklist the characters you do have in the game, unlike any other PAD/Gacha styled games, this can be a collect-a-thon.
==To call the template==
<nowiki>
{{UserCharacterChecklist
<<< stuff >>>
}}
</nowiki>
==The defined variables==
All attributes has to start with "c", any attribute that does not start with "c" will be ignored based on the args loop.
<nowiki>
|c<character name>=<do have>/<don't have>
eg.
|cYoul=34
|cSitri=3/4
|cMoritaka=4/35
|cJebb=/35
----------
|cGroupColor<type>=<color>
eg.
|cGroupColorFire=red
</nowiki>
==Setting up the group colors==
<nowiki>
{{UserCharacterChecklist
|cGroupColorFire=lightcoral
}}
</nowiki>
This will set any future character the set group color. To set a new color for other characters, it has to be placed before the characters are defined.
<nowiki>
eg.
|cGroupColorWater=blue
|cSomeCharacter=345
|cGroupColorWhatever=...
</nowiki>
* Do notice that '''#''' will break the format when being parsed, so either use '''Color(r, g, b)''' or '''BY THE NAME COLOR''' by using a html color code table at whatever page it has.
== Additional Notes ==
* This template has no way of verifying if the character name is typed correctly. You are responsible to type the names correctly.
* This template has no way of verifying if the color is correctly set. If wrong, the template will break.
* This template has no way of adding the characters automatically. Make sure to update properly when needed
</noinclude>

Latest revision as of 06:03, 28 April 2017

Template Usage

The template is fairly simple to use, you just have to make sure that the variables are CASE-SENSITIVE; otherwise you will end up with a broken template.

This template is only used to checklist the characters you do have in the game, unlike any other PAD/Gacha styled games, this can be a collect-a-thon.


To call the template

{{UserCharacterChecklist
<<< stuff >>>
}}


The defined variables

All attributes has to start with "c", any attribute that does not start with "c" will be ignored based on the args loop.

|c<character name>=<do have>/<don't have>

eg.
|cYoul=34
|cSitri=3/4
|cMoritaka=4/35
|cJebb=/35

----------

|cGroupColor<type>=<color>

eg.
|cGroupColorFire=red


Setting up the group colors

{{UserCharacterChecklist
|cGroupColorFire=lightcoral
}}

This will set any future character the set group color. To set a new color for other characters, it has to be placed before the characters are defined.

eg.
|cGroupColorWater=blue
|cSomeCharacter=345
|cGroupColorWhatever=...

  • Do notice that # will break the format when being parsed, so either use Color(r, g, b) or BY THE NAME COLOR by using a html color code table at whatever page it has.


Additional Notes

  • This template has no way of verifying if the character name is typed correctly. You are responsible to type the names correctly.
  • This template has no way of verifying if the color is correctly set. If wrong, the template will break.
  • This template has no way of adding the characters automatically. Make sure to update properly when needed