Gallery 3.0

{{gallery}} 3.0 is the current version of the dynamic multi-gallery script for toggle.js. It is used to create multiple galleries that can be toggled on each unit page. You can either input filenames or allow it to detect them manually.

Supported auto-detect filepaths:

    • Icon.png
    • Render.png
    • Sprite.png
    • Death Sprite.png
    • Sprite.gif
    • Attack Sprite.gif
    • Skill Sprite.gif
    • Skill Attack Sprite.gif
    • Ability Sprite.gif
    • Death Sprite.gif
    • Attack Sprite.gif

Automatic Sorting Order

If you're curious how it matches stuff, i will detail the exact process here.
it uses lua match function in a bunch of ifelse statements (Basically a bunch of nested else statements, but in lua) For a bunch that go to the same gallery, it will use if x or y or z, etc.
It will match the following, in order, as long as they are surrounded by non-ascii letters (a-z,A-Z)

  • old -> "Old" gallery
  • ios -> "iOS" gallery
  • art -> "Art" gallery
  • artwork -> "Art" gallery
  • fanart -> "Art" gallery

It will match the following, in order, as long as they are surrounded by spaces (unless it's at the end of the file, then just a space beforehand.)

  • contains the pagename
    • saw2v2 -> "AW2v2" gallery
    • aw2v2 -> "AW2v2" gallery
    • saw2v1 -> "AW2v1" gallery
    • aw2v1 -> "AW2v1" gallery
    • saw2 -> "AW2" gallery
    • aw2 -> "AW2" gallery
    • saw -> "AW" gallery
    • aw -> "AW" gallery
    • cc -> "CC" gallery
    • icon.png -> "Base" gallery
    • render.png -> "Base" gallery
    • sprite.png -> "Base" gallery
    • sprite.gif -> "Base" gallery
    • Else (If has pagename, but no other sub-matches) -> "Screenshots" gallery)
  • Pages without pagename
    • icon.png -> "Base" gallery
    • render.png -> "Token" gallery
    • sprite.png -> "Token" gallery
    • sprite.gif -> "Token" gallery
    • Else (no pagename,no other matches) -> "Screenshots" gallery)

Compared to my last order, i think this is pretty much as good as it gets. Since screenshots are generally a bunch of nonsense and have no order to them, with the exception of never having the sprite, icon or render suffix, it makes a good "trash can". As for Art, iOS and Old, they generally should have the tags listed in their names, but i do artwork last because since the former 2 are kind of loosely syntaxed due to their lack of script inclusion, some people will write art/artwork in the filename.

Gallery usage guide


All commands are now case-insensitive, so you can type them however you wish.

  • Default command. Ie, | [insert list of files here] will default to auto.
  • Put images here to be sorted automatically
    • Some images will need to be sorted manually.


  • Default gallery, for the base images (fresh from shrine/event)


  • Gallery for class-changed images, if the unit can class-change.


  • Gallery for awakened images.


  • Gallery for second awakening images. Only if the class has a single path.


  • Galleries for second awakening images. Only if the unit has access to both paths.


  • Gallery for tokens the unit has access to.


  • Gallery for old/outdated images.


  • Gallery for fan-art of the original unit, by the unit's artist.


  • Gallery for Ios images (Apple Mobile game ver.)


  • Gallery for screenshots of the unit.

Example of use


Estelle Icon.png
Estelle AW Icon.png
Estelle Render.png
Estelle AW Render.png
Estelle Sprite.png
Estelle Sprite.gif
Estelle Attack Sprite.gif
Estelle CC Sprite.png
Estelle CC Sprite.gif
Estelle CC Attack Sprite.gif
Estelle AW Sprite.png
Estelle AW Sprite.gif
Estelle AW Attack Sprite.gif
Estelle lv 1.jpg
Estelle max lv.jpg
Estelle iOS Artwork.png
Estelle iOS AW Artwork.png


Versions Base · · · ·



Improvements over 2.0:
  • Case-desensitization for argument commands (File links are still probably case-sensitive)
    • Also inclusion of "base" to act as normal (both work, just different options of typing it)
  • Automatic image detection (as long as they have the valid file syntax)
    • [Pagename] [CC/AW/AW2 etc.] Icon.png
    • [Pagename] [CC/AW/AW2 etc.] Render.png
    • [Pagename] [CC/AW/AW2 etc.] Sprite.png
    • [Pagename] [CC/AW/AW2 etc.] Sprite.gif
    • [Pagename] [CC/AW/AW2 etc.] Attack Sprite.gif
    • [Pagename] [SAW/SAW2 etc.] Attack Sprite.gif
  • Custom toggle header script (no longer uses illumini9's script)
    • Changed the separators between each "tab" to be more aesthetically pleasing.
  • Auto categorization for
    • Units without AW art
    • Units without AW2 art
    • Units without .gifs
  • Automatic gallery ordering
    • Icon
    • Render
    • Sprite
    • Sprite (gif)
    • Attack sprite (gif)
    • SAW Attack sprite (gif)
  • Disabled pattern matching on the auto-sort
    • Fixes units with brackets not being automatically sorted
    • More accurate then removing pattern items from the names themselves.


  • Remove dashes from names to prevent false-negatives due to pattern matching.


Improvements over 2.0:
  • Automatic sorting of images with "
Community content is available under CC-BY-SA unless otherwise noted.