The CFG file In Detail  v01-01-2000  Release 1 RTCM Cyborg

Introduction | Basic Syntax | Headers & Parameters | Tips & Stuff | Appendix 1 | Appendix 2

Introduction

This guide is designed to allow you complete control over your game configuration - control not possible through the setup program. It may also be useful if you want to write your own setup program for a front-end or such.

Basic Syntax

The basic syntax is:

;

Lines starting with a semi-colon designate a comment. You can safely remove all of these if you wanted.

Param = value

Configuration options are set in this syntax. The values parameters take can either be numerical values or strings enclosed in double quotes. These are all covered later.

[Header]

The square brackets header groups of configuration parameters. It's best not to play with the order or the groupings of parameters under them as this can cause Duke3D to become confused and not pass startup.

Headers & Parameters

The headers and their parameters

Sorted in the order they appear in the setup file

[Setup]

SetupVersion = ""

Depending on what game you'll have this'll either be "1.4" or "1.3". It'll be something else if you're playing the shareware version but you really should own a copy by now.

[Screen Setup]

ScreenMode = x

Decides which mode the Build engine will use for video. x is a value 0 to 6. 2 is the default. The modes are:

0 - Chained VESA, for those strange 360x400 modes et al, but these will probably not work for you. BSETUP.EXE, the build setup programme, has a more exhaustive video setup than SETUP.EXE if you want to experiment.
1 - Vesa 2.0, use for 320x200 all the way to 1600x1200
2 - Screen buffered, the default mode, 320x200 only
3 - Tseng optimised - I doubt you have one, and it's 320x200 only
4 - Paradise optimised - ditto, old video card and low res
5 - S3 optimised - ditto
6 - RedBlue stereo - stereo effect as used by 50's 3D cinema where you have to wear those funny glasses. Fun to try but low res only
7 - Crystal Eyes - you'll probably not have this hardware, but it's another stereo vision effect. Again it's only low res.
 

ScreenWidth = xxx
ScreenHeight = xxx

If you're using ScreenMode 0 or 1 these parameters will set the screen resolution. There are obviously quite a few but the most common ones will probably be 320x200, 640x480 and 1024x768. If your hardware can take it you can go up to 1600x2000, perhaps more.

Shadows = x

Determines whether or not actors will cast shadows. 0 is off, 1 is on.

Password = ""

The Adult Lock password hiding in the sound setup.

Detail = x

Level of detail in rendering. 0 is low detail and 1 is high. 0 looks a bit pants and you'd never use it unless you were playing on a 486 33SX.

Tilt = x

When you die this determines whether or not you'll see the world from a strange angle. 0 is on, 1 is off.

Messages = x

Displays ingame messages. 0 is off, 1 is on.

Out = 0

If it's 0 Adult Mode is on, if it's 1 Adult Mode is off.

ScreenSize = x

The amount of visible space from 0 to 64 in game, 64 being the smallest visible space, 0 the largest. The in game slider works in steps of 4. You'll probably not want a teeny screen though so 0,4 or 8 are probably your best bet.

ScreenGamma = x

The gamma correction level. In game you can go from 0 to 28 in eight settings using F11 but you can set it much higher in this parameter - up to 63 - and you can control that from the in game gamma correction slider.

[Sound Setup]

Probably the most common complaint in setting up Duke is sound related. Firstly you must be aware of the issue surrounding the reverb effect used by the Duke3D sound engine. This effect can cause crashes on modern cards that do not like direct hardware access. If you have a SB Live! card this is one major offender. You can obtain a patch to disable the reverb effect from www.advsys.net/ken Ken Silverman's website. If you're crashing immediately on entering E1L4 then you probably have this problem.

The next on the most asked list is sound and NT based OSs. This is again related to hardware access - NT is not forgiving at all to Duke3D and will most likely not make a sound. The best route is to have a dual boot system. The only other alternative is to try an emulator.

