Mercy Strike

Mercy Strike

Mercy Strike expands the idea into a fully dynamic system — foes can be knocked out in heat of the battle with chances scaling naturally by skill and situation.

[url=https://next.nexusmods.com/profile/hoskope][img]https://i.imgur.com/7vE0RtD.png[/img][/url]
[center][img]https://i.imgur.com/xR7MGGZ.png[/img]
[/center]
[center][/center]
[img]https://i.imgur.com/k7hwpkd.png[/img]
This is mod quite [color=#ff0000]experimental [/color]mod to say at least and there's still lot room to adjust, but i think it's [color=#00ff00]ready[/color] for testing.

I'm huge fan of dynamic mods, where you can feel the progression over the gameplay, like [url=https://www.nexusmods.com/kingdomcomedeliverance2/mods/3411]Sharpening Overhaul[/url] and [url=https://www.nexusmods.com/kingdomcomedeliverance2/mods/2359]Leechcraft[/url]. It's been on my table for one year, i've had breaks from KCD2 modding, but still lot of testing has gone into this. Be sure to read [b]Known Limitations [/b]so you know where you are stepping into and also [b]Testing - [/b]your help is needed.

[b]Mercy Strike[/b] brings the spirit of [b]Kingdom Come: Deliverance[/b]'s mercy strike back to [b]Kingdom Come: Deliverance II[/b] as a dynamic RPG system. A defeated enemy may collapse unconscious instead of dying outright, leaving Henry with the choice to spare them or use the game's normal mercy-kill interaction.

The outcome is shaped by Henry's [b][color=#e69138]Warfare [/color][/b]skill and the weapon in his hand. Experienced fighters become more likely to produce knockouts, while axes and maces receive a distinct advantage. Mercy Strike aims to make character growth and weapon choice visible in combat instead of adding a fixed random KO chance.

[b][size=4]The Unknown[/size][/b]
[b]Mercy Strike[/b] briefly applies the engine’s immortality flag [b]imm=1[/b] to let selected NPCs pass through a natural downed transition before the protection is removed. Extensive testing has found no evidence that this changes their individual statistics or behaviour, but the flag’s native implementation is not fully documented. Please report any unusual NPC behaviour.

[img]https://i.imgur.com/Ahf13zD.png[/img]
[b]Mercy Strike[/b] works with the game's combat systems rather than replacing them:

[list]
[][b]Warfare progression[/b]: Henry's Warfare skill steadily improves the chance of get ko'd enemy.[/]
[][b]Weapon identity[/b]: recognized axes and maces gain an additional knockout bonus.[/]
[][b]Natural falls[/b]: the engine performs the downed transition; the mod does not force a custom animation.[/]
[][b]Meaningful aftermath[/b]: unconscious NPCs remain alive and eligible for the vanilla [color=#cc0000][b]mercy-kill[/b][/color] interaction.[/]
[][b]Vanilla outcomes remain[/b]: NPCs that are not selected are left completely untouched.[/]
[][b]Optional configuration[/b]: Mod Configuration Menu and KCDUtils/LuaDB add in-game balancing and persistence without becoming requirements.[/]
[/list]
[b][u]Experimental[/u][/b]: The core natural-down, finisher, lifecycle, and cleanup systems have been proven through extensive testing, but this remains[b][color=#e69138] an ambitious engine-driven mod[/color][/b]. [color=#f4cccc]Please read the [b]known limitations[/b] and report unusual animation timing or NPC behavior.[/color]



[center][img]https://i.imgur.com/kZ1z9pe.gif[/img]
Master Strike? Cute Bro.[/center]
[center][/center]

[img]https://i.imgur.com/foAmMVb.png[/img]
[b]Mercy Strike[/b] uses one authoritative chance roll for each eligible NPC during a combat encounter. It is not a per-hit lottery, and changing weapons afterward does not reroll that NPC.

With the default settings:

[list]
[]Base Mercy Strike chance is 5%.[/]
[]Warfare adds up to +15 percentage points at level 30.[/]
[]A recognized axe or mace adds +15 percentage points.[/]
[]Bonuses are additive and the final chance is capped at 100%.[/]
[/list]
Mercy Strike chance = 5% + Warfare contribution + heavy-weapon bonus
Warfare contribution = Warfare level / 30 x 15%
Heavy-weapon bonus = +15% with a recognized axe or mace

[code]| Henry's equipment and skill | Final chance |
|:----------------------------:|:------------:|
| Sword or other weapon, Warfare 0 | 5% |
| Sword or other weapon, Warfare 6 | 8% |
| Sword or other weapon, Warfare 30 | 20% |
| Axe or mace, Warfare 0 | 20% |
| Axe or mace, Warfare 6 | 23% |
| Axe or mace, Warfare 30 | 35% |[/code]
This keeps knockouts uncommon early in the game while allowing Henry's combat experience to matter. Heavy weapons begin with a meaningful advantage and retain it throughout progression. Unknown modded weapon IDs remain neutral rather than being guessed from their names.

[img]https://i.imgur.com/eIlshTp.png[/img]

[list]
[]An NPC can die normally if a lethal hit reaches zero HP before Mercy Strike has selected and armed that NPC. This includes an opening attack that starts combat and kills immediately, or a first qualifying observed damage transition that is already lethal. Several rapid attacks can also land before the combat detector acquires the encounter; visible hits are not necessarily observed HP transitions.[/]
[]Mercy Strike intentionally does not run a permanent fast pre-combat poller or broadly pre-arm nearby NPCs. This protects performance and avoids modifying civilians without reliable combat evidence.[/]
[]Occasionally, the unconscious-state transition does not align perfectly with the NPC's animation. An NPC may become unconscious while still standing or midway through a fall, producing an unintentionally funny result. This is a visual timing issue; the knockout itself may still succeed normally.[/]
[]Modded heavy weapons with new UUIDs remain neutral unless their add-onregisters the UUID with Mercy Strike's classifier.[/]
[/list]
[center][img]https://i.imgur.com/rtatyBg.gif[/img]
Sometimes you can end up hilarious ko's.[/center]


[img]https://i.imgur.com/tqjA4XY.png[/img]
If you really want to know, grab a beer and sit down..
[spoiler]
[b]Combat candidate detection[/b]

The mod uses a lightweight world detector while idle and a faster bounded scan while combat is active. A nearby human NPC must show a sufficiently large HP drop at close range before becoming a candidate.

[b]One decision per encounter[/b]

Each candidate receives one authoritative probability roll for the current combat encounter. Only a selected candidate can receive Mercy Strike's temporary protection. Rejected candidates are not modified by fallback logic.

This decision includes Warfare scaling, the equipped heavy-weapon modifier, and user configuration.

[b]Natural-down transition[/b]

A selected candidate receives temporary immortality before a later lethal transition. This allows the game engine to process a natural-looking fall without immediately turning the NPC into a corpse.

Mercy Strike observes the transition instead of forcing a custom fall
animation.

[b]Unconscious state and immortality release[/b]

After the engine reports that the NPC is down, Mercy Strike:

[list=1]
[]Secures the unconscious state.[/]
[]Stabilizes the NPC's health.[/]
[]Removes temporary immortality.[/]
[]Verifies that the NPC remains alive and unconscious.[/]
[/list]
Immortality release uses bounded retries and cleanup paths. Reloading,
abandoning combat, failed state reads, and conscious wounded NPCs all have
terminal cleanup behavior.

[b]MercyGuard and finishers[/b]

After immortality is removed, a short-range MercyGuard protects the
unconscious NPC from delayed bleeding without blocking the vanilla finisher.
It uses a low health trigger with hysteresis rather than continuously writing
health.

MercyGuard stops when the NPC:
[list]
[]Is finished or dies.[/]
[]Is no longer unconscious.[/]
[]Remains outside the configured range and grace period.[/]
[]Becomes unavailable.[/]
[/list]
Its fast timer stops automatically when no guarded NPCs remain.

[b]Lifecycle and performance[/b]

Gameplay and save-session restarts use generation-based lifecycle handling.
Old callbacks are invalidated, active temporary immortality is cleaned up, and
the world detector starts with fresh state.

The current polling layers are:

[list]
[]Slow world detection while idle.[/]
[]Combat scanning only during combat.[/]
[]Transition monitoring only while selected NPCs are armed or releasing.[/]
[]MercyGuard monitoring only while released unconscious NPCs need protection.[/]
[/list][/spoiler]
[img]https://i.imgur.com/dwec7wD.png[/img]
The four player-facing RPG values can all be adjusted. The equipped right-hand weapon is captured when the candidate receives its decision, so switching weapons afterward does not alter or repeat the roll.

[img]https://i.imgur.com/CBKzy0G.png[/img]

Changes apply to new candidate decisions. With KCDUtils/LuaDB available, the complete validated record is saved globally in the mercystrike namespace. Missing or invalid fields fall back independently to [b]MS_Config.lua[/b].

Combat acquisition thresholds, polling intervals, temporary protection, health stabilization, release timing, and MercyGuard remain internal safety settings and are intentionally not exposed to users.

Logging is split into compact core, verbose development, and optional integration channels. Core state decisions remain visible by default, while poller lifecycle, candidate observations, release detail, health clamps, and acquisition probes are quiet. LuaDB and Mod Menu messages use the integration channel. Errors and the result of a manually requested console probe are always visible. [b]#ms_debug_on()[/b] enables verbose and acquisition diagnostics for the current session; [b]#ms_debug_off()[/b] restores the compact view.

[b]KCD2[/b]'s runtime item table exposes an equipped item's UUID and database name, but not its XML weapon class. Mercy Strike therefore indexes the shipped Class 3 (axe) and Class 5 (mace) UUIDs from the game item tables. The right-hand weapon is read once when the candidate receives its authoritative probability decision; switching weapons afterward does not reroll that NPC.

Unknown IDs remain neutral, preserving compatibility without guessing from item names. Add-ons can register new heavy weapon UUIDs through MercyStrike.WeaponClassifier.RegisterHeavyWeapon. LuaUtils is not required; the classifier and chance calculation use the base Lua API. Automatic verbose weapon logging is disabled, while the bounded manual snapshot remains available through [b]#ms_probe_weapon()[/b].

Development console helpers are explicit and never run automatically:

[code]#ms_help()            List every Mercy Strike console command
#ms_deps()            Show dependency and active settings status
#ms_dev_ko_stress_on() Select every acquired candidate and extend protection
#ms_dev_ko_stress_off() Restore the pre-test runtime settings
#ms_dev_give_mace()    Add one full-condition spiked bludgeon for testing
#ms_dev_give_axe()    Add one full-condition work axe for testing
#ms_dev_show_chance()  Show the equipped weapon and current chance breakdown[/code]
KO stress mode is session-only: it selects every acquired candidate, extends the transition timeout to five minutes, and enables focused diagnostics. It does not write LuaDB or change release defaults. First-hit lethal attacks can still occur before candidate acquisition. Enable it before combat and disable it after the encounter.

The two give commands intentionally modify Henry's inventory and are intended only for controlled development saves.

[center][/center]
[center][/center]
[center][/center]
[center][color=#e69138][size=4][b]Default Settings[/b][/size][/color][/center]
[center][/center]
[center]Mercy Strike works fully without optional dependencies. If Mod Configuration Menu and KCDUtils/LuaDB are not installed, the mod uses these built-in defaults: [/center]
[center][/center]
[center][spoiler]

Mercy Strike uses deliberately restrained defaults:

- Base Mercy Strike chance: 5%
- Warfare scaling: enabled
- Warfare bonus at level 30: +15 percentage points
- Recognized axe or mace bonus: +15 percentage points

The chance is rolled once for each eligible NPC during a combat encounter—not once per hit. Bonuses are additive.

[code]| Equipment and skill | Final chance |
|---|---:|
| Sword, Warfare 0 | 5% |
| Sword, Warfare 6 | 8% |
| Sword, Warfare 30 | 20% |
| Axe or mace, Warfare 0 | 20% |
| Axe or mace, Warfare 30 | 35% |[/code]

This keeps Mercy Strikes uncommon with swords while giving heavy weapons a clear identity and allowing the chance to grow naturally with Henry’s combat experience. These values can be adjusted through Mod Configuration Menu.[/spoiler]
[/center]
[center][/center]

[img]https://i.imgur.com/qAVpJ3l.png[/img]
[list]
[]BigDip(TM) i might bring this feature back, where if you happen to take good chunk of health with heavy weapon it's a good night.[/]
[/list]
[img]https://i.imgur.com/h7QjUN9.png[/img]
[url=https://www.nexusmods.com/kingdomcomedeliverance2/users/35530515]Destuur1[/url] for [url=https://www.nexusmods.com/kingdomcomedeliverance2/mods/2410]KCDUtils[/url] ([i]miss you bro[/i]), [url=https://www.nexusmods.com/kingdomcomedeliverance2/users/103490858]JerryYOJ[/url] for [url=https://www.nexusmods.com/kingdomcomedeliverance2/mods/3363]Mod Menu[/url] ([i]and for all the required deps[/i]), [url=https://www.nexusmods.com/kingdomcomedeliverance2/users/35662530]muyuanjin[/url] for [url=https://www.nexusmods.com/kingdomcomedeliverance2/mods/1523]LuaDB[/url] and KCD2 Modding Community

[img]https://i.imgur.com/pE08OPT.png[/img]
This mod works without dependencies, but all of my newer mods use the same optional framework stack. Once you have it installed, there is little to think about beyond keeping it updated. Please also give [url=https://www.nexusmods.com/kingdomcomedeliverance2/users/103490858]JerryYOJ[/url] an endorsement and some kudos—the amount of work he has put into this deserves recognition. Refer to the individual mod pages for installation instructions.

[list=1]
[]Install [url=https://www.nexusmods.com/kingdomcomedeliverance2/mods/1523]LuaDB[/url][/]
[]Install [url=https://www.nexusmods.com/kingdomcomedeliverance2/mods/2410]KCD Utils[/url][/]
[]Install [url=https://www.nexusmods.com/kingdomcomedeliverance2/mods/3332]KCSE[/url][/]
[]Install [url=https://www.nexusmods.com/kingdomcomedeliverance2/mods/3381]Address Library for KCSE[/url][/]
[]Install [url=https://www.nexusmods.com/kingdomcomedeliverance2/mods/3363]Mod Configuration Menu[/url][/]
[]Install [b]Mercy Strike [/b]manually to mod folder[/]
[/list]
[img]https://i.imgur.com/bY4FMYy.png[/img]
I have tested Mercy Strike extensively, but additional testing across different encounters, weapons, NPCs, and combat situations is extremely valuable. If you notice unusual behavior—such as an NPC becoming unconscious while still standing, transitioning midway through a fall, remaining immortal, dying unexpectedly, or having an unavailable finisher—please send me your kcd.log. Before reproducing the issue, enable detailed diagnostics through the in-game console:
[code]#ms_debug_on()[/code]After testing, restore compact logging with:
[code]#ms_debug_off()[/code]The log can be found here:
[code]KingdomComeDeliverance2\kcd.log[/code]When reporting an issue, please include:
[list]
[]The complete kcd.log from that game session[/]
[]What happened and what you expected[/]
[]The weapon you were using[/]
[]Whether the NPC fell naturally or became unconscious while standing[/]
[]Whether the mercy-kill interaction appeared and was available[/]
[]Whether Mod Configuration Menu and KCDUtils were installed[/]
[]A short video or screenshot, if possible[/]
[/list]For concentrated knockout testing, advanced testers can use:
[code]#ms_dev_ko_stress_on()[/code]This enables detailed diagnostics, selects every properly detected candidate, and extends the protection window for the current session. It does not change saved settings. Disable it afterward with:
[code]#ms_dev_ko_stress_off()[/code]Opening lethal attacks can still occur before Mercy Strike detects the NPC, even in stress mode.



[img]https://i.imgur.com/d0iBx4H.png[/img]
1.0.0 Initial release

[url=https://github.com/hoskonen/gravesense][/url][url=https://github.com/hoskonen/sharpeningoverhaul][/url][url=https://github.com/hoskonen/mercy-strike]Github[/url]
[left][/left]
[url=https://www.nexusmods.com/kingdomcomedeliverance2/mods/2008]
[img]https://i.imgur.com/SQAL1hH.jpeg[/img][/url]