Guest User

Untitled

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