added everything

This commit is contained in:
Metario
2017-04-17 06:17:10 -06:00
commit 9c6ff74f19
6121 changed files with 1625704 additions and 0 deletions

1
example/DeleteDSOs.bat Executable file
View File

@ -0,0 +1 @@
del /s *.dso

6
example/DeleteDSOs.command Executable file
View File

@ -0,0 +1,6 @@
#!/bin/bash
cd "`dirname "$0"`"
find . -iname "*.dso" -and -not -ipath "*/tstpro/*" -print0 | xargs -0 rm -fv

4
example/DeletePrefs.bat Executable file
View File

@ -0,0 +1,4 @@
del /s prefs.cs
del /s config.cs
del /s config.cs.dso
del /s prefs.cs.dso

11
example/DeletePrefs.command Executable file
View File

@ -0,0 +1,11 @@
#!/bin/bash
cd "`dirname "$0"`"
find . -iname "prefs.cs" -print0 | xargs -0 rm -fv
find . -iname "config.cs" -print0 | xargs -0 rm -fv
find . -iname "prefs.cs.dso" -print0 | xargs -0 rm -fv
find . -iname "config.cs.dso" -print0 | xargs -0 rm -fv
find . -iname "banlist.cs" -print0 | xargs -0 rm -fv
find . -iname "banlist.cs.dso" -print0 | xargs -0 rm -fv

1
example/Demo.bat Executable file
View File

@ -0,0 +1 @@
torqueDemo.exe -game demo

6
example/Demo.command Executable file
View File

@ -0,0 +1,6 @@
#!/bin/bash
cd "`dirname "$0"`"
./Torque\ Demo\ OSX.app/Contents/MacOS/Torque\ Demo\ OSX -game demo

BIN
example/GettingStarted.pdf Executable file

Binary file not shown.

BIN
example/OpenAL32.dll Executable file

Binary file not shown.

6
example/Show mod.command Executable file
View File

@ -0,0 +1,6 @@
#!/bin/bash
cd "`dirname "$0"`"
./Torque\ Demo\ OSX.app/Contents/MacOS/Torque\ Demo\ OSX -mod show

View File

@ -0,0 +1 @@
torqueDemo.exe -game starter.fps -dedicated -mission starter.fps/data/missions/stronghold.mis

View File

@ -0,0 +1,5 @@
#!/bin/bash
cd "`dirname "$0"`"
./Torque\ Demo\ OSX.app/Contents/MacOS/Torque\ Demo\ OSX -game starter.fps -dedicated -mission starter.fps/data/missions/stronghold.mis

1
example/Starter.FPS.bat Executable file
View File

@ -0,0 +1 @@
torqueDemo.exe -game starter.fps

6
example/Starter.FPS.command Executable file
View File

@ -0,0 +1,6 @@
#!/bin/bash
cd "`dirname "$0"`"
./Torque\ Demo\ OSX.app/Contents/MacOS/Torque\ Demo\ OSX -game starter.fps

1
example/Starter.Racing.bat Executable file
View File

@ -0,0 +1 @@
torqueDemo.exe -game starter.racing

6
example/Starter.Racing.command Executable file
View File

@ -0,0 +1,6 @@
#!/bin/bash
cd "`dirname "$0"`"
./Torque\ Demo\ OSX.app/Contents/MacOS/Torque\ Demo\ OSX -game starter.racing

1
example/Tutorial.Base.bat Executable file
View File

@ -0,0 +1 @@
torqueDemo.exe -game tutorial.base

BIN
example/common/TestMap.jpg Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 66 KiB

View File

@ -0,0 +1,43 @@
//-----------------------------------------------------------------------------
// Torque Game Engine
// Copyright (C) GarageGames.com, Inc.
//-----------------------------------------------------------------------------
//------------------------------------------------------------------------------
// Utility remap functions:
//------------------------------------------------------------------------------
function ActionMap::copyBind( %this, %otherMap, %command )
{
if ( !isObject( %otherMap ) )
{
error( "ActionMap::copyBind - \"" @ %otherMap @ "\" is not an object!" );
return;
}
%bind = %otherMap.getBinding( %command );
if ( %bind !$= "" )
{
%device = getField( %bind, 0 );
%action = getField( %bind, 1 );
%flags = %otherMap.isInverted( %device, %action ) ? "SDI" : "SD";
%deadZone = %otherMap.getDeadZone( %device, %action );
%scale = %otherMap.getScale( %device, %action );
%this.bind( %device, %action, %flags, %deadZone, %scale, %command );
}
}
//------------------------------------------------------------------------------
function ActionMap::blockBind( %this, %otherMap, %command )
{
if ( !isObject( %otherMap ) )
{
error( "ActionMap::blockBind - \"" @ %otherMap @ "\" is not an object!" );
return;
}
%bind = %otherMap.getBinding( %command );
if ( %bind !$= "" )
%this.bind( getField( %bind, 0 ), getField( %bind, 1 ), "" );
}

Binary file not shown.

50
example/common/client/audio.cs Executable file
View File

@ -0,0 +1,50 @@
//-----------------------------------------------------------------------------
// Torque Engine
//
// Copyright (C) GarageGames.com, Inc.
//-----------------------------------------------------------------------------
function OpenALInit()
{
OpenALShutdownDriver();
echo("");
echo("OpenAL Driver Init:");
echo ($pref::Audio::driver);
if($pref::Audio::driver $= "OpenAL")
{
if(!OpenALInitDriver())
{
error(" Failed to initialize driver.");
$Audio::initFailed = true;
} else {
// this should go here
echo(" Vendor: " @ alGetString("AL_VENDOR"));
echo(" Version: " @ alGetString("AL_VERSION"));
echo(" Renderer: " @ alGetString("AL_RENDERER"));
echo(" Extensions: " @ alGetString("AL_EXTENSIONS"));
alxListenerf( AL_GAIN_LINEAR, $pref::Audio::masterVolume );
for (%channel=1; %channel <= 8; %channel++)
alxSetChannelVolume(%channel, $pref::Audio::channelVolume[%channel]);
echo("");
}
}
}
//--------------------------------------------------------------------------
function OpenALShutdown()
{
OpenALShutdownDriver();
//alxStopAll();
//AudioGui.delete();
//sButtonDown.delete();
//sButtonOver.delete();
}

Binary file not shown.

65
example/common/client/canvas.cs Executable file
View File

@ -0,0 +1,65 @@
//-----------------------------------------------------------------------------
// Torque Game Engine
// Copyright (C) GarageGames.com, Inc.
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
// Function to construct and initialize the default canvas window
// used by the games
function initCanvas(%windowName, %effectCanvas)
{
videoSetGammaCorrection($pref::OpenGL::gammaCorrection);
if( %effectCanvas )
%canvasCreate = createEffectCanvas( %windowName );
else
%canvasCreate = createCanvas( %windowName );
if( !%canvasCreate )
{
quitWithErrorMessage("Copy of Torque is already running; exiting.");
return;
}
setOpenGLTextureCompressionHint( $pref::OpenGL::compressionHint );
setOpenGLAnisotropy( $pref::OpenGL::textureAnisotropy );
setOpenGLMipReduction( $pref::OpenGL::mipReduction );
setOpenGLInteriorMipReduction( $pref::OpenGL::interiorMipReduction );
setOpenGLSkyMipReduction( $pref::OpenGL::skyMipReduction );
// Declare default GUI Profiles.
exec("~/ui/defaultProfiles.cs");
// Common GUI's
exec("~/ui/ConsoleDlg.gui");
exec("~/ui/LoadFileDlg.gui");
exec("~/ui/ColorPickerDlg.gui");
exec("~/ui/SaveFileDlg.gui");
exec("~/ui/MessageBoxOkDlg.gui");
exec("~/ui/MessageBoxYesNoDlg.gui");
exec("~/ui/MessageBoxOKCancelDlg.gui");
exec("~/ui/MessagePopupDlg.gui");
exec("~/ui/HelpDlg.gui");
exec("~/ui/RecordingsDlg.gui");
exec("~/ui/NetGraphGui.gui");
// Commonly used helper scripts
exec("./metrics.cs");
exec("./messageBox.cs");
exec("./screenshot.cs");
exec("./cursor.cs");
exec("./help.cs");
exec("./recordings.cs");
// Init the audio system
OpenALInit();
}
function resetCanvas()
{
if (isObject(Canvas))
{
Canvas.repaint();
}
}

Binary file not shown.

98
example/common/client/cursor.cs Executable file
View File

@ -0,0 +1,98 @@
//-----------------------------------------------------------------------------
// Torque Game Engine
// Copyright (C) GarageGames.com, Inc.
//-----------------------------------------------------------------------------
//------------------------------------------------------------------------------
// Cursor Control
//------------------------------------------------------------------------------
$cursorControlled = true;
function cursorOff()
{
if ( $cursorControlled )
lockMouse(true);
Canvas.cursorOff();
}
function cursorOn()
{
if ( $cursorControlled )
lockMouse(false);
Canvas.cursorOn();
Canvas.setCursor(DefaultCursor);
}
// In the CanvasCursor package we add some additional functionality to the
// built-in GuiCanvas class, of which the global Canvas object is an instance.
// In this case, the behavior we want is for the cursor to automatically display,
// except when the only guis visible want no cursor - most notably,
// in the case of the example, the play gui.
// In order to override or extend an existing class, we use the script package
// feature.
package CanvasCursor
{
// The checkCursor method iterates through all the root controls on the canvas
// (basically the content control and any visible dialogs). If all of them
// have the .noCursor attribute set, the cursor is turned off, otherwise it is
// turned on.
function GuiCanvas::checkCursor(%this)
{
%cursorShouldBeOn = false;
for(%i = 0; %i < %this.getCount(); %i++)
{
%control = %this.getObject(%i);
if(%control.noCursor == 0)
{
%cursorShouldBeOn = true;
break;
}
}
if(%cursorShouldBeOn != %this.isCursorOn())
{
if(%cursorShouldBeOn)
cursorOn();
else
cursorOff();
}
}
// below, all functions which can alter which content controls are visible
// are extended to call the checkCursor function. For package'd functions,
// the Parent:: call refers to the original implementation of that function,
// or a version that was declared in a previously activated package.
// In this case the parent calls should point to the built in versions
// of GuiCanvas functions.
function GuiCanvas::setContent(%this, %ctrl)
{
Parent::setContent(%this, %ctrl);
%this.checkCursor();
}
function GuiCanvas::pushDialog(%this, %ctrl, %layer)
{
Parent::pushDialog(%this, %ctrl, %layer);
%this.checkCursor();
}
function GuiCanvas::popDialog(%this, %ctrl)
{
Parent::popDialog(%this, %ctrl);
%this.checkCursor();
}
function GuiCanvas::popLayer(%this, %layer)
{
Parent::popLayer(%this, %layer);
%this.checkCursor();
}
};
// activate the package when the script loads.
activatePackage(CanvasCursor);

Binary file not shown.

74
example/common/client/help.cs Executable file
View File

@ -0,0 +1,74 @@
//-----------------------------------------------------------------------------
// Torque Engine
//
// Copyright (C) GarageGames.com, Inc.
//-----------------------------------------------------------------------------
function HelpDlg::onWake(%this)
{
HelpFileList.entryCount = 0;
HelpFileList.clear();
for(%file = findFirstFile("*.hfl"); %file !$= ""; %file = findNextFile("*.hfl"))
{
HelpFileList.fileName[HelpFileList.entryCount] = %file;
HelpFileList.addRow(HelpFileList.entryCount, fileBase(%file));
HelpFileList.entryCount++;
}
HelpFileList.sortNumerical(0);
for(%i = 0; %i < HelpFileList.entryCount; %i++)
{
%rowId = HelpFileList.getRowId(%i);
%text = HelpFileList.getRowTextById(%rowId);
%text = %i + 1 @ ". " @ restWords(%text);
HelpFileList.setRowById(%rowId, %text);
}
HelpFileList.setSelectedRow(0);
}
function HelpFileList::onSelect(%this, %row)
{
%fo = new FileObject();
%fo.openForRead(%this.fileName[%row]);
%text = "";
while(!%fo.isEOF())
%text = %text @ %fo.readLine() @ "\n";
%fo.delete();
HelpText.setText(%text);
}
function getHelp(%helpName)
{
Canvas.pushDialog(HelpDlg);
if(%helpName !$= "")
{
%index = HelpFileList.findTextIndex(%helpName);
HelpFileList.setSelectedRow(%index);
}
}
function contextHelp()
{
for(%i = 0; %i < Canvas.getCount(); %i++)
{
if(Canvas.getObject(%i).getName() $= HelpDlg)
{
Canvas.popDialog(HelpDlg);
return;
}
}
%content = Canvas.getContent();
%helpPage = %content.getHelpPage();
getHelp(%helpPage);
}
function GuiControl::getHelpPage(%this)
{
return %this.helpPage;
}
function GuiMLTextCtrl::onURL(%this, %url)
{
gotoWebPage( %url );
}

BIN
example/common/client/help.cs.dso Executable file

Binary file not shown.

View File

@ -0,0 +1,79 @@
//-----------------------------------------------------------------------------
// Torque Game Engine
// Copyright (C) GarageGames.com, Inc.
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
// Functions that process commands sent from the server.
// This function is for chat messages only; it is invoked on the client when
// the server does a commandToClient with the tag ChatMessage. (Cf. the
// functions chatMessage* in common/server/message.cs.)
// This just invokes onChatMessage, which the mod code must define.
function clientCmdChatMessage(%sender, %voice, %pitch, %msgString, %a1, %a2, %a3, %a4, %a5, %a6, %a7, %a8, %a9, %a10)
{
onChatMessage(detag(%msgString), %voice, %pitch);
}
// Game event descriptions, which may or may not include text messages, can be
// sent using the message* functions in common/server/message.cs. Those
// functions do commandToClient with the tag ServerMessage, which invokes the
// function below.
// For ServerMessage messages, the client can install callbacks that will be
// run, according to the "type" of the message.
function clientCmdServerMessage(%msgType, %msgString, %a1, %a2, %a3, %a4, %a5, %a6, %a7, %a8, %a9, %a10)
{
// Get the message type; terminates at any whitespace.
%tag = getWord(%msgType, 0);
// First see if there is a callback installed that doesn't have a type;
// if so, that callback is always executed when a message arrives.
for (%i = 0; (%func = $MSGCB["", %i]) !$= ""; %i++) {
call(%func, %msgType, %msgString, %a1, %a2, %a3, %a4, %a5, %a6, %a7, %a8, %a9, %a10);
}
// Next look for a callback for this particular type of ServerMessage.
if (%tag !$= "") {
for (%i = 0; (%func = $MSGCB[%tag, %i]) !$= ""; %i++) {
call(%func, %msgType, %msgString, %a1, %a2, %a3, %a4, %a5, %a6, %a7, %a8, %a9, %a10);
}
}
}
// Called by the client to install a callback for a particular type of
// ServerMessage.
function addMessageCallback(%msgType, %func)
{
for (%i = 0; (%afunc = $MSGCB[%msgType, %i]) !$= ""; %i++) {
// If it already exists as a callback for this type,
// nothing to do.
if (%afunc $= %func) {
return;
}
}
// Set it up.
$MSGCB[%msgType, %i] = %func;
}
// The following is the callback that will be executed for every ServerMessage,
// because we're going to install it without a specified type. Any type-
// specific callbacks will be executed afterward.
// This just invokes onServerMessage, which the mod code must define.
function defaultMessageCallback(%msgType, %msgString, %a1, %a2, %a3, %a4, %a5, %a6, %a7, %a8, %a9, %a10)
{
onServerMessage(detag(%msgString));
}
// Register that default message handler now.
addMessageCallback("", defaultMessageCallback);

