Skip to main content

Overview

The Melee18Button mode implements an 18-button layout for Super Smash Bros. Melee without dedicated analog trigger buttons. Instead, it uses L/R button combinations with modifiers for lightshield and midshield, providing full shield control without additional buttons.

Constructor

Melee18Button(Melee18ButtonOptions options = {})
Creates a new Melee18Button mode instance.
options
Melee18ButtonOptions
default:"{}"
Configuration options for the mode. Defaults to all options disabled.
return
Melee18Button
A new mode instance ready for use

Configuration

Melee18ButtonOptions

The options struct configures mode-specific behavior:
typedef struct {
    bool crouch_walk_os = false;
} Melee18ButtonOptions;
crouch_walk_os
bool
default:"false"
Enable crouch walk option select for Q3/Q4 diagonals. When enabled, down-back and down-forward diagonals use coordinates (56, 55) instead of (56, 56) by default, matching shield drop angle (7000, 6875).

Button Layout

Digital Outputs

Action Buttons

  • A: RT1
  • B: RF1
  • X: RF2
  • Y: RF6
  • L: LF4 (or Nunchuk Z when connected)
  • R: RF5
  • Z: RF3
  • Start: MB1

Directional Inputs

Movement

  • Left: LF3
  • Right: LF1
  • Down: LF2
  • Up: RF4

C-Stick

  • C-Left: RT3
  • C-Right: RT5
  • C-Down: RT2
  • C-Up: RT4

Modifiers

Modifier Buttons

  • Mod X: LT1
  • Mod Y: LT2

D-Pad Layer

Activate by holding Mod X + Mod Y:
  • D-Up: RT4
  • D-Down: RT2
  • D-Left: RT3 (or MB3)
  • D-Right: RT5 (or MB2)
When the D-Pad layer is active, C-stick inputs are disabled.

Shield System

The 18-button layout uses a sophisticated shield system without dedicated analog trigger buttons:

Basic Shield

L Button (LF4)

  • Digital L trigger with automatic analog value 140
  • Overrides modifiers for wavedash consistency
  • Special shield tilt coordinates when combined with directions

Shield Modulation

  • Trigger: RF8 analog = 94 (digital off)
  • Diagonal: (51, 30) = 6375, 3750 (airdodge angle)
  • Provides medium shield coverage
Lightshield can also be activated with Nunchuk C button when connected.

L Button Coordinates

L + Directional Inputs

InputCoordinatesGame UnitsUsage
L + Left/Right128 ± 8010000Wavedash angle
L + Up/Down128 ± 8010000Full shield tilt
L + Up + Left/Right(43, 43)5375, 5375Angled shield
L + Down + Left/Right(57, 55)7125, 6875Shield drop angle

R Button Shield System

R Button (RF5)

The R button provides alternative shield angles:
InputCoordinatesGame UnitsUsage
R + Left/Right128 ± 516375Shield tilt
R + Up/Down128 ± 435375Vertical shield
R + Diagonal(43, Y)5375, YBase diagonal
R + MX + Diagonal(51, 30)6375, 3750Airdodge
R + MY + Diagonal(40, 68)5000, 8500High angle

Modifier Coordinates

Mod X (LT1)

InputCoordinatesGame UnitsUsage
MX + Left/Right128 ± 536625Horizontal tilt
MX + Up/Down128 ± 435375Vertical positioning

Mod Y (LT2)

InputCoordinatesGame UnitsUsage
MY + Left/Right128 ± 273375Slow walk
MY + Up/Down128 ± 597375High vertical

Default Coordinates

No Modifiers

InputCoordinatesGame UnitsUsage
Cardinal128 ± 8010000Max tilt
Q1/Q2 Diagonal(56, 56)7000, 7000Standard wavedash
Q3/Q4 with crouch_walk_os(56, 55)7000, 6875Shield drop default

Special Features

SOCD Configuration

Melee18Button requires 2IP No Reactivation for all directional pairs:
  • Left/Right (LF3/LF1)
  • Down/Up (LF2/RF4)
  • C-Left/C-Right (RT3/RT5)
  • C-Down/C-Up (RT2/RT4)

Ledgedash SOCD Override

When horizontal SOCD is detected (Left + Right pressed) and:
  • No vertical direction is held
  • R button is NOT pressed
Then X coordinate is set to 128 ± 80 (10000 units) for maximum ledgedash trajectory.
The ledgedash SOCD override is always enabled in Melee18Button mode and cannot be disabled.

C-Stick ASDI Slideoff

With diagonal C-stick input (any combination):
  • Coordinates: (42, 68) = 5250, 8500
  • Overrides other C-stick modifiers
  • Optimal for ASDI down slideoff

Nunchuk Support

When a Wii Nunchuk is connected:
  • Z button → L trigger (digital)
  • C button → Lightshield (analog 49)
  • Analog stick → Overrides left stick completely

Comparison with Melee20Button

  • Fewer buttons required (18 vs 20)
  • Manual shield modulation via L+MX/MY combinations
  • No extra trigger buttons needed
  • More flexible shield control without dedicated hardware

Example Usage

#include "modes/Melee18Button.hpp"

// Create mode with default options
Melee18Button melee_mode;

// Or with crouch walk option select enabled
Melee18ButtonOptions options = {
    .crouch_walk_os = true
};
Melee18Button melee_mode_cw(options);

// Mode is ready to use, no SetConfig call needed
// (inherits config from InputMode base)
  • Melee20Button - 20-button variant with dedicated analog triggers
  • ProjectM - Project M/Project+ specific coordinates

Source Code

  • Header: include/modes/Melee18Button.hpp
  • Implementation: src/modes/Melee18Button.cpp

Build docs developers (and LLMs) love