############################################################################# # Configuration rules and options for Spore # # Andrew Willmott # # # This script both defines what the various game options # do, and sets defaults for them based on the video # card, sound card, CPU, and other factors. # # It also sets some properties determining what the # hardware will support. # ############################################################################# # Constants # # UI graphics settings set Off 0 set On 1 set Low 1 set Medium 2 set High 3 # Shader paths -- must match with Material/config.mtl seti shaderPath2_m 0 seti shaderPath2_0 1 seti shaderPath2_x 2 seti shaderPath3_0 3 # Set up option categories # sinclude Options.txt ############################################################################# # Set up # setVariables if ($VistaKB940105Required) alert "The game may run out of address space with some configurations\nand video cards, resulting in stability problems.\n\nIt is recommended that you install the latest Windows Vista Service Pack\nand check for updated video drivers.\n\nFor details see the Microsoft Knowledge Base article\n\n http://support.microsoft.com/default.aspx/kb/940105\n\n" 1003 -warning endif if ($cider) # Running under Mac wrapper. Set mac-specific options here boolProp AlwaysFullscreen true boolProp MacSpecificText true boolProp Support51Audio false endif # Initial 'best case' defaults. # These may be overridden below according to CPU or card. setOption OptionShadows $High setOption OptionTextureDetail $High setOption OptionEffects $High setOption OptionBakeQuality $High setOption OptionLighting $High setOption OptionPlanetQuality $High setOption OptionPhotoRes $Medium setOption OptionVideoRes $Medium setOption OptionAudioPerformance $Medium setOption OptionGameQuality $High setOption OptionDiskCacheSize 4 # 1GB setOption OptionTutorialsEnabled $On setOption OptionShowHints $On setOption OptionExplainSporepedia $On setOption OptionExplainPaintLikeThis $On ############################################################################# # Identify graphics card # # set some config variables based on a card table and vendor specific rules # sets isCardFound, cardVendor, and cardName include "VideoCards.txt" # Fallback on the card name text supplied by the card itself. # Assumes that at least the cardVendor has been matched, since # vendor name is not contained in some vendor card names. # Note that specific vendors are overridden to a default card. # For ATI -> Radeon 9800 Pro # For NVIDIA -> NVIDIA 4800 TI SE #if (not $isCardFound) set cardName "Radeon X1300/X1550 Series" # $graphicsCard #endif trace "===" trace "=== Graphics Card: ${cardName} from ${cardVendor}, driver build ${driverBuild}" trace "===" if ( ${numSimultaneousRTs} > 1 ) setOption OptionShadows $High boolProp MRT 1 else setOption OptionShadows $Low boolProp MRT 0 endif if ($cpuCount > 1) seti adjustedCPU (round($cpuSpeed * 1.3)) else seti adjustedCPU $cpuSpeed endif # TODO: adjust for M/core 2 if ($adjustedCPU < 2200) seti cpuLevel 0 elseif ($adjustedCPU < 3000) seti cpuLevel 1 else seti cpuLevel 2 endif trace "=== CPU level ${cpuLevel}" if ($cpuLevel == 0) setOption OptionShadows $Low # these add to the CPU dispatch burden setOption OptionEffects $Low setOption OptionBakeQuality $Low setOption OptionPlanetQuality $Low setOption OptionGameQuality $Low endif if ($cpuLevel == 1) setOption OptionShadows $Medium setOption OptionEffects $Medium setOption OptionBakeQuality $Medium setOption OptionPlanetQuality $Medium setOption OptionGameQuality $Medium endif if ($cpuLevel == 2) setOption OptionShadows $High setOption OptionEffects $High setOption OptionBakeQuality $High setOption OptionPlanetQuality $High setOption OptionGameQuality $High endif setOption OptionTextureDetail $Medium ############################################################################ # Set base shader path # seti shaderPathToSet 0 # First, set the maximum path the card will support. if ((${maxVertexProgramVersionHW} >= 768) and (${maxPixelProgramVersion} >= 768)) trace "=== Setting 3_0 shader path" seti shaderPathToSet $shaderPath3_0 elseif ((${maxVertexProgramVersionHW} >= 512) and (${maxPixelProgramVersion} >= 512)) if ((${maxPSInstructions} >= 256) and (${maxPSRegisters} >= 32)) trace "=== Setting 2_x shader path" seti shaderPathToSet $shaderPath2_x else trace "=== Setting base 2_0 shader path" seti shaderPathToSet $shaderPath2_0 endif elseif ((${maxPixelProgramVersion} >= 512)) # probably intel-integrated with software VS # TODO: extra checks that CPU speed is fast enough. trace "=== Setting 2_m minimal PS shader path" seti shaderPathToSet $shaderPath2_m else alert "Sorry, your graphics card is below our min spec, the game will not run. Please see the README for details." 2001 seti shaderPathToSet 0 endif # NOTE: do not override this for special cases, unless the card will # actually crash or has bugs. Instead setOption OptionLighting to # reduce the path by default to what we recommend. intProp shaderPath $shaderPathToSet if ($instancing) trace "=== Instancing can be enabled" boolProp effectsInstancing true # we may override below on cards that have bugs endif ############################################################################ # Shadow/texture settings # if ($shaderPathToSet >= $shaderPath3_0) seti shadowOption $High seti resolutionTarget (1024 * 768) elseif ($shaderPathToSet >= $shaderPath2_x) seti shadowOption $Medium seti resolutionTarget (1024 * 768) else seti shadowOption $Low seti resolutionTarget (800 * 600) endif if ($shaderPathToSet >= $shaderPath2_x) setOption OptionTextureDetail $High elseif ($textureMemory > 128) # this generally includes AGP, so we need to adjust this setOption OptionTextureDetail $Medium else setOption OptionTextureDetail $Low endif # Exceptions if (match("${cardVendor}", "ATI")) if (match("${cardName}", "*X1??0*")) if (not match("${cardName}", "*X18?0*") and not match("${cardName}", "*X19?0*")) setOption OptionShadows $Medium endif endif endif if (match("${cardVendor}", "NVIDIA")) if (match("${cardName}", "*6??0*") or match("${cardName}", "*Quadro*FX*14?0*") or match("${cardName}", "*Quadro*FX*15?0*") or match("${cardName}", "*Quadro*FX*3450*")) setOption OptionShadows $Medium endif endif trace "=== Card-based shadow setting ${shadowOption}" # CPU override -- card can handle it but we don't have CPU to push the extra polys if ($cpuLevel == 0) seti shadowOption 0 endif if ($cpuLevel == 1 and $shadowOption > $Low) seti shadowOption ($shadowOption - 1) endif trace "=== CPU-adjusted shadow setting ${shadowOption}" setOption OptionShadows $shadowOption ############################################################################ # Exceptions based on GPU # # Vista exhibits hangs when using D3DQUERYTYPE_EVENT. trace "OS = ${OSName}" if (match("${OSName}", "*vista*")) trace "=== Vista: avoiding GPU flush" intProp NumFramesToBuffer 3 # avoid GPU lock to reduce buffering -- leave it to the driver endif ############################################################################ # Exceptions based on GPU # # The notorious NVIDIA FX series. # These theoretically support PS2, but in practice have such # appalling performance (even with half) that it's unusable. if (match("${cardVendor}", "NVIDIA") and match("${cardName}", "*5??0*")) trace "=== FX -- dropping settings" setOption OptionShadows $Low setOption OptionTextureDetail $Low setOption OptionEffects $Low setOption OptionBakeQuality $Low setOption OptionLighting $Low # this will force 2_m path, but we let them raise it if they want setOption OptionPlanetQuality $Low seti resolutionTarget (800 * 600) endif # Low-end/integrated parts # These are generally heavily cut down, integrated, and/or have no VRAM, e.g. NVIDIA's "TurboCache" # stuff. NVIDIA in particular have a habit of selling these using very similar series # numbers to their high-end parts. # ATI Radeon X300 (Xpress 200) # NVIDIA GeForce 6100 # NVIDIA GeForce 6200 TurboCache-16 # NVIDIA GeForce 6200 TurboCache-32 if (match("${cardName}", "*TurboCache*") or match("${cardName}", "*NVIDIA*GeForce 6100*") or match("${cardName}", "*NVIDIA*GeForce 6200*") or match("${cardName}", "*ATI*Xpress*")) trace "=== Integrated/low-end card -- dropping settings" setOption OptionShadows $Low setOption OptionTextureDetail $Medium setOption OptionEffects $Low setOption OptionBakeQuality $Medium setOption OptionLighting $Low # this will force 2_m path, but we let them raise it if they want setOption OptionPlanetQuality $Low seti resolutionTarget (800 * 600) endif # Intel integrated # TODO: go off ID, to catch any non-9xx changes if (match("${cardVendor}", "Intel") and match("${cardName}", "*9??*") and not match("${cardName}", "*59?0*")) trace "=== Intel Integrated Graphics" boolProp effectsInstancing false setOption OptionShadows $Low setOption OptionTextureDetail $Me...
Zzlloottyy