Toggle Melee Stance

版本 v1.4.0·更新於 2026-07-19

Shared toggle melee stance module with tap/hold melee input, Fire-to-melee, and compatibility handling for external weapon switches.

模組介紹 作者原文

Toggle Melee Stance

A shared melee stance module and quality-of-life mod for SULFUR.

It changes melee from hold-to-use into a toggle stance, while keeping the original hold melee behavior available through tap / hold input.

This mod can be used by itself, and it is also used as the shared prerequisite melee stance module for The Dragonblade.

What This Mod Does

  • Press the game's melee action once to keep your melee weapon drawn.
  • Press the melee action again to sheathe it and return to your previous weapon.
  • Tap the melee key to toggle melee stance.
  • Hold the melee key to use the original melee behavior.
  • Optionally swap the tap and hold actions, so tap performs the quick melee and hold toggles the stance.
  • While melee stance is toggled on, press the normal Fire action to perform one melee attack.
  • While melee stance is toggled on, hold Aim / Alt Fire to use the vanilla alternative melee stance or block.
  • Lets you pick up items and use interactables while melee stance is active. The base game blocks all interaction while the basic melee is out, which the persistent stance would otherwise leave active the whole time.
  • Uses SULFUR's own input actions instead of hardcoded mouse buttons, so it should work with rebinding, controller, and Steam Deck layouts.
  • Keeps the original melee attack, parry, alternative stance, and weapon-specific behavior.
  • Fixes a visual issue where some melee weapons could briefly flash an attack animation on repeated draw by resetting the melee Animator to a safe cached equip state before sheathing.
  • Handles external weapon switches safely, so a weapon-randomizing mod switching you to a gun should not leave melee stance blocking Fire input.
  • Exposes a small public API that other mods can use to read the current toggle melee stance state.

What This Mod Does NOT Do

  • Does not change melee damage.
  • Does not change weapon durability.
  • Does not change enemy AI.
  • Does not edit save files.
  • Does not replace or rebalance melee weapons.
  • Does not add new melee moves such as dashes or thrust attacks.

Basic Controls

Tap Melee key

→ Toggle melee stance on / off

Hold Melee key

→ Use the original melee behavior

→ Release to perform the original melee attack

→ Return to the previous weapon

Fire

→ Perform one melee attack while melee stance is toggled on

Aim / Alt Fire

→ Keep vanilla alternative melee stance / block behavior

The mod does not hardcode F, mouse buttons, or controller buttons.

It uses the game's own input actions, so it should respect key rebinding and controller input better than raw key checks.

Shared Module Behavior

Starting from 1.2.0, Toggle Melee Stance is intended to be the shared stance foundation for other melee-focused mods.

The Dragonblade should no longer duplicate the same toggle melee patches internally. Instead, it should depend on this mod and read the stance state through the public API.

This avoids double-patching the same melee input methods and reduces the chance of both mods fighting over the same internal melee state.

Public API For Other Mods

The public API is exposed through:

ToggleMeleeStance.Plugin

Available methods:

IsRuntimeReady

IsMeleeStanceActive(object equipmentManager)

IsAttackInProgress(object equipmentManager)

IsSheatheAfterAttack(object equipmentManager)

IsMeleeChargeActive(object equipmentManager)

GetCurrentHoldableForExternal(object equipmentManager)

IsCurrentHoldableMeleeForExternal(object equipmentManager)

These are intended for mods such as The Dragonblade to check whether melee stance is active without patching the same melee input methods again.

Configuration

Config file:

BepInEx/config/kumo.sulfur.toggle_melee_stance.cfg

Default options:

[General]

EnableMod = true

[Melee]

FirePerformsMeleeAttack = true

ReChargeRetryInterval = 0.08

EnableTapHoldMeleeKey = true

SwapQuickMeleeAndEquipMelee = false

MeleeToggleTapThreshold = 0.13

[Visual]

ResetMeleeAnimatorBeforeSheathe = true

[Compatibility]

DisableWhenMeleeExpansionDetected

安裝與使用 安裝:按包內說明操作

  1. 解壓本站下載的壓縮包,先讀包內的 readme / 說明檔案。
  2. 多數模組依賴遊戲的模組載入器:常見做法是用社群模組管理器(如 r2modman)選中本遊戲安裝,由管理器自動處理載入器與依賴。
  3. 手動安裝時,把模組檔案放進遊戲目錄下對應的 Mod / plugins 資料夾。
  4. 啟動遊戲確認載入成功;帶「前置依賴」的模組需要把依賴一併安裝。

不同模組的安裝位置差異較大,包內說明是最可靠的依據。

前置依賴

下面這些內容需要先安裝,否則該模組不會生效:

BepInEx-BepInExPack

檔案與校驗

檔案名稱
Toggle_Melee_Stance-1.4.0.zip
檔案大小
85.6 KiB