Guest User

BF3

a guest
Nov 4th, 2011
666
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 103.53 KB | None | 0 0
  1. --[[
  2. Scripts/Game/BugCommands.lua
  3. ]]--
  4.  
  5. Commands =
  6. {
  7. -- Bug needed for when using Trigger bug in B4Bug, info is used for all bugs
  8. StandardB4BugBug =
  9. {
  10. Name = "Standard B4Bug bug",
  11. Title = "Venice",
  12. Menu = "Bugs",
  13. AutoB4Bug = true,
  14. IsStandardBug = true,
  15.  
  16. Information =
  17. {
  18. "Field" , "Issue Type" , "Bug",
  19. "Field" , "Priority" , "Minor (C, V3, L3)",
  20. "Field" , "Assignee" , "Automatic",
  21. "Field" , "Report Method" , "B4Bug",
  22. "Field" , "Milestone Hindering" , "None",
  23. "Field" , "Language" , "English",
  24. "Field" , "User Path" , "Probable",
  25. "RPCGet", "Game Level" , "LocalPlayer.getClientLevelName",
  26.  
  27. "Field" , "Description" , "\
  28. Soldier position: ",
  29. "RPCGet", "Description" , "LocalPlayer.getPlayerPosition",
  30. "Field" , "Description" , "\
  31. Current camera position: ",
  32. "RPCGet", "Description" , "DebugCam.getCurrentCameraPosition",
  33.  
  34. "Field" , "Environment" , "\
  35. OS Version: ",
  36. "RPCGet", "Environment" , "BugManager.getOSInfo",
  37. "Field" , "Environment" , "\
  38. GPU description: ",
  39. "RPCGet", "Environment" , "DxRenderer.AdapterDescription",
  40. "Field" , "Environment" , "\
  41. GPU driver version: ",
  42. "RPCGet", "Environment" , "DxRenderer.AdapterDriverVersion",
  43.  
  44. "RPCGet", "Platform" , "BugManager.getPlatform",
  45. "RPCGet", "Reported By (Game Team)" , "BugManager.getReportedBy",
  46. "RPCGet", "Found in Change List (Game)" , "BugManager.getChangelist",
  47. "RPCGet", "Found in Change List (Frostbite)" , "BugManager.getFrostbiteChangelist",
  48. "RPCGet" , "Juice Session ID" , "BugManager.getjuiceSessionId",
  49. }
  50. },
  51.  
  52. TestBug1 =
  53. {
  54. Name = "Testbug",
  55. Title = "Venice",
  56. Menu = "Bugs",
  57. AutoB4Bug = true,
  58.  
  59. Information =
  60. {
  61. },
  62.  
  63. RPCs =
  64. {
  65. },
  66. },
  67.  
  68. TestCommand1 =
  69. {
  70. Name = "Testcommand 1",
  71. Title = "Venice",
  72. Menu = "QA Commands",
  73. AutoB4Bug = false,
  74.  
  75. RPCs =
  76. {
  77. "DebugRender.DrawStatsEnable 1",
  78. "UI.DrawEnable 0",
  79. },
  80.  
  81. ReverseRPCs =
  82. {
  83. "DebugRender.DrawStatsEnable 0",
  84. "UI.DrawEnable 1",
  85. },
  86. },
  87.  
  88. TestCommand2 =
  89. {
  90. Name = "Testcommand 2",
  91. Title = "Venice",
  92. Menu = "QA Commands",
  93. AutoB4Bug = false,
  94.  
  95. RPCs =
  96. {
  97. "Debug.DrawScreenCenterHelper 1",
  98. "Render.ForceFov 100",
  99. },
  100.  
  101. ReverseRPCs =
  102. {
  103. "Debug.DrawScreenCenterHelper 0",
  104. "Render.ForceFov 65",
  105. },
  106. },
  107.  
  108. AnimationCommand1 =
  109. {
  110. Name = "Animation Test",
  111. Title = "Venice",
  112. Menu = "Animation",
  113. AutoB4Bug = false,
  114.  
  115. RPCs =
  116. {
  117. "AntDebug.DrawDebugInfo 1",
  118. "AntDebug.DrawSignals 1",
  119. "UI.DrawEnable 0",
  120. },
  121.  
  122. ReverseRPCs =
  123. {
  124. "AntDebug.DrawDebugInfo 0",
  125. "AntDebug.DrawSignals 0",
  126. "UI.DrawEnable 1",
  127. },
  128. },
  129.  
  130. WeaponCommand1 =
  131. {
  132. Name = "Show weapon info",
  133. Title = "Venice",
  134. Menu = "Weapons",
  135. AutoB4Bug = false,
  136.  
  137. RPCs =
  138. {
  139. "AntDebug.DrawDebugInfo 1",
  140. "Debug.DrawScreenCenterHelper 1",
  141. "clientsoldier.debug.firingstats 1",
  142. },
  143.  
  144. ReverseRPCs =
  145. {
  146. "AntDebug.DrawDebugInfo 0",
  147. "Debug.DrawScreenCenterHelper 0",
  148. "clientsoldier.debug.firingStats 0",
  149. },
  150. },
  151. }
  152.  
  153. --[[
  154. Scripts/Game/Configure.lua
  155. ]]--
  156.  
  157. --
  158. -- Game configuration script
  159. --
  160.  
  161. -- Local helper functions
  162. function commandLine:lookup(name, default)
  163. local value = self[string.lower(name)]
  164.  
  165. return value or default
  166. end
  167.  
  168. local function cmdLineSwitch(switchName, fieldName, inTable)
  169. local table = inTable or Game
  170.  
  171. if (commandLine:lookup(switchName)) then
  172. table[fieldName] = true
  173. end
  174. end
  175.  
  176. function cmdLineOption(optionName, default)
  177. return commandLine:lookup(optionName, default)
  178. end
  179.  
  180. local function readCfg(name)
  181. log:debug("reading cfg: " .. name)
  182. core.readKeyValueCfg(name, _G)
  183. end
  184.  
  185. local function applySettings(settings)
  186. core.parseKeyValueCfgString(settings, _G)
  187. end
  188.  
  189. -- Basic settings
  190.  
  191. core.import("Scripts/Game/Settings.lua")
  192.  
  193. -- Import old-school cfg files for backwards compatibility
  194. local defaultConfigFile = commandLine:lookup("defaultConfig")
  195. if defaultConfigFile then
  196. readCfg(defaultConfigFile)
  197. else
  198. readCfg("Scripts/Game.cfg")
  199. end
  200.  
  201. --------------------------------------------------------------------------
  202. -- Handle any Drone override options
  203. --
  204.  
  205. for i,v in ipairs(commandLine) do
  206. if string.lower(v) == "-customconfig" then
  207. if commandLine[i+1]:find("/") then
  208. readCfg(commandLine[i+1])
  209. else
  210. readCfg("Scripts/" .. commandLine[i+1])
  211. end
  212. end
  213. end
  214.  
  215. local editorActive = false
  216. local liveEditingEnable = commandLine:lookup("core.liveeditingenable")
  217. if liveEditingEnable then
  218. if liveEditingEnable == "1" or liveEditingEnable == "true" then
  219. editorActive = true
  220. end
  221. end
  222.  
  223. --------------------------------------------------------------------------
  224. -- Handle local overrides
  225. --
  226. -- This needs to run before we load the level cfg as we can specify the fast startup level name here!
  227.  
  228. if not commandLine:lookup(\'noLocalCfg\', false) then
  229. -- Read common local cfg file
  230. readCfg("/local/local.cfg", _G)
  231.  
  232. if editorActive == true then
  233. -- Read local cfg with editor specific settings
  234. readCfg("/local/localeditor.cfg", _G)
  235. else
  236. -- Read local cfg with standalone specific settings
  237. readCfg("/local/localgame.cfg", _G)
  238. end
  239. end
  240.  
  241. --------------------------------------------------------------------------
  242. -- Handle level specific configuration
  243. --
  244.  
  245. local levelName = commandLine:lookup("level")
  246. if not levelName then
  247. local gameTable = _G["Game"]
  248. if gameTable then
  249. levelName = gameTable["Level"]
  250. end
  251. end
  252.  
  253. -- Level names without slashes are assumed to be shorthand for
  254. -- Levels/name/name to go with Venice\'s epic level naming convention
  255. if levelName and not string.find(levelName, "/") then
  256. levelName = "Levels/" .. levelName .. "/" .. levelName
  257. end
  258.  
  259. if levelName then
  260. readCfg(levelName .. ".cfg")
  261. end
  262.  
  263. --------------------------------------------------------------------------
  264. -- Handle commandline options
  265. --
  266. -- Commandline options effectively override any settings specified
  267. -- elsewhere.
  268. --
  269.  
  270. if not Game then Game = {} end
  271.  
  272. cmdLineSwitch("verbose", "Verbose")
  273.  
  274. if Game.Verbose then
  275. print "------------Commandline parameters:"
  276. for k,v in pairs(commandLine) do print (k,v) end
  277. end
  278.  
  279. -- Handle <Table>.<Member> settings
  280.  
  281. if allowCommandlineSettings then
  282. for _,option in ipairs(commandLine) do
  283. local table,member = string.match(option, "^%-(%w+)%.(%w+)")
  284.  
  285. if table and member then
  286. local value = commandLine[_ + 1]
  287. if not _G[table] then _G[table] = {} end
  288. _G[table][member] = value
  289. else
  290. local varName = string.match(option, "^%-([%w-]+)")
  291. if varName then
  292. local value = commandLine[_ + 1]
  293. if value then
  294. _G[varName] = value
  295. end
  296. end
  297. end
  298.  
  299. end
  300. end
  301.  
  302. --------------------------------------------------------------------------
  303. -- Force specific settings when running through FrostEd
  304. --
  305.  
  306. if editorActive then
  307. Online.Backend = "Backend_Lan"
  308. Online.UseFallback = true
  309. Client.IsPresenceEnabled = false
  310. Server.IsPresenceEnabled = false
  311.  
  312. applySettings([=[
  313. Server.forceStartMapOnLoad true
  314. Network.GhostCountWarning true
  315. Network.GhostCountWarningInfo true
  316. Game.DisablePreRound true
  317. ]=])
  318. end
  319.  
  320. --
  321.  
  322. core.import("Scripts/Game/DebugSettings.lua")
  323.  
  324.  
  325. --[[
  326. Scripts/Game/DebugSettings.lua
  327. ]]--
  328.  
  329. core = require "Frost.Core"
  330. logging = require "Frost.Logging"
  331.  
  332. local function applySettings(settings)
  333. core.parseKeyValueCfgString(settings, _G) end
  334.  
  335. -- helpers
  336.  
  337. local function getSetting(key)
  338. container, field = string.match(key, "(%w+)%.(%w+)");
  339. if container and field then
  340. if not _G[container] then
  341. _G[container] = {}
  342. end
  343. return _G[container][field]
  344. else
  345. return _G[key]
  346. end
  347. end
  348.  
  349. local function setSetting(key, value)
  350. container, field = string.match(key, "(%w+)%.(%w+)");
  351. if container and field then
  352. if not _G[container] then
  353. _G[container] = {}
  354. end
  355. _G[container][field] = value
  356. else
  357. _G[key] = value
  358. end
  359. end
  360.  
  361. -- thin-client settings: 0=Off 1=Console
  362.  
  363. setSetting("thin-client", cmdLineOption("thinClient", getSetting("thin-client")))
  364.  
  365. if getSetting("thin-client") == "1" then
  366. applySettings([=[
  367. RenderDevice.CreateMinimalWindow true
  368. Core.HardwareProfile Hardware_Low
  369. Core.HardwareGpuBias -1
  370. Server.DebrisClusterEnabled true
  371. Client.DebrisClusterEnabled false
  372. DebrisSystem.Enable false
  373. Client.WorldRenderEnabled false
  374. Client.EmittersEnabled false
  375. Client.TerrainEnabled false
  376. Client.MeshMergingEnabled false
  377. Client.OvergrowthEnabled false
  378. Client.OccludersEnabled true
  379. Decal.SystemEnable false
  380. Render.DebugRendererEnable false
  381. UI.HudEnable false
  382. UI.System UISystem_None
  383. EmitterSystem.Enable false
  384. Window.Fullscreen false
  385. Render.Enable false
  386. disable-input true
  387. scripted-input true
  388. use-script-input true
  389. disable-client-correction true
  390. disable-client-animations true
  391. Sound.Enable false
  392. disable-entities true
  393. disable-camera true
  394. Texture.LoadingEnabled false
  395. Texture.RenderTexturesEnabled false
  396. Mesh.LoadingEnabled false
  397. ShaderSystem.DatabaseLoadingEnable false
  398. disable-audio-loading true
  399. GameTime.ForceUseSleepTimer true
  400. ShaderSystem.DxFrameVertexBufferPoolSize 16
  401. ShaderSystem.FrameMemoryBufferSize 16
  402. PerformanceTracker.Enabled false
  403. ]=])
  404. end
  405.  
  406. -- testingEnabled 0=Off, 1=On
  407.  
  408. setSetting("testing-enabled", cmdLineOption("testingEnabled", getSetting("testing-enabled")))
  409.  
  410. if getSetting("testing-enabled") == "1" then
  411. applySettings([=[
  412. Server.EnableMonkeyTestLayers true
  413. add-debug-entity true
  414. scripted-input true
  415. use-script-input true
  416. Juice.logClientTestingEvents true
  417. ]=])
  418. end
  419.  
  420. --[[
  421. Scripts/Game/Settings.lua',
  422. ]]--
  423.  
  424. --
  425. -- Define basic settings tables
  426. --
  427.  
  428. Game = {
  429. LogFileEnable = true,
  430. }
  431.  
  432. Client = {
  433. }
  434.  
  435. Server = {
  436. }
  437.  
  438. ShaderSystem = {
  439. DebugNonFiniteColor = { x=0, y=0, z=0 },
  440. }
  441.  
  442. NetworkSettings = {
  443. Version = "V0.0",
  444. ProtocolVersion = 0,
  445. TitleId = 4,
  446. ClientPort = 1001,
  447. ServerPort = 1003,
  448. MaxGhostCount = 1024,
  449. MaxClientCount = 64,
  450. }
  451.  
  452. Core = {
  453. }
  454.  
  455. --[[
  456. Scripts/Game/Startup.lua
  457. ]]--
  458.  
  459. --
  460. -- Game startup script
  461. --
  462.  
  463. require "vfs"
  464. core = require "Frost.Core"
  465. logging = require "Frost.Logging"
  466.  
  467. -- The global platform variable can be used to detect which platform
  468. -- we are currently executing on
  469.  
  470. platform = dice.getCurrentPlatformName()
  471.  
  472. -- Set up a logger which logs to the console (not stdout)
  473. -- By default, we only show warnings or worse. For more verbose
  474. -- diagnostics, you may set the level to INFO or DEBUG.
  475.  
  476. log = logging.ingameConsole()
  477. log:setLevel(logging.DEBUG)
  478.  
  479. core.import("Scripts/Game/Configure.lua")
  480.  
  481. --[[
  482. Scripts/GlobalSettings.lua',
  483. ]]--
  484.  
  485. --
  486. -- Global Settings
  487. --
  488. -- These are front-end settings exposed to the end-user. The idea is that
  489. -- settings that are interesting to the majority of end-users should be
  490. -- defined here to enable tools to query for exposed options.
  491. --
  492. -- This file is imported by Pipeline, Game, etc
  493. --
  494. -- *********************************************************
  495. -- NOTE: This is largely deprecated and will be phased out!
  496. -- *********************************************************
  497.  
  498. GlobalSettings = {}
  499. GlobalSettings.Meta = {}
  500.  
  501. local function ValidateSetting(name, value)
  502. assert(name and value)
  503.  
  504. local meta = GlobalSettings.Meta[name]
  505. local lowerValue = string.lower(value)
  506.  
  507. if meta then
  508. for _,v in ipairs(meta.validValues) do
  509. if string.lower(v[1]) == lowerValue then
  510. return v[1]
  511. end
  512. end
  513.  
  514. -- We intentionally don\'t build this string in the loop above
  515. -- in an attempt to generate less ephemeral garbage
  516.  
  517. local choices = nil
  518.  
  519. for _,v in ipairs(meta.validValues) do
  520. if choices then
  521. choices = choices .. ", " .. v[1]
  522. else
  523. choices = v[1]
  524. end
  525. end
  526.  
  527. error("Setting \'" .. name .. "\' cannot be set to specified value: " .. value .. ", valid values are " .. choices)
  528. else
  529. error("Undefined setting - \'" .. name .. "\'")
  530. end
  531. end
  532.  
  533. local function DefineSetting(descriptionTable)
  534. assert(descriptionTable[1] and descriptionTable[2], "Settings must have name and default values!")
  535.  
  536. local name = descriptionTable[1];
  537. local defaultValue = descriptionTable[2];
  538.  
  539. GlobalSettings[name] = defaultValue
  540. GlobalSettings.Meta[name] = {}
  541.  
  542. GlobalSettings.Meta[name].default = defaultValue
  543.  
  544. if descriptionTable.description then
  545. GlobalSettings.Meta[name].description = descriptionTable.description
  546. end
  547.  
  548. if descriptionTable.validValues then
  549. GlobalSettings.Meta[name].validValues = descriptionTable.validValues
  550. end
  551.  
  552. if descriptionTable.commandLine then
  553. GlobalSettings.Meta[name].commandLine = descriptionTable.commandLine
  554. end
  555.  
  556. if descriptionTable.envVar then
  557. GlobalSettings.Meta[name].envVar = descriptionTable.envVar
  558. end
  559.  
  560. -- Validate default vs validValues
  561. ValidateSetting(name, defaultValue)
  562. end
  563.  
  564. function ApplyCommandLineSettings(commandLine)
  565. for setting,meta in pairs(GlobalSettings.Meta) do
  566. if meta.commandLine then
  567. local options = meta.commandLine
  568.  
  569. for _,entry in ipairs(options) do
  570. local k = entry[1]
  571. local v = entry[2]
  572.  
  573. local value = commandLine[string.lower(k)]
  574.  
  575. if value then
  576. if not v then
  577. SetSetting(setting, value, string.format(" (due to -%s %s)", k, value))
  578. else
  579. SetSetting(setting, v, string.format(" (due to -%s)", k))
  580. end
  581. end
  582. end
  583. end
  584. end
  585. end
  586.  
  587. function ApplyEnvironmentVariableSettings()
  588. for setting,meta in pairs(GlobalSettings.Meta) do
  589. if meta.envVar then
  590. local envVarValue = os.getenv(meta.envVar)
  591.  
  592. if envVarValue then
  593. SetSetting(setting, envVarValue)
  594. end
  595. end
  596. end
  597. end
  598.  
  599.  
  600. function SetSetting(settingName, value, source)
  601. if not GlobalSettings[settingName] then
  602. error("Attempted set of unknown setting \'" .. settingName .. "\'")
  603. else
  604. GlobalSettings[settingName] = ValidateSetting(settingName, value)
  605.  
  606. if log then
  607. log:debug("Set setting " .. settingName .. " to value: " .. value .. (source or ""))
  608. end
  609. end
  610. end
  611.  
  612. function GetGlobalSetting(settingName)
  613. if not GlobalSettings[settingName] then
  614. error("Attempted get of unknown setting \'" .. settingName .. "\'")
  615. else
  616. return GlobalSettings[settingName]
  617. end
  618. end
  619.  
  620. --------------------------------------------------------------------------
  621. -- Setting definitions
  622. --
  623.  
  624. DefineSetting {
  625. "Cache", "Enabled",
  626.  
  627. validValues = {
  628. { "Enabled", "Normal cache mode" },
  629. { "Disabled", "No caching" },
  630. { "ReadOnly", "Only read from caches (never upload)" },
  631. { "WriteOnly", "Only write to caches (useful for fixing problems)" }
  632. },
  633. description = "Cache Control",
  634. commandLine = {
  635. { "cacheMode" },
  636. { "nocache", "Disabled" },
  637. { "readonlyCache", "ReadOnly" },
  638. { "writeOnlyCache", "WriteOnly" },
  639. { "cache", "Enabled" }
  640. },
  641. envVar = "PIPELINE_CACHE_MODE"
  642. }
  643.  
  644. --[[
  645. Scripts/Packages/Frost/Core.lua
  646. ]]--
  647.  
  648. --
  649. -- Various bits of Lua scaffolding
  650. --
  651.  
  652. require "os"
  653. require "vfs"
  654.  
  655. module("Frost.Core", package.seeall);
  656.  
  657. -- Execute a script
  658. --
  659. -- If flags contains a "silent=true" flag, then no message
  660. -- will be emitted if the script can\'t be found
  661. --
  662.  
  663. -- Execute a script, optionally returning an error message if it fails
  664.  
  665. function import(script, friendlyName, flags)
  666. local name = friendlyName or script
  667.  
  668. local success, err = pcall(dofile,script)
  669.  
  670. if not success and not (flags and flags.silent) then
  671. error("Could not import script: " .. name .. " error: " .. err)
  672. end
  673. end
  674.  
  675. -- Execute a new-style config file
  676.  
  677. local function executeCfg(file)
  678. if log then
  679. log:debug(" Executing new style (lua) config file")
  680. end
  681.  
  682. local script = file:read("*all")
  683.  
  684. local func, err = loadstring(script)
  685.  
  686. if func then
  687. func()
  688. else
  689. error(err)
  690. end
  691. end
  692.  
  693. -- Parse a single line containing a key-value pair (and possibly some comments)
  694.  
  695. function parseKeyValueCfgLine(line, targetTable)
  696. -- Remove comments
  697. line = string.gsub(line, "#.*", "")
  698. line = string.gsub(line, "//.*", "")
  699.  
  700. -- Split into key, value pairs
  701. local key, value = string.match(line, "(%S+)%s+(.+)%s*");
  702.  
  703. if key and value then
  704. -- Handle dotted key names
  705. local container, field = string.match(key, "(%w+)%.(%w+)");
  706.  
  707. if container and field then
  708. if not targetTable[container] then
  709. targetTable[container] = {}
  710. end
  711.  
  712. targetTable[container][field] = value;
  713.  
  714. if log then
  715. log:debug(string.format("set %s.%s = %s (from key-value cfg line)", container, field, value))
  716. end
  717. else
  718. targetTable[key] = value;
  719.  
  720. if log then
  721. log:debug(string.format("set %s = %s (from key-value cfg line)", key, value))
  722. end
  723. end
  724. end
  725. end
  726.  
  727. -- Parse a string of key-value config entries
  728.  
  729. function parseKeyValueCfgString(str, targetTable)
  730. for line in string.gmatch(str, "[^\
  731. ]*") do
  732. parseKeyValueCfgLine(line, targetTable)
  733. end
  734. end
  735.  
  736. -- Parse an old-style key-value CFG file
  737.  
  738. function readKeyValueCfg(file, targetTable)
  739. if log then
  740. log:debug("Reading cfg \'" .. file .. "\'")
  741. end
  742.  
  743. local f = vfs.open(file, "r")
  744.  
  745. if not f then
  746. -- File not found
  747. if log then
  748. log:debug("Failed to find file \'" .. file .. "\'")
  749. end
  750.  
  751. return
  752. end
  753.  
  754. local firstLine = true
  755.  
  756. while true do
  757. local line = f:read("*line")
  758.  
  759. if not line then
  760. break
  761. end
  762.  
  763. if firstLine and line == "#!/bin/lua" then
  764. executeCfg(f)
  765. end
  766.  
  767. parseKeyValueCfgLine(line, targetTable)
  768. end
  769.  
  770. f:close();
  771. end
  772.  
  773. --[[
  774. Scripts/Packages/Frost/Logging.lua
  775. ]]--
  776.  
  777. local type, table, string, assert, _tostring = type, table, string, assert, tostring
  778.  
  779. require "vfs"
  780.  
  781. module("Frost.Logging", package.seeall)
  782.  
  783. -- The DEBUG Level designates fine-grained informational events that are most
  784. -- useful to debug an application
  785. DEBUG = "DEBUG"
  786.  
  787. -- The INFO level designates informational messages that highlight the
  788. -- progress of the application at coarse-grained level
  789. INFO = "INFO"
  790.  
  791. -- The WARN level designates potentially harmful situations
  792. WARN = "WARN"
  793.  
  794. -- The ERROR level designates error events that might still allow the
  795. -- application to continue running
  796. ERROR = "ERROR"
  797.  
  798. -- The FATAL level designates very severe error events that will presumably
  799. -- lead the application to abort
  800. FATAL = "FATAL"
  801.  
  802. local LEVEL = {
  803. [DEBUG] = 1,
  804. [INFO] = 2,
  805. [WARN] = 3,
  806. [ERROR] = 4,
  807. [FATAL] = 5,
  808. }
  809.  
  810.  
  811. -------------------------------------------------------------------------------
  812. -- Creates a new logger object
  813. -------------------------------------------------------------------------------
  814. function new(append)
  815.  
  816. if type(append) ~= "function" then
  817. return nil, "Appender must be a function."
  818. end
  819.  
  820. local logger = {}
  821. logger.level = DEBUG
  822. logger.append = append
  823.  
  824. logger.setLevel = function (self, level)
  825. assert(LEVEL[level], string.format("undefined level `%s\'", tostring(level)))
  826. self.level = level
  827. end
  828.  
  829. logger.log = function (self, level, message)
  830. assert(LEVEL[level], string.format("undefined level `%s\'", tostring(level)))
  831. if LEVEL[level] < LEVEL[self.level] then
  832. return
  833. end
  834. if type(message) ~= "string" then
  835. message = tostring(message)
  836. end
  837. return logger:append(level, message)
  838. end
  839.  
  840. logger.debug = function (logger, message) return logger:log(DEBUG, message) end
  841. logger.info = function (logger, message) return logger:log(INFO, message) end
  842. logger.warn = function (logger, message) return logger:log(WARN, message) end
  843. logger.error = function (logger, message) return logger:log(ERROR, message) end
  844. logger.fatal = function (logger, message) return logger:log(FATAL, message) end
  845. return logger
  846. end
  847.  
  848.  
  849. -------------------------------------------------------------------------------
  850. -- Prepares the log message
  851. -------------------------------------------------------------------------------
  852. function prepareLogMsg(pattern, dt, level, message)
  853.  
  854. local logMsg = pattern or "%date %level %message\
  855. "
  856. message = string.gsub(message, "%%", "%%%%")
  857. logMsg = string.gsub(logMsg, "%%date", dt)
  858. logMsg = string.gsub(logMsg, "%%level", level)
  859. logMsg = string.gsub(logMsg, "%%message", message)
  860. return logMsg
  861. end
  862.  
  863.  
  864. -------------------------------------------------------------------------------
  865. -- Converts a Lua value to a string
  866. --
  867. -- Converts Table fields in alphabetical order
  868. -------------------------------------------------------------------------------
  869. function tostring(value)
  870. local str = \'\'
  871.  
  872. if (type(value) ~= \'table\') then
  873. if (type(value) == \'string\') then
  874. str = string.format("%q", value)
  875. else
  876. str = _tostring(value)
  877. end
  878. else
  879. local auxTable = {}
  880. table.foreach(value, function(i, v)
  881. if (tonumber(i) ~= i) then
  882. table.insert(auxTable, i)
  883. else
  884. table.insert(auxTable, tostring(i))
  885. end
  886. end)
  887. table.sort(auxTable)
  888.  
  889. str = str..\'{\'
  890. local separator = ""
  891. local entry = ""
  892. table.foreachi (auxTable, function (i, fieldName)
  893. if ((tonumber(fieldName)) and (tonumber(fieldName) > 0)) then
  894. entry = tostring(value[tonumber(fieldName)])
  895. else
  896. entry = fieldName.." = "..tostring(value[fieldName])
  897. end
  898. str = str..separator..entry
  899. separator = ", "
  900. end)
  901. str = str..\'}\'
  902. end
  903. return str
  904. end
  905.  
  906. --
  907. -- Print appender
  908. --
  909.  
  910. function console(logPattern)
  911.  
  912. return new( function(self, level, message)
  913. print(prepareLogMsg(logPattern, os.date(), level, message))
  914. return true
  915. end
  916. )
  917. end
  918.  
  919. function ingameConsole()
  920.  
  921. return new( function(self, level, message)
  922. ingamePrint(level, message)
  923. return true
  924. end
  925. )
  926. end
  927.  
  928. --[[
  929. Scripts/Pipeline/Configuration.lua
  930. ]]--
  931.  
  932. --
  933. -- Pipeline Configuration
  934. --
  935. -- This is an internal script used for configuring the pipeline. Normal
  936. -- users should typically not edit this file, as most end-user settings
  937. -- are exposed through the GlobalSettings.lua file
  938. --
  939.  
  940. --
  941. -- Import common settings
  942. --
  943.  
  944. core.import(allScriptsRoot .. "GlobalSettings.lua", "global settings");
  945.  
  946. -- Import session startup script, if specified on commandLine
  947. --
  948. -- This is used by Drone to change settings
  949.  
  950. if commandLine.startupscript then
  951. core.import("/data/" .. commandLine.startupScript, _G)
  952. end
  953.  
  954. core.import(scriptsRoot .. "Settings.lua")
  955.  
  956. -- -config commandLine switch is used by Drone to configure custom settings
  957. if commandLine.config then
  958. core.readKeyValueCfg("/data/Scripts/" .. commandLine.config, _G)
  959. end
  960.  
  961. --------------------------------------------------------------------------
  962. -- Handle commandline options
  963. --
  964. -- Commandline options effectively override any settings specified
  965. -- elsewhere.
  966. --
  967.  
  968. local function cmdLineSwitch(switchName, fieldName)
  969. if (commandLine[string.lower(switchName)]) then
  970. Pipeline[fieldName] = true
  971. end
  972. end
  973.  
  974. local function cmdLineArg(switchName, fieldName)
  975. local entry = commandLine[string.lower(switchName)]
  976.  
  977. if (entry) then
  978. Pipeline[fieldName] = entry
  979. --print("Set " .. fieldName .. " to " .. entry)
  980. end
  981. end
  982.  
  983. cmdLineSwitch("debug", "DebugMode");
  984. cmdLineSwitch("validateData", "ValidateData");
  985. cmdLineSwitch("addToPerforce", "AddToPerforce");
  986. cmdLineSwitch("noconsole", "NoConsole");
  987. cmdLineSwitch("verbose", "Verbose");
  988. cmdLineSwitch("trace", "EnableTracing");
  989. cmdLineSwitch("nohal", "DisableHalDevice");
  990. cmdLineSwitch("trim", "TrimLayout");
  991. cmdLineSwitch("updateIndex", "UpdateIndexOnly");
  992.  
  993. cmdLineArg("opfilter", "OpFilter")
  994.  
  995. --
  996. -- Parse commandline options that may occur multiple times ("list" options)
  997. --
  998.  
  999. ----------------------------------------------------------------------------------------
  1000. --
  1001. -- Diagnostics dump
  1002. --
  1003.  
  1004. if Pipeline.Verbose then
  1005. print ""
  1006. print "Pipeline settings summary:"
  1007. print "------------------------------------------------------"
  1008.  
  1009. for k,v in pairs(Pipeline) do
  1010. print(k, v)
  1011. end
  1012.  
  1013. print ""
  1014.  
  1015. print "Command line:"
  1016. print "------------------------------------------------------"
  1017.  
  1018. for _,v in pairs(commandLine) do
  1019. print(_,v)
  1020. end
  1021.  
  1022. print ""
  1023. end
  1024.  
  1025. --[[
  1026. Scripts/Pipeline/Settings.lua
  1027. ]]--
  1028.  
  1029. --
  1030. -- Internal Pipeline settings
  1031. --
  1032. -- This is not really the best place to change settings locally,
  1033. -- please see GlobalSettings.lua instead and use it if at all
  1034. -- possible
  1035. --
  1036.  
  1037. local Dx10PathEnable = false
  1038. local Dx10PlusPathEnable = true
  1039. local Dx10Dot1PathEnable = false
  1040. local Dx11PathEnable = true
  1041. local AutoPathEnable = false
  1042. local SkipAllPaths = false
  1043.  
  1044. Pipeline =
  1045. {
  1046. Verbose = false,
  1047. Rebuild = false,
  1048. ShowReason = true,
  1049. AddToPerforce = false,
  1050.  
  1051. -- Debugging/profiling options
  1052. Profiler = false,
  1053. DebugMode = false,
  1054. EmitPlaintextDbx = false,
  1055. EnableTimingLog = false,
  1056. BundleDebugging = false,
  1057. ResourceDebugging = false,
  1058.  
  1059. AsyncOpWrite = true,
  1060. DumpOplogStats = false,
  1061.  
  1062. --ServiceMode = true,
  1063. }
  1064.  
  1065. --------------------------------------------------------------
  1066.  
  1067. Core =
  1068. {
  1069. LogLevel = "Info",
  1070. StudioBus = "[email protected]" -- dice-bm150
  1071. }
  1072.  
  1073. Ant =
  1074. {
  1075. -- Setting this to true sometimes breaks reimport
  1076. ShowSyncDialogOnReimport = false,
  1077. }
  1078.  
  1079. Havok =
  1080. {
  1081. WriteShapeLog = false,
  1082. WriteMemoryLog = false,
  1083. WriteMaterialsLog = false,
  1084. ErrorOnStaticValidationError = true,
  1085. DetailExport = true,
  1086. LogTriangleDensity = true,
  1087. HavokImportVersion = 1,
  1088. }
  1089.  
  1090. HavokGroupPhysicsEntity =
  1091. {
  1092. WriteShapeLog = false,
  1093. WriteMemoryLog = false,
  1094. WriteMaterialsLog = false,
  1095. WriteGroupGeneralLog = false,
  1096. WritePartInfoLog = false,
  1097. ErrorOnStaticValidationError = true,
  1098. DetailExport = true,
  1099. LogTriangleDensity = true,
  1100. HavokImportVersion = 1,
  1101.  
  1102. AllowDefaultCollisionShape = true
  1103. }
  1104.  
  1105. Texture =
  1106. {
  1107. SkipMipmapsPs3Enable = true,
  1108. CudaEnable = true,
  1109. WaitOnCudaEnable = false,
  1110. MultithreadedCompressionEnable = true,
  1111. DefaultTextureGroup = "TextureGroups/Default";
  1112. }
  1113.  
  1114. ObjectBlueprint =
  1115. {
  1116. AllowDefaultPartMaterial = true,
  1117. AllowDefaultEntityMaterial = true,
  1118. }
  1119.  
  1120. BlueprintImport =
  1121. {
  1122. UseDefaultRaycastRoot = false,
  1123. OptimizeGeometries = true,
  1124. ErrorOnSceneMismatch = true,
  1125. }
  1126.  
  1127. Mesh =
  1128. {
  1129. Verbose = false,
  1130. ZOnlyMeshEnable = true,
  1131. Ps3EdgeEnable = true,
  1132. Ps3EdgeCompressPositionsEnable = true,
  1133. Ps3EdgeCompressIndicesEnable = true,
  1134. Ps3EdgeMinSubsetTriangleCount = 0,
  1135.  
  1136. MinStreamingLodSize = 0,
  1137.  
  1138. SootSkipShaderNames =
  1139. {
  1140. "Template",
  1141. "Tmpl",
  1142. "NoSoot"
  1143. },
  1144. WarningsAsErrorsEnable = false,
  1145.  
  1146. -- EnlightenSaveInputMeshEnable = true,
  1147. -- RadiosityPixelSize_Lower = 16.0,
  1148. -- RadiosityPixelSize_Lowest = 8.0,
  1149. -- RadiosityPixelSize_Low = 4.0,
  1150. -- RadiosityPixelSize_Medium = 2.0,
  1151. -- RadiosityPixelSize_High = 1.0,
  1152. -- RadiosityPixelSize_Higher = 0.5,
  1153. -- RadiosityPixelSize_Max = 0.25,
  1154. }
  1155.  
  1156. Enlighten =
  1157. {
  1158. -- Set this to false to prevent any dynamic enlighten data from beeing built and loaded into the game.
  1159. -- This is useful for retail builds if only static enlighten data is allowed.
  1160. DynamicEnable = true,
  1161. }
  1162.  
  1163. Level =
  1164. {
  1165. VoAnimTreesEnable = false,
  1166.  
  1167. GroupTreeModelEntities = true,
  1168. GroupStaticModelEntities = true,
  1169. GroupMiddlegrowthModelEntities = true,
  1170.  
  1171. OptimizeMaterialGrid = true,
  1172.  
  1173. LogDetailedInstanceCounts = false
  1174. }
  1175.  
  1176. ShaderState =
  1177. {
  1178. TerrainDebugColorEnable = false,
  1179. TerrainOverdrawModeEnable = false,
  1180. DynamicEnvmapModeEnable = false,
  1181.  
  1182. StripUnusedTextures = true,
  1183.  
  1184. VanillaShadowmapsEnable = false,
  1185. -- CascadedBox3ShadowmapsEnable = true,
  1186. -- CascadedBox4ShadowmapsEnable = true,
  1187. }
  1188.  
  1189. ShaderProgramDatabase =
  1190. {
  1191. ShaderDebugInfoEnable = false,
  1192. DxShaderDebugInfoEnable = false,
  1193.  
  1194. Dx10PathEnable = Dx10PathEnable,
  1195. Dx10PlusPathEnable = Dx10PlusPathEnable,
  1196. Dx10Dot1PathEnable = Dx10Dot1PathEnable,
  1197. Dx11PathEnable = Dx11PathEnable,
  1198. AutoPathEnable = AutoPathEnable,
  1199. SkipAllPaths = SkipAllPaths,
  1200.  
  1201. Ps3OptimizationLevel = 3,
  1202. Ps3BuildRandomizedShaders = false
  1203. }
  1204.  
  1205. ShaderDatabase =
  1206. {
  1207. ShaderDebugInfoEnable = false,
  1208. DxShaderDebugInfoEnable = false,
  1209.  
  1210. Dx10PathEnable = Dx10PathEnable,
  1211. Dx10PlusPathEnable = Dx10PlusPathEnable,
  1212. Dx10Dot1PathEnable = Dx10Dot1PathEnable,
  1213. Dx11PathEnable = Dx11PathEnable,
  1214. AutoPathEnable = AutoPathEnable,
  1215. SkipAllPaths = SkipAllPaths,
  1216.  
  1217. Ps3OptimizationLevel = 3,
  1218. Ps3PackVertexElementsEnable = true,
  1219. Ps3ForceHalfPrecisionEnable = false,
  1220. Ps3ForceVertexDynamicBranchesEnable = false,
  1221. Ps3ForcePixelDynamicBranchesEnable = false,
  1222.  
  1223. ForceCompileInConstantsEnable = true,
  1224. NonFiniteColoringEnable = false,
  1225. ManualSourceChangeEnable = false,
  1226. StateMetricsEnable = false,
  1227. StateSolutionCacheEnable = false,
  1228. SeparateWorldTransformEnable = false
  1229. }
  1230.  
  1231. Terrain =
  1232. {
  1233. SplineDecalsSubdivisionCount = 1,
  1234. MaskFunctionsEnable = false,
  1235. }
  1236.  
  1237. TerrainStreamingTree =
  1238. {
  1239. OptimizeUsingProceduralMask = true
  1240. }
  1241.  
  1242. Award =
  1243. {
  1244. OutputAwardXml = true,
  1245. OutputRankXml = true,
  1246. InvalidAwardCodeCharacters = "-. ",
  1247. AllowEmptyAwardCodes = false,
  1248. CheckStatCategories = true,
  1249. SetSpecificDataToChildAwards = true,
  1250. }
  1251.  
  1252. Persistence =
  1253. {
  1254. OutputXml = true,
  1255. OutputBlazeProperties = true,
  1256. DeltaGameReports = true,
  1257. }
  1258.  
  1259. Unlock =
  1260. {
  1261. ExportUnlocks = true
  1262. }
  1263.  
  1264. EmitterSystem =
  1265. {
  1266. DxAtlasSkipMipmaps = 0,
  1267. Ps3AtlasSkipMipmaps = 0,
  1268. XenonAtlasSkipMipmaps = 0,
  1269. }
  1270.  
  1271. Audio =
  1272. {
  1273. EnableDevelopmentFeatures = false,
  1274. }
  1275.  
  1276. UIActionscriptInjection =
  1277. {
  1278. RemoveTraces = true;
  1279. }
  1280.  
  1281. VeniceLevel =
  1282. {
  1283. GenerateCombatAreaTextures = false;
  1284. }
  1285.  
  1286. GameConfig =
  1287. {
  1288. AnimationProjectPath = "Animations/AntAnimations",
  1289. }
  1290.  
  1291. --[[
  1292. Scripts/Pipeline/Startup.lua
  1293. ]]--
  1294.  
  1295. -- Pipeline startup script
  1296. --
  1297. -- This is executed very early, and can really only be used to
  1298. -- configure settings.
  1299. --
  1300. -- The settings specified here will override any settings in the
  1301. -- legacy settings file pipeline.config
  1302. --
  1303.  
  1304. core = require "Frost.Core"
  1305.  
  1306. require "os"
  1307. require "vfs"
  1308.  
  1309. Environment = {}
  1310.  
  1311. local userName = os.getenv("USERNAME")
  1312.  
  1313. if userName then Environment.UserName = userName end
  1314.  
  1315. branchName = os.getenv("BRANCH_NAME")
  1316.  
  1317. if not branchName then
  1318. error("Configuration error: BRANCH_NAME environment variable not set -- fix the .diceconfig file for this branch!")
  1319. end
  1320.  
  1321. -- This is a verification tag to make sure the script is in sync with runtime
  1322. -- whenever something is changed that requires changes to be present on both
  1323. -- the script end and the runtime end, this should be updated. The value is
  1324. -- just an arbitrary string and has no semantic relevance
  1325.  
  1326. local expectVerificationTag = "22062007"
  1327.  
  1328. if verificationTag ~= expectVerificationTag then
  1329. error("verification tag mismatch! Most likely, your data/Scripts folder is not right for your build!")
  1330. end
  1331.  
  1332. -- Execute configuration and setup scripts
  1333.  
  1334. allScriptsRoot = "/Data/Scripts/"
  1335. scriptsRoot = allScriptsRoot .. "Pipeline/"
  1336.  
  1337. core.import(scriptsRoot .. "Configuration.lua")
  1338.  
  1339. --[[
  1340. Scripts/Server/Master.lua
  1341. --]]
  1342.  
  1343. print("Loading scripts...")
  1344.  
  1345. serverSaveFilePath = "serverAdminSave.lua"
  1346.  
  1347. dofile("Scripts/Server/Startup.lua")
  1348. dofile("Scripts/Server/Shutdown.lua")
  1349. dofile("Scripts/Server/Server.lua")
  1350. dofile("Scripts/Server/Session.lua")
  1351.  
  1352. print("Done loading scripts.")
  1353.  
  1354. --[[
  1355. Scripts/Server/Server.lua
  1356. ]]--
  1357.  
  1358. require "vfs"
  1359. require "os"
  1360.  
  1361. banList = {}
  1362. levelList = {}
  1363. currentLevelIndex = 0
  1364. maxLevelIndex = 0
  1365.  
  1366. function Server_LoadLevel()
  1367.  
  1368. -- print("Server_LoadLevel called")
  1369.  
  1370. end
  1371.  
  1372. function Server_UnloadLevel()
  1373.  
  1374. -- print("Server_UnloadLevel called")
  1375.  
  1376. end
  1377.  
  1378.  
  1379. function Server_LevelLoaded()
  1380.  
  1381. -- print("Server_LevelLoaded called")
  1382.  
  1383. end
  1384.  
  1385. function Server_LevelUnloaded()
  1386.  
  1387. -- print("Server_LevelUnloaded called")
  1388.  
  1389. end
  1390.  
  1391.  
  1392. ticks = 0
  1393.  
  1394. function Server_ScriptTick()
  1395.  
  1396. -- print("Server_ScriptTick called; ticks = " .. ticks)
  1397.  
  1398. ticks = ticks + 1
  1399.  
  1400. end
  1401.  
  1402. function Server_PlayerBanned(onlineId, name)
  1403.  
  1404. print("Server_PlayerBanned called: Player " .. onlineId .. " banned")
  1405.  
  1406. banList[onlineId] = { ["time"]=os.time(), ["name"]=name }
  1407.  
  1408. writeServerData()
  1409.  
  1410. end
  1411.  
  1412. function Server_UnbanPlayer(id)
  1413.  
  1414. if (banList[id] ~= nil) then
  1415. print("Player " .. id .. " unbanned")
  1416. banList[id] = nil
  1417.  
  1418. if (banList[id] ~= nil) then
  1419. print("Player was not removed for some reason")
  1420. end
  1421.  
  1422. writeServerData()
  1423. else
  1424. print("No player with id " .. id .. " is banned")
  1425. end
  1426.  
  1427. end
  1428.  
  1429. function Server_ListBans()
  1430.  
  1431. --Server_PlayerBanned(174636, "gunnar")
  1432. --Server_PlayerBanned(345636, "olle")
  1433.  
  1434. for k,v in pairs(banList) do
  1435. currentTime = os.date("%c", v.time)
  1436. print("[" .. k .. "]: " .. v.name .. "," .. currentTime)
  1437. end
  1438.  
  1439. end
  1440.  
  1441. function Server_LoadNextLevel()
  1442.  
  1443. if (levelList[currentLevelIndex] ~= nil) then
  1444. print("Loading level: " .. levelList[currentLevelIndex])
  1445. loadNextLevel(levelList[currentLevelIndex])
  1446. if (currentLevelIndex < maxLevelIndex) then
  1447. currentLevelIndex = currentLevelIndex + 1
  1448. else
  1449. currentLevelIndex = 1
  1450. end
  1451. else
  1452. print("Levelindex " .. currentLevelIndex .. " do not exist")
  1453. end
  1454.  
  1455. end
  1456.  
  1457. function Server_AddLevel(levelName)
  1458.  
  1459. maxLevelIndex = maxLevelIndex + 1
  1460. levelList[maxLevelIndex] = levelName
  1461. print("Added level \'" .. levelName .. "\' to level list")
  1462. writeServerData()
  1463. if (currentLevelIndex == 0) then
  1464. currentLevelIndex = 1
  1465. end
  1466.  
  1467. end
  1468.  
  1469. function Server_RemoveLevel(levelIndex)
  1470.  
  1471. if (levelList[levelIndex] ~= nil) then
  1472. print("Removing level \'" .. levelList[levelIndex] .. "\' at index: " .. levelIndex)
  1473. --table.remove(levelList, levelIndex)
  1474. for i=levelIndex,(maxLevelIndex-1),1 do
  1475. levelList[i] = levelList[i+1]
  1476. end
  1477. table.remove(levelList, maxLevelIndex)
  1478. maxLevelIndex = maxLevelIndex - 1
  1479.  
  1480. writeServerData()
  1481. if (currentLevelIndex > maxLevelIndex) then
  1482. currentLevelIndex = maxLevelIndex
  1483. end
  1484. else
  1485. print("No level at index: " .. levelIndex)
  1486. end
  1487.  
  1488. end
  1489.  
  1490. function Server_ListLevels()
  1491.  
  1492. for k,v in pairs(levelList) do
  1493. if (k == currentLevelIndex) then
  1494. print("[" .. k .. "]: " .. v .. " <<")
  1495. else
  1496. print("[" .. k .. "]: " .. v)
  1497. end
  1498. end
  1499.  
  1500. end
  1501.  
  1502. function writeServerData()
  1503.  
  1504. local currentPlatform = string.lower(dice.getCurrentPlatformName())
  1505. if (currentPlatform == "xenon" or currentPlatform == "ps3") then
  1506. return
  1507. end
  1508.  
  1509. local f = vfs.open(serverSaveFilePath, "w")
  1510.  
  1511. if not f then
  1512. -- File not found
  1513. return
  1514. end
  1515.  
  1516. serializedTable = tableToString(banList)
  1517.  
  1518. f:write("banList = " .. serializedTable .. "\
  1519. ")
  1520.  
  1521. --print("Wrote to file: banList = " .. serializedTable)
  1522.  
  1523. serializedTable = tableToString(levelList)
  1524.  
  1525. f:write("levelList = " .. serializedTable .. "\
  1526. ")
  1527.  
  1528. --print("Wrote to file: levelList = " .. serializedTable)
  1529.  
  1530. f:close()
  1531.  
  1532. end
  1533.  
  1534. --[[
  1535. Scripts/Server/Session.lua
  1536. ]]--
  1537.  
  1538. require "vfs"
  1539. require "os"
  1540.  
  1541. function Session_PlayerJoined(id)
  1542.  
  1543. print("Session_PlayerJoined called: Player " .. id .. " joined")
  1544.  
  1545. end
  1546.  
  1547. function Session_PlayerLeft(id)
  1548.  
  1549. print("Session_PlayerLeft called: Player " .. id .. " left")
  1550.  
  1551. end
  1552.  
  1553. function Session_PlayerAuthenticated(id)
  1554.  
  1555. print("Session_PlayerJoined called: Player " .. id .. " joined")
  1556.  
  1557. if (banList[id] ~= nil) then
  1558. print("Player " .. banList[id].name .. " is banned")
  1559. kickPlayer(id)
  1560. end
  1561.  
  1562. end
  1563.  
  1564. --[[
  1565. Scripts/Server/Shutdown.lua
  1566. ]]--
  1567.  
  1568. function Shutdown()
  1569.  
  1570. print("Shutdown called")
  1571.  
  1572. end
  1573.  
  1574. --[[
  1575. Scripts/Server/Startup.lua
  1576. ]]--
  1577.  
  1578. function Startup()
  1579.  
  1580. print("Startup called")
  1581.  
  1582. local currentPlatform = string.lower(dice.getCurrentPlatformName())
  1583. if (currentPlatform == "xenon" or currentPlatform == "ps3") then
  1584. return
  1585. end
  1586.  
  1587. Frost.Core.import(serverSaveFilePath, "Server Admin file", {silent=true})
  1588. print("Loaded banList")
  1589. for k,v in pairs(banList) do
  1590. currentTime = os.date("%c", v.time)
  1591. print("[" .. k .. "]: " .. v.name .. "," .. currentTime)
  1592. end
  1593.  
  1594. print("Loaded levelList")
  1595. for k,v in pairs(levelList) do
  1596. maxLevelIndex = maxLevelIndex + 1
  1597. print("[" .. k .. "]: " .. v)
  1598. end
  1599.  
  1600. if (maxLevelIndex > 0) then
  1601. currentLevelIndex = 1
  1602. end
  1603.  
  1604. end
  1605.  
  1606. --[[
  1607. Scripts/UserOptions/DefaultValues.lua
  1608. ]]--
  1609.  
  1610. core = require "Frost.Core"
  1611. logging = require "Frost.Logging"
  1612.  
  1613. function makeConstant(t)
  1614. return setmetatable({},
  1615. {
  1616. __index = function (_, n)
  1617. if t[n] == nil then
  1618. log:error("Invalid constant member \'" .. tostring(n) .. "\'")
  1619. end
  1620. return t[n]
  1621. end,
  1622.  
  1623. __newindex = function (t, n, v)
  1624. log:error("Attempting to change constant " .. tostring(n) .. " to " .. tostring(v))
  1625. end
  1626. })
  1627. end
  1628.  
  1629. local constants = {
  1630. Quality = makeConstant({
  1631. Autodetect = -1,
  1632. Low = 0,
  1633. Medium = 1,
  1634. High = 2,
  1635. Ultra = 3,
  1636. Custom = 4,
  1637.  
  1638. On = 1,
  1639. Off = 0,
  1640. }),
  1641.  
  1642. AnisotropicFilter = makeConstant({
  1643. X1 = 0,
  1644. X2 = 1,
  1645. X4 = 2,
  1646. X8 = 3,
  1647. X16 = 4,
  1648. }),
  1649.  
  1650. AntiAliasingDeferred = makeConstant({
  1651. Off = 0,
  1652. MSAA2X = 1,
  1653. MSAA4X = 2,
  1654. }),
  1655.  
  1656. AntiAliasingPost = makeConstant({
  1657. Off = 0,
  1658. Low = 1,
  1659. Medium = 2,
  1660. High = 3,
  1661. }),
  1662.  
  1663. AmbientOcclusion = makeConstant({
  1664. Off = 0,
  1665. SSAO = 1,
  1666. HBAO = 2,
  1667. }),
  1668.  
  1669. MotionBlur = makeConstant({
  1670. Off = 0,
  1671. On = 1,
  1672. }),
  1673. }
  1674.  
  1675. for k, v in pairs(constants) do
  1676. _G[k] = v
  1677. end
  1678.  
  1679. dofile("Scripts/UserOptions/HardwareProfiles.lua")
  1680. specs = hardwareSpecs[hardwareProfile]
  1681. log:info("hardwareProfile : " .. hardwareProfile)
  1682. cpuCount = specs[\'cpuCount\']
  1683. cpuQuality = specs[\'cpuQuality\'] + hardwareCpuBias
  1684. availableMemory = specs[\'availableMemory\']
  1685. adapterName = specs[\'adapterName\']
  1686. gpuQuality = specs[\'adapterQuality\'] + hardwareGpuBias
  1687. gpuCount = specs[\'gpuCount\']
  1688. availableGpuMemory = specs[\'availableGpuMemory\'] + hardwareGpuBias*256*1024*1024
  1689. deviceSettings = specs[\'deviceSettings\']
  1690.  
  1691. log:info("cpus : " .. cpuCount)
  1692. log:info("memory : " .. availableMemory)
  1693. log:info("adapter : " .. adapterName)
  1694. log:info("gpu quality : " .. gpuQuality)
  1695. log:info("gpuCount : " .. gpuCount)
  1696. log:info("gpuMemory : " .. availableGpuMemory)
  1697.  
  1698.  
  1699.  
  1700. settings = {}
  1701.  
  1702. local function applySettings(settings)
  1703. core.parseKeyValueCfgString(settings, _G) end
  1704.  
  1705. defaultSettings = {
  1706. Render = {
  1707. [Quality.Autodetect] = { -- Auto detect, we fill this in when we\'re done autodetecting
  1708. },
  1709.  
  1710. [Quality.Low] = {
  1711. TextureQuality = Quality.Low,
  1712. ShadowQuality = Quality.Low,
  1713. EffectsQuality = Quality.Low,
  1714. MeshQuality = Quality.Low,
  1715. TerrainQuality = Quality.Low,
  1716. UndergrowthQuality = Quality.Low,
  1717.  
  1718. AntiAliasingDeferred = AntiAliasingDeferred.Off,
  1719. AntiAliasingPost = AntiAliasingPost.Off,
  1720. AnisotropicFilter = AnisotropicFilter.X2,
  1721. AmbientOcclusion = AmbientOcclusion.Off,
  1722.  
  1723. MotionBlurEnabled = MotionBlur.Off,
  1724. },
  1725.  
  1726. [Quality.Medium] = {
  1727. TextureQuality = Quality.Medium,
  1728. ShadowQuality = Quality.Medium,
  1729. EffectsQuality = Quality.Medium,
  1730. MeshQuality = Quality.Medium,
  1731. TerrainQuality = Quality.Medium,
  1732. UndergrowthQuality = Quality.Medium,
  1733.  
  1734. AntiAliasingDeferred = AntiAliasingDeferred.Off,
  1735. AntiAliasingPost = AntiAliasingPost.Medium,
  1736. AnisotropicFilter = AnisotropicFilter.X4,
  1737. AmbientOcclusion = AmbientOcclusion.SSAO,
  1738.  
  1739. MotionBlurEnabled = MotionBlur.Off,
  1740. },
  1741.  
  1742. [Quality.High] = {
  1743. TextureQuality = Quality.High,
  1744. ShadowQuality = Quality.High,
  1745. EffectsQuality = Quality.High,
  1746. MeshQuality = Quality.High,
  1747. TerrainQuality = Quality.High,
  1748. UndergrowthQuality = Quality.High,
  1749.  
  1750. AntiAliasingDeferred = AntiAliasingDeferred.Off,
  1751. AntiAliasingPost = AntiAliasingPost.High,
  1752. AnisotropicFilter = AnisotropicFilter.X16,
  1753. AmbientOcclusion = AmbientOcclusion.HBAO,
  1754.  
  1755. MotionBlurEnabled = MotionBlur.On,
  1756. },
  1757.  
  1758. [Quality.Ultra] = {
  1759. TextureQuality = Quality.Ultra,
  1760. ShadowQuality = Quality.Ultra,
  1761. EffectsQuality = Quality.Ultra,
  1762. MeshQuality = Quality.Ultra,
  1763. TerrainQuality = Quality.Ultra,
  1764. UndergrowthQuality = Quality.Ultra,
  1765.  
  1766. AntiAliasingDeferred = AntiAliasingDeferred.MSAA4X,
  1767. AntiAliasingPost = AntiAliasingPost.High,
  1768. AnisotropicFilter = AnisotropicFilter.X16,
  1769. AmbientOcclusion = AmbientOcclusion.HBAO,
  1770.  
  1771. MotionBlurEnabled = MotionBlur.On,
  1772. },
  1773.  
  1774. [Quality.Custom] = {
  1775. -- There is a bug in LuaOptionSetManager where it can not handle empty tables, so we add this dummy option here for now (no time to fix the parser atm)
  1776. OverallGraphicsQuality = Quality.Custom + 1
  1777. }
  1778. }
  1779. }
  1780.  
  1781. settings["OverallGraphicsQuality"] = 0 -- Show as autodetect in UI
  1782. for setting, value in pairs(defaultSettings.Render[deviceSettings.baseQualityLevel]) do
  1783. settings[setting] = value
  1784. end
  1785. for setting, value in pairs(deviceSettings.defaultSettings or {}) do
  1786. settings[setting] = value
  1787. end
  1788.  
  1789. -- audio thread
  1790. if cpuCount < 4 then
  1791. applySettings("Audio.AudioCoreThread 0")
  1792. else
  1793. if (cpuCount < 6) then
  1794. applySettings("Audio.AudioCoreThread 2")
  1795. else
  1796. applySettings("Audio.AudioCoreThread "..(cpuCount-1))
  1797. end
  1798. end
  1799.  
  1800. -- audio
  1801. if cpuQuality < 4 then
  1802. settings[\'AudioQuality\'] = 0.0
  1803. else
  1804. settings[\'AudioQuality\'] = 1.0
  1805. end
  1806.  
  1807.  
  1808. -- physics
  1809. if cpuQuality < 4 then
  1810. settings[\'PhysicsQuality\'] = 0.0
  1811. else
  1812. settings[\'PhysicsQuality\'] = 1.0
  1813. end
  1814.  
  1815. -- animations
  1816. if cpuQuality < 4 then
  1817. settings[\'AnimationQuality\'] = 0.0
  1818. else
  1819. settings[\'AnimationQuality\'] = 1.0
  1820. end
  1821.  
  1822. -- textures
  1823. if adapterName == "Xenon" or adapterName == "PS3" then
  1824. settings[\'TextureQuality\'] = Quality.Medium
  1825. elseif availableGpuMemory <= 512*1024*1024 then
  1826. settings[\'TextureQuality\'] = Quality.Low
  1827. elseif availableGpuMemory <= 768*1024*1024 then
  1828. settings[\'TextureQuality\'] = Quality.Medium
  1829. elseif availableGpuMemory <= 1024*1024*1024 then
  1830. settings[\'TextureQuality\'] = Quality.High
  1831. else
  1832. settings[\'TextureQuality\'] = Quality.Ultra
  1833. end
  1834.  
  1835.  
  1836. -- resolution
  1837. settings[\'ResolutionWidth\'] = defaultFullscreenWidth or 0
  1838. settings[\'ResolutionHeight\'] = defaultFullscreenHeight or 0
  1839. settings[\'ResolutionHertz\'] = defaultFullscreenRefreshRate or 0
  1840. settings[\'FullscreenScreen\'] = 0
  1841. settings[\'FullscreenEnabled\'] = defaultFullscreenEnabled or 0
  1842. settings[\'VSyncEnabled\'] = defaultVSyncEnabled or 0
  1843.  
  1844. -- Test to override auto detected values (using lua to allow use of constants)
  1845. --core.readKeyValueCfg("/user/profile/settings/overrideAutodetect.cfg", settings) --will override autodetected values
  1846. function vfs_loadfile(filename)
  1847. local f = vfs.open(filename, "r")
  1848.  
  1849. if f == nil then
  1850. return false, "File not found!"
  1851. end
  1852.  
  1853. function getNextChunk()
  1854. return f:read(128)
  1855. end
  1856.  
  1857. return load(getNextChunk, filename)
  1858. end
  1859.  
  1860. local overrideFilename = "/user/profile/settings/overrideAutodetect.lua"
  1861. local executeAutoDetectOverride, e = vfs_loadfile(overrideFilename)
  1862.  
  1863. function bind(f, param)
  1864. return function(...)
  1865. f(param, ...)
  1866. end
  1867. end
  1868.  
  1869. if executeAutoDetectOverride then
  1870. overrideSettings = setmetatable({},
  1871. {
  1872. __index = constants,
  1873. __newindex = bind(function(s, t, n, v)
  1874. if s[n] == nil then
  1875. log:error("Trying to set unknown setting " .. n .. " to " .. tostring(n))
  1876. elseif v == nil then
  1877. log:error("Trying to set setting " .. n .. " to nil")
  1878. else
  1879. log:info("Overriding " .. n .. ": " .. tostring(v))
  1880. s[n] = v
  1881. end
  1882. end, settings)
  1883. })
  1884.  
  1885. setfenv(executeAutoDetectOverride, overrideSettings)
  1886. local success, e = pcall(executeAutoDetectOverride);
  1887. if not success then
  1888. log:info("Failed to parse \'" .. overrideFilename .. "\' " .. e)
  1889. end
  1890. else
  1891. log:info("Override file error \'" .. overrideFilename .. "\': " .. e)
  1892. end
  1893.  
  1894. -- Last thing we do is to save the values we want for the autodetect setting
  1895. -- (use the same keys as used for the low settings)
  1896. for key, _ in pairs(defaultSettings.Render[Quality.Low]) do
  1897. defaultSettings.Render[Quality.Autodetect][key] = settings[key]
  1898. if settings[key] == nil then
  1899. log:error("Setting " .. key .. " does not have an auto detected default value")
  1900. end
  1901. end
  1902.  
  1903. --[[
  1904. Scripts/UserOptions/HardwareProfiles.lua
  1905. --]]
  1906.  
  1907. function getGpuQuality(gpuName, gpuCount)
  1908. if string.find(gpuName, "GeForce 8") or
  1909. string.find(gpuName, "GeForce 9") then
  1910. return 1
  1911. elseif string.find(gpuName, "GeForce GTX 26") then
  1912. return 2
  1913. elseif string.find(gpuName, "GeForce GTX 2") or
  1914. string.find(gpuName, "ATI Radeon HD 4870 X2") or
  1915. string.find(gpuName, "ATI Radeon HD 5800 Series") or
  1916. string.find(gpuName, "ATI Radeon HD 5900 Series") or
  1917. string.find(gpuName, "AMD Radeon HD 68") or
  1918. string.find(gpuName, "AMD Radeon HD 69") or
  1919. string.find(gpuName, "GeForce GTX 4") or
  1920. string.find(gpuName, "GeForce GTX 5") then
  1921. if gpuCount > 1 then
  1922. return 4
  1923. else
  1924. return 3
  1925. end
  1926. else
  1927. return 1
  1928. end
  1929. end
  1930.  
  1931. function getCpuQuality(cpuCount, cpuSpeed)
  1932. return (cpuSpeed-1.2)*(cpuCount-1)
  1933. end
  1934.  
  1935. -- 2 cores, 3.0 gHz : 1.8
  1936. -- 2 cores, 3.6 gHz : 2.4
  1937. -- 4 cores, 2.0 gHz : 2.4
  1938. -- 4 cores, 3.2 gHz : 6
  1939. -- 8 cores, 1.8 gHz : 4.2
  1940. -- 8 cores, 3.2 gHz : 14!! awesome
  1941.  
  1942. vendorDB = {
  1943. [0x1002] = dofile("Scripts/UserOptions/HardwareProfiles/ATI.lua"),
  1944. [0x10DE] = dofile("Scripts/UserOptions/HardwareProfiles/nVidia.lua"),
  1945. [0x8086] = dofile("Scripts/UserOptions/HardwareProfiles/Intel.lua")
  1946. }
  1947.  
  1948. -- Autodetect settings based on graphics card device id
  1949. function getDeviceSettings(vendorId, deviceId, adapterName)
  1950. if adapterName == "Xenon" then
  1951. return { baseQualityLevel = Quality.Medium, defaultSettings = {}, consoleOverrides = "" }
  1952. elseif adapterName == "PS3" then
  1953. return { baseQualityLevel = Quality.High, defaultSettings = {}, consoleOverrides = "" }
  1954. else
  1955. return (vendorDB[vendorId] and vendorDB[vendorId][deviceId]) or { baseQualityLevel = Quality.Medium, defaultSettings = {}, consoleOverrides = "" }
  1956. end
  1957. end
  1958.  
  1959. hardwareSpecs = {
  1960. [0] = {
  1961. cpuCount = detectedCpuCount,
  1962. cpuQuality = getCpuQuality(detectedCpuCount, detectedCpuFreq),
  1963. availableMemory = detectedAvailableMemory,
  1964. adapterName = detectedAdapterName,
  1965. gpuCount = detectedGpuCount,
  1966. adapterQuality = getGpuQuality(detectedAdapterName, detectedGpuCount),
  1967. availableGpuMemory = detectedAvailableGpuMemory,
  1968. deviceSettings = getDeviceSettings(detectedVendorId, detectedDeviceId, detectedAdapterName)
  1969. },
  1970.  
  1971. [1] = {
  1972. cpuCount = detectedCpuCount,
  1973. cpuQuality = getCpuQuality(2, 2.3),
  1974. availableMemory = 512*1024*1024,
  1975. adapterName = "Faked Low",
  1976. gpuCount = 1,
  1977. adapterQuality = 0,
  1978. availableGpuMemory = 512*1024*1024,
  1979. deviceSettings = { baseQualityLevel = Quality.Low, defaultSettings = {}, consoleOverrides = "" }
  1980. },
  1981.  
  1982. [2] = {
  1983. cpuCount = detectedCpuCount,
  1984. cpuQuality = getCpuQuality(2, 3),
  1985. availableMemory = 1*1024*1024*1024,
  1986. adapterName = "Faked Medium",
  1987. gpuCount = 1,
  1988. adapterQuality = 1,
  1989. availableGpuMemory = 768*1024*1024,
  1990. deviceSettings = { baseQualityLevel = Quality.Medium, defaultSettings = {}, consoleOverrides = "" }
  1991. },
  1992.  
  1993. [3] = {
  1994. cpuCount = detectedCpuCount,
  1995. cpuQuality = getCpuQuality(4, 3),
  1996. availableMemory = 1.5*1024*1024*1024,
  1997. adapterName = "Faked High",
  1998. gpuCount = 1,
  1999. adapterQuality = 3,
  2000. availableGpuMemory = 1*1024*1024*1024,
  2001. deviceSettings = { baseQualityLevel = Quality.High, defaultSettings = {}, consoleOverrides = "" }
  2002. },
  2003.  
  2004. [4] = {
  2005. cpuCount = detectedCpuCount,
  2006. cpuQuality = getCpuQuality(8, 3),
  2007. availableMemory = 2*1024*1024*1024,
  2008. adapterName = "Faked Ultra",
  2009. gpuCount = 2,
  2010. adapterQuality = 4,
  2011. availableGpuMemory = 2*1024*1024*1024,
  2012. deviceSettings = { baseQualityLevel = Quality.Ultra, defaultSettings = {}, consoleOverrides = "" }
  2013. },
  2014. }
  2015.  
  2016. vendorDB = nil
  2017. --[[
  2018. Scripts/UserOptions/HardwareProfiles/ATI.lua
  2019. ]]--
  2020.  
  2021. -- Settings database for ATI devices
  2022. return {
  2023. -- [0xHHHH] = { -- Example card
  2024. -- baseQualityLevel = Quality.Low,
  2025. -- defaultSettings = {
  2026. -- TextureQuality = Quality.Low,
  2027. -- ShadowQuality = Quality.Low,
  2028. -- EffectsQuality = Quality.Low,
  2029. -- },
  2030. -- consoleOverrides = [=[
  2031. -- WorldRender.MotionBlurEnable 0
  2032. -- ]=]
  2033. -- }
  2034. [0x9598] = { baseQualityLevel = Quality.Low }, -- ATI All-in-Wonder HD
  2035. [0x9519] = { baseQualityLevel = Quality.Low }, -- AMD FireStream 9170
  2036. [0x9452] = { baseQualityLevel = Quality.Low }, -- AMD FireStream 9250
  2037. [0x9450] = { baseQualityLevel = Quality.Low }, -- AMD FireStream 9270
  2038. [0x688D] = { baseQualityLevel = Quality.Low }, -- AMD FireStream 9350
  2039. [0x688C] = { baseQualityLevel = Quality.Low }, -- AMD FireStream 9370
  2040. [0x94C7] = { baseQualityLevel = Quality.Low }, -- ATI Radeon HD 2350
  2041. [0x94C3] = { baseQualityLevel = Quality.Low }, -- ATI Radeon HD 2350 Series
  2042. [0x94C3] = { baseQualityLevel = Quality.Low }, -- ATI Radeon HD 2400 Series
  2043. [0x94C1] = { baseQualityLevel = Quality.Low }, -- ATI Radeon HD 2400 Series
  2044. [0x94CC] = { baseQualityLevel = Quality.Low }, -- ATI Radeon HD 2400 Series
  2045. [0x94C3] = { baseQualityLevel = Quality.Low }, -- ATI Radeon HD 2400 LE
  2046. [0x94C9] = { baseQualityLevel = Quality.Low }, -- ATI Mobility Radeon HD 2400
  2047. [0x94C3] = { baseQualityLevel = Quality.Low }, -- ATI Radeon HD 2400
  2048. [0x94C1] = { baseQualityLevel = Quality.Low }, -- ATI Radeon HD 2400
  2049. [0x94C8] = { baseQualityLevel = Quality.Low }, -- ATI Mobility Radeon HD 2400 XT
  2050. [0x94C1] = { baseQualityLevel = Quality.Low }, -- ATI Radeon HD 2400 XT
  2051. [0x9589] = { baseQualityLevel = Quality.Low }, -- ATI Radeon HD 2600
  2052. [0x9581] = { baseQualityLevel = Quality.Low }, -- ATI Mobility Radeon HD 2600
  2053. [0x9583] = { baseQualityLevel = Quality.Low }, -- ATI Mobility Radeon HD 2600 XT
  2054. [0x9588] = { baseQualityLevel = Quality.Low }, -- ATI Radeon HD 2600 XT
  2055. [0x958A] = { baseQualityLevel = Quality.Low }, -- ATI Radeon HD 2600 X2 Series
  2056. [0x9400] = { baseQualityLevel = Quality.Low }, -- ATI Radeon HD 2900
  2057. [0x9405] = { baseQualityLevel = Quality.Low }, -- ATI Radeon HD 2900 GT
  2058. [0x9400] = { baseQualityLevel = Quality.Low }, -- ATI Radeon HD 2900 XT
  2059. [0x9400] = { baseQualityLevel = Quality.Low }, -- ATI Radeon HD 2900 XT
  2060. [0x9616] = { baseQualityLevel = Quality.Low }, -- ATI Radeon 3000 Graphics
  2061. [0x9611] = { baseQualityLevel = Quality.Low }, -- ATI Radeon 3100 Graphics
  2062. [0x9613] = { baseQualityLevel = Quality.Low }, -- ATI Radeon 3100 Graphics
  2063. [0x9612] = { baseQualityLevel = Quality.Low }, -- ATI Radeon HD 3200 Graphics
  2064. [0x9610] = { baseQualityLevel = Quality.Low }, -- ATI Radeon HD 3200 Graphics
  2065. [0x9614] = { baseQualityLevel = Quality.Low }, -- ATI Radeon HD 3300 Graphics
  2066. [0x95C0] = { baseQualityLevel = Quality.Low }, -- ATI Radeon HD 3400 Series
  2067. [0x95C5] = { baseQualityLevel = Quality.Low }, -- ATI Radeon HD 3400 Series
  2068. [0x95C4] = { baseQualityLevel = Quality.Low }, -- ATI Mobility Radeon HD 3400 Series
  2069. [0x94C3] = { baseQualityLevel = Quality.Low }, -- ATI Radeon HD 3410
  2070. [0x95C2] = { baseQualityLevel = Quality.Low }, -- ATI Mobility Radeon HD 3430
  2071. [0x95C5] = { baseQualityLevel = Quality.Low }, -- ATI Radeon HD 3450
  2072. [0x95C0] = { baseQualityLevel = Quality.Low }, -- ATI Radeon HD 3550
  2073. [0x95C5] = { baseQualityLevel = Quality.Low }, -- ATI Radeon HD 3550
  2074. [0x95C0] = { baseQualityLevel = Quality.Low }, -- ATI Radeon HD 3570
  2075. [0x9589] = { baseQualityLevel = Quality.Low }, -- ATI Radeon HD 3600 Series
  2076. [0x9598] = { baseQualityLevel = Quality.Low }, -- ATI Radeon HD 3600 Series
  2077. [0x9591] = { baseQualityLevel = Quality.Low }, -- ATI Radeon HD 3600 Series
  2078. [0x9581] = { baseQualityLevel = Quality.Low }, -- ATI Radeon HD 3600 Series
  2079. [0x9583] = { baseQualityLevel = Quality.Low }, -- ATI Radeon HD 3600 Series
  2080. [0x9589] = { baseQualityLevel = Quality.Low }, -- ATI Radeon HD 3610
  2081. [0x9591] = { baseQualityLevel = Quality.Low }, -- ATI Mobility Radeon HD 3650
  2082. [0x9593] = { baseQualityLevel = Quality.Low }, -- ATI Mobility Radeon HD 3670
  2083. [0x9501] = { baseQualityLevel = Quality.Low }, -- ATI Radeon HD 3690
  2084. [0x9505] = { baseQualityLevel = Quality.Low }, -- ATI Radeon HD 3690
  2085. [0x9598] = { baseQualityLevel = Quality.Low }, -- ATI Radeon HD 3730
  2086. [0x9598] = { baseQualityLevel = Quality.Low }, -- ATI Radeon HD3750
  2087. [0x9501] = { baseQualityLevel = Quality.Low }, -- ATI Radeon HD 3800 Series
  2088. [0x9505] = { baseQualityLevel = Quality.Low }, -- ATI Radeon HD 3800 Series
  2089. [0x9507] = { baseQualityLevel = Quality.Low }, -- ATI Radeon HD 3830
  2090. [0x9505] = { baseQualityLevel = Quality.Low }, -- ATI Radeon HD 3850
  2091. [0x9504] = { baseQualityLevel = Quality.Low }, -- ATI Mobility Radeon HD 3850
  2092. [0x9513] = { baseQualityLevel = Quality.Low }, -- ATI Radeon HD 3850 X2
  2093. [0x9506] = { baseQualityLevel = Quality.Medium }, -- ATI Mobility Radeon HD 3850 X2
  2094. [0x9501] = { baseQualityLevel = Quality.Medium }, -- ATI Radeon HD 3870
  2095. [0x950F] = { baseQualityLevel = Quality.Medium }, -- ATI Radeon HD 3870 X2
  2096. [0x9508] = { baseQualityLevel = Quality.Medium }, -- ATI Mobility Radeon HD 3870
  2097. [0x9509] = { baseQualityLevel = Quality.Medium }, -- ATI Mobility Radeon HD 3870 X2
  2098. [0x9713] = { baseQualityLevel = Quality.Low }, -- ATI Mobility Radeon 4100
  2099. [0x9712] = { baseQualityLevel = Quality.Low }, -- ATI Mobility Radeon HD 4200 Series
  2100. [0x9710] = { baseQualityLevel = Quality.Low }, -- ATI Radeon HD 4200
  2101. [0x95C5] = { baseQualityLevel = Quality.Low }, -- ATI Radeon HD 4230
  2102. [0x9715] = { baseQualityLevel = Quality.Low }, -- ATI Radeon HD 4250
  2103. [0x95C5] = { baseQualityLevel = Quality.Low }, -- ATI Radeon HD 4250
  2104. [0x95C0] = { baseQualityLevel = Quality.Low }, -- ATI Radeon HD 4250
  2105. [0x9714] = { baseQualityLevel = Quality.Low }, -- ATI Radeon HD 4290
  2106. [0x9552] = { baseQualityLevel = Quality.Low }, -- ATI Radeon HD 4300/4500 Series
  2107. [0x954F] = { baseQualityLevel = Quality.Low }, -- ATI Radeon HD 4300/4500 Series
  2108. [0x9553] = { baseQualityLevel = Quality.Low }, -- ATI Radeon HD 4300/4500 Series
  2109. [0x9555] = { baseQualityLevel = Quality.Low }, -- ATI Radeon HD4300/HD4500 series
  2110. [0x9552] = { baseQualityLevel = Quality.Low }, -- ATI Mobility Radeon HD 4300 Series
  2111. [0x9555] = { baseQualityLevel = Quality.Low }, -- ATI Mobility Radeon HD 4300/4500 Series
  2112. [0x954F] = { baseQualityLevel = Quality.Low }, -- ATI Radeon HD 4450
  2113. [0x9553] = { baseQualityLevel = Quality.Low }, -- ATI Mobility Radeon HD 4500/5100 Series
  2114. [0x954F] = { baseQualityLevel = Quality.Low }, -- ATI Radeon HD 4520
  2115. [0x954F] = { baseQualityLevel = Quality.Low }, -- ATI Radeon HD 4550
  2116. [0x9540] = { baseQualityLevel = Quality.Low }, -- ATI Radeon HD 4550
  2117. [0x9555] = { baseQualityLevel = Quality.Low }, -- ATI Radeon HD 4550
  2118. [0x9598] = { baseQualityLevel = Quality.Low }, -- ATI Radeon HD 4570
  2119. [0x9598] = { baseQualityLevel = Quality.Low }, -- ATI Radeon HD 4580
  2120. [0x9540] = { baseQualityLevel = Quality.Low }, -- ATI Radeon HD 4590
  2121. [0x9490] = { baseQualityLevel = Quality.Medium }, -- ATI Radeon HD 4600 Series
  2122. [0x9498] = { baseQualityLevel = Quality.Medium }, -- ATI Radeon HD 4600 Series
  2123. [0x9598] = { baseQualityLevel = Quality.Medium }, -- ATI Radeon HD 4610
  2124. [0x9498] = { baseQualityLevel = Quality.Medium }, -- ATI Radeon HD 4650
  2125. [0x9480] = { baseQualityLevel = Quality.Medium }, -- ATI Mobility Radeon HD 4650
  2126. [0x9498] = { baseQualityLevel = Quality.Medium }, -- ATI Radeon HD 4670
  2127. [0x9488] = { baseQualityLevel = Quality.Medium }, -- ATI Mobility Radeon HD 4670
  2128. [0x94B3] = { baseQualityLevel = Quality.Medium }, -- ATI Radeon HD 4770
  2129. [0x9498] = { baseQualityLevel = Quality.Medium }, -- ATI Radeon HD 4700
  2130. [0x944E] = { baseQualityLevel = Quality.Medium }, -- ATI Radeon HD 4700 Series
  2131. [0x94B4] = { baseQualityLevel = Quality.Medium }, -- ATI Radeon HD 4700 Series
  2132. [0x9490] = { baseQualityLevel = Quality.Medium }, -- ATI Radeon HD 4710
  2133. [0x9498] = { baseQualityLevel = Quality.Medium }, -- ATI Radeon HD 4720
  2134. [0x944E] = { baseQualityLevel = Quality.Medium }, -- ATI Radeon HD 4730 Series
  2135. [0x9505] = { baseQualityLevel = Quality.Medium }, -- ATI Radeon HD 4730
  2136. [0x9505] = { baseQualityLevel = Quality.Medium }, -- ATI Radeon HD 4750
  2137. [0x9501] = { baseQualityLevel = Quality.Medium }, -- ATI Radeon HD 4750
  2138. [0x94B3] = { baseQualityLevel = Quality.Medium }, -- ATI Radeon HD 4770
  2139. [0x94B5] = { baseQualityLevel = Quality.Medium }, -- ATI Radeon HD 4770
  2140. [0x9440] = { baseQualityLevel = Quality.High }, -- ATI Radeon HD 4800 Series
  2141. [0x9442] = { baseQualityLevel = Quality.High }, -- ATI Radeon HD 4800 Series
  2142. [0x944C] = { baseQualityLevel = Quality.High }, -- ATI Radeon HD 4800 Series
  2143. [0x9460] = { baseQualityLevel = Quality.High }, -- ATI Radeon HD 4800 Series
  2144. [0x9462] = { baseQualityLevel = Quality.High }, -- ATI Radeon HD 4800 Series
  2145. [0x944A] = { baseQualityLevel = Quality.High }, -- ATI Radeon HD 4800 Series
  2146. [0x944E] = { baseQualityLevel = Quality.High }, -- ATI Radeon HD 4810 Series
  2147. [0x944E] = { baseQualityLevel = Quality.High }, -- ATI Radeon HD 4820
  2148. [0x944C] = { baseQualityLevel = Quality.High }, -- ATI Radeon HD 4830
  2149. [0x94A0] = { baseQualityLevel = Quality.High }, -- ATI Mobility Radeon HD 4830
  2150. [0x944A] = { baseQualityLevel = Quality.High }, -- ATI Mobility Radeon HD 4850
  2151. [0x9442] = { baseQualityLevel = Quality.High }, -- ATI Radeon HD 4850
  2152. [0x9443] = { baseQualityLevel = Quality.Medium }, -- ATI Radeon HD 4850 X2
  2153. [0x94A1] = { baseQualityLevel = Quality.High }, -- ATI Mobility Radeon HD 4860
  2154. [0x945A] = { baseQualityLevel = Quality.High }, -- ATI Mobility Radeon HD 4870
  2155. [0x9440] = { baseQualityLevel = Quality.High }, -- ATI Radeon HD 4870
  2156. [0x9441] = { baseQualityLevel = Quality.High }, -- ATI Radeon HD 4870 X2
  2157. [0x68E1] = { baseQualityLevel = Quality.Medium }, -- ATI Radeon HD 5400 Series
  2158. [0x68F9] = { baseQualityLevel = Quality.Medium }, -- ATI Radeon HD 5400 Series
  2159. [0x68E0] = { baseQualityLevel = Quality.Medium }, -- ATI Mobility Radeon HD 5400 Series
  2160. [0x68E1] = { baseQualityLevel = Quality.Medium }, -- ATI Mobility Radeon HD 5400 Series
  2161. [0x68E0] = { baseQualityLevel = Quality.Medium }, -- ATI Mobility Radeon HD 5400 Series
  2162. [0x68E1] = { baseQualityLevel = Quality.Medium }, -- ATI Mobility Radeon HD 5430
  2163. [0x68F9] = { baseQualityLevel = Quality.Medium }, -- ATI Radeon HD 5450
  2164. [0x68F9] = { baseQualityLevel = Quality.Medium }, -- ATI Radeon HD 5470
  2165. [0x68E1] = { baseQualityLevel = Quality.Medium }, -- ATI Radeon HD 5470
  2166. [0x68F9] = { baseQualityLevel = Quality.Medium }, -- ATI Radeon HD 5490
  2167. [0x68DA] = { baseQualityLevel = Quality.Medium }, -- ATI Radeon HD 5500 Series
  2168. [0x68D9] = { baseQualityLevel = Quality.Medium }, -- ATI Radeon HD 5500 Series
  2169. [0x68CA] = { baseQualityLevel = Quality.Medium }, -- ATI Radeon HD 5500 Series
  2170. [0x68F9] = { baseQualityLevel = Quality.Medium }, -- ATI Radeon HD 5530
  2171. [0x68D9] = { baseQualityLevel = Quality.Medium }, -- ATI Radeon HD 5570
  2172. [0x68C7] = { baseQualityLevel = Quality.Medium }, -- ATI Mobility Radeon HD 5570
  2173. [0x68B9] = { baseQualityLevel = Quality.Medium }, -- ATI Radeon HD 5600/5700
  2174. [0x68D8] = { baseQualityLevel = Quality.Medium }, -- ATI Radeon HD 5600 Series
  2175. [0x68D9] = { baseQualityLevel = Quality.Medium }, -- ATI Radeon HD 5630
  2176. [0x68DA] = { baseQualityLevel = Quality.Medium }, -- ATI Radeon HD 5630
  2177. [0x68C1] = { baseQualityLevel = Quality.Medium }, -- ATI Mobility Radeon HD 5650
  2178. [0x68D8] = { baseQualityLevel = Quality.Medium }, -- ATI Radeon HD 5670
  2179. [0x68D8] = { baseQualityLevel = Quality.Medium }, -- ATI Radeon HD 5690
  2180. [0x68D8] = { baseQualityLevel = Quality.Medium }, -- ATI Radeon HD 5730
  2181. [0x68C0] = { baseQualityLevel = Quality.Medium }, -- ATI Mobility Radeon HD 5700 Series
  2182. [0x68BE] = { baseQualityLevel = Quality.Medium }, -- ATI Radeon HD 5700 Series
  2183. [0x68B8] = { baseQualityLevel = Quality.Medium }, -- ATI Radeon HD 5700 Series
  2184. [0x68C1] = { baseQualityLevel = Quality.High }, -- ATI Mobility Radeon HD 5750
  2185. [0x689E] = { baseQualityLevel = Quality.High }, -- ATI Radeon HD 5800 Series
  2186. [0x6899] = { baseQualityLevel = Quality.High }, -- ATI Radeon HD 5800 Series
  2187. [0x6898] = { baseQualityLevel = Quality.High }, -- ATI Radeon HD 5800 Series
  2188. [0x68A0] = { baseQualityLevel = Quality.High }, -- ATI Mobility Radeon HD 5800 Series
  2189. [0x68A1] = { baseQualityLevel = Quality.High }, -- ATI Mobility Radeon HD 5800 Series
  2190. [0x68A0] = { baseQualityLevel = Quality.High }, -- ATI Mobility Radeon HD 5800 Series
  2191. [0x68A1] = { baseQualityLevel = Quality.High }, -- ATI Mobility Radeon HD 5800 Series
  2192. [0x6899] = { baseQualityLevel = Quality.High }, -- ATI Radeon HD 5850X2
  2193. [0x689C] = { baseQualityLevel = Quality.High }, -- ATI Radeon HD 5900 Series
  2194. [0x9804] = { baseQualityLevel = Quality.Low }, -- AMD Radeon HD 6200 series Graphics
  2195. [0x9805] = { baseQualityLevel = Quality.Low }, -- AMD Radeon HD 6200 series Graphics
  2196. [0x68F9] = { baseQualityLevel = Quality.Low }, -- ATI Radeon HD 6230
  2197. [0x68E1] = { baseQualityLevel = Quality.Low }, -- ATI Radeon HD 6230
  2198. [0x68F9] = { baseQualityLevel = Quality.Low }, -- ATI Radeon HD 6250
  2199. [0x68E1] = { baseQualityLevel = Quality.Low }, -- ATI Radeon HD 6250
  2200. [0x9802] = { baseQualityLevel = Quality.Low }, -- AMD Radeon HD 6250
  2201. [0x68F9] = { baseQualityLevel = Quality.Low }, -- ATI Radeon HD 6290
  2202. [0x9802] = { baseQualityLevel = Quality.Low }, -- AMD Radeon HD 6300 series Graphics
  2203. [0x9803] = { baseQualityLevel = Quality.Low }, -- AMD Radeon HD 6300 series Graphics
  2204. [0x68E5] = { baseQualityLevel = Quality.Low }, -- AMD Radeon HD 6300M Series
  2205. [0x68E4] = { baseQualityLevel = Quality.Low }, -- AMD Radeon HD 6300M Series
  2206. [0x9802] = { baseQualityLevel = Quality.Low }, -- AMD Radeon HD 6310
  2207. [0x68F9] = { baseQualityLevel = Quality.Low }, -- AMD Radeon HD 6350
  2208. [0x68E4] = { baseQualityLevel = Quality.Low }, -- AMD Radeon HD 6350M
  2209. [0x68E5] = { baseQualityLevel = Quality.Low }, -- AMD Radeon HD 6330M
  2210. [0x68E4] = { baseQualityLevel = Quality.Low }, -- AMD Radeon HD 6370M
  2211. [0x68DA] = { baseQualityLevel = Quality.Low }, -- ATI Radeon HD 6390
  2212. [0x6770] = { baseQualityLevel = Quality.Low }, -- AMD Radeon HD 6400 Series
  2213. [0x6760] = { baseQualityLevel = Quality.Low }, -- AMD Radeon HD 6400M Series
  2214. [0x6779] = { baseQualityLevel = Quality.Low }, -- AMD Radeon HD 6400 Series
  2215. [0x6760] = { baseQualityLevel = Quality.Low }, -- AMD Radeon HD 6400M Series
  2216. [0x6761] = { baseQualityLevel = Quality.Low }, -- AMD Radeon HD 6430M
  2217. [0x6761] = { baseQualityLevel = Quality.Low }, -- AMD Radeon HD 6430M
  2218. [0x6779] = { baseQualityLevel = Quality.Low }, -- AMD Radeon HD 6450
  2219. [0x68C1] = { baseQualityLevel = Quality.Medium }, -- AMD Radeon HD 6500M/5600/5700 Series
  2220. [0x6759] = { baseQualityLevel = Quality.Medium }, -- AMD Radeon HD 6500 Series
  2221. [0x68C1] = { baseQualityLevel = Quality.Medium }, -- AMD Radeon HD 6500M Series
  2222. [0x68D9] = { baseQualityLevel = Quality.Medium }, -- ATI Radeon HD 6510
  2223. [0x68C0] = { baseQualityLevel = Quality.Medium }, -- AMD Radeon HD 6570M
  2224. [0x68C0] = { baseQualityLevel = Quality.Medium }, -- AMD Radeon HD 6570M/5700 Series
  2225. [0x6750] = { baseQualityLevel = Quality.Medium }, -- AMD Radeon HD 6600A Series
  2226. [0x6758] = { baseQualityLevel = Quality.Medium }, -- AMD Radeon HD 6600 Series
  2227. [0x6741] = { baseQualityLevel = Quality.Medium }, -- AMD Radeon 6600M and 6700M Series
  2228. [0x6742] = { baseQualityLevel = Quality.Medium }, -- AMD Radeon HD 6625M Graphics
  2229. [0x6740] = { baseQualityLevel = Quality.High }, -- AMD Radeon HD 6700M Series
  2230. [0x68BA] = { baseQualityLevel = Quality.High }, -- AMD Radeon HD 6700 Series
  2231. [0x68BF] = { baseQualityLevel = Quality.High }, -- AMD Radeon HD 6700 Series
  2232. [0x673E] = { baseQualityLevel = Quality.High }, -- AMD Radeon HD 6700 Series
  2233. [0x68B8] = { baseQualityLevel = Quality.High }, -- AMD Radeon HD 6700 Series
  2234. [0x6741] = { baseQualityLevel = Quality.High }, -- AMD Radeon HD 6700M Series
  2235. [0x68BE] = { baseQualityLevel = Quality.High }, -- AMD Radeon HD 6750
  2236. [0x68BF] = { baseQualityLevel = Quality.High }, -- AMD Radeon HD 6750
  2237. [0x68BA] = { baseQualityLevel = Quality.High }, -- AMD Radeon HD 6770
  2238. [0x6740] = { baseQualityLevel = Quality.High }, -- AMD Radeon HD 6770M
  2239. [0x68B8] = { baseQualityLevel = Quality.High }, -- AMD Radeon HD 6770
  2240. [0x68A8] = { baseQualityLevel = Quality.High }, -- AMD Radeon HD 6800M Series
  2241. [0x6738] = { baseQualityLevel = Quality.High }, -- AMD Radeon HD 6800 Series
  2242. [0x6739] = { baseQualityLevel = Quality.High }, -- AMD Radeon HD 6800 Series
  2243. [0x673E] = { baseQualityLevel = Quality.High }, -- AMD Radeon HD 6800 Series
  2244. [0x689B] = { baseQualityLevel = Quality.High }, -- AMD Radeon HD 6800 Series
  2245. [0x68A8] = { baseQualityLevel = Quality.High }, -- AMD Radeon HD 6800M Series
  2246. [0x6720] = { baseQualityLevel = Quality.High }, -- AMD Radeon HD 6900M Series
  2247. [0x6718] = { baseQualityLevel = Quality.High }, -- AMD Radeon HD 6900 Series
  2248. [0x671F] = { baseQualityLevel = Quality.High }, -- AMD Radeon HD 6900 Series
  2249. [0x671D] = { baseQualityLevel = Quality.High }, -- AMD Radeon HD 6990
  2250. [0x6718] = { baseQualityLevel = Quality.High }, -- AMD Radeon HD 6900 Series
  2251. [0x6720] = { baseQualityLevel = Quality.High }, -- AMD Radeon HD 6900M Series
  2252. [0x6719] = { baseQualityLevel = Quality.High }, -- AMD Radeon HD 6900 Series
  2253. }
  2254.  
  2255. --[[
  2256. Scripts/UserOptions/HardwareProfiles/Intel.lua
  2257. ]]--
  2258.  
  2259. -- Settings database for Intel devices
  2260. return {
  2261. -- [0xHHHH] = { -- Example card
  2262. -- baseQualityLevel = Quality.High,
  2263. -- defaultSettings = {
  2264. -- TextureQuality = Quality.Low,
  2265. -- ShadowQuality = Quality.Medium,
  2266. -- EffectsQuality = Quality.High,
  2267. -- },
  2268. -- consoleOverrides = [=[
  2269. -- WorldRender.MotionBlurEnable 0
  2270. -- ]=]
  2271. -- }
  2272. }
  2273.  
  2274. --[[
  2275. Scripts/UserOptions/HardwareProfiles/nVidia.lua
  2276. ]]--
  2277.  
  2278. -- Settings database for nVidia devices
  2279. return {
  2280. -- [0xHHHH] = { -- Example card
  2281. -- baseQualityLevel = Quality.Medium,
  2282. -- defaultSettings = {
  2283. -- TextureQuality = Quality.Low,
  2284. -- ShadowQuality = Quality.Medium,
  2285. -- EffectsQuality = Quality.Medium,
  2286. -- },
  2287. -- consoleOverrides = [=[
  2288. -- WorldRender.MotionBlurEnable 0
  2289. -- ]=]
  2290. -- }
  2291. [0x004E] = { baseQualityLevel = Quality.Low }, -- NVIDIA Quadro FX 4000
  2292. [0x009D] = { baseQualityLevel = Quality.Low }, -- NVIDIA Quadro FX 4500
  2293. [0x00CD] = { baseQualityLevel = Quality.Low }, -- NVIDIA Quadro FX 3450/4000 SDI
  2294. [0x00CE] = { baseQualityLevel = Quality.Low }, -- NVIDIA Quadro FX 1400
  2295. [0x00F8] = { baseQualityLevel = Quality.Low }, -- NVIDIA Quadro FX 3400/4400
  2296. [0x014A] = { baseQualityLevel = Quality.Low }, -- NVIDIA Quadro NVS 440
  2297. [0x014C] = { baseQualityLevel = Quality.Low }, -- NVIDIA Quadro FX 540M
  2298. [0x014D] = { baseQualityLevel = Quality.Low }, -- NVIDIA Quadro FX 550
  2299. [0x014E] = { baseQualityLevel = Quality.Low }, -- NVIDIA Quadro FX 540
  2300. [0x0165] = { baseQualityLevel = Quality.Low }, -- NVIDIA Quadro NVS 285
  2301. [0x0191] = { baseQualityLevel = Quality.Low }, -- NVIDIA GeForce 8800 GTX
  2302. [0x0193] = { baseQualityLevel = Quality.Low }, -- NVIDIA GeForce 8800 GTS
  2303. [0x0194] = { baseQualityLevel = Quality.Low }, -- NVIDIA GeForce 8800 Ultra
  2304. [0x0197] = { baseQualityLevel = Quality.Low }, -- NVIDIA Tesla C870
  2305. [0x019D] = { baseQualityLevel = Quality.Low }, -- NVIDIA Quadro FX 5600
  2306. [0x019E] = { baseQualityLevel = Quality.Low }, -- NVIDIA Quadro FX 4600
  2307. [0x01DB] = { baseQualityLevel = Quality.Low }, -- NVIDIA Quadro NVS 120M
  2308. [0x01DE] = { baseQualityLevel = Quality.Low }, -- NVIDIA Quadro FX 350
  2309. [0x0245] = { baseQualityLevel = Quality.Low }, -- NVIDIA Quadro NVS 210S / NVIDIA GeForce 6150LE
  2310. [0x029C] = { baseQualityLevel = Quality.Low }, -- NVIDIA Quadro FX 5500
  2311. [0x029D] = { baseQualityLevel = Quality.Low }, -- NVIDIA Quadro FX 3500
  2312. [0x029E] = { baseQualityLevel = Quality.Low }, -- NVIDIA Quadro FX 1500
  2313. [0x029F] = { baseQualityLevel = Quality.Low }, -- NVIDIA Quadro FX 4500 X2
  2314. [0x039C] = { baseQualityLevel = Quality.Low }, -- NVIDIA Quadro FX 560M
  2315. [0x039E] = { baseQualityLevel = Quality.Low }, -- NVIDIA Quadro FX 560
  2316. [0x0400] = { baseQualityLevel = Quality.Low }, -- NVIDIA GeForce 8600 GTS
  2317. [0x0401] = { baseQualityLevel = Quality.Low }, -- NVIDIA GeForce 8600 GT
  2318. [0x0402] = { baseQualityLevel = Quality.Low }, -- NVIDIA GeForce 8600 GT
  2319. [0x0403] = { baseQualityLevel = Quality.Low }, -- NVIDIA GeForce 8600 GS
  2320. [0x0404] = { baseQualityLevel = Quality.Low }, -- NVIDIA GeForce 8400 GS
  2321. [0x0405] = { baseQualityLevel = Quality.Low }, -- NVIDIA GeForce 9500M GS
  2322. [0x0406] = { baseQualityLevel = Quality.Low }, -- NVIDIA GeForce 8300 GS
  2323. [0x0407] = { baseQualityLevel = Quality.Low }, -- NVIDIA GeForce 8600M GT
  2324. [0x0408] = { baseQualityLevel = Quality.Low }, -- NVIDIA GeForce 9650M GS
  2325. [0x0409] = { baseQualityLevel = Quality.Low }, -- NVIDIA GeForce 8700M GT
  2326. [0x040A] = { baseQualityLevel = Quality.Low }, -- NVIDIA Quadro FX 370
  2327. [0x040B] = { baseQualityLevel = Quality.Low }, -- NVIDIA Quadro NVS 320M
  2328. [0x040C] = { baseQualityLevel = Quality.Low }, -- NVIDIA Quadro FX 570M
  2329. [0x040D] = { baseQualityLevel = Quality.Low }, -- NVIDIA Quadro FX 1600M
  2330. [0x040E] = { baseQualityLevel = Quality.Low }, -- NVIDIA Quadro FX 570
  2331. [0x040F] = { baseQualityLevel = Quality.Low }, -- NVIDIA Quadro FX 1700
  2332. [0x0410] = { baseQualityLevel = Quality.Low }, -- NVIDIA GeForce GT 330
  2333. [0x0420] = { baseQualityLevel = Quality.Low }, -- NVIDIA GeForce 8400 SE
  2334. [0x0421] = { baseQualityLevel = Quality.Low }, -- NVIDIA GeForce 8500 GT
  2335. [0x0422] = { baseQualityLevel = Quality.Low }, -- NVIDIA GeForce 8400 GS
  2336. [0x0423] = { baseQualityLevel = Quality.Low }, -- NVIDIA GeForce 8300 GS
  2337. [0x0424] = { baseQualityLevel = Quality.Low }, -- NVIDIA GeForce 8400 GS
  2338. [0x0425] = { baseQualityLevel = Quality.Low }, -- NVIDIA GeForce 8600M GS
  2339. [0x0426] = { baseQualityLevel = Quality.Low }, -- NVIDIA GeForce 8400M GT
  2340. [0x0427] = { baseQualityLevel = Quality.Low }, -- NVIDIA GeForce 8400M GS
  2341. [0x0428] = { baseQualityLevel = Quality.Low }, -- NVIDIA GeForce 8400M G
  2342. [0x0429] = { baseQualityLevel = Quality.Low }, -- NVIDIA Quadro NVS 140M
  2343. [0x042A] = { baseQualityLevel = Quality.Low }, -- NVIDIA Quadro NVS 130M
  2344. [0x042B] = { baseQualityLevel = Quality.Low }, -- NVIDIA Quadro NVS 135M
  2345. [0x042C] = { baseQualityLevel = Quality.Low }, -- NVIDIA GeForce 9400 GT
  2346. [0x042D] = { baseQualityLevel = Quality.Low }, -- NVIDIA Quadro FX 360M
  2347. [0x042E] = { baseQualityLevel = Quality.Low }, -- NVIDIA GeForce 9300M G
  2348. [0x042F] = { baseQualityLevel = Quality.Low }, -- NVIDIA Quadro NVS 290
  2349. [0x053A] = { baseQualityLevel = Quality.Low }, -- NVIDIA GeForce 7050 PV / NVIDIA nForce 630a
  2350. [0x053B] = { baseQualityLevel = Quality.Low }, -- NVIDIA GeForce 7050 PV / NVIDIA nForce 630a
  2351. [0x053E] = { baseQualityLevel = Quality.Low }, -- NVIDIA GeForce 7025 / NVIDIA nForce 630a
  2352. [0x05E0] = { baseQualityLevel = Quality.High }, -- NVIDIA GeForce GTX 295
  2353. [0x05E1] = { baseQualityLevel = Quality.Medium }, -- NVIDIA GeForce GTX 280
  2354. [0x05E2] = { baseQualityLevel = Quality.Medium }, -- NVIDIA GeForce GTX 260
  2355. [0x05E3] = { baseQualityLevel = Quality.Medium }, -- NVIDIA GeForce GTX 285
  2356. [0x05E6] = { baseQualityLevel = Quality.Medium }, -- NVIDIA GeForce GTX 275
  2357. [0x05E7] = { baseQualityLevel = Quality.Medium }, -- NVIDIA Tesla C1060
  2358. [0x05EA] = { baseQualityLevel = Quality.Medium }, -- NVIDIA GeForce GTX 260
  2359. [0x05EB] = { baseQualityLevel = Quality.High }, -- NVIDIA GeForce GTX 295
  2360. [0x05F9] = { baseQualityLevel = Quality.Medium }, -- NVIDIA Quadro CX
  2361. [0x05FD] = { baseQualityLevel = Quality.Medium }, -- NVIDIA Quadro FX 5800
  2362. [0x05FE] = { baseQualityLevel = Quality.Medium }, -- NVIDIA Quadro FX 4800
  2363. [0x05FF] = { baseQualityLevel = Quality.Medium }, -- NVIDIA Quadro FX 3800
  2364. [0x0600] = { baseQualityLevel = Quality.Low }, -- NVIDIA GeForce 8800 GTS 512
  2365. [0x0601] = { baseQualityLevel = Quality.Low }, -- NVIDIA GeForce 9800 GT
  2366. [0x0602] = { baseQualityLevel = Quality.Low }, -- NVIDIA GeForce 8800 GT
  2367. [0x0603] = { baseQualityLevel = Quality.Low }, -- NVIDIA GeForce GT 230
  2368. [0x0604] = { baseQualityLevel = Quality.Low }, -- NVIDIA GeForce 9800 GX2
  2369. [0x0605] = { baseQualityLevel = Quality.Low }, -- NVIDIA GeForce 9800 GT
  2370. [0x0606] = { baseQualityLevel = Quality.Low }, -- NVIDIA GeForce 8800 GS
  2371. [0x0607] = { baseQualityLevel = Quality.Low }, -- NVIDIA GeForce GTS 240
  2372. [0x0608] = { baseQualityLevel = Quality.Low }, -- NVIDIA GeForce 9800M GTX
  2373. [0x0609] = { baseQualityLevel = Quality.Low }, -- NVIDIA GeForce 8800M GTS
  2374. [0x060A] = { baseQualityLevel = Quality.Low }, -- NVIDIA GeForce GTX 280M
  2375. [0x060B] = { baseQualityLevel = Quality.Low }, -- NVIDIA GeForce 9800M GT
  2376. [0x060C] = { baseQualityLevel = Quality.Low }, -- NVIDIA GeForce 8800M GTX
  2377. [0x060F] = { baseQualityLevel = Quality.Low }, -- NVIDIA GeForce GTX 285M
  2378. [0x0610] = { baseQualityLevel = Quality.Low }, -- NVIDIA GeForce 9600 GSO
  2379. [0x0611] = { baseQualityLevel = Quality.Low }, -- NVIDIA GeForce 8800 GT
  2380. [0x0612] = { baseQualityLevel = Quality.Low }, -- NVIDIA GeForce 9800 GTX/9800 GTX+
  2381. [0x0613] = { baseQualityLevel = Quality.Low }, -- NVIDIA GeForce 9800 GTX+
  2382. [0x0614] = { baseQualityLevel = Quality.Low }, -- NVIDIA GeForce 9800 GT
  2383. [0x0615] = { baseQualityLevel = Quality.Medium }, -- NVIDIA GeForce GTS 250
  2384. [0x0617] = { baseQualityLevel = Quality.Low }, -- NVIDIA GeForce 9800M GTX
  2385. [0x0618] = { baseQualityLevel = Quality.Low }, -- NVIDIA GeForce GTX 260M
  2386. [0x0619] = { baseQualityLevel = Quality.Low }, -- NVIDIA Quadro FX 4700 X2
  2387. [0x061A] = { baseQualityLevel = Quality.Low }, -- NVIDIA Quadro FX 3700
  2388. [0x061B] = { baseQualityLevel = Quality.Low }, -- NVIDIA Quadro VX 200
  2389. [0x061C] = { baseQualityLevel = Quality.Low }, -- NVIDIA Quadro FX 3600M
  2390. [0x061D] = { baseQualityLevel = Quality.Low }, -- NVIDIA Quadro FX 2800M
  2391. [0x061E] = { baseQualityLevel = Quality.Low }, -- NVIDIA Quadro FX 3700M
  2392. [0x061F] = { baseQualityLevel = Quality.Low }, -- NVIDIA Quadro FX 3800M
  2393. [0x0621] = { baseQualityLevel = Quality.Low }, -- NVIDIA GeForce GT 230
  2394. [0x0622] = { baseQualityLevel = Quality.Low }, -- NVIDIA GeForce 9600 GT
  2395. [0x0623] = { baseQualityLevel = Quality.Low }, -- NVIDIA GeForce 9600 GS
  2396. [0x0625] = { baseQualityLevel = Quality.Low }, -- NVIDIA GeForce 9600 GSO 512
  2397. [0x0626] = { baseQualityLevel = Quality.Low }, -- NVIDIA GeForce GT 130
  2398. [0x0627] = { baseQualityLevel = Quality.Low }, -- NVIDIA GeForce GT 140
  2399. [0x0628] = { baseQualityLevel = Quality.Low }, -- NVIDIA GeForce 9800M GTS
  2400. [0x062A] = { baseQualityLevel = Quality.Low }, -- NVIDIA GeForce 9700M GTS
  2401. [0x062B] = { baseQualityLevel = Quality.Low }, -- NVIDIA GeForce 9800M GS
  2402. [0x062C] = { baseQualityLevel = Quality.Low }, -- NVIDIA GeForce 9800M GTS
  2403. [0x062D] = { baseQualityLevel = Quality.Low }, -- NVIDIA GeForce 9600 GT
  2404. [0x062E] = { baseQualityLevel = Quality.Low }, -- NVIDIA GeForce 9600 GT
  2405. [0x0631] = { baseQualityLevel = Quality.Low }, -- NVIDIA GeForce GTS 160M
  2406. [0x0635] = { baseQualityLevel = Quality.Low }, -- NVIDIA GeForce 9600 GSO
  2407. [0x0637] = { baseQualityLevel = Quality.Low }, -- NVIDIA GeForce 9600 GT
  2408. [0x0638] = { baseQualityLevel = Quality.Low }, -- NVIDIA Quadro FX 1800
  2409. [0x063A] = { baseQualityLevel = Quality.Low }, -- NVIDIA Quadro FX 2700M
  2410. [0x0640] = { baseQualityLevel = Quality.Low }, -- NVIDIA GeForce 9500 GT
  2411. [0x0641] = { baseQualityLevel = Quality.Low }, -- NVIDIA GeForce 9400 GT
  2412. [0x0643] = { baseQualityLevel = Quality.Low }, -- NVIDIA GeForce 9500 GT
  2413. [0x0644] = { baseQualityLevel = Quality.Low }, -- NVIDIA GeForce 9500 GS
  2414. [0x0645] = { baseQualityLevel = Quality.Low }, -- NVIDIA GeForce 9500 GS
  2415. [0x0646] = { baseQualityLevel = Quality.Low }, -- NVIDIA GeForce GT 120
  2416. [0x0647] = { baseQualityLevel = Quality.Low }, -- NVIDIA GeForce 9600M GT
  2417. [0x0648] = { baseQualityLevel = Quality.Low }, -- NVIDIA GeForce 9600M GS
  2418. [0x0649] = { baseQualityLevel = Quality.Low }, -- NVIDIA GeForce 9600M GT
  2419. [0x064A] = { baseQualityLevel = Quality.Low }, -- NVIDIA GeForce 9700M GT
  2420. [0x064C] = { baseQualityLevel = Quality.Low }, -- NVIDIA GeForce 9650M GT
  2421. [0x0651] = { baseQualityLevel = Quality.Low }, -- NVIDIA GeForce G 110M
  2422. [0x0652] = { baseQualityLevel = Quality.Low }, -- NVIDIA GeForce GT 130M
  2423. [0x0653] = { baseQualityLevel = Quality.Low }, -- NVIDIA GeForce GT 120M
  2424. [0x0654] = { baseQualityLevel = Quality.Low }, -- NVIDIA GeForce GT 220M
  2425. [0x0655] = { baseQualityLevel = Quality.Low }, -- NVIDIA GeForce GT 120
  2426. [0x0656] = { baseQualityLevel = Quality.Low }, -- NVIDIA GeForce GT 120
  2427. [0x0658] = { baseQualityLevel = Quality.Low }, -- NVIDIA Quadro FX 380
  2428. [0x0659] = { baseQualityLevel = Quality.Low }, -- NVIDIA Quadro FX 580
  2429. [0x065A] = { baseQualityLevel = Quality.Low }, -- NVIDIA Quadro FX 1700M
  2430. [0x065B] = { baseQualityLevel = Quality.Low }, -- NVIDIA GeForce 9400 GT
  2431. [0x065C] = { baseQualityLevel = Quality.Low }, -- NVIDIA Quadro FX 770M
  2432. [0x065F] = { baseQualityLevel = Quality.Low }, -- NVIDIA GeForce G210
  2433. [0x06C0] = { baseQualityLevel = Quality.High }, -- NVIDIA GeForce GTX 480
  2434. [0x06C4] = { baseQualityLevel = Quality.High }, -- NVIDIA GeForce GTX 465
  2435. [0x06CA] = { baseQualityLevel = Quality.High }, -- NVIDIA GeForce GTX 480M
  2436. [0x06CD] = { baseQualityLevel = Quality.High }, -- NVIDIA GeForce GTX 470
  2437. [0x06D1] = { baseQualityLevel = Quality.Medium }, -- NVIDIA Tesla C2050 / C2070
  2438. [0x06D2] = { baseQualityLevel = Quality.Medium }, -- NVIDIA Tesla M2070
  2439. [0x06D8] = { baseQualityLevel = Quality.Medium }, -- NVIDIA Quadro 6000
  2440. [0x06D9] = { baseQualityLevel = Quality.Medium }, -- NVIDIA Quadro 5000
  2441. [0x06DA] = { baseQualityLevel = Quality.Medium }, -- NVIDIA Quadro 5000M
  2442. [0x06DC] = { baseQualityLevel = Quality.Medium }, -- NVIDIA Quadro 6000
  2443. [0x06DD] = { baseQualityLevel = Quality.Medium }, -- NVIDIA Quadro 4000
  2444. [0x06DE] = { baseQualityLevel = Quality.Medium }, -- NVIDIA Tesla T20 Processor
  2445. [0x06DF] = { baseQualityLevel = Quality.Medium }, -- NVIDIA Tesla M2070-Q
  2446. [0x06E0] = { baseQualityLevel = Quality.Low }, -- NVIDIA GeForce 9300 GE
  2447. [0x06E1] = { baseQualityLevel = Quality.Low }, -- NVIDIA GeForce 9300 GS
  2448. [0x06E2] = { baseQualityLevel = Quality.Low }, -- NVIDIA GeForce 8400
  2449. [0x06E3] = { baseQualityLevel = Quality.Low }, -- NVIDIA GeForce 8400 SE
  2450. [0x06E4] = { baseQualityLevel = Quality.Low }, -- NVIDIA GeForce 8400 GS
  2451. [0x06E6] = { baseQualityLevel = Quality.Low }, -- NVIDIA GeForce G100
  2452. [0x06E7] = { baseQualityLevel = Quality.Low }, -- NVIDIA GeForce 9300 SE
  2453. [0x06E8] = { baseQualityLevel = Quality.Low }, -- NVIDIA GeForce 9200M GS
  2454. [0x06E9] = { baseQualityLevel = Quality.Low }, -- NVIDIA GeForce 9300M GS
  2455. [0x06EA] = { baseQualityLevel = Quality.Low }, -- NVIDIA Quadro NVS 150M
  2456. [0x06EB] = { baseQualityLevel = Quality.Low }, -- NVIDIA Quadro NVS 160M
  2457. [0x06EC] = { baseQualityLevel = Quality.Low }, -- NVIDIA GeForce G 105M
  2458. [0x06EF] = { baseQualityLevel = Quality.Low }, -- NVIDIA GeForce G 103M
  2459. [0x06F1] = { baseQualityLevel = Quality.Low }, -- NVIDIA GeForce G105M
  2460. [0x06F8] = { baseQualityLevel = Quality.Low }, -- NVIDIA Quadro NVS 420
  2461. [0x06F9] = { baseQualityLevel = Quality.Low }, -- NVIDIA Quadro FX 370 LP
  2462. [0x06FA] = { baseQualityLevel = Quality.Low }, -- NVIDIA Quadro NVS 450
  2463. [0x06FB] = { baseQualityLevel = Quality.Low }, -- NVIDIA Quadro FX 370M
  2464. [0x06FD] = { baseQualityLevel = Quality.Low }, -- NVIDIA Quadro NVS 295
  2465. [0x06FF] = { baseQualityLevel = Quality.Low }, -- NVIDIA HICx16 + Graphics
  2466. [0x07E0] = { baseQualityLevel = Quality.Low }, -- NVIDIA GeForce 7150 / NVIDIA nForce 630i
  2467. [0x07E1] = { baseQualityLevel = Quality.Low }, -- NVIDIA GeForce 7100 / NVIDIA nForce 630i
  2468. [0x07E2] = { baseQualityLevel = Quality.Low }, -- NVIDIA GeForce 7050 / NVIDIA nForce 630i
  2469. [0x07E3] = { baseQualityLevel = Quality.Low }, -- NVIDIA GeForce 7050 / NVIDIA nForce 610i
  2470. [0x07E5] = { baseQualityLevel = Quality.Low }, -- NVIDIA GeForce 7050 / NVIDIA nForce 620i
  2471. [0x0840] = { baseQualityLevel = Quality.Low }, -- NVIDIA GeForce 8200M
  2472. [0x0844] = { baseQualityLevel = Quality.Low }, -- NVIDIA GeForce 9100M G
  2473. [0x0845] = { baseQualityLevel = Quality.Low }, -- NVIDIA GeForce 8200M G
  2474. [0x0846] = { baseQualityLevel = Quality.Low }, -- NVIDIA GeForce 9200
  2475. [0x0847] = { baseQualityLevel = Quality.Low }, -- NVIDIA GeForce 9100
  2476. [0x0848] = { baseQualityLevel = Quality.Low }, -- NVIDIA GeForce 8300
  2477. [0x0849] = { baseQualityLevel = Quality.Low }, -- NVIDIA GeForce 8200
  2478. [0x084A] = { baseQualityLevel = Quality.Low }, -- NVIDIA nForce 730a
  2479. [0x084B] = { baseQualityLevel = Quality.Low }, -- NVIDIA GeForce 9200
  2480. [0x084C] = { baseQualityLevel = Quality.Low }, -- NVIDIA nForce 980a/780a SLI
  2481. [0x084D] = { baseQualityLevel = Quality.Low }, -- NVIDIA nForce 750a SLI
  2482. [0x084F] = { baseQualityLevel = Quality.Low }, -- NVIDIA GeForce 8100 / nForce 720a
  2483. [0x0860] = { baseQualityLevel = Quality.Low }, -- NVIDIA GeForce 9400
  2484. [0x0861] = { baseQualityLevel = Quality.Low }, -- NVIDIA GeForce 9400
  2485. [0x0862] = { baseQualityLevel = Quality.Low }, -- NVIDIA GeForce 9400M G
  2486. [0x0863] = { baseQualityLevel = Quality.Low }, -- NVIDIA GeForce 9400M
  2487. [0x0864] = { baseQualityLevel = Quality.Low }, -- NVIDIA GeForce 9300
  2488. [0x0865] = { baseQualityLevel = Quality.Low }, -- NVIDIA ION
  2489. [0x0866] = { baseQualityLevel = Quality.Low }, -- NVIDIA GeForce 9400M G
  2490. [0x0867] = { baseQualityLevel = Quality.Low }, -- NVIDIA GeForce 9400
  2491. [0x0868] = { baseQualityLevel = Quality.Low }, -- NVIDIA nForce 760i SLI
  2492. [0x0869] = { baseQualityLevel = Quality.Low }, -- NVIDIA GeForce 9400
  2493. [0x086A] = { baseQualityLevel = Quality.Low }, -- NVIDIA GeForce 9400
  2494. [0x086C] = { baseQualityLevel = Quality.Low }, -- NVIDIA GeForce 9300 / nForce 730i
  2495. [0x086D] = { baseQualityLevel = Quality.Low }, -- NVIDIA GeForce 9200
  2496. [0x086E] = { baseQualityLevel = Quality.Low }, -- NVIDIA GeForce 9100M G
  2497. [0x086F] = { baseQualityLevel = Quality.Low }, -- NVIDIA GeForce 8200M G
  2498. [0x0870] = { baseQualityLevel = Quality.Low }, -- NVIDIA GeForce 9400M
  2499. [0x0871] = { baseQualityLevel = Quality.Low }, -- NVIDIA GeForce 9200
  2500. [0x0872] = { baseQualityLevel = Quality.Low }, -- NVIDIA GeForce G102M
  2501. [0x0873] = { baseQualityLevel = Quality.Low }, -- NVIDIA GeForce G102M
  2502. [0x0874] = { baseQualityLevel = Quality.Low }, -- NVIDIA ION
  2503. [0x0876] = { baseQualityLevel = Quality.Low }, -- NVIDIA ION
  2504. [0x087A] = { baseQualityLevel = Quality.Low }, -- NVIDIA GeForce 9400
  2505. [0x087D] = { baseQualityLevel = Quality.Low }, -- NVIDIA ION
  2506. [0x087E] = { baseQualityLevel = Quality.Low }, -- NVIDIA ION LE
  2507. [0x087F] = { baseQualityLevel = Quality.Low }, -- NVIDIA ION LE
  2508. [0x08A0] = { baseQualityLevel = Quality.Low }, -- NVIDIA GeForce 320M
  2509. [0x08A4] = { baseQualityLevel = Quality.Low }, -- NVIDIA GeForce 320M
  2510. [0x0A20] = { baseQualityLevel = Quality.Low }, -- NVIDIA GeForce GT 220
  2511. [0x0A22] = { baseQualityLevel = Quality.Low }, -- NVIDIA GeForce 315
  2512. [0x0A23] = { baseQualityLevel = Quality.Low }, -- NVIDIA GeForce 210
  2513. [0x0A26] = { baseQualityLevel = Quality.Low }, -- NVIDIA GeForce 405
  2514. [0x0A27] = { baseQualityLevel = Quality.Low }, -- NVIDIA GeForce 405
  2515. [0x0A28] = { baseQualityLevel = Quality.Low }, -- NVIDIA GeForce GT 230M
  2516. [0x0A29] = { baseQualityLevel = Quality.Low }, -- NVIDIA GeForce GT 330M
  2517. [0x0A2A] = { baseQualityLevel = Quality.Low }, -- NVIDIA GeForce GT 230M
  2518. [0x0A2B] = { baseQualityLevel = Quality.Low }, -- NVIDIA GeForce GT 330M
  2519. [0x0A2C] = { baseQualityLevel = Quality.Low }, -- NVIDIA NVS 5100M
  2520. [0x0A2D] = { baseQualityLevel = Quality.Low }, -- NVIDIA GeForce GT 320M
  2521. [0x0A34] = { baseQualityLevel = Quality.Low }, -- NVIDIA GeForce GT 240M
  2522. [0x0A35] = { baseQualityLevel = Quality.Low }, -- NVIDIA GeForce GT 325M
  2523. [0x0A38] = { baseQualityLevel = Quality.Low }, -- NVIDIA Quadro 400
  2524. [0x0A3C] = { baseQualityLevel = Quality.Low }, -- NVIDIA Quadro FX 880M
  2525. [0x0A60] = { baseQualityLevel = Quality.Low }, -- NVIDIA GeForce G210
  2526. [0x0A62] = { baseQualityLevel = Quality.Low }, -- NVIDIA GeForce 205
  2527. [0x0A63] = { baseQualityLevel = Quality.Low }, -- NVIDIA GeForce 310
  2528. [0x0A64] = { baseQualityLevel = Quality.Low }, -- NVIDIA ION
  2529. [0x0A65] = { baseQualityLevel = Quality.Low }, -- NVIDIA GeForce 210
  2530. [0x0A66] = { baseQualityLevel = Quality.Low }, -- NVIDIA GeForce 310
  2531. [0x0A67] = { baseQualityLevel = Quality.Low }, -- NVIDIA GeForce 315
  2532. [0x0A68] = { baseQualityLevel = Quality.Low }, -- NVIDIA GeForce G105M
  2533. [0x0A69] = { baseQualityLevel = Quality.Low }, -- NVIDIA GeForce G105M
  2534. [0x0A6A] = { baseQualityLevel = Quality.Low }, -- NVIDIA NVS 2100M
  2535. [0x0A6C] = { baseQualityLevel = Quality.Low }, -- NVIDIA NVS 3100M
  2536. [0x0A6E] = { baseQualityLevel = Quality.Low }, -- NVIDIA GeForce 305M
  2537. [0x0A6F] = { baseQualityLevel = Quality.Low }, -- NVIDIA ION
  2538. [0x0A70] = { baseQualityLevel = Quality.Low }, -- NVIDIA GeForce 310M
  2539. [0x0A71] = { baseQualityLevel = Quality.Low }, -- NVIDIA GeForce 305M
  2540. [0x0A72] = { baseQualityLevel = Quality.Low }, -- NVIDIA GeForce 310M
  2541. [0x0A73] = { baseQualityLevel = Quality.Low }, -- NVIDIA GeForce 305M
  2542. [0x0A74] = { baseQualityLevel = Quality.Low }, -- NVIDIA GeForce G210M
  2543. [0x0A75] = { baseQualityLevel = Quality.Low }, -- NVIDIA GeForce 310M
  2544. [0x0A76] = { baseQualityLevel = Quality.Low }, -- NVIDIA ION
  2545. [0x0A78] = { baseQualityLevel = Quality.Low }, -- NVIDIA Quadro FX 380 LP
  2546. [0x0A7A] = { baseQualityLevel = Quality.Low }, -- NVIDIA GeForce 315M
  2547. [0x0A7C] = { baseQualityLevel = Quality.Low }, -- NVIDIA Quadro FX 380M
  2548. [0x0CA0] = { baseQualityLevel = Quality.Low }, -- NVIDIA GeForce GT 330
  2549. [0x0CA2] = { baseQualityLevel = Quality.Low }, -- NVIDIA GeForce GT 320
  2550. [0x0CA3] = { baseQualityLevel = Quality.Low }, -- NVIDIA GeForce GT 240
  2551. [0x0CA4] = { baseQualityLevel = Quality.Low }, -- NVIDIA GeForce GT 340
  2552. [0x0CA5] = { baseQualityLevel = Quality.Low }, -- NVIDIA GeForce GT 220
  2553. [0x0CA7] = { baseQualityLevel = Quality.Low }, -- NVIDIA GeForce GT 330
  2554. [0x0CA9] = { baseQualityLevel = Quality.Low }, -- NVIDIA GeForce GTS 250M
  2555. [0x0CAC] = { baseQualityLevel = Quality.Low }, -- NVIDIA GeForce GT 220
  2556. [0x0CAF] = { baseQualityLevel = Quality.Low }, -- NVIDIA GeForce GT 335M
  2557. [0x0CB0] = { baseQualityLevel = Quality.Low }, -- NVIDIA GeForce GTS 350M
  2558. [0x0CB1] = { baseQualityLevel = Quality.Low }, -- NVIDIA GeForce GTS 360M
  2559. [0x0CBC] = { baseQualityLevel = Quality.Low }, -- NVIDIA Quadro FX 1800M
  2560. [0x0DC0] = { baseQualityLevel = Quality.Medium }, -- NVIDIA GeForce GT 440
  2561. [0x0DC4] = { baseQualityLevel = Quality.Medium }, -- NVIDIA GeForce GTS 450
  2562. [0x0DC5] = { baseQualityLevel = Quality.Medium }, -- NVIDIA GeForce GTS 450
  2563. [0x0DC6] = { baseQualityLevel = Quality.Medium }, -- NVIDIA GeForce GTS 450
  2564. [0x0DCD] = { baseQualityLevel = Quality.Medium }, -- NVIDIA GeForce GT 555M
  2565. [0x0DCE] = { baseQualityLevel = Quality.Medium }, -- NVIDIA GeForce GT 555M
  2566. [0x0DD1] = { baseQualityLevel = Quality.Medium }, -- NVIDIA GeForce GTX 460M
  2567. [0x0DD2] = { baseQualityLevel = Quality.Medium }, -- NVIDIA GeForce GT 445M
  2568. [0x0DD3] = { baseQualityLevel = Quality.Medium }, -- NVIDIA GeForce GT 435M
  2569. [0x0DD6] = { baseQualityLevel = Quality.High }, -- NVIDIA GeForce GT 550M
  2570. [0x0DD8] = { baseQualityLevel = Quality.Medium }, -- NVIDIA Quadro 2000
  2571. [0x0DDA] = { baseQualityLevel = Quality.Medium }, -- NVIDIA Quadro 2000M
  2572. [0x0DE0] = { baseQualityLevel = Quality.Medium }, -- NVIDIA GeForce GT 440
  2573. [0x0DE1] = { baseQualityLevel = Quality.Medium }, -- NVIDIA GeForce GT 430
  2574. [0x0DE2] = { baseQualityLevel = Quality.Medium }, -- NVIDIA GeForce GT 420
  2575. [0x0DE5] = { baseQualityLevel = Quality.Medium }, -- NVIDIA GeForce GT 530
  2576. [0x0DEC] = { baseQualityLevel = Quality.Medium }, -- NVIDIA GeForce GT 525M
  2577. [0x0DED] = { baseQualityLevel = Quality.Medium }, -- NVIDIA GeForce GT 520M
  2578. [0x0DEE] = { baseQualityLevel = Quality.Medium }, -- NVIDIA GeForce GT 415M
  2579. [0x0DF0] = { baseQualityLevel = Quality.Medium }, -- NVIDIA GeForce GT 425M
  2580. [0x0DF1] = { baseQualityLevel = Quality.Medium }, -- NVIDIA GeForce GT 420M
  2581. [0x0DF2] = { baseQualityLevel = Quality.Medium }, -- NVIDIA GeForce GT 435M
  2582. [0x0DF3] = { baseQualityLevel = Quality.Medium }, -- NVIDIA GeForce GT 420M
  2583. [0x0DF4] = { baseQualityLevel = Quality.Medium }, -- NVIDIA GeForce GT 540M
  2584. [0x0DF5] = { baseQualityLevel = Quality.Medium }, -- NVIDIA GeForce GT 525M
  2585. [0x0DF6] = { baseQualityLevel = Quality.Medium }, -- NVIDIA GeForce GT 550M
  2586. [0x0DF7] = { baseQualityLevel = Quality.Medium }, -- NVIDIA GeForce GT 520M
  2587. [0x0DF8] = { baseQualityLevel = Quality.Medium }, -- NVIDIA Quadro 600
  2588. [0x0DFA] = { baseQualityLevel = Quality.Medium }, -- NVIDIA Quadro 1000M
  2589. [0x0E22] = { baseQualityLevel = Quality.High }, -- NVIDIA GeForce GTX 460
  2590. [0x0E23] = { baseQualityLevel = Quality.High }, -- NVIDIA GeForce GTX 460 SE
  2591. [0x0E24] = { baseQualityLevel = Quality.High }, -- NVIDIA GeForce GTX 460
  2592. [0x0E30] = { baseQualityLevel = Quality.High }, -- NVIDIA GeForce GTX 470M
  2593. [0x0E31] = { baseQualityLevel = Quality.High }, -- NVIDIA GeForce GTX 485M
  2594. [0x0E3A] = { baseQualityLevel = Quality.Medium }, -- NVIDIA Quadro 3000M
  2595. [0x0E3B] = { baseQualityLevel = Quality.Medium }, -- NVIDIA Quadro 4000M
  2596. [0x1040] = { baseQualityLevel = Quality.Medium }, -- NVIDIA GeForce GT 520
  2597. [0x1050] = { baseQualityLevel = Quality.Medium }, -- NVIDIA GeForce GT 520M
  2598. [0x1054] = { baseQualityLevel = Quality.Medium }, -- NVIDIA GeForce 410M
  2599. [0x1056] = { baseQualityLevel = Quality.Medium }, -- NVIDIA NVS 4200M
  2600. [0x1057] = { baseQualityLevel = Quality.Medium }, -- NVIDIA NVS 4200M
  2601. [0x1080] = { baseQualityLevel = Quality.High }, -- NVIDIA GeForce GTX 580
  2602. [0x1081] = { baseQualityLevel = Quality.High }, -- NVIDIA GeForce GTX 570
  2603. [0x1082] = { baseQualityLevel = Quality.High }, -- NVIDIA GeForce GTX 560 Ti
  2604. [0x1084] = { baseQualityLevel = Quality.High }, -- NVIDIA GeForce GTX 560
  2605. [0x1086] = { baseQualityLevel = Quality.High }, -- NVIDIA GeForce GTX 570
  2606. [0x1088] = { baseQualityLevel = Quality.High }, -- NVIDIA GeForce GTX 590
  2607. [0x1089] = { baseQualityLevel = Quality.High }, -- NVIDIA GeForce GTX 580
  2608. [0x1091] = { baseQualityLevel = Quality.Medium }, -- NVIDIA Tesla M2090
  2609. [0x109A] = { baseQualityLevel = Quality.Medium }, -- NVIDIA Quadro 5010M
  2610. [0x109B] = { baseQualityLevel = Quality.Medium }, -- NVIDIA Quadro 7000
  2611. [0x10C0] = { baseQualityLevel = Quality.Medium }, -- NVIDIA GeForce 9300 GS
  2612. [0x10C3] = { baseQualityLevel = Quality.Medium }, -- NVIDIA GeForce 8400GS
  2613. [0x10C5] = { baseQualityLevel = Quality.Medium }, -- NVIDIA GeForce 405
  2614. [0x10D8] = { baseQualityLevel = Quality.Medium }, -- NVIDIA NVS 300
  2615. [0x1200] = { baseQualityLevel = Quality.High }, -- NVIDIA GeForce GTX 560 Ti
  2616. [0x1201] = { baseQualityLevel = Quality.High }, -- NVIDIA GeForce GTX 560
  2617. [0x1241] = { baseQualityLevel = Quality.Medium }, -- NVIDIA GeForce GT 545
  2618. [0x1243] = { baseQualityLevel = Quality.Medium }, -- NVIDIA GeForce GT 545
  2619. [0x1244] = { baseQualityLevel = Quality.High }, -- NVIDIA GeForce GTX 550 Ti
  2620. [0x1245] = { baseQualityLevel = Quality.Medium }, -- NVIDIA GeForce GTS 450
  2621. [0x1251] = { baseQualityLevel = Quality.High }, -- NVIDIA GeForce GTX 560M
  2622. }
  2623.  
  2624. --[[
  2625. Scripts/UserOptions/Options.lua
  2626. ]]--
  2627.  
  2628. core = require "Frost.Core"
  2629. logging = require "Frost.Logging"
  2630.  
  2631. levelName = currentGameLevel or cmdLineOption(\'level\') or Game.Level
  2632. if levelName then
  2633. -- Level names without slashes are assumed to be shorthand for
  2634. -- Levels/name/name to go with Venice\'s epic level naming convention
  2635. if not string.find(levelName, "/") then
  2636. levelName = "Levels/" .. levelName .. "/" .. levelName
  2637. end
  2638.  
  2639. Game.FastStartupEnable = true
  2640. if not Game.Level then
  2641. Game.Level = levelName
  2642. end
  2643. end
  2644.  
  2645.  
  2646. function applySettings(settings)
  2647. core.parseKeyValueCfgString(settings, _G)
  2648. end
  2649.  
  2650. function applyQualitySettings(name, qualityMap)
  2651. local quality = settings[name]
  2652. if quality == nil then
  2653. log:error("Invalid setting \'" .. name .. "\'")
  2654. return
  2655. end
  2656.  
  2657. local consoleCommands = qualityMap[quality]
  2658. if consoleCommands == nil then
  2659. log:error("Could not find console settings for \'" .. name .. "\' with quality " .. quality)
  2660. else
  2661. log:info("setting \'" .. name .. "\': " .. quality)
  2662. applySettings(consoleCommands)
  2663. end
  2664. end
  2665.  
  2666. dofile("Scripts/UserOptions/Options/Graphics.lua")
  2667. dofile("Scripts/UserOptions/Options/Physics.lua")
  2668. dofile("Scripts/UserOptions/Options/Sound.lua")
  2669. dofile("Scripts/UserOptions/Options/Animations.lua")
  2670.  
  2671. applySettings(deviceSettings.consoleOverrides or "")
  2672.  
  2673. if not cmdLineOption(\'noLocalCfg\', false) then
  2674. core.readKeyValueCfg("/local/local.cfg", _G)
  2675. end
  2676.  
  2677. if allowCommandlineSettings then
  2678. for index,option in ipairs(commandLine) do
  2679. local table,member = string.match(option, "^%-(%w+)%.(%w+)")
  2680.  
  2681. if table and member then
  2682. local value = commandLine[index+1]
  2683. if not _G[table] then _G[table] = {} end
  2684. _G[table][member] = value
  2685. else
  2686. local varName = string.match(option, "^%-([%w-]+)")
  2687. if varName then
  2688. local value = commandLine[index+1]
  2689. if value then
  2690. _G[varName] = value
  2691. end
  2692. end
  2693. end
  2694. end
  2695. end
  2696.  
  2697. --[[
  2698. Scripts/UserOptions/Options/Animations.lua
  2699. ]]--
  2700.  
  2701. local quality = settings[\'AnimationQuality\']
  2702. log:info("setting animation quality : "..quality)
  2703.  
  2704. -- IMPORTANT:
  2705. -- GameAnimation.TemporalLoddingFirstDistance *must* be slighly larger than the
  2706. -- distance where IK is disabled in the animation project (EnableFootplanting_ESIG)
  2707. -- for all quality levels.
  2708.  
  2709. if(quality > 0.8) then
  2710. applySettings([=[
  2711.  
  2712. GameAnimation.TemporalLoddingFirstDistance 31.0
  2713. GameAnimation.TemporalLoddingSecondDistance 40.0
  2714. GameAnimation.TemporalLoddingThirdDistance 60.0
  2715. GameAnimation.TemporalLoddingFourthDistance 90.0
  2716. GameAnimation.TemporalLoddingFifthDistance 120.0
  2717. GameAnimation.TemporalLoddingSixthDistance 208.0
  2718.  
  2719. GameAnimation.TemporalLoddingFirstDeltaTime = 0.02
  2720. GameAnimation.TemporalLoddingSecondDeltaTime = 0.04
  2721. GameAnimation.TemporalLoddingThirdDeltaTime = 0.06
  2722. GameAnimation.TemporalLoddingFourthDeltaTime = 0.08
  2723. GameAnimation.TemporalLoddingFifthDeltaTime = 0.10
  2724. GameAnimation.TemporalLoddingSixthDeltaTime = 0.12
  2725.  
  2726. ]=])
  2727. else
  2728. applySettings([=[
  2729.  
  2730. GameAnimation.TemporalLoddingFirstDistance 31.0
  2731. GameAnimation.TemporalLoddingSecondDistance 40.0
  2732. GameAnimation.TemporalLoddingThirdDistance 50.0
  2733. GameAnimation.TemporalLoddingFourthDistance 90.0
  2734. GameAnimation.TemporalLoddingFifthDistance 120.0
  2735. GameAnimation.TemporalLoddingSixthDistance 208.0
  2736.  
  2737. GameAnimation.TemporalLoddingFirstDeltaTime = 0.02
  2738. GameAnimation.TemporalLoddingSecondDeltaTime = 0.04
  2739. GameAnimation.TemporalLoddingThirdDeltaTime = 0.06
  2740. GameAnimation.TemporalLoddingFourthDeltaTime = 0.08
  2741. GameAnimation.TemporalLoddingFifthDeltaTime = 0.10
  2742. GameAnimation.TemporalLoddingSixthDeltaTime = 0.12
  2743.  
  2744. ]=])
  2745. end
  2746.  
  2747. --[[
  2748. Scripts/UserOptions/Options/Graphics.lua
  2749. ]]--
  2750.  
  2751. ------ Common settings for all quality levels
  2752. applySettings([=[
  2753. ]=])
  2754.  
  2755.  
  2756. ------ Texture Quality
  2757. applyQualitySettings(\'TextureQuality\', {
  2758. -- up to 512 mb
  2759. [Quality.Low]=[=[
  2760. Texture.SkipMipmapCount 2
  2761. TextureStreaming.PoolSize 150000
  2762. TerrainStreaming.HeightfieldAtlasSampleCountXFactor 1
  2763. TerrainStreaming.HeightfieldAtlasSampleCountYFactor 1
  2764. TerrainStreaming.MaskAtlasSampleCountXFactor 1
  2765. TerrainStreaming.MaskAtlasSampleCountYFactor 1
  2766. TerrainStreaming.ColorAtlasSampleCountXFactor 1
  2767. TerrainStreaming.ColorAtlasSampleCountYFactor 1
  2768. VisualTerrain.TextureAtlasSampleCountXFactor 1
  2769. VisualTerrain.TextureAtlasSampleCountYFactor 1
  2770. VisualTerrain.TextureRenderJobCount 1
  2771. VisualTerrain.TextureRenderJobsLaunchedPerFrameCountMax 1
  2772. VisualTerrain.Decal3dFarDrawDistanceScaleFactor 1.0
  2773. ]=],
  2774.  
  2775. -- up to 768 mb
  2776. [Quality.Medium]=[=[
  2777. Texture.SkipMipmapCount 1
  2778. TextureStreaming.PoolSize 200000
  2779. TerrainStreaming.HeightfieldAtlasSampleCountXFactor 1
  2780. TerrainStreaming.HeightfieldAtlasSampleCountYFactor 2
  2781. TerrainStreaming.MaskAtlasSampleCountXFactor 1
  2782. TerrainStreaming.MaskAtlasSampleCountYFactor 2
  2783. TerrainStreaming.ColorAtlasSampleCountXFactor 1
  2784. TerrainStreaming.ColorAtlasSampleCountYFactor 2
  2785. VisualTerrain.TextureAtlasSampleCountXFactor 1
  2786. VisualTerrain.TextureAtlasSampleCountYFactor 2
  2787. VisualTerrain.TextureRenderJobCount 2
  2788. VisualTerrain.TextureRenderJobsLaunchedPerFrameCountMax 2
  2789. VisualTerrain.Decal3dFarDrawDistanceScaleFactor 1.2
  2790. ]=],
  2791.  
  2792. -- up to 1G
  2793. [Quality.High]=[=[
  2794. Texture.SkipMipmapCount 0
  2795. TextureStreaming.PoolSize 300000
  2796. TerrainStreaming.HeightfieldAtlasSampleCountXFactor 1
  2797. TerrainStreaming.HeightfieldAtlasSampleCountYFactor 2
  2798. TerrainStreaming.MaskAtlasSampleCountXFactor 1
  2799. TerrainStreaming.MaskAtlasSampleCountYFactor 2
  2800. TerrainStreaming.ColorAtlasSampleCountXFactor 1
  2801. TerrainStreaming.ColorAtlasSampleCountYFactor 2
  2802. VisualTerrain.TextureAtlasSampleCountXFactor 1
  2803. VisualTerrain.TextureAtlasSampleCountYFactor 2
  2804. VisualTerrain.TextureRenderJobCount 4
  2805. VisualTerrain.TextureRenderJobsLaunchedPerFrameCountMax 4
  2806. VisualTerrain.Decal3dFarDrawDistanceScaleFactor 1.7
  2807. ]=],
  2808.  
  2809. -- 1 Gb or more
  2810. [Quality.Ultra]=[=[
  2811. Texture.SkipMipmapCount 0
  2812. TextureStreaming.PoolSize 500000
  2813. TerrainStreaming.HeightfieldAtlasSampleCountXFactor 2
  2814. TerrainStreaming.HeightfieldAtlasSampleCountYFactor 2
  2815. TerrainStreaming.MaskAtlasSampleCountXFactor 2
  2816. TerrainStreaming.MaskAtlasSampleCountYFactor 2
  2817. TerrainStreaming.ColorAtlasSampleCountXFactor 2
  2818. TerrainStreaming.ColorAtlasSampleCountYFactor 2
  2819. VisualTerrain.TextureAtlasSampleCountXFactor 2
  2820. VisualTerrain.TextureAtlasSampleCountYFactor 2
  2821. VisualTerrain.TextureRenderJobCount 4
  2822. VisualTerrain.TextureRenderJobsLaunchedPerFrameCountMax 4
  2823. VisualTerrain.Decal3dFarDrawDistanceScaleFactor 2
  2824. ]=],
  2825. })
  2826.  
  2827. ------ Mesh Quality
  2828. applyQualitySettings(\'MeshQuality\', {
  2829. [Quality.Low]=[=[
  2830. WorldRender.CullScreenAreaScale 1
  2831. Mesh.GlobalLodScale 1
  2832. Mesh.ShadowDistanceScale 1
  2833. MeshStreaming.PoolSize 100000
  2834.  
  2835. VegetationSystem.UseShadowLodOffset 1
  2836. VegetationSystem.MaxActiveDistance 100
  2837. VegetationSystem.MaxPreSimsPerJob 2
  2838. VegetationSystem.SimulationMemKbClient 2048
  2839.  
  2840. Render.EdgeModelViewDistance 50
  2841. ]=],
  2842. [Quality.Medium]=[=[
  2843. WorldRender.CullScreenAreaScale 1.7
  2844. Mesh.GlobalLodScale 1.7
  2845. Mesh.ShadowDistanceScale 1.7
  2846. MeshStreaming.PoolSize 100000
  2847.  
  2848. VegetationSystem.UseShadowLodOffset 0
  2849. VegetationSystem.MaxActiveDistance 200
  2850. VegetationSystem.MaxPreSimsPerJob 3
  2851. VegetationSystem.SimulationMemKbClient 2048
  2852.  
  2853. Render.EdgeModelViewDistance 70
  2854. ]=],
  2855. [Quality.High]=[=[
  2856. WorldRender.CullScreenAreaScale 3
  2857. Mesh.GlobalLodScale 3
  2858. Mesh.ShadowDistanceScale 3
  2859. MeshStreaming.PoolSize 125000
  2860.  
  2861. VegetationSystem.UseShadowLodOffset 0
  2862. VegetationSystem.MaxActiveDistance 300
  2863. VegetationSystem.MaxPreSimsPerJob 4
  2864. VegetationSystem.SimulationMemKbClient 4096
  2865.  
  2866. Render.EdgeModelViewDistance 100
  2867. ]=],
  2868. [Quality.Ultra]=[=[
  2869. WorldRender.CullScreenAreaScale 4
  2870. Mesh.GlobalLodScale 4
  2871. Mesh.ShadowDistanceScale 4
  2872. MeshStreaming.PoolSize 150000
  2873.  
  2874. VegetationSystem.UseShadowLodOffset 0
  2875. VegetationSystem.MaxActiveDistance 350
  2876. VegetationSystem.MaxPreSimsPerJob 8
  2877. VegetationSystem.SimulationMemKbClient 4096
  2878.  
  2879. Render.EdgeModelViewDistance 150
  2880. ]=],
  2881. })
  2882.  
  2883.  
  2884. ------ Effects Quality
  2885. applyQualitySettings(\'EffectsQuality\', {
  2886. [Quality.Low]=[=[
  2887. EffectManager.EffectQuality 0
  2888. EmitterSystem.QuadHalfResEnable 1
  2889. WorldRender.SpotLightShadomapLevel QualityLevel_Low
  2890. ]=],
  2891. [Quality.Medium]=[=[
  2892. EffectManager.EffectQuality 1
  2893. EmitterSystem.QuadHalfResEnable 1
  2894. WorldRender.SpotLightShadomapLevel QualityLevel_Medium
  2895. ]=],
  2896. [Quality.High]=[=[
  2897. EffectManager.EffectQuality 2
  2898. EmitterSystem.QuadHalfResEnable 1
  2899. WorldRender.SpotLightShadomapLevel QualityLevel_High
  2900. ]=],
  2901. [Quality.Ultra]=[=[
  2902. EffectManager.EffectQuality 2
  2903. EmitterSystem.QuadHalfResEnable 0
  2904. WorldRender.SpotLightShadomapLevel QualityLevel_Ultra
  2905. ]=],
  2906. })
  2907.  
  2908.  
  2909.  
  2910. ------ Terrain Quality
  2911. applyQualitySettings(\'TerrainQuality\', {
  2912. [Quality.Low]=[=[
  2913. VisualTerrain.DxDisplacementMappingEnable 0
  2914. VisualTerrain.DxTessellatedTriWidth 12
  2915. VisualTerrain.LodScale 1.0
  2916. ]=],
  2917. [Quality.Medium]=[=[
  2918. VisualTerrain.DxDisplacementMappingEnable 0
  2919. VisualTerrain.DxTessellatedTriWidth 12
  2920. VisualTerrain.LodScale 1.1
  2921. ]=],
  2922. -- Only on DX11 cards
  2923. [Quality.High]=[=[
  2924. VisualTerrain.DxDisplacementMappingEnable 1
  2925. VisualTerrain.DxTessellatedTriWidth 12
  2926. VisualTerrain.LodScale 1.1
  2927. ]=],
  2928. [Quality.Ultra]=[=[
  2929. VisualTerrain.DxDisplacementMappingEnable 1
  2930. VisualTerrain.DxTessellatedTriWidth 9
  2931. VisualTerrain.LodScale 1.1
  2932. ]=],
  2933. })
  2934.  
  2935.  
  2936. ------ Terrain Decoration Quality
  2937. applyQualitySettings(\'UndergrowthQuality\', {
  2938. [Quality.Low]=[=[
  2939. VisualTerrain.MeshScatteringBuildChannelCount 2
  2940. VisualTerrain.MeshScatteringBuildChannelsLaunchedPerFrameCountMax 1
  2941. VisualTerrain.MeshScatteringDensityScaleFactor 1
  2942. VisualTerrain.MeshScatteringDistanceScaleFactor 1
  2943. ]=],
  2944. [Quality.Medium]=[=[
  2945. VisualTerrain.MeshScatteringBuildChannelCount 4
  2946. VisualTerrain.MeshScatteringBuildChannelsLaunchedPerFrameCountMax 2
  2947. VisualTerrain.MeshScatteringDensityScaleFactor 1.2
  2948. VisualTerrain.MeshScatteringDistanceScaleFactor 1.3
  2949. ]=],
  2950. [Quality.High]=[=[
  2951. VisualTerrain.MeshScatteringBuildChannelCount 8
  2952. VisualTerrain.MeshScatteringBuildChannelsLaunchedPerFrameCountMax 4
  2953. VisualTerrain.MeshScatteringDensityScaleFactor 1.5
  2954. VisualTerrain.MeshScatteringDistanceScaleFactor 1.7
  2955. ]=],
  2956. [Quality.Ultra]=[=[
  2957. VisualTerrain.MeshScatteringBuildChannelCount 8
  2958. VisualTerrain.MeshScatteringBuildChannelsLaunchedPerFrameCountMax 4
  2959. VisualTerrain.MeshScatteringDensityScaleFactor 2.0
  2960. VisualTerrain.MeshScatteringDistanceScaleFactor 2.3
  2961. ]=],
  2962. })
  2963.  
  2964.  
  2965. ------ Shadow Quality
  2966. applyQualitySettings(\'ShadowQuality\', {
  2967. [Quality.Low]=[=[
  2968. WorldRender.ShadowmapsEnable true
  2969. WorldRender.ShadowmapViewDistance 100
  2970. WorldRender.ShadowmapResolution 1024
  2971. WorldRender.ShadowmapQuality 0
  2972. WorldRender.TransparencyShadowmapsEnable 0
  2973. ]=],
  2974. [Quality.Medium]=[=[
  2975. WorldRender.ShadowmapsEnable true
  2976. WorldRender.ShadowmapViewDistance 100
  2977. WorldRender.ShadowmapResolution 1024
  2978. WorldRender.ShadowmapQuality 1
  2979. WorldRender.TransparencyShadowmapsEnable 1
  2980. ]=],
  2981. [Quality.High]=[=[
  2982. WorldRender.ShadowmapsEnable true
  2983. WorldRender.ShadowmapViewDistance 200
  2984. WorldRender.ShadowmapResolution 1536
  2985. WorldRender.ShadowmapQuality 1
  2986. WorldRender.TransparencyShadowmapsEnable 1
  2987. ]=],
  2988. [Quality.Ultra]=[=[
  2989. WorldRender.ShadowmapsEnable true
  2990. WorldRender.ShadowmapViewDistance 200
  2991. WorldRender.ShadowmapResolution 2048
  2992. WorldRender.ShadowmapQuality 1
  2993. WorldRender.TransparencyShadowmapsEnable 1
  2994. ]=],
  2995. })
  2996.  
  2997.  
  2998. ------ Antialiasing Deferred
  2999. applyQualitySettings(\'AntiAliasingDeferred\', {
  3000. [AntiAliasingDeferred.Off]=[=[
  3001. WorldRender.MultisampleCount 1
  3002. ]=],
  3003. [AntiAliasingDeferred.MSAA2X]=[=[
  3004. WorldRender.MultisampleCount 2
  3005. ]=],
  3006. [AntiAliasingDeferred.MSAA4X]=[=[
  3007. WorldRender.MultisampleCount 4
  3008. ]=],
  3009. })
  3010.  
  3011.  
  3012. ------ Antialiasing Post
  3013. applyQualitySettings(\'AntiAliasingPost\', {
  3014. [AntiAliasingPost.Off]=[=[
  3015. WorldRender.FxaaEnable 0
  3016. ]=],
  3017. [AntiAliasingPost.Low]=[=[
  3018. WorldRender.FxaaEnable 1
  3019. WorldRender.FxaaQuality 0
  3020. ]=],
  3021. [AntiAliasingPost.Medium]=[=[
  3022. WorldRender.FxaaEnable 1
  3023. WorldRender.FxaaQuality 1
  3024. ]=],
  3025. [AntiAliasingPost.High]=[=[
  3026. WorldRender.FxaaEnable 1
  3027. WorldRender.FxaaQuality 2
  3028. ]=],
  3029. })
  3030.  
  3031.  
  3032. ------ Ambient Occlusion
  3033. applyQualitySettings(\'AmbientOcclusion\', {
  3034. [AmbientOcclusion.Off]=[=[
  3035. PostProcess.DynamicAOEnable 0
  3036. ]=],
  3037. [AmbientOcclusion.SSAO]=[=[
  3038. PostProcess.DynamicAOEnable 1
  3039. PostProcess.DynamicAOMethod DynamicAOMethod_SSAO
  3040. ]=],
  3041. [AmbientOcclusion.HBAO]=[=[
  3042. PostProcess.DynamicAOEnable 1
  3043. PostProcess.DynamicAOMethod DynamicAOMethod_HBAO
  3044. ]=],
  3045. })
  3046.  
  3047.  
  3048. ------ Anisotropic filtering
  3049. ShaderSystem = ShaderSystem or {}
  3050. ShaderSystem.MaxAnisotropy = 2^settings[\'AnisotropicFilter\'] -- 1, 2, 4, 8, 16
  3051.  
  3052.  
  3053. ------- Motion Blur
  3054. WorldRender = WorldRender or {}
  3055. WorldRender.MotionBlurEnable = settings[\'MotionBlurEnabled\']
  3056. -- WorldRender.MotionBlurScale = settings[\'MotionBlur\'] / 5
  3057. -- for some reason motion we get "attempt to perform arithmetic on field \'MotionBlur\' (a nil value)" when starting up so workaround by having a script default value to handle that case --johan
  3058. WorldRender.MotionBlurScale = (settings[\'MotionBlur\'] or 0.5) / 5
  3059.  
  3060.  
  3061. ------- Screen resolution
  3062. RenderDevice = RenderDevice or {}
  3063. RenderDevice.FullscreenWidth = settings[\'ResolutionWidth\']
  3064. RenderDevice.FullscreenHeight = settings[\'ResolutionHeight\']
  3065. RenderDevice.FullscreenRefreshRate = settings[\'ResolutionHertz\']
  3066. RenderDevice.Fullscreen = settings[\'FullscreenEnabled\']
  3067. RenderDevice.FullscreenOutputIndex = settings[\'FullscreenScreen\']
  3068. RenderDevice.VSyncEnable = settings[\'VSyncEnabled\']
  3069.  
  3070. PostProcess.UIBrightnessNorm = settings[\'Brightness\']
  3071.  
  3072. --[[
  3073. Scripts/UserOptions/Options/Physics.lua
  3074. ]]--
  3075.  
  3076. local quality = settings[\'PhysicsQuality\']
  3077. log:info("setting physics quality : "..quality)
  3078. if(quality > 0.8) then
  3079. applySettings([=[
  3080. Physics.EnableFollowWheelRaycasts true
  3081. Physics.EnableASyncWheelRaycasts true
  3082. ]=])
  3083. else
  3084. applySettings([=[
  3085. Physics.EnableFollowWheelRaycasts false
  3086. Physics.EnableASyncWheelRaycasts true
  3087. ]=])
  3088. end
  3089.  
  3090. --[[
  3091. Scripts/UserOptions/Options/Sound.lua
  3092. ]]--
  3093.  
  3094. local quality = settings[\'AudioQuality\']
  3095. log:info("setting sound quality : "..quality)
  3096. if(quality > 0.8) then
  3097. applySettings([=[
  3098. Audio.MaxAudibleSoundCount 15
  3099. Audio.AudioCoreCpuLoadLimit 50
  3100. ]=])
  3101. else
  3102. applySettings([=[
  3103. Audio.MaxAudibleSoundCount 8
  3104. Audio.AudioCoreCpuLoadLimit 30
  3105. ]=])
  3106. end
  3107.  
Advertisement
Add Comment
Please, Sign In to add comment