Talk:Battlefield: Bad Company 2

From PCGamingWiki, the wiki about fixing PC games

Contents

Thread titleRepliesLast modified
Input strokes codes018:29, 18 May 2017
Functions names in settings files016:15, 22 August 2015

Input strokes codes

You can find these by opening game executable with a hex editor.
These can be used in the <field name="Key"></field> tags scattered around the *.dbx settings files

InputDeviceKeys
IDK_Undefined
IDK_Pause
IDK_MediaSelect
IDK_Mail
IDK_MyComputer
IDK_WebBack
IDK_WebForward
IDK_WebStop
IDK_WebRefresh
IDK_WebFavorites
IDK_WebSearch
IDK_Wake
IDK_Sleep
IDK_Power
IDK_AppMenu
IDK_RightWin
IDK_LeftWin
IDK_Delete
IDK_Insert
IDK_PageDown
IDK_ArrowDown
IDK_End
IDK_ArrowRight
IDK_ArrowLeft
IDK_PageUp
IDK_ArrowUp
IDK_Home
IDK_RightAlt
IDK_PrintScreen
IDK_Divide
IDK_NumpadComma
IDK_WebHome
IDK_VolumeUp
IDK_VolumeDown
IDK_MediaStop
IDK_PlayPause
IDK_Calculator
IDK_Mute
IDK_RightCtrl
IDK_NumpadEnter
IDK_NextTrack
IDK_Unlabeled
IDK_Ax
IDK_Stop
IDK_Kanji
IDK_Underline
IDK_Colon
IDK_At
IDK_PrevTrack
IDK_NumpadEquals
IDK_Yen
IDK_NoConvert
IDK_Convert
IDK_Kana
IDK_F15
IDK_F14
IDK_F13
IDK_F12
IDK_F11
IDK_OEM_102
IDK_Decimal
IDK_Numpad0
IDK_Numpad3
IDK_Numpad2
IDK_Numpad1
IDK_Add
IDK_Numpad6
IDK_Numpad5
IDK_Numpad4
IDK_Subtract
IDK_Numpad9
IDK_Numpad8
IDK_Numpad7
IDK_ScrollLock
IDK_Numlock
IDK_F10
IDK_F9
IDK_F8
IDK_F7
IDK_F6
IDK_F5
IDK_F4
IDK_F3
IDK_F2
IDK_F1
IDK_Capital
IDK_Space
IDK_LeftAlt
IDK_Multiply
IDK_RightShift
IDK_Slash
IDK_Period
IDK_Comma
IDK_M
IDK_N
IDK_B
IDK_V
IDK_C
IDK_X
IDK_Z
IDK_Backslash
IDK_LeftShift
IDK_Grave
IDK_Apostrophe
IDK_Semicolon
IDK_L
IDK_K
IDK_J
IDK_H
IDK_G
IDK_F
IDK_D
IDK_S
IDK_A
IDK_LeftCtrl
IDK_Enter
IDK_RightBracket
IDK_LeftBracket
IDK_P
IDK_O
IDK_I
IDK_U
IDK_Y
IDK_T
IDK_R
IDK_E
IDK_W
IDK_Q
IDK_Tab
IDK_Backspace
IDK_Equals
IDK_Minus
IDK_0
IDK_9
IDK_8
IDK_7
IDK_6
IDK_5
IDK_4
IDK_3
IDK_2
IDK_1
IDK_Escape
IDK_None
InputDevicePOVs
IDP_POV_Undefined
IDP_POV_2
IDP_POV_1
IDP_POV_0
InputDeviceMouseButtons
IDB_Button_Undefined
IDB_Button_7
IDB_Button_6
IDB_Button_5
IDB_Button_4
IDB_Button_3
IDB_Button_2    <----- Middle Mouse Button
IDB_Button_1    <----- Right Mouse Button
IDB_Button_0    <----- Left Mouse Button
InputDevicePadButtons
IDB_Undefined
IDB_Rtrigger2    <----- R1/RB (button 5)
IDB_Ltrigger2    <----- L1/LB (button 6)
IDB_Rtrigger    <----- START (button 8)
IDB_Ltrigger    <----- SELECT/BACK (button 7)
IDB_alt    <----- Left stick press (button 9)
IDB_start    <----- Right stick press (button 10)
IDB_Rthumb    <----- button 12
IDB_Lthumb    <----- button 11
IDB_Rtopright
IDB_Rtopleft
IDB_Rright    <----- □/X (button 3)
IDB_Rleft    <----- ✕/A (button 1)
IDB_Rdown    <-----  ◯/B (button 2)
IDB_Rup    <----- △/Y (button 4)
IDB_Lright
IDB_Lleft
IDB_Ldown
IDB_Lup
InputDeviceAxes
IDA_Undefined
IDA_Axis7Y
IDA_Axis7X
IDA_Axis6Y
IDA_Axis6X
IDA_Axis5Y
IDA_Axis5X
IDA_Axis4Y
IDA_Axis4X
IDA_Axis3Y
IDA_Axis3X
IDA_Axis2Y
IDA_Axis1YNeg
IDA_Axis1XNeg
IDA_Axis1YPos
IDA_Axis1XPos
IDA_Axis1Y
IDA_Axis1X
IDA_Axis0YNeg
IDA_Axis0XNeg
IDA_Axis0YPos
IDA_Axis0XPos
IDA_Axis0Y
These, plus IDA_Axis2X (mouse wheel) and IDA_Axis0X, which are in another position in the exe.

