Jump to content

Confirm Or Deny Controlmap.txt Warning


Recommended Posts

Posted

I use a custom controlmap.txt. I have edited it several times, using both Notepad (text editor that ships with Windows) and Notepad++ (freeware advanced-formatting text editor normally used for coding text, i.e. xml).

 

Today, I encountered this warning on a Controlmap mod on the Skyrim LE Nexus:

"Do not modify controlmap.txt in Windows Notepad. This will break it. Notepad does not have the proper encoding for the file. I recommend using a text editor that has automatic encoding, such as Notepad++, if you would like to make your own map." The terminology "does not have the proper encoding" is vague in that it doesn't specify what encoding is (supposedly) required- ANSI?? UTF8? ASCII? Klingon?

 

I have also seen a slightly different warning to the effect that the controlmap.txt file is tab-delimited and therefore we should resist the urge to "straighten it out" by aligning the columns of data into the 8 actual columns needed so we can easily count across (or label them Col 1 - Col 8 across the top) to see what we're looking at instead of every line's 8 entries randomly spaced out differently for each command. And yet... when I examine the number of tabs separating the various 8-item hex-codes for each command, I find that the unedited (vanilla) controlmap.txt has a varying number of tabs between key/button codes, seemingly at random because various commands have different spacings unrelated to the length of their content.

 

I had long ago aligned my file into 8 neat, comprehensible columns (using Notepad) before reading either of these dire warnings... and yet, all of the remapped, realigned, Notepad-edited controls seem to work, with the exception of my failure to map a controller button to the "Toggle Always Run" command, which I believe fails for entirely different reasons (Walk/Run is not a binary choice when using a controller, it is an analog function of a joystick.)

 

Is there anyone who actually knows why these warnings against using Notepad, or aligning the columnar data into actual columns, exist? Is it just pure blind luck that my remapped commands seem to work despite my having realigned and edited them using Notepad? Are these anti-Notepad, anti-realignment warnings similar to the widespread recommendations to change Oldrim plugins to Form Type 44 for use in SSE- widely (and hotly) disputed by many and yet still strongly recommended by universally-respected modding luminaries like Arthmoor?

 

And yes, I have tried to Google this info without success. If anyone can shine some light on the subject (or shoot me a link) I'd appreciate it.

Posted

Skyrim text files should always be encoded as BOMless UTF-8.

I am not sure what version of Windows you are running, but on 7, my Notepad decodes them as ANSI for BOMless UTF-8, which is completely fine as long as you remain within ASCII characters (which should be the case for controlmap.txt).

If for some reason your Notepad is decoding them as UTF-16 (Windows default unicode encoding), then yes, you will get corrupted data since each two bytes will represent a code unit vs UTF-8, where a code unit is 1 byte long. This should never happen to an already existing BOMless UTF-8 file anyway, it's mandatory for UTF-16, be it big or little endian, to have a BOM.

 

As for the tabs, well, controlmap.txt is a TSV (tab seperated values) file. I don't know if you can replace tabs with whitespaces but I now for certain that you can't for SKSE's localization files.

In any case, just open TSV files with a sheet editor and you will never have to worry about alignment ever again; you can then save them back by simply exporting them as a "tab delimited" sheet (aka TSV).

Libre Office and MS Office both provide sheet editors, it's that simple. You also don't need to worry about encoding because you can specify the encoding yourself when importing/exporting with those.

  • 2 weeks later...
Posted

@Hawk9969: I never saw your response until this very moment, as I will now document in the other thread where you held me up as an example of an asshole for not thanking you for it, never once considering the fact that for some reason I may not have been aware of it. So I certainly will not thank you for being a jerk.

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

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