Template:DoEPlayfield/Documentation: Difference between revisions

From Mizuumi Wiki
Jump to navigation Jump to search
(Created page with "{{Doc/start}} ==Usage== Create a field display to mimic spells, patterns, or movements. Uses branch templates Template:Infobox Playfield/Entity and Template:Infobox Playfield/Highlight. {{Infobox Playfield|<!-- -->{{Infobox Playfield/Highlight|y=2|x=6|color=gray}}<!-- -->{{Infobox Playfield/Entity |y=2|x=2|image=Hero_Saffron.png}}<!-- -->}} <pre> {{Infobox Playfield|<!-- -->{{Infobox Playfield/Highlight|y=2|x=6|color=gray}}<!-- -->{{Infobox Playfield/Entity...")
 
No edit summary
Line 1: Line 1:
{{Doc/start}}
==Usage==
==Usage==
Create a field display to mimic spells, patterns, or movements. Uses branch templates [[Template:Infobox Playfield/Entity]] and [[Template:Infobox Playfield/Highlight]].
Create a field display to mimic spells, patterns, or movements. Uses branch templates [[Template:DoEPlayfield/Entity]] and [[Template:DoEPlayfield/Highlight]].


{{Infobox Playfield|<!--
{{DoEPlayfield|<!--
-->{{Infobox Playfield/Highlight|y=2|x=6|color=gray}}<!--
-->{{DoEPlayfield/Highlight|y=2|x=6|color=gray}}<!--
-->{{Infobox Playfield/Entity  |y=2|x=2|image=Hero_Saffron.png}}<!--
-->{{DoEPlayfield/Entity  |y=2|x=2|image=Hero_Saffron.png}}<!--
-->}}
-->}}
<pre>
<pre>
{{Infobox Playfield|<!--
{{DoEPlayfield|<!--
-->{{Infobox Playfield/Highlight|y=2|x=6|color=gray}}<!--
-->{{DoEPlayfield/Highlight|y=2|x=6|color=gray}}<!--
-->{{Infobox Playfield/Entity  |y=2|x=2|image=Hero_Saffron.png}}<!--
-->{{DoEPlayfield/Entity  |y=2|x=2|image=Hero_Saffron.png}}<!--
-->}}
-->}}
</pre>
</pre>


==Template Parameters==
==Template Parameters==
<pre>{{Infobox Playfield|float=none|caption=Bottom text|
<pre>{{DoEPlayfield|float=none|caption=Bottom text|
...
...
}}</pre>
}}</pre>
*<code>unnamed parameter 1</code> Entities and Tile Highlights using [[Template:Infobox Playfield/Entity]] and [[Template:Infobox Playfield/Highlight]]. Order matters as elements placed higher display below other elements.
*<code>unnamed parameter 1</code> Entities and Tile Highlights using [[Template:DoEPlayfield/Entity]] and [[Template:DoEPlayfield/Highlight]]. Order matters as elements placed higher display below other elements.
*<code>caption</code> '''(Optional)''' Caption to display underneath the field display.
*<code>caption</code> '''(Optional)''' Caption to display underneath the field display.
** <code>blanklines</code> '''(Optional)''' Extra blank lines underneath the playfield. Literally extra "<br>" characters. Value must be 1, 2, or 3 if used.
** <code>blanklines</code> '''(Optional)''' Extra blank lines underneath the playfield. Literally extra "<br>" characters. Value must be 1, 2, or 3 if used.
Line 26: Line 25:
==Entity Parameters==
==Entity Parameters==
<pre>...
<pre>...
{{Infobox Playfield/Entity|y=|x=2|image=Hero_Saffron.png}}
{{DoEPlayfield/Entity|y=|x=2|image=Hero_Saffron.png}}
...</pre>
...</pre>
*<code>x</code> The column to place the entity. (Default: 2)
*<code>x</code> The column to place the entity. (Default: 2)
Line 40: Line 39:
==Highlight Parameters==
==Highlight Parameters==
<pre>...
<pre>...
{{Infobox Playfield/Highlight|y=|x=2|color=gray}}
{{DoEPlayfield/Highlight|y=|x=2|color=gray}}
...</pre>
...</pre>
*<code>x</code> The column to place the entity. (Default: 2)
*<code>x</code> The column to place the entity. (Default: 2)
Line 157: Line 156:
==Presets==
==Presets==
Instead of filling out code manually for basic spells, you can use a preset.
Instead of filling out code manually for basic spells, you can use a preset.
* {{Tlx|Infobox Playfield/Preset 4 Tile}}
* {{Tlx|DoEPlayfield/Preset 4 Tile}}
::{{Infobox Playfield/Preset 4 Tile}}
::{{DoEPlayfield/Preset 4 Tile}}
* {{Tlx|Infobox Playfield/Preset Straight}}
* {{Tlx|DoEPlayfield/Preset Straight}}
::{{Infobox Playfield/Preset Straight}}
::{{DoEPlayfield/Preset Straight}}
* {{Tlx|Infobox Playfield/Preset Straight Pierce}}
* {{Tlx|DoEPlayfield/Preset Straight Pierce}}
::{{Infobox Playfield/Preset Straight Pierce}}
::{{DoEPlayfield/Preset Straight Pierce}}
* {{Tlx|Infobox Playfield/Preset Straight Laser}}
* {{Tlx|DoEPlayfield/Preset Straight Laser}}
::{{Infobox Playfield/Preset Straight Laser}}
::{{DoEPlayfield/Preset Straight Laser}}


