Toggle menu
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Module:Tier List/doc: Difference between revisions

From CosmicPE Wiki
No edit summary
No edit summary
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
<code>Module:Tier_List</code> is used to generate tier lists directly within the wiki using HTML, and the existing character labels.
<code>Module:Tier_List</code> is used to generate tier lists directly within the wiki.
 
It currently supports three rendering methods:
* <code>drawSimple</code> – renders entries directly from the provided text
* <code>drawIcons</code> – renders entries from manually specified icon files
* <code>drawCargoTable</code> – renders entries using Cargo data


==Usage==
==Usage==
A tier list requires that arguments be present in order.
# The abbreviation for the game (IE: GGACR, GBVS, DBFZ, etc)
# All of the tiers, ordered from top to bottom


Within a given tier, you must define the label for that tier (the letter that appears inside of the colored square) followed by a semicolon character (';').
===drawSimple===
Use <code>drawSimple</code> when you want to render a tier list directly from the provided text without using Cargo.
 
Required argument order:
# All tiers, ordered from top to bottom
 
Within each tier, define the tier label first, followed by a semicolon character (<code>;</code>), then a comma-separated list of item names.
 
====Example====
<pre>
{{#invoke:Tier List|drawSimple
|S;Blackout,Divine Immolation,Godly Overload,Deadly Disarmor
|A;Bleed,Deathbringer,Guardians,Gears,Execute
|B;Angelic,Armored,Dodge,Enlighted,Ghost
|C;Auto Smelt,Haste,Glowing,Headless,Confusion
|D;Aquatic,Anti Gravity,Experience,Decapitation
}}
</pre>
 
{{#invoke:Tier List|drawSimple
|S;Blackout,Divine Immolation,Godly Overload,Deadly Disarmor
|A;Bleed,Deathbringer,Guardians,Gears,Execute
|B;Angelic,Armored,Dodge,Enlighted,Ghost
|C;Auto Smelt,Haste,Glowing,Headless,Confusion
|D;Aquatic,Anti Gravity,Experience,Decapitation
}}
 
===drawIcons===
Use <code>drawIcons</code> when you want to define each item directly with its own icon file, without using Cargo.


===Short Names in Labels===
Required argument order:
The tier list will attempt to find the appropriate icon and link for a given character. If you choose not to use the full name of a character, you must set up a necessary redirect from the short name to the full name. This applies to both the icon file and the character page itself.
# All tiers, ordered from top to bottom


For example: We want to show "Sol" on our tier list instead of "Sol Badguy". We must create 2 redirects.
Within each tier, define the tier label first, followed by a semicolon character (<code>;</code>), then a comma-separated list of items.
* Redirect from <code><nowiki>[[File:GGACR_Sol_Icon.png]]</nowiki></code> to <code><nowiki>[[File:GGACR_Sol_Badguy_Icon.png]]</nowiki></code>
* Redirect from <code><nowiki>[[GGACR/Sol]]</nowiki></code> to <code><nowiki>[[GGACR/Sol_Badguy]]</nowiki></code>


==Example==
Each item must use this format:
* <code>Display Name::FileName.ext</code>
 