If you're attempting to setup the sound manually using this guide you should be aware of how to obtain your system settings. Right click 'My Computer' and select Properties. Select the 'Device Manager' tab. Select the sound, video and game controllers portion of the hardware list. You should see your sound card drivers in this list. There may be several as many modern cards use separate drivers for emulating SoundBlaster cards through DOS. Choose the most likely candidates and click the properties button for their properties. Select the 'Resources' tab and write down the resources and the addresses used so you can fill in the required information below. Also make sure you read the help file supplied for information on the 'SET BLASTER' command (DN3DHELP.EXE) and have it open to refer to.

FXDevice = x

Determines which sound card you have for digital sounds:

0 - A type of Sound Blaster card
1 - Pro Audio Spectrum
2 - Sound Man 16
6 - AWE 32
8 - SoundScape
9 - Gravis Ultrasound
10 - Disney Sound Source
11 - Tandy Sound Source
13 - No device

MusicDevice = x

Determines which sound card you have for music:

0 - A type of Sound Blaster card
1 - Pro Audio Spectrum
2 - Sound Man 16
3 - Adlib
4 - General MIDI
5 - Sound Canvas
6 - AWE 32
7 - WaveBlaster
8 - SoundScape
9 - Gravis Ultrasound
13 - No device
 

N.B. Device 12 is the PC Speaker, but it doesn't have any use for either music or effects