Binary file not shown.

View File

@ -0,0 +1,108 @@
//-----------------------------------------------------------------------------
// Torque Game Engine
// Copyright (C) GarageGames.com, Inc.
//-----------------------------------------------------------------------------
function MessageCallback(%dlg,%callback)
{
Canvas.popDialog(%dlg);
eval(%callback);
}
// MBSetText resizes the message window, based on the change in size of the text
// area.
function MBSetText(%text, %frame, %msg)
{
%ext = %text.getExtent();
%text.setText("<just:center>" @ %msg);
%text.forceReflow();
%newExtent = %text.getExtent();
%deltaY = getWord(%newExtent, 1) - getWord(%ext, 1);
%windowPos = %frame.getPosition();
%windowExt = %frame.getExtent();
%frame.resize(getWord(%windowPos, 0), getWord(%windowPos, 1) - (%deltaY / 2), getWord(%windowExt, 0), getWord(%windowExt, 1) + %deltaY);
}
//-----------------------------------------------------------------------------
// MessageBox OK
//-----------------------------------------------------------------------------
function MessageBoxOK( %title, %message, %callback )
{
MBOKFrame.setText( %title );
Canvas.pushDialog( MessageBoxOKDlg );
MBSetText(MBOKText, MBOKFrame, %message);
MessageBoxOKDlg.callback = %callback;
}
//------------------------------------------------------------------------------
function MessageBoxOKDlg::onSleep( %this )
{
%this.callback = "";
}
//------------------------------------------------------------------------------
// MessageBox OK/Cancel dialog:
//------------------------------------------------------------------------------
function MessageBoxOKCancel( %title, %message, %callback, %cancelCallback )
{
MBOKCancelFrame.setText( %title );
Canvas.pushDialog( MessageBoxOKCancelDlg );
MBSetText(MBOKCancelText, MBOKCancelFrame, %message);
MessageBoxOKCancelDlg.callback = %callback;
MessageBoxOKCancelDlg.cancelCallback = %cancelCallback;
}
//------------------------------------------------------------------------------
function MessageBoxOKCancelDlg::onSleep( %this )
{
%this.callback = "";
}
//------------------------------------------------------------------------------
// MessageBox Yes/No dialog:
//------------------------------------------------------------------------------
function MessageBoxYesNo( %title, %message, %yesCallback, %noCallback )
{
MBYesNoFrame.setText( %title );
Canvas.pushDialog( MessageBoxYesNoDlg );
MBSetText(MBYesNoText, MBYesNoFrame, %message);
MessageBoxYesNoDlg.yesCallBack = %yesCallback;
MessageBoxYesNoDlg.noCallback = %noCallBack;
}
//------------------------------------------------------------------------------
function MessageBoxYesNoDlg::onSleep( %this )
{
%this.yesCallback = "";
%this.noCallback = "";
}
//------------------------------------------------------------------------------
// Message popup dialog:
//------------------------------------------------------------------------------
function MessagePopup( %title, %message, %delay )
{
// Currently two lines max.
MessagePopFrame.setText( %title );
Canvas.pushDialog( MessagePopupDlg );
MBSetText(MessagePopText, MessagePopFrame, %message);
if ( %delay !$= "" )
schedule( %delay, 0, CloseMessagePopup );
}
//------------------------------------------------------------------------------
function CloseMessagePopup()
{
Canvas.popDialog( MessagePopupDlg );
}

Binary file not shown.

157
example/common/client/metrics.cs Executable file
View File

@ -0,0 +1,157 @@
//-----------------------------------------------------------------------------
// Torque Game Engine
// Copyright (C) GarageGames.com, Inc.
//-----------------------------------------------------------------------------
// load gui used to display various metric outputs
exec("~/ui/FrameOverlayGui.gui");
function fpsMetricsCallback()
{
return " FPS: " @ $fps::real @
" mspf: " @ 1000 / $fps::real;
}
function terrainMetricsCallback()
{
return fpsMetricsCallback() @
" Terrain -" @
" L0: " @ $T2::levelZeroCount @
" FMC: " @ $T2::fullMipCount @
" DTC: " @ $T2::dynamicTextureCount @
" UNU: " @ $T2::unusedTextureCount @
" STC: " @ $T2::staticTextureCount @
" DTSU: " @ $T2::textureSpaceUsed @
" STSU: " @ $T2::staticTSU @
" FRB: " @ $T2::FogRejections;
}
function videoMetricsCallback()
{
return fpsMetricsCallback() @
" Video -" @
" TC: " @ $OpenGL::triCount0 + $OpenGL::triCount1 + $OpenGL::triCount2 + $OpenGL::triCount3 @
" PC: " @ $OpenGL::primCount0 + $OpenGL::primCount1 + $OpenGL::primCount2 + $OpenGL::primCount3 @
" T_T: " @ $OpenGL::triCount1 @
" T_P: " @ $OpenGL::primCount1 @
" I_T: " @ $OpenGL::triCount2 @
" I_P: " @ $OpenGL::primCount2 @
" TS_T: " @ $OpenGL::triCount3 @
" TS_P: " @ $OpenGL::primCount3 @
" ?_T: " @ $OpenGL::triCount0 @
" ?_P: " @ $OpenGL::primCount0;
}
function interiorMetricsCallback()
{
return fpsMetricsCallback() @
" Interior --" @
" NTL: " @ $Video::numTexelsLoaded @
" TRP: " @ $Video::texResidentPercentage @
" INP: " @ $Metrics::Interior::numPrimitives @
" INT: " @ $Matrics::Interior::numTexturesUsed @
" INO: " @ $Metrics::Interior::numInteriors;
}
function textureMetricsCallback()
{
return fpsMetricsCallback() @
" Texture --"@
" NTL: " @ $Video::numTexelsLoaded @
" TRP: " @ $Video::texResidentPercentage @
" TCM: " @ $Video::textureCacheMisses;
}
function waterMetricsCallback()
{
return fpsMetricsCallback() @
" Water --"@
" Tri#: " @ $T2::waterTriCount @
" Pnt#: " @ $T2::waterPointCount @
" Hz#: " @ $T2::waterHazePointCount;
}
function timeMetricsCallback()
{
return fpsMetricsCallback() @
" Time -- " @
" Sim Time: " @ getSimTime() @
" Mod: " @ getSimTime() % 32;
}
function vehicleMetricsCallback()
{
return fpsMetricsCallback() @
" Vehicle --"@
" R: " @ $Vehicle::retryCount @
" C: " @ $Vehicle::searchCount @
" P: " @ $Vehicle::polyCount @
" V: " @ $Vehicle::vertexCount;
}
function audioMetricsCallback()
{
return fpsMetricsCallback() @
" Audio --"@
" OH: " @ $Audio::numOpenHandles @
" OLH: " @ $Audio::numOpenLoopingHandles @
" AS: " @ $Audio::numActiveStreams @
" NAS: " @ $Audio::numNullActiveStreams @
" LAS: " @ $Audio::numActiveLoopingStreams @
" LS: " @ $Audio::numLoopingStreams @
" ILS: " @ $Audio::numInactiveLoopingStreams @
" CLS: " @ $Audio::numCulledLoopingStreams;
}
function debugMetricsCallback()
{
return fpsMetricsCallback() @
" Debug --"@
" NTL: " @ $Video::numTexelsLoaded @
" TRP: " @ $Video::texResidentPercentage @
" NP: " @ $Metrics::numPrimitives @
" NT: " @ $Metrics::numTexturesUsed @
" NO: " @ $Metrics::numObjectsRendered;
}
function metrics(%expr)
{
switch$(%expr)
{
case "audio": %cb = "audioMetricsCallback()";
case "debug": %cb = "debugMetricsCallback()";
case "interior":
$fps::virtual = 0;
$Interior::numPolys = 0;
$Interior::numTextures = 0;
$Interior::numTexels = 0;
$Interior::numLightmaps = 0;
$Interior::numLumels = 0;
%cb = "interiorMetricsCallback()";
case "fps": %cb = "fpsMetricsCallback()";
case "time": %cb = "timeMetricsCallback()";
case "terrain": %cb = "terrainMetricsCallback()";
case "texture":
GLEnableMetrics(true);
%cb = "textureMetricsCallback()";
case "video": %cb = "videoMetricsCallback()";
case "vehicle": %cb = "vehicleMetricsCallback()";
case "water": %cb = "waterMetricsCallback()";
}
if (%cb !$= "")
{
Canvas.pushDialog(FrameOverlayGui, 1000);
TextOverlayControl.setValue(%cb);
}
else
{
GLEnableMetrics(false);
Canvas.popDialog(FrameOverlayGui);
}
}

Binary file not shown.

View File

@ -0,0 +1,26 @@
//-----------------------------------------------------------------------------
// Torque Game Engine
// Copyright (C) GarageGames.com, Inc.
//-----------------------------------------------------------------------------
//----------------------------------------------------------------------------
// Mission start / end events sent from the server
//----------------------------------------------------------------------------
function clientCmdMissionStart(%seq)
{
// The client recieves a mission start right before
// being dropped into the game.
}
function clientCmdMissionEnd(%seq)
{
// Recieved when the current mission is ended.
alxStopAll();
// Disable mission lighting if it's going, this is here
// in case the mission ends while we are in the process
// of loading it.
$lightingMission = false;
$sceneLighting::terminateLighting = true;
}

Binary file not shown.

View File

@ -0,0 +1,110 @@
//-----------------------------------------------------------------------------
// Torque Game Engine
// Copyright (C) GarageGames.com, Inc.
//-----------------------------------------------------------------------------
//----------------------------------------------------------------------------
// Mission Loading
// Server download handshaking. This produces a number of onPhaseX
// calls so the game scripts can update the game's GUI.
//
// Loading Phases:
// Phase 1: Download Datablocks
// Phase 2: Download Ghost Objects
// Phase 3: Scene Lighting
//----------------------------------------------------------------------------
//----------------------------------------------------------------------------
// Phase 1
//----------------------------------------------------------------------------
function clientCmdMissionStartPhase1(%seq, %missionName, %musicTrack)
{
// These need to come after the cls.
echo ("*** New Mission: " @ %missionName);
echo ("*** Phase 1: Download Datablocks & Targets");
onMissionDownloadPhase1(%missionName, %musicTrack);
commandToServer('MissionStartPhase1Ack', %seq);
}
function onDataBlockObjectReceived(%index, %total)
{
onPhase1Progress(%index / %total);
}
//----------------------------------------------------------------------------
// Phase 2
//----------------------------------------------------------------------------
function clientCmdMissionStartPhase2(%seq,%missionName)
{
onPhase1Complete();
echo ("*** Phase 2: Download Ghost Objects");
purgeResources();
onMissionDownloadPhase2(%missionName);
commandToServer('MissionStartPhase2Ack', %seq);
}
function onGhostAlwaysStarted(%ghostCount)
{
$ghostCount = %ghostCount;
$ghostsRecvd = 0;
}
function onGhostAlwaysObjectReceived()
{
$ghostsRecvd++;
onPhase2Progress($ghostsRecvd / $ghostCount);
}
//----------------------------------------------------------------------------
// Phase 3
//----------------------------------------------------------------------------
function clientCmdMissionStartPhase3(%seq,%missionName)
{
onPhase2Complete();
StartClientReplication();
StartFoliageReplication();
echo ("*** Phase 3: Mission Lighting");
$MSeq = %seq;
$Client::MissionFile = %missionName;
// Need to light the mission before we are ready.
// The sceneLightingComplete function will complete the handshake
// once the scene lighting is done.
if (lightScene("sceneLightingComplete", ""))
{
error("Lighting mission....");
schedule(1, 0, "updateLightingProgress");
onMissionDownloadPhase3(%missionName);
$lightingMission = true;
}
}
function updateLightingProgress()
{
onPhase3Progress($SceneLighting::lightingProgress);
if ($lightingMission)
$lightingProgressThread = schedule(1, 0, "updateLightingProgress");
}
function sceneLightingComplete()
{
echo("Mission lighting done");
onPhase3Complete();
// The is also the end of the mission load cycle.
onMissionDownloadComplete();
commandToServer('MissionStartPhase3Ack', $MSeq);
}
//----------------------------------------------------------------------------
// Helper functions
//----------------------------------------------------------------------------
function connect(%server)
{
%conn = new GameConnection();
%conn.connect(%server);
}

Binary file not shown.

126
example/common/client/prefs.cs Executable file
View File

