Guest User

Untitled

a guest
Mar 28th, 2020
31
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #############################################################################
  2. #
  3. # Logging settings
  4. #
  5.  
  6. set logGroup "ConfigurationManager"
  7. set logLevelWarning warning
  8. set logLevelInfo info
  9. set logLevelDebug debug
  10.  
  11. log $logGroup $logLevelInfo "Parsing configuration script"
  12.  
  13.  
  14. #############################################################################
  15. #
  16. # Constants
  17. #
  18.  
  19. seti Off 0
  20. seti On 1
  21.  
  22. seti Low 1
  23. seti Medium 2
  24. seti High 3
  25.  
  26. seti MediumButDefaultLow 4
  27.  
  28. seti memoryLevelHigh 512
  29. seti memoryLevelMedium 384
  30. seti memoryLevelLow 256
  31. seti memoryLevelUnknown 0
  32.  
  33. if ( match("${osVersion}","*NT 6.0*") )
  34. seti cpuLevelHigh 3000
  35. seti cpuLevelMedium 2600
  36. seti cpuLevelLow 2000
  37. log $logGroup $logLevelInfo "Setting cpu level for Vista."
  38. else
  39. seti cpuLevelHigh 2800
  40. seti cpuLevelMedium 2200
  41. seti cpuLevelLow 1450
  42. log $logGroup $logLevelInfo "Setting cpu level for non-Vista."
  43. endif
  44.  
  45. seti cpuLevelUnsupported 0
  46.  
  47.  
  48. #############################################################################
  49. #
  50. # Identify gfx device
  51. #
  52.  
  53. # set some config variables based on a card table and vendor specific rules
  54. # sets isCardFound, cardVendor, and cardName
  55. include "Video Cards.sgr"
  56.  
  57. # Fallback on the card name text supplied by the card itself.
  58. # Assumes that at least the cardVendor has been matched, since
  59. # vendor name is not contained in some vendor card names.
  60. # Note that specific vendors are overridden to a default card.
  61. # For ATI -> Radeon 9800 Pro
  62. # For NVIDIA -> NVIDIA 4800 TI SE
  63. if (not $isCardFound)
  64. set cardName $cardNameText
  65. endif
  66.  
  67.  
  68. # GraphicsRulesMaker Tweak: Force memory size
  69. seti textureMemory 383
  70.  
  71. #############################################################################
  72. #
  73. # Configuration override controlled by command line option -cardConfig.
  74. #
  75. if (varExists(cardConfig))
  76. # test unsupported cards using sw rendering
  77. if ($cardConfig = 1)
  78. log $logGroup $logLevelInfo "Testing with all devices unsupported."
  79. set cardVendor TestingAllUnsupported
  80. set cardName TestingAllUnsupported
  81.  
  82. elseif (($cardConfig = 2) and ($deviceNumber = 0))
  83. log $logGroup $logLevelInfo "Testing with the first device unsupported."
  84. set cardVendor TestingFirstUnsupported
  85. set cardName TestingFirstUnsupported
  86.  
  87. elseif (($cardConfig = 3) and ($deviceNumber != 0))
  88. log $logGroup $logLevelInfo "Testing with the all devices except first unsupported."
  89. set cardVendor TestingAllButFirstUnsupported
  90. set cardName TestingAllButFirstUnsupported
  91.  
  92. elseif (($cardConfig = 100) and ($deviceNumber = 0))
  93. log $logGroup $logLevelInfo "Testing first device as swvp only part."
  94. boolProp forceSoftwareVP true
  95. endif
  96. endif
  97.  
  98.  
  99.  
  100. #############################################################################
  101. #
  102. # Determine if gfx device is supported, force software rendering if not
  103. #
  104.  
  105. setb useSoftwareRasterizer false
  106.  
  107. if (match("${cardVendor}", "ATI"))
  108. if (match("${cardName}", "*Mach*") or match("${cardName}", "*Rage*"))
  109. setb useSoftwareRasterizer true
  110. endif
  111.  
  112. elseif (match("${cardVendor}", "NVidia"))
  113. if (match("${cardName}", "NV 1") or match("${cardName}", "NV 2") or match("${cardName}", "*Riva*") or match("${cardName}", "*TNT*"))
  114. setb useSoftwareRasterizer true
  115. endif
  116.  
  117. elseif (match("${cardVendor}", "Intel"))
  118. if (match("${cardName}", "*810*") or match("${cardName}", "*815*") or match("${cardName}", "*740*") or match("${cardName}", "*752*"))
  119. setb useSoftwareRasterizer true
  120. endif
  121.  
  122. elseif (match("${cardVendor}", "S3"))
  123. if (not match("${cardName}", "*GammaChrome*") and not match("${cardName}", "*DeltaChrome*"))
  124. setb useSoftwareRasterizer true
  125. endif
  126.  
  127. else
  128. # unsupported/unknown vendor
  129. setb useSoftwareRasterizer true
  130.  
  131. endif
  132.  
  133. if ($useSoftwareRasterizer)
  134. log $logGroup $logLevelWarning "Unsupported video card. Forcing software rendering on this device"
  135. else
  136. log $logGroup $logLevelInfo "Supported video card."
  137. endif
  138.  
  139. if (not $useSoftwareRasterizer)
  140. # failed to obtain device texture memory size, force to 32MB
  141. if ($textureMemory = 0)
  142. seti textureMemory 383
  143. setb textureMemorySizeOK false
  144. endif
  145.  
  146. if ($textureMemory < 28)
  147. log $logGroup $logLevelWarning "Insufficient video memory. Forcing software rendering on this device"
  148.  
  149. # require a card with at least 32MB
  150. setb useSoftwareRasterizer true
  151. endif
  152. endif
  153.  
  154. if ($useSoftwareRasterizer)
  155. # ignore texture memory reported by gfx device, this is not hardware texture memory
  156. seti textureMemory 383
  157. endif
  158.  
  159. if (not $useSoftwareRasterizer)
  160. log $logGroup $logLevelInfo "Hardware rendering is enabled"
  161. endif
  162.  
  163.  
  164.  
  165. #############################################################################
  166. #
  167. # Apply gfx device specific workarounds
  168. #
  169. # Available device props:
  170. # forceSoftwareVP
  171. # forceSoftwareDevice
  172. # queriesOK
  173. # windowedModeFormatConversionOK
  174. # enumerateMultisampleLevels
  175. # skipValidateDevice
  176. # enableDriverMemoryManager
  177. # softwareDeviceLocalVideoMemorySize
  178. # deviceLocalVideoMemorySizeDefault
  179. # disableVSyncSupport
  180. # substituteFlipForDiscardSwapEffect
  181. # minTextureDimensionForBalance
  182. #
  183. # Additional props:
  184. # vs2LoopsFunctional
  185.  
  186. setb textureMemorySizeOK true
  187. setb supportsDirtyRect true
  188. setb supportsTurboRect true
  189. setb supportsSpecialEventCamera true
  190. setb forceLowSettings false
  191. setb forceLowResolution false
  192. setb defaultLowResolution false
  193. setb forceMediumMaterialDetail false
  194. setb isIntegratedChipset false
  195. setb forceMediumShadows false
  196. setb forceMediumObjectDetail false
  197. boolProp useRenderTextures false
  198. uintProp antialiasingSupport 1
  199.  
  200. boolProp dontMergeNHFlora true
  201.  
  202.  
  203. if (not $useSoftwareRasterizer)
  204.  
  205. # never trust the driver to manage its own memory
  206. boolProp enableDriverMemoryManager false
  207.  
  208. boolProp vs2LoopsFunctional false
  209. boolProp presentWorkaround false
  210. boolProp enumerateMultisampleLevels true
  211.  
  212. # not enough texture memory for antialiasing
  213. if ($textureMemory < 127)
  214. boolProp enumerateMultisampleLevels false
  215. endif
  216.  
  217. if (match("${cardVendor}", "NVIDIA"))
  218. # on NVidia cards, create a dummy texture on device creation to prevent BSODs
  219. boolProp createNVidiaWorkaroundTexture true
  220.  
  221. if ($appControlledAA)
  222. # nvidia drivers handle offscreen aa
  223. uintProp antialiasingSupport 3
  224. else
  225. # remove this when the texture manager balancing is fixed.
  226. boolProp disableTexMemEstimateAdjustment true
  227.  
  228. # turn off dirty rects
  229. uintProp antialiasingSupport 1
  230. setb supportsDirtyRect false
  231. endif
  232.  
  233. if (match("${cardName}", "*GeForce2*Integrated*") or match("${cardName}", "*GeForce?2*Integrated*") or match("${cardName}", "*GeForce4*Integrated*") or match("${cardName}", "*GeForce?4*Integrated*") or match("${cardName}", "*GeForce2 Quadro2 Pro*"))
  234. boolProp causticsEnabled false
  235. boolProp enumerateMultisampleLevels false
  236.  
  237. setb forceLowSettings true
  238. setb forceLowResolution true
  239. endif
  240.  
  241. # the 6200 Turbo Cache peformed very poorly in CATLAB runs for EP2
  242. if (match("${cardName}", "*6200 TC*") or match("${cardName}", "*6100*"))
  243. setb forceLowSettings true
  244. setb defaultLowResolution true
  245. endif
  246.  
  247. # need to get around the problem of z fighting in GeForce4 cards
  248. if (match("${cardName}", "*GeForce4*"))
  249. boolProp raiseLightSnowFF true
  250. endif
  251.  
  252. # disable shaders by default for NV3x generation, only enable for high end cards
  253. if ($maxVertexProgramVersionHWMajor = 2)
  254. boolProp useShaders false
  255.  
  256. if (match("${cardName}", "GeForceFX*") or match("${cardName}", "*GeForce?FX*"))
  257. if (match("${cardName}", "*57?0*") or match("${cardName}", "*58?0*") or match("${cardName}", "*59?0*"))
  258. boolProp useShaders true
  259. boolProp causticsEnabled false
  260.  
  261. log $logGroup $logLevelInfo "Enabling shaders for high-end NV3x"
  262. endif
  263. if (match("${cardName}", "*NV35*") or match("${cardName}", "*NV36*") or match("${cardName}", "*NV38*") or match("${cardName}", "*NV39*"))
  264. boolProp useShaders true
  265.  
  266. log $logGroup $logLevelInfo "Enabling shaders for high-end NV3x"
  267. endif
  268.  
  269. # 5700 cards sometimes have problems with bump mapping so setting default to medium
  270. if (match("${cardName}", "*5700*"))
  271. log $logGroup $logLevelInfo "Forcing Medium Material detail on 5700"
  272. setb forceMediumMaterialDetail true
  273. endif
  274.  
  275. if (match("${cardName}", "*5700LE*"))
  276. log $logGroup $logLevelInfo "Forcing low settings on 5700LE and 6100"
  277. setb forceLowSettings true
  278. boolProp useShaders false
  279. endif
  280.  
  281. endif
  282.  
  283. if (match("${cardName}", "QuadroFX*") or match("${cardName}", "*Quadro?FX*"))
  284. if (match("${cardName}", "*3000*") or match("${cardName}", "*1?00*"))
  285. boolProp useShaders true
  286.  
  287. log $logGroup $logLevelInfo "Enabling shaders for high-end NV3x Quadro"
  288. endif
  289.  
  290. if (match("${cardName}", "*2000*") or match("${cardName}", "*1000*") or match("${cardName}", "*1300*"))
  291. boolProp causticsEnabled false
  292.  
  293. log $logGroup $logLevelInfo "Disabling caustics as these cause cards cause problems with shadows"
  294. endif
  295. endif
  296.  
  297. # caps read vs 3.0, but dx9b is returning vs 2.0, once 9c is used this fix can be removed
  298. if (match("${cardName}", "*GeForce*"))
  299. if (match("${cardName}", "*68?0*") or match("${cardName}", "*GTX*"))
  300. boolProp useShaders true
  301.  
  302. log $logGroup $logLevelInfo "Enabling shaders for high-end NV40 Parts on Dx9b"
  303. endif
  304. endif
  305. endif
  306.  
  307. if ($maxVertexProgramVersionHWMajor = 0)
  308. boolProp skipValidateDevice true
  309.  
  310. log $logGroup $logLevelInfo "Enabling D3DERR_CONFLICTINGRENDERSTATE validation workaround"
  311. endif
  312.  
  313. elseif (match("${cardVendor}", "ATI"))
  314. # loops support broken in 6458. Fixed in catalyst 4.9 (6476) but we require 4.10 to be safe.
  315. if ($driverBuild >= 6476)
  316. boolProp vs2LoopsFunctional true
  317. endif
  318.  
  319. # workaround for forced aa crash as of 6458. Fixed in catalyst 4.9 (6476) but we require 4.10 to be safe.
  320. # TODO: this is not yet enabled, pending testing
  321. #if ($driverBuild < 6476)
  322. boolProp useRenderTextures true
  323. #endif
  324.  
  325.  
  326. # avoid a race condition with color copies and ui
  327. boolProp presentWorkaround true
  328.  
  329. if (match("${cardName}", "*Radeon?VE*") or match("${cardName}", "*7?00*") or match("${cardName}", "*R100*") or match("${cardName}", "*IGP 3?0*") or match("${cardName}", "*9100 IGP*"))
  330. log $logGroup $logLevelInfo "Forcing turbo rects off"
  331. setb supportsTurboRect false
  332.  
  333. boolProp simpleTerrain true
  334. boolProp causticsEnabled false
  335. boolProp enumerateMultisampleLevels false
  336.  
  337. setb forceLowSettings true
  338.  
  339. if (match("${cardName}", "*9100 IGP*"))
  340. log $logGroup $logLevelInfo "Forcing low resolution"
  341. setb defaultLowResolution true
  342. endif
  343.  
  344. if (match("${cardName}", "*Radeon?VE*") or $driverBuild < 6414)
  345. log $logGroup $logLevelInfo "Forcing swvp"
  346. boolProp forceSoftwareVP true
  347. endif
  348. endif
  349.  
  350. if (match("${cardName}", "*X1300*") or match("${cardName}", "*X300*") or match("${cardName}", "*XPRESS 200*"))
  351. log $logGroup $logLevelInfo "Forcing medium settings or lower"
  352. boolProp useShaders false
  353. setb forceLowSettings true
  354. endif
  355.  
  356. boolProp usePS30 false
  357.  
  358. if ($maxVertexProgramVersionHWMajor < 2)
  359. # Radeon 8500 and greater have problems switching between FF and VS?
  360. log $logGroup $logLevelInfo "Forcing shaders of for ATI DX8"
  361.  
  362. boolProp useShaders false
  363. endif
  364.  
  365. if (match("${cardName}", "*8500*"))
  366. #avoid z fighting with light snow
  367. boolProp raiseLightSnowFF true
  368. setb defaultLowResolution true
  369. endif
  370.  
  371. if (match("${cardName}", "*9600 SE *"))
  372. setb forceMediumMaterialDetail true
  373. setb forceMediumShadows true
  374. setb forceMediumObjectDetail true
  375. endif
  376.  
  377. if (match("${cardName}", "*Mobility*"))
  378. setb isIntegratedChipset true
  379. endif
  380.  
  381. # X800 based cards exhibit rendering corruption if turbo rect is enabled
  382. if (match("${cardName}", "*X800*") or match("${cardName}", "*R420*"))
  383. setb supportsTurboRect false
  384.  
  385. log $logGroup $logLevelInfo "Forcing turbo rects off"
  386. endif
  387.  
  388.  
  389. if (match("${cardName}", "*92?0*"))
  390. log $logGroup $logLevelInfo "Forcing shadow detail on 9250 and 9200"
  391. setb forceMediumShadows true
  392. endif
  393.  
  394. elseif (match("${cardVendor}", "S3"))
  395. if (match("${cardName}", "*GammaChrome*") or match("${osVersion}","*NT 6.0*") )
  396. boolProp useShaders false
  397. log $logGroup $logLevelInfo "Forcing Gamma Chrome to use fixed function shaders"
  398. endif
  399.  
  400. # EP6 CATlab reports gray screen during all cinematics
  401. if (match("${cardName}", "*S27*"))
  402. setOption SpecialEventCamera $Off
  403. endif
  404.  
  405.  
  406. elseif (match("${cardVendor}", "Intel"))
  407.  
  408. if (match("${cardName}", "*X3000*"))
  409. boolProp disableVSyncSupport true # work around flickering UI
  410. else
  411. boolProp simpleTerrain true
  412. boolProp enumerateMultisampleLevels false
  413. boolProp disableVSyncSupport true # work around flickering UI
  414. boolProp useShaders false # (EP2 change) mostly for performance, but driver issues showed up in v14.14
  415. endif
  416.  
  417. # the Intel minspec driver doesn't misreport available texture memory, so it's not
  418. # necessary to adjust the texture memory estimate it returns. This may also fix
  419. # a Windows "device failure" message that occurs sometimes on this device.
  420. boolProp disableTexMemEstimateAdjustment true
  421.  
  422. # assuming Intel parts are UMA, drop the texture memory to 32 if not much system memory
  423. if ($memory <= $memoryLevelLow)
  424. if ($textureMemory > 32)
  425. seti textureMemory 32
  426. endif
  427. endif
  428.  
  429. if (match("${cardName}", "*845*") or match("${cardName}", "*865*") or match("${cardName}", "*830*") or match("${cardName}", "*855*"))
  430. boolProp causticsEnabled false
  431.  
  432. setb forceLowSettings true
  433. setb forceLowResolution true
  434. endif
  435.  
  436. # the 915 sets the caps bit that indicates it can do texture projection,
  437. # but does it incorrectly in the pixel stage. Here we override the texture
  438. # projection cap we get from the device.
  439. if (match("${cardName}", "*915*"))
  440. boolProp disableTextureProjection true
  441. endif
  442. endif
  443.  
  444. intProp deviceLocalVideoMemorySizeDefault ($textureMemory * 1024 * 1024)
  445.  
  446. else
  447. setb forceLowSettings true
  448. setb forceLowResolution true
  449.  
  450. # force sw, swvp, and no aa
  451. boolProp forceSoftwareDevice true
  452. boolProp forceSoftwareVP true
  453. boolProp enumerateMultisampleLevels false
  454. boolProp simpleTerrain true
  455. boolProp causticsEnabled false
  456.  
  457. intProp softwareDeviceLocalVideoMemorySize ($textureMemory * 1024 * 1024)
  458.  
  459. endif
  460.  
  461. # since we don't do bumpmapping on less ps2.0-capable hardware, eliminate tangents
  462. # from the vertex data
  463. # also, the presence of per-vertex tangents in the vertex data stream causes
  464. # "exploded" polygons on the Radeon 9000, even if the data is ignored by the shader
  465. if ($maxPixelProgramVersionMajor < 2)
  466. boolProp skipTangentsInVertexData true
  467. endif
  468.  
  469.  
  470. #############################################################################
  471. #
  472. # Print system info
  473. #
  474.  
  475. if ($deviceNumber = 0)
  476. logSystemInfo "=== Application info ==="
  477. logSystemInfo "Name: ${appName}"
  478. logSystemInfo "Version: ${version}"
  479. logSystemInfo "Build: ${buildType}"
  480.  
  481. logSystemInfo "=== Machine info ==="
  482. logSystemInfo "OS version: ${osVersion}"
  483. logSystemInfo "CPU: ${cpuSpeed}Mhz, Name:${CPU}, FPU:${FPU}, MMX:${MMX}"
  484. logSystemInfo "Memory: ${memory}MB"
  485. logSystemInfo "Free memory: ${freeMemory}MB"
  486. logSystemInfo "User: ${userName}"
  487. logSystemInfo "Computer: ${computerName}"
  488.  
  489. logSystemInfo "=== Sound device info ==="
  490. logSystemInfo "Name: ${soundCardName}"
  491. logSystemInfo "Driver: ${soundDriverName}"
  492. endif
  493.  
  494. logSystemInfo "=== Graphics device info ==="
  495. logSystemInfo "Number: ${deviceNumber}"
  496. logSystemInfo "Name (driver): ${cardNameText}"
  497. if ($isCardFound)
  498. logSystemInfo "Name (database): ${cardName}"
  499. else
  500. logSystemInfo "Name (database): ${cardName} <<NOT FOUND IN DATABASE!>>"
  501. endif
  502. if ($isIntegratedChipset)
  503. logSystemInfo " (Integrated Chipset)"
  504. endif
  505. logSystemInfo "Vendor: ${cardVendor}"
  506. logSystemInfo "Chipset: ${cardChipset}"
  507. logSystemInfo "Driver: ${driverName}, Version: ${driverVersion}"
  508. logSystemInfo "Driver version: ${driverBuild}"
  509. logSystemInfo "Monitor: ${monitorName}"
  510. logSystemInfo "Monitor aspect: ${monitorAspect}, ${monitorAspectString}"
  511. logSystemInfo "Screen mode: ${screenWidth}x${screenHeight}x${screenBPP}BPP,${screenRefresh}Hz"
  512. if ($textureMemorySizeOK)
  513. logSystemInfo "Texture memory: ${textureMemory}MB"
  514. else
  515. logSystemInfo "Texture memory: ${textureMemory}MB <<OVERRIDE>>"
  516. endif
  517. logSystemInfo "HW T&L: Fixed function:${fixedFunctionHWTnL} Programmable:${maxVertexProgramVersionHWMajor}.${maxVertexProgramVersionHWMinor}"
  518. logSystemInfo "Pixel program: ${maxPixelProgramVersionMajor}.${maxPixelProgramVersionMinor}"
  519. logSystemInfo "Texture stages: ${textureStages}"
  520. logSystemInfo "AppControlledAA: ${appControlledAA}"
  521.  
  522.  
  523. #############################################################################
  524. #
  525. # UI Options
  526.  
  527. log $logGroup $logLevelDebug "Begin parsing option definitions"
  528.  
  529. option MaterialDetail
  530. setting $Low
  531. boolProp bumpMapping false
  532. intProp imageDataSizeReductionOnLoad 2
  533.  
  534. setting $Medium
  535. boolProp bumpMapping false
  536. intProp imageDataSizeReductionOnLoad 1
  537.  
  538. setting $High
  539. boolProp bumpMapping true
  540. intProp imageDataSizeReductionOnLoad 0
  541. end
  542.  
  543.  
  544. option ObjectDetail
  545. setting $Medium
  546. boolProp reduceBoneWeights true
  547. boolProp useLODs true
  548. intProp lodOverride 35
  549.  
  550. setting $High
  551. boolProp reduceBoneWeights false
  552. boolProp useLODs false
  553. intProp lodOverride 0
  554. end
  555.  
  556. option ObjectHiding
  557. setting $Off
  558. intProp renderInsideVisibleObjects 0
  559.  
  560. setting $On
  561. intProp renderInsideVisibleObjects 1
  562. end
  563.  
  564. option SnowOnGround
  565. setting $Off
  566. boolProp showSnowOnGround false
  567.  
  568. setting $On
  569. boolProp showSnowOnGround true
  570. end
  571.  
  572. option Shadows
  573. setting $Low
  574. boolProp simShadows false
  575. boolProp objectShadows false
  576. boolProp guob false
  577. boolProp heightMapShadows false
  578.  
  579. setting $Medium
  580. boolProp simShadows false
  581. boolProp objectShadows false
  582. boolProp guob true
  583. boolProp heightMapShadows true
  584.  
  585. setting $High
  586. # GraphicsRulesMaker Tweak: Always disable Sim shadows
  587. boolProp simShadows false
  588. boolProp objectShadows true
  589. boolProp guob true
  590. boolProp heightMapShadows true
  591. end
  592.  
  593.  
  594. option OpaqueUI
  595. setting $Off
  596. boolProp renderOpaqueUI false
  597.  
  598. setting $On
  599. boolProp renderOpaqueUI true
  600. end
  601.  
  602.  
  603. option Reflection
  604. setting $Off
  605. boolProp reflectionWithExtraViewer false
  606. boolProp nhoodWaterReflection false
  607.  
  608. setting $On
  609. boolProp reflectionWithExtraViewer true
  610. boolProp nhoodWaterReflection true
  611. end
  612.  
  613. option Ceiling
  614. setting $Off
  615. boolProp includeCeilings false
  616.  
  617. setting $On
  618. boolProp includeCeilings true
  619. end
  620.  
  621. option EffectsQuality
  622. setting $Low
  623. boolProp useEffects true
  624. floatProp particleDensity 1
  625. floatProp particleScale 1
  626. intProp maxParticlesTarget 2000
  627. intProp particleLODOffset 0 # subtracted from the zoom.
  628. intProp effectPriorityLevel 1
  629. boolProp enableOceanReflection false
  630.  
  631. setting $Medium
  632. boolProp useEffects true
  633. floatProp particleDensity 1
  634. floatProp particleScale 1
  635. intProp maxParticlesTarget 5000
  636. intProp particleLODOffset 0 # subtracted from the zoom.
  637. intProp effectPriorityLevel 2
  638. boolProp enableOceanReflection false
  639.  
  640. setting $High
  641. boolProp useEffects true
  642. floatProp particleDensity 1
  643. floatProp particleScale 1
  644. intProp maxParticlesTarget 10000
  645. intProp particleLODOffset 0 # subtracted from the zoom.
  646. intProp effectPriorityLevel 3
  647. boolProp enableOceanReflection true
  648. end
  649.  
  650.  
  651. option LightingQuality
  652. setting $Low
  653. boolProp lightingEnabled true
  654. boolProp portalLighting false
  655. boolProp floorAndWallNormalMapping false
  656. boolProp specHighlights false
  657.  
  658. setting $Medium
  659. boolProp lightingEnabled true
  660. boolProp portalLighting true
  661. boolProp floorAndWallNormalMapping false
  662. boolProp specHighlights true
  663.  
  664. setting $High
  665. boolProp lightingEnabled true
  666. boolProp portalLighting true
  667. boolProp floorAndWallNormalMapping true
  668. boolProp specHighlights true
  669. end
  670.  
  671.  
  672. option SoundQuality
  673. setting $Low
  674. intProp AudioPerformance 0
  675.  
  676. setting $Medium
  677. intProp AudioPerformance 1
  678.  
  679. setting $High
  680. intProp AudioPerformance 2
  681. end
  682.  
  683.  
  684. #
  685. # Options without ui access.
  686. #
  687. option DirtyRect
  688. setting $High
  689. # no dirty rects
  690. intProp dynamicRenderStrategy 0
  691.  
  692. setting $Medium
  693. # 4 buffer mode
  694. intProp dynamicRenderStrategy 2
  695.  
  696. setting $Low
  697. # 2 buffer mode
  698. intProp dynamicRenderStrategy 1
  699. end
  700.  
  701.  
  702. option FullscreenFadeEffect
  703. setting $Off
  704. boolProp enableSnapshot false
  705.  
  706. setting $On
  707. boolProp enableSnapshot true
  708. end
  709.  
  710.  
  711. option Turbo
  712. setting $High
  713. boolProp useTurboRect true
  714.  
  715. setting $Medium
  716. boolProp useTurboRect true
  717.  
  718. setting $Low
  719. boolProp useTurboRect false
  720.  
  721. end
  722.  
  723.  
  724. option SimulatorControls
  725. setting $High
  726. intProp maxNumOfVisitingSims 8
  727.  
  728. setting $Medium
  729. intProp maxNumOfVisitingSims 6
  730.  
  731. setting $Low
  732. intProp maxNumOfVisitingSims 2
  733. end
  734.  
  735.  
  736. option LightingOptimizations
  737. setting $High
  738. boolProp optimizedDiffusion true
  739. boolProp incrementalLighting true
  740. boolProp lerpLights true
  741. boolProp useDirtyTiles true
  742. end
  743.  
  744.  
  745. option AnimationSamplingLevel
  746. setting $Low
  747. # sample nearest animation frame
  748. boolProp animationFrameSampling true
  749.  
  750. setting $Medium
  751. # sample nearest two animation frames and slerp
  752. boolProp animationFrameSampling false
  753. end
  754.  
  755.  
  756. option LivePIP
  757. setting $Off
  758. boolProp livePIP false
  759. boolProp livePIPDefault false
  760.  
  761. setting $On
  762. boolProp livePIPDefault true
  763. # do not override user's choice if the setting is ON
  764. end
  765.  
  766.  
  767. option SpecialEventCamera
  768. setting $Off
  769. boolProp chooseCameraSpecialEventEnabled false
  770. boolProp CameraSpecialEventEnabled false
  771.  
  772. setting $On
  773. boolProp chooseCameraSpecialEventEnabled true
  774. # do not override user's choice if the setting is ON
  775.  
  776.  
  777. end
  778.  
  779.  
  780. option ScreenModeResolution
  781. setting $Low
  782. uintProp maxResWidth 800
  783. uintProp maxResHeight 600
  784. uintProp defaultResWidth 800
  785. uintProp defaultResHeight 600
  786.  
  787. setting $MediumButDefaultLow
  788. uintProp maxResWidth 1280
  789. uintProp maxResHeight 1024
  790. uintProp defaultResWidth 800
  791. uintProp defaultResHeight 600
  792.  
  793. setting $Medium
  794. uintProp maxResWidth 1280
  795. uintProp maxResHeight 1024
  796. uintProp defaultResWidth 1024
  797. uintProp defaultResHeight 768
  798.  
  799. setting $High
  800. # GraphicsRulesMaker Tweak: Custom maximum resolution
  801. uintProp maxResWidth 1440
  802. uintProp maxResHeight 795
  803. uintProp defaultResWidth 1024
  804. uintProp defaultResHeight 768
  805. end
  806.  
  807. option SubjectTracking
  808. setting $Low
  809. floatProp centerTrackingDeadZoneMagnitude 70
  810.  
  811. setting $Medium
  812. floatProp centerTrackingDeadZoneMagnitude 30
  813.  
  814. setting $High
  815. floatProp centerTrackingDeadZoneMagnitude 30
  816. end
  817.  
  818. option EnableLotImpostersInLot
  819. setting $On
  820. boolProp enableLotImpostersInLot true
  821. setting $Off
  822. boolProp enableLotImpostersInLot false
  823. end
  824.  
  825. option EnableNeighborhoodOccupantsInLot
  826. setting $On
  827. boolProp enableNeighborhoodOccupantsInLot true
  828. setting $Off
  829. boolProp enableNeighborhoodOccupantsInLot false
  830. end
  831.  
  832. option LotSkirtSizeIncrease
  833. setting 0
  834. uintProp lotSkirtSizeIncrease 5
  835. setting 1
  836. uintProp lotSkirtSizeIncrease 9
  837. setting 2
  838. uintProp lotSkirtSizeIncrease 18
  839. setting 3
  840. uintProp lotSkirtSizeIncrease 36
  841. end
  842.  
  843. log $logGroup $logLevelDebug "Finished parsing option definitions"
  844.  
  845.  
  846. #############################################################################
  847. #
  848. # Hardware Rendering
  849. #
  850.  
  851. # This cannot be defined as a local variable, the if clause is still executed when
  852. # sw render path is taken and an exception generated that fails the parsing. Be
  853. # careful with the use of local variables.
  854. setb usingHighDetail false
  855.  
  856. if (not $useSoftwareRasterizer)
  857.  
  858. # set a base level of options based on the card rating
  859. if (($memory >= $memoryLevelHigh) and ($cpuSpeed >= $cpuLevelHigh) and ($maxVertexProgramVersionHWMajor >= 1) and not $forceLowSettings and not $isIntegratedChipset)
  860. log $logGroup $logLevelInfo "Selecting High base level"
  861.  
  862. setOption OpaqueUI $Off
  863. setOption LivePIP $On
  864. setOption Reflection $On
  865. setOption Ceiling $On
  866. setOption EffectsQuality $High
  867. setOption LightingQuality $High
  868. setOption Shadows $High
  869. setOption MaterialDetail $High
  870. setOption ObjectDetail $High
  871. setOption ObjectHiding $Off
  872. setOption SubjectTracking $High
  873. setOption EnableLotImpostersInLot $On
  874. setOption EnableNeighborhoodOccupantsInLot $On
  875. setOption LotSkirtSizeIncrease 1
  876. setb usingHighDetail true #use this to test if current level is set to high
  877.  
  878. elseif (($memory >= $memoryLevelMedium) and ($cpuSpeed >= $cpuLevelMedium) and ($maxVertexProgramVersionHWMajor >= 1) and not $forceLowSettings)
  879. log $logGroup $logLevelInfo "Selecting Medium base level"
  880.  
  881. setOption OpaqueUI $Off
  882. setOption LivePIP $On
  883. setOption Reflection $Off
  884. setOption Ceiling $Off
  885. setOption EffectsQuality $Medium
  886. setOption LightingQuality $Medium
  887. setOption Shadows $Medium
  888. setOption MaterialDetail $Medium
  889. setOption ObjectDetail $High
  890. setOption ObjectHiding $On
  891. setOption SubjectTracking $Medium
  892. setOption EnableLotImpostersInLot $On
  893. setOption EnableNeighborhoodOccupantsInLot $On
  894. setOption LotSkirtSizeIncrease 0
  895.  
  896. else
  897. log $logGroup $logLevelInfo "Selecting Low base level"
  898. # NOTE: don't set forceLowSettings here, because this will force low simulator settings
  899. # if all you have is a low end video card
  900.  
  901. setOption OpaqueUI $Off
  902. setOption LivePIP $Off
  903. setOption Reflection $Off
  904. setOption Ceiling $Off
  905. setOption EffectsQuality $Low
  906. setOption LightingQuality $Low
  907. setOption Shadows $Low
  908. setOption MaterialDetail $Low
  909. setOption ObjectDetail $Medium
  910. setOption ObjectHiding $On
  911. setOption SubjectTracking $Low
  912. setOption EnableLotImpostersInLot $Off
  913. setOption EnableNeighborhoodOccupantsInLot $Off
  914. setOption LotSkirtSizeIncrease 0
  915. endif
  916.  
  917. setOption LightingOptimizations $High
  918. setOption SnowOnGround $On
  919.  
  920. # adjust simulator based on cpu speed
  921. # adjust the sound quality based on cpu speed (this may be overridden below for low-end systems)
  922. # adjust animation sampling based on cpu speed
  923. if ($cpuSpeed >= $cpuLevelHigh and not $forceLowSettings)
  924. setOption SimulatorControls $High
  925. setOption SoundQuality $High
  926. setOption AnimationSamplingLevel $Medium
  927. elseif ($cpuSpeed >= $cpuLevelMedium and not $forceLowSettings)
  928. setOption SimulatorControls $Medium
  929. setOption SoundQuality $Medium
  930. setOption AnimationSamplingLevel $Medium
  931. else
  932. setOption SimulatorControls $Low
  933. setOption SoundQuality $Low
  934. setOption AnimationSamplingLevel $Low
  935. endif
  936.  
  937. # turn off fullscreen fade
  938. setOption FullscreenFadeEffect $Off
  939. if ($textureMemory >= 128 and not $isIntegratedChipset)
  940. setOption FullscreenFadeEffect $On
  941. endif
  942.  
  943. # screen res defaults
  944. if (($maxVertexProgramVersionHWMajor >= 1) and ($textureMemory >= 128) and not $forceLowResolution)
  945. setOption ScreenModeResolution $High
  946. elseif ($textureMemory >= 64 and not $forceLowResolution)
  947. if (($memory <= $memoryLevelLow) and ($cpuSpeed <= $cpuLevelLow))
  948. setOption ScreenModeResolution $MediumButDefaultLow
  949. else
  950. setOption ScreenModeResolution $Medium
  951. endif
  952. else
  953. setOption ScreenModeResolution $Low
  954. endif
  955.  
  956. if ($defaultLowResolution)
  957. setOption ScreenModeResolution $MediumButDefaultLow
  958. endif
  959.  
  960. # special event cameras for cinematics
  961. if (($maxPixelProgramVersionMajor >= 1) and ($supportsSpecialEventCamera))
  962. setOption SpecialEventCamera $On
  963. else
  964. setOption SpecialEventCamera $Off
  965. endif
  966.  
  967. # set dirty rect mode
  968. if ($supportsDirtyRect)
  969. setOption DirtyRect $Medium
  970. else
  971. setOption DirtyRect $High
  972. endif
  973.  
  974. # set turbo mode
  975. if ($supportsTurboRect)
  976. setOption Turbo $Medium
  977. else
  978. setOption Turbo $Low
  979. endif
  980.  
  981. if ($forceMediumMaterialDetail and ($memory >= $memoryLevelHigh) and ($cpuSpeed >= $cpuLevelHigh) and not $forceLowSettings)
  982. log $logGroup $logLevelWarning "Setting Material Detail"
  983. setOption MaterialDetail $Medium
  984. endif
  985.  
  986. if ($usingHighDetail and not $forceLowSettings)
  987. if ($forceMediumShadows)
  988. setOption Shadows $Medium
  989. endif
  990.  
  991. if ($forceMediumObjectDetail)
  992. setOption ObjectDetail $Medium
  993. endif
  994. endif
  995.  
  996. endif
  997.  
  998.  
  999. #############################################################################
  1000. #
  1001. # Software rendering
  1002. #
  1003.  
  1004. # set the options for the software rasterizer
  1005. if ($useSoftwareRasterizer)
  1006. setOption LightingOptimizations $High
  1007.  
  1008. setOption DirtyRect $Medium
  1009. setOption Turbo $Medium
  1010. setOption OpaqueUI $Off
  1011. setOption LivePIP $Off
  1012. setOption SpecialEventCamera $Off
  1013.  
  1014. setOption Reflection $Off
  1015. setOption Ceiling $Off
  1016. setOption EffectsQuality $Low
  1017. setOption LightingQuality $Low
  1018. setOption Shadows $Low
  1019. setOption MaterialDetail $Low
  1020. setOption ObjectDetail $Medium
  1021. setOption ObjectHiding $On
  1022.  
  1023. # adjust simulator based on cpu speed
  1024. if ($cpuSpeed >= $cpuLevelHigh)
  1025. setOption SimulatorControls $Medium # one lower than hw
  1026. else
  1027. setOption SimulatorControls $Low
  1028. endif
  1029.  
  1030. setOption SoundQuality $Low
  1031. setOption FullscreenFadeEffect $Off
  1032. setOption AnimationSamplingLevel $Low
  1033. setOption ScreenModeResolution $Low
  1034. setOption SubjectTracking $Low
  1035. setOption EnableLotImpostersInLot $Off
  1036. setOption EnableNeighborhoodOccupantsInLot $Off
  1037. setOption LotSkirtSizeIncrease 0
  1038. setOption SnowOnGround $On
  1039.  
  1040. endif
  1041.  
  1042.  
  1043. #############################################################################
  1044. # save the selected configuration for this device.
  1045.  
  1046. boolProp activeDeviceUseSoftwareRasterizer $useSoftwareRasterizer
  1047.  
  1048. #############################################################################
  1049. # tell the caller that we completely finished parsing the script
  1050. intProp configParserErrorCode 0
  1051.  
  1052. uintProp hwMajorPSVersion $maxPixelProgramVersionMajor
  1053.  
  1054. log $logGroup $logLevelInfo "Finished Config File"
RAW Paste Data