Strictoaster

Original Graphics Rules.sgr

Feb 13th, 2016
216
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 19.70 KB | None | 0 0
  1. #############################################################################
  2. #
  3. # property groups for options set via the UI
  4. #
  5.  
  6.  
  7. set VisualEffects             0
  8. set CarsSims                  1
  9. set Shadows                   2
  10. set TextureQuality            3
  11. set CloudsFog                 4
  12. set Waves                     5
  13. set Driver                    6
  14. set Cursor                    7
  15. set Translucency              8
  16. set CityDetail                9
  17. set VariableSpeedAutomata    10
  18.  
  19. set ScreenSize               11
  20. set ScreenDepth              12
  21. set DayNight                 13
  22.  
  23. set BuildingVarietyGroup     14
  24. set BuildingLoaderSpeedGroup 15
  25.  
  26. #############################################################################
  27.  
  28. set Off 0
  29. set On  1
  30.  
  31. set Low     1
  32. set Medium  2
  33. set High    3
  34.  
  35. set CursorBW    0
  36. set CursorColor 1
  37.  
  38. set Software    0
  39. set Hardware    1
  40.  
  41. set Screen_800x600    0
  42. set Screen_1024x768   1
  43. set Screen_1280x1024  2
  44. set Screen_1600x1200  3
  45.  
  46. set Depth_16    0
  47. set Depth_32    1
  48.  
  49. #############################################################################
  50.  
  51. optionGroup $VisualEffects
  52.    option $Low
  53.       property particleDensity       0.25
  54.       property particleScale         2.0
  55.       property maxParticlesTarget    400
  56.       property particleDamping       0.0
  57.       property particleLODOffset     2    # subtracted from the zoom.
  58.       property effectPriorityLevel   1  
  59.       property useScreenShake        false
  60.       property useScreenFlash        false
  61.      
  62.       property demolishModelThreshold 24
  63.  
  64.    option $Medium
  65.       property particleDensity       0.5
  66.       property particleScale         2.0
  67.       property maxParticlesTarget    1200
  68.       property particleDamping       0.0
  69.       property particleLODOffset     0    # subtracted from the zoom.
  70.       property effectPriorityLevel   3
  71.       property useScreenShake        true
  72.       property useScreenFlash        true
  73.    
  74.       property demolishModelThreshold 18
  75.  
  76.    option $High
  77.       property particleDensity       1
  78.       property particleScale         1
  79.       property maxParticlesTarget    5000
  80.       property particleDamping       0.0
  81.       property particleLODOffset     0    # subtracted from the zoom.
  82.       property effectPriorityLevel   5
  83.       property useScreenShake        true
  84.       property useScreenFlash        true
  85.    
  86.       property demolishModelThreshold 12
  87. end
  88.  
  89. optionGroup $CarsSims
  90. # Sadly, we have no off
  91. #  option $Off
  92.    option $Low  
  93.       property maxVehiclePct    0.0
  94.       property maxPedPct        0.0
  95.       property minVehicleZoom   5
  96.       property minPedZoom       5
  97.    
  98. #   option $Low
  99. #      property maxVehiclePct    0.2
  100. #      property maxPedPct        0.2
  101. #      property minVehicleZoom   5
  102. #      property minPedZoom       5
  103.    
  104.    option $Medium
  105.       property maxVehiclePct    0.5
  106.       property maxPedPct        0.5
  107.       property minVehicleZoom   4
  108.       property minPedZoom       5
  109.    
  110.    option $High
  111.       property maxVehiclePct    1
  112.       property maxPedPct        1
  113.       property minVehicleZoom   3
  114.       property minPedZoom       4
  115. end
  116.  
  117. optionGroup $Shadows
  118. # Sadly, we have no off
  119. #      option $Off
  120.       option $Low
  121.       property shadowQuality 0 # off
  122.       property shadowModelThreshold 40
  123.       property lightingUpdateDelta 0.2
  124.    
  125. #   option $Low
  126. #      property shadowQuality 2
  127. #      property shadowModelThreshold 40
  128. #      property lightingUpdateDelta 0.2
  129.    
  130.    option $Medium
  131.       property shadowQuality 3
  132.       property shadowModelThreshold 22
  133.       property lightingUpdateDelta 0.05
  134.    
  135.    option $High
  136.       property shadowQuality 5
  137.       property shadowModelThreshold 12
  138.       property lightingUpdateDelta 1e-4
  139. end
  140.  
  141.  
  142. optionGroup $CloudsFog
  143.    option $On
  144.       property renderCloudsAndFog true
  145.    option $Off
  146.       property renderCloudsAndFog false
  147. end
  148.  
  149. optionGroup $Waves
  150.    option $On
  151.       property renderWaterEffects true
  152.    
  153.    option $Off
  154.       property renderWaterEffects false
  155. end
  156.  
  157.  
  158. optionGroup $Cursor
  159.    option $CursorBW
  160.       property cursorType 1
  161.    
  162.    option $CursorColor
  163.       property cursorType 3 # 256-color
  164. end
  165.  
  166. optionGroup $Translucency
  167.    option $On
  168.       property preferOpaque false
  169.    
  170.    option $Off
  171.       property preferOpaque true
  172. end
  173.  
  174. optionGroup $CityDetail
  175.    option $Low
  176.       property renderModelThreshold 12
  177.    option $Medium
  178.       property renderModelThreshold 6  
  179.    option $High
  180.       property renderModelThreshold 2
  181. end
  182.  
  183. optionGroup $BuildingVarietyGroup
  184.    option $Low
  185.       property buildingVariety 0
  186.    option $Medium
  187.       property buildingVariety 1
  188.    option $High
  189.       property buildingVariety 2
  190. end
  191.  
  192. optionGroup $BuildingLoaderSpeedGroup
  193.    option $Low
  194.       property buildingLoaderSpeed 0
  195.    option $Medium
  196.       property buildingLoaderSpeed 1
  197.    option $High
  198.       property buildingLoaderSpeed 2
  199. end
  200.  
  201. optionGroup $TextureQuality
  202.    option $Low
  203.       property modelLODOffset 2
  204.    option $Medium
  205.       property modelLODOffset 1
  206.    option $High
  207.       property modelLODOffset 0
  208. end
  209.  
  210.  
  211. #############################################################################
  212. #
  213. # Configuration Rules
  214. #
  215.  
  216. #<
  217.  
  218.    Current configuration sources, with example values:
  219.    
  220.    Flags (has, hasNo):
  221.       hardwareDriver = true
  222.       DXT = true
  223.       fullscreen = false
  224.       MMX = true
  225.       FPU = true
  226.       backingStore = true
  227.  
  228.    Strings (stringMatch, stringNotMatch):
  229.       userName = awillmott
  230.       appName = SimCity 4
  231.       version = 1.0.238.0
  232.       osVersion = Windows NT 5.0
  233.       computerName = AWILLMOTT-6776
  234.       CPU = GenuineIntel
  235.       sglDriverName = DirectX
  236.       sglDriverVersion = 2.0
  237.       driverName = nv4_disp.dll
  238.       driverVersion = 6.13.10.3082, GUID: D7B71E3E-4110-11CF-F576-37200CC2CD35
  239.       cardName = NVIDIA GeForce4 Ti 4600
  240.       cardVersion = Vendor: 10de, Device: 0250, Board: 371545, Chipset: 00a3
  241.       cardIdentity = NVIDIA GeForce4 Ti 4600
  242.       soundDriverName = Unknown
  243.       soundCardName = Unknown
  244.       buildType = Beta
  245.  
  246.    Numbers (atLeast, atMost):
  247.       cpuSpeed = 1894
  248.       memory = 1024
  249.       freeMemory = 624
  250.       screenWidth = 1600
  251.       screenHeight = 1200
  252.       screenBPP = 16
  253.       videoMemory = 123
  254.       textureMemory = 123
  255.       textureStages = 4
  256.  
  257.    Processing stops after a rule if the rule matches.
  258.    Partial rules continue processing.
  259.    A rule with -any is accepted if any of its conditions are
  260.    met -- the default is that all conditions must be met.
  261. #>
  262.  
  263.  
  264.  
  265. # Sound
  266. partialRule "Sound"
  267.    rule "high sound detail"
  268.       atLeast cpuSpeed 1500
  269.       property soundDetail 2
  270.    end
  271.    rule "medium sound detail"
  272.       atLeast cpuSpeed 800
  273.       property soundDetail 1
  274.    end
  275.    rule "low sound detail"
  276.       property soundDetail 0
  277.    end
  278. end
  279.  
  280.  
  281. partialRule "City Detail and Day/Night Settings"
  282.    rule
  283.       # Windows XP
  284.       stringMatch osVersion "Windows NT 5.1"
  285.  
  286.       rule "high computer power"
  287.          atLeast memory                      800
  288.          atLeast cpuSpeed                    2400
  289.          option  $CityDetail                 $High
  290.          option  $DayNight                   $On
  291.          option  $BuildingLoaderSpeedGroup   $High
  292.       end
  293.       rule "medium computer power"
  294.          atLeast memory                       600
  295.          atLeast cpuSpeed                     1800
  296.          option $CityDetail                  $Medium
  297.          option $DayNight                    $Off
  298.          option $BuildingLoaderSpeedGroup    $Medium
  299.       end
  300.       rule "low computer power"
  301.          option $CityDetail                  $Low
  302.          option $DayNight                    $Off
  303.          option $BuildingLoaderSpeedGroup    $Low
  304.       end
  305.    end
  306.    rule
  307.       # Windows 2000
  308.       stringMatch osVersion "Windows NT 5.0"  
  309.  
  310.       rule "high computer power"
  311.          atLeast memory                      700
  312.          atLeast cpuSpeed                    2000
  313.          option  $CityDetail                 $High
  314.          option  $DayNight                   $On
  315.          option  $BuildingLoaderSpeedGroup   $High
  316.       end
  317.       rule "medium computer power"
  318.          atLeast memory                       500
  319.          atLeast cpuSpeed                     1400
  320.          option $CityDetail                  $Medium
  321.          option $DayNight                    $Off
  322.          option $BuildingLoaderSpeedGroup    $Medium
  323.       end
  324.       rule "low computer power"
  325.          option $CityDetail                  $Low
  326.          option $DayNight                    $Off
  327.          option $BuildingLoaderSpeedGroup    $Low
  328.       end
  329.    end
  330.    rule
  331.       # Windows 98, or anything beyond Windows XP.
  332.  
  333.       rule "high computer power"
  334.          atLeast memory                      500
  335.          atLeast cpuSpeed                    1800
  336.          option  $CityDetail                 $High
  337.          option  $DayNight                   $On
  338.          option  $BuildingLoaderSpeedGroup   $High
  339.       end
  340.       rule "medium computer power"
  341.          atLeast memory                       400
  342.          atLeast cpuSpeed                     1600
  343.          option $CityDetail                  $Medium
  344.          option $DayNight                    $Off
  345.          option $BuildingLoaderSpeedGroup    $Medium
  346.       end
  347.       rule "low computer power"
  348.          option $CityDetail                  $Low
  349.          option $DayNight                    $Off
  350.          option $BuildingLoaderSpeedGroup    $Low
  351.       end
  352.    end
  353. end
  354.  
  355. partialRule "Texture Quality and Building Variety Settings"
  356.    rule
  357.       # Windows XP
  358.       stringMatch osVersion "Windows NT 5.1"
  359.  
  360.       rule "high memory"
  361.          atLeast memory                500
  362.          option $TextureQuality        $High
  363.          option $BuildingVarietyGroup  $High
  364.       end
  365.       rule "medium memory"
  366.          atLeast memory                 300
  367.          option $TextureQuality        $Medium
  368.          option $BuildingVarietyGroup  $Medium
  369.       end
  370.       rule "low memory"
  371.          option $TextureQuality        $Low
  372.          option $BuildingVarietyGroup  $Low
  373.       end
  374.    end
  375.    rule
  376.       # Windows 2000
  377.       stringMatch osVersion "Windows NT 5.0"  
  378.  
  379.       rule "high memory"
  380.          atLeast memory                500
  381.          option $TextureQuality        $High
  382.          option $BuildingVarietyGroup  $High
  383.       end
  384.       rule "medium memory"
  385.          atLeast memory                 200
  386.          option $TextureQuality        $Medium
  387.          option $BuildingVarietyGroup  $Medium
  388.       end
  389.       rule "low memory"
  390.          option $TextureQuality        $Low
  391.          option $BuildingVarietyGroup  $Low
  392.       end
  393.    end
  394.    rule
  395.       # Windows 98, or anything beyond Windows XP.
  396.  
  397.       rule "high memory"
  398.          atLeast memory                500
  399.          option $TextureQuality        $High
  400.          option $BuildingVarietyGroup  $High
  401.       end
  402.       rule "medium memory"
  403.          atLeast memory                 200
  404.          option $TextureQuality        $Medium
  405.          option $BuildingVarietyGroup  $Medium
  406.       end
  407.       rule "low memory"
  408.          option $TextureQuality        $Low
  409.          option $BuildingVarietyGroup  $Low
  410.       end
  411.    end
  412. end
  413.  
  414. partialRule "Variable Speed Automata"
  415.    rule "default"
  416.       option $VariableSpeedAutomata $On
  417.    end
  418. end
  419.  
  420. partialRule "Recommend Software" -any
  421.    stringMatch cardIdentity "3D Labs*"
  422.    stringMatch cardIdentity "*Kyro*"
  423.  
  424.    partialRule "Non-shared memory"
  425.       stringNotMatch cardIdentity "Intel*"
  426.       atMost videoMemory 15 # less than recommended
  427.    end
  428.    
  429.    property forceSoftwareDriver $prefsFirstTime
  430. end
  431.  
  432.  
  433. # must come before software driver rules, after "Recommend Software".
  434. partialRule "No backing store"
  435.    hasNo backingStore
  436.    
  437.    property forceSoftwareDriver true   # need to force this immediately
  438. end
  439.  
  440.  
  441. rule "Standard software"
  442.    hasNo hardwareDriver
  443.    
  444.    option $VisualEffects   $Low
  445.    option $CarsSims        $Low
  446.    option $Shadows         $Low
  447.    option $CloudsFog       $Off
  448.    option $Waves           $Off
  449.    option $Translucency    $On
  450.    option $Cursor          $CursorBW
  451.    option $Driver          $Software
  452.    option $ScreenSize      $Screen_800x600
  453.    option $ScreenDepth     $Depth_16
  454.  
  455.    partialRule
  456.       # Enable more visual effects if user has decent computing power.
  457.       atLeast memory          128
  458.       atLeast cpuSpeed       1000
  459.       option $VisualEffects $Medium
  460.    end
  461.  
  462.    partialRule
  463.       # Enable clouds and fog if user has decent computing power.
  464.       atLeast memory       256
  465.       atLeast cpuSpeed    2400
  466.       option $CloudsFog  $On
  467.    end
  468.  
  469.    property useSecondStage      false
  470.    property texBindMaxFree       4   # Software now caches DXT.
  471.    property dirtyRectMergeFrames 1   # software is pretty good about BS updates
  472.    property TextureBits         32   # software hardwired for 32-bit internally.
  473. end
  474.  
  475.  
  476. rule "Standard hardware"
  477.  
  478.    option $VisualEffects   $Low
  479.    option $CarsSims        $Low
  480.    option $Shadows         $Low
  481.    option $CloudsFog       $Off
  482.    option $Waves           $On
  483.    option $Translucency    $On
  484.    option $Cursor          $CursorColor
  485.    option $Driver          $Hardware
  486.    option $ScreenSize      $Screen_800x600
  487.    option $ScreenDepth     $Depth_16
  488.    
  489.    property useSecondStage       false  # Default, overridden below in most cases.
  490.    property texBindMaxFree       4   # To stop thrashing, plus a little pad.
  491.    property dirtyRectMergeFrames 6   # Default, for low-end card.
  492.    property TextureBits          32  # mostly just for preview -- everything else
  493.                                      # should be DXT
  494.  
  495.    partialRule
  496.       # Enable more cars and sims if user has decent computing power.
  497.       atLeast memory          256
  498.       atLeast cpuSpeed       1600
  499.       option $CarsSims      $Medium
  500.    end
  501.  
  502.    partialRule
  503.       # Enable more visual effects if user has decent computing power.
  504.       atLeast memory          128
  505.       atLeast cpuSpeed        700
  506.       option $VisualEffects $Medium
  507.    end
  508.  
  509.    partialRule
  510.       # Enable more shadows if user has decent computing power.
  511.       atLeast memory          256
  512.       atLeast cpuSpeed       1800
  513.       option $Shadows       $Medium
  514.    end
  515.  
  516.    partialRule
  517.       # Enable clouds and fog if user has decent computing power.
  518.       atLeast memory          300
  519.       atLeast cpuSpeed       1600
  520.       option $CloudsFog     $On
  521.    end
  522.  
  523.    partialRule
  524.       # Enable higher screen resolution if user has decent computing power.
  525.       atLeast memory          256
  526.       atLeast cpuSpeed       1600
  527.       option $ScreenSize     $Screen_1024x768
  528.    end
  529.  
  530.    partialRule "No DXT"
  531.       hasNo DXT
  532.      
  533.       property TextureBits 16  # we'll need all the VRAM we can get...
  534.       option $ScreenDepth  $Depth_16
  535.    end
  536.    
  537.    partialRule "Two stages"
  538.       atLeast textureStages 2
  539.        
  540.       property useSecondStage       true
  541.       property dirtyRectMergeFrames 4
  542.    end
  543.    
  544.    partialRule "Lotsa vidmem"
  545.       atLeast videoMemory 100  # includes AGP
  546.        
  547.       property texBindMaxFree  8 # keep a little more round
  548.    end
  549.    
  550.    partialRule "Slow card"
  551.       stringMatch cardIdentity "ATI*128*"
  552.       stringMatch cardIdentity "ATI*Rage*"
  553.       stringMatch cardIdentity "ATI*Mach*"
  554.        
  555.       option $Shadows    $Low
  556.    end
  557.    
  558.    # The Radeon series has a very slow path for partial
  559.    # depth buffer copies. This has apparently been
  560.    # fixed for 9500 and later models in the latest drivers,
  561.    # but cannot be fixed on previous Radeons because of
  562.    # hardware limitations.
  563.    # NOTE: disabling this rule unnecessarily may lead to
  564.    # very poor graphics performance.
  565.    partialRule "Radeon"
  566.       stringMatch cardIdentity "*Radeon*"
  567.      
  568.       partialRule "SlowSubrectDepthCopy" -any
  569.          stringMatch cardIdentity "*7?00*"
  570.          stringMatch cardIdentity "*8?00*"
  571.          stringMatch cardIdentity "*9000*"
  572.          stringMatch cardIdentity "*9100*"
  573.          stringMatch cardIdentity "*9200*"
  574.          stringMatch cardIdentity "*9300*"
  575.          stringMatch cardIdentity "*9400*"
  576.          stringMatch cardIdentity "ATI, Radeon"
  577.          stringMatch cardIdentity "ATI, Radeon VE"
  578.          stringMatch cardIdentity "ATI, Radeon Mobility"
  579.          stringMatch cardIdentity "ATI, Radeon FireGL"
  580.          
  581.          # results in special low-impact scrolling mode.
  582.          property noPartialBackingStoreCopies true
  583.          
  584.          # try to reduce the number of dirty rects.
  585.          property dirtyRectMergeFrames 8
  586.          
  587.          # use black and white cursors. The Radeons seem
  588.          # to work with colour for a while, but in low
  589.          # memory situations revert to flickering.
  590.          option $Cursor $CursorBW
  591.       end
  592.    end
  593.  
  594.    partialRule "Kyro"
  595.       # still doesn't work great -- has problems
  596.       # minifying textures in zoom 1.
  597.       stringMatch cardIdentity "*Kyro*"
  598.      
  599.       property useSecondStage false
  600.       option $CloudsFog       $Off
  601.       option $Waves           $Off
  602.    end
  603.  
  604.    partialRule "Poor color cursor" -any
  605.       stringMatch cardIdentity "ATI*128*"
  606.       stringMatch cardIdentity "ATI*Rage*"
  607.       stringMatch cardIdentity "ATI*Mach*"
  608.       stringMatch cardIdentity "S3*"
  609.       stringMatch cardIdentity "Trident*"
  610.       stringMatch cardIdentity "3dfx*"        # The banshee reportedly works, but this is simplest.
  611.       stringMatch cardIdentity "Intel*"       # 815E is BW only.  845+ is unknown but to be safe....
  612.      
  613.       option $Cursor          $CursorBW
  614.    end
  615.  
  616.    partialRule "NoAddSigned" -any
  617.       # this shows up as odd zone colours.
  618.       stringMatch cardIdentity "ATI*128*"
  619.       stringMatch cardIdentity "ATI*Rage*"
  620.        
  621.       property NoAddSigned true
  622.    end
  623.  
  624.    partialRule "Not Slow GeForce"
  625.       # We don't want the 'fast card' rules to apply to these GeForce cards, though possibly to other GeForce cards.
  626.       stringNotMatch cardIdentity "*GeForce 256*"
  627.       stringNotMatch cardIdentity "*GeForce2 *"
  628.  
  629.       partialRule "Fast card" -any
  630.          # We run well on these cards, so up the defaults.
  631.          stringMatch cardIdentity "NVidia*Geforce*"
  632.          stringMatch cardIdentity "NVidia*Quadro*"
  633.          stringMatch cardIdentity "ATI*9700*"
  634.          stringMatch cardIdentity "ATI*8500*"
  635.          stringMatch cardIdentity "Matrox*Parhelia*"
  636.  
  637.          partialRule
  638.             # Enable 32 bit graphics if user has decent computing power.
  639.             # Paul P: My tests have shown that my GeForce uses less memory in 16 bit mode than 32 bit mode.
  640.             atLeast memory          256
  641.             atLeast cpuSpeed       1000
  642.             option $ScreenDepth   $Depth_32
  643.          end
  644.  
  645.          partialRule
  646.             # Enable more cars and sims if user has decent computing power.
  647.             atLeast memory          256
  648.             atLeast cpuSpeed       1400
  649.             option $CarsSims      $High
  650.          end
  651.  
  652.          partialRule
  653.             # Enable more visual effects if user has decent computing power.
  654.             atLeast memory          256
  655.             atLeast cpuSpeed       1600
  656.             option $VisualEffects $High
  657.          end
  658.  
  659.          partialRule
  660.             # Enable more shadows if user has decent computing power.
  661.             atLeast memory       512
  662.             atLeast cpuSpeed    2000
  663.             option $Shadows    $High
  664.          end
  665.          
  666.          partialRule
  667.             # Enable clouds and fog if user has decent computing power.
  668.             atLeast memory          256
  669.             atLeast cpuSpeed       1000
  670.             option $CloudsFog     $On
  671.          end
  672.  
  673.          property dirtyRectMergeFrames 2
  674.       end
  675.    end
  676. end
  677.  
  678.  
  679.  
  680.  
  681. # For figuring out what kind of card we are
  682. sinclude "Video Cards.sgr"
Add Comment
Please, Sign In to add comment