User Profile Settings (blam.sav)

Everything about HD, MD, and their mods.

Moderator: Halo Moderators

User avatar
Sparky
Delta Force
Posts: 4194
Joined: Wed Mar 31, 2004 8:59 pm
Location: New Jersey, USA
Contact:

User Profile Settings (blam.sav)

Post by Sparky » Sun Jun 26, 2011 9:38 am

Player Profile Keyboard Settings
In deciding that Zeus should import and use the same key configurations within its scenario viewer to control movement of the camera and editing that Halo / Halo Demo are configured by the user to use in the game, I've begun analyzing the Documents > Halo Demo > savegames > [profile] > blam.sav file in order to determine how the keyboard controls are saved within the file.

After a few minutes of comparing files, it seems like there is a character map (a list of all the supported characters, as described in the vcky Virtual Keyboard tag in the metadata of the ui.map file) that consists of a SHORT value for each character beginning at offset 0x134 and ending at offset 0x93A, spanning a total of 2054 (0x806) bytes. Within this 2054-byte character map are SHORT values, one SHORT value for each supported character of the input devices, listed in ASCII order (I think), such as 1, 2, 3... a, b, c, etc. . Here's a snapshot of what it looks like in HexEdit:

Image

As a reminder, these byte values must be reversed in order to switch between Little Endian and Big Endian, if you were to interpret the values as integer numbers.

You can see that all those "empty" values are 7F FF (or FF7F when converted, which is a value of 65,407). Each of these SHORT values represents a keyboard character. When you see a value of 7F FF, it means this keyboard character is not assigned a task or binding to a control in the player's profile. However, if you see a different value at this offset, then the SHORT value at that offset ties that character to its keyboard control function.

For example, 00 13 is a value used by the player profile control "Move Forward". When that 00 13 value is at offset 0x156, which is the offset representing the character 1, then the 1 key is mapped to "Move Forward". If this "Move Forward" setting is changed in the game so that it is mapped to the character 2 instead, then the offset 0x156 will return to a value of 7F FF and the next SHORT value in the character map, which is at offset 0x158, will change to 00 13.

Below, I have the "Move Forward" control set to 3 instead of 1 or 2 used in the example above. The ??? values are represented by 7F FF in SHORT value in the hex code.
Image

You have multiple input devices, of course, including a mouse and keyboard with the configuration shown in the picture above. The second column represents the Mouse input device. This device's character map starts at offset 0x20E, which shows us that the majority of the unmapped characters in the input device character map are representing values for supported gamepads and other miscellaneous input devices supported by the game. Thus, the actual keyboard map is between offsets 0x134 and 0x20E, a size of 218 bytes (0xDA bytes). Perhaps there are 218 keyboard characters in the vcky tag in the ui.map file?

I will now present a complete character map for you (a work in progress) :

Code: Select all

Character Map Analysis for Halo Demo's blam.sav file


Complete Keyboard Input Device Mapping

The main text values for these settings are available in the following tag in your ui.map file:
ui\shell\main_menu\settings_select\player_setup\player_profile_edit\controls_setup\controls_keyboard_button_names

0x156		1
0x158		2
0x15A		3
0x15C		4
0x15E		5
0x160		6
0x162		7
0x164		8
0x166		9
0x168		0
0x16A		-
0x16C		

0x18E		A


Complete Mouse Input Device Mapping

The main text values for these settings are available in the following tag in your ui.map file:
ui\shell\main_menu\settings_select\player_setup\player_profile_edit\controls_setup\controls_mouse_button_names

0x20E		Left Button
0x210		Middle Button
0x212		Right Button
0x214		Button 4
0x216		Button 5
0x218		Button 6
0x21A		Button 7
0x21C		Button 8
0x21E		Horizontal Axis -
0x220		Horizontal Axis +
0x222		Vertical Axis -
0x224		Vertical Axis +
0x226		Wheel -
0x228		Wheel +


Control Device Action Values

The main text values for these settings are available in the following tag in your ui.map file:
ui\shell\main_menu\settings_select\player_setup\player_profile_edit\controls_setup\controls_binding_labels

