-- -*- lua -*-
-- $Id: //buddha/Buddha/Main/Data/Config/BuddhaDefault.cfg#371 $
-- Copyright 2006 Double Fine Productions
-- All rights reserved.  Proprietary and Confidential.
--
-- This file contains the default config settings for Buddha.
-- It shouldn't be modified except to add new settings, or change
-- their defaults.  Overrides should be put in Buddha.cfg.
--
-- PLATFORM is the same as RsGetNativePlatform ('Win', '360', 'PS3')

-- **********************************************************************
-- PC graphics settings
-- **********************************************************************
if PLATFORM == 'Win' then
    -- Whether or not to start the game in fullscreen mode
    fullscreen = true

    -- By default, fullscreen uses the same resolution as the desktop,
    -- but you can override that by uncommenting and tuning these lines.
    -- fullscreenWidth = 1600
    -- fullscreenHeight = 900
end

-- **********************************************************************
-- Startup and front end
-- **********************************************************************

-- Enable the MUE editor manipulator stuff.
enableManipManager = false

-- Demo mode (Press demos etc)
demoMode = false

-- Trial mode (for XBLA/PSN games)
enableTrialMode = false
forceTrialMode = false

-- Allow / Disallow debug menu in dev builds
allowDebugMenu = true

-- Play the opening logo movies
playOpeningLogo = true

-- If this is false, the game launches straight into a local, single-player
-- campaign game.  The level is specified by campaignLevel (see below)
bDisplayStartupDialog = false

-- If this is true, the game launches straight into a local, single-player lobby
-- The level is specified by campaignLevel (see below)
bSkipToLobby = true

-- On 360, whether or not to automatically select the HD even if an MU is present
autoHD = true

-- This is the dev map list, used for single player skirmish games and test rooms.
levelList = {
    { "WhiteBirch", "Worlds/WhiteBirch/WhiteBirch.LevelData" },
}

-- This is the mission (game type) list, used for skirmish games (both local and network)
missionList = {
    { "DefaultMission", "Seed" }
}

-- This is the level to use for the single-player campaign
DefaultLevel = 0
DefaultMission = 0

-- If you are using level/mission overrides for multiplayer, make sure they appear in your lists!
levelOverride = "WhiteBirch"
missionOverride = "Seed"

-- **********************************************************************
-- Sound
-- **********************************************************************

-- If the sound system is disabled, voice chat also won't work.
disableSoundSystem = false

-- ASSETS
-- The sound projects this game needs to function
soundProjects = { 
  
    { "ABAudio" },
    { "ABReverb" },
    { "Reverb" },

}

-- The volumes of all sub-categories
soundCategoryVolumes = {

    { "music/Clean",},
    { "music/Main",},
    { "SFX/Clean",},
    { "SFX/Main",},
    { "Ambience/Main",},
    { "Ambience/Clean",},
    { "Voice/Main",},
    { "Voice/Clean",},
    { "Cutscenes/Main",},
    { "Cutscenes/Clean",},
    
}

-- The cue to use for bleeping.
--bleepCue = "GUI/Common/SwearBleep"

-- VOLUME
-- The initial master sound volume
masterVolume = 1

-- MEMORY
-- Number of MB to give the sound system.
if PLATFORM == 'PS3' then
    soundMemoryMB = 42
elseif PLATFORM == '360' then
    soundMemoryMB = 48
elseif PLATFORM == 'Win' then
    soundMemoryMB = 64
end
-- Number of MB from total to allocate from RSX memory. PS3 only 
rsxMemoryMB = 22
-- Num of MB for the Voice LRU, 0 to disable
voiceLRUMaxMB = 12
-- How much buffer space it should try to keep, starts unloading sounds when this much free space is left
-- This should be a fair bit larger than the largest voice line in the game.
voiceLRUBufferMB = 2

