Controller Support v1.0.0 - Casualties: Unknown


A BepInEx mod that lets you play Casualties: Unknown with a controller.
Works with Xbox controllers, DualSense (PS5) and DualShock 4 (PS4), wired or
wireless. The DualSense gets the full treatment: adaptive triggers, lightbar,
player lights, speaker and touchpad.

Report bugs in the Bugs tab on the Nexus page.


WHAT YOU NEED
-------------
- Casualties: Unknown, the full game (Windows, Steam version).
- BepInEx 5 (x64): https://github.com/BepInEx/BepInEx/releases
  Pick "BepInEx_win_x64_5.4.x.x.zip" (version 5, NOT version 6).


HOW TO INSTALL
--------------
1. Open your game folder. In Steam: right-click Casualties Unknown > Manage >
   Browse local files.
2. Install BepInEx if you don't have it: unzip it into the game folder, start
   the game once, wait for the main menu, then close it.
3. Put ControllerSupport.dll in:  BepInEx\plugins\
4. Start the game and plug in (or connect) your controller.

STEAM INPUT: if buttons do double actions, or the lightbar, triggers or
speaker don't react, turn Steam Input off for this game: in Steam, right-click
Casualties Unknown > Properties > Controller > "Disable Steam Input".


WHAT IT DOES
------------
- Left stick walks, right stick moves the mouse cursor. Every button presses
  the key you set for that action in the game's own controls, so rebinding
  in the game carries over.
- A / Cross clicks on the title screen, in menus, character select, the
  tutorial, text boxes, crafting, trading and item customizing.
- When a controller connects, a banner shows which one. If it disconnects
  (or a wireless controller's battery dies) during a run, the game pauses.
- A "Controller" tab in the game's Settings shows your controller live
  (every button, stick, trigger and touch) and has all the options, plus
  button remapping.
- Bandaging: rotate either stick to wrap gauze and bandages. The hand grabs
  the roll for you, and a hint on screen tells you what to do.
- Rumble when you get hurt, and a heartbeat while you're dying.

DualSense and DualShock 4:
- The touchpad works as a mouse: slide to move, tap to click, two fingers to
  scroll, press to click (two-finger press = right click).
- The lightbar shows your condition: green healthy, yellow hurt, red badly
  hurt, dim blue asleep. It flashes red fast while you're dying (in time with
  the health panel alert), fades yellow while bleeding, flashes green slowly
  when badly poisoned or sick, cycles through a rainbow when two or more
  problems hit at once, and fades to dark red when you die.
- On character select, the lightbar takes the color of the character you're
  pointing at.

DualSense only:
- Adaptive triggers. Every gun kicks R2 differently: pistols buzz quick and
  high, rifles harder and deeper, shotguns a heavy thump, automatics buzz as
  long as you hold the trigger. The heavy drill, plasma cutter and mini
  laser drill make R2 vibrate while they run. Otherwise the triggers stay
  loose, so mining, menus and keypads feel normal.
- The five player lights under the touchpad show your energy.
- Controller speaker (USB only): the health panel's sounds also play from
  the controller - opening and closing it, the heartbeat while it's open,
  and the critical alert. If the controller plays before the game (common
  with Bluetooth speakers or headphones), raise "Speaker delay" in the
  Controller tab until they line up.


DEFAULT BUTTONS
---------------
  A / Cross           jump
  B / Circle          throw
  X / Square          switch hands
  Y / Triangle        inventory
  LB / L1             expand description
  RB / R1             hold for slow (precise) cursor
  LT / L2             item interact
  RT / R2             left click (use / fire)
  View / Create       crafting
  Menu / Options      pause
  L3                  bark
  R3                  right click
  D-pad up            health panel
  D-pad down          ragdoll
  D-pad left          normal speed
  D-pad right         cycle speed
  Touchpad press      left click (two fingers: right click)

Change them in the Controller tab, or in the config file.


SETTINGS
--------
Everything is in the Controller tab in the game's Settings. The same options
are also in:  BepInEx\config\controllersupport.cfg


NOTES
-----
- Xbox controllers use XInput. PlayStation controllers are read directly,
  over USB or Bluetooth.
- The controller speaker needs a USB cable. Over Bluetooth, Windows doesn't
  give the game a way to reach it.
- The DualShock 4 has no adaptive triggers or usable speaker on PC.


CREDITS
-------
Controller art: Kenney (kenney.nl), CC0.


Copyright (c) casualexpie. All rights reserved.
Do not decompile, disassemble or reverse-engineer this mod, and do not
reupload it elsewhere.