FXVolume = xxx
MusicVolume = xxx
Stored variables for the ingame volume settings - you probably won't need to touch these.
NumVoices = x
Maximum number of digital sounds which can be played at once. The game setup allows 1 to 8 but you can go higher. The Atomic setup will accept around 600 but whether or not there are this many channels allocated is unclear. 64 will probably be sufficient.
NumChannels = x
Set to 2 for stereo or 1 for mono sounds
NumBits = x
Set the bitrate for digital sounds, 8 for 8bit and 16 for 16bit - 16bit being higher quality.
MixRate = x
Ste the mixing rate for digital sounds. The higher the frequency the higher the quality. 44000 is the highest you can set through setup and as the Duke3D sounds are not sampled at very high rates the highest you'll need.
MidiPort = x
The resource address for the MIDI device (Input/Output range), copy it down from your settings, but write it with a x after the first number like this: 0x000
This is only used for certain MIDI card types described below.
BlasterAddress = x
The hex address for your digital sound as written down from your resource information (Input/Output range). Write it with a x after the first number like this: 0x000
BlasterType = x
The type of Sound Blaster card. Read the help files supplied with Duke3D for more information.
BlasterInterrupt = x
The interrupt request number as gathered from the resources tab .
BlasterDma8 = x
The 8bit DMA as gathered from the resources tab. This will most likely be the first DMA listed in the resources tab.
BlasterDma16 = x
The 16bit DMA as gathered from the resources tab. This will most likely be the second DMA listed in the resources tab.
BlasterEmu = x
Special value for AWE32 cards only.
ReverseStereo = x
Will reverse left and right channels if set to 1, otherwise will leave them be if set to 0
SoundToggle = x
Controls whether or not digital sounds are set on, 1 is on, 0 is off
VoiceToggle = x
Controls whether or not DukeTalk is being used, 1 is on, 0 is off
AmbienceToggle = x
Controls whether or not ambient sounds are on, 1 is on, 0 is off
MusicToggle = x
Controls whether or not music is on, 1 is on, 0 is off
[KeyDefinitions]
There's a list of valid parameter values in Appendix 1. Every action can have two keys assigned to it.
Move_Forward = "" ""
Key moves the player forward
Move_Backward = "" ""
Key moves the player backward
Turn_Left = "" ""
Key turns the player left
Turn_Right = "" ""
Key turns the player right
Strafe = "" ""
Key modifies turning to strafe (side step) instead whilst depressed
Fire = "" ""
Key fires current weapon
Open = "" ""
Key activates various devices and doors that are close enough
Run = "" ""
Key modifies current speed whilst depressed to running speed
AutoRun = "" ""
Key toggles autorun mode, whereby the player will be constantly running if the mode is active
Jump = "" ""
Player will jump if key is pressed
Crouch = "" ""
Player will crouch while key is pressed
Look_Up = "" ""
Player will look up whilst key is pressed and view will centre when key is released
Look_Down = "" ""
Player will look down whilst key is pressed and view will centre when key is released
Look_Left = "" ""
Player will look left whilst key is pressed and view will centre when key is released
Look_Right = "" ""
Player will look right whilst key is pressed and view will centre when key is released
Strafe_Left = "" ""
Player will side step left whilst key is pressed
Strafe_Right = "" ""
Player will side step right whilst key is pressed
Aim_Up = "" ""
Player will aim up whilst key is pressed. View will remain when key is released
Aim_Down = "" ""
Player will aim down whilst key is pressed. View will remain when key is released
Weapon_1 = "" ""
Key will change weapon to foot
Weapon_2 = "" ""
Key will change weapon to pistol
Weapon_3 = "" ""
Key will change wepaon to shotgun
Weapon_4 = "" ""
Key will change weapon to chaingun
Weapon_5 = "" ""
Key will change weapon to RPG
Weapon_6 = "" ""
Key will change weapon to Pipebomb. Key will also change pipebomb trigger to pipebomb for multiple pipebomb detonations
Weapon_7 = "" ""
Key will change weapon to Shrinker and toggle Shrinker and Expander in the Atomic version
Weapon_8 = "" ""
Key will change weapon to Devastator
Weapon_9 = "" ""
Key will change weapon to trip bomb
Weapon_10 = "" ""
Key will change weapon to Freezer
Inventory = "" ""
Active currently selected inventory item
Inventory_Left = "" ""
Scroll left through the inventory items
Inventory_Right = "" ""
Scroll right through the inventory items
Holo_Duke = "" ""
Key will activate the Holoduke
Jetpack = "" ""
Key will activate the jetpack
NightVision = "" ""
Key will activate the night vision goggles
MedKit = "" ""
Key will use the medikit
TurnAround = "" ""
Player will activate 180 degree turns whilst key is pressed.
SendMessage = "" ""
Activates multiplayer message mode
Map = "" ""
Toggles the overhead map mode from none, to overlayed to textured.
Shrink_Screen = "" ""
Decreases visible screen area
Enlarge_Screen = "" ""
Increases visible screen area
Center_View = "" ""
Key will return the player's view to the central position
Holster_Weapon = "" ""
Key will lower the current weapon
Show_Opponents_Weapon = "" ""
Key toggles whether or not multiplayer opponent's weapons are visible above their heads or not
Map_Follow_Mode = "" ""
Changes the overhead map mode from following the player movements to the player movement keys moving it whilst the player is stationary.
See_Coop_View = "" ""
Allows players to see through the eyes of their friends in co-op mode
Mouse_Aiming = "" ""
Depending on the MouseAiming setting will either toggle the mouse aiming mode for the vertical mouse motions or enable aiming mode whilst the key is depressed and deactivate it when it's released
Toggle_Crosshair = "" ""
Toggles the game's aiming crosshair
Steroids = "" ""
Activates the 'Steroids' inventory item
Quick_Kick = "" ""
Key will make the player perform a kick
Next_Weapon = "" ""
Key will cycle to next weapon in numerical order
Previous_Weapon = "" ""
Key will cycle to previous weapon in numerical order
[Controls]

ControllerType = x
Determines what controllers Duke3D is using. The possibilities are:

0 - Keyboard
1 - Keyboard and Mouse
2 - Keyboard and Joystick
3 - Keyboard and Gamepad
4 - Keyboard and External
5 - Keyboard and FlightStick
6 - Keyboard and ThrustMaster
 
