Turok EX Modding Guide

Console

Open the console with the ~ key.

Console commands can be added to config.cfg in the game's root directory to have them executed automatically when the game starts.

Commands

clear clear the console
listcmds list all console commands
listvars list all variables
help list all console commands and variables

seta <variable> <value> set the value of a variable
savegame <slot>

save to/load from the specified slot

savegame can save the current game state at any time, but your location will be reverted to the last checkpoint you reached or save totem you touched when loading

loadgame <slot>
screenshot take a screenshot (stored in the game's root directory)
pausegame pause/unpause the game
quit close the game

Statistics

these toggle real-time stats on the HUD

statheap RAM usage
statrhi rendering info
statscene how much stuff is being rendered, and how long it's taking
statfx kfx pool usage
statsound number of sounds playing
statobject number of game objects
statplayloop game loop time, game speed, player location and orientation
stattrail trail pool usage
debugai enables (for the nearest enemy?) and disables AI info display, respectively
cleardebugai
statscripts script object info?

these print out info to the console

listammodefs list all defined ammo types, weapons, actors
listweapondefs
listactordefs
listgamevars list the contents of GameVariables
printsoundinfo audio device and total channels
listresolutions list available screen resolutions
scriptmem script memory usage
listRuntimeClasses native classes in use, their parent class, and class number?

Visual Diagnostics

enable additional visualizations, or hide elements of the world

showcollision sector wireframe; highlighting current, adjacent, and special sectors
showbounds actor bounding boxes
showstaticbounds level geometry bounding boxes
showorigins actor origins
showgridbounds sector bounding boxes?
showobjectradius object collision radii
showlinkedareanodes
hidedrawmeshes do not render level geometry
hidedrawactors do not render actors
hidedrawfx do not render kfx
disableanimation halts all model animation, translation, and rotation

Testing

manually invoke various aspects of the game

call <function name> invoke the specified global function
callfile <file name> <function name> compile the specified file on the fly, and invoke the specified function within it
puke <script number> invoke the specified level script
spawnfx <file>

spawn a kfx at the player's location

e.g., spawnfx fx/bullet.kfx

testcinematic <mode>

play a cinematic:

  1. death
  2. pose
  3. fall death
  4. respawn
  5. key acquired
  6. boss defeated pose
testmusic <file>

play a music track

e.g., testmusic music/track01.ogg

testsoundshader <file>

play a ksnd

e.g., testsoundshader sounds/shaders/explosion_1.ksnd

Key Binds

only controls are listed here, but any console command can be bound to a key for more convenient use

bind <key> <command>

bind a command to an input

multiple commands can be bound to a single input with multiple bind commands

unbind <key> <command> unbind a command from an input
listbinds lists all current key binds
forward run around
backward
strafeleft
straferight
jump jump
attack fire the current weapon
weaponext select next/previous weapon
weapprev
weapon <weapon num> select the specified weapon
automap toggle map display
mapzoomin zoom map display in/out
mapzoomout
menu_activate if in-game, bring up the menu
otherwise, back out one level
menu_up change menu selection
menu_down
menu_left
menu_right
menu_select select the current menu item
menu_back back out one level in the menu
menu_cancel does nothing?

Cheats

these don't unlock the cheats, just toggle their effects

invincibility player takes no damage
spiritmode toggles spirit mode
giveweapons receive all weapons
infiniteammo toggle unlimited ammo
infinitelives dying doesn't deduct lives
allkeys receive all keys and warp to hub
mapall reveal the entire map, and show actors on the map
bigheads toggle big headed enemies
tinyenemies toggle tiny enemies
purdycolors colorizes world geometry
discomode spirit mode-style lighting and dancing enemies
warpcheat <level num> warps you to the beginning of the specified level
warpboss <boss num>

warp to a boss fight:

  1. longhunter
  2. mantis
  3. t-rex
  4. campaigner
showcredits start the ending credits sequence
fly toggle fly mode
showenemies show enemies on the map

these are additional cheats that aren't in the cheats menu

map <filename>

load the specified map

e.g., map levels/level42.map

noclip toggle player clipping
god

player takes no damage

resets on map change, unlike invincibility

giveammo receive ammo of all types
gamespeed <speed> change the speed of everything except Turok (like spirit mode) (0.0 to 1.0)
freezeobjects freezes everything but the player

Other Commands

convertobj <file.obj> model import/export functions
exportobj <file.bin>
exportanimobj <file.bin>
makesprite tool for generating sprite sheets?
buildvis <file.map> <subdiv samples (default = 3)>
bugit <title for the bug to report> bug reporting tools?
bugitgo <x y z sector yaw pitch roll>
showmenu <type>
dumplocalizedtext
purgemodels

Variables

Enter a variable's name to see its current value, default value (in parentheses), and its description.

Set a variable's value with seta.

Input

cl_msensitivityx mouse horizontal/vertical sensitivity
cl_msensitivityy
cl_mlookinvert invert mouse vertical axis
cl_mousesmooth

mouse smoothing

integer from 0 to 4

cl_joylooksensitivity_x joystick horizontal/vertical look sensitivity
cl_joylooksensitivity_y
cl_joymovesensitivity joystick move sensitivity
cl_joystickthreshold turn acceleration threshold
cvarJoyInvertLook invert joystick vertical look axis
in_joystick_xaxis turning axis
in_joystick_xinvert
in_joystick_yaxis move forward/back axis
in_joystick_yinvert
in_joystick_strafeaxis move left/right axis
in_joystick_strafeinvert
in_joystick_lookaxis look up/down axis
in_joystick_lookinvert

Gameplay

g_perpolyparticlecollision

precise projectile collision

allows particles with bPerPolyCollision to use actual model geometry for detecting collision with the level, rather than the nav mesh

g_extendeddrawdistance

pushes out the fog wall (applies values defined in defs/mapInfo.txt)

see also r_zfarextent

g_showintromovie play Night Dive intro on startup
g_showgameintros play Acclaim, Iguana, and Turok intros on startup
g_showplayerdeath

play 3rd person death and respawn cutscenes

falling death cutscene will always play regardless of this setting

g_weaponbobbing replace weapon running animation with simple weapon bob
g_autoswitchnewweapon automatically switch to new weapons when picked up
g_environmentsounds play environmental sounds (roars, chirps, etc.)
g_violencelevel
  1. red blood
  2. green blood
  3. no blood (violet flashes)
g_headbob camera motion when running forward/backward and jumping
g_turnbob camera tilt when turning/strafing
g_viewgroundtrack tilt camera up/down when going up/downhill
g_underwaterbob camera waver when in water + warping effect while underwater
g_showcrosshair show a crosshair on the HUD
g_drawhud

HUD + screen coloration

turning this off completely disables the HUD, including the weapon wheel, messages, and the crosshair

it also disables view coloration (pickup/damage flashing, underwater blue tinting)

hud_opacity

0 to 255

affects lives, life force, health, and ammo

does not affect messages, the weapon wheel, crosshair, or view coloration (pickup/damage flashing, underwater blue tinting)

g_drawweapon render first person weapon model

Graphics

r_fxaa enable anti-aliasing
r_bloom enable bloom
r_bloomthreshold brightness threshold for a pixel to create bloom
r_bloomalpha bloom brightness (0.0 to 1.0)
r_lightscatter enable "god rays"
r_lightscatterexposure "god ray" brightness
r_useocclusionquery use occlusion queries
r_water_refraction distortion when looking through water surfaces
r_water_reflection reflective water surfaces
r_simpleactorshadows blob shadows under actors (no shadows at all when disabled)
r_finish force GPU command sync
r_rhimaxanisotropic anisotropic filter quality
r_fov vertical field of view
r_saturation post-process for adjusting brightness without washing out colors
r_saturationpower brightness adjustment (1.0 is no adjustment)
r_saturation_r brightness red, green, and blue tinting
r_saturation_g
r_saturation_b

Audio

snd_volume effects volume scalar
snd_musicvolume music volume scalar
g_altsoundtrack
  1. N64 music
  2. PC music
snd_hardwarereverb enable echoes in caves, catacombs, level 8

Video

v_width display resolution
v_height
r_rhirenderfamily

graphics API (ignored on Mac/Linux)

options are d3d11 or opengl

v_refresh full-screen refresh rate
v_windowed windowed mode
v_borderless in windowed mode, hide window borders
v_vsync enable vsync
v_displaymonitor index for which monitor to render to

Other Variables

g_language
  1. English
  2. French
  3. German
  4. Italian
  5. Spanish
developer

allows the game to load unpackaged files

also causes the game to output some additional information to the console

kf_basepath

the game's root directory

defaults to the folder the game's exe is in

can be an absolute path, or relative to the default

con_alwaysShowConsole keep console output visible, even when the console is closed
con_showfps show the framerate in the top-right of the HUD
con_stickySpeed how long (in ms) a key needs to be held in the console before beginning to repeat
cl_maxfps FPS cap (limited to 60)
r_testspiritcolors activates spirit mode lighting
cl_bugreportsavebackbuffer
cl_maxlatetics
r_zfarextent

fog distance adjustment

positive values push it out, negative values pull it in (default 0.0)

this can be used to extend the fog beyond g_extendeddrawdistance, but enemy AI will not be affected (they will be oblivious beyond normal fog distance)

r_gridboundocclusionmultiplier
r_waterplaneocclusionmultiplier
r_maxocclusionunit
jobs_prioritize
v_depthsize
v_stencilsize
v_buffersize
v_displayrestart internal use only
in_profilejoybuttons
g_dumpmapscripts