-- CHANNELS/VOICES
-- The maximum number of virtual voices/channels.
virtualChannels = 192
-- The number of real "hardware" voices/channels.
realChannels = 32
-- Note that there must be enough codecs of the right types to
-- the number of realChannels or sounds may drop out.
-- The maximum number of PCM codecs (used by streams and PCM audio)
pcmCodecs = 10
-- The maximum number of ADPCM codecs
adpcmCodecs = 0
-- The maximum number of compressed codecs
-- What compressed means is determined on a per-platform basis.
-- For example, MP2 on PS3 and XMA on 360
compressedCodecs = 32

-- DSP
-- Doppler scale, defaults to 0 to have doppler completely disabled, set to 1 to for full doppler
dopplerScale = 0
-- (De)activates environmental reverb
environmentalReverb = true

-- (De)activates a lowpass on distant objects
distantLowpass = false
-- The distanace at which sounds start to be lowpassed
distantLowpassStart = 60
-- The distanace at which sounds are at the max amount of distant lowpass
distantLowpassEnd = 65
-- The maximum amount of lowpass to apply to distant sounds
distantLowpassMaxOcclussion = 0.45

-- activates blending 3D sounds into 2D when close to the microphone
enableNear2DBlend = true
-- The distanace at which sounds start becoing 2D
near2DBlendStart = 3
-- The distanace at which sounds are back to 3D
near2DBlendEnd = 2
-- The amount of 3D left in the sound when it's fully in the 2D range
near2DBlendLevel = 0.2

-- The FMOD Event used to playback recorded sounds.
processingCue = 'Voice/Voice/RecordedVO'

-- DEVELOPER TOOLS
-- Enable live auditioning from FMOD Designer
soundAuditioning = false
-- Enable live profiling from FMOD Designer
soundProfiling = false
-- Enable new FMOD file system callbacks
soundFsCallbacks = true

-- **********************************************************************
-- Graphics
-- **********************************************************************

-- Sync frame presentation to the vertical retrace
syncFrameRate = true

-- Enable ubershader optimizations in CompileShader and Buddha
optimizedShaders = true

detailCullingScale = 1.0
shaderLODScale  = 1.0
shadowRangeScale = 1.0
ambmeshDensityScale = 1.0

-- **********************************************************************
-- Misc stuff
-- **********************************************************************

natal = {
	-- CreateDebugTextures = true,
	-- SuppressCameraErrors = false,
	-- UseSetFrameEnd = true,
	-- DebugRender = false,
}

-- Default to local skirmish mode
DefaultToLocal = false

mtPhysics = true
spuPhysics = true

-- Allow prerendered video
enablePrerenders = true

-- Set to the value of a DEBUGTEXT_ enum.
DebugText = 0

-- Mostly for anim test room support
hotkeysFile = "Data/Config/hotkeys.lua"

enableRumble=true

-- Display warnings onscreen. Setting to false still write warnings to the debug log.
bConsoleOutput = true

-- Turning off allows new cutscenes to be skipped immediately.
EnableCutsceneSkipDelay = true

-- **********************************************************************
-- Player settings
-- **********************************************************************
playerSetup = {}

-- If set, overrides the prototype used to create a player
playerSetup.playerOverridePrototype = ''

playerSetup.bInvertCameraHorizontal = false
playerSetup.bInvertCameraVertical = false

-- **********************************************************************
-- Game settings
-- **********************************************************************
gameSetup = {}

gameSetup.GameType = "Birch"

-- Set this to true to have all players start on the same team. This makes it
-- possible to debug team skirmish issues with only two machines.
gameSetup.DebugTeamSkirmish = false

-- Set this to true for publisher builds.
gameSetup.PublisherBuild = false

-- Set this to true to disable pathfinding (useful for loading large terrains)
bDisablePathFinding = false

-- Set this to true to display the debug unit health on units
bDisplayDebugUnitHealth = false

-- Set this to true to display annotations in release
showAnnotations = false

maxRagdolls = 3

-- Useful if you need to catch debug spew from game startup; also used
-- by functional test framework.
bWaitForDebugConnection = false

