SETUP.DAT (Witchaven)

From ModdingWiki
Jump to navigation Jump to search
SETUP.DAT (Witchaven)
Format typeConfiguration
StoringSound
Games

The Witchaven SETUP.DAT contains settings that are created by the game's SETUP.EXE. It is a simple array of bytes that each contain either an option value, or a scancode for keyboard configuration. The first 12 bytes are options, the next 27 are keyboard codes, the rest are non-keyboard control settings.

File structure

Offset Type Description
0 UINT8 Use a VESA video resolution if 1 (always set to 1)
1 UINT8 Unknown, always 1, never used?
2 UINT8 Unknown, always 1, never used?
3 UINT8 Mouse on (1) / off (0)
4 UINT8 SETUP.EXE always sets 0. BUILD.TXT says "option[4] is the COM1-COM4, network option"
5 UINT8 SETUP.EXE always sets 0. BUILD.TXT says "option[5] is the com speed selection option"
6 UINT8 Selects video mode. Valid values are 0x60 (320x200) or 0x62 (640x480). Other resolutions are possible to invoke by hex editing the file but the game does not handle them correctly.
7 UINT8 Unknown, always set to 0x16
8 UINT8 Music on (1) / off if both this and byte 9 are 0. Always set 0 by SETUP.EXE.
9 UINT8 Music on (1) / off if both this and byte 8 are 0. This is the one used in SETUP.EXE.
10 UINT8 Sound effects on (1) / off if both this and byte 11 are 0. Always set 0 by SETUP.EXE.
11 UINT8 Sound effects on (1) / off if both this and byte 10 are 0. This is the one used in SETUP.EXE.
12 UINT8 Keyboard scancode: Go forward
13 UINT8 Keyboard scancode: Go backward
14 UINT8 Keyboard scancode: Turn left
15 UINT8 Keyboard scancode: Turn right
16 UINT8 Keyboard scancode: Run
17 UINT8 Keyboard scancode: Strafe mode
18 UINT8 Keyboard scancode: Attack
19 UINT8 Keyboard scancode: Open / Close
20 UINT8 Keyboard scancode: Jump
21 UINT8 Keyboard scancode: Crouch
22 UINT8 Keyboard scancode: Look up
23 UINT8 Keyboard scancode: Look down
24 UINT8 Keyboard scancode: Look center
25 UINT8 Keyboard scancode: Strafe left
26 UINT8 Keyboard scancode: Strafe right
27 UINT8 Keyboard scancode: Map
28 UINT8 Keyboard scancode: Zoom in
29 UINT8 Keyboard scancode: Zoom out
30 UINT8 Keyboard scancode: Drink potion
31 UINT8 Keyboard scancode: Cast spell
32 UINT8 Unused?
33 UINT8 Keyboard scancode: Mouse look mode
34 UINT8 Unused, formerly meant for cancel flight?
35 UINT8 Keyboard scancode: Fly up
36 UINT8 Keyboard scancode: Fly down
37 UINT8 Unused key?
38 UINT8 Unused key?
39 UINT8 Mouse left button action
40 UINT8 Mouse right button action
41 UINT8 Joystick off (0) / on (1)
42 UINT8 Joystick button 1 action
43 UINT8 Joystick button 2 action
44 UINT8 Joystick button 3 action
45 UINT8 Joystick button 4 action

The mouse / joystick button actions that are "valid" for SETUP.EXE are:

Value Description
4 Run mode
5 Strafe mode
6 Attack
7 Open / Close
8 Jump
9 Crouch

However, it's possible to hex edit the file to bind them to other things. The values have the same order as the keyboard keys, just picture that the key action at offset 12 in the SETUP.DAT is value 0 and go up from there. (So setting button action to 0 binds it to Move Forward, etc.)

Source

The Witchaven source code and Ken Silverman's BUILD.TXT were consulted.