Files
sacred_k/docs/todo.md
T
khallaandClaude Opus 5.5 cec2556fa3 Key bindings layer: skills on 1-7, weapon sets on F1-F7
Raw WM_KEYDOWN/WM_KEYUP are handled in both window procedures (the game
swaps 0x8110d0 and 0x8122a0 with SetWindowLong; 0x8110d0 is the in-game
one). Bound keys are swallowed and post the original hotkey's key event
to the kernel, so F-keys work and bindings are layout independent
([keys] in sacred_re.ini). Replaces the WASD hotkey remap and the digit
swap; W/A/S/D and the digit row no longer reach the game. Skill keys
still cast through the right mouse button. Enabled switches removed.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-15 00:11:55 +02:00

2.0 KiB

To do

Bug: skill "aura" effects are not drawn

Reported 2026-10-14: the aura effects of some skills are missing. Not investigated yet. Things to check first:

  • whether vanilla ([widescreen] Enabled=0) draws them, i.e. whether the widescreen or HUD patches cause it;
  • whether they are missing everywhere or only away from the screen centre; if the latter, a clip test still using 1024x768 bounds, like the creature clip (0x4c8/0x3c8) was;
  • effect objects (cObjectFX) in the object passes (cWorldView0::DrawObjects 0x62e580 / DrawObjects2 0x6300d0) and the light/effect list (+0xce14, 0x41b1xx).

Better pathfinder (mouse clicks and monsters)

Replace the game's pathfinding with a more reliable and efficient one, for click-to-move and for monster AI. What we know so far:

  • Walk orders are cEvent_creature command 4 with a ground target (+0x18/+0x1c), sent through cEngine::SendCreatureOrder (0x6170d0), which snaps the target to a walkable point (0x616b70) and hands it to cCreature::ReceiveOrder (0x52e400, vf18, ~6400 decompiled lines).
  • Far targets (~2000 world units) are rejected or followed badly.
  • Still to map: the path search itself, the sector/tile collision data it reads, and how monster AI issues its moves.

Key bindings moved for WASD movement (temporary)

W, A and S were game hotkeys. With WASD movement (src/mods/wasd.cpp) their actions moved to other keys for now; choose final bindings (and update the in-game texts/tooltips that name the old keys):

Key Action Temporary key (sacred_re.ini)
W action slot 3 (cEngine::UseActionSlot, like Q/E/R/B/Space) G ([keys] ActionSlot3)
A pick up items nearby (creature event 0x113) V ([keys] PickUp)
S save game window (UI_WND_SAVEGAME) K ([keys] SaveGame)
D unbound -

Globally bound letters (engine 0x618130, UI manager 0x757120): A B C E F H I L M N O P Q R S T W, Space, ^, digits. Individual windows may use more.