-- **********************************************************************
-- Record/playback settings
-- **********************************************************************
record = {}

record.directory = "Recordings"
record.playbackFilename = ""
record.mode = RM_Record         -- RM_Disabled, RM_Record, RM_Playback

-- If no filename is given, the most recent one is selected
-- record.playbackFilename = "_FilenameHere_.input"

-- **********************************************************************
-- Multiplayer/network settings
-- **********************************************************************
net = {}

-- Max players and teams
net.maxPlayers = 8
net.maxTeams = 2

-- Filter out incompatible NATs on the 360 server-side
-- This will prevent party matchmaking within DF but will greatly improve match time in the real world
net.NatFilter = false

-- Whether to filter party matches by skill - should be disabled for dev only
net.SkillFilter = true

-- Net police (cut lame connections)
net.Police = true

net.HostRelay = false			-- ??
net.ClientServer = false		-- ??
net.SyncdInputDelay = true		-- ??

-- Modifies the name of the game as advertised to buddhaconsole and such
-- Mostly useful for running multiple games on one pc.
net.nameSuffix = ''

-- Checksums currently cause network games to run more slowly, but enable better error reporting
net.bEnableChecksum = false

-- This also causes the game to run more slowly, but perhaps not as slow as full checksumming
net.bEnableBackgroundChecksum = true

-- Should we write stats at the conclusion of skirmishes?
net.bWriteStats = true

-- Should we keep telemetry stats (dumped throughout gameplay)?
net.bTelemetry = false

-- Causes each node to use a different memory fill pattern. If turning this off causes a desync
-- to go away, then the problem is uninitialized memory.
net.bEnableFillPattern = true

-- Turning this on causes the game to process two sim ticks at a time. Each node uses a different
-- parity. This can help reveal desyncs caused by things that are processing per frame instead of
-- per tick.
net.bEnableTickParity = false

-- Timeouts for normal conditions and for stalled conditions (such as loading the game)
net.gameTimeout = 3
net.loadTimeout = 7

net.gameName = ""

net.MaxPing = 700
net.MaxAvgPacketLoss = .075
net.MaxAvgPacketLossPadding = .0025
net.MaxPeakPacketLoss = .1
net.MaxPeakLossTime = 10
net.ScorePercentageDifference = .1
net.PoliceBroadcastInterval = 3
net.PoliceAnalyzeInterval = 3
net.MaxNetworkStrikes = 3

-- **********************************************************************
-- Functional test settings
-- **********************************************************************
test = {}

test.netMode = TNM_None -- TNM_None, TNM_Server, TNM_Client, TNM_AI

-- lobby server to connect to
test.netPlayerCount = 2                 -- number of players when starting a multiplayer test

test.faction = kFT_A                    -- Host's faction
test.enemyFaction = kFT_Neutral             -- Singleplayer by default

test.aiDifficulty = kADT_Normal     -- difficulty of the ai is normal by default

test.enablePopups = true            -- disable popup windows when using bots

test.extraAIAvatarsPerTeam = 0     -- when in TNM_AI, spawns this many EXTRA avatars on each side

-- **********************************************************************
-- Resources and memory management
-- **********************************************************************
memory = {}

-- values are in MEGs
memory.environment = 90
memory.character = 100
memory.atmospherics = 30
memory.envtech = 30
memory.effects = 10
memory.ui = 8
memory.other = 0
memory.procedural = 0