@ -0,0 +1,126 @@
$pref::Audio::channelVolume1 = 0.8;
$pref::Audio::channelVolume2 = 0.8;
$pref::Audio::channelVolume3 = 0.8;
$pref::Audio::channelVolume4 = 0.8;
$pref::Audio::channelVolume5 = 0.8;
$pref::Audio::channelVolume6 = 0.8;
$pref::Audio::channelVolume7 = 0.8;
$pref::Audio::channelVolume8 = 0.8;
$pref::Audio::driver = "OpenAL";
$pref::Audio::environmentEnabled = 0;
$pref::Audio::forceMaxDistanceUpdate = 0;
$pref::Audio::masterVolume = 0.8;
$pref::backgroundSleepTime = "3000";
$pref::ChatHudLength = 1;
$pref::CloudsOn = "1";
$pref::Console::extent = "500 300";
$pref::Console::position = "0 0";
$pref::Decal::decalTimeout = "5000";
$pref::Decal::maxNumDecals = "256";
$pref::decalsOn = "1";
$pref::Editor::visibleDistance = "2100";
$pref::enableBadWordFilter = "1";
$pref::environmentMaps = "1";
$pref::HudMessageLogSize = 40;
$pref::Input::JoystickEnabled = "0";
$pref::Input::KeyboardEnabled = "1";
$pref::Input::KeyboardTurnSpeed = 0.1;
$pref::Input::LinkMouseSensitivity = 1;
$pref::Input::MouseEnabled = "1";
$pref::Interior::detailAdjust = "1";
$pref::Interior::DynamicLights = "1";
$pref::Interior::LightUpdatePeriod = "66";
$pref::Interior::lockArrays = "1";
$pref::Interior::sgDetailMaps = "1";
$pref::Interior::ShowEnvironmentMaps = "1";
$pref::Interior::TexturedFog = "0";
$pref::Interior::VertexLighting = "0";
$pref::LightManager::sgBlendedTerrainDynamicLighting = "1";
$pref::LightManager::sgDynamicLightingOcclusionQuality = "1";
$pref::LightManager::sgDynamicParticleSystemLighting = "1";
$pref::LightManager::sgDynamicShadowQuality = "0";
$pref::LightManager::sgLightingProfileAllowShadows = "1";
$pref::LightManager::sgLightingProfileQuality = "0";
$pref::LightManager::sgMaxBestLights = "10";
$pref::LightManager::sgMultipleDynamicShadows = "1";
$pref::LightManager::sgUseDynamicShadows = "1";
$pref::Master0 = "2:master.garagegames.com:28002";
$Pref::Net::LagThreshold = "400";
$pref::Net::PacketRateToClient = "10";
$pref::Net::PacketRateToServer = "32";
$pref::Net::PacketSize = "200";
$pref::NumCloudLayers = "3";
$pref::OpenGL::allowCompression = "0";
$pref::OpenGL::allowTexGen = "1";
$pref::OpenGL::disableARBMultitexture = "0";
$pref::OpenGL::disableARBTextureCompression = "0";
$pref::OpenGL::disableEXTCompiledVertexArray = "0";
$pref::OpenGL::disableEXTFogCoord = "0";
$pref::OpenGL::disableEXTPalettedTexture = "0";
$pref::OpenGL::disableEXTTexEnvCombine = "0";
$pref::OpenGL::disableSubImage = "0";
$pref::OpenGL::force16BitTexture = "0";
$pref::OpenGL::forcePalettedTexture = "0";
$pref::OpenGL::gammaCorrection = "0.5";
$pref::OpenGL::maxHardwareLights = 3;
$pref::OpenGL::noDrawArraysAlpha = "0";
$pref::OpenGL::noEnvColor = "0";
$pref::OpenGL::textureAnisotropy = "0";
$pref::OpenGL::textureTrilinear = "0";
$pref::Player::defaultFov = 90;
$pref::Player::Name = "Test Guy";
$pref::Player::renderMyItems = "1";
$pref::Player::renderMyPlayer = "1";
$pref::Player::zoomSpeed = 0;
$Pref::ResourceManager::excludedDirectories = ".svn;CVS";
$pref::sceneLighting::cacheLighting = 1;
$pref::sceneLighting::cacheSize = 20000;
$pref::sceneLighting::purgeMethod = "lastCreated";
$pref::sceneLighting::terrainGenerateLevel = 1;
$Pref::Server::AdminPassword = "";
$Pref::Server::ConnectionError = "You do not have the correct version of the Torque Game Engine or the related art needed to connect to this server, please contact the server operator to obtain the latest version of this game.";
$Pref::Server::FloodProtectionEnabled = 1;
$Pref::Server::Info = "This is a Torque Game Engine Test Server.";
$Pref::Server::MaxChatLen = 120;
$Pref::Server::MaxPlayers = 64;
$Pref::Server::Name = "Torque TTB Server";
$Pref::Server::Password = "";
$Pref::Server::Port = 28000;
$Pref::Server::RegionMask = 2;
$pref::shadows = "2";
$pref::SkyOn = "1";
$pref::Terrain::dynamicLights = "1";
$pref::Terrain::enableDetails = "1";
$pref::Terrain::enableEmbossBumps = "1";
$pref::Terrain::screenError = "4";
$pref::Terrain::texDetail = "0";
$pref::Terrain::textureCacheSize = "512";
$pref::timeManagerProcessInterval = "0";
$pref::TS::autoDetail = "1";
$pref::TS::detailAdjust = "1";
$pref::TS::fogTexture = "0";
$pref::TS::screenError = "5";
$pref::TS::skipFirstFog = "0";
$pref::TS::skipLoadDLs = "0";
$pref::TS::skipRenderDLs = "0";
$pref::TS::UseTriangles = "0";
$pref::Video::allowD3D = "1";
$pref::Video::allowOpenGL = "1";
$pref::Video::appliedPref = "1";
$pref::Video::clipHigh = "0";
$pref::Video::defaultsRenderer = "ATI Radeon HD 4800 Series";
$pref::Video::defaultsVendor = "ATI Technologies Inc.";
$pref::Video::deleteContext = "1";
$pref::Video::disableVerticalSync = 1;
$pref::Video::displayDevice = "OpenGL";
$pref::Video::fullScreen = "0";
$pref::Video::monitorNum = 0;
$pref::Video::only16 = "0";
$pref::Video::preferOpenGL = "1";
$pref::Video::profiledRenderer = "ATI Radeon HD 4800 Series";
$pref::Video::profiledVendor = "ATI Technologies Inc.";
$pref::Video::resolution = "800 600 32";
$pref::Video::safeModeOn = "1";
$pref::Video::screenShotFormat = "PNG";
$pref::Video::windowedRes = "800 600";
$pref::visibleDistanceMod = "1";

View File

@ -0,0 +1,111 @@
//-----------------------------------------------------------------------------
// Torque Game Engine
// Copyright (C) GarageGames.com, Inc.
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
// RecordingsGui is the main TSControl through which the a demo game recording
// is viewed.
//-----------------------------------------------------------------------------
function recordingsDlg::onWake()
{
RecordingsDlgList.clear();
%i = 0;
%filespec = $currentMod @ "/recordings/*.rec";
echo(%filespec);
for(%file = findFirstFile(%filespec); %file !$= ""; %file = findNextFile(%filespec))
{
%fileName = fileBase(%file);
if (strStr(%file, "/CVS/") == -1)
{
RecordingsDlgList.addRow(%i++, %fileName);
}
}
RecordingsDlgList.sort(0);
RecordingsDlgList.setSelectedRow(0);
RecordingsDlgList.scrollVisible(0);
}
function StartSelectedDemo()
{
// first unit is filename
%sel = RecordingsDlgList.getSelectedId();
%rowText = RecordingsDlgList.getRowTextById(%sel);
%file = $currentMod @ "/recordings/" @ getField(%rowText, 0) @ ".rec";
new GameConnection(ServerConnection);
RootGroup.add(ServerConnection);
if(ServerConnection.playDemo(%file))
{
Canvas.setContent(PlayGui);
Canvas.popDialog(RecordingsDlg);
ServerConnection.prepDemoPlayback();
}
else
{
MessageBoxOK("Playback Failed", "Demo playback failed for file '" @ %file @ "'.");
if (isObject(ServerConnection)) {
ServerConnection.delete();
}
}
}
function startDemoRecord()
{
// make sure that current recording stream is stopped
ServerConnection.stopRecording();
// make sure we aren't playing a demo
if(ServerConnection.isDemoPlaying())
return;
for(%i = 0; %i < 1000; %i++)
{
%num = %i;
if(%num < 10)
%num = "0" @ %num;
if(%num < 100)
%num = "0" @ %num;
%file = $currentMod @ "/recordings/demo" @ %num @ ".rec";
if(!isfile(%file))
break;
}
if(%i == 1000)
return;
$DemoFileName = %file;
ChatHud.AddLine( "\c4Recording to file [\c2" @ $DemoFileName @ "\cr].");
ServerConnection.prepDemoRecord();
ServerConnection.startRecording($DemoFileName);
// make sure start worked
if(!ServerConnection.isDemoRecording())
{
deleteFile($DemoFileName);
ChatHud.AddLine( "\c3 *** Failed to record to file [\c2" @ $DemoFileName @ "\cr].");
$DemoFileName = "";
}
}
function stopDemoRecord()
{
// make sure we are recording
if(ServerConnection.isDemoRecording())
{
ChatHud.AddLine( "\c4Recording file [\c2" @ $DemoFileName @ "\cr] finished.");
ServerConnection.stopRecording();
}
}
function demoPlaybackComplete()
{
disconnect();
Canvas.setContent("MainMenuGui");
Canvas.pushDialog(RecordingsDlg);
}

Binary file not shown.

View File

@ -0,0 +1,80 @@
//-----------------------------------------------------------------------------
// Torque Game Engine
// Copyright (C) GarageGames.com, Inc.
//-----------------------------------------------------------------------------
function formatImageNumber(%number)
{
if(%number < 10)
%number = "0" @ %number;
if(%number < 100)
%number = "0" @ %number;
if(%number < 1000)
%number = "0" @ %number;
if(%number < 10000)
%number = "0" @ %number;
return %number;
}
function formatSessionNumber(%number)
{
if(%number < 10)
%number = "0" @ %number;
if(%number < 100)
%number = "0" @ %number;
return %number;
}
//----------------------------------------
function recordMovie(%movieName, %fps)
{
$timeAdvance = 1000 / %fps;
$screenGrabThread = schedule($timeAdvance,0,movieGrabScreen,%movieName,0);
}
function movieGrabScreen(%movieName, %frameNumber)
{
screenshot(%movieName @ formatImageNumber(%frameNumber) @ ".png", "PNG");
$screenGrabThread = schedule($timeAdvance, 0, movieGrabScreen, %movieName, %frameNumber + 1);
}
function stopMovie()
{
$timeAdvance = 0;
cancel($screenGrabThread);
}
//----------------------------------------
$screenshotNumber = 0;
function doScreenShot( %val )
{
if (%val)
{
if ($pref::Video::screenShotSession $= "")
$pref::Video::screenShotSession = 0;
if ($screenshotNumber == 0)
$pref::Video::screenShotSession++;
if ($pref::Video::screenShotSession > 999)
$pref::Video::screenShotSession = 1;
$pref::interior::showdetailmaps = false;
$name = "screenshot_" @ formatSessionNumber($pref::Video::screenShotSession) @ "-" @ formatImageNumber($screenshotNumber++);
if($pref::Video::screenShotFormat $= "JPEG")
screenShot($name @ ".jpg", "JPEG");
else
if($pref::Video::screenShotFormat $= "PNG")
screenShot($name @ ".png", "PNG");
else
screenShot($name @ ".png", "PNG");
}
}
// bind key to take screenshots
GlobalActionMap.bind(keyboard, "ctrl p", doScreenShot);

Binary file not shown.

View File

@ -0,0 +1,19 @@
//-----------------------------------------------------------------------------
// Torque Engine
//
// Copyright (c) 2001 GarageGames.Com
//-----------------------------------------------------------------------------
// Writes out all script functions to a file
function writeOutFunctions() {
new ConsoleLogger( logger, "scriptFunctions.txt", false );
dumpConsoleFunctions();
logger.delete();
}
// Writes out all script classes to a file
function writeOutClasses() {
new ConsoleLogger( logger, "scriptClasses.txt", false );
dumpConsoleClasses();
logger.delete();
}

View File

@ -0,0 +1,6 @@
<lmargin%:5><rmargin%:95><font:Arial Bold:20>Terrain Texture Painter...<font:Arial:16>
The Terrain Texture Painter tool is used to manually paint terrain textures on the terrain. Users can select up to six different textures in the boxes in the upper right corner of the screen. Selecting a texture will place a black box around it. The terrain brush can then be used to paint the texture on the terrain.
Terrains with more than four textures may exhibit rendering irregularities if all those textures are used in the same area of a map. In general it is wise to use four or fewer textures on any individual terrain map.

View File

@ -0,0 +1,8 @@
<lmargin%:5><rmargin%:95><font:Arial Bold:20>Torque Game Engine Licenses<font:Arial:16>
For information about Torque Game Engine Licenses please visit our website.
<a:www.garagegames.com/products/111/>Torque Game Engine - Indie License</a>
<a:www.garagegames.com/products/112/>Torque Game Engine - Commercial Use License</a>

View File

