Game Development Community

List of script globals linked to engine code

by Joel Baxter · 05/05/2004 (12:08 pm) · 19 comments

This is a list of all the global script variables that may be created, read, or written by the engine code. I've started adding definitions; in the comments to this resource, please correct me as necessary and contribute definitions. I'll periodically update the resource with contributions.

As of this writing, the Mac and Unix builds use Host::BindAddress instead of Pref::Net::BindAddress. This is incorrect, so Host::BindAddress is not listed below.

Related resource: List of preferences variables


$AnisotropySupported

$Audio::numActiveLoopingStreams

$Audio::numActiveStreams

$Audio::numCulledLoopingStreams

$Audio::numInactiveLoopingStreams

$Audio::numLoopingStreams

$Audio::numNullActiveStreams

$Audio::numOpenHandles

$Audio::numOpenLoopingHandles

$Camera::movementSpeed
Speed of movement for a free-flying camera.

$Client::MissionFile
Name of the current mission file; used when creating a name for the lighting (.ml) file.

$Collision::boxSize

$Collision::depthRender

$Collision::depthSort

$Collision::renderAlways

$Collision::testClippedPolyList

$Collision::testDepthSortList

$Collision::testExtrudedPolyList

$Collision::testPolytope

$Con::Prompt
Console prompt character(s).

$Con::WindowTitle, win32 and mac only
Console window title.

$DamageType::Ground

$DamageType::Impact

$DamageType::Water

$DbgSetCursorWatch

$Demo::playbackTime

$DisableSystemProfiling, win32 and mac only

$DocRoot

$EventModifier::ALT
$EventModifier::CTRL
$EventModifier::LALT
$EventModifier::LCTRL
$EventModifier::LSHIFT
$EventModifier::RALT
$EventModifier::RCTRL
$EventModifier::RSHIFT
$EventModifier::SHIFT

$FP::DisableAsserts

$FogCoordSupported

$GUI::clipboardFile

$GUI::fontCacheDirectory

$Game::argc
Count of command-line arguments, including the app name.

$Game::argv array, indices 0 through $Game::argc-1
Command-line arguments.

$GameBase::boundingBox
Enable/disable bounding boxes display for debugging.

$InspectingObject

$Inspector

$Interior::DontRestrictOutside

$Interior::insideDistanceFalloff

$Item::maxLatencyTicks

$Item::maxWarpTicks

$Item::minWarpTicks

$MasterServerAddress

$ModRoot

$OpenGL::primCount array, indices 0 through 3, win32 only

$OpenGL::triCount array, indices 0 through 3, win32 only

$PalettedTextureSupported

$Player::maxLatencyTicks

$Player::maxPredictionTicks

$Player::maxWarpTicks

$Player::minWarpTicks

$PlayingOnline, win32 and unix only

$Pref::Audio::ForceMaxDistanceUpdate
May have something to do with detecting if the cutoff distance changes for sounds; however, currently this variable is ignored. (Engine code that would link to this is commented out.)

$Pref::Client::ServerFavoriteCount
Number of favorite servers.

$Pref::Client::ServerFavorite array, indices 0 through $Pref::Client::ServerFavoriteCount-1
Favorite server name, followed by tab, followed by server address:port.

$Pref::CloudOutline
Whether to outline the clouds.

$Pref::CloudsOn
Enable/disable cloud layers.

$Pref::Decal::DecalTimeout
Decal lifetime in milliseconds.

$Pref::Decal::MaxNumDecals
Maximum number of decals.

$Pref::DecalsOn
Whether to add decals.

$Pref::Editor::VisibleDistance
Visible distance when the editor is active.

$Pref::EnvironmentMaps
Enable/disable environment mapping effects on objects.

$Pref::Input::Joystickx::Axis array, x is device ID, indices 0 through numAxes-1, unix only

$Pref::Input::JoystickEnabled, win32 and unix only
Enable/disable joystick input.

$Pref::Input::KeyboardEnabled, win32 and unix only
Enable/disable keyboard input.