resourceCategories = {

    -- Format here is:
    -- { "LABEL", BUDGET_MB, { "ASSET PATTERN", ... } }
    -- Label will be whatever is displayed in game, and the pattern controls 
    -- which assets get counted towards that label.  Each asset pattern can 
    -- take one of these forms:
    --    "AssetPath", "AssetPath:ResourceType", ":ResourceType"
    -- The "AssetPath" may use string globbing, ie "Characters/*/Fur/:Texture"
    --
    -- These are processed in order, so the first matching group will be used.
    -- Uncategorized assets will be added to groups called "RESOURCETYPE (misc)"

    { "Climate",        0, { "Environments/Climates", "Lighting/" } },
    { "Character",      0, { "Characters/:Mesh", "Characters/:Texture" } },
    { "Env Tex",        0, { "Environments/:Texture" } },
    { "Env Mesh",       0, { "Environments/:Mesh" } },
    { "ParticleTx",     5, { "Effects/", "Particles/" } },
    { "UI",            10, { "UI/" } },
    { "Lighting",       0, { ":InstanceVertexData" } },

    -- { "AmbMesh",        0, { ":AmbMeshResource" } },
    -- { "QuadTerrain",    0, { ":QuadTileData", ":RndTileData" } },

    -- These are done automatically for you
    -- { "Mesh",           0, { ":Mesh" } },
    -- { "Texture",        0, { ":Texture" } },
}

-- GPU budgets
gpuBudgets = {
    -- Format is { "Pass Name", budgetMilliseconds }
    -- The pass names must match those use in SceneFrame/etc, or will not be used

    { "Z Pass",         1.5 },
    { "Shadow Maps",    1.75 },
    { "Opaque",         7.0 },
    { "Transparent",    5.0 },
    --{ "Effects",        1.0 },
    { "Bloom",          2.5 },
    { "Lights",         3.0 },
    { "Flash",          0.5 },
    -- { "Post",        0.0 },
}

-- Resource logging
enableResourceLog = false
resourceLogFile = "resourceLog.rsl"

-- Set to false to disallow IntermediateData; for HOFs
UseIntermediateData = false
-- Set to false to disallow XXXMunged; for testing packfiles
UseMungedData = true
-- Register all packfiles in XXXMunged/P/ on startup
UsePackfiles = true
-- If packfiles are enabled, discard asset names
DiscardAssetNames = true
UseElevatorIo = true
UseHdCache = false
UseInstall = false
-- Set to true to use kLocWrite\u instead of cache0:\ for utility partition
UseDevFriendly360Hd = true

WarnOnForbiddenPackfiles = true

-- If UseIntermediateData=true, the items you list here will be taken from
-- IntermediateData.  Items can either be directory names like 'Worlds' or
-- 'Characters/Bipeds/A01_Avatar' or resource names like '*Effect' or '*Stance'.
--
-- IncludeInIntermediateData = { 'Characters/Bipeds/A01_Avatar', '*Stance' }

-- Amount of memory (megabytes) to keep for the texture scythe
if PLATFORM == 'PS3' then
    requiredResourceMem = 8.0
elseif PLATFORM == '360' then
    requiredResourceMem = 12.0
else -- PC
    requiredResourceMem = 0.0
end

-- Amount of resource memory (megabytes) to allocate within managed pool
if PLATFORM == 'PS3' then
    managedResourceMem = 168.0
elseif PLATFORM == '360' then
    managedResourceMem = 208.0
else -- PC
    managedResourceMem = 0.0
end

-- Hold new and moved blocks for N frames before moving them again (set 0 to disable this feature)
-- Possible fix for resource defrag corruption issues (meshes and textures)
managedResourceMemDelay = 2

-- Set this to true to disable the automatic resource unload when unlocking brings the reference count to 0
disableUnloadOnUnlock = false

-- Set this to true to warn whenever a blocking request is made on an un-clumped non-trivial asset
warnOnUnreferencedBlockingGet = false

-- Set this to true to enable clump "priming" (makes tile shift faster in exchange for longer startup)
primeClumps = false

-- Set this to false to skip waiting for all streaming resources to load when the screen is faded to black.
-- This will make the game start up faster, but visual assets will pop in as they load.
loadAllOnFadeOut = true

-- Set to false to disable cancel triggers
enableCancelTriggers = true

-- Set this to true to enable memory display in HUD
bEnableHUDMemory = false

-- Turning off compiled prototypes is not recommended except when debugging.
enableCompiledPrototypes=true

-- debug stuff
DisableVoiceLoad=false

