Merge pull request #799 from Areloch/MiscFixes20220530

Misc Fixes for 2022/05/30
This commit is contained in:
Brian Roberts 2022-05-31 14:33:59 -05:00 committed by GitHub
commit d9361a0128
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
98 changed files with 1274 additions and 1725 deletions

View file

@ -199,15 +199,15 @@ TerrainMaterial* TerrainMaterial::findOrCreate( const char *nameOrPath )
}
// Ok... return a placeholder material then.
mat = new TerrainMaterial();
mat = new TerrainMaterial();
mat->setInternalName(nameOrPath);
mat->_setDiffuseMap(GFXTextureManager::getWarningTexturePath());
mat->mDiffuseSize = 500;
mat->_setDetailMap(StringTable->EmptyString());
mat->mDetailSize = 5;
mat->_setMacroMap(StringTable->EmptyString());
mat->mMacroSize = 200;
mat->registerObject();
mat->_setDiffuseMap(GFXTextureManager::getWarningTexturePath());
mat->mDiffuseSize = 500;
mat->_setDetailMap(StringTable->EmptyString());
mat->mDetailSize = 5;
mat->_setMacroMap(StringTable->EmptyString());
mat->mMacroSize = 200;
mat->registerObject();
Sim::getRootGroup()->addObject(mat);

View file

@ -1,15 +1,11 @@
<ModuleDefinition
canSave="true"
canSaveDynamicFields="true"
ModuleId="ExampleModule"
VersionId="1"
Group="Game"
scriptFile="ExampleModule"
scriptFile="ExampleModule.tscript"
CreateFunction="onCreate"
DestroyFunction="onDestroy">
<DeclaredAssets
canSave="true"
canSaveDynamicFields="true"
Extension="asset.taml"
Recurse="true" />
Recurse="true"/>
</ModuleDefinition>

View file

@ -1,123 +1,60 @@
//This is our create function. It's pointed to, by name, via a field defined in
//the ExampleModule.module file, which contains our module definition. It is called
//when the module is initially loaded by the engine. Generally, only common, base-level
//stuff is created(or destroyed, in the companion function), like things utilized or
//shared on both the client and server, or things that need to be loaded before anything
//else.
function ExampleModule::onCreate(%this)
{
}
//Similar to the create function, this is defined in thye module file, and called
//when the module is destroyed, usually as part of the game shutting down.
function ExampleModule::onDestroy(%this)
{
}
//This is called when the server part of the application is initially created. Torque3D
//assumes, even in a single player context, that there is ultimately a 'server' and a 'client'
//So during initial launch and startup of the engine, the server side is initialized in
//core/clientServer/scripts/server/server.tscript - in the initServer() function where this is called.
//This is called on all modules that have this function defined. This is important for
//any persistant parts of the server that always need to run such as gameplay scripts
//
//Importantly, when the gane session server is created, several functions are called to as part of the gamemode logic
//The script below contains the callbacks so the gamemode can actually be set up, but the server-side callbacks in question:
//ExampleGameMode::onMissionStart
//ExampleGameMode::onMissionEnded
//ExampleGameMode::onMissionReset
//Are called during the startup, shut down, and resetting of any and all active gamemodes, as informed by the loaded scenes
//when the game server is processed.
//These callbacks are activated in core/clientServer/scripts/server/levelLoad.tscript
//This is called when the server is initially set up by the game application
function ExampleModule::initServer(%this)
{
//This script contains our ExampleGameMode logic
%this.queueExec("./scripts/ExampleGamemodeScript");
%this.queueExec("./scripts/server/ExampleGameMode");
}
//This is called when a game session server is actually created so the game may be played. It's called
//from core/clientServer/scripts/server/server.tscript - in the createServer() function, which is called when
//A game session is actually launched, and the server is generated so game clients can connect to it.
//This is utilized to set up common things that need to be set up each time the game session server is
//created, such as common variables, datablocks to be transmitted to the client, etc.
//This is called when the server is created for an actual game/map to be played
function ExampleModule::onCreateGameServer(%this)
{
//In particular, the default client/server module handles the transmission of datablocks from
//server to client automatically as part of the connection and prepping process alongside
//validation and tramission of level objects. It does this in an abstracted way by adding
//the file paths to a master DatablockFilesList array as per below. When the server is created in
//onServerCreated(), it loads the datablocks via this array, and when when the server goes
//to pass data to the client, it iterates over this list and processes it, ensuring all datablocks
//are the most up to date possible for transmission to the connecting client
//%this.registerDatablock("./datablocks/ExampleDatablock." @ $TorqueScriptFileExtension);
//These are common managed data files. For any datablock-based stuff that gets generated by the editors
//(that doesn't have a specific associated file, like data for a player class) will go into these.
//So we'll register them now if they exist.
if(isFile("./scripts/managedData/managedDatablocks." @ $TorqueScriptFileExtension))
%this.registerDatablock("./scripts/managedData/managedDatablocks");
if(isFile("./scripts/managedData/managedForestItemData." @ $TorqueScriptFileExtension))
%this.registerDatablock("./scripts/managedData/managedForestItemData");
if(isFile("./scripts/managedData/managedForestBrushData." @ $TorqueScriptFileExtension))
%this.registerDatablock("./scripts/managedData/managedForestBrushData");
if(isFile("./scripts/managedData/managedParticleEmitterData." @ $TorqueScriptFileExtension))
%this.registerDatablock("./scripts/managedData/managedParticleEmitterData");
if(isFile("./scripts/managedData/managedParticleData." @ $TorqueScriptFileExtension))
%this.registerDatablock("./scripts/managedData/managedParticleData");
}
//This is called when a game session server is destroyed, when the game shuts down. It's called from
//core/clientServer/scripts/server/server.tscript - in the destroyServer() function, which just cleans up anything
//The module may have set up as part of the game server being created.
//This is called when the server is shut down due to the game/map being exited
function ExampleModule::onDestroyGameServer(%this)
{
}
//Similar to initServer, this is called during the initial launch of the application and the client component
//is set up. The difference is that the client may not actually be created, such as in the case for dedicated servers
//Where no UI or gameplay interface is required. It's called from core/clientServer/scripts/client/client.tscript -
//in the initClient() function. It sets up common elements that the client will always need, such as scripts, GUIs
//and the like
//This is called when the client is initially set up by the game application
function ExampleModule::initClient(%this)
{
AssetDatabase.acquireAsset("ExampleModule:exampleDatablock");
AssetDatabase.acquireAsset("ExampleModule:examplePostEffect");
AssetDatabase.acquireAsset("ExampleModule:exampleGUI");
//client scripts
//Here, we exec out keybind scripts so the player is able to move when they get into a game
%this.queueExec("./scripts/default.keybinds");
%this.queueExec("./scripts/client/inputCommands");
//client scripts
exec("./scripts/client/defaultkeybinds");
%prefPath = getPrefpath();
if(isFile(%prefPath @ "/keybinds." @ $TorqueScriptFileExtension))
exec(%prefPath @ "/keybinds." @ $TorqueScriptFileExtension);
%this.queueExec("./scripts/inputCommands");
if(isScriptFile(%prefPath @ "/keybinds"))
exec(%prefPath @ "/keybinds");
}
//This is called when a game session client successfuly connects to a game server.
//It's called from core/clientServer/scripts/client/connectionToServer.tscript - in the GameConnection::onConnectionAccepted() function
//It's used for any client-side specific game session stuff that the client needs to load or pass to the server, such as profile data
//account progress, preferences, etc.
//
//When a client is connected, the gamemode logic also has a callback activated - ExampleGameMode::onClientEnterGame().
//This is called when a client connects to a server
function ExampleModule::onCreateClientConnection(%this)
{
//This will push our keybind movemap onto the input stack, so we can control our camera in our ExampleGameMode
ExampleMoveMap.push();
ExampleMovemap.push();
}
//This is called when a client game session disconnects from a game server
//It's called from core/clientServer/scripts/client/connectionToServer.tscript - in the disconnectedCleanup() function
//It's used to clean up and potentially write out any client-side stuff that needs housekeeping when disconnecting for any reason.
//It will be called if the connection is manually terminated, or lost due to any sort of connection issue.
//
//When a client disconnects, the gamemode logic has a callback activated - ExampleGameMode::onClientLeaveGame().
//This is called when a client disconnects from a server
function ExampleModule::onDestroyClientConnection(%this)
{
//This will pop the keybind, cleaning it up from the input stack, as it no longer applies
ExampleMoveMap.pop();
}
function ExampleModule::populateOptionsMenuCategories(%this)
{
addOptionsMenuCategory("Example Options", "testExampleOptions();");
}
function testExampleOptions()
{
OptionsMenuSettingsList.clear();
OptionName.setText("");
OptionDescription.setText("");
addListOption("Test Option", "This is a test option", $testOptionValue, "OptionA\tOptionB");
}

View file

@ -1,7 +0,0 @@
<GUIAsset
canSave="true"
canSaveDynamicFields="true"
AssetName="ExampleGUI"
scriptFile="@assetFile=ExampleGUI.gui"
GUIFile="@assetFile=ExampleGUI.gui"
VersionId="1" />

View file

@ -1,7 +0,0 @@
//--- OBJECT WRITE BEGIN ---
$guiContent = new GuiControl(ExampleGUI)
{
position = "0 0";
extent = "100 100";
};
//--- OBJECT WRITE END ---

View file

@ -1,9 +0,0 @@
function ExampleGUI::onWake(%this)
{
}
function ExampleGUI::onSleep(%this)
{
}

View file

@ -1,9 +0,0 @@
<ComponentAsset
canSave="true"
canSaveDynamicFields="true"
AssetName="ExampleComponent"
componentName="ExampleComponent"
componentClass="Component"
description="An example script component."
scriptFile="@assetFile=ExampleComponent.cs"
VersionId="1" />

View file

@ -1,26 +0,0 @@
//onAdd is called when the component is created and then added to it's owner entity.
//You would also add any script-defined component fields via addComponentField().
function ExampleComponent::onAdd(%this)
{
}
//onRemove is called when the component is removed and deleted from it's owner entity.
function ExampleComponent::onRemove(%this)
{
}
//onClientConnect is called any time a new client connects to the server.
function ExampleComponent::onClientConnect(%this, %client)
{
}
//onClientDisconnect is called any time a client disconnects from the server.
function ExampleComponent::onClientDisconnect(%this, %client)
{
}
//update is called when the component does an update tick.
function ExampleComponent::Update(%this)
{
}

View file

@ -1,7 +0,0 @@
<ScriptAsset
canSave="true"
canSaveDynamicFields="true"
AssetName="ExampleDatablock"
scriptFile="@assetFile=ExampleDatablock.cs"
dependency0="@Asset=UI:guiSounds"
VersionId="1" />

View file

@ -1,4 +0,0 @@
new ScriptObject(DummyObjectTestThing)
{
};

View file

@ -1,9 +1,10 @@
<LevelAsset
canSave="true"
canSaveDynamicFields="true"
AssetName="ExampleLevel"
AssetDescription="A simple example level players can fly around in."
LevelFile="@assetFile=ExampleLevel.mis"
LevelName="Example Level"
isSubScene="false"
Description="An example level asset"
VersionId="1" />
PostFXPresetFile="@assetFile=ExampleLevel.postfxpreset.tscript"
DecalsFile="@assetFile=ExampleLevel.mis.decals"
ForestFile="@assetFile=ExampleLevel.forest"
NavmeshFile="@assetFile=ExampleLevel.nav"
VersionId="1"/>

View file

