Skip to content

Screen-reader accessibility mod for Melatonin (MelonLoader) with localized narration and NVDA/Tolk support.

Notifications You must be signed in to change notification settings

VIPPotato/melatonin-access

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

115 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Melatonin Access

Screen-reader accessibility mod for Melatonin (MelonLoader).

What This Mod Adds

  • Spoken menu navigation and option state announcements.
  • Contextual tutorial/gameplay cue announcements in gameplay.
  • Score-mode start announcements when gameplay begins.
  • Tutorial/dialog and popup reading.
  • World map navigation support, including fast landmark teleport.
  • Full level editor accessibility narration (cursor, tools, advanced menu, timeline tabs).
  • Results and stage-end option announcements, including lock-state reasons.
  • Credits roll narration while entries scroll.
  • Localization for mod-generated messages across all game-supported languages.
  • Optional toggles for announcement groups via MelonPreferences.
  • A regression-check script for validating speech logs after playtests.

Navigation and Controls

  • Title/start screen:
    • Press Action (default Space) to begin.
    • Press language key (default Tab) to change language.
  • General menu navigation:
    • Move with Up/Down.
    • Confirm with Action (default Space).
    • Cancel/back with Cancel (default Esc).
  • Map navigation:
    • Keyboard: [ and ] jump to previous/next landmark.
    • Keyboard fallback: if Action is bound to brackets, use F9 (previous) and F10 (next).
    • Gamepad: Action Left / Action Right (commonly LB / RB) jump between landmarks.
    • Press F1 to hear map/chapter star summary (total stars collected and stars still needed to pass).
    • Open mode menu with Action, then choose mode with Up/Down and confirm with Action.
  • Results/stage-end menu:
    • Move with Up/Down.
    • Confirm with Action.

Example flow:

  • Use [ or ] to pick a nearby map landmark.
  • Press Up/Down to choose the mode.
  • Press Action to start.

Hotkeys

  • F2: Toggle contextual tutorial/gameplay cue announcements on/off (saved immediately to MelonPreferences).
  • F3: Toggle menu position announcements on/off (for example 1 of 4, saved immediately to MelonPreferences).
  • F1: On map scenes only, announce chapter/map star totals and how many more stars are needed to pass.
  • F11: Speak context help (What can I press here?) for the current screen.
  • F12: Toggle debug logging on/off.
    • State is persisted in MelonPreferences and restored on next launch.

Localization

Mod-generated announcements are localized to the same language selected in-game. Supported language set matches the game language menu:

  • English
  • Simplified Chinese
  • Traditional Chinese
  • Japanese
  • Korean
  • Vietnamese
  • French
  • German
  • Spanish
  • Portuguese

Optional Settings (MelonPreferences)

Settings are stored in UserData/MelonPreferences.cfg under category MelatoninAccess.

  • AnnounceMapHotspots (default true): map arrival and teleport destination/star lines.
  • AnnounceRhythmCues (default true): contextual tutorial/gameplay cues (action, direction, and hold/release guidance).
    • Note: the config key name is legacy (RhythmCues) but it controls contextual cues.
    • Can be toggled in-game with F2.
  • AnnounceMenuPositions (default true): menu position context (1 of N) across supported menus.
    • Can be toggled in-game with F3.
  • AnnounceTutorialDialog (default true): tutorial and dialog narration.
  • AnnounceCreditsRoll (default true): credits title and scrolling names.
  • DebugModeEnabled (default false): debug logging state used by F12.

Build

dotnet build MelatoninAccess.csproj

The project is configured to auto-copy MelatoninAccess.dll and the cutscene-ad data folder to your game Mods folder after build when ModsPath is valid in MelatoninAccess.csproj.

Release Package

Create release ZIP (mod + required screen-reader DLLs only):

pwsh -File .\scripts\Build-ReleasePackage.ps1 -Version "v1.1"

