Summary
Calling confirm_selection on the enchant card-selection screen (NDeckEnchantSelectScreen) returns
{"status": "ok"} but the screen never closes. The game does not process the confirmation.
select_card works correctly on this screen (visual selection toggles as expected); only the confirm
step fails.
Steps to reproduce
- Obtain a Kifuda relic, Gnarled Hammer relic, or Beautiful Bracelet relic that triggers an enchant
selection screen.
- Call select_card with a valid card index — the card is visually highlighted in-game. ✅
- Call confirm_selection — the API returns {"status": "ok", "message": "Confirming selection"}. ❌
- Poll the game state — state_type is still card_select, screen_type is still
NDeckEnchantSelectScreen. The screen has not closed.
Expected behavior
confirm_selection closes the enchant screen and applies the enchant, matching the behavior when a
player physically clicks the checkmark button.
Actual behavior
The API returns ok but the screen remains open indefinitely. Repeated calls have no effect. The only
way to close the screen is via physical mouse input (e.g. pyautogui.click at the checkmark's screen
coordinates).
Source code note
ExecuteConfirmSelection() in McpMod.Actions.cs contains a fallback at lines ~702-716 with the
comment:
// Fallback: find ANY enabled NConfirmButton in the screen tree.
// Covers NCardGridSelectionScreen subclasses (like NDeckEnchantSelectScreen)
// whose confirm button isn't in any of the known container paths above.
var allConfirmButtons = FindAll(screen);
foreach (var btn in allConfirmButtons)
{
if (btn.IsEnabled && btn.IsVisibleInTree())
{
btn.ForceClick();
return ...ok...
}
}
The fallback does find the button (it returns ok rather than the "no confirm button is currently
enabled" error), so btn.IsEnabled && btn.IsVisibleInTree() is true. The problem is that ForceClick()
on that button does not trigger the game's enchant confirmation logic for this screen type.
Environment
- STS2 Early Access (current version as of 2026-07)
- STS2MCP mod (current main branch)
- Single-player run, Ironclad character
- Screen appears mid-run from Kifuda triple-enchant trigger
Workaround
Physically clicking the checkmark button at approximately (94.5%, 76%) of the game window rect works
correctly. We are using pyautogui as a workaround on our end until this is fixed in the mod.
Summary
Calling confirm_selection on the enchant card-selection screen (NDeckEnchantSelectScreen) returns
{"status": "ok"} but the screen never closes. The game does not process the confirmation.
select_card works correctly on this screen (visual selection toggles as expected); only the confirm
step fails.
Steps to reproduce
selection screen.
NDeckEnchantSelectScreen. The screen has not closed.
Expected behavior
confirm_selection closes the enchant screen and applies the enchant, matching the behavior when a
player physically clicks the checkmark button.
Actual behavior
The API returns ok but the screen remains open indefinitely. Repeated calls have no effect. The only
way to close the screen is via physical mouse input (e.g. pyautogui.click at the checkmark's screen
coordinates).
Source code note
ExecuteConfirmSelection() in McpMod.Actions.cs contains a fallback at lines ~702-716 with the
comment:
// Fallback: find ANY enabled NConfirmButton in the screen tree.
// Covers NCardGridSelectionScreen subclasses (like NDeckEnchantSelectScreen)
// whose confirm button isn't in any of the known container paths above.
var allConfirmButtons = FindAll(screen);
foreach (var btn in allConfirmButtons)
{
if (btn.IsEnabled && btn.IsVisibleInTree())
{
btn.ForceClick();
return ...ok...
}
}
The fallback does find the button (it returns ok rather than the "no confirm button is currently
enabled" error), so btn.IsEnabled && btn.IsVisibleInTree() is true. The problem is that ForceClick()
on that button does not trigger the game's enchant confirmation logic for this screen type.
Environment
Workaround
Physically clicking the checkmark button at approximately (94.5%, 76%) of the game window rect works
correctly. We are using pyautogui as a workaround on our end until this is fixed in the mod.