@ -1,105 +1,86 @@
//--- OBJECT WRITE BEGIN ---
new Scene(EditorTemplateLevel) {
canSave = "1";
canSaveDynamicFields = "1";
isSubScene = "0";
isEditing = "0";
isDirty = "0";
gameModeName = "ExampleGameMode";
cdTrack = "2";
CTF_scoreLimit = "5";
Enabled = "1";
musicTrack = "lush";
new Scene(ExampleLevel) {
Enabled = "1";
gameModeName="ExampleGameMode";
new LevelInfo(theLevelInfo) {
nearClip = "0.1";
visibleDistance = "1000";
visibleGhostDistance = "0";
decalBias = "0.0015";
fogColor = "0.6 0.6 0.7 1";
fogDensity = "0";
fogDensityOffset = "700";
fogAtmosphereHeight = "0";
canvasClearColor = "0 0 0 255";
ambientLightBlendPhase = "1";
ambientLightBlendCurve = "0 0 -1 -1";
soundAmbience = "AudioAmbienceDefault";
soundDistanceModel = "Linear";
canSave = "1";
canSaveDynamicFields = "1";
advancedLightmapSupport = "0";
desc0 = "A blank room template that acts as a starting point.";
Enabled = "1";
LevelName = "Blank Room Template";
advancedLightmapSupport = "0";
Enabled = "1";
};
new SkyBox(theSky) {
Material = "BlankSkyMat";
MaterialAsset = "Core_Rendering:BlankSkyMat";
drawBottom = "0";
dirtyGameObject = "0";
};
new Sun(theSun) {
azimuth = "230.396";
elevation = "45";
color = "0.968628 0.901961 0.901961 1";
ambient = "0.337255 0.533333 0.619608 1";
texSize = "2048";
overDarkFactor = "3000 1500 750 250";
shadowDistance = "200";
shadowSoftness = "0.25";
logWeight = "0.9";
fadeStartDistance = "0";
bias = "0.1";
Blur = "1";
dirtyGameObject = "0";
dynamicRefreshFreq = "8";
Enabled = "1";
height = "1024";
lightBleedFactor = "0.8";
minVariance = "0";
pointShadowType = "PointShadowType_Paraboloid";
shadowBox = "-100 -100 -100 100 100 100";
splitFadeDistances = "1 1 1 1";
staticRefreshFreq = "250";
width = "3072";
};
new GroundPlane() {
squareSize = "128";
scaleU = "25";
scaleV = "25";
MaterialAsset = "Prototyping:FloorGray";
canSave = "1";
canSaveDynamicFields = "1";
Enabled = "1";
position = "0 0 0";
rotation = "1 0 0 0";
scale = "1 1 1";
};
new ScatterSky() {
skyBrightness = "25";
sunSize = "1";
colorizeAmount = "0";
colorize = "0 0 0 1";
rayleighScattering = "0.0035";
sunScale = "1 1 1 1";
ambientScale = "1 1 1 1";
fogScale = "1 1 1 1";
exposure = "1";
zOffset = "0";
azimuth = "0";
elevation = "35";
moonAzimuth = "0";
moonElevation = "45";
castShadows = "1";
staticRefreshFreq = "8";
dynamicRefreshFreq = "8";
brightness = "1";
flareScale = "1";
nightColor = "0.0196078 0.0117647 0.109804 1";
nightFogColor = "0.0196078 0.0117647 0.109804 1";
moonEnabled = "1";
moonMat = "Moon_Glow_Mat";
moonScale = "0.2";
moonLightColor = "0.192157 0.192157 0.192157 1";
useNightCubemap = "1";
nightCubemap = "NightCubemap";
attenuationRatio = "0 1 1";
shadowType = "PSSM";
texSize = "1024";
overDarkFactor = "2000 1000 500 100";
shadowDistance = "400";
shadowSoftness = "0.15";
numSplits = "4";
logWeight = "0.91";
fadeStartDistance = "0";
lastSplitTerrainOnly = "0";
representedInLightmap = "0";
shadowDarkenColor = "0 0 0 -1";
includeLightmappedGeometryInShadow = "0";
position = "-19.4839 100.725 -19.5889";
dirtyGameObject = "0";
Enabled = "1";
position = "0 0 0";
rotation = "1 0 0 0";
scale = "1 1 1";
canSave = "1";
canSaveDynamicFields = "1";
mieScattering = "0.0045";
};
new Skylight() {
Enabled = "1";
ReflectionMode = "Baked Cubemap";
position = "-2.09752 10.8435 53.7998";
rotation = "1 0 0 0";
position = "1.37009 -5.23561 46.5817";
persistentId = "d5eb3afb-dced-11e9-a423-bb0e346e3870";
dirtyGameObject = "0";
};
new SimGroup(CameraSpawnPoints) {
canSave = "1";
canSaveDynamicFields = "1";
persistentId = "fff282f5-dced-11e9-a423-bb0e346e3870";
enabled = "1";
new SpawnSphere(DefaultCameraSpawnSphere) {
autoSpawn = "0";
spawnTransform = "0";
radius = "1";
sphereWeight = "1";
indoorWeight = "1";
outdoorWeight = "1";
isAIControlled = "0";
dataBlock = "SpawnSphereMarker";
position = "0 0 10";
rotation = "1 0 0 0";
scale = "1 1 1";
canSave = "1";
canSaveDynamicFields = "1";
enabled = "1";
homingCount = "0";
lockCount = "0";
};
};
};
//--- OBJECT WRITE END ---

View file

@ -0,0 +1,14 @@
$PostFX::HDRPostFX::Enabled = 1;
$PostFX::HDRPostFX::minLuminace = 0.001;
$PostFX::HDRPostFX::whiteCutoff = 1;
$PostFX::HDRPostFX::adaptRate = 2;
$PostFX::HDRPostFX::tonemapMode = "ACES";
$PostFX::HDRPostFX::enableBloom = 1;
$PostFX::HDRPostFX::brightPassThreshold = 1;
$PostFX::HDRPostFX::gaussMultiplier = 0.3;
$PostFX::HDRPostFX::gaussMean = 0;
$PostFX::HDRPostFX::gaussStdDev = 0.8;
$PostFX::HDRPostFX::enableAutoExposure = "0";
$PostFX::HDRPostFX::keyValue = 0.18;
$PostFX::HDRPostFX::enableBlueShift = 0;
$PostFX::HDRPostFX::blueShiftColor = "1.05 0.97 1.27";

View file

@ -1,6 +0,0 @@
<PostEffectAsset
canSave="true"
canSaveDynamicFields="true"
AssetName="ExamplePostEffect"
scriptFile="@assetFile=ExamplePostEffect.cs"
VersionId="1" />

View file

@ -1,131 +0,0 @@
//-----------------------------------------------------------------------------
// Copyright (c) 2012 GarageGames, LLC
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to
// deal in the Software without restriction, including without limitation the
// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
// sell copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
// IN THE SOFTWARE.
//-----------------------------------------------------------------------------
singleton ShaderData( ExamplePostEffect_Shader )
{
DXVertexShaderFile = $Core::CommonShaderPath @ "/postFX/postFxV.hlsl";
DXPixelShaderFile = $Core:modulePath @ "ExamplePostEffectP.hlsl";
OGLVertexShaderFile = $Core::CommonShaderPath @ "/postFX/gl/postFxV.glsl";
OGLPixelShaderFile = $Core:modulePath @ "ExamplePostEffectP.glsl";
samplerNames[0] = "$inputTex";
pixVersion = 3.0;
};
singleton GFXStateBlockData( ExamplePostEffect_StateBlock )
{
samplersDefined = true;
samplerStates[0] = SamplerClampLinear;
samplerStates[1] = SamplerClampLinear;
samplerStates[2] = SamplerClampLinear;
samplerStates[3] = SamplerClampLinear;
blendDefined = true;
blendDest = GFXBlendOne;
blendSrc = GFXBlendZero;
zDefined = true;
zEnable = false;
zWriteEnable = false;
cullDefined = true;
cullMode = GFXCullNone;
};
function ExamplePostEffect::setShaderConsts( %this )
{
}
function ExamplePostEffect::preProcess( %this )
{
}
function ExamplePostEffect::onAdd(%this)
{
//Register the postFX with the manager
PostFXManager.registerPostEffect(%this);
}
function ExamplePostEffect::onEnabled( %this )
{
return true;
}
function ExamplePostEffect::onDisabled( %this )
{
}
//This is used to populate the PostFXEditor's settings so the post FX can be edited
//This is automatically polled for any postFX that has been registered(in our onAdd) and the settings
//are thus exposed for editing
function ExamplePostEffect::populatePostFXSettings(%this)
{
PostEffectEditorInspector.startGroup("ExamplePostEffect - General");
PostEffectEditorInspector.addField("$PostFXManager::Settings::EnabledExamplePostEffect", "Enabled", "bool", "", $PostFXManager::PostFX::EnableExamplePostEffect, "");
PostEffectEditorInspector.endGroup();
}
//This function pair(applyFromPreset and settingsApply) are done the way they are, with the separated variables
//so that we can effectively store the 'settings' away from the live variables that the postFX's actually utilize
//when rendering. This allows us to modify things but still leave room for reverting or temporarily applying them
function ExamplePostEffect::applyFromPreset(%this)
{
//ExamplePostEffect Settings
$PostFXManager::PostFX::EnableExamplePostEffect = $PostFXManager::Settings::EnabledExamplePostEffect;
if($PostFXManager::PostFX::EnableExamplePostEffect)
%this.enable();
else
%this.disable();
}
function ExamplePostEffect::settingsApply(%this)
{
$PostFXManager::Settings::EnabledExamplePostEffect = $PostFXManager::PostFX::EnableExamplePostEffect;
}
singleton PostEffect( ExamplePostEffect )
{
isEnabled = false;
allowReflectPass = false;
// Resolve the HDR before we render any editor stuff
// and before we resolve the scene to the backbuffer.
renderTime = "PFXBeforeBin";
renderBin = "EditorBin";
renderPriority = 9999;
// The bright pass generates a bloomed version of
// the scene for pixels which are brighter than a
// fixed threshold value.
//
// This is then used in the final HDR combine pass
// at the end of this post effect chain.
shader = ExamplePostEffect_Shader;
stateBlock = ExamplePostEffect_StateBlock;
texture[0] = "$backBuffer";
target = "$outTex";
targetFormat = "GFXFormatR16G16B16A16F";
targetScale = "1 1";
};

View file

@ -1,6 +0,0 @@
<ScriptAsset
canSave="true"
canSaveDynamicFields="true"
AssetName="ExampleGamemodeScript"
scriptFile="@assetFile=ExampleGamemodeScript.cs"
VersionId="1" />

View file

@ -1,156 +0,0 @@
//-----------------------------------------------------------------------------
// The server has started up so do some game start up
//-----------------------------------------------------------------------------
//This file implements game mode logic for an Example gamemode. The primary functions:
//ExampleGameMode::onMissionStart
//ExampleGameMode::onMissionReset
//ExampleGameMode::onMissionEnd
//Are the primary hooks for the server to start, restart and end any active gamemodes
//onMissionStart, for example is called from core/clientServer/scripts/server/levelLoad.tscript
//It's called once the server has successfully loaded the level, and has parsed
//through any active scenes to get GameModeNames defined by them. It then iterates
//over them and calls these callbacks to envoke gamemode behaviors. This allows multiple
//gamemodes to be in effect at one time. Modules can implement as many gamemodes as you want.
//
//For levels that can be reused for multiple gammodes, the general setup would be a primary level file
//with the Scene in it having the main geometry, weapons, terrain, etc. You would then have subScenes that
//each contain what's necessary for the given gamemode, such as a subScene that just adds the flags and capture
//triggers for a CTF mode. The subscene would then have it's GameModeName defined to run the CTF gamemode logic
//and the levelLoad code will execute it.
function ExampleGameMode::onCreateGame()
{
// Note: The Game object will be cleaned up by MissionCleanup. Therefore its lifetime is
// limited to that of the mission.
new ScriptObject(ExampleGameMode){};
return ExampleGameMode;
}
//This function is called when the level finishes loading. It sets up the initial configuration, variables and
//spawning and dynamic objects, timers or rules needed for the gamemode to run
function ExampleGameMode::onMissionStart(%this)
{
//set up the game and game variables
%this.initGameVars();
if (%this.running)
{
error("onMissionStart: End the game first!");
return;
}
// Start the game timer
if (%this.duration)
%this.gameSchedule = schedule(%this.duration * 1000, 0, "onGameDurationEnd");
%this.running = true;
}
//This function is called when the level ends. It can be envoked due to the gamemode ending
//but is also kicked off when the game server is shut down as a form of cleanup for anything the gamemode
//created or is managing like the above mentioned dynamic objects or timers
function ExampleGameMode::onMissionEnded(%this)
{
if (!%this.running)
{
error("onMissionEnded: No game running!");
return;
}
// Stop any game timers
cancel(%this.gameSchedule);
%this.running = false;
}
//This function is called in the event the server resets and is used to re-initialize the gamemode
function ExampleGameMode::onMissionReset(%this)
{
// Called by resetMission(), after all the temporary mission objects
// have been deleted.
%this.initGameVars();
}
//This sets up our gamemode's duration time
function ExampleGameMode::initGameVars(%this)
{
// Set the gameplay parameters
%this.duration = 30 * 60;
}
//This is called when the timer runs out, allowing the gamemode to end
function ExampleGameMode::onGameDurationEnd(%this)
{
//we don't end if we're currently editing the level
if (%this.duration && !(EditorIsActive() && GuiEditorIsActive()))
%this.onMissionEnded();
}
//This is called to actually spawn a control object for the player to utilize
//A player character, spectator camera, etc.
function ExampleGameMode::spawnControlObject(%this, %client)
{
//In this example, we just spawn a camera
if (!isObject(%client.camera))
{
if(!isObject(Observer))
{
datablock CameraData(Observer)
{
mode = "Observer";
};
}
%client.camera = spawnObject("Camera", Observer);
}
// If we have a camera then set up some properties
if (isObject(%client.camera))
{
MissionCleanup.add( %this.camera );
%client.camera.scopeToClient(%client);
%client.setControlObject(%client.camera);
%client.camera.setTransform("0 0 1 0 0 0 0");
}
}
//This is called when the client has initially established a connection to the game server
//It's used for setting up anything ahead of time for the client, such as loading in client-passed
//config stuffs, saved data or the like that should be handled BEFORE the client has actually entered
//the game itself
function ExampleGameMode::onClientConnect(%this, %client)
{
}
//This is called when a client enters the game server. It's used to spawn a player object
//set up any client-specific properties such as saved configs, values, their name, etc
//These callbacks are activated in core/clientServer/scripts/server/levelDownload.tscript
function ExampleGameMode::onClientEnterGame(%this, %client)
{
//Set the player name based on the client's connection data
%client.setPlayerName(%client.connectData);
%this.spawnControlObject(%client);
}
//This is called when the player leaves the game server. It's used to clean up anything that
//was spawned or setup for the client when it connected, in onClientEnterGame
//These callbacks are activated in core/clientServer/scripts/server/levelDownload.tscript
function ExampleGameMode::onClientLeaveGame(%this, %client)
{
// Cleanup the camera
if (isObject(%client.camera))
%client.camera.delete();
}
//This is called when the player has connected and finaly setup is done and control is handed
//over to the client. It allows a point to special-case setting the client's canvas content
//(Such as a gamemode-specific GUI) or setting up gamemode-specific keybinds/control schemes
function ExampleGameMode::onInitialControlSet(%this)
{
}

View file

@ -1,25 +1,3 @@
//-----------------------------------------------------------------------------
// Copyright (c) 2012 GarageGames, LLC
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to
// deal in the Software without restriction, including without limitation the
// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
// sell copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
// IN THE SOFTWARE.
//-----------------------------------------------------------------------------
$RemapName[$RemapCount] = "Forward";
$RemapCmd[$RemapCount] = "moveforward";
$RemapActionMap[$RemapCount] = "ExampleMoveMap";
@ -92,21 +70,9 @@ ExampleMoveMap.humanReadableName = "Example Movement";
// Non-remapable binds
//------------------------------------------------------------------------------
ExampleMoveMap.bind( keyboard, F2, showPlayerList );
ExampleMoveMap.bind(keyboard, "ctrl h", hideHUDs);
ExampleMoveMap.bind(keyboard, "alt p", doScreenShotHudless);
function openPauseMenu(%val)
{
if(%val && PauseMenu.isAwake() == false)
{
echo("PUSHING PAUSE MENU");
Canvas.pushDialog(PauseMenu);
}
}
ExampleMoveMap.bind(keyboard, "escape", openPauseMenu);
ExampleMoveMap.bindCmd(keyboard, "escape", "", "Canvas.pushDialog(PauseMenu);");
//------------------------------------------------------------------------------
// Movement Keys
@ -128,21 +94,27 @@ ExampleMoveMap.bind( keyboard, space, jump );
ExampleMoveMap.bind( mouse, xaxis, yaw );
ExampleMoveMap.bind( mouse, yaxis, pitch );
ExampleMoveMap.bind( gamepad, rxaxis, "D", "-0.23 0.23", gamepadYaw );
ExampleMoveMap.bind( gamepad, ryaxis, "D", "-0.23 0.23", gamepadPitch );
ExampleMoveMap.bind( gamepad, xaxis, "D", "-0.23 0.23", gamePadMoveX );
ExampleMoveMap.bind( gamepad, yaxis, "D", "-0.23 0.23", gamePadMoveY );
ExampleMoveMap.bind( gamepad, thumbrx, "D", "-0.23 0.23", gamepadYaw );
ExampleMoveMap.bind( gamepad, thumbry, "D", "-0.23 0.23", gamepadPitch );
ExampleMoveMap.bind( gamepad, thumblx, "D", "-0.23 0.23", gamePadMoveX );
ExampleMoveMap.bind( gamepad, thumbly, "D", "-0.23 0.23", gamePadMoveY );
ExampleMoveMap.bind( gamepad, btn_a, jump );
ExampleMoveMap.bind( gamepad, btn_x, moveup );
ExampleMoveMap.bind( gamepad, btn_y, movedown );
ExampleMoveMap.bindCmd( gamepad, btn_start, "Canvas.pushDialog(PauseMenu);", "" );
ExampleMoveMap.bindCmd( gamepad, btn_back, "disconnect();", "" );
//------------------------------------------------------------------------------
// Demo recording functions
//------------------------------------------------------------------------------
ExampleMoveMap.bind( keyboard, F3, startRecordingDemo );
ExampleMoveMap.bind( keyboard, F4, stopRecordingDemo );
//------------------------------------------------------------------------------
// Helper Functions
//------------------------------------------------------------------------------
GlobalActionMap.bind(keyboard, "ctrl F3", doProfile);
//------------------------------------------------------------------------------
// Misc.
//------------------------------------------------------------------------------
GlobalActionMap.bind(keyboard, "tilde", toggleConsole);
GlobalActionMap.bindCmd(keyboard, "alt k", "cls();","");
GlobalActionMap.bindCmd(keyboard, "alt enter", "", "Canvas.toggleFullscreen();");
GlobalActionMap.bindCmd(keyboard, "F1", "", "contextHelp();");
ExampleMoveMap.bindCmd(keyboard, "n", "toggleNetGraph();", "");

View file

@ -1,29 +1,35 @@
//-----------------------------------------------------------------------------
// Copyright (c) 2012 GarageGames, LLC
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to
// deal in the Software without restriction, including without limitation the
// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
// sell copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
// IN THE SOFTWARE.
//-----------------------------------------------------------------------------
function escapeFromGame()
{
disconnect();
}
function showPlayerList(%val)
{
if (%val)
PlayerListGui.toggle();
}
function hideHUDs(%val)
{
if (%val)
HudlessPlayGui.toggle();
}
function doScreenShotHudless(%val)
{
if(%val)
{
canvas.setContent(HudlessPlayGui);
//doScreenshot(%val);
schedule(10, 0, "doScreenShot", %val);
}
else
{
%playGUIName = ProjectSettings.value("UI/playGUIName");
Canvas.setContent(%playGUIName);
}
}
$movementSpeed = 1; // m/s
function setSpeed(%speed)
@ -147,8 +153,6 @@ function gamePadMoveX( %val )
function gamePadMoveY( %val )
{
%val *= -1;
if(%val > 0)
{
$mvForwardAction = %val * $movementSpeed;
@ -185,8 +189,6 @@ function gamepadYaw(%val)
function gamepadPitch(%val)
{
%val *= -1;
%pitchAdj = getGamepadAdjustAmount(%val);
if(ServerConnection.isControlObjectRotDampedCamera())
{
@ -205,4 +207,55 @@ function gamepadPitch(%val)
$mvPitchDownSpeed = 0;
$mvPitchUpSpeed = -%pitchAdj;
}
}
function startRecordingDemo( %val )
{
if ( %val )
startDemoRecord();
}
function stopRecordingDemo( %val )
{
if ( %val )
stopDemoRecord();
}
//------------------------------------------------------------------------------
// Debugging Functions
//------------------------------------------------------------------------------
function showMetrics(%val)
{
if(%val)
{
if(!Canvas.isMember(FrameOverlayGui))
metrics("fps gfx shadow sfx terrain groundcover forest net");
else
metrics("");
}
}
GlobalActionMap.bind(keyboard, "ctrl F2", showMetrics);
//------------------------------------------------------------------------------
//
// Start profiler by pressing ctrl f3
// ctrl f3 - starts profile that will dump to console and file
//
function doProfile(%val)
{
if (%val)
{
// key down -- start profile
echo("Starting profile session...");
profilerReset();
profilerEnable(true);
}
else
{
// key up -- finish off profile
echo("Ending profile session...");
profilerDumpToFile("profilerDumpToFile" @ getSimTime() @ ".txt");
profilerEnable(false);
}
}

View file

@ -0,0 +1,237 @@
function ExampleGameMode::onCreateGame()
{
// Note: The Game object will be cleaned up by MissionCleanup. Therefore its lifetime is
// limited to that of the mission.
new ScriptObject(ExampleGameMode){};
return ExampleGameMode;
}
//-----------------------------------------------------------------------------
// The server has started up so do some game start up
//-----------------------------------------------------------------------------
function ExampleGameMode::onMissionStart(%this)
{
//set up the game and game variables
%this.initGameVars();
if (%this.Running)
{
error("onMissionStart: End the game first!");
return;
}
// Inform the client we're starting up
for (%clientIndex = 0; %clientIndex < ClientGroup.getCount(); %clientIndex++)
{
%cl = ClientGroup.getObject(%clientIndex);
commandToClient(%cl, 'GameStart');
}
%this.Running = true;
}
function ExampleGameMode::onMissionEnded(%this)
{
if (!%this.Running)
{
error("onMissionEnded: No game running!");
return;
}
for (%clientIndex = 0; %clientIndex < ClientGroup.getCount(); %clientIndex++)
{
%cl = ClientGroup.getObject(%clientIndex);
commandToClient(%cl, 'GameEnd', %this.EndGamePause);
}
%this.Running = false;
}
function ExampleGameMode::onMissionReset(%this)
{
// Called by resetMission(), after all the temporary mission objects
// have been deleted.
%this.initGameVars();
}
function ExampleGameMode::initGameVars(%this)
{
//-----------------------------------------------------------------------------
// What kind of "camera" is spawned is either controlled directly by the
// SpawnSphere or it defaults back to the values set here. This also controls
// which SimGroups to attempt to select the spawn sphere's from by walking down
// the list of SpawnGroups till it finds a valid spawn object.
// These override the values set in core/scripts/server/spawn.cs
//-----------------------------------------------------------------------------
%this.defaultCameraClass = "Camera";
%this.defaultCameraDataBlock = "Observer";
%this.defaultCameraSpawnGroups = "CameraSpawnPoints PlayerSpawnPoints PlayerDropPoints";
}
function ExampleGameMode::onGameDurationEnd(%this)
{
}
function ExampleGameMode::onClientEnterGame(%this, %client)
{
// This function currently relies on some helper functions defined in
// core/scripts/spawn.cs. For custom spawn behaviors one can either
// override the properties on the SpawnSphere's or directly override the
// functions themselves.
//echo (%game @"\c4 -> "@ %game.class @" -> GameCore::onClientEntergame");
// Sync the client's clocks to the server's
commandToClient(%client, 'SyncClock', $Sim::Time - %this.StartTime);
//Set the player name based on the client's connection data
%client.setPlayerName(%client.connectData);
// Find a spawn point for the camera
// This function currently relies on some helper functions defined in
// core/scripts/server/spawn.cs. For custom spawn behaviors one can either
// override the properties on the SpawnSphere's or directly override the
// functions themselves.
%cameraSpawnPoint = %this.pickCameraSpawnPoint(%this.DefaultCameraSpawnGroups);
// Spawn a camera for this client using the found %spawnPoint
%this.spawnCamera(%client, %cameraSpawnPoint);
// 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.playerName,
%other,
%other.sendGuid,
%other.team,
%other.score,
%other.kills,
%other.deaths,
%other.isAIControlled(),
%other.isAdmin,
%other.isSuperAdmin);
}
}
// Inform the client we've joined up
messageClient(%client,
'MsgClientJoin', '\c2Welcome to the Torque demo app %1.',
%client.playerName,
%client,
%client.sendGuid,
%client.team,
%client.score,
%client.kills,
%client.deaths,
%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.playerName,
%client,
%client.sendGuid,
%client.team,
%client.score,
%client.kills,
%client.deaths,
%client.isAiControlled(),
%client.isAdmin,
%client.isSuperAdmin);
}
function ExampleGameMode::onClientLeaveGame(%this, %client)
{
// Cleanup the camera
if (isObject(%client.camera))
%client.camera.delete();
}
function ExampleGameMode::onInitialControlSet(%this)
{
}
function ExampleGameMode::spawnCamera(%this, %client, %spawnPoint)
{
// Set the control object to the default camera
if (!isObject(%client.camera))
{
if (%this.defaultCameraClass !$= "")
%client.camera = spawnObject(%this.defaultCameraClass, %this.defaultCameraDataBlock);
}
// If we have a camera then set up some properties
if (isObject(%client.camera))
{
MissionCleanup.add( %client.camera );
%client.camera.scopeToClient(%client);
%client.setControlObject(%client.camera);
if(!isObject(%spawnPoint))
%spawnPoint = %this.pickCameraSpawnPoint(%this.defaultCameraSpawnGroups);
if (isObject(%spawnPoint))
{
// Attempt to treat %spawnPoint as an object
if (getWordCount(%spawnPoint) == 1 && isObject(%spawnPoint))
{
%client.camera.setTransform(%spawnPoint.getTransform());
}
else
{
// Treat %spawnPoint as an AxisAngle transform
%client.camera.setTransform(%spawnPoint);
}
}
}
}
//-----------------------------------------------------------------------------
// pickCameraSpawnPoint() is responsible for finding a valid spawn point for a
// camera.
//-----------------------------------------------------------------------------
function ExampleGameMode::pickCameraSpawnPoint(%this, %spawnGroups)
{
// Walk through the groups until we find a valid object
for (%i = 0; %i < getWordCount(%spawnGroups); %i++)
{
%group = getWord(%spawnGroups, %i);
%count = getWordCount(%group);
if (isObject(%group))
%spawnPoint = %group.getRandom();
if (isObject(%spawnPoint))
return %spawnPoint;
}
// Didn't find a spawn point by looking for the groups
// so let's return the "default" SpawnSphere
// First create it if it doesn't already exist
if (!isObject(DefaultCameraSpawnSphere))
{
%spawn = new SpawnSphere(DefaultCameraSpawnSphere)
{
dataBlock = "SpawnSphereMarker";
spawnClass = $Game::DefaultCameraClass;
spawnDatablock = $Game::DefaultCameraDataBlock;
};
// Add it to the MissionCleanup group so that it
// doesn't get saved to the Mission (and gets cleaned
// up of course)
MissionCleanup.add(%spawn);
}
return DefaultCameraSpawnSphere;
}