Note that you will not be able to manually change the mapping for the values within the blam.sav file unless you also
change the 4-byte checksum at the end of the file. Without changing the checksum, the game will revert to default controls.

Move Forward		0013
Move Backward		0014
Move Left			0015
Move Right			0016
Look Up				0017
Look Down			0018
Look Left			0019
Look Right			001A
Last edited by Sparky on Sun Jun 26, 2011 10:34 am, edited 1 time in total.
Either you are groping for answers, or you are asking God and listening to Jesus.

nil
Halo Moderator
Halo Moderator
Posts: 1082
Joined: Sat Jul 05, 2008 8:38 am
Location: null zone

Re: User Profile Settings (blam.sav)

Post by nil » Sun Jun 26, 2011 10:28 am

Bets the byte order is dependent on whether or not the native architecture is ppc (big endian) or i386 (little endian).
I am no longer active to Halo or MGM, and don't guarantee a response on the forums or through email. I will however linger around the IRC channel for general chatting. It's been fun!

User avatar
Sparky
Delta Force
Posts: 4194
Joined: Wed Mar 31, 2004 8:59 pm
Location: New Jersey, USA
Contact:

Re: User Profile Settings (blam.sav)

Post by Sparky » Sun Jun 26, 2011 10:39 am

The character map list is in progress. See the first post for the latest.

I'll have to test some more values before I can say with certainty that the values coincide with the related ustr Unicode String List tag values. It looks rather promising, though the Wheel - and Wheel + values use both the "Wheel" string and the -/+ strings located in a separate ustr tag.

Anyway, there's a checksum which is the last 4 bytes of the blam.sav file. The file gets overwritten with default values if the checksum fails. If you simply change a value in the file with Hex Edit, the checksum will fail and you will lose your user profile configuration settings for the input device controls at least.

Lucky for me, Zeus will just read the settings rather than write them, so I don't have to figure out the checksum nonsense. (But nil probably already knows from the gametype files, don't you?)
Either you are groping for answers, or you are asking God and listening to Jesus.

User avatar
Modzy
Green Beret
Posts: 3054
Joined: Fri Feb 22, 2008 11:06 pm
Location: Portland, OR

Re: User Profile Settings (blam.sav)

Post by Modzy » Sun Jun 26, 2011 1:51 pm

nil wrote:Bets the byte order is dependent on whether or not the native architecture is ppc (big endian) or i386 (little endian).

User avatar
Sparky
Delta Force
Posts: 4194
Joined: Wed Mar 31, 2004 8:59 pm
Location: New Jersey, USA
Contact:

Re: User Profile Settings (blam.sav)

Post by Sparky » Mon Mar 19, 2012 5:53 pm

I was going to make another topic for this question, but just out of curiosity, which keyboard controls do you guys use?

Here are mine:
Either you are groping for answers, or you are asking God and listening to Jesus.

User avatar
Vegerot
SEAL
Posts: 615
Joined: Thu Nov 26, 2009 10:13 pm
Location: Behind you with an Energy sword.
Contact:

Re: User Profile Settings (blam.sav)

Post by Vegerot » Wed Mar 21, 2012 4:06 pm

The hayls wrong wit'u? That is the most retarded keyboard setup I've ever seen.
Bunneh wrote:Now, please don't spam my newsfeed on how you need like 3 dildoes to make a giant dick statue on penisland or any of those other shitty facebook games.
Image

User avatar
Samuco
Peon
Posts: 131
Joined: Mon Apr 26, 2010 1:39 am

Re: User Profile Settings (blam.sav)

Post by Samuco » Wed Mar 21, 2012 11:14 pm

You obviously have not seen mine then :p

nil
Halo Moderator
Halo Moderator
Posts: 1082
Joined: Sat Jul 05, 2008 8:38 am
Location: null zone

Re: User Profile Settings (blam.sav)

Post by nil » Thu Mar 22, 2012 7:45 am

@Sparky:

Interesting you adjusted to esdf instead of wasd, probably to give you more key choices? Most settings seem reasonable, except for the MISC ones besides tab as showing scores, since your right hand ought to remain on mouse. Your reload option seems terrible for backpack reloading though, and double melee, however.

Nothing that special with my controls, though I use T,G,B for chat functions and tab for showing scores. Wheel for changing weapons.

