Template:MiniMoveCard: Difference between revisions

Template page
mNo edit summary
mNo edit summary
(39 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{#vardefine:gameTable|{{#if:{{{game|}}}|{{{game|}}}|{{BASEPAGENAME}}}}}} <!-- If a game is not provided, fall back to the base page name --><includeonly>{{Tt|{{{label|{{{input}}}}}}|{{#cargo_query:tables=MoveData_{{#var:gameTable}},MoveData_{{#var:gameTable}}__images|join on=MoveData_{{#var:gameTable}}._ID=MoveData_{{#var:gameTable}}__images._rowID|fields=images=image,name,guard,startup,recovery,onBlock|where=chara="{{{chara}}}" and input="{{{input}}}"|format=template|template=TooltipMovePreview|named args=yes|limit=1|more results text=}}}}</includeonly><noinclude>A template for shorthand writing cargo queries for displaying a mini move card.
<!-- If a game is not provided, fall back to the root page name
 
-->{{#vardefine:gameTable|{{{game| {{ROOTPAGENAME}} }}} }}<!--
==Usage==
    If a chara is not provided, fall back to the second segment of the page title
Due to weirdness with mediawiki, you must use the MiniMoveCard inside of a container, such as a div. This will be automatically done for you if it's in a move card on the overview, but for other pages you will need to add the div yourself.
-->{{#vardefine:targetChara|{{{chara| {{#titleparts:{{PAGENAME}}|1|2}} }}} }}<!--
 
-->{{{nickname|}}}<!--
  Expects 2 arguments:
--><includeonly>{{Tt|{{{label|{{{input}}}}}}|<!--
  chara = name of the character for the cargo query
    by default, query the images child table on a given move. if hitboxMode=true is provided, then query the hitboxes table instead
  input = input for the move for the cargo query
-->{{#vardefine:childImageTable|{{#ifeq: {{{hitboxMode|}}}|true|hitboxes|images}}}}<!--
 
    query the data
  optional arguments:
-->{{#cargo_query:tables=MoveData_{{#var:gameTable}},MoveData_{{#var:gameTable}}__{{#var:childImageTable}}<!--
  game  = name of the game as it appears in the cargo table. If this is not provided, it will assume the game from the BasePageName of the current page.
-->|join on=MoveData_{{#var:gameTable}}._ID=MoveData_{{#var:gameTable}}__{{#var:childImageTable}}._rowID<!--
  label = whatever text you want the tooltip to appear over. If not provided, uses the move input instead
-->|fields={{#var:childImageTable}}=image,name,guard,startup,recovery,onBlock<!--
 
-->|where=chara="{{#var:targetChara}}" and input="{{{input}}}" {{#if: {{{type|}}}|and type="{{{type|}}}"|}} {{#if: {{{imageNumber|}}}|and MoveData_{{#var:gameTable}}__{{#var:childImageTable}}._position="{{{imageNumber|}}}"|}}<!--
==Examples==
-->|format=template|template=TooltipMovePreview|named args=yes|limit=1|more results text=}}}}</includeonly><noinclude>{{clear}}{{doc}}</noinclude>
===Default Behavior===
<pre><div>Lorem ipsum dolor sit amet, {{MiniMoveCard|chara=Testament|input=236P|game=GGML}}, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</div></pre>
<div>Lorem ipsum dolor sit amet, {{MiniMoveCard|chara=Testament|input=236P|game=GGML}}, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</div>
 
===With label===
<pre><div>Lorem ipsum dolor sit amet, {{MiniMoveCard|chara=Sol Badguy|input=214S|game=GGST|label=Grand Viper}, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</div></pre>
<div>Lorem ipsum dolor sit amet, {{MiniMoveCard|chara=Sol Badguy|input=214S|game=GGST|label=Grand Viper}}, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</div>
</noinclude>

Revision as of 20:50, 13 August 2022

A template for writing shorthand cargo queries that display a Mini Move Card pop-up.

Usage

Using MMC instead of MiniMoveCard is also valid.

 Expects argument:
 input = input for the move for the cargo query
 Optional arguments:
 game        = name of the game as it appears in the cargo table. If this is not provided, it will assume the game from the RootPageName of the current page.
 chara       = full name of the character for the cargo query (e.g. "Sol Badguy"). If this is not provided, it will assume the character from the second segment of the current page title.
 label       = whatever text you want the tooltip to appear over. If not provided, uses the move input instead.
 type        = Narrows the query down using the type field. Used to resolve conflicts of overlapping inputs between differing moves.
 imageNumber = Specifies an image when a move has more than one image per version.
 hitboxMode  = provide the value "true" to override the image with a single hitbox image. Pair with the imageNumber argument to target a specific hitbox frame.

Examples

Default Behavior

{{MiniMoveCard|chara=Testament|input=236P|game=GGML}}

Lorem ipsum dolor sit amet, 236PGGML Testament 236P.pngGuardAllStartup18RecoveryAdvantage+3, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.

With Custom Label

{{MiniMoveCard|chara=Sol Badguy|input=214S|game=GGST|label=Sol's low-profiling special}}

Lorem ipsum dolor sit amet, Sol's low-profiling specialGGST Sol Badguy 214S 1.pngGuardAllStartup15~31 [32]Recovery32 [26]Advantage-17, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.

With Type Specifier

{{MiniMoveCard|chara=Zappa|input=j.S|game=GGACR|type=normal}}

Lorem ipsum dolor sit amet, j.SGGAC Zappa jS.pngGuardHigh/AirStartup9Recovery15Advantage-, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.

With Colored Move Input

{{MiniMoveCard|chara=Ramlethal Valentine|input=f.S|game=GGST|label={{color|game=GGST|S|f.S}}}}

Lorem ipsum dolor sit amet, f.SGGST Ramlethal Valentine fS.pngGuardAllStartup11Recovery21Advantage-10 [-13], sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.

With Move Link

{{MiniMoveCard|chara=Ky Kiske|input=236S|game=GGXRDR2|label=[[GGXRD-R2/Ky Kiske#Stun Edge|Stun Edge]]}}

Lorem ipsum dolor sit amet, Stun EdgeGGXRD Ky StunEdge.pngGuardAllStartup10RecoveryTotal 46Advantage-10, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.

ImageNumber Specifier

{{MMC|game=DNFD|chara=Troubleshooter|input=214M|imageNumber=2|label={{Clr|2|214M}}}}

Lorem ipsum dolor sit amet, 214MDNFD Troubleshooter 214M 2.pngGuardAllStartup18RecoveryAdvantage-23, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.

Hitbox Mode

{{MMC|game=GGACR|chara=Venom|input=6P|hitboxMode=true|label={{Clr|1|6P}}}}

Lorem ipsum dolor sit amet, 6PGGXXACPR Venom 6P-1-Hitbox.pngGuardMidStartup9Recovery20Advantage-12, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.

Hitbox Mode + ImageNumberSpecifier

{{MMC|game=GGACR|chara=Venom|input=6P|hitboxMode=true|imageNumber=2|label={{Clr|1|6P}}}}

Lorem ipsum dolor sit amet, 6PGGXXACPR Venom 6P-2-Hitbox.pngGuardMidStartup9Recovery20Advantage-12, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.