View file

@ -1,7 +0,0 @@
<CppAsset
canSave="true"
canSaveDynamicFields="true"
AssetName="ExampleCppObject"
codeFile="@assetFile=ExampleCppObject.cpp"
headerFile="@assetFile=ExampleCppObject.h"
VersionId="1" />

View file

@ -1,18 +0,0 @@
#include "core/module.h"
#include "console/engineAPI.h"
MODULE_BEGIN(ExampleModule_Module)
MODULE_INIT_AFTER(Sim)
MODULE_SHUTDOWN_BEFORE(Sim)
MODULE_INIT
{
// Setup anything needed when the engine initializes here
}
MODULE_SHUTDOWN
{
// Cleanup anything that was initialized before here
}
MODULE_END;

View file

@ -1,8 +1,14 @@
<MaterialAsset
canSave="true"
canSaveDynamicFields="true"
AssetName="DetailBlue"
scriptFile="@assetFile=DetailBlue.tscript"
materialDefinitionName="DetailBlue"
imageMap0="@Asset=Prototyping:DetailBlue_ALBEDO"
originalFilePath="D:/Gamedev/art/Blockout/DetailBlue.png" />
imageMap0="@asset=Prototyping:DetailBlue_ALBEDO"
originalFilePath="C:/dev/T3D/PRs/MiscFixes20220525/Templates/BaseGame/game/data/Prototyping/Materials/DetailBlue.png">
<Material
Name="DetailBlue"
mapTo="DetailBlue">
<Material.Stages>
<Stages_beginarray
DiffuseMapAsset="Prototyping:DetailBlue_ALBEDO"/>
</Material.Stages>
</Material>
</MaterialAsset>

