﻿Enslaved: Odyssey to the West Premium Edition Raw Input Mouse Fix v1.0.1
=============================================================================

Makes the mouse turn the camera and aim by a constant angle per mouse count:
no dead zone, no acceleration, no speed cap, no smoothing, no axis lock, the same
at every frame rate.

Supported game build
--------------------
Enslaved: Odyssey to the West Premium Edition, Steam version
(Binaries\Win32\Enslaved.exe, 2013-12-17 build), SHA-256:
F0C4BEBEB0D19C216110AA534A9DBB317759A1B622137EF3FA2EE6429139D388

Before changing anything, the plugin checks that the running executable is this
build and checks the bytes of every place it hooks. If anything differs (another
version or store, a patched exe), it leaves the game unchanged and says why in
enslaved-raw-mouse-fix.log.

Choose an installation
----------------------
Plugin-only archive:
  Requires a compatible 32-bit ASI loader already installed. Copy
  EnslavedRawMouseFix.asi and enslaved-raw-mouse-fix.ini into
  <game folder>\Binaries\Win32 (beside Enslaved.exe), or into the plugin folder
  of your loader. Keep both files together.

Convenience archive with Ultimate ASI Loader:
  If the game has no ASI loader, copy dinput8.dll, EnslavedRawMouseFix.asi and
  enslaved-raw-mouse-fix.ini into <game folder>\Binaries\Win32. The bundled
  dinput8.dll is Ultimate ASI Loader v9.7.4, x86 build.

  If the game already has a dinput8.dll (another mod or loader), do not
  overwrite it. Copy only EnslavedRawMouseFix.asi and enslaved-raw-mouse-fix.ini.

For either installation:
1. Close the game before copying files.
2. Start the game normally through Steam.

What it fixes
-------------
The game turns the mouse into a fake right stick. Every frame, the counts of
that frame become a stick position, which then goes through:
- a dead zone: slow movement (below about 150 counts per second) did not turn
  the camera at all;
- an S-shaped response curve and a speed cap: the turn per count changed with
  hand speed, peaked around 750 counts per second and then stopped growing
  (fast flicks were cut short at 100 to 145 degrees per second);
- smoothing and an axis lock: slow circles came out as squares;
- frame time: the stick position is a speed, so the same movement turned
  differently at different frame rates;
- while aiming: another dead-zone window, cursor drag, a turn speed that ramps
  up while you hold it, and aim assist pulling the cursor.

With the fix, the camera and the aim turn by the mouse counts themselves. Up and
down is a constant angle per count as well; the camera still moves closer or
higher along the game's own camera path as you look up or down.

Also fixed: next to walls the stock game refused any turn that would put the
camera into the wall while you steer, so the mouse felt stuck until it suddenly
let go. The camera now turns freely and moves in instead (WallStop=1 brings the
stock rule back).

Gamepads, the keyboard, menus, cutscenes and scripted cameras work as before.
The game's mouse sensitivity slider, aiming sensitivity sliders and invert
options still apply.

Usage
-----
F8   switches between the fix and the stock mouse handling, for a comparison
     (high beep = fix on, low beep = stock).
F9   lowers Global sensitivity by about 10 % (until the game closes; the value is
     written to the log, copy it into the ini to keep it).
F10  raises Global sensitivity by 10 %.
F6   re-reads enslaved-raw-mouse-fix.ini while the game runs.

Sensitivity
-----------
Global=1.0 is the stock game's most responsive point (0.169 degrees per count
at the default in-game slider), now at every hand speed. Aiming uses 0.7 of
that by default (AimX/AimY).

Mouse travel for a 360 degree turn at Global=1.0:

  DPI     camera      aiming (AimX=0.7)
  400     13.5 cm     19.3 cm
  800      6.8 cm      9.7 cm
  1600     3.4 cm      4.8 cm
  3200     1.7 cm      2.4 cm

The in-game mouse sensitivity slider multiplies all of it (its default is 1.0).

Configuration
-------------
Edit enslaved-raw-mouse-fix.ini while the game is closed (or press F6).

[Fix]
Enabled=1           0 = the plugin loads but changes nothing.
DirectCamera=1      the fix; 0 = the game's stick emulation everywhere.
RawPitch=1          up/down by a constant angle per count; 0 = along the
                    camera path at the stick's speed.
RawAim=1            aiming by a constant angle per count; 0 = stock aiming.
WallStop=0          1 = the stock rule that stops the camera from turning
                    into a wall while you steer.
Hotkeys=1           0 = no hotkeys.
Diagnostics=0       1 = statistics in the log every five seconds.

[AutoCamera]        the game's automatic camera moves; 1 = on (stock), 0 = off.
                    Each of them already pauses while you move the camera.
FollowBehind=1      swings the camera behind Monkey as you walk.
TiltWhileMoving=1   tilts the view up or down while you run.
AvoidWalls=1        turns the camera away from walls ahead of you (wall
                    collision itself always stays on).
CombatFraming=1     turns the camera to frame a fight.
ScriptedViews=1     level-start camera turns and the level designers'
                    look-at hints.

[Sensitivity]
Global=1.0          multiplier for everything.
X=1.0, Y=1.0        horizontal and vertical camera multipliers.
AimX=0.7, AimY=0.7  horizontal and vertical multipliers while aiming (1.0 =
                    the same angle per count as the camera).
ZoomMatch=1         zoomed in (turret zoom, Pigsy's rifle scope): aiming slows
                    down with the zoom, so a count moves the crosshair the same
                    distance on screen as without zoom; 0 = the same angle per
                    count.
AimZoomed=1.0       zoomed in: an extra multiplier on top (lower = slower).
UseGameSlider=1     the in-game sliders scale the fix; 0 = ignore them.

[Hotkeys]           F1..F24, a virtual-key code, or 0 for no key.

Covered: the normal third-person camera (on foot, climbing, combat), aiming with
the plasma staff and turrets, and Pigsy's Perfect 10 (camera, rifle and throw
aim; fixed in v1.0.1 from a user report).

Frame rate
----------
The fix works at any frame rate. The game caps itself at 62 FPS by default; to
uncap it, set bSmoothFrameRate=FALSE under [Engine.Engine] in
Documents\My Games\UnrealEngine3\MonkeyGame\Config\MonkeyEngine.ini and cap it
with your driver or RTSS instead. Saving the graphics options in game can turn
UseVsync back on in the same file.

Diagnostics
-----------
The plugin writes enslaved-raw-mouse-fix.log beside the ASI: the build check,
the signature check, every installed hook, and the hotkeys you pressed. Check
it if the fix does not seem active.

The game can crash while exiting, with or without this fix (it did on every
exit on the test machine, also without the plugin); a crash dump at that moment
is not caused by the plugin.

Uninstallation
--------------
Close the game and remove EnslavedRawMouseFix.asi and enslaved-raw-mouse-fix.ini.
The optional enslaved-raw-mouse-fix.log may also be removed.

Do not remove dinput8.dll if it existed before this fix or if another plugin
depends on it. Remove the bundled loader only when you installed that exact
file for this fix and no other ASI plugin needs it.

Third-party components
----------------------
The convenience archive includes Ultimate ASI Loader v9.7.4 by ThirteenAG under
the MIT License. See THIRD-PARTY-NOTICES.txt. The plugin itself contains no
third-party code.

Misc
----
For more game fixes, visit:
https://slop-blog.enkhayzomachines.net/fixes :)

