Template:MoveTable: Difference between revisions

Template page
No edit summary
No edit summary
Line 1: Line 1:
<includeonly>{{#cargo_query:table=Move
<includeonly>{{#cargo_query:table=Move
|fields=id=Move,startup=Startup,target=Hit Level,damage=Damage,block=On Block,CONCAT(hit,'')=On Hit,CONCAT(ch,'')=On CH,notes=Notes,reach=Range,crush=States,recv=Recovery
|fields=id=Move,startup=Startup,target=Hit Level,damage=Damage,block=On Block,CONCAT(hit,'')=On Hit,CONCAT(ch,'')=On CH,states=States,notes=Notes
|where=Move._pageName='{{{chara|{{#explode:{{PAGENAME}}| |0}}}}} movelist' {{#ifeq:{{{strings}}}|yes||AND parent IS NULL}}
|where=Move._pageName='{{{chara|{{#explode:{{PAGENAME}}| |0}}}}} movelist' {{#ifeq:{{{strings}}}|yes||AND parent IS NULL}}
|format=dynamic table
|format=dynamic table
Line 6: Line 6:
|edit link=yes
|edit link=yes
|searchable columns=yes
|searchable columns=yes
|hidden fields=States,Range,Recovery
}}</includeonly><noinclude>{{documentation}}</noinclude>
}}</includeonly><noinclude>{{documentation}}</noinclude>

Revision as of 17:51, 7 March 2024


This template shows a dynamic cargo table for a given character. Primarily meant to be used on Character_movetable page. It has options for specifying which character and whether string extensions should be included or not. By default it will attempt to use the character of the page it is called on and will not include string extensions.

Usage

{{MoveTable|chara=...|strings=...}}

Parameters

Both parameters are optional.

chara
An override to specify which character to create the movetable for. By default, this uses MoveTable to determine the character.
strings
Pass yes into this parameter if you want string extensions to be included, anything else, including leaving the parameter out, will result in strings extensions be excluded based on the parent field of Move Cargo Table.

Example

{{MoveTable|chara=Bryan|strings=yes}}
Error: No field named "states" found for any of the specified database tables.

TODO

  • Account for characters with space characters in name automatically
  • Incorporate Tooltip headers, either using built in functionality of Dynamic Tables or using helper template.
  • Create helper template to remove excess characters from fields such as the leading character name under move and leading ",".
  • Implement a natural sort to account for strings.