View file

@ -1,6 +0,0 @@
//--- OBJECT WRITE BEGIN ---
singleton Material(DetailBlue) {
mapTo="DetailBlue";
DiffuseMapAsset = "Prototyping:DetailBlue_ALBEDO";
};
//--- OBJECT WRITE END ---

View file

@ -1,9 +1,4 @@
<ImageAsset
canSave="true"
canSaveDynamicFields="true"
AssetName="DetailBlue_ALBEDO"
imageFile="@assetFile=DetailBlue.png"
UseMips="true"
isHDRImage="false"
imageType="Albedo"
originalFilePath="D:/Gamedev/art/Blockout/DetailBlue.png" />
originalFilePath="C:/dev/T3D/PRs/MiscFixes20220525/Templates/BaseGame/game/data/Prototyping/Materials/DetailBlue.png"/>

View file

@ -1,8 +1,14 @@
<MaterialAsset
canSave="true"
canSaveDynamicFields="true"
AssetName="FloorGray"
scriptFile="@assetFile=FloorGray.tscript"
materialDefinitionName="FloorGray"
imageMap0="@Asset=Prototyping:FloorGray_ALBEDO"
originalFilePath="D:/Gamedev/art/Blockout/FloorGray.png" />
imageMap0="@asset=Prototyping:FloorGray_ALBEDO"
originalFilePath="C:/dev/T3D/PRs/MiscFixes20220525/Templates/BaseGame/game/data/Prototyping/Materials/FloorGray.png">
<Material
Name="FloorGray"
mapTo="FloorGray">
<Material.Stages>
<Stages_beginarray
DiffuseMapAsset="Prototyping:FloorGray_ALBEDO"/>
</Material.Stages>
</Material>
</MaterialAsset>

View file

@ -1,6 +0,0 @@
//--- OBJECT WRITE BEGIN ---
singleton Material(FloorGray) {
mapTo="FloorGray";
DiffuseMapAsset = "Prototyping:FloorGray_ALBEDO";
};
//--- OBJECT WRITE END ---

View file

@ -1,9 +1,4 @@
<ImageAsset
canSave="true"
canSaveDynamicFields="true"
AssetName="FloorGray_ALBEDO"
imageFile="@assetFile=FloorGray.png"
UseMips="true"
isHDRImage="false"
imageType="Albedo"
originalFilePath="D:/Gamedev/art/Blockout/FloorGray.png" />
originalFilePath="C:/dev/T3D/PRs/MiscFixes20220525/Templates/BaseGame/game/data/Prototyping/Materials/FloorGray.png"/>

View file

@ -1 +0,0 @@
<MaterialAsset canSave="true" canSaveDynamicFields="true" AssetName="Glass" scriptFile="@assetFile=Glass.tscript" materialDefinitionName="Glass" VersionId="1"/>

View file

@ -1,192 +0,0 @@
//--- OBJECT WRITE BEGIN ---
new Material(Glass) {
diffuseColor[0] = "1 1 1 1";
diffuseColor[1] = "1 1 1 1";
diffuseColor[2] = "1 1 1 1";
diffuseColor[3] = "1 1 1 1";
diffuseMapSRGB[0] = "1";
diffuseMapSRGB[1] = "1";
diffuseMapSRGB[2] = "1";
diffuseMapSRGB[3] = "1";
detailScale[0] = "2 2";
detailScale[1] = "2 2";
detailScale[2] = "2 2";
detailScale[3] = "2 2";
detailNormalMapStrength[0] = "1";
detailNormalMapStrength[1] = "1";
detailNormalMapStrength[2] = "1";
detailNormalMapStrength[3] = "1";
roughness[0] = "1";
roughness[1] = "1";
roughness[2] = "1";
roughness[3] = "1";
metalness[0] = "0";
metalness[1] = "0";
metalness[2] = "0";
metalness[3] = "0";
glowMul[0] = "0";
glowMul[1] = "0";
glowMul[2] = "0";
glowMul[3] = "0";
accuEnabled[0] = "0";
accuEnabled[1] = "0";
accuEnabled[2] = "0";
accuEnabled[3] = "0";
accuScale[0] = "1";
accuScale[1] = "1";
accuScale[2] = "1";
accuScale[3] = "1";
accuDirection[0] = "1";
accuDirection[1] = "1";
accuDirection[2] = "1";
accuDirection[3] = "1";
accuStrength[0] = "0.6";
accuStrength[1] = "0.6";
accuStrength[2] = "0.6";
accuStrength[3] = "0.6";
accuCoverage[0] = "0.9";
accuCoverage[1] = "0.9";
accuCoverage[2] = "0.9";
accuCoverage[3] = "0.9";
accuSpecular[0] = "16";
accuSpecular[1] = "16";
accuSpecular[2] = "16";
accuSpecular[3] = "16";
isSRGB[0] = "0";
isSRGB[1] = "0";
isSRGB[2] = "0";
isSRGB[3] = "0";
invertRoughness[0] = "0";
invertRoughness[1] = "0";
invertRoughness[2] = "0";
invertRoughness[3] = "0";
roughnessChan[0] = "0";
roughnessChan[1] = "0";
roughnessChan[2] = "0";
roughnessChan[3] = "0";
AOChan[0] = "1";
AOChan[1] = "1";
AOChan[2] = "1";
AOChan[3] = "1";
metalChan[0] = "2";
metalChan[1] = "2";
metalChan[2] = "2";
metalChan[3] = "2";
glow[0] = "0";
glow[1] = "0";
glow[2] = "0";
glow[3] = "0";
parallaxScale[0] = "0";
parallaxScale[1] = "0";
parallaxScale[2] = "0";
parallaxScale[3] = "0";
useAnisotropic[0] = "1";
useAnisotropic[1] = "1";
useAnisotropic[2] = "1";
useAnisotropic[3] = "1";
vertLit[0] = "0";
vertLit[1] = "0";
vertLit[2] = "0";
vertLit[3] = "0";
vertColor[0] = "0";
vertColor[1] = "0";
vertColor[2] = "0";
vertColor[3] = "0";
minnaertConstant[0] = "-1";
minnaertConstant[1] = "-1";
minnaertConstant[2] = "-1";
minnaertConstant[3] = "-1";
subSurface[0] = "0";
subSurface[1] = "0";
subSurface[2] = "0";
subSurface[3] = "0";
subSurfaceColor[0] = "1 0.2 0.2 1";
subSurfaceColor[1] = "1 0.2 0.2 1";
subSurfaceColor[2] = "1 0.2 0.2 1";
subSurfaceColor[3] = "1 0.2 0.2 1";
subSurfaceRolloff[0] = "0.2";
subSurfaceRolloff[1] = "0.2";
subSurfaceRolloff[2] = "0.2";
subSurfaceRolloff[3] = "0.2";
emissive[0] = "0";
emissive[1] = "0";
emissive[2] = "0";
emissive[3] = "0";
doubleSided = "0";
animFlags[0] = "0x00000000";
animFlags[1] = "0x00000000";
animFlags[2] = "0x00000000";
animFlags[3] = "0x00000000";
scrollDir[0] = "0 0";
scrollDir[1] = "0 0";
scrollDir[2] = "0 0";
scrollDir[3] = "0 0";
scrollSpeed[0] = "0";
scrollSpeed[1] = "0";
scrollSpeed[2] = "0";
scrollSpeed[3] = "0";
rotSpeed[0] = "0";
rotSpeed[1] = "0";
rotSpeed[2] = "0";
rotSpeed[3] = "0";
rotPivotOffset[0] = "0 0";
rotPivotOffset[1] = "0 0";
rotPivotOffset[2] = "0 0";
rotPivotOffset[3] = "0 0";
waveType[0] = "Sin";
waveType[1] = "Sin";
waveType[2] = "Sin";
waveType[3] = "Sin";
waveFreq[0] = "0";
waveFreq[1] = "0";
waveFreq[2] = "0";
waveFreq[3] = "0";
waveAmp[0] = "0";
waveAmp[1] = "0";
waveAmp[2] = "0";
waveAmp[3] = "0";
sequenceFramePerSec[0] = "0";
sequenceFramePerSec[1] = "0";
sequenceFramePerSec[2] = "0";
sequenceFramePerSec[3] = "0";
sequenceSegmentSize[0] = "0";
sequenceSegmentSize[1] = "0";
sequenceSegmentSize[2] = "0";
sequenceSegmentSize[3] = "0";
cellIndex[0] = "0 0";
cellIndex[1] = "0 0";
cellIndex[2] = "0 0";
cellIndex[3] = "0 0";
cellLayout[0] = "0 0";
cellLayout[1] = "0 0";
cellLayout[2] = "0 0";
cellLayout[3] = "0 0";
cellSize[0] = "0";
cellSize[1] = "0";
cellSize[2] = "0";
cellSize[3] = "0";
bumpAtlas[0] = "0";
bumpAtlas[1] = "0";
bumpAtlas[2] = "0";
bumpAtlas[3] = "0";
castShadows = "1";
planarReflection = "0";
translucent = "1";
translucentBlendOp = "PreMul";
translucentZWrite = "0";
alphaTest = "0";
alphaRef = "1";
dynamicCubemap = "0";
showFootprints = "1";
showDust = "0";
effectColor[0] = "0 0 0 0";
effectColor[1] = "0 0 0 0";
footstepSoundId = "-1";
impactSoundId = "-1";
ImpactFXIndex = "-1";
canSave = "1";
canSaveDynamicFields = "1";
DiffuseMapAsset[0] = "Prototyping:WaterBlue_ALBEDO";
originalAssetName = "Glass";
};
//--- OBJECT WRITE END ---