====Example====
<pre>
<pre>
{{#invoke:Tier List|drawTierList
{{#invoke:Tier List|drawIcons
|S;Flint::Flint.png,Emerald::Emerald.png,Quartz::Quartz.png,Experience Bottle::Experience bottle.png
|A;Tripwire Hook::Tripwire hook.png,Milk Bucket::Milk bucket.png,Paper::Paper.png,Blaze Rod::Blaze rod.png
|B;Redstone Torch::Redstone torch.png,Glowstone Dust::Glowstone dust.png,Ender Pearl::Ender pearl.png,Spider Eye::Spider eye.png
|C;Green Dye::Green dye.png,Cyan Dye::Cyan dye.png,Light Gray Dye::Light gray dye.png,Orange Dye::Orange dye.png
|D;Red Dye::Red dye.png,Map::Map.png,Ink Sac::Ink sac.png,Firework Star::Firework star.png
}}
</pre>
 
{{#invoke:Tier List|drawIcons
|S;Flint::Flint.png,Emerald::Emerald.png,Quartz::Quartz.png,Experience Bottle::Experience bottle.png
|A;Tripwire Hook::Tripwire hook.png,Milk Bucket::Milk bucket.png,Paper::Paper.png,Blaze Rod::Blaze rod.png
|B;Redstone Torch::Redstone torch.png,Glowstone Dust::Glowstone dust.png,Ender Pearl::Ender pearl.png,Spider Eye::Spider eye.png
|C;Green Dye::Green dye.png,Cyan Dye::Cyan dye.png,Light Gray Dye::Light gray dye.png,Orange Dye::Orange dye.png
|D;Red Dye::Red dye.png,Map::Map.png,Ink Sac::Ink sac.png,Firework Star::Firework star.png
}}
 
===drawCargoTable===
Use <code>drawCargoTable</code> when the first argument is the name of a Cargo table, and the remaining arguments are the tiers in top-to-bottom order.
 
Required argument order:
# Cargo table name
# All tiers, ordered from top to bottom
 
Within each tier, define the tier label first, followed by a semicolon character (<code>;</code>), then a comma-separated list of item names.
 
The item names should match the values stored in the Cargo table exactly.
 
====Example: Masks====
<pre>
{{#invoke:Tier List|drawCargoTable
|Mask
|Mask
|S;Zeus,Monopoly,Thanos,Animal Control
|S;Zeus,Monopoly,Thanos,Animal Control
Line 27: Line 88:
</pre>
</pre>


{{#invoke:Tier List|drawTierList
{{#invoke:Tier List|drawCargoTable
|Mask
|Mask
|S;Monopoly,Zeus,Thanos,Animal Control
|S;Zeus,Monopoly,Thanos,Animal Control
|A;Anonymous,Anti-Silence,Bunny,Death Knight,Death Wish
|A;Anonymous,Anti-Silence,Bunny,Death Knight,Death Wish
|B;Equalizer,Ghost,Glitch,Grave Digger
|B;Equalizer,Ghost,Glitch,Grave Digger
Line 35: Line 96:
|D;Necromancer,Outpost,Party,Pilgrim
|D;Necromancer,Outpost,Party,Pilgrim
}}
}}
==Notes==
* <code>drawSimple</code> does not query Cargo and only displays the provided labels directly.
* <code>drawIcons</code> does not query Cargo and renders each item using the explicitly supplied icon file.
* For <code>drawIcons</code>, each item must use the format <code>Display Name::FileName.ext</code>.
* <code>drawCargoTable</code> expects the first argument to be a valid Cargo table name.
* For Cargo rendering, item names must match the stored <code>name</code> values exactly.
* <code>drawTierList</code> may still exist as an alias for <code>drawCargoTable</code> if backward compatibility is enabled.

Latest revision as of 18:10, 8 March 2026

Module:Tier_List is used to generate tier lists directly within the wiki.

It currently supports three rendering methods:

  • drawSimple – renders entries directly from the provided text
  • drawIcons – renders entries from manually specified icon files
  • drawCargoTable – renders entries using Cargo data

Usage

drawSimple

Use drawSimple when you want to render a tier list directly from the provided text without using Cargo.

Required argument order:

  1. All tiers, ordered from top to bottom

Within each tier, define the tier label first, followed by a semicolon character (;), then a comma-separated list of item names.

Example

{{#invoke:Tier List|drawSimple
|S;Blackout,Divine Immolation,Godly Overload,Deadly Disarmor
|A;Bleed,Deathbringer,Guardians,Gears,Execute
|B;Angelic,Armored,Dodge,Enlighted,Ghost
|C;Auto Smelt,Haste,Glowing,Headless,Confusion
|D;Aquatic,Anti Gravity,Experience,Decapitation
}}
S
Blackout
Divine Immolation
Godly Overload
Deadly Disarmor
A
Bleed
Deathbringer
Guardians
Gears
Execute
B
Angelic
Armored
Dodge
Enlighted
Ghost
C
Auto Smelt
Haste
Glowing
Headless
Confusion
D
Aquatic
Anti Gravity
Experience
Decapitation

drawIcons

Use drawIcons when you want to define each item directly with its own icon file, without using Cargo.

Required argument order:

  1. All tiers, ordered from top to bottom

Within each tier, define the tier label first, followed by a semicolon character (;), then a comma-separated list of items.

Each item must use this format:

  • Display Name::FileName.ext

Example

{{#invoke:Tier List|drawIcons
|S;Flint::Flint.png,Emerald::Emerald.png,Quartz::Quartz.png,Experience Bottle::Experience bottle.png
|A;Tripwire Hook::Tripwire hook.png,Milk Bucket::Milk bucket.png,Paper::Paper.png,Blaze Rod::Blaze rod.png
|B;Redstone Torch::Redstone torch.png,Glowstone Dust::Glowstone dust.png,Ender Pearl::Ender pearl.png,Spider Eye::Spider eye.png
|C;Green Dye::Green dye.png,Cyan Dye::Cyan dye.png,Light Gray Dye::Light gray dye.png,Orange Dye::Orange dye.png
|D;Red Dye::Red dye.png,Map::Map.png,Ink Sac::Ink sac.png,Firework Star::Firework star.png
}}
S
Flint
Emerald
Quartz
Experience Bottle
A
Tripwire Hook
Milk Bucket
Paper
Blaze Rod
B
Redstone Torch
Glowstone Dust
Ender Pearl
Spider Eye
C
Green Dye
Cyan Dye
Light Gray Dye
Orange Dye
D
Red Dye
Map
Ink Sac
Firework Star

drawCargoTable

Use drawCargoTable when the first argument is the name of a Cargo table, and the remaining arguments are the tiers in top-to-bottom order.

Required argument order:

  1. Cargo table name
  2. All tiers, ordered from top to bottom

Within each tier, define the tier label first, followed by a semicolon character (;), then a comma-separated list of item names.

The item names should match the values stored in the Cargo table exactly.

Example: Masks

{{#invoke:Tier List|drawCargoTable
|Mask
|S;Zeus,Monopoly,Thanos,Animal Control
|A;Anonymous,Anti-Silence,Bunny,Death Knight,Death Wish
|B;Equalizer,Ghost,Glitch,Grave Digger
|C;Headless,Holy,Joker,Lover,Monopoly,Muqsit
|D;Necromancer,Outpost,Party,Pilgrim
}}
S
Zeus
Monopoly
Thanos
Animal Control
A
Anonymous
Anti-Silence
Bunny
Death Knight
Death Wish
B
Equalizer
Ghost
Glitch
Grave Digger
C
Headless
Holy
Joker
Lover
Monopoly
Muqsit
D
Necromancer
Outpost
Party
Pilgrim

Notes

  • drawSimple does not query Cargo and only displays the provided labels directly.
  • drawIcons does not query Cargo and renders each item using the explicitly supplied icon file.
  • For drawIcons, each item must use the format Display Name::FileName.ext.
  • drawCargoTable expects the first argument to be a valid Cargo table name.
  • For Cargo rendering, item names must match the stored name values exactly.
  • drawTierList may still exist as an alias for drawCargoTable if backward compatibility is enabled.