Anonymous edits have been disabled on the wiki. If you want to contribute please login or create an account.


Warning for game developers: PCGamingWiki staff members will only ever reach out to you using the official press@pcgamingwiki.com mail address.
Be aware of scammers claiming to be representatives or affiliates of PCGamingWiki who promise a PCGW page for a game key.

User:Suicide machine/Research bunker/Alekhines Gun settings structure

From PCGamingWiki, the wiki about fixing PC games

Settings of Alekhine's Gun are store mostly in 2 files - smersh.shadvs and settings.scg.

smersh.shadvs

Example of smersh.shadvs

File's structure is fairly easy to figure out, mostly because of a mix of String names describing it, followed 8-bytes (or 7) later by its value. Example: 0x0100:
........ModeWidth...............
................ModeHeight......
........................ModeBpp.

Hex representation:
000000000C0000004D6F64655769647468000000030000000005000000000000
0100000000000000000000000C0000004D6F6465486569676874000003000000
D002000000000000010000000000000000000000080000004D6F646542707000

Since PCs for many, many years have been using Little Endian, we have to remember to reverse the bytes to get our values, let's see then:
00 05 -> 05 00
D0 02 -> 02 D0

Now what's left is to convert these to decimal from hex:
05 00 -> 1280
02 D0 -> 720
Easy!

settings.scg

Example of settings.scg

Structure of settings.scg is sadly way harder to read. Assuming all of these config files are generated the same way, we are dealing with different type of values (of different byte length) saved at specific offsets. Fortunaty the file is fairly short:

Offset: Type (byte length) Description
0x00 String (4) Probably prefix
0x04 Unknown (4) -
0x08 Float (4) Mouse sensitivity
0x0C Byte (1) Mouse Y-axis inversion
0x0D Unknown (4) -
0x11 Int16 (2) Forward (button)
0x13 Int16 (2) Backward (button)
0x15 Int16 (2) Strafe left (button)
0x17 Int16 (2) Strafe right (button)
0x19 Int16 (2) Action (button)
0x1B Int16 (2) Pickup (button)
0x1D Int16 (2) Use (button)
0x1F Int16 (2) Crouch (button)
0x21 Int16 (2) Instinct (button)
0x23 Int16 (2) Fire (button)
0x25 Int16 (2) Secondary Fire (button)
0x27 Int16 (2) Run (button)
0x29 Int16 (2) Raise Knife (button)
0x2B Int16 (2) Raise Chloroform (button)
0x2D Int16 (2) Raise Garrote (button)
0x2F Int16 (2) Raise Pistol (button)
0x31 Int16 (2) Raise Machinegun (button)
0x33 Int16 (2) Use attract device (button)
0x35 Int16 (2) Raise/holster gun (button)
0x37 Int16 (2) Reload (button)
0x39 Int16 (2) Whistle (button)
0x3B Int16 (2) Select player (button)
0x3D Int16 (2) Show map (button)
0x3F Int16 (2) Show task (button)
0x41 Int16 (2) Show objectives (button)
0x43 Int16 (2) Inventory (button)
0x45 Int16 (2) Drop current item (button)
0x47 Unknown (4) -
0x4B Float (4) Music volume
0x4F Float (4) Ambient sounds volume
0x53 Float (4) Effects volume
0x57 Float (4) Voices volume
0x5B Byte (1) Dynamic shadows
0x5C Byte (1) Post filters
0x5D Byte (1) Ambient Occlusion
0x5E Byte (1) HDR Rendering
0x5F Float (4) Gamma
0x63 Int32 (4) Aspect ratio (that long for whatever reason)
0x67 Byte (1) Controller enabled
0x68 Byte (1) Language
0x69 Unknown (3) Possibly bytes for language (if Int32)
0x6C Byte (1) Controller Y-axis inversion (1.02)
0x6D Byte (1) Player backlight (1.02)