


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.
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.
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.
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.
Config file:
BepInEx/config/kumo.sulfur.toggle_melee_stance.cfg
Default options:
[General]
EnableMod = true
[Melee]
FirePerformsMeleeAttack = true
ReChargeRetryInterval = 0.08
EnableTapHoldMeleeKey = true
MeleeToggleTapThreshold = 0.13
[Visual]
ResetMeleeAnimatorBeforeSheathe = true
[Compatibility]
DisableWhenMeleeExpansionDetected = false
KeepMeleeStanceAfterExternalWeaponSwitch = false
[Debug]
LogStateChanges = false
EnableMod
Enables or disables the mod.
FirePerformsMeleeAttack
When enabled, pressing the normal Fire action while melee is toggled on performs one melee attack.
ReChargeRetryInterval
Controls how often the mod retries re-entering melee stance after the game clears the melee charge state.
EnableTapHoldMeleeKey
When enabled, tapping the melee key toggles melee stance, while holding the melee key passes through to the original melee behavior.
MeleeToggleTapThreshold
Maximum press duration treated as a tap.
Default:
MeleeToggleTapThreshold = 0.13
Lower values make hold behavior activate faster.
Higher values make tap behavior easier.
ResetMeleeAnimatorBeforeSheathe
Keeps repeated melee draws visually stable by resetting the melee Animator to a cached safe equip state before sheathing.
DisableWhenMeleeExpansionDetected
Deprecated.
Older versions used this to auto-disable Toggle Melee Stance when kumo.sulfur.melee_expansion was installed.
Starting from this version, The Dragonblade is expected to use Toggle Melee Stance as a prerequisite, so this option defaults to false and is no longer recommended.
KeepMeleeStanceAfterExternalWeaponSwitch
Controls behavior when another mod changes the current weapon while melee stance is toggled on.
false
→ Recommended default.
→ If another mod switches your weapon while melee stance is active, this mod exits stance when you try to fire.
→ This allows guns to shoot normally after an external weapon switch.
true
→ Tries to keep melee stance even after another mod switches your weapon.
→ This may conflict with weapon-randomizing mods.
LogStateChanges
Enables debug logging. Keep this disabled for normal gameplay.
Install through Thunderstore / r2modman if available.
SULFUR/BepInEx/plugins/ToggleMeleeStance.dll
This mod does not edit original game files.
It should be compatible with most mods. Compatibility issues are most likely with mods that also patch:
EquipmentManager.HandleMeleeInputEquipmentManager.HandleAimInputEquipmentManager.PullTriggerWeapon.ReportMeleeDoneThe Dragonblade 0.3.0+ is expected to use this mod as a prerequisite instead of duplicating the same melee stance patches.
Remove the DLL from:
BepInEx/plugins/
Optional: remove the config file:
BepInEx/config/kumo.sulfur.toggle_melee_stance.cfg
kumo.sulfur.melee_expansion is installed.MeleeToggleTapThreshold from 0.22 to 0.13 for faster hold-melee passthrough.This mod includes localization files for SULFUR Config.
This localization support is only for the in-game configuration page provided by SULFUR Config. It localizes the mod name, config sections, setting names, and setting descriptions shown in the config UI.
It does not change the game’s own text, item names, dialogue, or gameplay content.
Supported SULFUR Config languages: