Files
alchemist-accessibility/accessibility/README.md
T
Accessibility ModandClaude Opus 5 81a209b600 tracker: sticky selection and Ctrl+Home walk-to; walltones: conventional volume
Tracker selection now survives a rescan. The scan is rebuilt every turn and
both lists are distance-sorted, so holding a bare index meant one step by the
player silently re-pointed the selection at a different rat. The tracker now
remembers identity instead -- the actor table for creatures, coordinates for
tiles -- and re-derives the indices in reanchor() after each rescan. Selection
is dropped only when the thing genuinely stops being reported (out of FoV,
killed, picked up), and the existing clamp then falls back to the nearest.

Ctrl+Home walks to the selection, reusing the exact shape of the game's own
click-to-path in ingame.mousepressed: calculatePathFromPlayer, then either
bufferInput or playerInput for a one-step path. Interruptions and threatened-
player truncation therefore behave the way a mouse click does. Most things
worth tracking stand on impassable tiles, which calculatePathFromPlayer refuses
outright, so we fall back to the cheapest of the 8 neighbours and say "next to"
rather than "to". Guarded on states.getCurrent() == "ingame": elsewhere the
input buffer belongs to another state and feeding it moves would be a bug.

Wall tones now follow the usual proximity convention -- a near wall is loud,
one out at radius is quiet. It was inverted, which read backwards in play since
a nearby wall is the more urgent fact. config.louderWhenFurther still flips it.

Testbed covers both: selection identity across a forced rescan, and that
Ctrl+Home moves the player without breaking out of the map.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-02 01:00:25 +02:00

133 lines
4.6 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# Accessibility mod — Sulphur Memories: Alchemist
Blind-accessibility mod adding screen-reader speech, an object tracker, tile
exploration and directional wall tones.
Speech goes through **Tolk**, so it uses your running screen reader (NVDA, JAWS,
System Access) and falls back to SAPI 5 if none is running.
## Running
```
"C:\Program Files\LOVE\love.exe" "D:\code\Sulphur Memories Alchemist 0.4.2 sanctified"
```
Use `lovec.exe` instead of `love.exe` to get a console window — every spoken line
is mirrored there, which is useful for reporting bugs.
The TTS libraries live in `accessibility/lib/` and are loaded by absolute path,
so nothing needs installing or copying into Program Files.
If speech does not work, check the console for the startup self-test:
```
[accessibility] TTS: available
[accessibility] speech channel: yes
```
`speech channel: NO` means Tolk loaded but found no screen reader and no SAPI.
---
## Keys added by the mod
All of these are **in addition to** the game's own controls, and none of them
replace a key the game uses.
### Reading the message log
| Key | Action |
|---|---|
| `[` | Previous message |
| `]` | Next message |
| `Shift+[` | Oldest message |
| `Shift+]` | Newest message (and resume following new messages) |
| `\` | Repeat the current message |
| `Shift+\` | Copy the current message to the clipboard |
New messages are spoken automatically. Pressing any key that does something in
the game cancels whatever is still queued, so you are never stuck listening to a
backlog. While you are moving through the history, new messages do **not** drag
the cursor away — press `Shift+]` to return to the newest.
### Looking around
| Key | Action |
|---|---|
| `/` | Scan all eight neighbouring tiles, clockwise from north |
| `;` | Where am I — area name, in-game date and time, coordinates |
| `Ctrl` + numpad `1`–`9` | Describe the tile in that direction without moving |
| `Ctrl` + numpad `5` | Describe the tile you are standing on |
The game's own examine mode (**`x`**) is also fully spoken: the arrow keys move a
cursor around the map and each tile is described with its distance and direction
from you. Press `f` in examine mode to jump between exits.
### Object tracker
Finds everything you have seen, sorted by distance.
| Key | Action |
|---|---|
| `Ctrl+PageUp` / `Ctrl+PageDown` | Previous / next **category** |
| `PageUp` / `PageDown` | Previous / next **kind** of thing in that category |
| `Shift+PageUp` / `Shift+PageDown` | Previous / next **instance** of that kind |
| `Home` | Distance, direction, and number of steps by path |
| `Ctrl+Home` | Walk to it |
Categories: Creatures, Items, Alchemy, Interactables, Exits, Terrain features.
So `Ctrl+PageDown` to reach "Creatures", `PageDown` to move between rat / beetle
/ guard, and `Shift+PageDown` to step through the individual rats. `Home` gives
you the walking distance, which indoors is often very different from the
straight-line distance.
`Ctrl+Home` does exactly what left-clicking the tile does with a mouse: it queues
a walk along the game's own path. If the thing itself cannot be stood on — a
creature, a chest, a bed — you walk to the nearest tile beside it instead, and
the announcement says "next to" rather than "to". As with a mouse click, the walk
stops early if something interrupts you, and while an enemy is in view the game
only ever commits one step at a time.
Your selection sticks. The list is rebuilt and re-sorted by distance every turn,
but the tracker follows the thing you picked rather than the slot it was in, so a
rat you are tracking stays selected as it moves around. It is only let go when it
genuinely stops being visible.
The tracker only ever reports things you have actually seen.
### Your character
| Key | Action |
|---|---|
| `'` | Health and active effects |
| `,` | Currently selected action |
You are also told automatically when you take damage or are healed.
### Wall tones
Each step you take, a tone sounds from the direction of any wall within five
tiles, positioned in 3D so you can hear where it is. Further walls are louder.
---
## Reporting problems
Run with `lovec.exe` and include the console output. Lines beginning `[speech]`
show exactly what was spoken and when:
- `[speech]!` — interrupted whatever was being said
- `[speech]*` — urgent alert, spoken immediately
- `[speech] ` — queued normally
If something is **silent that should not be**, that is the most useful thing to
report, together with the screen you were on and the key you pressed.
---
## For developers
See `accessibility/docs/` — start with `docs/README.md`, and read
`docs/scratch.md` first if you are picking the work up mid-stream.