JoystickPort = x
Number of port joystick is in, 0 or 1 probably, but perhaps 2 or 3 if you have four joysticks attached
MouseSensitivity = x
A value that determines the overall sensitivity to mouse input. Default is 32768.
ExternalFilename = ""
External file used for controlling some other device not covered by setup.
EnableRudder = x
Enable the rudder control on the joystick, 1 is on, 0 is off
MouseAiming = x
Sets the mode for the mouse aiming key. 0 means toggle mode, 1 means temporary mode
MouseAimingFlipped = x
Reverses the aiming motion of the vertical mouse movement, 1 is flipped, 0 is normal Valid parameters for game actions are listed in Appendix 2
MouseButton0 = ""
Action to be taken when left mouse button is pressed
MouseButtonClicked0 = ""
Action to be taken when left mouse button is double clicked
MouseButton1 = ""
Action to be taken when right mouse button is pressed
MouseButtonClicked1 = ""
Action to be taken when right mouse button is double clicked
MouseButton2 = ""
Action to be taken when middle mouse button is pressed
MouseButtonClicked2 = ""
Action to be taken when right mouse button is double clicked
JoystickButton0 = ""
Action to be taken when button 0 is pressed on the joystick
JoystickButtonClicked0 = ""
Action to be taken when button 0 is double clicked on the joystick
JoystickButton1 = ""
Action to be taken when button 1 is pressed on the joystick
JoystickButtonClicked1 = ""
Action to be taken when button 1 is double clicked on the joystick
JoystickButton2 = ""
Action to be taken when button 2 is pressed on the joystick
JoystickButtonClicked2 = ""
Action to be taken when button 2 is double clicked on the joystick
JoystickButton3 = ""
Action to be taken when button 3 is pressed on the joystick
JoystickButtonClicked3 = ""
Action to be taken when button 3 is double clicked on the joystick
JoystickButton4 = ""
Action to be taken when button 4 is pressed on the joystick
JoystickButtonClicked4 = ""
Action to be taken when button 4 is double clicked on the joystick
JoystickButton5 = ""
Action to be taken when button 5 is pressed on the joystick
JoystickButtonClicked5 = ""
Action to be taken when button 5 is double clicked on the joystick
JoystickButton6 = ""
Action to be taken when button 6 is pressed on the joystick
JoystickButtonClicked6 = ""
Action to be taken when button 6 is double clicked on the joystick
JoystickButton7 = ""
Action to be taken when button 7 is pressed on the joystick
JoystickButtonClicked7 = ""
Action to be taken when button 7 is double clicked on the joystick
MouseAnalogAxes0 = ""
Axes 0 is the left/right motion of the mouse.
Value can be, analog_moving, analog_turning or analog_strafing, 'moving' will move you forward/backwards, 'turning' will turn you left/right and 'strafing' will move you left/right.
MouseDigitalAxes0_0 = ""
Digital Axes 0_0 refers to the left motion. When you move left the action defined here is performed.
MouseDigitalAxes0_1 = ""
Digital Axes 0_1 refers to the right motion. When you move right the action defined here is performed.
MouseAnalogScale0 = x
The sensitivity of the left/right motion. 65535 is the default.
MouseAnalogAxes1 = ""
Axes 1 is the forward/backward motion of the mouse.
Value can be, analog_moving, analog_turning or analog_strafing, 'moving' will move you forward/backwards, 'turning' will turn you left/right and 'strafing' will move you left/right. Additionally analog_moving will aim up/down when mouse aiming is used.
MouseDigitalAxes1_0 = ""
Digital Axes 1_0 refers to the forward motion. When you move left the action defined here is performed.
MouseDigitalAxes1_1 = ""
Digital Axes 1_1 refers to the backward motion. When you move left the action defined here is performed.
MouseAnalogScale1 = x
The sensitivity of the forward/backward motion. 65535 is the default.
JoystickAnalogAxes0 = ""
Same as for the mouse but on a joystick or similar analogue input device.
JoystickDigitalAxes0_0 = ""
Same as for the mouse.
JoystickDigitalAxes0_1 = ""
Same as for the mouse.
JoystickAnalogScale0 = x
Same as for the mouse.
JoystickAnalogAxes1 = ""
Same as for the mouse.
JoystickDigitalAxes1_0 = ""
Same as for the mouse.
JoystickDigitalAxes1_1 = ""
Same as for the mouse.
JoystickAnalogScale1 = x
Same as for the mouse.
JoystickAnalogAxes2 = ""
Similar to the mouse but this is a rudder axis.
JoystickDigitalAxes2_0 = ""
Similar to the mouse but this is a rudder axis.
JoystickDigitalAxes2_1 = ""
Similar to the mouse but this is a rudder axis.
JoystickAnalogScale2 = x
Similar to the mouse but this is a rudder axis.
JoystickAnalogAxes3 = ""
Similar to the mouse but this is a throttle axis.
JoystickDigitalAxes3_0 = ""
Similar to the mouse but this is a throttle axis.
JoystickDigitalAxes3_1 = ""
Similar to the mouse but this is a throttle axis.
JoystickAnalogScale3 = x
Similar to the mouse but this is a throttle axis.
GamePadDigitalAxes0_0 = ""
Same as for the mouse but on a gamepad.
GamePadDigitalAxes0_1 = ""
Same as for the mouse.
GamePadDigitalAxes1_0 = ""
Same as for the mouse.
GamePadDigitalAxes1_1 = ""
Same as for the mouse.
GameMouseAiming = x
Seems to be linked to AimingFlag but has little use on its own.
AimingFlag = x
Determines whether or not the mouse aiming toggle mode is on or not. 0 is off, 1 is on.
[Comm Setup] ComPort = 2
Number of the COM port used for serial and modem games
IrqNumber = x
The IRQ of the COM/Modem
UartAddress = x
The UART type of the COM port
PortSpeed = x
The baud rate of the COM port. 9600 is the default
ToneDial = x
The type of phone, 0 is pulse, 1 is tone.
SocketNumber = x
The network game socket number
NumberPlayers = x
The number of players in the multplayer game
ModemName = ""
Type of modem. There's a whole load selectable through the setup menu that'll not be listed here.
InitString = ""
Modem initialization string. Refer to your modem documentation for information on this
HangupString = ""
Modem hang up string. Refer to your modem documentation for information on this
DialoutString = ""
Modem dial up string. Refer to your modem documentation for information on this
PlayerName = ""
The name that you're playing under. 10 characters max.
RTSName = ""
The file name of the RTS you're using
RTSPath = ".\"
The path the RTS file is in. This is the default path for the Duke3D directory
UserPath = ".\"
The path that the usermap is in. This is used by setup's usermap launch feature
PhoneNumber = ""
Phone number that the modem is to dial
ConnectType = 0
The type of multiplayer connection
CommbatMacro#x = ""
String of text that can be quickly called up in multiplayer games. x can be 0 to 9.
PhoneName#x = ""
PhoneNumber#x = ""
Stored names and numbers for modem games. x can be from 0 to 15.
[Misc]

