View Single Post
  #1  
Old 06-24-2022, 10:07 PM
mg is offline mg
Registered User

Join Date: Jun 2022
Posts: 27

Delta Force series: Setting precise mouse sensitivity

Hello,

While DF1 uses the mousescale setting in df.cfg to set mouse sensitivity, (at least some) later games seemingly do not use a text-based configuration format for that. Instead, it seems the mouse sensitivity is only stored in the player save file.

Here are a few offsets (in hexadecimal) to a byte in the player save files that can be tweaked (for example using a hex editor).
  • DF2 (df2plyrs.sav): 5b8
  • DFLW (dflwplyr.sav): 6b4
  • DFTFD (plyr.sav): 6e0

I am currently replaying through the series, so I haven't gotten to BHD/TS/X/X2 yet. I'll hopefully think of posting the offsets for these later on.

Some notes:
  • It's unclear if the value in the data structure is actually a multi-byte value or not, and if so exactly how it is encoded (e.g. endianness), how large it is and how it is aligned. I could not find existing research into a complete reverse-engineering effort of the format of these save files (though it may have happened and may have been lost to time of course). In practice I don't expect anyone would need more than a byte for any reasonable sensitivity value, so it's not an issue.
  • The visual representation (slider) in the settings menus seems to scale linearly with the numerical value (i.e. nothing crazy: halving in the slider means halving the number).
  • It is possible to use values beyond the minimum and maximum values of the slider.
  • It is possible to set values in between the "notches" in the slider.
  • Opening the relevant settings menu/pane and saving them may always result in overriting the value you set manually, so make sure you set everything else right beforehand.

I'm curious if there might be better ways to go about this: any tips are appreciated. I just saw this post by Baldo on C4, it seems we reached the same conclusion!

Methodology if you need to reproduce or do it for other games: I simply halved the sensitivity with the slider a few times, and made a copy of the save file each time I did so. Comparing these files then normally reveals a single differing byte with a value that is halved each time. Take note of its offset.
Reply With Quote