View file

@ -1,8 +1,14 @@
<MaterialAsset
canSave="true"
canSaveDynamicFields="true"
AssetName="InteractiveRed"
scriptFile="@assetFile=InteractiveRed.tscript"
materialDefinitionName="InteractiveRed"
imageMap0="@Asset=Prototyping:InteractiveRed_ALBEDO"
originalFilePath="D:/Gamedev/art/Blockout/InteractiveRed.png" />
imageMap0="@asset=Prototyping:InteractiveRed_ALBEDO"
originalFilePath="C:/dev/T3D/PRs/MiscFixes20220525/Templates/BaseGame/game/data/Prototyping/Materials/InteractiveRed.png">
<Material
Name="InteractiveRed"
mapTo="InteractiveRed">
<Material.Stages>
<Stages_beginarray
DiffuseMapAsset="Prototyping:InteractiveRed_ALBEDO"/>
</Material.Stages>
</Material>
</MaterialAsset>

View file

@ -1,6 +0,0 @@
//--- OBJECT WRITE BEGIN ---
singleton Material(InteractiveRed) {
mapTo="InteractiveRed";
DiffuseMapAsset = "Prototyping:InteractiveRed_ALBEDO";
};
//--- OBJECT WRITE END ---

View file

@ -1,9 +1,4 @@
<ImageAsset
canSave="true"
canSaveDynamicFields="true"
AssetName="InteractiveRed_ALBEDO"
imageFile="@assetFile=InteractiveRed.png"
UseMips="true"
isHDRImage="false"
imageType="Albedo"
originalFilePath="D:/Gamedev/art/Blockout/InteractiveRed.png" />
originalFilePath="C:/dev/T3D/PRs/MiscFixes20220525/Templates/BaseGame/game/data/Prototyping/Materials/InteractiveRed.png"/>

View file

@ -1,8 +1,14 @@
<MaterialAsset
canSave="true"
canSaveDynamicFields="true"
AssetName="NatureBrown"
scriptFile="@assetFile=NatureBrown.tscript"
materialDefinitionName="NatureBrown"
imageMap0="@Asset=Prototyping:NatureBrown_ALBEDO"
originalFilePath="D:/Gamedev/art/Blockout/NatureBrown.png" />
imageMap0="@asset=Prototyping:NatureBrown_ALBEDO"
originalFilePath="C:/dev/T3D/PRs/MiscFixes20220525/Templates/BaseGame/game/data/Prototyping/Materials/NatureBrown.png">
<Material
Name="NatureBrown"
mapTo="NatureBrown">
<Material.Stages>
<Stages_beginarray
DiffuseMapAsset="Prototyping:NatureBrown_ALBEDO"/>
</Material.Stages>
</Material>
</MaterialAsset>

View file

@ -1,6 +0,0 @@
//--- OBJECT WRITE BEGIN ---
singleton Material(NatureBrown) {
mapTo="NatureBrown";
DiffuseMapAsset = "Prototyping:NatureBrown_ALBEDO";
};
//--- OBJECT WRITE END ---

View file

@ -1,9 +1,4 @@
<ImageAsset
canSave="true"
canSaveDynamicFields="true"
AssetName="NatureBrown_ALBEDO"
imageFile="@assetFile=NatureBrown.png"
UseMips="true"
isHDRImage="false"
imageType="Albedo"
originalFilePath="D:/Gamedev/art/Blockout/NatureBrown.png" />
originalFilePath="C:/dev/T3D/PRs/MiscFixes20220525/Templates/BaseGame/game/data/Prototyping/Materials/NatureBrown.png"/>

View file

@ -1,8 +1,14 @@
<MaterialAsset
canSave="true"
canSaveDynamicFields="true"
AssetName="NatureGreen"
scriptFile="@assetFile=NatureGreen.tscript"
materialDefinitionName="NatureGreen"
imageMap0="@Asset=Prototyping:NatureGreen_ALBEDO"
originalFilePath="D:/Gamedev/art/Blockout/NatureGreen.png" />
imageMap0="@asset=Prototyping:NatureGreen_ALBEDO"
originalFilePath="C:/dev/T3D/PRs/MiscFixes20220525/Templates/BaseGame/game/data/Prototyping/Materials/NatureGreen.png">
<Material
Name="NatureGreen"
mapTo="NatureGreen">
<Material.Stages>
<Stages_beginarray
DiffuseMapAsset="Prototyping:NatureGreen_ALBEDO"/>
</Material.Stages>
</Material>
</MaterialAsset>

View file

@ -1,6 +0,0 @@
//--- OBJECT WRITE BEGIN ---
singleton Material(NatureGreen) {
mapTo="NatureGreen";
DiffuseMapAsset = "Prototyping:NatureGreen_ALBEDO";
};
//--- OBJECT WRITE END ---

View file

@ -1,9 +1,4 @@
<ImageAsset
canSave="true"
canSaveDynamicFields="true"
AssetName="NatureGreen_ALBEDO"
imageFile="@assetFile=NatureGreen.png"
UseMips="true"
isHDRImage="false"
imageType="Albedo"
originalFilePath="D:/Gamedev/art/Blockout/NatureGreen.png" />
originalFilePath="C:/dev/T3D/PRs/MiscFixes20220525/Templates/BaseGame/game/data/Prototyping/Materials/NatureGreen.png"/>

View file

@ -1,8 +1,14 @@
<MaterialAsset
canSave="true"
canSaveDynamicFields="true"
AssetName="NullPink"
scriptFile="@assetFile=NullPink.tscript"
materialDefinitionName="NullPink"
imageMap0="@Asset=Prototyping:NullPink_ALBEDO"
originalFilePath="D:/Gamedev/art/Blockout/NullPink.png" />
imageMap0="@asset=Prototyping:NullPink_ALBEDO"
originalFilePath="C:/dev/T3D/PRs/MiscFixes20220525/Templates/BaseGame/game/data/Prototyping/Materials/NullPink.png">
<Material
Name="NullPink"
mapTo="NullPink">
<Material.Stages>
<Stages_beginarray
DiffuseMapAsset="Prototyping:NullPink_ALBEDO"/>
</Material.Stages>
</Material>
</MaterialAsset>

View file

@ -1,6 +0,0 @@
//--- OBJECT WRITE BEGIN ---
singleton Material(NullPink) {
mapTo="NullPink";
DiffuseMapAsset = "Prototyping:NullPink_ALBEDO";
};
//--- OBJECT WRITE END ---

View file

@ -1,9 +1,4 @@
<ImageAsset
canSave="true"
canSaveDynamicFields="true"
AssetName="NullPink_ALBEDO"
imageFile="@assetFile=NullPink.png"
UseMips="true"
isHDRImage="false"
imageType="Albedo"
originalFilePath="D:/Gamedev/art/Blockout/NullPink.png" />
originalFilePath="C:/dev/T3D/PRs/MiscFixes20220525/Templates/BaseGame/game/data/Prototyping/Materials/NullPink.png"/>

View file

@ -1,8 +1,14 @@
<MaterialAsset
canSave="true"
canSaveDynamicFields="true"
AssetName="TrimYellow"
scriptFile="@assetFile=TrimYellow.tscript"
materialDefinitionName="TrimYellow"
imageMap0="@Asset=Prototyping:TrimYellow_ALBEDO"
originalFilePath="D:/Gamedev/art/Blockout/TrimYellow.png" />
imageMap0="@asset=Prototyping:TrimYellow_ALBEDO"
originalFilePath="C:/dev/T3D/PRs/MiscFixes20220525/Templates/BaseGame/game/data/Prototyping/Materials/TrimYellow.png">
<Material
Name="TrimYellow"
mapTo="TrimYellow">
<Material.Stages>
<Stages_beginarray
DiffuseMapAsset="Prototyping:TrimYellow_ALBEDO"/>
</Material.Stages>
</Material>
</MaterialAsset>

View file

@ -1,6 +0,0 @@
//--- OBJECT WRITE BEGIN ---
singleton Material(TrimYellow) {
mapTo="TrimYellow";
DiffuseMapAsset = "Prototyping:TrimYellow_ALBEDO";
};
//--- OBJECT WRITE END ---

View file

@ -1,9 +1,4 @@
<ImageAsset
canSave="true"
canSaveDynamicFields="true"
AssetName="TrimYellow_ALBEDO"
imageFile="@assetFile=TrimYellow.png"
UseMips="true"
isHDRImage="false"
imageType="Albedo"
originalFilePath="D:/Gamedev/art/Blockout/TrimYellow.png" />
originalFilePath="C:/dev/T3D/PRs/MiscFixes20220525/Templates/BaseGame/game/data/Prototyping/Materials/TrimYellow.png"/>

View file

@ -1,8 +1,14 @@
<MaterialAsset
canSave="true"
canSaveDynamicFields="true"
AssetName="WallOrange"
scriptFile="@assetFile=WallOrange.tscript"
materialDefinitionName="WallOrange"
imageMap0="@Asset=Prototyping:WallOrange_ALBEDO"
originalFilePath="D:/Gamedev/art/Blockout/WallOrange.png" />
imageMap0="@asset=Prototyping:WallOrange_ALBEDO"
originalFilePath="C:/dev/T3D/PRs/MiscFixes20220525/Templates/BaseGame/game/data/Prototyping/Materials/WallOrange.png">
<Material
Name="WallOrange"
mapTo="WallOrange">
<Material.Stages>
<Stages_beginarray
DiffuseMapAsset="Prototyping:WallOrange_ALBEDO"/>
</Material.Stages>
</Material>
</MaterialAsset>

View file

@ -1,6 +0,0 @@
//--- OBJECT WRITE BEGIN ---
singleton Material(WallOrange) {
mapTo="WallOrange";
DiffuseMapAsset = "Prototyping:WallOrange_ALBEDO";
};
//--- OBJECT WRITE END ---

View file

@ -1,9 +1,4 @@
<ImageAsset
canSave="true"
canSaveDynamicFields="true"
AssetName="WallOrange_ALBEDO"
imageFile="@assetFile=WallOrange.png"
UseMips="true"
isHDRImage="false"
imageType="Albedo"
originalFilePath="D:/Gamedev/art/Blockout/WallOrange.png" />
originalFilePath="C:/dev/T3D/PRs/MiscFixes20220525/Templates/BaseGame/game/data/Prototyping/Materials/WallOrange.png"/>

View file

@ -1,8 +1,14 @@
<MaterialAsset
canSave="true"
canSaveDynamicFields="true"
AssetName="WaterBlue"
scriptFile="@assetFile=WaterBlue.tscript"
materialDefinitionName="WaterBlue"
imageMap0="@Asset=Prototyping:WaterBlue_ALBEDO"
originalFilePath="D:/Gamedev/art/Blockout/WaterBlue.png" />
imageMap0="@asset=Prototyping:WaterBlue_ALBEDO"
originalFilePath="C:/dev/T3D/PRs/MiscFixes20220525/Templates/BaseGame/game/data/Prototyping/Materials/WaterBlue.png">
<Material
Name="WaterBlue"
mapTo="WaterBlue">
<Material.Stages>
<Stages_beginarray
DiffuseMapAsset="Prototyping:WaterBlue_ALBEDO"/>
</Material.Stages>
</Material>
</MaterialAsset>

View file

@ -1,6 +0,0 @@
//--- OBJECT WRITE BEGIN ---
singleton Material(WaterBlue) {
mapTo="WaterBlue";
DiffuseMapAsset = "Prototyping:WaterBlue_ALBEDO";
};
//--- OBJECT WRITE END ---

View file

@ -1,9 +1,4 @@
<ImageAsset
canSave="true"
canSaveDynamicFields="true"
AssetName="WaterBlue_ALBEDO"
imageFile="@assetFile=WaterBlue.png"
UseMips="true"
isHDRImage="false"
imageType="Albedo"
originalFilePath="D:/Gamedev/art/Blockout/WaterBlue.png" />
originalFilePath="C:/dev/T3D/PRs/MiscFixes20220525/Templates/BaseGame/game/data/Prototyping/Materials/WaterBlue.png"/>

View file

@ -0,0 +1,15 @@
<MaterialAsset
AssetName="metalGray"
materialDefinitionName="metalGray"
VersionId="1">
<Material
Name="metalGray"
mapTo="metalGray">
<Material.Stages>
<Stages_beginarray
DiffuseColor="0.545725 0.53948 0.53948 1"
Roughness="0.745098"
Metalness="1"/>
</Material.Stages>
</Material>
</MaterialAsset>

View file