Executions = x
The number of times the game has been run since the cfg file was created on this cfg file.
RunMode = x
If autorun is on this is set to 1, else it is 0.
Crosshairs = x
Shows the aiming crosshair if set to 1, else set to 0 for no crosshair.
WeaponChoicex = y
Favorite weapon selection order. x goes from 0 to 9 and y goes from 0 to 9 (0 is freezer, 1 is foot and so on).
Using this you can select the order that weapons will be automatically be selected when one has run out of ammo, starting from the top of the selection until a weapon that has ammo is available. By default the shotgun is highest on the list

Tips & Stuff

Tips and stuff

Well that's the end of the run down of almost everything in the cfg file. Now here are a few useful things you can do with this knowledge:

Don't get caught out by high explosives

How often have you run out of ammo in one weapon only to have it change to an RPG and you don't notice and accidentally blow yourself up in a heated battle? It's happened to me more than once. using the weapon choice you can avoid this ever happening again:
WeaponChoice0 = 3
WeaponChoice1 = 4
WeaponChoice2 = 7
WeaponChoice3 = 0
WeaponChoice4 = 2
WeaponChoice5 = 1
WeaponChoice6 = 5
WeaponChoice7 = 8
WeaponChoice8 = 9
WeaponChoice9 = 6
Using this will mean that once you run out of pistol ammo you will use your foot and have to select the explosive weapons manually, thus ensuring you won't accidentally kill yourself.

