ADOFAIMacro
A UnityModManager (UMM) Mod for A Dance of Fire and Ice that provides more stable, adjustable, and filterable auto-input capabilities, covering scenarios from "direct judgment triggering" to "system-level key simulation".
Features
- Auto-trigger: parses chart floor timestamps, sends keys with high-precision timing on a worker thread
- Trigger modes:
- Judgment trigger (
SimulateKeyPress = false): worker thread counts → main threadcontroller.Hit() - Key simulation (
SimulateKeyPress = true): worker thread callsSendKey()to simulate system-level key input
- Judgment trigger (
- Macro key modes:
- Simple rotation (
EnableTechniqueSimulation = false):MacroKeyslist cycles, with_pendingKeyanti-overlap - Technique simulation (
EnableTechniqueSimulation = true): left/right hand alternation, configurable keys and order, BPM slicing, long-press handling, same-key correction
- Simple rotation (
- Per-level technique config: save independent technique parameters per level, auto-load on entry; supports per-floor interval overrides
- Time offset fine-tuning: millisecond-level offset, real-time adjustment with
Ctrl + Left/Right/Left/Rightin-game - Key filter system: blacklist/whitelist mode, sync (KeyCode bitmap) and async (VK code array) independent filtering
- SkyHook async input:
NtUserInjectKeyboardand other low-level injection paths, for high-frequency / complex environments - Death key: configurable post-death key and trigger delay (SkyHook mode only)
- Multilingual UI: Chinese / English
Operating Modes
Direct Hit Mode (SimulateKeyPress = false)
Macro triggers directly hit game logic. Short chain, controllable latency — suitable for pure macro judgment scenarios.
Key Simulation Mode (SimulateKeyPress = true)
Converts macro triggers to system-level key input. Options:
- SendInput path (compatibility-first)
- SkyHook path (lower-level, for complex / high-frequency environments)
SkyHook + InputMode
When SkyHookMode = true, you can select the input mode: Auto (auto-select), NtUserInjectKeyboard (low-level injection), NtUserSendInput (intermediate path), SendInput (standard, best compatibility). Start with Auto and switch if conflicts arise.
Installation
Prerequisites
- UnityModManager installed and working
- ADOFAI can load Mods via UMM
Steps
- Compile the project to get
ADOFAIMacro.dll(and related dependencies) - Place in the
Mods/ADOFAIMacrodirectory:ADOFAIMacro.dllNewtonsoft.Json.dll(if not in the game directory)Localization/folder (withzh-CN.json,en-US.json)- Native DLLs (e.g.
InputSystem.dll,TechniqueSimulator.dll)
- Launch the game and enable
ADOFAIMacroin the UMM panel
Settings
| Setting | Description |
|---|---|
Macro | Master macro toggle |
MacroKeys | Macro key sequence, comma-separated (e.g. D,F,J,K) |
SimulateKeyPress | Use system key simulation instead of direct Hit |
SkyHookMode | Use SkyHook path for key simulation |
InputMode | Auto / NtInject / NtSendInput / SendInput |
TimeOffset | Macro trigger time offset (-100 ~ 100 ms) |
EnableKeyAdjust | Allow Ctrl + Arrow keys adjustment in-game |
AdjustStep | Step per hotkey adjustment (0.1 ~ 10) |
EnableArrowTimeAdjust | Allow Left/Right keys for quick delay adjustment |
HighPrecisionAsync | Experimental high-precision async toggle |
EnableDeathKey / DeathKeyDelay / DeathKeyInput | Post-death auto key (requires SkyHook mode) |
EnableKeyFilter / FilterMode / FilteredKeys / FilteredAsyncKeys | Key filtering (0=blacklist, 1=whitelist) |
Key strings support A-Z, 0-9, F1-F12, SPACE, ENTER, ESC, CTRL, ALT, arrow keys, and hex virtual key codes (e.g. 0x41).
Runtime Hotkeys
- Ctrl + Left/Right arrow: adjust offset by
AdjustStep - Left/Right arrow: fine-tune delay directly (controlled by
EnableArrowTimeAdjust)
Recommended Configurations
| Scenario | Recommendation |
|---|---|
| Stability (beginner) | SimulateKeyPress = false, TimeOffset = 0 start, fine-tune gradually |
| Compatibility (multi-software) | SimulateKeyPress = true, SkyHookMode = false, SendInput path, enable EnableKeyFilter if needed |
| High-frequency (advanced) | SimulateKeyPress = true, SkyHookMode = true, InputMode = Auto start, then fine-tune TimeOffset and AdjustStep |
Troubleshooting
- Macro on but no response? Check in order: enabled in UMM,
Macrois on,MacroKeysformat is correct, try switchingSkyHookMode/InputMode - Intermittent triggers / missed keys? Adjust
TimeOffset(1ms steps); trySkyHookModefor high-frequency; enableEnableKeyFilterto block conflicts - Death key not working? Confirm
SkyHookModeis on,EnableDeathKeyis enabled,DeathKeyInputis a valid key name or code