$Pref::Input::MouseEnabled, win32 and unix only
Enable/disable mouse input.

$Pref::Interior::DetailAdjust
Adjust the structure's calculated visible size before selecting level of detail (from 0.3 to 1.0).

$Pref::Interior::DynamicLights
Enable/disable rendering of dynamic lights on structures.

$Pref::Interior::LightUpdatePeriod
Milliseconds between lighting recalculation for structures.

$Pref::Interior::LockArrays
Enable/disable compiled vertex arrays optimization (if supported).

$Pref::Interior::ShowEnvironmentMaps
Enable/disable environment mapping effects on structures.

$Pref::Interior::TexturedFog
Enable/disable textured fog in structures (if supported).

$Pref::Interior::VertexLighting
Enable/disable vertex lighting (instead of lightmaps).

$Pref::Master array, indices 0 through 9
Master server region number followed by colon followed by master server address:port.

$Pref::Net::BindAddress
IP address to bind the server port to, if more than one is available.

$Pref::Net::LagThreshold
Ping time above which GameConnection::setLagIcon is called for a client.

$Pref::Net::PacketRateToClient
$Pref::Net::PacketRateToServer
Rate controls for client/server communication; ranges of 1-32 and 8-32 respectively.

$Pref::Net::PacketSize
Initial size in bytes of the comm buffer (may be enlarged if necessary); range 100-450.

$Pref::Net::RegionMask
Region number used to select master server.

$Pref::NumCloudLayers
Number of cloud layers to render.

$Pref::OpenGL::AllowCompression

$Pref::OpenGL::AllowTexGen

$Pref::OpenGL::Anisotropy

$Pref::OpenGL::DisableARBMultitexture

$Pref::OpenGL::DisableARBTextureCompression

$Pref::OpenGL::DisableEXTCompiledVertexArray

$Pref::OpenGL::DisableEXTFogCoord, win32 only

$Pref::OpenGL::DisableEXTPalettedTexture

$Pref::OpenGL::DisableEXTTexEnvCombine

$Pref::OpenGL::DisableSubImage

$Pref::OpenGL::Force16BitTexture

$Pref::OpenGL::ForcePalettedTexture

$Pref::OpenGL::GammaCorrection

$Pref::OpenGL::InteriorMipReduction, win32 only

$Pref::OpenGL::LightingAmbientColor

$Pref::OpenGL::MaterialAmbientColor

$Pref::OpenGL::MaterialDiffuseColor

$Pref::OpenGL::MaxHardwareLights

$Pref::OpenGL::MipReduction, win32 only

$Pref::OpenGL::NPatch

$Pref::OpenGL::NPatchLevel

$Pref::OpenGL::NoDrawArraysAlpha

$Pref::OpenGL::NoEnvColor

$Pref::OpenGL::NumFSAASamples, mac only

$Pref::OpenGL::SkyMipReduction, win32 only

$Pref::OpenGL::TextureAnisotropy

$Pref::OpenGL::TextureTrilinear

$Pref::Player::RenderMyItems
Enable/disable drawing images mounted on the client's player.

$Pref::Player::RenderMyPlayer
Enable/disable rendering the client's own player object.

$Pref::PrecipitationOn
Enable/disable precipitation.

$Pref::PrePause
Enable/disable motion of precipitation.

$Pref::SceneLighting::CacheLighting

$Pref::SceneLighting::CacheSize

$Pref::SceneLighting::PurgeMethod

$Pref::SceneLighting::TerrainAllowLexelSplits

$Pref::SceneLighting::TerrainGenerateLevel

$Pref::Server::Info
String describing the server, provided to queries.

$Pref::Server::MaxPlayers
Maximum number of clients that can connect to the server.

$Pref::Server::Name
Name of server, provided to queries.

$Pref::Server::Password
Password for server access.

$Pref::Server::RegionMask
Bitfield specifying which region(s) the server belongs to... region numbering scheme unknown?

$Pref::Shadows

$Pref::SkyOn

$Pref::Terrain::DynamicLights