Mouse and keyboard control

Refer to my Quake setup guide setup-duke-cfg-quake for information on using a mouse more effectively as a control option based on a classic Quake setup I use.

Appendix 1

Appendix 1 - Possible Key Values

I'm not going to list all the obvious keys (ie A-Z (must be capitals), 0-9, F1-F12) but rather just the abbreviations for the ones that aren't obvious. Also you can't assign anything that requires shift to be written (ie !, :).

Escape - Escape
Tab - Tab
CapLck - Caps Lock
LShift - Left Shift
LCtrl - Left Control
LAlt - Left Alt
RShift - Right Shift
RCtrl - Right Control
RAlt - Right Alt
Enter - Enter
ScrLck - Scroll Lock
Insert - Insert
Delete - Delete
Home - Home
End - End
PgUp - Page Up
PgDn - Page Down
BakSpc - Back Space
Up - Cursor Up
Down - Cursor Down
Left - Cursor Left
Right - Cursor Right
NumLck - Num Lock
Kpad/ - Keypad /
Kpad* - Keypad *
Kpad- - Keypad -
Kpad+ - Keypad +
Kpad1 - Keypad 1
Kpad2 - Keypad 2
Kpad3 - Keypad 3
Kpad4 - Keypad 4
Kpad5 - Keypad 5
Kpad6 - Keypad 6
Kpad7 - Keypad 7
Kpad8 - Keypad 8
Kpad9 - Keypad 9
Kpad0 - Keypad 0
Kpad. - Keypad .
KpdEnt - Keypad Enter

Appendix 2

Appendix 2 - Possible Action Values

Aim_Down - aim down
Aim_Up - aim up
AutoRun - toggle autorun feature
Center_View - centre the view
Crouch - crouch
Enlarge_Screen - enlarge the screen
Fire - fire
Holo_Duke - toggle the holoduke
Holster_Weapon - holster your weapon
Inventory - use current inventory item
Inventory_Left - scroll left through inventory
Inventory_Right - scroll right through inventory
Jetpack - toggle the jetpack
Jump - jump
Look_Down - look down
Look_Left - look left
Look_Right - look right
Look_Up - look up
Map - toggle map modes
Map_Follow_Mode - toggle map follow mode
MedKit - use medikit
Mouse_Aiming - mouse aiming key
Move_Backward - move backward
Move_Forward - move forward
Next_Weapon - select next weapon in numerical order with ammo
NightVision - toggle night vision
Open - activate doors, etc...
Previous_Weapon - select previous weapon in numerical order with ammo
Quick_Kick - use mighty foot
Run - momentary run button
See_Coop_View - change to next person's view in co-op
SendMessage - change to message mode
Show_Opponents_Weapon - toggle weapon viewing mode for opponents in multiplayer
Shrink_Screen - reduce screen size
Steroids - use the steroids
Strafe - modify left/right turning to left/right strafing
Strafe_Left - strafe left
Strafe_Right - strafe right
Toggle_Crosshair - toggle crosshair
Turn_Left - turn left
Turn_Right - turn right
TurnAround - do a 180 degree turn
Weapon_1 - select weapon 1
Weapon_10 - select weapon 10
Weapon_2 - select weapon 2
Weapon_3 - select weapon 3
Weapon_4 - select weapon 4
Weapon_5 - select weapon 5
Weapon_6 - select weapon 6
Weapon_7 - select weapon 7
Weapon_8 - select weapon 8
Weapon_9 - select weapon 9