===Preset Parameters===
===Preset Parameters===
Line 173: Line 172:


==Template Shortcuts==
==Template Shortcuts==
* {{Tlx|Infobox Playfield}} can also be written as {{Tlx|pf}} or {{Tlx|field}}
* {{Tlx|DoEPlayfield}} can also be written as {{Tlx|pf}} or {{Tlx|field}}
* {{Tlx|Infobox Playfield/Entity}} can also be written as {{Tlx|entity}}
* {{Tlx|DoEPlayfield/Entity}} can also be written as {{Tlx|entity}}
* {{Tlx|Infobox Playfield/Highlight}} can also be written as {{Tlx|highlight}}
* {{Tlx|DoEPlayfield/Highlight}} can also be written as {{Tlx|highlight}}


==Examples==
==Examples==
===Basic Example===
===Basic Example===
Found on any 4 tile target spell page, like {{Spells|Thunder}}. Use [[Template:Infobox Playfield/Preset 4 Tile]] if possible.
Found on any 4 tile target spell page, like {{Spells|Thunder}}. Use [[Template:DoEPlayfield/Preset 4 Tile]] if possible.
{{Infobox Playfield|
{{DoEPlayfield|
{{Infobox Playfield/Highlight|x=6|y=2|color=gray}}
{{DoEPlayfield/Highlight|x=6|y=2|color=gray}}
{{Infobox Playfield/Entity  |x=2|y=2|image=Hero_Saffron.png}}
{{DoEPlayfield/Entity  |x=2|y=2|image=Hero_Saffron.png}}
}}
}}
'''Source:'''
'''Source:'''
<pre>
<pre>
{{Infobox Playfield|
{{DoEPlayfield|
{{Infobox Playfield/Highlight|x=6|y=2|color=gray}}
{{DoEPlayfield/Highlight|x=6|y=2|color=gray}}
{{Infobox Playfield/Entity  |x=2|y=2|image=Hero_Saffron.png}}
{{DoEPlayfield/Entity  |x=2|y=2|image=Hero_Saffron.png}}
}}
}}
</pre>
</pre>
===Full Example===
===Full Example===
From [[Gate#Strategy]] page using a lot of parameters.
From [[Gate#Strategy]] page using a lot of parameters.
{{Infobox Playfield|<!--
{{DoEPlayfield|<!--
-->{{Infobox Playfield/Entity|offsetx=330px|offsety=270px|image=Boss Gate.png}}<!--
-->{{DoEPlayfield/Entity|offsetx=330px|offsety=270px|image=Boss Gate.png}}<!--
-->{{Infobox Playfield/Highlight|y=2|x=2|color=DarkKhaki|opacity=0.5|8}}<!--
-->{{DoEPlayfield/Highlight|y=2|x=2|color=DarkKhaki|opacity=0.5|8}}<!--
-->{{Infobox Playfield/Highlight|y=3|x=2|color=DarkKhaki|opacity=0.6|6}}<!--
-->{{DoEPlayfield/Highlight|y=3|x=2|color=DarkKhaki|opacity=0.6|6}}<!--
-->{{Infobox Playfield/Highlight|y=3|x=3|color=DarkKhaki|opacity=0.7|6}}<!--
-->{{DoEPlayfield/Highlight|y=3|x=3|color=DarkKhaki|opacity=0.7|6}}<!--
-->{{Infobox Playfield/Highlight|y=3|x=4|color=DarkKhaki|opacity=0.8|2}}<!--
-->{{DoEPlayfield/Highlight|y=3|x=4|color=DarkKhaki|opacity=0.8|2}}<!--
-->{{Infobox Playfield/Highlight|y=2|x=4|color=DarkKhaki|opacity=0.9|2}}<!--
-->{{DoEPlayfield/Highlight|y=2|x=4|color=DarkKhaki|opacity=0.9|2}}<!--
-->{{Infobox Playfield/Highlight|y=1|x=4|color=DarkKhaki|opacity=1.0}}<!--
-->{{DoEPlayfield/Highlight|y=1|x=4|color=DarkKhaki|opacity=1.0}}<!--
--><!--
--><!--
-->{{Infobox Playfield/Entity  |y=2|x=2|opacity=0.30}}<!--
-->{{DoEPlayfield/Entity  |y=2|x=2|opacity=0.30}}<!--
-->{{Infobox Playfield/Entity  |y=3|x=2|opacity=0.35}}<!--
-->{{DoEPlayfield/Entity  |y=3|x=2|opacity=0.35}}<!--
-->{{Infobox Playfield/Entity  |y=3|x=3|opacity=0.40}}<!--
-->{{DoEPlayfield/Entity  |y=3|x=3|opacity=0.40}}<!--
-->{{Infobox Playfield/Entity  |y=3|x=4|opacity=0.45}}<!--
-->{{DoEPlayfield/Entity  |y=3|x=4|opacity=0.45}}<!--
-->{{Infobox Playfield/Entity  |y=2|x=4|opacity=0.50}}<!--
-->{{DoEPlayfield/Entity  |y=2|x=4|opacity=0.50}}<!--
-->{{Infobox Playfield/Entity  |y=1|x=4|opacity=0.55}}<!--
-->{{DoEPlayfield/Entity  |y=1|x=4|opacity=0.55}}<!--
-->{{Infobox Playfield/Entity  |y=1|x=3|opacity=1.00}}<!--
-->{{DoEPlayfield/Entity  |y=1|x=3|opacity=1.00}}<!--
-->}}
-->}}
'''Source:''' (Note: This page uses comments to organize on the original page and prevent line breaks due to list formatting. Without them the code breaks.)
'''Source:''' (Note: This page uses comments to organize on the original page and prevent line breaks due to list formatting. Without them the code breaks.)
<pre>
<pre>
{{Infobox Playfield|<!--
{{DoEPlayfield|<!--
-->{{Infobox Playfield/Entity|offsetx=330px|offsety=270px|image=Boss Gate.png}}<!--
-->{{DoEPlayfield/Entity|offsetx=330px|offsety=270px|image=Boss Gate.png}}<!--
-->{{Infobox Playfield/Highlight|y=2|x=2|color=DarkKhaki|opacity=0.5|8}}<!--
-->{{DoEPlayfield/Highlight|y=2|x=2|color=DarkKhaki|opacity=0.5|8}}<!--
-->{{Infobox Playfield/Highlight|y=3|x=2|color=DarkKhaki|opacity=0.6|6}}<!--
-->{{DoEPlayfield/Highlight|y=3|x=2|color=DarkKhaki|opacity=0.6|6}}<!--
-->{{Infobox Playfield/Highlight|y=3|x=3|color=DarkKhaki|opacity=0.7|6}}<!--
-->{{DoEPlayfield/Highlight|y=3|x=3|color=DarkKhaki|opacity=0.7|6}}<!--
-->{{Infobox Playfield/Highlight|y=3|x=4|color=DarkKhaki|opacity=0.8|2}}<!--
-->{{DoEPlayfield/Highlight|y=3|x=4|color=DarkKhaki|opacity=0.8|2}}<!--
-->{{Infobox Playfield/Highlight|y=2|x=4|color=DarkKhaki|opacity=0.9|2}}<!--
-->{{DoEPlayfield/Highlight|y=2|x=4|color=DarkKhaki|opacity=0.9|2}}<!--
-->{{Infobox Playfield/Highlight|y=1|x=4|color=DarkKhaki|opacity=1.0}}<!--
-->{{DoEPlayfield/Highlight|y=1|x=4|color=DarkKhaki|opacity=1.0}}<!--
--><!--
--><!--
-->{{Infobox Playfield/Entity  |y=2|x=2|opacity=0.30}}<!--
-->{{DoEPlayfield/Entity  |y=2|x=2|opacity=0.30}}<!--
-->{{Infobox Playfield/Entity  |y=3|x=2|opacity=0.35}}<!--
-->{{DoEPlayfield/Entity  |y=3|x=2|opacity=0.35}}<!--
-->{{Infobox Playfield/Entity  |y=3|x=3|opacity=0.40}}<!--
-->{{DoEPlayfield/Entity  |y=3|x=3|opacity=0.40}}<!--
-->{{Infobox Playfield/Entity  |y=3|x=4|opacity=0.45}}<!--
-->{{DoEPlayfield/Entity  |y=3|x=4|opacity=0.45}}<!--
-->{{Infobox Playfield/Entity  |y=2|x=4|opacity=0.50}}<!--
-->{{DoEPlayfield/Entity  |y=2|x=4|opacity=0.50}}<!--
-->{{Infobox Playfield/Entity  |y=1|x=4|opacity=0.55}}<!--
-->{{DoEPlayfield/Entity  |y=1|x=4|opacity=0.55}}<!--
-->{{Infobox Playfield/Entity  |y=1|x=3|opacity=1.00}}<!--
-->{{DoEPlayfield/Entity  |y=1|x=3|opacity=1.00}}<!--
-->}}
-->}}
</pre>
</pre>
{{Doc/end}}

Revision as of 03:50, 9 March 2024

Usage

Create a field display to mimic spells, patterns, or movements. Uses branch templates Template:DoEPlayfield/Entity and Template:DoEPlayfield/Highlight.

{{DoEPlayfield|<!--
-->{{DoEPlayfield/Highlight|y=2|x=6|color=gray}}<!--
-->{{DoEPlayfield/Entity   |y=2|x=2|image=Hero_Saffron.png}}<!--
-->}}

Template Parameters

{{DoEPlayfield|float=none|caption=Bottom text|
...
}}
  • unnamed parameter 1 Entities and Tile Highlights using Template:DoEPlayfield/Entity and Template:DoEPlayfield/Highlight. Order matters as elements placed higher display below other elements.
  • caption (Optional) Caption to display underneath the field display.
    • blanklines (Optional) Extra blank lines underneath the playfield. Literally extra "
      " characters. Value must be 1, 2, or 3 if used.
  • float (Optional) CSS float property. Useful to set as left so that you can have field displays side-by-side. (Default: none)
  • gray (Optional) Changes to a fully gray field instead of the default blue/red field if set to "yes". (Default: no)

Entity Parameters

...
{{DoEPlayfield/Entity|y=|x=2|image=Hero_Saffron.png}}
...
  • x The column to place the entity. (Default: 2)
  • y The row to place the entity. (Default: 2)
  • image Entity image aligned to the bottom center of the image. (Default: Hero_Saffron.png) See Category:Sprites for all the sprites uploaded.
  • opacity The entity opacity. Useful for conveying movement. (Default: 100%)
  • flatalign The Sprites are placed slightly above the bottom edge of the tile. Set this to "yes" to align it flat against the bottom of the tile. (Default: no)
  • offsetx or offsety The entity's x or y location in pixels, alinged to the bottom cemter of the image. Overwrites x or y parameter. Avoid using this unless the image doesn't line up on the tile. (Dimensions of box are 338px by 168px)
  • flip Flip the image along the x-axis if set to "yes". (Default: no)
  • rotate (Optional) Rotates the image 90 degrees clockwise if set to "cw", and 90 counter-clockwise if set to "ccw".
  • autoscale Sprites are scaled up x3 on the wiki as .pngs upslace poorly on Mediawiki. This simply scales images down to 1/3 to fit properly on the playfields. Keeps image size if set to "no". (Default: yes)

Highlight Parameters

...
{{DoEPlayfield/Highlight|y=|x=2|color=gray}}
...
  • x The column to place the entity. (Default: 2)
  • y The row to place the entity. (Default: 2)
  • opacity Highlight opacity. Useful for showing moving attacks. (Default: 1.0)
  • type Sets the tile color and effect to a preset.
Argument HTML/Hex Color Sprite
enemyattack #5d5e09 none
-
flame
fire
salmon File:Tile Fire.png
File:Tile Fire.png
blast none File:Tile_Blast.png
- File:Tile Blast.png
break #25344b File:Tile_Broken.png
File:Tile Broken.png
crack none File:Tile_Cracked.png
- File:Tile Cracked.png
warning none File:Tile_Warning_Attack.png
- File:Tile Warning Attack.png
warning3 none File:Tile_Warning_Attack3.png
- File:Tile Warning Attack3.png
warning break none File:Tile_Warning_Break.png
- File:Tile Warning Break.png
warning heal none File:Tile_Warning_Heal.png
- File:Tile Warning Heal.png
warning note none File:Tile_Warning_Note.png
- File:Tile Warning Note.png
warning shield none File:Tile_Warning_Shield.png
- File:Tile Warning Shield.png
default value gray none
- -
none none none
- -

Presets

Instead of filling out code manually for basic spells, you can use a preset.

Template:DoEPlayfield/Preset 4 Tile
Template:DoEPlayfield/Preset Straight
Template:DoEPlayfield/Preset Straight Pierce
Template:DoEPlayfield/Preset Straight Laser

Preset Parameters

  • caption The caption can be changed, but each has their own default.
  • float As without the preset, float CSS. (Default: none)
  • user The user of the spell on the left. (Default: Hero_Saffron.png)
  • target The target of the spell on the right. (Default: Structure_Debris.png OR empty)

Template Shortcuts

Examples

Basic Example

Found on any 4 tile target spell page, like Template:Spells. Use Template:DoEPlayfield/Preset 4 Tile if possible.

Source:

{{DoEPlayfield|
{{DoEPlayfield/Highlight|x=6|y=2|color=gray}}
{{DoEPlayfield/Entity   |x=2|y=2|image=Hero_Saffron.png}}
}}

Full Example

From Gate#Strategy page using a lot of parameters.

Source: (Note: This page uses comments to organize on the original page and prevent line breaks due to list formatting. Without them the code breaks.)

{{DoEPlayfield|<!--
-->{{DoEPlayfield/Entity|offsetx=330px|offsety=270px|image=Boss Gate.png}}<!--
-->{{DoEPlayfield/Highlight|y=2|x=2|color=DarkKhaki|opacity=0.5|8}}<!--
-->{{DoEPlayfield/Highlight|y=3|x=2|color=DarkKhaki|opacity=0.6|6}}<!--
-->{{DoEPlayfield/Highlight|y=3|x=3|color=DarkKhaki|opacity=0.7|6}}<!--
-->{{DoEPlayfield/Highlight|y=3|x=4|color=DarkKhaki|opacity=0.8|2}}<!--
-->{{DoEPlayfield/Highlight|y=2|x=4|color=DarkKhaki|opacity=0.9|2}}<!--
-->{{DoEPlayfield/Highlight|y=1|x=4|color=DarkKhaki|opacity=1.0}}<!--
--><!--
-->{{DoEPlayfield/Entity   |y=2|x=2|opacity=0.30}}<!--
-->{{DoEPlayfield/Entity   |y=3|x=2|opacity=0.35}}<!--
-->{{DoEPlayfield/Entity   |y=3|x=3|opacity=0.40}}<!--
-->{{DoEPlayfield/Entity   |y=3|x=4|opacity=0.45}}<!--
-->{{DoEPlayfield/Entity   |y=2|x=4|opacity=0.50}}<!--
-->{{DoEPlayfield/Entity   |y=1|x=4|opacity=0.55}}<!--
-->{{DoEPlayfield/Entity   |y=1|x=3|opacity=1.00}}<!--
-->}}