IDA_Axis0X/IDA_Axis0Y is the controller left stick when in PadInputActionData GUIDs. Mouse when in MouseInputActionData ones

IDA_Axis1X is the triggers (Z?) axis in XInput devices.

EDIT(final): Ok, to sum up.. this game only reads buttons from 1 to 12 and X/Y/Z Axis + Z Rotation.
Nothing else, not even DPAD/POV. After many attempts with SCP vJoy DirectInput device there weren't others accepted.

Other people seem to just have had problems with deadzones..
and solved everything by tinkering with config files, but imo, that must not be the whole story.

At the moment, the best way to play the game with a controller seems some combinations of XInput Plus and conventional remapping softwares like antimicro

Mirh (talk)22:01, 14 July 2015

Functions names in settings files

A kind of extended naming for actions codes can be found in <path-to-game>\Dist\win32\async\startup-00.fbrb\Input\InputConfiguration.dbx
On foot (infantry.dbx)
FunctionNameCode
Fire / UseConceptFireA0DF9654-2A2F-11E5-AB29-DF52BC3B2788
Zoom / Detonate C4ConceptZoomA0DF9658-2A2F-11E5-AB29-DF52BC3B2788
ReloadConceptReloadA0DF965C-2A2F-11E5-AB29-DF52BC3B2788
Throw GrenadeConceptSelectInventoryItem6A0DF9660-2A2F-11E5-AB29-DF52BC3B2788
Melee AttackConceptSelectMeleeWeaponA0DF9664-2A2F-11E5-AB29-DF52BC3B2788
Walk ForwardConceptMoveFBA0DF966F-2A2F-11E5-AB29-DF52BC3B2788
Walk BackwardConceptMoveFBA0DF966F-2A2F-11E5-AB29-DF52BC3B2788
Strafe LeftConceptMoveLRA0DF9676-2A2F-11E5-AB29-DF52BC3B2788
Strafe RightConceptMoveLRA0DF9676-2A2F-11E5-AB29-DF52BC3B2788
Turn LeftConceptYawA0DF9684-2A2F-11E5-AB29-DF52BC3B2788
Turn RightConceptYawA0DF9684-2A2F-11E5-AB29-DF52BC3B2788
Look UpConceptPitchA0DF967D-2A2F-11E5-AB29-DF52BC3B2788
Look DownConceptPitchA0DF967D-2A2F-11E5-AB29-DF52BC3B2788
Jump / ParachuteConceptJumpA0DF968B-2A2F-11E5-AB29-DF52BC3B2788
SprintConceptSprintA0DF968F-2A2F-11E5-AB29-DF52BC3B2788
CrouchConceptChangePoseA0DF9693-2A2F-11E5-AB29-DF52BC3B2788
Select PistolConceptSelectInventoryItem1A0DF969B-2A2F-11E5-AB29-DF52BC3B2788
Select RifleConceptSelectInventoryItem2A0DF969F-2A2F-11E5-AB29-DF52BC3B2788
Select Gadget 1ConceptSelectInventoryItem3A0DF96A3-2A2F-11E5-AB29-DF52BC3B2788
Select Gadget 2ConceptSelectInventoryItem4A0DF96A7-2A2F-11E5-AB29-DF52BC3B2788
Select LaserConceptSelectInventoryItem5A0DF96AB-2A2F-11E5-AB29-DF52BC3B2788
Next ItemConceptCyclePrimaryInventoryA0DF9668-2A2F-11E5-AB29-DF52BC3B2788
Prev ItemConceptCyclePrimaryInventoryA0DF9668-2A2F-11E5-AB29-DF52BC3B2788
Aside of this, there are also ConceptLie and ConceptAltFire identifiers that are not present in the in-game menu
On foot (shared.dbx)
These settings are mirrored in all the other files
FunctionNameCode
Enter / Exit VehicleConceptChangeVehicleA0DF96F0-2A2F-11E5-AB29-DF52BC3B2788
Change CameraConceptToggleCameraA0DF96F2-2A2F-11E5-AB29-DF52BC3B2788
Issue Order / Communicate / SpotConceptCommMenu1A0DF9712-2A2F-11E5-AB29-DF52BC3B2788
MapConceptMapZoomA0DF96F4-2A2F-11E5-AB29-DF52BC3B2788
Chat AllConceptSayAllChatA0DF96F8-2A2F-11E5-AB29-DF52BC3B2788
Chat TeamConceptTeamChatA0DF96FC-2A2F-11E5-AB29-DF52BC3B2788
Chat SquadConceptSquadChatA0DF9700-2A2F-11E5-AB29-DF52BC3B2788
Push To TalkConceptPushToTalkA0DF9710-2A2F-11E5-AB29-DF52BC3B2788
Select Seat 1ConceptSelectEntry0A0DF9704-2A2F-11E5-AB29-DF52BC3B2788
Select Seat 2ConceptSelectEntry1A0DF9706-2A2F-11E5-AB29-DF52BC3B2788
Select Seat 3ConceptSelectEntry2A0DF9708-2A2F-11E5-AB29-DF52BC3B2788
Select Seat 4ConceptSelectEntry3A0DF970A-2A2F-11E5-AB29-DF52BC3B2788
Select Seat 5ConceptSelectEntry4A0DF970C-2A2F-11E5-AB29-DF52BC3B2788
Aside of this, there's also ConceptSelectEntry5 identifier that's not present in the in-game menu
In vehicle (land.dbx)
FunctionNameCode
FireConceptFireA0DF96B4-2A2F-11E5-AB29-DF52BC3B2788
AccellerateConceptMoveFBA0DF96B8-2A2F-11E5-AB29-DF52BC3B2788
Brake / ReverseConceptBrakeA0DF96BC-2A2F-11E5-AB29-DF52BC3B2788
Turn LeftConceptMoveLRA0DF96C0-2A2F-11E5-AB29-DF52BC3B2788
Turn RightConceptMoveLRA0DF96C0-2A2F-11E5-AB29-DF52BC3B2788
Aim Turret UpConceptPitchA0DF96C7-2A2F-11E5-AB29-DF52BC3B2788
Aim Turret DownConceptPitchA0DF96C7-2A2F-11E5-AB29-DF52BC3B2788
Aim Turret LeftConceptRollA0DF96CE-2A2F-11E5-AB29-DF52BC3B2788
Aim Turret RightConceptRollA0DF96CE-2A2F-11E5-AB29-DF52BC3B2788
Snap ViewConceptSnapViewCameraA0DF96D5-2A2F-11E5-AB29-DF52BC3B2788
Zoom / Vehicle specializationConceptZoomA0DF96D9-2A2F-11E5-AB29-DF52BC3B2788
Look LeftConceptCameraYawA0DF96E4-2A2F-11E5-AB29-DF52BC3B2788
Look RightConceptCameraYawA0DF96E4-2A2F-11E5-AB29-DF52BC3B2788
Look UpConceptCameraPitchA0DF96DD-2A2F-11E5-AB29-DF52BC3B2788
Look DownConceptCameraPitchA0DF96DD-2A2F-11E5-AB29-DF52BC3B2788
Cycle RadioConceptSelectInventoryItem9A0DF96EB-2A2F-11E5-AB29-DF52BC3B2788
As pilot (air.dbx)
FunctionNameCode
FireConceptFireA0DF960D-2A2F-11E5-AB29-DF52BC3B2788
AscendConceptMoveFBA0DF9611-2A2F-11E5-AB29-DF52BC3B2788
DescendConceptMoveFBA0DF9611-2A2F-11E5-AB29-DF52BC3B2788
Pitch UpConceptPitchA0DF9618-2A2F-11E5-AB29-DF52BC3B2788
Pitch DownConceptPitchA0DF9618-2A2F-11E5-AB29-DF52BC3B2788
Yaw LeftConceptYawA0DF961F-2A2F-11E5-AB29-DF52BC3B2788
Yaw RightConceptYawA0DF961F-2A2F-11E5-AB29-DF52BC3B2788
Roll LeftConceptRollA0DF9626-2A2F-11E5-AB29-DF52BC3B2788
Roll RightConceptRollA0DF9626-2A2F-11E5-AB29-DF52BC3B2788
Snap ViewConceptSnapViewCameraA0DF9631-2A2F-11E5-AB29-DF52BC3B2788
Free LookConceptZoomA0DF962D-2A2F-11E5-AB29-DF52BC3B2788
Vehicle specializationConceptAltFireA0DF964B-2A2F-11E5-AB29-DF52BC3B2788
Look LeftConceptCameraYawA0DF963C-2A2F-11E5-AB29-DF52BC3B2788
Look RightConceptCameraYawA0DF963C-2A2F-11E5-AB29-DF52BC3B2788
Look UpConceptCameraPitchA0DF9635-2A2F-11E5-AB29-DF52BC3B2788
Look DownConceptCameraPitchA0DF9635-2A2F-11E5-AB29-DF52BC3B2788
UAV AscendConceptJumpA0DF9643-2A2F-11E5-AB29-DF52BC3B2788
UAV DescendConceptChangePoseA0DF9647-2A2F-11E5-AB29-DF52BC3B2788
Cycle RadioConceptSelectInventoryItem9A0DF964F-2A2F-11E5-AB29-DF52BC3B2788
Oddly, ConceptCamera commands can be assigned to any button, even those assigned to shared commands or other planes actions
Hidden (game executable and startup-00.fbrb only)
FunctionNameCode
N/AConceptToggleParachuteN/A
N/AConceptSquadLeaderChatN/A
N/AConceptVoiceFunction1N/A
N/AConceptChatMenuN/A
N/AConceptLargeMapN/A
N/AConceptSpawnMenuN/A
N/AConceptSelectN/A
N/AConceptDeclineN/A
N/AConceptAcceptN/A
N/AConceptCommMenu2N/A
N/AConceptCancelN/A
N/AConceptMenuN/A
N/AConceptScoreboardN/A
N/AConceptMapThreeDimensionalN/A
N/AConceptMapSizeN/A
N/AConceptSelectEntry7N/A
N/AConceptSelectEntry6N/A
N/AConceptNextPositionN/A
N/AConceptGearDownN/A
N/AConceptGearUpN/A
N/AConceptClutchN/A
N/AConceptHandBrakeN/A
N/AConceptSelectInventoryItem8N/A
N/AConceptSelectInventoryItem7N/A
N/AConceptCycleSecondaryInventoryN/A
N/AConceptPrevInventoryItemN/A
N/AConceptNextInventoryItemN/A
N/AConceptDropN/A
N/AConceptPickUpN/A
N/AConceptInteractN/A
N/AConceptFireCountermeasureN/A
N/AConceptMoveRightN/A
N/AConceptMoveLeftN/A
N/AConceptMoveBackwardN/A
N/AConceptMoveForwardN/A
Commands already present in the previous sections were omitted

Interestingly forward and backward movements for infantry are using the same "concept", while for vehicles they are two separate ones.

Also some actions (for example, selecting seats) have just a single three lines long GUID, while others (for example view and character/plane movements) can be as big as 6 eight lines long GUIDs

EDIT: ok, I checked the X360 game, and the only reference to controls I could find was in \dist\xenon\async\startup-00.fbrb\Menu\shared_config.dbx
Aside of a single byte it's the same you can find in the Windows version.
This last has additional folders, probably to account of the ability to customize commands (namely in Input\)

Mirh (talk)15:02, 15 July 2015