@ -1,6 +1,4 @@
<ModuleDefinition
canSave="true"
canSaveDynamicFields="true"
ModuleId="Prototyping"
VersionId="1"
Group="Game"
@ -8,8 +6,6 @@
CreateFunction="onCreate"
DestroyFunction="onDestroy">
<DeclaredAssets
canSave="true"
canSaveDynamicFields="true"
Extension="asset.taml"
Recurse="true" />
Recurse="true"/>
</ModuleDefinition>

View file

@ -9,15 +9,24 @@ function Prototyping::onDestroy(%this)
//This is called when the server is initially set up by the game application
function Prototyping::initServer(%this)
{
%this.queueExec("./scripts/car");
}
//This is called when the server is created for an actual game/map to be played
function Prototyping::onCreateGameServer(%this)
{
%this.registerDatablock("./datablocks/hoverboat.tscript");
%this.registerDatablock("./datablocks/car.tscript");
%this.registerDatablock("./datablocks/flier.tscript");
//These are common managed data files. For any datablock-based stuff that gets generated by the editors
//(that doesn't have a specific associated file, like data for a player class) will go into these.
//So we'll register them now if they exist.
if(isFile("./scripts/managedData/managedDatablocks." @ $TorqueScriptFileExtension))
%this.registerDatablock("./scripts/managedData/managedDatablocks");
if(isFile("./scripts/managedData/managedForestItemData." @ $TorqueScriptFileExtension))
%this.registerDatablock("./scripts/managedData/managedForestItemData");
if(isFile("./scripts/managedData/managedForestBrushData." @ $TorqueScriptFileExtension))
%this.registerDatablock("./scripts/managedData/managedForestBrushData");
if(isFile("./scripts/managedData/managedParticleEmitterData." @ $TorqueScriptFileExtension))
%this.registerDatablock("./scripts/managedData/managedParticleEmitterData");
if(isFile("./scripts/managedData/managedParticleData." @ $TorqueScriptFileExtension))
%this.registerDatablock("./scripts/managedData/managedParticleData");
}
//This is called when the server is shut down due to the game/map being exited

View file

@ -1,220 +0,0 @@
//-----------------------------------------------------------------------------
// Copyright (c) 2012 GarageGames, LLC
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to
// deal in the Software without restriction, including without limitation the
// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
// sell copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
// IN THE SOFTWARE.
//-----------------------------------------------------------------------------
/*
datablock SFXProfile(cheetahEngine)
{
preload = "1";
description = "AudioCloseLoop3D";
fileName = "data/FPSGameplay/sound/cheetah/cheetah_engine.ogg";
};
datablock SFXProfile(cheetahSqueal)
{
preload = "1";
description = "AudioDefault3D";
fileName = "data/FPSGameplay/sound/cheetah/cheetah_squeal.ogg";
};
datablock SFXProfile(hardImpact)
{
preload = "1";
description = "AudioDefault3D";
fileName = "data/FPSGameplay/sound/cheetah/hardImpact.ogg";
};
datablock SFXProfile(softImpact)
{
preload = "1";
description = "AudioDefault3D";
fileName = "data/FPSGameplay/sound/cheetah/softImpact.ogg";
};
datablock SFXProfile(DirtKickup)
{
preload = "1";
description = "AudioDefault3D";
fileName = "data/FPSGameplay/sound/cheetah/softImpact.ogg";
};
datablock SFXProfile(CheetahTurretFireSound)
{
//filename = "data/FPSGameplay/sound/cheetah/turret_firing.wav";
filename = "data/FPSGameplay/sound/turret/wpn_turret_fire.wav";
description = BulletFireDesc;
preload = true;
};
datablock ParticleData(CheetahTireParticle)
{
textureName = "data/FPSGameplay/art/particles/dustParticle";
dragCoefficient = "1.99902";
gravityCoefficient = "-0.100122";
inheritedVelFactor = "0.0998043";
constantAcceleration = 0.0;
lifetimeMS = 1000;
lifetimeVarianceMS = 400;
colors[0] = "0.456693 0.354331 0.259843 1";
colors[1] = "0.456693 0.456693 0.354331 0";
sizes[0] = "0.997986";
sizes[1] = "3.99805";
sizes[2] = "1.0";
sizes[3] = "1.0";
times[0] = "0.0";
times[1] = "1";
times[2] = "1";
times[3] = "1";
};
datablock ParticleEmitterData(CheetahTireEmitter)
{
ejectionPeriodMS = 20;
periodVarianceMS = 10;
ejectionVelocity = "14.57";
velocityVariance = 1.0;
ejectionOffset = 0.0;
thetaMin = 0;
thetaMax = 60;
phiReferenceVel = 0;
phiVariance = 360;
overrideAdvance = false;
particles = "CheetahTireParticle";
blendStyle = "ADDITIVE";
};*/
//-----------------------------------------------------------------------------
// Information extacted from the shape.
//
// Wheel Sequences
// spring# Wheel spring motion: time 0 = wheel fully extended,
// the hub must be displaced, but not directly animated
// as it will be rotated in code.
// Other Sequences
// steering Wheel steering: time 0 = full right, 0.5 = center
// breakLight Break light, time 0 = off, 1 = breaking
//
// Wheel Nodes
// hub# Wheel hub, the hub must be in it's upper position
// from which the springs are mounted.
//
// The steering and animation sequences are optional.
// The center of the shape acts as the center of mass for the car.
//-----------------------------------------------------------------------------
datablock WheeledVehicleTire(CarTire)
{
// Tires act as springs and generate lateral and longitudinal
// forces to move the vehicle. These distortion/spring forces
// are what convert wheel angular velocity into forces that
// act on the rigid body.
shapeAsset = "Prototyping:carwheel";
staticFriction = 4.2;
kineticFriction = "1";
// Spring that generates lateral tire forces
lateralForce = 18000;
lateralDamping = 6000;
lateralRelaxation = 1;
// Spring that generates longitudinal tire forces
longitudinalForce = 18000;
longitudinalDamping = 4000;
longitudinalRelaxation = 1;
radius = "0.609998";
};
datablock WheeledVehicleSpring(CarSpring)
{
// Wheel suspension properties
length = 0.5; // Suspension travel
force = 2800; // Spring force
damping = 3600; // Spring damping
antiSwayForce = 3; // Lateral anti-sway force
};
datablock WheeledVehicleData(Car)
{
category = "Vehicles";
emap = 1;
mountPose[0] = sitting;
numMountPoints = 6;
useEyePoint = true; // Use the vehicle's camera node rather than the player's
maxSteeringAngle = 0.585; // Maximum steering angle, should match animation
// 3rd person camera settings
cameraRoll = false; // Roll the camera with the vehicle
cameraMaxDist = 7.8; // Far distance from vehicle
cameraOffset = 1.0; // Vertical offset from camera mount point
cameraLag = "0.3"; // Velocity lag of camera
cameraDecay = 1.25; // Decay per sec. rate of velocity lag
// Rigid Body
mass = "400";
massCenter = "0 0.5 0"; // Center of mass for rigid body
massBox = "0 0 0"; // Size of box used for moment of inertia,
// if zero it defaults to object bounding box
drag = 0.6; // Drag coefficient
bodyFriction = 0.6;
bodyRestitution = 0.4;
minImpactSpeed = 5; // Impacts over this invoke the script callback
softImpactSpeed = 5; // Play SoftImpact Sound
hardImpactSpeed = 15; // Play HardImpact Sound
integration = 8; // Physics integration: TickSec/Rate
collisionTol = "0.1"; // Collision distance tolerance
contactTol = "0.4"; // Contact velocity tolerance
// Engine
engineTorque = 4300; // Engine power
engineBrake = "5000"; // Braking when throttle is 0
brakeTorque = "10000"; // When brakes are applied
maxWheelSpeed = 50; // Engine scale by current speed / max speed
// Energy
maxEnergy = 100;
jetForce = 3000;
minJetEnergy = 30;
jetEnergyDrain = 2;
// Sounds
//engineSound = cheetahEngine;
//squealSound = cheetahSqueal;
//softImpactSound = softImpact;
//hardImpactSound = hardImpact;
// Dynamic fields accessed via script
nameTag = 'Cheetah';
maxDismountSpeed = 10;
maxMountSpeed = 5;
mountPose0 = "sitting";
// tireEmitter = "CheetahTireEmitter";
// dustEmitter = "CheetahTireEmitter";
dustHeight = "1";
// Mount slots
turretSlot = 1;
rightBrakeSlot = 2;
leftBrakeSlot = 3;
dragForce = "0.01";
ShapeAsset = "Prototyping:car";
};

View file

@ -1,147 +0,0 @@
//Flying Vehicle
//---------------------------------------------------------------------------------------
datablock FlyingVehicleData(Flier)
{
spawnOffset = "0 0 2";
category = "Vehicles";
shapeAsset = "Prototyping:flier";
multipassenger = false;
computeCRC = true;
//debrisShapeName = "~/data/shapes/vehicles/Drone/flyer.dts";
//debris = DroneShapeDebris;
//renderWhenDestroyed = false;
drag = 0.15;
density = 3.0;
mountPose[0] = sitting;
numMountPoints = 1;
isProtectedMountPoint[0] = true;
cameraMaxDist = 0.5;
cameraOffset = 4.5;
cameraLag = 0.0;
cameraRoll = true; // Roll the camera with the vehicle
// explosion = DroneVehicleExplosion;
explosionDamage = 10.5;
explosionRadius = 15.0;
maxDamage = 50.40;
destroyedLevel = 50.40;
isShielded = true;
energyPerDamagePoint = 160;
maxEnergy = 280; // Afterburner and any energy weapon pool
rechargeRate = 0.8;
minDrag = 30; // Linear Drag (eventually slows you down when not thrusting...constant drag)
rotationalDrag = 10; // Anguler Drag (dampens the drift after you stop moving the mouse...also tumble drag)
maxAutoSpeed = 10; // Autostabilizer kicks in when less than this speed. (meters/second)
autoAngularForce = 200; // Angular stabilizer force (this force levels you out when autostabilizer kicks in)
autoLinearForce = 200; // Linear stabilzer force (this slows you down when autostabilizer kicks in)
autoInputDamping = 0.95; // Dampen control input so you don't` whack out at very slow speeds
integration = 6; // Physics integration: TickSec/Rate
collisionTol = 0.2; // Collision distance tolerance
contactTol = 0.1;
// Maneuvering
maxSteeringAngle = 3; // Max radiens you can rotate the wheel. Smaller number is more maneuverable.
horizontalSurfaceForce = 6; // Horizontal center "wing" (provides "bite" into the wind for climbing/diving and turning)
verticalSurfaceForce = 4; // Vertical center "wing" (controls side slip. lower numbers make MORE slide.)
maneuveringForce = 2400; // Horizontal jets (W,S,D,A key thrust)
steeringForce = 50; // Steering jets (force applied when you move the mouse)
steeringRollForce = 10; // Steering jets (how much you heel over when you turn)
rollForce = 80; // Auto-roll (self-correction to right you after you roll/invert)
hoverHeight = 45; // Height off the ground at rest
createHoverHeight = 45; // Height off the ground when created
maxForwardSpeed = 60; // speed in which forward thrust force is no longer applied (meters/second)
// Turbo Jet
jetForce = 3000; // Afterburner thrust (this is in addition to normal thrust)
minJetEnergy = 28; // Afterburner can't be used if below this threshhold.
jetEnergyDrain = 2.8; // Energy use of the afterburners (low number is less drain...can be fractional) // Auto stabilize speed
vertThrustMultiple = 3.0;
// Rigid body
mass = 30; // Mass of the vehicle
bodyFriction = 0; // Don't mess with this.
bodyRestitution = 1.0; // When you hit the ground, how much you rebound. (between 0 and 1)
minRollSpeed = 2000; // Don't mess with this.
softImpactSpeed = 3; // Sound hooks. This is the soft hit.
hardImpactSpeed = 15; // Sound hooks. This is the hard hit.
// Ground Impact Damage (uses DamageType::Ground)
minImpactSpeed = 10; // If hit ground at speed above this then it's an impact. Meters/second
speedDamageScale = 0.06;
// Object Impact Damage (uses DamageType::Impact)
collDamageThresholdVel = 23.0;
collDamageMultiplier = 0.02;
//
minTrailSpeed = 15; // The speed your contrail shows up at.
//trailEmitter = DroneContrailEmitter;
//forwardJetEmitter = DroneJetEmitter;
//downJetEmitter = DroneJetEmitter;
//
//jetSound = DroneThrustSound;
//engineSound = DroneEngineSound;
//softImpactSound = DroneSoftImpactSound;
//hardImpactSound = DroneHardImpactSound;
//
//softSplashSoundVelocity = 10.0;
//mediumSplashSoundVelocity = 15.0;
//hardSplashSoundVelocity = 20.0;
//exitSplashSoundVelocity = 10.0;
//exitingWater = DroneExitWaterMediumSound;
//impactWaterEasy = DroneImpactWaterSoftSound;
//impactWaterMedium = DroneImpactWaterMediumSound;
//impactWaterHard = DroneImpactWaterMediumSound;
//waterWakeSound = DroneWakeMediumSplashSound;
// dustEmitter = VehicleLiftoffDustEmitter;
triggerDustHeight = 4.0;
dustHeight = 1.0;
// damageEmitter[0] = LightDamageSmoke;
// damageEmitter[1] = HeavyDamageSmoke;
// damageEmitter[2] = DamageBubbles;
damageEmitterOffset[0] = "0.0 -3.0 0.0 ";
damageLevelTolerance[0] = 0.3;
damageLevelTolerance[1] = 0.7;
numDmgEmitterAreas = 3;
//
//max[RocketAmmo] = 1000;
minMountDist = 2;
//splashEmitter[0] = VehicleFoamDropletsEmitter;
//splashEmitter[1] = VehicleFoamEmitter;
//shieldImpact = VehicleShieldImpact;
//cmdCategory = "Tactical";
//cmdIcon = CMDFlyingScoutIcon;
//cmdMiniIconName = "commander/MiniIcons/com_scout_grey";
//targetNameTag = 'Drone';
//targetTypeTag = 'FlyingVehicle';
//sensorData = AWACPulseSensor;
//sensorRadius = AWACPulseSensor.detectRadius;
//sensorColor = "255 194 9";
checkRadius = 5.5;
observeParameters = "0 0 0";
shieldEffectScale = "0.937 1.125 0.60";
};

