Skip to main content

Overview

The Melee20Button mode implements the standard B0XX-style 20-button layout for Super Smash Bros. Melee. It features comprehensive modifier support for precise analog inputs, Up-B angles, shield angles, and advanced techniques like ledgedash SOCD override.

Constructor

Melee20Button()
Creates a new Melee20Button mode instance with default settings.
return
Melee20Button
A new mode instance ready for configuration

Configuration

SetConfig

void SetConfig(GameModeConfig &config, const MeleeOptions options)
Configures the mode with game-specific settings and options.
config
GameModeConfig&
required
Base configuration including SOCD pairs and button remapping
options
MeleeOptions
required
Melee-specific configuration options

MeleeOptions

The MeleeOptions struct configures mode-specific behavior:
crouch_walk_os
bool
default:"false"
Enable crouch walk option select for Q3/Q4 diagonals (7000, 6875 coordinates)
disable_ledgedash_socd_override
bool
default:"false"
Disable horizontal SOCD override for ledgedash maximum jump trajectory
has_custom_airdodge
bool
default:"false"
Enable custom airdodge angle instead of B0XX standard (51, 30)
custom_airdodge.x
uint8_t
Custom X-axis coordinate for MX + diagonal + shield (0-100)
custom_airdodge.y
uint8_t
Custom Y-axis coordinate for MX + diagonal + shield (0-100)

Button Layout

Digital Outputs

Action Buttons

  • A: RT1
  • B: RF1
  • X: RF2
  • Y: RF6
  • L: LF4 (or Nunchuk Z when connected)
  • R: RF3
  • Z: RF5
  • 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
  • Lightshield: RF7 (49 analog)
  • Midshield: RF8 (94 analog)

D-Pad Layer

Activate by holding Mod X + Mod Y or Nunchuk C:
  • 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.

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 Diagonal + Shield(56, 55)7000, 6875Shield drop angle

Special Features

SOCD Configuration

Melee20Button 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 simultaneously) and no vertical direction is held:
  • Overrides all X-axis modifiers
  • Sets X coordinate to 128 ± 80 (10000 units)
  • Enables maximum jump trajectory for ledgedash
  • Can be disabled via disable_ledgedash_socd_override option

Angled F-Smash

With Mod X + C-Left/Right + Up/Down:
  • C-stick: (68, 42) = 8500, 5250
  • Left stick uses Y-axis direction

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

Turnaround Neutral-B Nerf

With Mod Y + B + Left/Right:
  • Coordinates: 128 ± 80 (10000 units)
  • Prevents unwanted turnarounds

Analog Triggers

Trigger Values

TriggerDigital ValueAnalog Value
L Digital140140 when pressed
R Digital140140 when pressed
Lightshield (RF7)-49
Midshield (RF8)-94

Nunchuk Support

When a Wii Nunchuk is connected:
  • Z button → L trigger
  • C button → D-Pad layer activation
  • Analog stick → Overrides left stick completely

Example Usage

#include "modes/Melee20Button.hpp"

// Create mode instance
Melee20Button melee_mode;

// Configure with options
GameModeConfig config = {
    .mode_id = MODE_MELEE,
    .socd_pairs_count = 4,
    .socd_pairs = {
        SocdPair { .button_dir1 = BTN_LF3, .button_dir2 = BTN_LF1, .socd_type = SOCD_2IP_NO_REAC },
        SocdPair { .button_dir1 = BTN_LF2, .button_dir2 = BTN_RF4, .socd_type = SOCD_2IP_NO_REAC },
        SocdPair { .button_dir1 = BTN_RT3, .button_dir2 = BTN_RT5, .socd_type = SOCD_2IP_NO_REAC },
        SocdPair { .button_dir1 = BTN_RT2, .button_dir2 = BTN_RT4, .socd_type = SOCD_2IP_NO_REAC },
    },
};

MeleeOptions options = {
    .crouch_walk_os = false,
    .disable_ledgedash_socd_override = false,
    .has_custom_airdodge = true,
    .custom_airdodge = { .x = 52, .y = 31 }  // Custom 31° airdodge
};

melee_mode.SetConfig(config, options);
  • Melee18Button - 18-button variant without dedicated analog triggers
  • ProjectM - Project M/Project+ specific coordinates

Source Code

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

Build docs developers (and LLMs) love