@ -0,0 +1,42 @@
<lmargin%:5><rmargin%:95><font:Arial Bold:20>Gui Editor...
GUI Editor Basics<font:Arial:16>
This description covers the basics of using the GUI Editor. For detailed documentation and tutorials see the <a:www.garagegames.com/developer/torque/tge/>Torque Home Page</a>
Press the F10 key on the keyboard to toggle the GUI Editor on and off. The GUI Editor will start editing the current main content control, minus any dialogs that may be visible.
The GUI Editor is broken up into four main visual components. In the upper left portion of the screen is the content editor, where controls can be placed, moved and resized. In the upper right is the tree, that shows the current content control hierarchy. The lower left panel is the tool bar, which contains functions for aligning, and spacing controls as well as creating new controls and screens. The lower right pane is the inspector, where the currently selected control's attributes are displayed.
<font:Arial Bold:20>Mouse Editing<font:Arial:16>
Left clicking the mouse on a control in the content editor selects that control. Once selected, a control can be moved by clicking and dragging its content area, or resized using one of the 8 black sizing knobs. Shift-clicking on several controls allows the user to select more than one control at once. In this case, the sizing knobs turn white, and can no longer be used to size the control, but the controls can still be moved by dragging. Only controls that share the same parent can be selected at the same time.
The parent control of the currently selected control is outlined with a yellow and blue band. This control is known as the <spush><font:Arial Bold:16>Current Add Parent<spop>. Any new control created from the toolbar or pasted from the clipboard will be added to this control. The Current Add Parent control can be set manually by either left-clicking one of its children, or right-clicking the control itself.
<font:Arial Bold:20>Keyboard Commands<font:Arial:16>
The editor supports several keyboard commands and shortcuts:
<spush><font:Arial Bold:16>Control-A<spop> - Select All. Selects all the controls in the Current Add Parent.
<spush><font:Arial Bold:16>Control-C<spop> - Copy. Copies the currently selected control(s) to the clipboard.
<spush><font:Arial Bold:16>Control-X<spop> - Cut. Cuts the currently selected control(s) to the clipboard.
<spush><font:Arial Bold:16>Control-V<spop> - Paste. Pastes any control(s) on the clipboard into the Current Add Parent.
<spush><font:Arial Bold:16>Arrow Keys<spop> - Movement. Moves the current control selection one pixel in the direction of the arrow.
<spush><font:Arial Bold:16>Shift-Arrow Keys<spop> - Movement. Moves the current control selection ten pixels in the direction of the arrow.
<spush><font:Arial Bold:16>Delete/Backspace<spop> - Delete. Deletes the current control selection.
<font:Arial Bold:20>Toolbar Commands<font:Arial:16>
The toolbar has several command buttons that operate on the current selection set and creating and saving guis, as well as pop-up menus for creating new controls and changing the currently edited gui. The functions of the buttons are described below:
<spush><font:Arial Bold:16>Align Left<spop> - Aligns the left edge of all controls in the current selection set to the leftmost point of any of the selected controls.
<spush><font:Arial Bold:16>Align Right<spop> - Aligns the right edge of all controls in the current selection set to the rightmost point of any of the selected controls.
<spush><font:Arial Bold:16>Center Horiz<spop> - Centers horizontally all selected controls in the rectangle bounded by the current selection set.
<spush><font:Arial Bold:16>Align Top<spop> - Aligns the top edge of all controls in the current selection set to the topmost point of any of the selected controls.
<spush><font:Arial Bold:16>Align Bottom<spop> - Aligns the bottom edge of all controls in the current selection set to the bottommost point of any of the selected controls.
<spush><font:Arial Bold:16>Help<spop> - Displays this help dialog.
<spush><font:Arial Bold:16>Space Vert<spop> - Evenly spaces vertically all selected controls.
<spush><font:Arial Bold:16>Space Horiz<spop> - Evenly spaces horizontally all selected controls.
<spush><font:Arial Bold:16>Bring Front<spop> - Moves the selected control in front of its sibling controls.
<spush><font:Arial Bold:16>Send Back<spop> - Moves the selected control behind its sibling controls.
<spush><font:Arial Bold:16>New...<spop> - Brings up a dialog that allows the user to create and name a new control for editing.
<spush><font:Arial Bold:16>Save<spop> - Brings up a dialog that allows the user to save the current content control to a file.
<spush><font:Arial Bold:16>New Control (popup)<spop> - Displays a list of all controls that the user can create to add to the current content control.
<spush><font:Arial Bold:16>Show GUI (popup)<spop> - Displays the name of the gui currently being edited. Selecting this popup allows the user to choose a screen to edit from all loaded guis.

View File

@ -0,0 +1,50 @@
<lmargin%:5><rmargin%:95><font:Arial Bold:20>Mission Editor...
Mission Editor Overview<font:Arial:16>
This description covers the basics of using the World Editor. For detailed documentation and tutorials see the <a:www.garagegames.com/developer/torque/tge/>Torque Home Page</a>
The Mission Editor is the in-game tool for creating and editing landscapes and placing objects in the 3D world.
Press the F11 key while in the game to toggle the Mission Editor on and off. The mission editor will start editing the currently loaded mission.
The Mission Editor is composed of the following tools, selectable from the Window menu:
<font:Arial Bold:16>World Editor<font:Arial:16> - Full screen object movement and selection.
<font:Arial Bold:16>World Editor Inspector<font:Arial:16> - Used to inspect the properties of mission objects
<font:Arial Bold:16>World Editor Creator<font:Arial:16> - Used to create new mission objects
<font:Arial Bold:16>Mission Area Editor<font:Arial:16> - Used to adjust the bounds of the mission area, as well as mirror terrain data
<font:Arial Bold:16>Terrain Editor<font:Arial:16> - Tool for manually adjusting the terrain heightfield and square properties
<font:Arial Bold:16>Terrain Terraform Editor<font:Arial:16> - Tool for procedurally generating the terrain heightfield from fractal operations
<font:Arial Bold:16>Terrain Texture Editor<font:Arial:16> - Tool for procedurally generating the terrain textures based on rules
<font:Arial Bold:16>Terrain Texture Painter<font:Arial:16> - Tool for manually painting terrain textures on the terrain
There are several editor functions and menus that are available in all mission editor modes:
<font:Arial Bold:20>Basic Movement<font:Arial:16>
The normal movement keys can be used to control both the player and the camera. The right mouse button is used to rotate the camera or adjust the player's view.
<font:Arial Bold:20>File Menu<font:Arial:16>
<font:Arial Bold:16>New Mission...<font:Arial:16> - Creates a new empty mission with a default terrain and sky
<font:Arial Bold:16>Open Mission...<font:Arial:16> - Opens an existing mission for editing
<font:Arial Bold:16>Save Mission<font:Arial:16> - Saves changes to the current mission to disk
<font:Arial Bold:16>Save Mission As...<font:Arial:16> - Saves the current mission under a new name
<font:Arial Bold:16>Import Terraform Data...<font:Arial:16> - Imports terraform rules from an existing terrain file
<font:Arial Bold:16>Import Texture Data...<font:Arial:16> - Imports terrain texture rules from an existing terrain file
<font:Arial Bold:16>Export Terraform Bitmap...<font:Arial:16> - Only active from the Terrain Terraform Editor - exports the current terraform map to a bitmap
<font:Arial Bold:20>Edit Menu<font:Arial:16>
<font:Arial Bold:16>Undo<font:Arial:16> - Undoes the last action in terrain or world editing. Not all actions can be undone
<font:Arial Bold:16>Redo<font:Arial:16> - Redoes the last undone action
<font:Arial Bold:16>Cut<font:Arial:16> - Cuts the selected objects in the world editor from the mission to the clipboard
<font:Arial Bold:16>Copy<font:Arial:16> - Copies the selected objects in the world editor to the clipboard
<font:Arial Bold:16>Paste<font:Arial:16> - Pastes the current clipboard contents into the mission
<font:Arial Bold:16>Select All<font:Arial:16> - Selects all mission objects in the world editor
<font:Arial Bold:16>Select None<font:Arial:16> - Clears the current selection in the world and terrain editors
<font:Arial Bold:16>Relight Scene<font:Arial:16> - Recomputes mission static lighting
<font:Arial Bold:16>World Editor Settings...<font:Arial:16> - Accesses the settings dialog for the World Editor
<font:Arial Bold:16>Terrain Editor Settings...<font:Arial:16> - Accesses the settings dialog for the Terrain Editor
<font:Arial Bold:20>Camera Menu<font:Arial:16>
<font:Arial Bold:16>Drop Camera At Player<font:Arial:16> - Moves the camera object to the location of the player, and sets the mode to camera movement mode
<font:Arial Bold:16>Drop Player At Camera<font:Arial:16> - Moves the player object to the location of the movable camera, and sets the mode to player movement mode
<font:Arial Bold:16>Toggle Camera<font:Arial:16> - Toggles between player and camera movement mode
<font:Arial Bold:16>Slowest...Fastest<font:Arial:16> - Adjusts the speed of the camera

View File

@ -0,0 +1,53 @@
<lmargin%:5><rmargin%:95><font:Arial Bold:20>World Editor...
World Editor Basics<font:Arial:16>
The World Editor has three seperate "windows" in the Mission Editor:
World Editor - a full screen object manipulator
World Editor Inspector - used for inspecting and editing the properties of objects
World Editor Creator - used for creating new mission objects
The World Editor main view is a view of the 3D world. Objects in this view (interiors, shapes, markers, etc) can be manipulated with the mouse and keyboard.
The following mouse and keyboard functions exist:
<font:Arial Bold Italic:16>Clicking on an unselected object<font:Arial:16> - deselects all currently selected objects and selects the clicked object
<font:Arial Bold Italic:16>Clicking in empty space<font:Arial:16> - click-drags a box around objects, and selects all objects in the box
<font:Arial Bold Italic:16>Shift-clicking on an object<font:Arial:16> - toggles selection of the clicked object
<font:Arial Bold Italic:16>Mouse dragging a selected object<font:Arial:16> - moves the selected objects, either on a horizontal plane, or sticking to the terrain, depending on the setting of the "Planar Movement" checkbox in the World Editor Settings dialog
<font:Arial Bold Italic:16>Control-clicking and drag<font:Arial:16> - moves the selected objects vertically
<font:Arial Bold Italic:16>Alt-clicking and drag<font:Arial:16> - rotates the selected objects about the selected axis
<font:Arial Bold Italic:16>Alt-control-clicking and drag<font:Arial:16> - scales the selected object by a face on the bounding box
If gizmos are enabled in the World Editor Settings dialog, they can also be clicked and dragged:
<font:Arial Bold Italic:16>click-drag gizmo axis<font:Arial:16> - move selection along that axis
<font:Arial Bold Italic:16>alt-click-drag gizmo axis<font:Arial:16> - rotate selection on that axis
<font:Arial Bold Italic:16>alt-control-click-drag gizmo axis<font:Arial:16> - scale along that axis
<font:Arial Bold:20>World Menu<font:Arial:16>
The World Menu contains world editor specific options for controlling properties of the current selection, as well as choosing where new objects are dropped. The following list describes the world menu options:
<font:Arial Bold:16>Lock Selection<font:Arial:16> - Locks the current selection so that it cannot be manipulated from the world editor view
<font:Arial Bold:16>Unlock Selection<font:Arial:16> - Unlocks a locked selection
<font:Arial Bold:16>Hide Selection<font:Arial:16> - Hides the current selection to reduce clutter while editing
<font:Arial Bold:16>Show Selection<font:Arial:16> - Shows hidden objects in the selection
<font:Arial Bold:16>Delete Selection<font:Arial:16> - Deletes the currently selected objects
<font:Arial Bold:16>Camera To Selection<font:Arial:16> - Moves the camera to the selected objects
<font:Arial Bold:16>Reset Transforms<font:Arial:16> - Resets the rotation and scale on the selected objects
<font:Arial Bold:16>Drop Selection<font:Arial:16> - Re-drops the selected objects into the mission according to the drop rule (see below)
<font:Arial Bold:16>Add Selection to Instant Group<font:Arial:16> - Moves the currently selected objects into the current Instant Group.
<font:Arial Bold:16>Drop at Origin<font:Arial:16> - New objects will be created at the origin
<font:Arial Bold:16>Drop at Camera<font:Arial:16> - New objects will be created at the camera's location
<font:Arial Bold:16>Drop at Camera w/Rot<font:Arial:16> - New objects will be created at the camera's location with the camera's current orientation
<font:Arial Bold:16>Drop below Camera<font:Arial:16> - New objects will be created below the camera's location
<font:Arial Bold:16>Drop at Screen Center<font:Arial:16> - New objects will be created in the world where the view direction hits an object
<font:Arial Bold:16>Drop at Centroid<font:Arial:16> - New objects will be created in the world at the center of the selection
<font:Arial Bold:16>Drop to Ground<font:Arial:16> - New objects will be dropped at the terrain ground level
<font:Arial Bold:20>World Editor Tree<font:Arial:16>
The World Editor tree view is displayed in the upper right screen quadrant in both the World Editor Inspector and the World Editor Creator. This tree displays the hierarchy of the mission data file. Objects selected in the tree will also be selected in the main view. There is a special group selection called the <font:Arial Bold:16>Instant Group<font:Arial:16>. This group is where objects that are pasted are placed, as well as where objects created from the World Editor Creator are placed. In the World Editor tree view the instant group is displayed with a grey hilight. To change the current instant group, Alt-click on a group in the tree view.
<font:Arial Bold:20>World Editor Inspector<font:Arial:16>
The World Editor Inspector allows the user to specify properties of mission objects. When an object is selected in Inspector mode, that object's properties will be displayed in the lower right quadrant of the screen. Once properties are edited, clicking the apply button will set those properties into the object. Dynamic properties can be assigned to objects with the Dynamic Fields Add button. Dynamic fields are accessable through the scripting language and are used to add game-specific properties to mission objects.
<font:Arial Bold:20>World Editor Creator<font:Arial:16>
The World Editor Creator displays a tree view in the lower left corner of the screen. This tree contains all objects that can be created in a mission.

View File

@ -0,0 +1,9 @@
<lmargin%:5><rmargin%:95><font:Arial Bold:20>Mission Area Editor...<font:Arial:16>
The Mission Area Editor displays an overhead height map in the upper right corner of the screen, with markers for mission objects, a box for the mission area and a pair of lines denoting the current field of view. Clicking anywhere on the display will move the current view object (either camera or player) to that location in the mission.
To edit the mission area, click on the "Edit Area" checkbox. This will display 8 resizing knobs on the mission area box, that can be dragged with the mouse.
The "Center" button will cause the terrain file data to be repositioned and centered at 0,0 in the center of the mission area box.
To mirror the terrain, click on the Mirror button. This will put the mission area editor in mirror mode. The left and right arrow buttons adjust the mirror plane angle to one of 8 different angles (2 axis aligned, 2 45-degree splits), and the Apply button will mirror the terrain across the mirror plane.

View File

@ -0,0 +1,17 @@
<lmargin%:5><rmargin%:95><font:Arial Bold:20>Terrain Editor...<font:Arial:16>
The terrain editor is used to manually modify the terrain height map and square properties. Terrain editing is accomplished using the brush. The brush is a selection of terrain points or squares centered around the mouse cursor. The brush is either a circle or square area, and can be one of several size selected from the brush menu. The brush can also be either a hard brush - where the affect on the terrain is the same across the surface of the brush - or a soft brush - where the brush's influence on terrain diminishes towards the edges of the brush. The Terrain Editor Settings dialog filter view controls the falloff of the soft brush.
The following terrain editing action modes can be selected from the <font:Arial Bold:16>Action<font:Arial:16> menu.
<font:Arial Bold:16>Select<font:Arial:16> - Painting with the brush selects grid points
<font:Arial Bold:16>Adjust Selection<font:Arial:16> - The currently selected grid points can be raised or lowered as a group
<font:Arial Bold:16>Add Dirt<font:Arial:16> - "Dirt" is added at the center of the brush
<font:Arial Bold:16>Excavate<font:Arial:16> - "Dirt" is removed from the center of the brush
<font:Arial Bold:16>Ajust Height<font:Arial:16> - The brush selection can be dragged to raise or lower it
<font:Arial Bold:16>Flatten<font:Arial:16> - The brush surface is set to a flat plane height
<font:Arial Bold:16>Smooth<font:Arial:16> - Rough areas are made more smooth in the bounds of the brush
<font:Arial Bold:16>Set Height<font:Arial:16> - The terrain within the brush is set to a constant height (configurable in the Terrain Editor Settings)
<font:Arial Bold:16>Set Empty<font:Arial:16> - The squares covered by the brush are made into holes in the terrain
<font:Arial Bold:16>Clear Empty<font:Arial:16> - The squares covered by the brush are made solid
<font:Arial Bold:16>Paint Material<font:Arial:16> - The current terrain texture material will be painted with the brush

View File

@ -0,0 +1,21 @@
<lmargin%:5><rmargin%:95><font:Arial Bold:20>Terrain Terraform Editor...<font:Arial:16>
The Terrain Terraform Editor is used to algorithmically generate terrain heightfields. Heightfield operations are arranged in a stack, with some operations using the results of previous operations to produce new heightfields. The results of the last operation on the stack can be applied to the terrain using the Apply button.
The Terraform Editor has two panes - the top pane displays information about the currently selected operation, and the bottom pane shows the current operation stack. Between the two is a pull down menu for the creation of new operations. The first operation in the stack is always the General operation (which can't be deleted).
The following operations are supported in the editor:
<font:Arial Bold:16>fBm Fractal<font:Arial:16> - Fractal for creating bumpy hills
<font:Arial Bold:16>Rigid Multifractal<font:Arial:16> - Fractal for creating ridges and sweeping valleys
<font:Arial Bold:16>Canyon Fractal<font:Arial:16> - Fractal for creating vertical canyon ridges
<font:Arial Bold:16>Sinus<font:Arial:16> - Overlapping sine wave patterns with different frequencies useful for creating rolling hills
<font:Arial Bold:16>Bitmap<font:Arial:16> - Used to import an existing 256x256 bitmap as a heightfield
<font:Arial Bold:16>Turbulence<font:Arial:16> - perturbs another operation on the stack
<font:Arial Bold:16>Smoothing<font:Arial:16> - smooths another operation on the stack
<font:Arial Bold:16>Smooth Water<font:Arial:16> - smooths water
<font:Arial Bold:16>Smooth Ridges/valleys<font:Arial:16> - smooths an existing operation on edge boundaries
<font:Arial Bold:16>Filter<font:Arial:16> - filters an existing operation based on a curve
<font:Arial Bold:16>Thermal Erosion<font:Arial:16> - erodes an existing operation using a thermal erosion algorithm
<font:Arial Bold:16>Hydraulic Erosion<font:Arial:16> - erodes an existing operation using a hydraulic erosion algorithm
<font:Arial Bold:16>Blend<font:Arial:16> - blends two existing operations acording to a scale factor and mathmatical operator
<font:Arial Bold:16>Terrain File<font:Arial:16> - loads an existing terrain file onto the stack

View File

@ -0,0 +1,12 @@
<lmargin%:5><rmargin%:95><font:Arial Bold:20>Terrain Texture Editor...<font:Arial:16>
The Terrain Texture Editor is used to algorithmically place terrain texures based on the heightfield at the bottom of the terraformer heightfield stack. The texture editor has three main interface elements on the right side of the screen - from top to bottom they are the operation inspector pane, the material list, and the placement operation list.
Essentially, terrain materials (textures) are added with the "Add Material" button. This will look for any texture (.png or .jpg) in a subdirectory of any directory named "terrains". Once a material is added to the terrain, the user can select one of several placement operations that govern where that material will be placed on the terrain - they are:
<font:Arial Bold:16>Place by Fractal<font:Arial:16> - Places the terrain texture randomly across the terrain based on a brownian motion fractal.
<font:Arial Bold:16>Place by Height<font:Arial:16> - Places the texture based on an elevation filter
<font:Arial Bold:16>Place by Slope<font:Arial:16> - Places the texture based on a slope filter
<font:Arial Bold:16>Place by Water Level<font:Arial:16> - Places the texture based on the water level parameter in the terraform editor
Pressing the "Apply" button applies the current texture operation list to the terrain file.

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.3 KiB

View File

@ -0,0 +1,15 @@
//--- OBJECT WRITE BEGIN ---
datablock sgMissionLightingFilterData(test) {
canSaveDynamicFields = "1";
className = "sgMissionLightingFilterData";
CinematicFilter = "1";
LightingIntensity = "1.24138";
LightingFilter = "1 1 1 1";
CinematicFilterAmount = "0.735632";
CinematicFilterReferenceIntensity = "0";
CinematicFilterReferenceColor = "1 1 1 1";
};
//--- OBJECT WRITE END ---

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 636 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 67 KiB

View File

@ -0,0 +1,75 @@
//--- OBJECT WRITE BEGIN ---
datablock sgLightObjectData(CottageLight) {
canSaveDynamicFields = "1";
className = "sgLightObjectData";
LightOn = "1";
Radius = "15";
Brightness = "1";
Colour = "0.712644 0.45977 0.195402 1";
FlareOn = "0";
FlareTP = "1";
FlareColour = "1 1 1 1";
ConstantSizeOn = "0";
ConstantSize = "3";
NearSize = "3";
FarSize = "0.5";
NearDistance = "10";
FarDistance = "30";
FadeTime = "0.1";
BlendMode = "0";
AnimColour = "0";
AnimBrightness = "0";
AnimRadius = "0";
AnimOffsets = "0";
AnimRotation = "0";
LinkFlare = "1";
LinkFlareSize = "0";
MinColour = "0 0 0 1";
MaxColour = "0.712644 0.45977 0.195402 1";
MinBrightness = "0";
MaxBrightness = "1";
MinRadius = "0.1";
MaxRadius = "15";
StartOffset = "-5 0 0";
EndOffset = "5 0 0";
MinRotation = "0";
MaxRotation = "359";
SingleColourKeys = "1";
RedKeys = "AZA";
GreenKeys = "AZA";
BlueKeys = "AZA";
BrightnessKeys = "AZA";
RadiusKeys = "AZA";
OffsetKeys = "AZA";
RotationKeys = "AZA";
ColourTime = "5";
BrightnessTime = "5";
RadiusTime = "5";
OffsetTime = "5";
RotationTime = "5";
LerpColour = "1";
LerpBrightness = "1";
LerpRadius = "1";
LerpOffset = "1";
LerpRotation = "1";
StaticLight = "1";
SpotLight = "0";
SpotAngle = "1";
AdvancedLightingModel = "1";
EffectsDTSObjects = "1";
CastsShadows = "1";
DiffuseRestrictZone = "0";
AmbientRestrictZone = "0";
LocalAmbientAmount = "0";
SmoothSpotLight = "0";
DoubleSidedAmbient = "0";
UseNormals = "1";
MountPoint = "0";
MountPosition = "0 0 0";
MountRotation = "1 0 0 0";
};
//--- OBJECT WRITE END ---

Binary file not shown.

View File

@ -0,0 +1,85 @@
//-----------------------------------------------
// Copyright <20> Synapse Gaming 2003
// Written by John Kabus
//-----------------------------------------------
//--- OBJECT WRITE BEGIN ---
datablock sgUniversalStaticLightData(sgBlueLightDataBlock) {
canSaveDynamicFields = "1";
className = "sgUniversalStaticLightData";
LightOn = "0";
Radius = "2";
Brightness = "1";
Colour = "0.654902 0.690196 1 1";
FlareOn = "0";
FlareTP = "1";
FlareColour = "1 1 1 1";
ConstantSizeOn = "0";
ConstantSize = "3";
NearSize = "3";
FarSize = "0.5";
NearDistance = "10";
FarDistance = "30";
FadeTime = "0.1";
BlendMode = "0";
AnimColour = "0";
AnimBrightness = "0";
AnimRadius = "0";
AnimOffsets = "0";
AnimRotation = "0";
LinkFlare = "1";
LinkFlareSize = "0";
MinColour = "0 0 0 1";
MaxColour = "0.654902 0.690196 1 1";
MinBrightness = "0";
MaxBrightness = "1";
MinRadius = "0.1";
MaxRadius = "2";
StartOffset = "-5 0 0";
EndOffset = "5 0 0";
MinRotation = "0";
MaxRotation = "359";
SingleColourKeys = "1";
RedKeys = "AZA";
GreenKeys = "AZA";
BlueKeys = "AZA";
BrightnessKeys = "AZA";
RadiusKeys = "AZA";
OffsetKeys = "AZA";
RotationKeys = "AZA";
ColourTime = "5";
BrightnessTime = "5";
RadiusTime = "5";
OffsetTime = "5";
RotationTime = "5";
LerpColour = "1";
LerpBrightness = "1";
LerpRadius = "1";
LerpOffset = "1";
LerpRotation = "1";
StaticLight = "1";
SpotLight = "0";
SpotAngle = "1";
AdvancedLightingModel = "0";
EffectsDTSObjects = "0";
CastsShadows = "1";
DiffuseRestrictZone = "0";
AmbientRestrictZone = "0";
LocalAmbientAmount = "0";
SmoothSpotLight = "0";
DoubleSidedAmbient = "0";
UseNormals = "1";
MountPoint = "0";
MountPosition = "0 0 0";
MountRotation = "1 0 0 0";
};
//--- OBJECT WRITE END ---

Binary file not shown.

View File

@ -0,0 +1,66 @@
//-----------------------------------------------
// Copyright <20> Synapse Gaming 2003
// Written by John Kabus
//-----------------------------------------------
//--- OBJECT WRITE BEGIN ---
datablock sgUniversalStaticLightData(sgDefaultLightDataBlock) {
className = "sgUniversalStaticLightData";
LightOn = "1";
Radius = "10";
Brightness = "1";
Colour = "1.000000 1.000000 1.000000 1.000000";
FlareOn = "0";
FlareTP = "1";
FlareColour = "1.000000 1.000000 1.000000 1.000000";
ConstantSizeOn = "0";
ConstantSize = "1";
NearSize = "3";
FarSize = "0.5";
NearDistance = "10";
FarDistance = "30";
FadeTime = "0.1";
BlendMode = "0";
AnimColour = "0";
AnimBrightness = "0";
AnimRadius = "0";
AnimOffsets = "0";
AnimRotation = "0";
LinkFlare = "1";
LinkFlareSize = "0";
MinColour = "0.000000 0.000000 0.000000 1.000000";
MaxColour = "1.000000 1.000000 1.000000 1.000000";
MinBrightness = "0";
MaxBrightness = "1";
MinRadius = "0.1";
MaxRadius = "20";
StartOffset = "-5 0 0";
EndOffset = "5 0 0";
MinRotation = "0";
MaxRotation = "359";
SingleColourKeys = "1";
RedKeys = "AZA";
GreenKeys = "AZA";
BlueKeys = "AZA";
BrightnessKeys = "AZA";
RadiusKeys = "AZA";
OffsetKeys = "AZA";
RotationKeys = "AZA";
ColourTime = "5";
BrightnessTime = "5";
RadiusTime = "5";
OffsetTime = "5";
RotationTime = "5";
LerpColour = "1";
LerpBrightness = "1";
LerpRadius = "1";
LerpOffset = "1";
LerpRotation = "1";
StaticLight = "0";
SpotLight = "0";
SpotAngle = "1";
AdvancedLightingModel = "1";
EffectsDTSObjects = "1";
};
//--- OBJECT WRITE END ---

View File

@ -0,0 +1,91 @@
//-----------------------------------------------
// Copyright <20> Synapse Gaming 2003
// Written by John Kabus
//-----------------------------------------------
//--- OBJECT WRITE BEGIN ---
datablock sgUniversalStaticLightData(sgDynamicFireDataBlock) {
className = "sgUniversalStaticLightData";
LightOn = "1";
Radius = "3.5";
Brightness = "0.448276";
Colour = "1.000000 0.368627 0.000000 1.000000";
FlareOn = "1";
FlareTP = "1";
FlareBitmap = "common/lighting/lightFalloffMono";
FlareColour = "1.000000 1.000000 1.000000 1.000000";
ConstantSizeOn = "0";
ConstantSize = "2";
NearSize = "2";
FarSize = "0.5";
NearDistance = "2";
FarDistance = "1000";
FadeTime = "0.01";
BlendMode = "0";
AnimColour = "0";
AnimBrightness = "0";
AnimRadius = "0";
AnimOffsets = "0";
AnimRotation = "0";
LinkFlare = "1";
LinkFlareSize = "0";
MinColour = "0.000000 0.000000 0.000000 1.000000";
MaxColour = "1.000000 0.368627 0.000000 1.000000";
MinBrightness = "0";
MaxBrightness = "0.448276";
MinRadius = "0.1";
MaxRadius = "3.5";
StartOffset = "-5 0 0";
EndOffset = "5 0 0";
MinRotation = "0";
MaxRotation = "359";
SingleColourKeys = "1";
RedKeys = "AZA";
GreenKeys = "AZA";
BlueKeys = "AZA";
BrightnessKeys = "AZA";
RadiusKeys = "AZA";
OffsetKeys = "AZA";
RotationKeys = "AZA";
ColourTime = "5";
BrightnessTime = "5";
RadiusTime = "5";
OffsetTime = "5";
RotationTime = "5";
LerpColour = "1";
LerpBrightness = "1";
LerpRadius = "1";
LerpOffset = "1";
LerpRotation = "1";
StaticLight = "0";
SpotLight = "0";
SpotAngle = "1";
AdvancedLightingModel = "0";
EffectsDTSObjects = "1";
CastsShadows = "1";
DiffuseRestrictZone = "0";
AmbientRestrictZone = "0";
LocalAmbientAmount = "0";
SmoothSpotLight = "0";
DoubleSidedAmbient = "0";
LightingModelName = "SG - Original Stock (Lighting Pack)";
};
//--- OBJECT WRITE END ---

Binary file not shown.

View File

@ -0,0 +1,78 @@
//--- OBJECT WRITE BEGIN ---
datablock sgUniversalStaticLightData(sgFirePitPSDataBlock) {
className = "sgUniversalStaticLightData";
LightOn = "1";
Radius = "3.25";
Brightness = "1";
Colour = "1.000000 1.000000 1.000000 1.000000";
FlareOn = "0";
FlareTP = "1";
FlareColour = "1.000000 1.000000 1.000000 1.000000";
ConstantSizeOn = "0";
ConstantSize = "1";
NearSize = "3";
FarSize = "0.5";
NearDistance = "10";
FarDistance = "30";
FadeTime = "0.1";
BlendMode = "0";
AnimColour = "0";
AnimBrightness = "0";
AnimRadius = "0";
AnimOffsets = "0";
AnimRotation = "0";
LinkFlare = "1";
LinkFlareSize = "0";
MinColour = "0.000000 0.000000 0.000000 1.000000";
MaxColour = "1.000000 1.000000 1.000000 1.000000";
MinBrightness = "0";
MaxBrightness = "1";
MinRadius = "0.1";
MaxRadius = "20";
StartOffset = "-5 0 0";
EndOffset = "5 0 0";
MinRotation = "0";
MaxRotation = "359";
SingleColourKeys = "1";
RedKeys = "AZA";
GreenKeys = "AZA";
BlueKeys = "AZA";
BrightnessKeys = "AZA";
RadiusKeys = "AZA";
OffsetKeys = "AZA";
RotationKeys = "AZA";
ColourTime = "5";
BrightnessTime = "5";
RadiusTime = "5";
OffsetTime = "5";
RotationTime = "5";
LerpColour = "1";
LerpBrightness = "1";
LerpRadius = "1";
LerpOffset = "1";
LerpRotation = "1";
StaticLight = "0";
SpotLight = "0";
SpotAngle = "1";
EffectsDTSObjects = "1";
CastsShadows = "1";
DiffuseRestrictZone = "0";
AmbientRestrictZone = "0";
LocalAmbientAmount = "0";
SmoothSpotLight = "0";
DoubleSidedAmbient = "0";
LightingModelName = "SG - Original Stock (Lighting Pack)";
};
//--- OBJECT WRITE END ---

Binary file not shown.

View File

@ -0,0 +1,75 @@
//--- OBJECT WRITE BEGIN ---
datablock sgUniversalStaticLightData(sgFirePitStaticPSDataBlock) {
className = "sgUniversalStaticLightData";
LightOn = "1";
Radius = "30";
Brightness = "0.666667";
Colour = "0.908046 0.459770 0.000000 1.000000";
FlareOn = "0";
FlareTP = "1";
FlareColour = "1.000000 1.000000 1.000000 1.000000";
ConstantSizeOn = "0";
ConstantSize = "1";
NearSize = "3";
FarSize = "0.5";
NearDistance = "10";
FarDistance = "30";
FadeTime = "0.1";
BlendMode = "0";
AnimColour = "0";
AnimBrightness = "0";
AnimRadius = "0";
AnimOffsets = "0";
AnimRotation = "0";
LinkFlare = "1";
LinkFlareSize = "0";
MinColour = "0.000000 0.000000 0.000000 1.000000";
MaxColour = "1.000000 1.000000 1.000000 1.000000";
MinBrightness = "0";
MaxBrightness = "1";
MinRadius = "0.1";
MaxRadius = "20";
StartOffset = "-5 0 0";
EndOffset = "5 0 0";
MinRotation = "0";
MaxRotation = "359";
SingleColourKeys = "1";
RedKeys = "AZA";
GreenKeys = "AZA";
BlueKeys = "AZA";
BrightnessKeys = "AZA";
RadiusKeys = "AZA";
OffsetKeys = "AZA";
RotationKeys = "AZA";
ColourTime = "5";
BrightnessTime = "5";
RadiusTime = "5";
OffsetTime = "5";
RotationTime = "5";
LerpColour = "1";
LerpBrightness = "1";
LerpRadius = "1";
LerpOffset = "1";
LerpRotation = "1";
StaticLight = "1";
SpotLight = "0";
SpotAngle = "1";
AdvancedLightingModel = "0";
EffectsDTSObjects = "0";
CastsShadows = "1";
DiffuseRestrictZone = "0";
AmbientRestrictZone = "0";
LocalAmbientAmount = "0";
SmoothSpotLight = "0";
DoubleSidedAmbient = "0";
LightingModelName = "SG - Original Advanced (Lighting Pack)";
};
//--- OBJECT WRITE END ---

View File

@ -0,0 +1,85 @@
//-----------------------------------------------
// Copyright <20> Synapse Gaming 2003
// Written by John Kabus
//-----------------------------------------------
//--- OBJECT WRITE BEGIN ---
datablock sgUniversalStaticLightData(sgGooDataBlock) {
className = "sgUniversalStaticLightData";
LightOn = "1";
Radius = "48";
Brightness = "0.885057";
Colour = "0.301961 0.898039 0.301961 1.000000";
FlareOn = "0";
FlareTP = "1";
FlareColour = "1.000000 1.000000 1.000000 1.000000";
ConstantSizeOn = "0";
ConstantSize = "3";
NearSize = "3";
FarSize = "0.5";
NearDistance = "10";
FarDistance = "30";
FadeTime = "0.1";
BlendMode = "0";
AnimColour = "0";
AnimBrightness = "0";
AnimRadius = "0";
AnimOffsets = "0";
AnimRotation = "0";
LinkFlare = "1";
LinkFlareSize = "0";
MinColour = "0.000000 0.000000 0.000000 1.000000";
MaxColour = "0.301961 0.898039 0.301961 1.000000";
MinBrightness = "0";
MaxBrightness = "0.885057";
MinRadius = "0.1";
MaxRadius = "48";
StartOffset = "-5 0 0";
EndOffset = "5 0 0";
MinRotation = "0";
MaxRotation = "359";
SingleColourKeys = "1";
RedKeys = "AZA";
GreenKeys = "AZA";
BlueKeys = "AZA";
BrightnessKeys = "AZA";
RadiusKeys = "AZA";
OffsetKeys = "AZA";
RotationKeys = "AZA";
ColourTime = "5";
BrightnessTime = "5";
RadiusTime = "5";
OffsetTime = "5";
RotationTime = "5";
LerpColour = "1";
LerpBrightness = "1";
LerpRadius = "1";
LerpOffset = "1";
LerpRotation = "1";
StaticLight = "1";
SpotLight = "0";
SpotAngle = "1";
AdvancedLightingModel = "1";
EffectsDTSObjects = "0";
CastsShadows = "1";
DiffuseRestrictZone = "0";
AmbientRestrictZone = "0";
LocalAmbientAmount = "0.241379";
SmoothSpotLight = "0";
DoubleSidedAmbient = "1";
LightingModelName = "SG - Original Advanced (Lighting Pack)";
UseNormals = "1";
RestrictZoneDiffuse = "0";
RestrictZoneAmbient = "0";
RestrictZone = "0";
};
//--- OBJECT WRITE END ---

Binary file not shown.

View File

@ -0,0 +1,79 @@
//--- OBJECT WRITE BEGIN ---
datablock sgUniversalStaticLightData(sgLanternPSDataBlock) {
className = "sgUniversalStaticLightData";
LightOn = "1";
Radius = "9";
Brightness = "1";
Colour = "1.000000 1.000000 1.000000 1.000000";
FlareOn = "0";
FlareTP = "1";
FlareColour = "1.000000 1.000000 1.000000 1.000000";
ConstantSizeOn = "0";
ConstantSize = "1";
NearSize = "3";
FarSize = "0.5";
NearDistance = "10";
FarDistance = "30";
FadeTime = "0.1";
BlendMode = "0";
AnimColour = "0";
AnimBrightness = "0";
AnimRadius = "0";
AnimOffsets = "0";
AnimRotation = "0";
LinkFlare = "1";
LinkFlareSize = "0";
MinColour = "0.000000 0.000000 0.000000 1.000000";
MaxColour = "1.000000 1.000000 1.000000 1.000000";
MinBrightness = "0";
MaxBrightness = "1";
MinRadius = "0.1";
MaxRadius = "20";
StartOffset = "-5 0 0";
EndOffset = "5 0 0";
MinRotation = "0";
MaxRotation = "359";
SingleColourKeys = "1";
RedKeys = "AZA";
GreenKeys = "AZA";
BlueKeys = "AZA";
BrightnessKeys = "AZA";
RadiusKeys = "AZA";
OffsetKeys = "AZA";
RotationKeys = "AZA";
ColourTime = "5";
BrightnessTime = "5";
RadiusTime = "5";
OffsetTime = "5";
RotationTime = "5";
LerpColour = "1";
LerpBrightness = "1";
LerpRadius = "1";
LerpOffset = "1";
LerpRotation = "1";
StaticLight = "0";
SpotLight = "0";
SpotAngle = "1";
AdvancedLightingModel = "0";
EffectsDTSObjects = "1";
CastsShadows = "1";
DiffuseRestrictZone = "0";
AmbientRestrictZone = "0";
LocalAmbientAmount = "0";
SmoothSpotLight = "0";
DoubleSidedAmbient = "0";
LightingModelName = "SG - Original Advanced (Lighting Pack)";
};
//--- OBJECT WRITE END ---

Binary file not shown.

View File

@ -0,0 +1,87 @@
//--- OBJECT WRITE BEGIN ---
datablock sgUniversalStaticLightData(sgMountLight) {
className = "sgUniversalStaticLightData";
LightOn = "1";
Radius = "0.85";
Brightness = "0.37931";
Colour = "1.000000 0.976471 0.941177 1.000000";
FlareOn = "0";
FlareTP = "1";
FlareBitmap = "common/lighting/corona";
FlareColour = "1.000000 1.000000 1.000000 1.000000";
ConstantSizeOn = "0";
ConstantSize = "0.4";
NearSize = "0.4";
FarSize = "0.6";
NearDistance = "3";
FarDistance = "10";
FadeTime = "0.1";
BlendMode = "0";
AnimColour = "0";
AnimBrightness = "0";
AnimRadius = "0";
AnimOffsets = "0";
AnimRotation = "0";
LinkFlare = "1";
LinkFlareSize = "0";
MinColour = "0.000000 0.000000 0.000000 1.000000";
MaxColour = "1.000000 0.976471 0.941177 1.000000";
MinBrightness = "0";
MaxBrightness = "0.37931";
MinRadius = "0.1";
MaxRadius = "0.85";
StartOffset = "-5 0 0";
EndOffset = "5 0 0";
MinRotation = "0";
MaxRotation = "359";
SingleColourKeys = "1";
RedKeys = "AZA";
GreenKeys = "AZA";
BlueKeys = "AZA";
BrightnessKeys = "AZA";
RadiusKeys = "AZA";
OffsetKeys = "AZA";
RotationKeys = "AZA";
ColourTime = "5";
BrightnessTime = "5";
RadiusTime = "5";
OffsetTime = "5";
RotationTime = "5";
LerpColour = "1";
LerpBrightness = "1";
LerpRadius = "1";
LerpOffset = "1";
LerpRotation = "1";
StaticLight = "0";
SpotLight = "1";
SpotAngle = "120";
AdvancedLightingModel = "0";
EffectsDTSObjects = "1";
CastsShadows = "1";
DiffuseRestrictZone = "1";
AmbientRestrictZone = "0";
LocalAmbientAmount = "0";
SmoothSpotLight = "0";
DoubleSidedAmbient = "0";
LightingModelName = "SG - Original Stock (Lighting Pack)";
UseNormals = "1";
MountPoint = "0";
MountPosition = "0 0 0";
MountRotation = "-1 0 0 90";
};
//--- OBJECT WRITE END ---

Binary file not shown.

View File

@ -0,0 +1,86 @@
//-----------------------------------------------
// Copyright <20> Synapse Gaming 2003
// Written by John Kabus
//-----------------------------------------------
//--- OBJECT WRITE BEGIN ---
datablock sgUniversalStaticLightData(sgRedLightDataBlock) {
canSaveDynamicFields = "1";
className = "sgUniversalStaticLightData";
LightOn = "1";
Radius = "10";
Brightness = "1";
Colour = "0.804598 0.586207 0.321839 1";
FlareOn = "0";
FlareTP = "1";
FlareColour = "1 1 1 1";
ConstantSizeOn = "0";
ConstantSize = "3";
NearSize = "3";
FarSize = "0.5";
NearDistance = "10";
FarDistance = "30";
FadeTime = "0.1";
BlendMode = "0";
AnimColour = "0";
AnimBrightness = "0";
AnimRadius = "0";
AnimOffsets = "0";
AnimRotation = "0";
LinkFlare = "1";
LinkFlareSize = "0";
MinColour = "0 0 0 1";
MaxColour = "0.804598 0.586207 0.321839 1";
MinBrightness = "0";
MaxBrightness = "1";
MinRadius = "0.1";
MaxRadius = "10";
StartOffset = "-5 0 0";
EndOffset = "5 0 0";
MinRotation = "0";
MaxRotation = "359";
SingleColourKeys = "1";
RedKeys = "AZA";
GreenKeys = "AZA";
BlueKeys = "AZA";
BrightnessKeys = "AZA";
RadiusKeys = "AZA";
OffsetKeys = "AZA";
RotationKeys = "AZA";
ColourTime = "5";
BrightnessTime = "5";
RadiusTime = "5";
OffsetTime = "5";
RotationTime = "5";
LerpColour = "1";
LerpBrightness = "1";
LerpRadius = "1";
LerpOffset = "1";
LerpRotation = "1";
StaticLight = "1";
SpotLight = "0";
SpotAngle = "1";
AdvancedLightingModel = "0";
EffectsDTSObjects = "1";
CastsShadows = "1";
DiffuseRestrictZone = "1";
AmbientRestrictZone = "1";
LocalAmbientAmount = "0";
SmoothSpotLight = "0";
DoubleSidedAmbient = "0";
UseNormals = "1";
MountPoint = "0";
MountPosition = "0 0 0";
MountRotation = "1 0 0 0";
};
//--- OBJECT WRITE END ---

Binary file not shown.

View File

@ -0,0 +1,62 @@
//--- OBJECT WRITE BEGIN ---
datablock sgUniversalStaticLightData(sgSpot2DataBlock) {
className = "sgUniversalStaticLightData";
LightOn = "1";
Radius = "4";
Brightness = "0.885057";
Colour = "1.000000 0.000000 0.000000 1.000000";
FlareOn = "0";
FlareTP = "1";
FlareColour = "1.000000 1.000000 1.000000 1.000000";
ConstantSizeOn = "0";
ConstantSize = "1";
NearSize = "3";
FarSize = "0.5";
NearDistance = "10";
FarDistance = "30";
FadeTime = "0.1";
BlendMode = "0";
AnimColour = "0";
AnimBrightness = "0";
AnimRadius = "0";
AnimOffsets = "0";
AnimRotation = "0";
LinkFlare = "1";
LinkFlareSize = "0";
MinColour = "0.000000 0.000000 0.000000 1.000000";
MaxColour = "1.000000 1.000000 1.000000 1.000000";
MinBrightness = "0";
MaxBrightness = "1";
MinRadius = "0.1";
MaxRadius = "20";
StartOffset = "-5 0 0";
EndOffset = "5 0 0";
MinRotation = "0";
MaxRotation = "359";
SingleColourKeys = "1";
RedKeys = "AZA";
GreenKeys = "AZA";
BlueKeys = "AZA";
BrightnessKeys = "AZA";
RadiusKeys = "AZA";
OffsetKeys = "AZA";
RotationKeys = "AZA";
ColourTime = "5";
BrightnessTime = "5";
RadiusTime = "5";
OffsetTime = "5";
RotationTime = "5";
LerpColour = "1";
LerpBrightness = "1";
LerpRadius = "1";
LerpOffset = "1";
LerpRotation = "1";
StaticLight = "1";
SpotLight = "1";
SpotAngle = "115.575";
AdvancedLightingModel = "0";
EffectsDTSObjects = "1";
};
//--- OBJECT WRITE END ---

Binary file not shown.

View File

@ -0,0 +1,95 @@
//-----------------------------------------------
// Copyright <20> Synapse Gaming 2003
// Written by John Kabus
//-----------------------------------------------
//--- OBJECT WRITE BEGIN ---
datablock sgUniversalStaticLightData(sgSpotDataBlock) {
className = "sgUniversalStaticLightData";
LightOn = "1";
Radius = "4";
Brightness = "0.62069";
Colour = "1.000000 1.000000 1.000000 1.000000";
FlareOn = "1";
FlareTP = "1";
FlareBitmap = "common/lighting/corona";
FlareColour = "1.000000 1.000000 1.000000 1.000000";
ConstantSizeOn = "0";
ConstantSize = "0.4";
NearSize = "0.4";
FarSize = "0.4";
NearDistance = "3";
FarDistance = "10";
FadeTime = "0.1";
BlendMode = "0";
AnimColour = "0";
AnimBrightness = "0";
AnimRadius = "0";
AnimOffsets = "0";
AnimRotation = "0";
LinkFlare = "1";
LinkFlareSize = "0";
MinColour = "0.000000 0.000000 0.000000 1.000000";
MaxColour = "1.000000 1.000000 1.000000 1.000000";
MinBrightness = "0";
MaxBrightness = "0.62069";
MinRadius = "0.1";
MaxRadius = "4";
StartOffset = "-5 0 0";
EndOffset = "5 0 0";
MinRotation = "0";
MaxRotation = "359";
SingleColourKeys = "1";
RedKeys = "AZA";
GreenKeys = "AZA";
BlueKeys = "AZA";
BrightnessKeys = "AZA";
RadiusKeys = "AZA";
OffsetKeys = "AZA";
RotationKeys = "AZA";
ColourTime = "5";
BrightnessTime = "5";
RadiusTime = "5";
OffsetTime = "5";
RotationTime = "5";
LerpColour = "1";
LerpBrightness = "1";
LerpRadius = "1";
LerpOffset = "1";
LerpRotation = "1";
StaticLight = "1";
SpotLight = "1";
SpotAngle = "120";
AdvancedLightingModel = "0";
EffectsDTSObjects = "1";
CastsShadows = "1";
DiffuseRestrictZone = "0";
AmbientRestrictZone = "0";
LocalAmbientAmount = "0";
SmoothSpotLight = "0";
DoubleSidedAmbient = "0";
LightingModelName = "SG - Original Stock (Lighting Pack)";
UseNormals = "1";
MountPoint = "0";
MountPosition = "0 0 0";
MountRotation = "-1 0 0 90";
};
//--- OBJECT WRITE END ---

Binary file not shown.

View File

@ -0,0 +1,83 @@
//--- OBJECT WRITE BEGIN ---
datablock sgUniversalStaticLightData(sgSpotSwingStaticDataBlock) {
className = "sgUniversalStaticLightData";
LightOn = "1";
Radius = "4";
Brightness = "0.333333";
Colour = "1.000000 1.000000 1.000000 1.000000";
FlareOn = "0";
FlareTP = "1";
FlareColour = "1.000000 1.000000 1.000000 1.000000";
ConstantSizeOn = "0";
ConstantSize = "3";
NearSize = "3";
FarSize = "0.5";
NearDistance = "10";
FarDistance = "30";
FadeTime = "0.1";
BlendMode = "0";
AnimColour = "0";
AnimBrightness = "0";
AnimRadius = "0";
AnimOffsets = "0";
AnimRotation = "0";
LinkFlare = "1";
LinkFlareSize = "0";
MinColour = "0.000000 0.000000 0.000000 1.000000";
MaxColour = "1.000000 1.000000 1.000000 1.000000";
MinBrightness = "0";
MaxBrightness = "0.333333";
MinRadius = "0.1";
MaxRadius = "4";
StartOffset = "-5 0 0";
EndOffset = "5 0 0";
MinRotation = "0";
MaxRotation = "359";
SingleColourKeys = "1";
RedKeys = "AZA";
GreenKeys = "AZA";
BlueKeys = "AZA";
BrightnessKeys = "AZA";
RadiusKeys = "AZA";
OffsetKeys = "AZA";
RotationKeys = "AZA";
ColourTime = "5";
BrightnessTime = "5";
RadiusTime = "5";
OffsetTime = "5";
RotationTime = "5";
LerpColour = "1";
LerpBrightness = "1";
LerpRadius = "1";
LerpOffset = "1";
LerpRotation = "1";
StaticLight = "1";
SpotLight = "1";
SpotAngle = "119.667";
AdvancedLightingModel = "1";
EffectsDTSObjects = "1";
CastsShadows = "1";
DiffuseRestrictZone = "1";
AmbientRestrictZone = "1";
LocalAmbientAmount = "0";
SmoothSpotLight = "0";
DoubleSidedAmbient = "0";
LightingModelName = "SG - Original Stock (Lighting Pack)";
UseNormals = "1";
MountPoint = "0";
MountPosition = "0 0 0";
MountRotation = "1 0 0 0";
};
//--- OBJECT WRITE END ---

View File

@ -0,0 +1,76 @@
//--- OBJECT WRITE BEGIN ---
datablock sgLightObjectData(sgTempleSmallWindowStaticPSDataBlock) {
canSaveDynamicFields = "1";
className = "sgLightObjectData";
LightOn = "1";
Radius = "25";
Brightness = "0.873563";
Colour = "0.886275 0.929412 1 1";
FlareOn = "0";
FlareTP = "1";
FlareColour = "1 1 1 1";
ConstantSizeOn = "0";
ConstantSize = "3";
NearSize = "3";
FarSize = "0.5";
NearDistance = "10";
FarDistance = "30";
FadeTime = "0.1";
BlendMode = "0";
AnimColour = "0";
AnimBrightness = "0";
AnimRadius = "0";
AnimOffsets = "0";
AnimRotation = "0";
LinkFlare = "1";
LinkFlareSize = "0";
MinColour = "0 0 0 1";
MaxColour = "0.886275 0.929412 1 1";
MinBrightness = "0";
MaxBrightness = "0.873563";
MinRadius = "0.1";
MaxRadius = "25";
StartOffset = "-5 0 0";
EndOffset = "5 0 0";
MinRotation = "0";
MaxRotation = "359";
SingleColourKeys = "1";
RedKeys = "AZA";
GreenKeys = "AZA";
BlueKeys = "AZA";
BrightnessKeys = "AZA";
RadiusKeys = "AZA";
OffsetKeys = "AZA";
RotationKeys = "AZA";
ColourTime = "5";
BrightnessTime = "5";
RadiusTime = "5";
OffsetTime = "5";
RotationTime = "5";
LerpColour = "1";
LerpBrightness = "1";
LerpRadius = "1";
LerpOffset = "1";
LerpRotation = "1";
StaticLight = "1";
SpotLight = "1";
SpotAngle = "19.4138";
AdvancedLightingModel = "1";
EffectsDTSObjects = "1";
CastsShadows = "0";
DiffuseRestrictZone = "0";
AmbientRestrictZone = "0";
LocalAmbientAmount = "0";
SmoothSpotLight = "1";
DoubleSidedAmbient = "0";
UseNormals = "0";
MountPoint = "0";
MountPosition = "0 0 0";
MountRotation = "1 0 0 0";
};
//--- OBJECT WRITE END ---

View File

@ -0,0 +1,78 @@
//--- OBJECT WRITE BEGIN ---
datablock sgLightObjectData(sgTempleTorchStaticPSDataBlock) {
canSaveDynamicFields = "1";
className = "sgLightObjectData";
LightOn = "1";
Radius = "12";
Brightness = "0.62069";
Colour = "1 0.964706 0.768628 1";
FlareOn = "0";
FlareTP = "1";
FlareColour = "1 1 1 1";
ConstantSizeOn = "0";
ConstantSize = "3";
NearSize = "3";
FarSize = "0.5";
NearDistance = "10";
FarDistance = "30";
FadeTime = "0.1";
BlendMode = "0";
AnimColour = "0";
AnimBrightness = "0";
AnimRadius = "0";
AnimOffsets = "0";
AnimRotation = "0";
LinkFlare = "1";
LinkFlareSize = "0";
MinColour = "1 0.666667 0.298039 1";
MaxColour = "1 0.964706 0.768628 1";
MinBrightness = "0.5";
MaxBrightness = "0.62069";
MinRadius = "8";
MaxRadius = "12";
StartOffset = "-5 0 0";
EndOffset = "5 0 0";
MinRotation = "0";
MaxRotation = "359";
SingleColourKeys = "1";
RedKeys = "AZA";
GreenKeys = "AZA";
BlueKeys = "AZA";
BrightnessKeys = "AZA";
RadiusKeys = "AZA";
OffsetKeys = "AZA";
RotationKeys = "AZA";
ColourTime = "1";
BrightnessTime = "4";
RadiusTime = "2";
OffsetTime = "5";
RotationTime = "5";
LerpColour = "1";
LerpBrightness = "1";
LerpRadius = "1";
LerpOffset = "1";
LerpRotation = "1";
StaticLight = "1";
SpotLight = "0";
SpotAngle = "1";
AdvancedLightingModel = "1";
EffectsDTSObjects = "1";
CastsShadows = "0";
DiffuseRestrictZone = "0";
AmbientRestrictZone = "0";
LocalAmbientAmount = "0";
SmoothSpotLight = "0";
DoubleSidedAmbient = "0";
UseNormals = "0";
MountPoint = "0";
MountPosition = "0 0 0";
MountRotation = "1 0 0 0";
};
//--- OBJECT WRITE END ---

View File

@ -0,0 +1,78 @@
//--- OBJECT WRITE BEGIN ---
datablock sgLightObjectData(sgTempleWindowStaticPSDataBlock) {
canSaveDynamicFields = "1";
className = "sgLightObjectData";
LightOn = "1";
Radius = "25";
Brightness = "0.770115";
Colour = "0.793103 0.83908 1 1";
FlareOn = "0";
FlareTP = "1";
FlareColour = "1 1 1 1";
ConstantSizeOn = "0";
ConstantSize = "3";
NearSize = "3";
FarSize = "0.5";
NearDistance = "10";
FarDistance = "30";
FadeTime = "0.1";
BlendMode = "0";
AnimColour = "0";
AnimBrightness = "0";
AnimRadius = "0";
AnimOffsets = "0";
AnimRotation = "0";
LinkFlare = "1";
LinkFlareSize = "0";
MinColour = "0 0 0 1";
MaxColour = "0.793103 0.83908 1 1";
MinBrightness = "0";
MaxBrightness = "0.770115";
MinRadius = "0.1";
MaxRadius = "25";
StartOffset = "-5 0 0";
EndOffset = "5 0 0";
MinRotation = "0";
MaxRotation = "359";
SingleColourKeys = "1";
RedKeys = "AZA";
GreenKeys = "AZA";
BlueKeys = "AZA";
BrightnessKeys = "AZA";
RadiusKeys = "AZA";
OffsetKeys = "AZA";
RotationKeys = "AZA";
ColourTime = "5";
BrightnessTime = "5";
RadiusTime = "5";
OffsetTime = "5";
RotationTime = "5";
LerpColour = "1";
LerpBrightness = "1";
LerpRadius = "1";
LerpOffset = "1";
LerpRotation = "1";
StaticLight = "1";
SpotLight = "1";
SpotAngle = "33.7356";
AdvancedLightingModel = "1";
EffectsDTSObjects = "1";
CastsShadows = "1";
DiffuseRestrictZone = "0";
AmbientRestrictZone = "0";
LocalAmbientAmount = "0";
SmoothSpotLight = "1";
DoubleSidedAmbient = "0";
UseNormals = "0";
MountPoint = "0";
MountPosition = "0 0 0";
MountRotation = "1 0 0 0";
};
//--- OBJECT WRITE END ---

View File

@ -0,0 +1,71 @@
//--- OBJECT WRITE BEGIN ---
datablock sgUniversalStaticLightData(sgTowerFireLightDataBlock) {
className = "sgUniversalStaticLightData";
LightOn = "1";
Radius = "5";
Brightness = "1";
Colour = "1.000000 1.000000 1.000000 1.000000";
FlareOn = "0";
FlareTP = "1";
FlareColour = "1.000000 1.000000 1.000000 1.000000";
ConstantSizeOn = "0";
ConstantSize = "1";
NearSize = "3";
FarSize = "0.5";
NearDistance = "10";
FarDistance = "30";
FadeTime = "0.1";
BlendMode = "0";
AnimColour = "0";
AnimBrightness = "0";
AnimRadius = "0";
AnimOffsets = "0";
AnimRotation = "0";
LinkFlare = "1";
LinkFlareSize = "0";
MinColour = "0.000000 0.000000 0.000000 1.000000";
MaxColour = "1.000000 1.000000 1.000000 1.000000";
MinBrightness = "0";
MaxBrightness = "1";
MinRadius = "0.1";
MaxRadius = "20";
StartOffset = "-5 0 0";
EndOffset = "5 0 0";
MinRotation = "0";
MaxRotation = "359";
SingleColourKeys = "1";
RedKeys = "AZA";
GreenKeys = "AZA";
BlueKeys = "AZA";
BrightnessKeys = "AZA";
RadiusKeys = "AZA";
OffsetKeys = "AZA";
RotationKeys = "AZA";
ColourTime = "5";
BrightnessTime = "5";
RadiusTime = "5";
OffsetTime = "5";
RotationTime = "5";
LerpColour = "1";
LerpBrightness = "1";
LerpRadius = "1";
LerpOffset = "1";
LerpRotation = "1";
StaticLight = "0";
SpotLight = "0";
SpotAngle = "1";
AdvancedLightingModel = "0";
EffectsDTSObjects = "1";
CastsShadows = "1";
DiffuseRestrictZone = "0";
AmbientRestrictZone = "0";
LocalAmbientAmount = "0";
SmoothSpotLight = "0";
DoubleSidedAmbient = "0";
LightingModelName = "SG - Inverse Square Fast Falloff (Lighting Pack)";
};
//--- OBJECT WRITE END ---

Binary file not shown.

After

Width:  |  Height:  |  Size: 165 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 164 B

300
example/common/main.cs Executable file
View File

@ -0,0 +1,300 @@
//-----------------------------------------------------------------------------
// Torque Game Engine
// Copyright (C) GarageGames.com, Inc.
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
// Load up defaults console values.
// Currently there are no defaults pref values that need to be loaded at this
// point. Simply uncomment this line of code if you do need them in the future.
//exec("./defaults.cs");
//-----------------------------------------------------------------------------
function initCommon()
{
// All mods need the random seed set
setRandomSeed();
// Very basic functions used by everyone
exec("./client/canvas.cs");
exec("./client/audio.cs");
}
function initBaseClient()
{
// Base client functionality
exec("./client/message.cs");
exec("./client/mission.cs");
exec("./client/missionDownload.cs");
exec("./client/actionMap.cs");
// There are also a number of support scripts loaded by the canvas
// when it's first initialized. Check out client/canvas.cs
}
function initBaseServer()
{
// Base server functionality
exec("./server/audio.cs");
exec("./server/server.cs");
exec("./server/message.cs");
exec("./server/commands.cs");
exec("./server/missionInfo.cs");
exec("./server/missionLoad.cs");
exec("./server/missionDownload.cs");
exec("./server/clientConnection.cs");
exec("./server/kickban.cs");
exec("./server/game.cs");
}
//-----------------------------------------------------------------------------
package Common {
function displayHelp() {
Parent::displayHelp();
error(
"Common Mod options:\n"@
" -fullscreen Starts game in full screen mode\n"@
" -windowed Starts game in windowed mode\n"@
" -autoVideo Auto detect video, but prefers OpenGL\n"@
" -openGL Force OpenGL acceleration\n"@
" -directX Force DirectX acceleration\n"@
" -voodoo2 Force Voodoo2 acceleration\n"@
" -noSound Starts game without sound\n"@
" -prefs <configFile> Exec the config file\n"
);
}
function parseArgs()
{
Parent::parseArgs();
// Arguments override defaults...
for (%i = 1; %i < $Game::argc ; %i++)
{
%arg = $Game::argv[%i];
%nextArg = $Game::argv[%i+1];
%hasNextArg = $Game::argc - %i > 1;
switch$ (%arg)
{
//--------------------
case "-fullscreen":
$pref::Video::fullScreen = 1;
$argUsed[%i]++;
//--------------------
case "-windowed":
$pref::Video::fullScreen = 0;
$argUsed[%i]++;
//--------------------
case "-noSound":
error("no support yet");
$argUsed[%i]++;
//--------------------
case "-openGL":
$pref::Video::displayDevice = "OpenGL";
$argUsed[%i]++;
//--------------------
case "-directX":
$pref::Video::displayDevice = "D3D";
$argUsed[%i]++;
//--------------------
case "-voodoo2":
$pref::Video::displayDevice = "Voodoo2";
$argUsed[%i]++;
//--------------------
case "-autoVideo":
$pref::Video::displayDevice = "";
$argUsed[%i]++;
//--------------------
case "-prefs":
$argUsed[%i]++;
if (%hasNextArg) {
exec(%nextArg, true, true);
$argUsed[%i+1]++;
%i++;
}
else
error("Error: Missing Command Line argument. Usage: -prefs <path/script.cs>");
}
}
}
function onStart()
{
Parent::onStart();
echo("\n--------- Initializing MOD: Common ---------");
initCommon();
}
function onExit()
{
echo("Exporting client prefs");
export("$pref::*", "./client/prefs.cs", False);
echo("Exporting server prefs");
export("$Pref::Server::*", "./server/prefs.cs", False);
BanList::Export("./server/banlist.cs");
OpenALShutdown();
Parent::onExit();
}
}; // Common package
activatePackage(Common);
// This is here to prevent console spam
// EditorGui.cs will eventually override it
// with a more useful function call
function onNeedRelight()
{
}
function generateRandomChunkery(%parent)
{
$chunkTestLevel--;
%count = getRandom(100);
for(%i=0; %i<%count; %i++)
{
$chunkCreateCount++;
%obj = new TextChunk()
{
textData = "level= " @ $chunkTestLevel @ ", idx = " @ %i @ $buff;
};
if($chunkTestLevel > 0)
generateRandomChunkery(%obj);
%parent.add(%obj);
// If we're hitting our limit, stop making stuff.
if($chunkCreateCount > $chunkMaxCount)
break;
}
$chunkTestLevel++;
}
function generateBigChunkTest(%buffSize, %chunkCount)
{
$chunkStartTime = getRealTime();
$chunkTestLevel = 10;
$chunkCreateCount = 0;
$chunkMaxCount = %chunkcount; // At most 16 megs of data.
$a = getRealTime();
$buff = "";
while(strlen($buff) < %buffSize)
$buff = $buff @ "klmadskldasjkadlkjsakjlsdjksldakjlkjdlaakjlsdkljaslkjslkjdaslkjd";
$b = getRealTime();
$root = new TextChunk() { textData = "ROOT"; };
$c = getRealTime();
generateRandomChunkery($root);
$d = getRealTime();
echo("Created " @ $chunkCreateCount @ " chunks in " @ $chunkTestLevel @ " levels.");
%file = "common/bigchunktest.chunk";
echo("Saving to '" @ %file @ "'...");
$e = getRealTime();
saveChunkFile($root, %file);
$f = getRealTime();
echo("Done.");
echo("Deleting object hierarchy...");
$root.delete();
echo("Done.");
echo("Loading object hierarchy from '"@%file@"'...");
$g = getRealTime();
$newRoot = loadChunkFile(%file);
$h = getRealTime();
echo("Done.");
echo("chunkCount = " @ $chunkCreateCount @ ", chunkSize=" @ %buffSize);
echo("Generated data = " @ ($chunkCreateCount * %buffSize));
echo("Elapsed time = " @ ((getRealTime() - $chunkStartTime)/1000) @ " sec.");
echo("Buffer init = " @ (($b-$a)/1000) @ " sec.");
echo("chunk gen = " @ (($d-$c)/1000) @ " sec.");
echo("save time = " @ (($f-$e)/1000) @ " sec.");
echo("load time = " @ (($h-$g)/1000) @ " sec.");
return $newRoot;
}
function testchunk()
{
%foo =
new TextChunk()
{
textData = "pony";
new TextChunk()
{
textData = "child1";
new TextChunk()
{
textData = "childQ";
};
};
new TextChunk()
{
textData = "child2";
};
new TextChunk()
{
textData = "child3";
new TextChunk()
{
textData = "childA";
};
new TextChunk()
{
textData = "childB";
};
new TextChunk()
{
textData = "childC";
};
new TextChunk()
{
textData = "childD";
};
new TextChunk()
{
textData = "childE";
};
};
};
saveChunkFile(%foo, "starter.fps/test.chunk");
%foo.delete();
$foo = loadChunkFile("starter.fps/test.chunk");
}

BIN
example/common/main.cs.dso Executable file

Binary file not shown.

13
example/common/prefs.cs Executable file
View File

@ -0,0 +1,13 @@
$Pref::Server::AdminPassword = "";
$Pref::Server::BanTime = 1800;
$Pref::Server::ConnectionError = "You do not have the correct version of Torque demo or the resources needed to play on this server, please contact the server operator or visit the <a:www.garagegames.com/mg/projects/torque1>Torque</a> project web site for more information.";
$Pref::Server::FloodProtectionEnabled = 1;
$Pref::Server::Info = "This is a Torque Demo server.";
$Pref::Server::KickBanTime = 300;
$Pref::Server::MaxChatLen = 120;
$Pref::Server::MaxPlayers = 64;
$Pref::Server::Name = "Torque Demo Server";
$Pref::Server::Password = "";
$Pref::Server::Port = 28000;
$Pref::Server::RegionMask = 2;
$Pref::Server::TimeLimit = 20;

23
example/common/server/audio.cs Executable file
View File

@ -0,0 +1,23 @@
//-----------------------------------------------------------------------------
// Torque Game Engine
// Copyright (C) GarageGames.com, Inc.
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
function ServerPlay2D(%profile)
{
// Play the given sound profile on every client.
// The sounds will be transmitted as an event, not attached to any object.
for(%idx = 0; %idx < ClientGroup.getCount(); %idx++)
ClientGroup.getObject(%idx).play2D(%profile);
}
function ServerPlay3D(%profile,%transform)
{
// Play the given sound profile at the given position on every client
// The sound will be transmitted as an event, not attached to any object.
for(%idx = 0; %idx < ClientGroup.getCount(); %idx++)
ClientGroup.getObject(%idx).play3D(%profile,%transform);
}

Binary file not shown.

View File

View File

@ -0,0 +1,205 @@
//-----------------------------------------------------------------------------
// Torque Game Engine
// Copyright (C) GarageGames.com, Inc.
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
// This script function is called before a client connection
// is accepted. Returning "" will accept the connection,
// anything else will be sent back as an error to the client.
// All the connect args are passed also to onConnectRequest
//
function GameConnection::onConnectRequest( %client, %netAddress, %name )
{
echo("Connect request from: " @ %netAddress);
if($Server::PlayerCount >= $pref::Server::MaxPlayers)
return "CR_SERVERFULL";
return "";
}
//-----------------------------------------------------------------------------
// This script function is the first called on a client accept
//
function GameConnection::onConnect( %client, %name )
{
// Send down the connection error info, the client is
// responsible for displaying this message if a connection
// error occures.
messageClient(%client,'MsgConnectionError',"",$Pref::Server::ConnectionError);
// Send mission information to the client
sendLoadInfoToClient( %client );
// Simulated client lag for testing...
// %client.setSimulatedNetParams(0.1, 30);
// Get the client's unique id:
// %authInfo = %client.getAuthInfo();
// %client.guid = getField( %authInfo, 3 );
%client.guid = 0;
addToServerGuidList( %client.guid );
// Set admin status
if (%client.getAddress() $= "local") {
%client.isAdmin = true;
%client.isSuperAdmin = true;
}
else {
%client.isAdmin = false;
%client.isSuperAdmin = false;
}
// Save client preferences on the connection object for later use.
%client.gender = "Male";
%client.armor = "Light";
%client.race = "Human";
%client.skin = addTaggedString( "base" );
%client.setPlayerName(%name);
%client.score = 0;
//
$instantGroup = ServerGroup;
$instantGroup = MissionCleanup;
echo("CADD: " @ %client @ " " @ %client.getAddress());
// Inform the client of all the other clients
%count = ClientGroup.getCount();
for (%cl = 0; %cl < %count; %cl++) {
%other = ClientGroup.getObject(%cl);
if ((%other != %client)) {
// These should be "silent" versions of these messages...
messageClient(%client, 'MsgClientJoin', "",
%other.name,
%other,
%other.sendGuid,
%other.score,
%other.isAIControlled(),
%other.isAdmin,
%other.isSuperAdmin);
}
}
// Inform the client we've joined up
messageClient(%client,
'MsgClientJoin', '\c2Welcome to the Torque demo app %1.',
%client.name,
%client,
%client.sendGuid,
%client.score,
%client.isAiControlled(),
%client.isAdmin,
%client.isSuperAdmin);
// Inform all the other clients of the new guy
messageAllExcept(%client, -1, 'MsgClientJoin', '\c1%1 joined the game.',
%client.name,
%client,
%client.sendGuid,
%client.score,
%client.isAiControlled(),
%client.isAdmin,
%client.isSuperAdmin);
// If the mission is running, go ahead download it to the client
if ($missionRunning)
%client.loadMission();
$Server::PlayerCount++;
}
//-----------------------------------------------------------------------------
// A player's name could be obtained from the auth server, but for
// now we use the one passed from the client.
// %realName = getField( %authInfo, 0 );
//
function GameConnection::setPlayerName(%client,%name)
{
%client.sendGuid = 0;
// Minimum length requirements
%name = stripTrailingSpaces( strToPlayerName( %name ) );
if ( strlen( %name ) < 3 )
%name = "Poser";
// Make sure the alias is unique, we'll hit something eventually
if (!isNameUnique(%name))
{
%isUnique = false;
for (%suffix = 1; !%isUnique; %suffix++) {
%nameTry = %name @ "." @ %suffix;
%isUnique = isNameUnique(%nameTry);
}
%name = %nameTry;
}
// Tag the name with the "smurf" color:
%client.nameBase = %name;
%client.name = addTaggedString("\cp\c8" @ %name @ "\co");
}
function isNameUnique(%name)
{
%count = ClientGroup.getCount();
for ( %i = 0; %i < %count; %i++ )
{
%test = ClientGroup.getObject( %i );
%rawName = stripChars( detag( getTaggedString( %test.name ) ), "\cp\co\c6\c7\c8\c9" );
if ( strcmp( %name, %rawName ) == 0 )
return false;
}
return true;
}
//-----------------------------------------------------------------------------
// This function is called when a client drops for any reason
//
function GameConnection::onDrop(%client, %reason)
{
%client.onClientLeaveGame();
removeFromServerGuidList( %client.guid );
messageAllExcept(%client, -1, 'MsgClientDrop', '\c1%1 has left the game.', %client.name, %client);
removeTaggedString(%client.name);
echo("CDROP: " @ %client @ " " @ %client.getAddress());
$Server::PlayerCount--;
// Reset the server if everyone has left the game
if( $Server::PlayerCount == 0 && $Server::Dedicated)
schedule(0, 0, "resetServerDefaults");
}
//-----------------------------------------------------------------------------
function GameConnection::startMission(%this)
{
// Inform the client the mission starting
commandToClient(%this, 'MissionStart', $missionSequence);
}
function GameConnection::endMission(%this)
{
// Inform the client the mission is done
commandToClient(%this, 'MissionEnd', $missionSequence);
}
//--------------------------------------------------------------------------
// Sync the clock on the client.
function GameConnection::syncClock(%client, %time)
{
commandToClient(%client, 'syncClock', %time);
}
//--------------------------------------------------------------------------
// Update all the clients with the new score
function GameConnection::incScore(%this,%delta)
{
%this.score += %delta;
messageAll('MsgClientScoreChanged', "", %this.score, %this);
}

Some files were not shown because too many files have changed in this diff Show More