View file

@ -1,67 +0,0 @@
datablock HoverVehicleData(hoverboat)
{
spawnOffset = "0 0 1";
floatingGravMag = 55.5;
ShapeAsset = "Prototyping:hoverboat";
category = "Vehicles";
emap = 1;
category = "Vehicle";
drag = 0.2;
density = 0.3;
hoverHeight = 3; // Height off the ground at rest
createHoverHeight = 3;
integration = 4; // Physics integration: TickSec/Rate
collisionTol = 0.3; // Collision distance tolerance
contactTol = 0.2; // Contact velocity tolerance
cameraMaxDist = "4.23615";
cameraOffset = 5.7;
cameraLag = 5.5;
explosionDamage = 0.5;
explosionRadius = 5;
rechargeRate = 0.7;
energyPerDamagePoint = 75;
maxEnergy = 650;
minJetEnergy = 165;
jetEnergyDrain = 1.3;
// Rigid Body
mass = "2";
bodyFriction = 0.1;
bodyRestitution = 0.3;
softImpactSpeed = 20; // Play SoftImpact Sound
hardImpactSpeed = 28; // Play HardImpact Sound
dragForce = 1.0;
// dragForce = 25 / 45.0;
vertFactor = 0.8;
floatingThrustFactor = 0.5;
mainThrustForce = "20";
reverseThrustForce = "10";
strafeThrustForce = "25";
turboFactor = 1.5;
brakingForce = "20";
brakingActivationSpeed = 30;
stabLenMin = "1.5"; //was 3
stabLenMax = "2.5"; //was 4
stabSpringConstant = "25";
stabDampingConstant = 28;
gyroDrag = 18; // 16
//gyroForce = 50;
normalForce = "30";
restorativeForce = "19000";
steeringForce = "30";
rollForce = "0";
pitchForce = 30;
};

View file

@ -1,20 +0,0 @@
function Car::onAdd(%this, %obj)
{
Parent::onAdd(%this, %obj);
%obj.setWheelTire(0,CarTire);
%obj.setWheelTire(1,CarTire);
%obj.setWheelTire(2,CarTire);
%obj.setWheelTire(3,CarTire);
// Setup the car with some tires & springs
for (%i = %obj.getWheelCount() - 1; %i >= 0; %i--)
{
%obj.setWheelPowered(%i, true);
%obj.setWheelSpring(%i, CarSpring);
}
// Steer with the front tires
%obj.setWheelSteering(0, 1);
%obj.setWheelSteering(1, 1);
}

View file

@ -1,19 +0,0 @@
function Flier::onDamage(%this, %obj, %delta)
{
Parent::onDamage(%this, %obj);
%currentDamage = %obj.getDamageLevel();
if(%currentDamage > %obj.destroyedLevel)
{
if(%obj.getDamageState() !$= "Destroyed")
{
if(%obj.respawnTime !$= "")
%obj.marker.schedule = %obj.marker.data.schedule(%obj.respawnTime, "respawn", %obj.marker);
%obj.setDamageState(Destroyed);
}
}
else
{
if(%obj.getDamageState() !$= "Enabled")
%obj.setDamageState(Enabled);
}
}

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1,12 @@
singleton TSShapeConstructor(Playerbotdae)
{
baseShapeAsset = "Prototyping:Playerbot_shape";
singleDetailSize = "0";
neverImportMat = "DefaultMaterial ColorEffect*";
flipUVCoords = "0";
JoinIdenticalVerts = "0";
reverseWindingOrder = "0";
removeRedundantMats = "0";
animFPS = "2";
};

View file

@ -0,0 +1,7 @@
<ShapeAsset
AssetName="Playerbot_shape"
fileName="@assetFile=Playerbot.dae"
constuctorFileName="@assetFile=Playerbot.tscript"
materialSlot0="@asset=Prototyping:metalGray"
materialSlot1="@asset=Prototyping:interactiveRed"
originalFilePath="C:/dev/Resources/Art/Playerbot.dae"/>

View file

@ -1,6 +0,0 @@
<ShapeAsset
canSave="true"
canSaveDynamicFields="true"
AssetName="ConePrimitive"
fileName="@assetFile=ConePrimitive.fbx"
originalFilePath="D:/Gamedev/T3DMIT/Resources/Prototyping/Shapes/ConePrimitive.fbx" />

View file

@ -0,0 +1,6 @@
<ShapeAsset
AssetName="ConePrimitive_shape"
fileName="@assetFile=ConePrimitive.fbx"
constuctorFileName="@assetFile=ConePrimitive.tscript"
materialSlot0="@asset=Prototyping:DetailBlue"
originalFilePath="C:/dev/T3D/PRs/MiscFixes20220525/Templates/BaseGame/game/data/Prototyping/shapes/Primitives/ConePrimitive.fbx"/>

View file

@ -1,6 +0,0 @@
<ShapeAsset
canSave="true"
canSaveDynamicFields="true"
AssetName="CubePrimitive"
fileName="@assetFile=CubePrimitive.fbx"
originalFilePath="D:/Gamedev/T3DMIT/Resources/Prototyping/Shapes/CubePrimitive.fbx" />

View file

@ -0,0 +1,6 @@
<ShapeAsset
AssetName="CubePrimitive_shape"
fileName="@assetFile=CubePrimitive.fbx"
constuctorFileName="@assetFile=CubePrimitive.tscript"
materialSlot0="@asset=Prototyping:DetailBlue"
originalFilePath="C:/dev/T3D/PRs/MiscFixes20220525/Templates/BaseGame/game/data/Prototyping/shapes/Primitives/CubePrimitive.fbx"/>

View file

@ -1,6 +0,0 @@
<ShapeAsset
canSave="true"
canSaveDynamicFields="true"
AssetName="CylinderPrimitive"
fileName="@assetFile=CylinderPrimitive.fbx"
originalFilePath="D:/Gamedev/T3DMIT/Resources/Prototyping/Shapes/CylinderPrimitive.fbx" />

View file

@ -0,0 +1,6 @@
<ShapeAsset
AssetName="CylinderPrimitive_shape"
fileName="@assetFile=CylinderPrimitive.fbx"
constuctorFileName="@assetFile=CylinderPrimitive.tscript"
materialSlot0="@asset=Prototyping:DetailBlue"
originalFilePath="C:/dev/T3D/PRs/MiscFixes20220525/Templates/BaseGame/game/data/Prototyping/shapes/Primitives/CylinderPrimitive.fbx"/>

View file

@ -1,6 +0,0 @@
<ShapeAsset
canSave="true"
canSaveDynamicFields="true"
AssetName="SpherePrimitive"
fileName="@assetFile=SpherePrimitive.fbx"
originalFilePath="D:/Gamedev/T3DMIT/Resources/Prototyping/Shapes/SpherePrimitive.fbx" />

View file

@ -0,0 +1,6 @@
<ShapeAsset
AssetName="SpherePrimitive_shape"
fileName="@assetFile=SpherePrimitive.fbx"
constuctorFileName="@assetFile=SpherePrimitive.tscript"
materialSlot0="@asset=Prototyping:DetailBlue"
originalFilePath="C:/dev/T3D/PRs/MiscFixes20220525/Templates/BaseGame/game/data/Prototyping/shapes/Primitives/SpherePrimitive.fbx"/>

View file

@ -1,6 +0,0 @@
<ShapeAsset
canSave="true"
canSaveDynamicFields="true"
AssetName="TorusPrimitive"
fileName="@assetFile=TorusPrimitive.fbx"
originalFilePath="D:/Gamedev/T3DMIT/Resources/Prototyping/Shapes/TorusPrimitive.fbx" />

View file

@ -0,0 +1,6 @@
<ShapeAsset
AssetName="TorusPrimitive_shape"
fileName="@assetFile=TorusPrimitive.fbx"
constuctorFileName="@assetFile=TorusPrimitive.tscript"
materialSlot0="@asset=Prototyping:DetailBlue"
originalFilePath="C:/dev/T3D/PRs/MiscFixes20220525/Templates/BaseGame/game/data/Prototyping/shapes/Primitives/TorusPrimitive.fbx"/>

View file

@ -1,6 +0,0 @@
<ShapeAsset
canSave="true"
canSaveDynamicFields="true"
AssetName="TubePrimitive"
fileName="@assetFile=TubePrimitive.fbx"
originalFilePath="D:/Gamedev/T3DMIT/Resources/Prototyping/Shapes/TubePrimitive.fbx" />

View file

@ -0,0 +1,6 @@
<ShapeAsset
AssetName="TubePrimitive_shape"
fileName="@assetFile=TubePrimitive.fbx"
constuctorFileName="@assetFile=TubePrimitive.tscript"
materialSlot0="@asset=Prototyping:DetailBlue"
originalFilePath="C:/dev/T3D/PRs/MiscFixes20220525/Templates/BaseGame/game/data/Prototyping/shapes/Primitives/TubePrimitive.fbx"/>

View file

@ -1 +0,0 @@
<ShapeAsset canSave="true" canSaveDynamicFields="true" AssetName="Car" fileName="@assetFile=car.dae" constuctorFileName="@assetFile=car.tscript"/>

View file

@ -0,0 +1,6 @@
<ShapeAsset
AssetName="car_shape"
fileName="@assetFile=car.dae"
constuctorFileName="@assetFile=car.tscript"
materialSlot0="@asset=Prototyping:InteractiveRed"
originalFilePath="C:/dev/T3D/PRs/MiscFixes20220525/Templates/BaseGame/game/data/Prototyping/shapes/Vehicles/car.dae"/>

View file

@ -1 +0,0 @@
<ShapeAsset canSave="true" canSaveDynamicFields="true" AssetName="carwheel" fileName="@assetFile=carwheel.dae" constuctorFileName="@assetFile=carwheel.tscript"/>

View file

@ -0,0 +1,6 @@
<ShapeAsset
AssetName="carwheel_shape"
fileName="@assetFile=carwheel.dae"
constuctorFileName="@assetFile=carwheel.tscript"
materialSlot0="@asset=Prototyping:InteractiveRed"
originalFilePath="C:/dev/T3D/PRs/MiscFixes20220525/Templates/BaseGame/game/data/Prototyping/shapes/Vehicles/carwheel.dae"/>

View file

@ -1 +0,0 @@
<ShapeAsset canSave="true" canSaveDynamicFields="true" AssetName="flier" fileName="@assetFile=flier.dae" constuctorFileName="@assetFile=flier.tscript"/>

View file

@ -0,0 +1,6 @@
<ShapeAsset
AssetName="flier_shape"
fileName="@assetFile=flier.dae"
constuctorFileName="@assetFile=flier.tscript"
materialSlot0="@asset=Prototyping:InteractiveRed"
originalFilePath="C:/dev/T3D/PRs/MiscFixes20220525/Templates/BaseGame/game/data/Prototyping/shapes/Vehicles/flier.dae"/>

View file

@ -1 +0,0 @@
<ShapeAsset canSave="true" canSaveDynamicFields="true" AssetName="hoverboat" fileName="@assetFile=hoverboat.dae" constuctorFileName="@assetFile=hoverboat.tscript"/>