Working with HaloMD, I had only recently figured out the checksum. There's a script in the HaloMD app bundle that just takes the file path to the blam file and fixes the checksum on it. (In particular, the CRC32 of whole file is always 0xFFFFFFFF, so you have to forge the last 4 bytes to make it so).
I am no longer active to Halo or MGM, and don't guarantee a response on the forums or through email. I will however linger around the IRC channel for general chatting. It's been fun!

User avatar
Sparky
Delta Force
Posts: 4194
Joined: Wed Mar 31, 2004 8:59 pm
Location: New Jersey, USA
Contact:

Re: User Profile Settings (blam.sav)

Post by Sparky » Thu Mar 22, 2012 2:44 pm

The main idea I use is to keep my hand on the keys I should when I should. The movement keys (strafing in each direction, crouching, jumping) and the activate key are primary and therefore I use my pinkie for most other functions. The mouse I associate with aim-related, complicated, and secondarily repetitive actions such as firing, meleeing, throwing things, reloading, scope zoom and switching equipment. The mouse I use has five reprogrammable buttons. There is a related topic at MGM already about input devices like mice and trackballs. When I go to chat, I don't need to use the mouse anymore, since my hands are on the keyboard to type letters, so I move my right hand away from the mouse, tap the ";" semicolon with my right pinkie and start typing, pressing Return to submit the text.

ESDF brings my hand into a more natural location away from the Caps Lock key on the left and lets me keep my movement fingers on the appropriate keys. It's more natural because that's where your left hand is located when you are typing; you just slightly place your left middle finger up onto the E key.
Either you are groping for answers, or you are asking God and listening to Jesus.

002
Ranger
Posts: 934
Joined: Wed Aug 16, 2006 5:48 pm
Location: ::1

Re: User Profile Settings (blam.sav)

Post by 002 » Wed Aug 01, 2012 5:15 pm

Fire is left mouse
Throw grenade is V or right mouse
Scope is Z or middle mouse
Running is WASD
Aiming is with mouse or arrow keys
Crouch is C
Picking up Weapons is X
Changing Weapons is TAB
Chatting is TYH
Jump is Space
Changing grenades is G
Melee is F
Use is E
F1 is player scores
Q is flashlight
Alt-F4 is ragequit

pretty default control scheme

User avatar
Sparky
Delta Force
Posts: 4194
Joined: Wed Mar 31, 2004 8:59 pm
Location: New Jersey, USA
Contact:

Re: User Profile Settings (blam.sav)

Post by Sparky » Wed Aug 01, 2012 7:05 pm

002 wrote:Fire is left mouse
Throw grenade is V or right mouse
Scope is Z or middle mouse
Running is WASD
Aiming is with mouse or arrow keys
Crouch is C
Picking up Weapons is X
Changing Weapons is TAB
Chatting is TYH
Jump is Space
Changing grenades is G
Melee is F
Use is E
F1 is player scores
Q is flashlight
Alt-F4 is ragequit

pretty default control scheme
Do you use your thumb to press the G key?
Either you are groping for answers, or you are asking God and listening to Jesus.

User avatar
Mgalekgolo
Commando
Posts: 2587
Joined: Thu Jun 24, 2010 6:36 am

Re: User Profile Settings (blam.sav)

Post by Mgalekgolo » Wed Aug 01, 2012 7:45 pm

I would always use the index of my left hand, but i'm left handed so idk if that effects it or not.
Yarok wrote:There may be a giant dildo protruding from your forehead.
Image

002
Ranger
Posts: 934
Joined: Wed Aug 16, 2006 5:48 pm
Location: ::1

Re: User Profile Settings (blam.sav)

Post by 002 » Thu Aug 02, 2012 10:50 am

Sparky wrote:Do you use your thumb to press the G key?
Not unless I am moving to the right, which I use middle finger for up (W) and index for right (D). I use my index for G and thumb for space. This makes it easier to rush into players with the assault rifle.

I only use thumb for V, space, and C.
Mgalekgolo wrote:I would always use the index of my left hand, but i'm left handed so idk if that effects it or not.
It can and probably does. You can, however, be a touch-typist who learned it that way.

Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests