Go Back   Novahq.net Forum > Games > Gaming Talk

Gaming Talk Post all your game related stuff here. This includes PC, Console, Handhelds etc.

Reply
 
Thread Tools Search this Thread Display Modes
  #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
  #2  
Old 06-25-2022, 11:44 AM
Baldo_the_Don is offline Baldo_the_Don
Baldo_the_Don's Avatar
Registered User

Join Date: Jul 2012
Posts: 529

I vaguely remember some experimenting I did in DFBHDTS. The mousescale slider in that game lets you set it between 4 (for sure) and 508 (maybe?). Of course, 0 means no mouse movement at all, and maxing it to 511 means a 1080° spin in 1mm or something about that ridiculous.

A tweak I made in my mods is for the arrows left and right of the mouse slider. Original game, they increase or decrease by 10, I changed that to 4. Before that tweak, if I wanted my 'mousescale 20' preference, I had to settle for 14 or 24, fidget with the slider, or edit the dfvplr.sav. Now I can just drag the slider all the way down, then click the up button four times. Perfect. Well, for me, at least.

I don't have any experience with DF2 or DFTFD, and limited DFLW demo time, but as I found out in my C4 work, the player .sav files hold settings for five different players, and I found five different mousescale hexes. Same for DFBHDTS.

And being fairly certain I confirmed that mousescale 511 upper limit, I have to assume the mousescale can take up 2 bytes, and from other things I've tweaked in the .sav files, once 255 (FF) is overstepped, the byte to the left of that starts to increase, and original byte increases by single steps. I think? That new bytes to the left get increased, that's for sure, though.

Please keep in mind, I don't actually know what I'm doing a lot of the time, I just have very strong suspicions and obscenely free time and patience to test ideas. My wife hates it.
__________________
/////////////////////- SIGNATURE STARTS -//////////////////////
The NSO Deadline Mod at NovaHQ.net:
//////////////////////- SIGNATURE ENDS -///////////////////////
Reply With Quote
  #3  
Old 06-25-2022, 12:48 PM
mg is offline mg
Registered User

Join Date: Jun 2022
Posts: 27

Quote:
I don't have any experience with DF2 or DFTFD, and limited DFLW demo time, but as I found out in my C4 work, the player .sav files hold settings for five different players, and I found five different mousescale hexes. Same for DFBHDTS.
Oh, so that's why you mentioned 5 values!

To anyone who might want to use the offsets I provided here: they're only valid for the first player entry.

Quote:
And being fairly certain I confirmed that mousescale 511 upper limit, I have to assume the mousescale can take up 2 bytes, and from other things I've tweaked in the .sav files, once 255 (FF) is overstepped, the byte to the left of that starts to increase, and original byte increases by single steps. I think? That new bytes to the left get increased, that's for sure, though.
Thanks for that! It's confirmed then, representation is probably 16-bit but could be more, likely unsigned, and definitely big-endian (assuming by "left" you mean "smaller offset/address"). It would also mean that the offsets I provided are for the LSB of that value.

Quote:
Please keep in mind, I don't actually know what I'm doing a lot of the time, I just have very strong suspicions and obscenely free time and patience to test ideas. My wife hates it.
Haha, I think not many people know what they're doing when it comes to software, if anyone. Some just don't share their notes explaining their struggles, tests and iterations. It makes them look smarter, but we know better . I'm guilty of that sometimes, writing everything down can take a while! But all that time spent testing and iterating, well, it always does happen either way.
Reply With Quote
  #4  
Old 06-28-2022, 09:11 AM
Oscarmike247 is offline Oscarmike247
Oscarmike247's Avatar
Registered User

Join Date: Feb 2018
Posts: 229

Quote:
Please keep in mind, I don't actually know what I'm doing a lot of the time, I just have very strong suspicions and obscenely free time and patience to test ideas. My wife hates it.

Same! Haha. I've been staying up til 3am to work on stuff while the wife and kids are sleeping so she doesn't fuss at me l. Haha
Reply With Quote
Reply

Tags
configuration, delta force, mouse sensitivity, mousescale


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -5. The time now is 06:41 AM.




Powered by vBulletin®