View file

@ -0,0 +1,6 @@
<ShapeAsset
AssetName="hoverboat_shape"
fileName="@assetFile=hoverboat.dae"
constuctorFileName="@assetFile=hoverboat.tscript"
materialSlot0="@asset=Prototyping:InteractiveRed"
originalFilePath="C:/dev/T3D/PRs/MiscFixes20220525/Templates/BaseGame/game/data/Prototyping/shapes/Vehicles/hoverboat.dae"/>

View file

@ -1,8 +0,0 @@
<MaterialAsset
canSave="true"
canSaveDynamicFields="true"
AssetName="kork_chan"
scriptFile="@assetFile=kork_chan.tscript"
materialDefinitionName="kork_chan"
imageMap0="@Asset=Prototyping:kork_chan_ALBEDO"
originalFilePath="D:/Gamedev/T3DMIT/Resources/Prototyping/Shapes" />

View file

@ -1,6 +0,0 @@
//--- OBJECT WRITE BEGIN ---
singleton Material(kork_chan) {
mapTo="kork_chan";
DiffuseMapAsset = "Prototyping:kork_chan_ALBEDO";
};
//--- OBJECT WRITE END ---

View file

@ -1,7 +1,6 @@
<ShapeAsset
canSave="true"
canSaveDynamicFields="true"
AssetName="kork_chanShape"
fileName="@assetFile=kork_chanShape.fbx"
materialSlot0="@Asset=Prototyping:kork_chan"
originalFilePath="D:/Gamedev/T3DMIT/Resources/Prototyping/Shapes/kork_chanShape.fbx" />
constuctorFileName="@assetFile=kork_chanShape.tscript"
materialSlot0="@asset=Prototyping:kork_chan_mat"
originalFilePath="C:/dev/T3D/PRs/MiscFixes20220525/Templates/BaseGame/game/data/Prototyping/shapes/kork_chanShape.fbx"/>

View file

@ -1,9 +0,0 @@
<ImageAsset
canSave="true"
canSaveDynamicFields="true"
AssetName="kork_chan_ALBEDO"
imageFile="@assetFile=kork_chan.png"
UseMips="true"
isHDRImage="false"
imageType="Albedo"
originalFilePath="D:/Gamedev/T3DMIT/Resources/Prototyping/Shapes/kork_chan.png" />

View file

@ -0,0 +1,4 @@
<ImageAsset
AssetName="kork_chan_image"
imageFile="@assetFile=kork_chan.png"
originalFilePath="C:/dev/T3D/PRs/MiscFixes20220525/Templates/BaseGame/game/data/Prototyping/shapes/kork_chan.png"/>

View file

@ -0,0 +1,13 @@
<MaterialAsset
AssetName="kork_chan_mat"
materialDefinitionName="kork_chan_mat"
imageMap0="@asset=Prototyping:kork_chan_image">
<Material
Name="kork_chan_mat"
mapTo="kork_chan">
<Material.Stages>
<Stages_beginarray
DiffuseMapAsset="Prototyping:kork_chan_image"/>
</Material.Stages>
</Material>
</MaterialAsset>

View file

@ -316,144 +316,4 @@
name="VolumeAdjust">1.0</Setting>
</Group>
</Group>
<Group
name="NewTest">
<Group
name="Animations">
<Setting
name="animFPS">2</Setting>
<Setting
name="animTiming">Seconds</Setting>
<Setting
name="ImportAnimations">1</Setting>
<Setting
name="SeparateAnimations">1</Setting>
</Group>
<Group
name="Collision">
<Setting
name="CollisionMeshPrefix">Col</Setting>
<Setting
name="GenCollisionType">CollisionMesh</Setting>
<Setting
name="GenerateCollisions">1</Setting>
<Setting
name="GenerateLOSCollisions">1</Setting>
<Setting
name="GenLOSCollisionType">CollisionMesh</Setting>
<Setting
name="LOSCollisionMeshPrefix">LOS</Setting>
</Group>
<Group
name="General">
<Setting
name="AddDirectoryPrefixToAssetName">0</Setting>
<Setting
name="AutomaticallyPromptMissingFiles">0</Setting>
<Setting
name="DuplicatAutoResolution">AutoPrune</Setting>
<Setting
name="PreventImportWithErrors">1</Setting>
<Setting
name="WarningsAsErrors">0</Setting>
</Group>
<Group
name="Images">
<Setting
name="AOTypeSuffixes">_AO,_AMBIENT,_AMBIENTOCCLUSION</Setting>
<Setting
name="Compressed">1</Setting>
<Setting
name="DiffuseTypeSuffixes">_ALBEDO,_DIFFUSE,_ALB,_DIF,_COLOR,_COL</Setting>
<Setting
name="GenerateMaterialOnImport">1</Setting>
<Setting
name="ImageType">N/A</Setting>
<Setting
name="IsHDR">0</Setting>
<Setting
name="MetalnessTypeSuffixes">_METAL,_MET,_METALNESS,_METALLIC</Setting>
<Setting
name="NormalTypeSuffixes">_NORMAL,_NORM</Setting>
<Setting
name="PBRTypeSuffixes">_COMP,_COMPOSITE,_PBR,-COMP,-COMPOSITE,-PBR,_ORM,-ORM</Setting>
<Setting
name="RoughnessTypeSuffixes">_ROUGH,_ROUGHNESS</Setting>
<Setting
name="Scaling">1.0</Setting>
<Setting
name="SmoothnessTypeSuffixes">_SMOOTH,_SMOOTHNESS</Setting>
<Setting
name="TextureFilteringMode">Bilinear</Setting>
<Setting
name="UseMips">1</Setting>
</Group>
<Group
name="Materials">
<Setting
name="CreateComposites">1</Setting>
<Setting
name="ImportMaterials">1</Setting>
<Setting
name="PopulateMaterialMaps">1</Setting>
<Setting
name="UseDiffuseSuffixOnOriginImage">1</Setting>
<Setting
name="UseExistingMaterials">1</Setting>
</Group>
<Group
name="Meshes">
<Setting
name="AdjustCenter">0</Setting>
<Setting
name="AdjustFloor">0</Setting>
<Setting
name="calcTangentSpace">0</Setting>
<Setting
name="CollapseSubmeshes">0</Setting>
<Setting
name="convertLeftHanded">0</Setting>
<Setting
name="DoScaleOverride">0</Setting>
<Setting
name="DoUpAxisOverride">0</Setting>
<Setting
name="findInstances">0</Setting>
<Setting
name="flipUVCoords">0</Setting>
<Setting
name="genUVCoords">0</Setting>
<Setting
name="IgnoreNodeScale">0</Setting>
<Setting
name="ImportMesh">1</Setting>
<Setting
name="invertNormals">0</Setting>
<Setting
name="JoinIdenticalVerts">0</Setting>
<Setting
name="limitBoneWeights">0</Setting>
<Setting
name="LODType">TrailingNumber</Setting>
<Setting
name="removeRedundantMats">0</Setting>
<Setting
name="reverseWindingOrder">0</Setting>
<Setting
name="ScaleOverride">1</Setting>
<Setting
name="TransformUVs">0</Setting>
<Setting
name="UpAxisOverride">Z_AXIS</Setting>
</Group>
<Group
name="Sounds">
<Setting
name="Compressed">0</Setting>
<Setting
name="PitchAdjust">1.0</Setting>
<Setting
name="VolumeAdjust">1.0</Setting>
</Group>
</Group>
</AssetImportSettings>

View file

@ -16,6 +16,7 @@ function AssetBrowser::createMaterialAsset(%this)
materialDefinitionName = %assetName;
new Material(%assetName) {
mapTo = %assetName;
};
};

View file

@ -115,8 +115,11 @@ function AssetBrowser::regeneratePreviewImage(%this)
{
%assetDef = AssetDatabase.acquireAsset(EditAssetPopup.assetId);
%dummyObj = new ScriptObject();
%regenCommand = "AssetBrowser.build" @ EditAssetPopup.assetType @
"Preview(" @%assetDef @ "," @ %dummyObj @ ", true);";
%dummyObj.moduleName = AssetDatabase.getAssetModule(EditAssetPopup.assetId).moduleId;
%dummyObj.assetName = AssetDatabase.getAssetName(EditAssetPopup.assetId);
%regenCommand = "AssetBrowser.generate" @ EditAssetPopup.assetType @
"PreviewImage(" @ %dummyObj @ ", true);";
eval(%regenCommand);
%dummyObj.delete();

View file

@ -1101,10 +1101,10 @@ singleton GuiControlProfile( GuiEditorScrollProfile )
singleton GuiControlProfile( GuiCreatorIconButtonProfile )
{
opaque = true;
fillColor = "225 243 252 255";
fillColorHL = "225 243 252 0";
fillColorNA = "225 243 252 0";
fillColorSEL = "225 243 252 0";
fillColor = EditorSettings.value("Theme/tabsColor");
fillColorHL = EditorSettings.value("Theme/tabsHLColor");
fillColorSEL = EditorSettings.value("Theme/tabsSELColor");
fillColorNA = EditorSettings.value("Theme/tabsSELColor");
//tab = true;
//canKeyFocus = true;
@ -1112,15 +1112,15 @@ singleton GuiControlProfile( GuiCreatorIconButtonProfile )
fontType = "Noto Sans";
fontSize = 14;
fontColor = "215 215 215";
fontColorSEL = "43 107 206";
fontColorHL = "244 244 244";
fontColorNA = "100 100 100";
fontColor = EditorSettings.value("Theme/fieldTextColor");
fontColorHL = EditorSettings.value("Theme/fieldTextHLColor");
fontColorNA = EditorSettings.value("Theme/fieldTextSELColor");
fontColorSEL = EditorSettings.value("Theme/fieldTextSELColor");
border = 1;
borderColor = "153 222 253 255";
borderColorHL = "156 156 156";
borderColorNA = "153 222 253 0";
borderColor = EditorSettings.value("Theme/dividerMidColor");
borderColorHL = EditorSettings.value("Theme/dividerLightColor");
borderColorNA = EditorSettings.value("Theme/dividerDarkColor");
//bevelColorHL = "255 255 255";
//bevelColorLL = "0 0 0";

View file

@ -2,14 +2,7 @@
new Scene(EditorTemplateLevel) {
canSave = "1";
canSaveDynamicFields = "1";
isSubScene = "0";
isEditing = "0";
isDirty = "0";
EditPostEffects = "0";
cdTrack = "2";
CTF_scoreLimit = "5";
Enabled = "1";
musicTrack = "lush";
new LevelInfo(theLevelInfo) {
nearClip = "0.1";
@ -27,10 +20,7 @@ new Scene(EditorTemplateLevel) {
soundDistanceModel = "Linear";
canSave = "1";
canSaveDynamicFields = "1";
advancedLightmapSupport = "0";
desc0 = "A blank room template that acts as a starting point.";
Enabled = "1";
LevelName = "Blank Room Template";
};
new SkyBox(theSky) {
Material = "BlankSkyMat";

View file

@ -2,13 +2,7 @@
new Scene(EditorTemplateLevel) {
canSave = "1";
canSaveDynamicFields = "1";
isSubScene = "0";
isEditing = "0";
isDirty = "0";
cdTrack = "2";
CTF_scoreLimit = "5";
Enabled = "1";
musicTrack = "lush";
new LevelInfo(theLevelInfo) {
nearClip = "0.1";
@ -26,10 +20,7 @@ new Scene(EditorTemplateLevel) {
soundDistanceModel = "Linear";
canSave = "1";
canSaveDynamicFields = "1";
advancedLightmapSupport = "0";
desc0 = "A blank room template that acts as a starting point.";
Enabled = "1";
LevelName = "Blank Room Template";
};
new SkyBox(theSky) {
Material = "BlankSkyMat";

View file

@ -47,6 +47,11 @@
<Setting
name="showToolsModule">1</Setting>
</Group>
<Group
name="New">
<Setting
name="defaultModule">ExampleModule</Setting>
</Group>
</Group>
<Group
name="AxisGizmo">

View file

@ -145,11 +145,11 @@ $guiContent = new GuiControl(TerrainMaterialDlg,EditorGuiGroup) {
tooltipProfile = "ToolsGuiDefaultProfile";
isContainer = "0";
};
new GuiTextEditCtrl() {
new GuiTextCtrl() {
position = "39 21";
extent = "227 18";
profile = "ToolsGuiTextEditProfile";
altCommand = "TerrainMaterialDlg.setMaterialName( $ThisControl.getText() );";
//altCommand = "TerrainMaterialDlg.setMaterialName( $ThisControl.getText() );";
tooltipProfile = "ToolsGuiToolTipProfile";
isContainer = "0";
internalName = "matNameCtrl";