$Pref::Terrain::EnableDetails

$Pref::Terrain::NPatch

$Pref::Terrain::NPatchLevel

$Pref::Terrain::ScreenError

$Pref::Terrain::TexDetail

$Pref::Terrain::TextureCacheSize

$Pref::TradeshowDemo

$Pref::TS::AutoDetail

$Pref::TS::DetailAdjust

$Pref::TS::FogTexture

$Pref::TS::ScreenError

$Pref::TS::SkipFirstFog

$Pref::TS::SkipLoadDLs

$Pref::TS::SkipRenderDLs

$Pref::Video::AllowD3D

$Pref::Video::AllowOpenGL

$Pref::Video::AppliedPref

$Pref::Video::ClipHigh

$Pref::Video::DefaultsRenderer, win32 and mac only

$Pref::Video::DefaultsVendor, win32 and mac only

$Pref::Video::DeleteContext, win32 and mac only

$Pref::Video::DisableVerticalSync

$Pref::Video::DisplayDevice

$Pref::Video::FullScreen
Select fullscreen or windowed display.

$Pref::Video::MonitorNum, mac only

$Pref::Video::Only16

$Pref::Video::PreferOpenGL

$Pref::Video::ProfiledRenderer, win32 and mac only

$Pref::Video::ProfiledVendor, win32 and mac only

$Pref::Video::Resolution

$Pref::Video::SafeModeOn, win32 and mac only

$Pref::Video::WindowedRes, mac only

$Pref::VisibleDistanceMod

$SB::DFDec

$SB::WODec

$SceneLighting::lightingProgress

$SceneLighting::terminateLighting

$ScriptError

$Server::BotCount

$Server::Dedicated
Whether the server is a dedicated server or also moonlighting as its own client.

$Server::GameType
The name of your product or project.

$Server::GuidList

$Server::MissionName
The name of the current environment.

$Server::MissionType
The name of the style of gameplay currently in use.

$Server::PlayerCount
The number of clients currently connected.

$Server::ServerType
"SinglePlayer" or "MultiPlayer".

$ServerInfo::Address
$ServerInfo::BotCount
$ServerInfo::CPUSpeed
$ServerInfo::Dedicated
$ServerInfo::Favorite
$ServerInfo::GameType
$ServerInfo::Info
$ServerInfo::MaxPlayers
$ServerInfo::MissionName
$ServerInfo::MissionType
$ServerInfo::Name
$ServerInfo::Password
$ServerInfo::Ping
$ServerInfo::PlayerCount
$ServerInfo::State
$ServerInfo::Status
$ServerInfo::Version
Info returned from a server query.

$Sim::Time
Value from free-running milliseconds timer.

$SwapIntervalSupported

$T2::FogRejections

$T2::dynamicTextureCount

$T2::fullMipCount

$T2::levelZeroCount

$T2::renderOutline

$T2::staticTSU

$T2::staticTextureCount

$T2::textureSpaceUsed

$T2::unusedTextureCount

$TSControl::frameCount

$TextureCompressionSupported

$ThisControl

$TypeMasks::CameraObjectType
$TypeMasks::CorpseObjectType
$TypeMasks::DamagableItemObjectType
$TypeMasks::DebrisObjectType
$TypeMasks::EnvironmentObjectType
$TypeMasks::ExplosionObjectType
$TypeMasks::ForceFieldObjectType
$TypeMasks::GameBaseObjectType
$TypeMasks::GoalObjectType
$TypeMasks::GuiControlObjectType
$TypeMasks::InteriorObjectType
$TypeMasks::ItemObjectType
$TypeMasks::MarkerObjectType
$TypeMasks::PhysicalZoneObjectType
$TypeMasks::PlayerObjectType
$TypeMasks::ProjectileObjectType
$TypeMasks::ShapeBaseObjectType
$TypeMasks::StaticObjectType
$TypeMasks::StaticRenderedObjectType
$TypeMasks::StaticShapeObjectType
$TypeMasks::StaticTSObjectType
$TypeMasks::TerrainObjectType
$TypeMasks::TriggerObjectType
$TypeMasks::VehicleBlockerObjectType
$TypeMasks::VehicleObjectType
$TypeMasks::WaterObjectType
Values used in the bitflags returned by obj.getType().

