Template:Battle: Difference between revisions

From Paper Mario: TTYD Speedrun Wiki
Jump to navigation Jump to search
m Protected "Template:Battle": High traffic page ([Edit=Allow only administrators] (indefinite) [Move=Allow only administrators] (indefinite))
 
(10 intermediate revisions by the same user not shown)
Line 1: Line 1:
<includeonly>{| class="mw-collapsible {{#ifeq:{{{col|}}}|true|mw-collapsed|}}"cellpadding="3" style="margin-left:1%; white-space:nowrap; width:{{{width|69}}}%; max-width:100%; background-color:#E8F8FF; border-radius:7px"
<includeonly>{| class="mw-collapsible {{#ifeq:{{{col|}}}|true|mw-collapsed|}}"cellpadding="3" style="margin-left:{{{margin|1}}}%; white-space:nowrap; width:{{{width|69}}}%; max-width:100%; background-color:#E8F8FF; border-radius:7px"
| colspan=3 style="border-radius: 7px; background-color:#C2E8FF; border:2px solid #E8F8FF" | '''{{{1}}}'''
| colspan=3 style="border-radius: 7px; background-color:#C2E8FF; border:2px solid #E8F8FF" | '''{{{1}}}'''
|-
|-
Line 11: Line 11:
{{BattleLine|Spiky Goomba|Superguard}}
{{BattleLine|Spiky Goomba|Superguard}}
{{BattleLine|Mario|Failed Hammer|full hammer if missed superguard}}
{{BattleLine|Mario|Failed Hammer|full hammer if missed superguard}}
{{BattleLine|Level Up|'''BP &rarr; 6'''}}
}}</pre>
}}</pre>


Line 18: Line 19:
{{BattleLine|Spiky Goomba|Superguard}}
{{BattleLine|Spiky Goomba|Superguard}}
{{BattleLine|Mario|Failed Hammer|full hammer if missed superguard}}
{{BattleLine|Mario|Failed Hammer|full hammer if missed superguard}}
{{BattleLine|Level Up|'''BP &rarr; 6'''}}
}}
The following BattleLine first parameters have custom colored backgrounds:
*Mario
*Goombella
*Koops
*Flurrie
*Yoshi
*Vivian
*Bobbery
*Ms. Mowz
*Partner
*Level Up
*Note (see below)
All other entries will appear with a blue bubble (use this for the enemy).
=== Notes ===
You can add a note to the battle by setting the first parameter of BattleLine to '''Note'''.
<pre>{{Battle|Hooktail|
{{BattleLine|Mario|Power Bounce x21}}
{{BattleLine|Note|''Pick the top option (Mario takes 5 HP damage)''}}
{{BattleLine|Mario|Power Bounce x10}}
}}</pre>
{{Battle|Hooktail|
{{BattleLine|Mario|Power Bounce x21}}
{{BattleLine|Note|''Pick the top option (Mario takes 5 HP damage)''}}
{{BattleLine|Mario|Power Bounce x10}}
}}
=== Auto-collapse ===
If you add '''col=true''' as a parameter in the Battle template, the table will be collapsed by default. This is useful if you want to list multiple battle strategies without taking up a lot of the page.
<pre>{{Battle|Blue Slime|col=true|
{{BattleLine|Note|''This battle table is collapsed by default''}}
}}
{{Battle|Sephiroth|col=true|
{{BattleLine|Note|''This one is too''}}
}}
{{Battle|Shining Pom|col=true|
{{BattleLine|Note|''You can really fit a lot of battles...''}}
}}
{{Battle|Shadow Teddie|col=true|
{{BattleLine|Note|''...on the page when they're collapsed''}}
}}</pre>
{{Battle|Blue Slime|col=true|
{{BattleLine|Note|''This battle table is collapsed by default''}}
}}
{{Battle|Sephiroth|col=true|
{{BattleLine|Note|''This one is too''}}
}}
{{Battle|Shining Pom|col=true|
{{BattleLine|Note|''You can really fit a lot of battles...''}}
}}
{{Battle|Shadow Teddie|col=true|
{{BattleLine|Note|''...on the page when they're collapsed''}}
}}
=== Other Parameters ===
You can adjust the default width and left margin for unique use cases using '''width''' and '''margin'''. These values are percentages of the page width.
The default values are width=69 and margin=1, so the template terminates 70% of the way across the page (assuming its content doesn't force it to expand beyond that).
<pre>{{Battle|Goomba|width=30|margin=0|
{{BattleLine|Mario|Jump x2}}
}}</pre>
{{Battle|Goomba|width=30|margin=0|
{{BattleLine|Mario|Jump x2}}
}}
}}
</noinclude>
</noinclude>

Latest revision as of 14:30, 16 November 2026

This template is a wrapper for Template:BattleLine to create battle scripts for routes. Here's an example of how it's implemented:

{{Battle|Goomba Trio|
{{BattleLine|Mario|Jump x2 on the Goomba}}
{{BattleLine|Goombella|Headbonk x2 on the Paragoomba|right 1}}
{{BattleLine|Spiky Goomba|Superguard}}
{{BattleLine|Mario|Failed Hammer|full hammer if missed superguard}}
{{BattleLine|Level Up|'''BP → 6'''}}
}}
Goomba Trio
Mario Jump x2 on the Goomba
Goombella Headbonk x2 on the Paragoomba right 1
Spiky Goomba Superguard
Mario Failed Hammer full hammer if missed superguard
Level Up BP → 6


The following BattleLine first parameters have custom colored backgrounds:

  • Mario
  • Goombella
  • Koops
  • Flurrie
  • Yoshi
  • Vivian
  • Bobbery
  • Ms. Mowz
  • Partner
  • Level Up
  • Note (see below)

All other entries will appear with a blue bubble (use this for the enemy).

Notes

You can add a note to the battle by setting the first parameter of BattleLine to Note.

{{Battle|Hooktail|
{{BattleLine|Mario|Power Bounce x21}}
{{BattleLine|Note|''Pick the top option (Mario takes 5 HP damage)''}}
{{BattleLine|Mario|Power Bounce x10}}
}}
Hooktail
Mario Power Bounce x21
Pick the top option (Mario takes 5 HP damage)
Mario Power Bounce x10

Auto-collapse

If you add col=true as a parameter in the Battle template, the table will be collapsed by default. This is useful if you want to list multiple battle strategies without taking up a lot of the page.

{{Battle|Blue Slime|col=true|
{{BattleLine|Note|''This battle table is collapsed by default''}}
}}
{{Battle|Sephiroth|col=true|
{{BattleLine|Note|''This one is too''}}
}}
{{Battle|Shining Pom|col=true|
{{BattleLine|Note|''You can really fit a lot of battles...''}}
}}
{{Battle|Shadow Teddie|col=true|
{{BattleLine|Note|''...on the page when they're collapsed''}}
}}
Blue Slime
This battle table is collapsed by default
Sephiroth
This one is too
Shining Pom
You can really fit a lot of battles...
Shadow Teddie
...on the page when they're collapsed

Other Parameters

You can adjust the default width and left margin for unique use cases using width and margin. These values are percentages of the page width.

The default values are width=69 and margin=1, so the template terminates 70% of the way across the page (assuming its content doesn't force it to expand beyond that).

{{Battle|Goomba|width=30|margin=0|
{{BattleLine|Mario|Jump x2}}
}}
Goomba
Mario Jump x2