Advertisement
Strictoaster

Graphic Rules.sgr

Feb 13th, 2016
11,999
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 19.81 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       32   # To stop thrashing, plus a little pad.
  491.    property dirtyRectMergeFrames 1   # Default, for low-end card.
  492.    property TextureBits          32  # mostly just for preview -- everything else
  493.                                      # should be DXT
  494.    property usevertexbuffers false #  This speeds up scrolling and reduce scrolling-related crashes drastically.
  495.  
  496.    partialRule
  497.       # Enable more cars and sims if user has decent computing power.
  498.       atLeast memory          256
  499.       atLeast cpuSpeed       1600
  500.       option $CarsSims      $Medium
  501.    end
  502.  
  503.    partialRule
  504.       # Enable more visual effects if user has decent computing power.
  505.       atLeast memory          128
  506.       atLeast cpuSpeed        700
  507.       option $VisualEffects $Medium
  508.    end
  509.  
  510.    partialRule
  511.       # Enable more shadows if user has decent computing power.
  512.       atLeast memory          256
  513.       atLeast cpuSpeed       1800
  514.       option $Shadows       $Medium
  515.    end
  516.  
  517.    partialRule
  518.       # Enable clouds and fog if user has decent computing power.
  519.       atLeast memory          300
  520.       atLeast cpuSpeed       1600
  521.       option $CloudsFog     $On
  522.    end
  523.  
  524.    partialRule
  525.       # Enable higher screen resolution if user has decent computing power.
  526.       atLeast memory          256
  527.       atLeast cpuSpeed       1600
  528.       option $ScreenSize     $Screen_1024x768
  529.    end
  530.  
  531.    partialRule "No DXT"
  532.       hasNo DXT
  533.      
  534.       property TextureBits 16  # we'll need all the VRAM we can get...
  535.       option $ScreenDepth  $Depth_16
  536.    end
  537.    
  538.    partialRule "Two stages"
  539.       atLeast textureStages 2
  540.        
  541.       property useSecondStage       true
  542.       property dirtyRectMergeFrames 4
  543.    end
  544.    
  545.    partialRule "Lotsa vidmem"
  546.       atLeast videoMemory 100  # includes AGP
  547.        
  548.       property texBindMaxFree  32 # keep a little more round
  549.    end
  550.    
  551.    partialRule "Slow card"
  552.       stringMatch cardIdentity "ATI*128*"
  553.       stringMatch cardIdentity "ATI*Rage*"
  554.       stringMatch cardIdentity "ATI*Mach*"
  555.        
  556.       option $Shadows    $Low
  557.    end
  558.    
  559.    # The Radeon series has a very slow path for partial
  560.    # depth buffer copies. This has apparently been
  561.    # fixed for 9500 and later models in the latest drivers,
  562.    # but cannot be fixed on previous Radeons because of
  563.    # hardware limitations.
  564.    # NOTE: disabling this rule unnecessarily may lead to
  565.    # very poor graphics performance.
  566.    partialRule "Radeon"
  567.       stringMatch cardIdentity "*Radeon*"
  568.      
  569.       partialRule "SlowSubrectDepthCopy" -any
  570.          stringMatch cardIdentity "*7?00*"
  571.          stringMatch cardIdentity "*8?00*"
  572.          stringMatch cardIdentity "*9000*"
  573.          stringMatch cardIdentity "*9100*"
  574.          stringMatch cardIdentity "*9200*"
  575.          stringMatch cardIdentity "*9300*"
  576.          stringMatch cardIdentity "*9400*"
  577.          stringMatch cardIdentity "ATI, Radeon"
  578.          stringMatch cardIdentity "ATI, Radeon VE"
  579.          stringMatch cardIdentity "ATI, Radeon Mobility"
  580.          stringMatch cardIdentity "ATI, Radeon FireGL"
  581.          
  582.          # results in special low-impact scrolling mode.
  583.          property noPartialBackingStoreCopies false
  584.          
  585.          # try to reduce the number of dirty rects.
  586.          property dirtyRectMergeFrames 8
  587.          
  588.          # use black and white cursors. The Radeons seem
  589.          # to work with colour for a while, but in low
  590.          # memory situations revert to flickering.
  591.          option $Cursor $CursorBW
  592.       end
  593.    end
  594.  
  595.    partialRule "Kyro"
  596.       # still doesn't work great -- has problems
  597.       # minifying textures in zoom 1.
  598.       stringMatch cardIdentity "*Kyro*"
  599.      
  600.       property useSecondStage true
  601.       option $CloudsFog       $Off
  602.       option $Waves           $Off
  603.    end
  604.  
  605.    partialRule "Poor color cursor" -any
  606.       stringMatch cardIdentity "ATI*128*"
  607.       stringMatch cardIdentity "ATI*Rage*"
  608.       stringMatch cardIdentity "ATI*Mach*"
  609.       stringMatch cardIdentity "S3*"
  610.       stringMatch cardIdentity "Trident*"
  611.       stringMatch cardIdentity "3dfx*"        # The banshee reportedly works, but this is simplest.
  612.       stringMatch cardIdentity "Intel*"       # 815E is BW only.  845+ is unknown but to be safe....
  613.      
  614.       option $Cursor          $CursorBW
  615.    end
  616.  
  617.    partialRule "NoAddSigned" -any
  618.       # this shows up as odd zone colours.
  619.       stringMatch cardIdentity "ATI*128*"
  620.       stringMatch cardIdentity "ATI*Rage*"
  621.        
  622.       property NoAddSigned true
  623.    end
  624.  
  625.    partialRule "Not Slow GeForce"
  626.       # We don't want the 'fast card' rules to apply to these GeForce cards, though possibly to other GeForce cards.
  627.       stringNotMatch cardIdentity "*GeForce 256*"
  628.       stringNotMatch cardIdentity "*GeForce2 *"
  629.  
  630.       partialRule "Fast card" -any
  631.          # We run well on these cards, so up the defaults.
  632.          stringMatch cardIdentity "NVidia*Geforce*"
  633.          stringMatch cardIdentity "NVidia*Quadro*"
  634.          stringMatch cardIdentity "ATI*9700*"
  635.          stringMatch cardIdentity "ATI*8500*"
  636.          stringMatch cardIdentity "Matrox*Parhelia*"
  637.  
  638.          partialRule
  639.             # Enable 32 bit graphics if user has decent computing power.
  640.             # Paul P: My tests have shown that my GeForce uses less memory in 16 bit mode than 32 bit mode.
  641.             atLeast memory          256
  642.             atLeast cpuSpeed       1000
  643.             option $ScreenDepth   $Depth_32
  644.          end
  645.  
  646.          partialRule
  647.             # Enable more cars and sims if user has decent computing power.
  648.             atLeast memory          256
  649.             atLeast cpuSpeed       1400
  650.             option $CarsSims      $High
  651.          end
  652.  
  653.          partialRule
  654.             # Enable more visual effects if user has decent computing power.
  655.             atLeast memory          256
  656.             atLeast cpuSpeed       1600
  657.             option $VisualEffects $High
  658.          end
  659.  
  660.          partialRule
  661.             # Enable more shadows if user has decent computing power.
  662.             atLeast memory       512
  663.             atLeast cpuSpeed    2000
  664.             option $Shadows    $High
  665.          end
  666.          
  667.          partialRule
  668.             # Enable clouds and fog if user has decent computing power.
  669.             atLeast memory          256
  670.             atLeast cpuSpeed       1000
  671.             option $CloudsFog     $On
  672.          end
  673.  
  674.          property dirtyRectMergeFrames 2
  675.       end
  676.    end
  677. end
  678.  
  679.  
  680.  
  681.  
  682. # For figuring out what kind of card we are
  683. sinclude "Video Cards.sgr"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement