Jump to content

Controlmap_custom.txt


Recommended Posts

Posted

Took a very quick look at it: while it is a binary format (why name it .txt Bethesda...) it seems simple enough.
Cannot promise anything, but I will try :)

Posted (edited)

Sorry, played the game more than modding it, but here we are:

 

Writing a tool is kinda useless without knowing what the 4 bytes before the keycode and the 3 after it mean.
Sadly I am not a decompiler expert and cannot dig around in the EXE to find out.

 

  • Numerical values like the file_end seem to be big endian
  • The file structure below can repeat to declare multiple "subfiles", this explains the "03 00 03 03 00 03":
    First "03" is the version, the  next two bytes "00 03" are the file_size.
    Since it is 3, it is finished and no key entries are present. Also a second emtpy "subfile".
  • Seems to be always three "subfiles":
    1. PC
    2. unknown
    3. Controller

 

# header:
ubyte   version?    always 03
ushort  file_size   amount of bytes for one file entry in the ControlMap

# array of entries until end:
cstr    category    ex: "MainGameplay\0"
cstr    key_name    ex: "Quickkey5\0"
uint    unk_uint    4 unknown bytes, mostly 1, seems to be set on entries/keys when controllers are used
ubyte   key_code    https://learn.microsoft.com/de-de/windows/win32/inputdev/virtual-key-codes
ubyte   unk_byte_a  0 for main key, 1 for alt key
ubyte   unk_byte_b  0 for main key, 2 for alt key
ubyte   unk_byte_c  always 0

 

 

Edit: quickly checked out controller values, seems to be using some of the unknow bytes.
Also figured out what the 03 00 03 means.


If someone has some "Controlmap_custom.txt" files for testing

it would be nice, preferably with lots of edits, especially on controllers.

 

Edited by Akzyra
more findings, controllers

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...