$Video::numTexelsLoaded

$Video::texResidentPercentage

$Video::textureCacheMisses

$cameraFov

$dbgResult

$enableDirectInput, win32 only

$farDistance

$firstPerson

$fps::real

$fps::realTotal

$fps::virtual

$fps::virtualTotal

$frameSkip

$instantGroup
The group that game objects will be added to when created, unless they are created inside the creation statement of some SimGroup or SimSet.

$maxTerrPoints

$movementSpeed

$mvBackwardAction

$mvDownAction

$mvForwardAction

$mvFreeLook

$mvLeftAction

$mvMouseRoll

$mvPitch

$mvPitchDownSpeed

$mvPitchUpSpeed

$mvRightAction

$mvRoll

$mvRollLeftSpeed

$mvRollRightSpeed

$mvTriggerCount array, indices 0 through MaxTriggerKeys-1

$mvUpAction

$mvYaw

$mvYawLeftSpeed

$mvYawRightSpeed

$onSetWatch

$only

$platform

$platformUnixType, unix only

$screenSize

$showAutoDetail

$showBackwardAction

$showDownAction

$showForwardAction

$showLeftAction

$showMovementSpeed

$showPitch

$showRightAction

$showTransition

$showTransitionDuration

$showTransitionSynched

$showTransitionTargetPlay

$showUpAction

$showYaw

$specialFog

$terrainTestBmp

$timeAdvance

$timeScale

#1
04/06/2002 (8:03 am)
Wow this will be very useful when I get the Torque Engine in about a month. Thanks for the resource.
#2
04/06/2002 (3:45 pm)
Man, all that work and only one comment!

This resource looks extremely useful, as I plan to be getting Torque fairly soon (long story, I want to learn Torque very well before I make a project with it).
#3
04/06/2002 (8:52 pm)
Very usefull, i will mess with all i saw right now.
#4
04/07/2002 (7:06 pm)
very nice :)
is there a brigthness parameter for the video?
#5
04/07/2002 (9:37 pm)
$Pref::OpenGL::GammaCorrection should do the trick for that, but personally I haven't tested that one.
#6
11/22/2002 (6:02 am)
Ohh, that will be really usefull. Great work. Thanks Joel
#7
12/03/2003 (2:33 am)
Way cool
#8
04/30/2004 (5:37 am)
anyone know of a setting which affects the speed of a journal playback?
#9
05/05/2004 (12:58 pm)
Very nice. This will make life a whole lot less stressful. Thanks
#10
05/05/2004 (3:03 pm)
$timescale = ;

1.0 = Normal Speed
0.0 = "paused"
>1.0 = Fast Forward
#11
05/06/2004 (5:38 am)
Hey, very cool. Thanks a lot.

Ben
#12
07/21/2004 (12:44 pm)
Hi,

great ressource. However, you can change some of these arguments directly in the pref.cs and default.cs script files. in the c:\Torque\Example\xxxx\Client folder.
This will have the same effect.

I tried some of them and also those without any comment yet i couldnt figure out their deeper sense too. May be their for future versions of Torque or work only along with special hardware etc.

Alex
#13
10/10/2004 (5:34 pm)
Thanks Joel, exactly what I was after.
#14
04/27/2005 (6:01 pm)
I love you.
#15
04/28/2005 (4:26 am)
Has anyone an idea of how to active Antialiasing in Torque?
#16
08/06/2005 (3:35 pm)
I've also been looking for how to activate Antialiasing in Torque.
#17
12/19/2005 (8:33 pm)
Thanx, this resource helped me a lot
#18
01/24/2007 (5:52 pm)
just what i was looking for :)
#19
04/05/2009 (8:21 pm)
Es una buena guía, realmente es un buen trabajo, gracias por el esfuerzo.