Package contents:

  • Mods/MelatoninAccess.dll
  • Mods/cutscene-ad/manifest.json
  • Mods/cutscene-ad/scripts/*.json
  • Tolk.dll
  • nvdaControllerClient32.dll
  • UserConfig/Loader.cfg (bundled from maintainer install; includes hidden-console setting)

The release ZIP intentionally excludes development docs/tools (for example changelog files and regression test scripts).

Install (Release ZIP - Recommended)

  1. Install MelonLoader for Melatonin:
  2. Download MelatoninAccess-v1.1.zip.
  3. Extract/copy all files from the ZIP into your Melatonin game folder (the folder with Melatonin.exe).
  4. Confirm these files exist:
    • <Melatonin folder>/Mods/MelatoninAccess.dll
    • <Melatonin folder>/Mods/cutscene-ad/manifest.json
    • <Melatonin folder>/Tolk.dll
    • <Melatonin folder>/nvdaControllerClient32.dll
    • <Melatonin folder>/UserConfig/Loader.cfg
  5. Start the game and confirm you hear the mod loaded announcement.

Important:

  • Tolk.dll and nvdaControllerClient32.dll must be in the main game folder, not in Mods.

GitHub Release Packaging

  • A GitHub Actions workflow builds and uploads the release ZIP automatically when a tag like v1.2 is pushed.
  • The uploaded ZIP uses the same layout as local packaging (Mods, UserConfig, root dependency DLLs, and Mods/cutscene-ad timing data).

Install (From Source Build)

  1. Build:
dotnet build MelatoninAccess.csproj
  1. If auto-copy is not configured, copy:
    • bin/Debug/net472/MelatoninAccess.dll to <Melatonin folder>/Mods/
    • cutscene-ad/ to <Melatonin folder>/Mods/cutscene-ad/
    • libs/x86/Tolk.dll to <Melatonin folder>/
    • libs/x86/nvdaControllerClient32.dll to <Melatonin folder>/

Support

If you like what I do, I would appreciate a coffee: https://buymeacoffee.com/potatophones

Thanks

  • Thanks to luyi for testing the mod and providing fixed Chinese localization strings.
  • Thanks to dreamburguer for providing fixed Spanish localization strings.

Speech Regression Check (After Playtest)

  1. Enable debug logs with F12 in-game.
  2. Playtest the areas you changed.
  3. Run:
pwsh -File .\scripts\Test-SpeechRegression.ps1

Useful options:

pwsh -File .\scripts\Test-SpeechRegression.ps1 -LogPath "D:\games\steam\steamapps\common\Melatonin\MelonLoader\Latest.log"
pwsh -File .\scripts\Test-SpeechRegression.ps1 -RequiredPattern "Tutorial\. Press .+ to skip\."

Localization QA Check

Validate that all Loc.cs keys have complete language coverage and matching placeholders:

pwsh -File .\scripts\Test-LocalizationQA.ps1

This check runs automatically during release packaging (scripts/Build-ReleasePackage.ps1) unless you pass -SkipLocalizationQa.

Cutscene AD Pipeline Check

Validate cutscene intro/outro timing script files:

pwsh -File .\scripts\Test-CutsceneAdPipeline.ps1

Strict/authoring options:

pwsh -File .\scripts\Test-CutsceneAdPipeline.ps1 -StrictCoverage -RequireEntries
pwsh -File .\scripts\Test-CutsceneAdPipeline.ps1 -ValidateLocKeys -LocPath .\Loc.cs

This check runs automatically during release packaging (scripts/Build-ReleasePackage.ps1) unless you pass -SkipCutsceneQa.

Reference format and workflow:

  • docs/cutscene-ad-pipeline.md

Unity Asset Extraction (CLI)

Extract Unity assets directly from Melatonin_Data using UnityPy:

python .\scripts\extract_unity_assets.py --output-dir .\artifacts\asset-extract

Useful options:

# Fast smoke test (export only a few assets per type)
python .\scripts\extract_unity_assets.py --output-dir .\artifacts\asset-extract-smoke --max-per-type 5

# Metadata only (no binary export)
python .\scripts\extract_unity_assets.py --output-dir .\artifacts\asset-index-only --metadata-only

# Include MonoBehaviour typetree exports (partial, build-dependent)
python .\scripts\extract_unity_assets.py --output-dir .\artifacts\asset-extract-mb --types AudioClip,AnimationClip,Sprite,Texture2D,TextAsset,MonoBehaviour

Outputs:

  • assets.jsonl: one record per indexed object (source file, type, path id, exported files, status).
  • summary.json: aggregate counts by type and source file.
  • errors.log: file-level load issues (if any).

Requirements

  • Melatonin (PC)
  • MelonLoader
  • Tolk screen reader bridge (Tolk.dll) available to the mod runtime

About

Screen-reader accessibility mod for Melatonin (MelonLoader) with localized narration and NVDA/Tolk support.

Resources

Stars

Watchers

Forks

Sponsor this project

  •  

Packages

 
 
 

Contributors