Difference between revisions of "Graphics Rules (for The Sims 2)"
(→Technical Details) |
|||
| (12 intermediate revisions by one user not shown) | |||
| Line 15: | Line 15: | ||
# Software Rendering | # Software Rendering | ||
| − | Before attempting to adjust any variable in your Graphics Rules.sgr file, always make a back up copy of your original file in case of errors or omissions made from the modified file. Also note that understanding of the variables listed here are for advanced users. The article was made to document what they do. It could be used for advanced modders to create tweaked graphic settings that could benefit future users. Do not attempt to modify your game's Graphics Rules unless you read and understand each variable's purposes. | + | Before attempting to adjust any variable in your Graphics Rules.sgr file, always make a back up copy of your original file in case of errors or omissions made from the modified file. ANY INCORRECT ADJUSTMENT OF THE VARIABLES WILL THROW AN "APPLICATION WILL TERMINATE" ERROR DIALOG WINDOW. Also note that understanding of the variables listed here are for advanced users. The article was made to document what they do. It could be used for advanced modders to create tweaked graphic settings that could benefit future users. Do not attempt to modify your game's Graphics Rules unless you read and understand each variable's purposes. |
==Technical Details== | ==Technical Details== | ||
| Line 46: | Line 46: | ||
seti MediumButDefaultLow 4 | seti MediumButDefaultLow 4 | ||
| − | This section | + | This section defines what level of magnitude the amount of RAM that your computer has. The higher the amount of RAM you have, the better it would be to handle the game's temporary storage use. |
seti memoryLevelHigh 512 | seti memoryLevelHigh 512 | ||
seti memoryLevelMedium 384 | seti memoryLevelMedium 384 | ||
seti memoryLevelLow 256 | seti memoryLevelLow 256 | ||
seti memoryLevelUnknown 0 | seti memoryLevelUnknown 0 | ||
| − | This section determines what operating system you use. This section says | + | This section determines what operating system you use. This section says if your computer runs an operating system with 'NT 6.0' in its name, the first 3 batch of CPU levels will be considered by the game. Otherwise, the second set of CPU levels will be considered. This section is used under '''Hardware Rendering''' later on below in the file when determining how the Simulation, Sound Quality, and Animation Sampling will be set. |
if ( match("${osVersion}","*NT 6.0*") ) | if ( match("${osVersion}","*NT 6.0*") ) | ||
seti cpuLevelHigh 3000 | seti cpuLevelHigh 3000 | ||
| Line 72: | Line 72: | ||
|- | |- | ||
| | | | ||
| − | This section describes how | + | This section describes how the game determines your GFX Device. It consults the game's Video Cards.sgr file for the Vendor's & Device's HEX number. It also sets up fallback video cards in the event the game cannot determine the Device. |
# set some config variables based on a card table and vendor specific rules | # set some config variables based on a card table and vendor specific rules | ||
# sets isCardFound, cardVendor, and cardName include "Video Cards.sgr" | # sets isCardFound, cardVendor, and cardName include "Video Cards.sgr" | ||
| Line 126: | Line 126: | ||
This variable says to not use Software Rasterizer. It is set to false by default, unless the following variables occur. | This variable says to not use Software Rasterizer. It is set to false by default, unless the following variables occur. | ||
setb useSoftwareRasterizer false | setb useSoftwareRasterizer false | ||
| − | If the GFX Device is from ATI, and the card name contains | + | If the GFX Device is from ATI, and the card name contains the string of text 'Mach' or 'Rage' anywhere in its name, the game will use Software Rasterizer. |
if (match("${cardVendor}", "ATI")) | if (match("${cardVendor}", "ATI")) | ||
if (match("${cardName}", "*Mach*") or match("${cardName}", "*Rage*")) | if (match("${cardName}", "*Mach*") or match("${cardName}", "*Rage*")) | ||
setb useSoftwareRasterizer true | setb useSoftwareRasterizer true | ||
endif | endif | ||
| − | Or else, if the GFX Device is from Nvidia, and the card name contains exactly NV 1, NV 2, Riva, or TNT the game will use Software Rasterizer. | + | Or else, if the GFX Device is from Nvidia, and the card name contains exactly NV 1, NV 2, or in anywhere of the cards name the string 'Riva', or 'TNT' appear, the game will use Software Rasterizer. |
elseif (match("${cardVendor}", "NVidia")) | elseif (match("${cardVendor}", "NVidia")) | ||
if (match("${cardName}", "NV 1") or match("${cardName}", "NV 2") or match("${cardName}", "*Riva*") or match("${cardName}", "*TNT*")) | if (match("${cardName}", "NV 1") or match("${cardName}", "NV 2") or match("${cardName}", "*Riva*") or match("${cardName}", "*TNT*")) | ||
setb useSoftwareRasterizer true | setb useSoftwareRasterizer true | ||
endif | endif | ||
| − | Or else, if the GFX Device is from Intel, and the card name contains | + | Or else, if the GFX Device is from Intel, and the card name contains any of these numbers in its name (810, 815, 740, 752), the game will use Software Rasterizer. |
elseif (match("${cardVendor}", "Intel")) | elseif (match("${cardVendor}", "Intel")) | ||
if (match("${cardName}", "*810*") or match("${cardName}", "*815*") or match("${cardName}", "*740*") or match("${cardName}", "*752*")) | if (match("${cardName}", "*810*") or match("${cardName}", "*815*") or match("${cardName}", "*740*") or match("${cardName}", "*752*")) | ||
setb useSoftwareRasterizer true | setb useSoftwareRasterizer true | ||
endif | endif | ||
| − | Or else, if the GFX Device is from S3, and the card name contains | + | Or else, if the GFX Device is from S3, and the card name contains the string 'GammaChrome' or 'DeltaChrome' in its name, the game will use Software Rasterizer. |
elseif (match("${cardVendor}", "S3")) | elseif (match("${cardVendor}", "S3")) | ||
if (not match("${cardName}", "*GammaChrome*") and not match("${cardName}", "*DeltaChrome*")) | if (not match("${cardName}", "*GammaChrome*") and not match("${cardName}", "*DeltaChrome*")) | ||
setb useSoftwareRasterizer true | setb useSoftwareRasterizer true | ||
endif | endif | ||
| − | Or else, if the GFX Device completely unknown, the game will use Software Rasterizer. | + | Or else, if the GFX Device completely unknown (e.g. not on the Video Card.sgr file), the game will use Software Rasterizer. |
else | else | ||
# unsupported/unknown vendor | # unsupported/unknown vendor | ||
setb useSoftwareRasterizer true | setb useSoftwareRasterizer true | ||
endif | endif | ||
| − | This section describes how the game will administer the Software Rasterizer to the GFX Device. If the card is | + | This section describes how the game will administer the Software Rasterizer to the GFX Device. If the card is not supported & uses Software Rasterizer, place a warning the first warning. Otherwise, since the game won't use the Software Rasterizer, comment that the video card is supported. |
if ($useSoftwareRasterizer) | if ($useSoftwareRasterizer) | ||
log $logGroup $logLevelWarning "Unsupported video card. Forcing software rendering on this device" | log $logGroup $logLevelWarning "Unsupported video card. Forcing software rendering on this device" | ||
| Line 157: | Line 157: | ||
log $logGroup $logLevelInfo "Supported video card." | log $logGroup $logLevelInfo "Supported video card." | ||
endif | endif | ||
| − | If the game does NOT use Software Rasterizer towards the GFX Device | + | If the game does NOT use Software Rasterizer towards the GFX Device & could not determine how much texture memory the video card has, the game will set a specific amount of video processing memory to render textures, namely 32MB. |
if (not $useSoftwareRasterizer) | if (not $useSoftwareRasterizer) | ||
# failed to obtain device texture memory size, force to 32MB | # failed to obtain device texture memory size, force to 32MB | ||
| Line 164: | Line 164: | ||
setb textureMemorySizeOK false | setb textureMemorySizeOK false | ||
endif | endif | ||
| − | + | If the game does NOT use Software Rasterizer but determines that the GPU has less than 28MB of memory available, then the game will log a message that there is insufficient video memory and that it will force Software Resterizer usage instead. | |
| − | If the game | + | |
if ($textureMemory < 28) | if ($textureMemory < 28) | ||
log $logGroup $logLevelWarning "Insufficient video memory. Forcing software rendering on this device" | log $logGroup $logLevelWarning "Insufficient video memory. Forcing software rendering on this device" | ||
| Line 173: | Line 172: | ||
endif | endif | ||
endif | endif | ||
| − | + | If the game DOES use the Software Rasterizer, set the texture memory to 32MB. | |
if ($useSoftwareRasterizer) | if ($useSoftwareRasterizer) | ||
# ignore texture memory reported by gfx device, this is not hardware texture memory | # ignore texture memory reported by gfx device, this is not hardware texture memory | ||
seti textureMemory 32 | seti textureMemory 32 | ||
endif | endif | ||
| − | + | If the game does NOT use the Software Rasterizer, enable Hardware Rendering. | |
if (not $useSoftwareRasterizer) | if (not $useSoftwareRasterizer) | ||
log $logGroup $logLevelInfo "Hardware rendering is enabled" | log $logGroup $logLevelInfo "Hardware rendering is enabled" | ||
| Line 211: | Line 210: | ||
|- | |- | ||
| | | | ||
| − | + | This is the template information used to create the "config-log.txt" file in your EA Games\The Sims 2\Logs\ folder. This is a file created/written by your game based. | |
| + | |||
| + | The first part says that if there is no device number found (e.g. equals zero), then place the following information about the game application, the computer cmachine information, and the sound card device found. | ||
if ($deviceNumber = 0) | if ($deviceNumber = 0) | ||
logSystemInfo "=== Application info ===" | logSystemInfo "=== Application info ===" | ||
| Line 230: | Line 231: | ||
logSystemInfo "Driver: ${soundDriverName}" | logSystemInfo "Driver: ${soundDriverName}" | ||
endif | endif | ||
| − | + | ||
| + | This small portion adds the graphics device number and name as found from the device. | ||
logSystemInfo "=== Graphics device info ===" | logSystemInfo "=== Graphics device info ===" | ||
logSystemInfo "Number: ${deviceNumber}" | logSystemInfo "Number: ${deviceNumber}" | ||
logSystemInfo "Name (driver): ${cardNameText}" | logSystemInfo "Name (driver): ${cardNameText}" | ||
| + | |||
| + | If the name of the video card's information is found in the Video Card.sgr (the database being refered to), display its name. Otherwise, mention the name and that it's not found in the database. | ||
if ($isCardFound) | if ($isCardFound) | ||
logSystemInfo "Name (database): ${cardName}" | logSystemInfo "Name (database): ${cardName}" | ||
| Line 239: | Line 243: | ||
logSystemInfo "Name (database): ${cardName} <<NOT FOUND IN DATABASE!>>" | logSystemInfo "Name (database): ${cardName} <<NOT FOUND IN DATABASE!>>" | ||
endif | endif | ||
| + | |||
| + | If the GFX device is an integrated chipset (e.g. not a dedicated video card device), add that comment under the video card's name. | ||
if ($isIntegratedChipset) | if ($isIntegratedChipset) | ||
logSystemInfo " (Integrated Chipset)" | logSystemInfo " (Integrated Chipset)" | ||
endif | endif | ||
| + | |||
| + | This small portion adds information about the GFX's maker, the drivers used, the monitor resolution, etc. | ||
logSystemInfo "Vendor: ${cardVendor}" | logSystemInfo "Vendor: ${cardVendor}" | ||
logSystemInfo "Chipset: ${cardChipset}" | logSystemInfo "Chipset: ${cardChipset}" | ||
| Line 249: | Line 257: | ||
logSystemInfo "Monitor aspect: ${monitorAspect}, ${monitorAspectString}" | logSystemInfo "Monitor aspect: ${monitorAspect}, ${monitorAspectString}" | ||
logSystemInfo "Screen mode: ${screenWidth}x${screenHeight}x${screenBPP}BPP,${screenRefresh}Hz" | logSystemInfo "Screen mode: ${screenWidth}x${screenHeight}x${screenBPP}BPP,${screenRefresh}Hz" | ||
| + | |||
| + | If a texture memory is found, set the memory in MB. Otherwise, if the game had to input its own value (e.g. 32 MB), it will set a texture memory and the comment that it was overridden. | ||
if ($textureMemorySizeOK) | if ($textureMemorySizeOK) | ||
logSystemInfo "Texture memory: ${textureMemory}MB" | logSystemInfo "Texture memory: ${textureMemory}MB" | ||
| Line 254: | Line 264: | ||
logSystemInfo "Texture memory: ${textureMemory}MB <<OVERRIDE>>" | logSystemInfo "Texture memory: ${textureMemory}MB <<OVERRIDE>>" | ||
endif | endif | ||
| + | |||
| + | This small portion adds more graphics rendering information. | ||
logSystemInfo "HW T&L: Fixed function:${fixedFunctionHWTnL} Programmable:${maxVertexProgramVersionHWMajor}.${maxVertexProgramVersionHWMinor}" | logSystemInfo "HW T&L: Fixed function:${fixedFunctionHWTnL} Programmable:${maxVertexProgramVersionHWMajor}.${maxVertexProgramVersionHWMinor}" | ||
logSystemInfo "Pixel program: ${maxPixelProgramVersionMajor}.${maxPixelProgramVersionMinor}" | logSystemInfo "Pixel program: ${maxPixelProgramVersionMajor}.${maxPixelProgramVersionMinor}" | ||
| Line 265: | Line 277: | ||
|- | |- | ||
| | | | ||
| − | These options are the specific variables used when the player adjusts it in the game. This is the "adjustable" section that the player has control over during gameplay | + | These options are the specific variables used when the player adjusts it in the game under the Graphics/Performance Options menu. This is the "adjustable" section that the player has control over during gameplay. |
| − | log $logGroup $logLevelDebug "Begin parsing option definitions" | + | log $logGroup $logLevelDebug "Begin parsing option definitions" |
| − | + | ||
| + | This is the "Texture Detail" setting under the game's Graphics/Performance Options menu. | ||
option MaterialDetail | option MaterialDetail | ||
setting $Low | setting $Low | ||
| Line 281: | Line 294: | ||
intProp imageDataSizeReductionOnLoad 0 | intProp imageDataSizeReductionOnLoad 0 | ||
end | end | ||
| − | + | ||
| + | This is the "Sim/Object Detail" setting under the game's Graphics/Performance Options menu. | ||
option ObjectDetail | option ObjectDetail | ||
setting $Medium | setting $Medium | ||
| Line 293: | Line 307: | ||
intProp lodOverride 0 | intProp lodOverride 0 | ||
end | end | ||
| − | + | ||
| + | This is the "Object Hiding" setting under the game's Graphics/Performance Options menu. | ||
option ObjectHiding | option ObjectHiding | ||
setting $Off | setting $Off | ||
| Line 301: | Line 316: | ||
intProp renderInsideVisibleObjects 1 | intProp renderInsideVisibleObjects 1 | ||
end | end | ||
| − | + | ||
| + | This is the "Snow On Ground" setting under the game's Graphics/Performance Options menu. | ||
option SnowOnGround | option SnowOnGround | ||
setting $Off | setting $Off | ||
| Line 309: | Line 325: | ||
boolProp showSnowOnGround true | boolProp showSnowOnGround true | ||
end | end | ||
| − | + | ||
| + | This is the "Shadows" setting under the game's Graphics/Performance Options menu. | ||
option Shadows | option Shadows | ||
setting $Low | setting $Low | ||
| Line 329: | Line 346: | ||
boolProp heightMapShadows true | boolProp heightMapShadows true | ||
end | end | ||
| − | + | ||
| + | This is the "UI Transparency" setting under the game's Graphics/Performance Options menu. | ||
option OpaqueUI | option OpaqueUI | ||
setting $Off | setting $Off | ||
| Line 337: | Line 355: | ||
boolProp renderOpaqueUI true | boolProp renderOpaqueUI true | ||
end | end | ||
| − | + | ||
| + | This is the "Reflections" setting under the game's Graphics/Performance Options menu. | ||
option Reflection | option Reflection | ||
setting $Off | setting $Off | ||
| Line 347: | Line 366: | ||
boolProp nhoodWaterReflection true | boolProp nhoodWaterReflection true | ||
end | end | ||
| − | + | ||
| + | This is the "Toggle Ceiling" setting on the bottom left user interface console. | ||
option Ceiling | option Ceiling | ||
setting $Off | setting $Off | ||
boolProp includeCeilings false | boolProp includeCeilings false | ||
| − | |||
setting $On | setting $On | ||
boolProp includeCeilings true | boolProp includeCeilings true | ||
end | end | ||
| − | + | ||
| + | This is the "Graphic Effects" setting under the game's Graphics/Performance Options menu. | ||
option EffectsQuality | option EffectsQuality | ||
setting $Low | setting $Low | ||
| Line 384: | Line 404: | ||
boolProp enableOceanReflection true | boolProp enableOceanReflection true | ||
end | end | ||
| − | + | ||
| + | This is the "Lighting" setting under the game's Graphics/Performance Options menu. | ||
option LightingQuality | option LightingQuality | ||
setting $Low | setting $Low | ||
| Line 404: | Line 425: | ||
boolProp specHighlights true | boolProp specHighlights true | ||
end | end | ||
| − | + | ||
| + | This is the "Audio Quality" setting under the game's Audio Options menu. | ||
option SoundQuality | option SoundQuality | ||
setting $Low | setting $Low | ||
| Line 642: | Line 664: | ||
setOption LightingOptimizations $High | setOption LightingOptimizations $High | ||
setOption SnowOnGround $On | setOption SnowOnGround $On | ||
| − | + | This section determines the sound quality, animation sampling, and simulation based on your computer's CPU capabilities. The higher your computer's CPU, the higher the options are set. | |
# adjust simulator based on cpu speed | # adjust simulator based on cpu speed | ||
# adjust the sound quality based on cpu speed (this may be overridden below for low-end systems) | # adjust the sound quality based on cpu speed (this may be overridden below for low-end systems) | ||
| Line 659: | Line 681: | ||
setOption AnimationSamplingLevel $Low | setOption AnimationSamplingLevel $Low | ||
endif | endif | ||
| − | + | ??? | |
# turn off fullscreen fade | # turn off fullscreen fade | ||
setOption FullscreenFadeEffect $Off | setOption FullscreenFadeEffect $Off | ||
Latest revision as of 04:07, 21 September 2018
[edit] Introduction
This section is dedicated to describing the technical aspects of the Graphics Rules.sgr file for The Sims 2 PC game. The article will attempt to describe each section of the file and how they can be adjusted. Major sections of the Graphics Rules.sgr file include:
- Logging Settings
- Constants
- Identifying GFX Devices
- Configuration Overrides
- Determining if GFX Device is Supported
- Applying GFX Device Specific Workarounds
- Printing System Info
- UI Options
- Options Without UI Access
- Hardware Rendering
- Software Rendering
Before attempting to adjust any variable in your Graphics Rules.sgr file, always make a back up copy of your original file in case of errors or omissions made from the modified file. ANY INCORRECT ADJUSTMENT OF THE VARIABLES WILL THROW AN "APPLICATION WILL TERMINATE" ERROR DIALOG WINDOW. Also note that understanding of the variables listed here are for advanced users. The article was made to document what they do. It could be used for advanced modders to create tweaked graphic settings that could benefit future users. Do not attempt to modify your game's Graphics Rules unless you read and understand each variable's purposes.
[edit] Technical Details
| Logging Settings |
|---|
|
??? set logGroup "ConfigurationManager" set logLevelWarning warning set logLevelInfo info set logLevelDebug debug log $logGroup $logLevelInfo "Parsing configuration script" |
| Constants |
|---|
|
??? seti Off 0 seti On 1 seti Low 1 seti Medium 2 seti High 3 seti MediumButDefaultLow 4 This section defines what level of magnitude the amount of RAM that your computer has. The higher the amount of RAM you have, the better it would be to handle the game's temporary storage use. seti memoryLevelHigh 512 seti memoryLevelMedium 384 seti memoryLevelLow 256 seti memoryLevelUnknown 0 This section determines what operating system you use. This section says if your computer runs an operating system with 'NT 6.0' in its name, the first 3 batch of CPU levels will be considered by the game. Otherwise, the second set of CPU levels will be considered. This section is used under Hardware Rendering later on below in the file when determining how the Simulation, Sound Quality, and Animation Sampling will be set. if ( match("${osVersion}","*NT 6.0*") )
seti cpuLevelHigh 3000
seti cpuLevelMedium 2600
seti cpuLevelLow 2000
log $logGroup $logLevelInfo "Setting cpu level for Vista."
else
seti cpuLevelHigh 2800
seti cpuLevelMedium 2200
seti cpuLevelLow 1450
log $logGroup $logLevelInfo "Setting cpu level for non-Vista."
endif
seti cpuLevelUnsupported 0
|
| Identifying GFX Device |
|---|
|
This section describes how the game determines your GFX Device. It consults the game's Video Cards.sgr file for the Vendor's & Device's HEX number. It also sets up fallback video cards in the event the game cannot determine the Device. # set some config variables based on a card table and vendor specific rules # sets isCardFound, cardVendor, and cardName include "Video Cards.sgr" # 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 $cardNameText endif |
| Configuration Overrides |
|---|
|
This section tests the unsupported video cards with Software Renderings (see bottom sections) to see what variables the card can and cannot run. ??? # Configuration override controlled by command line option -cardConfig.
#
if (varExists(cardConfig))
# test unsupported cards using sw rendering
if ($cardConfig = 1)
log $logGroup $logLevelInfo "Testing with all devices unsupported."
set cardVendor TestingAllUnsupported
set cardName TestingAllUnsupported
elseif (($cardConfig = 2) and ($deviceNumber = 0))
log $logGroup $logLevelInfo "Testing with the first device unsupported."
set cardVendor TestingFirstUnsupported
set cardName TestingFirstUnsupported
elseif (($cardConfig = 3) and ($deviceNumber != 0))
log $logGroup $logLevelInfo "Testing with the all devices except first unsupported."
set cardVendor TestingAllButFirstUnsupported
set cardName TestingAllButFirstUnsupported
elseif (($cardConfig = 100) and ($deviceNumber = 0))
log $logGroup $logLevelInfo "Testing first device as swvp only part."
boolProp forceSoftwareVP true
endif
endif
|
| Determining if GFX Device is Supported |
|---|
|
This variable says to not use Software Rasterizer. It is set to false by default, unless the following variables occur. setb useSoftwareRasterizer false If the GFX Device is from ATI, and the card name contains the string of text 'Mach' or 'Rage' anywhere in its name, the game will use Software Rasterizer. if (match("${cardVendor}", "ATI"))
if (match("${cardName}", "*Mach*") or match("${cardName}", "*Rage*"))
setb useSoftwareRasterizer true
endif
Or else, if the GFX Device is from Nvidia, and the card name contains exactly NV 1, NV 2, or in anywhere of the cards name the string 'Riva', or 'TNT' appear, the game will use Software Rasterizer. elseif (match("${cardVendor}", "NVidia"))
if (match("${cardName}", "NV 1") or match("${cardName}", "NV 2") or match("${cardName}", "*Riva*") or match("${cardName}", "*TNT*"))
setb useSoftwareRasterizer true
endif
Or else, if the GFX Device is from Intel, and the card name contains any of these numbers in its name (810, 815, 740, 752), the game will use Software Rasterizer. elseif (match("${cardVendor}", "Intel"))
if (match("${cardName}", "*810*") or match("${cardName}", "*815*") or match("${cardName}", "*740*") or match("${cardName}", "*752*"))
setb useSoftwareRasterizer true
endif
Or else, if the GFX Device is from S3, and the card name contains the string 'GammaChrome' or 'DeltaChrome' in its name, the game will use Software Rasterizer. elseif (match("${cardVendor}", "S3"))
if (not match("${cardName}", "*GammaChrome*") and not match("${cardName}", "*DeltaChrome*"))
setb useSoftwareRasterizer true
endif
Or else, if the GFX Device completely unknown (e.g. not on the Video Card.sgr file), the game will use Software Rasterizer. else # unsupported/unknown vendor setb useSoftwareRasterizer true endif This section describes how the game will administer the Software Rasterizer to the GFX Device. If the card is not supported & uses Software Rasterizer, place a warning the first warning. Otherwise, since the game won't use the Software Rasterizer, comment that the video card is supported. if ($useSoftwareRasterizer) log $logGroup $logLevelWarning "Unsupported video card. Forcing software rendering on this device" else log $logGroup $logLevelInfo "Supported video card." endif If the game does NOT use Software Rasterizer towards the GFX Device & could not determine how much texture memory the video card has, the game will set a specific amount of video processing memory to render textures, namely 32MB. if (not $useSoftwareRasterizer)
# failed to obtain device texture memory size, force to 32MB
if ($textureMemory = 0)
seti textureMemory 32
setb textureMemorySizeOK false
endif
If the game does NOT use Software Rasterizer but determines that the GPU has less than 28MB of memory available, then the game will log a message that there is insufficient video memory and that it will force Software Resterizer usage instead. if ($textureMemory < 28)
log $logGroup $logLevelWarning "Insufficient video memory. Forcing software rendering on this device"
# require a card with at least 32MB
setb useSoftwareRasterizer true
endif
endif
If the game DOES use the Software Rasterizer, set the texture memory to 32MB. if ($useSoftwareRasterizer) # ignore texture memory reported by gfx device, this is not hardware texture memory seti textureMemory 32 endif If the game does NOT use the Software Rasterizer, enable Hardware Rendering. if (not $useSoftwareRasterizer) log $logGroup $logLevelInfo "Hardware rendering is enabled" endif |
| Applying GFX Device Specific Workarounds |
|---|
|
This is the largest most specific section of the Graphics Rules.sgr file. It contains tweaks for the game to process itself under different conditions. This section includes notes on:
|
| Print System Info |
|---|
|
This is the template information used to create the "config-log.txt" file in your EA Games\The Sims 2\Logs\ folder. This is a file created/written by your game based. The first part says that if there is no device number found (e.g. equals zero), then place the following information about the game application, the computer cmachine information, and the sound card device found. if ($deviceNumber = 0)
logSystemInfo "=== Application info ==="
logSystemInfo "Name: ${appName}"
logSystemInfo "Version: ${version}"
logSystemInfo "Build: ${buildType}"
logSystemInfo "=== Machine info ==="
logSystemInfo "OS version: ${osVersion}"
logSystemInfo "CPU: ${cpuSpeed}Mhz, Name:${CPU}, FPU:${FPU}, MMX:${MMX}"
logSystemInfo "Memory: ${memory}MB"
logSystemInfo "Free memory: ${freeMemory}MB"
logSystemInfo "User: ${userName}"
logSystemInfo "Computer: ${computerName}"
logSystemInfo "=== Sound device info ==="
logSystemInfo "Name: ${soundCardName}"
logSystemInfo "Driver: ${soundDriverName}"
endif
This small portion adds the graphics device number and name as found from the device. logSystemInfo "=== Graphics device info ==="
logSystemInfo "Number: ${deviceNumber}"
logSystemInfo "Name (driver): ${cardNameText}"
If the name of the video card's information is found in the Video Card.sgr (the database being refered to), display its name. Otherwise, mention the name and that it's not found in the database. if ($isCardFound)
logSystemInfo "Name (database): ${cardName}"
else
logSystemInfo "Name (database): ${cardName} <<NOT FOUND IN DATABASE!>>"
endif
If the GFX device is an integrated chipset (e.g. not a dedicated video card device), add that comment under the video card's name. if ($isIntegratedChipset) logSystemInfo " (Integrated Chipset)" endif This small portion adds information about the GFX's maker, the drivers used, the monitor resolution, etc. logSystemInfo "Vendor: ${cardVendor}"
logSystemInfo "Chipset: ${cardChipset}"
logSystemInfo "Driver: ${driverName}, Version: ${driverVersion}"
logSystemInfo "Driver version: ${driverBuild}"
logSystemInfo "Monitor: ${monitorName}"
logSystemInfo "Monitor aspect: ${monitorAspect}, ${monitorAspectString}"
logSystemInfo "Screen mode: ${screenWidth}x${screenHeight}x${screenBPP}BPP,${screenRefresh}Hz"
If a texture memory is found, set the memory in MB. Otherwise, if the game had to input its own value (e.g. 32 MB), it will set a texture memory and the comment that it was overridden. if ($textureMemorySizeOK)
logSystemInfo "Texture memory: ${textureMemory}MB"
else
logSystemInfo "Texture memory: ${textureMemory}MB <<OVERRIDE>>"
endif
This small portion adds more graphics rendering information. logSystemInfo "HW T&L: Fixed function:${fixedFunctionHWTnL} Programmable:${maxVertexProgramVersionHWMajor}.${maxVertexProgramVersionHWMinor}"
logSystemInfo "Pixel program: ${maxPixelProgramVersionMajor}.${maxPixelProgramVersionMinor}"
logSystemInfo "Texture stages: ${textureStages}"
logSystemInfo "AppControlledAA: ${appControlledAA}"
|
| UI Options |
|---|
|
These options are the specific variables used when the player adjusts it in the game under the Graphics/Performance Options menu. This is the "adjustable" section that the player has control over during gameplay. log $logGroup $logLevelDebug "Begin parsing option definitions" This is the "Texture Detail" setting under the game's Graphics/Performance Options menu. option MaterialDetail
setting $Low
boolProp bumpMapping false
intProp imageDataSizeReductionOnLoad 2
setting $Medium
boolProp bumpMapping false
intProp imageDataSizeReductionOnLoad 1
setting $High
boolProp bumpMapping true
intProp imageDataSizeReductionOnLoad 0
end
This is the "Sim/Object Detail" setting under the game's Graphics/Performance Options menu. option ObjectDetail
setting $Medium
boolProp reduceBoneWeights true
boolProp useLODs true
intProp lodOverride 35
setting $High
boolProp reduceBoneWeights false
boolProp useLODs false
intProp lodOverride 0
end
This is the "Object Hiding" setting under the game's Graphics/Performance Options menu. option ObjectHiding
setting $Off
intProp renderInsideVisibleObjects 0
setting $On
intProp renderInsideVisibleObjects 1
end
This is the "Snow On Ground" setting under the game's Graphics/Performance Options menu. option SnowOnGround
setting $Off
boolProp showSnowOnGround false
setting $On
boolProp showSnowOnGround true
end
This is the "Shadows" setting under the game's Graphics/Performance Options menu. option Shadows
setting $Low
boolProp simShadows false
boolProp objectShadows false
boolProp guob false
boolProp heightMapShadows false
setting $Medium
boolProp simShadows false
boolProp objectShadows false
boolProp guob true
boolProp heightMapShadows true
setting $High
boolProp simShadows true
boolProp objectShadows true
boolProp guob true
boolProp heightMapShadows true
end
This is the "UI Transparency" setting under the game's Graphics/Performance Options menu. option OpaqueUI
setting $Off
boolProp renderOpaqueUI false
setting $On
boolProp renderOpaqueUI true
end
This is the "Reflections" setting under the game's Graphics/Performance Options menu. option Reflection
setting $Off
boolProp reflectionWithExtraViewer false
boolProp nhoodWaterReflection false
setting $On
boolProp reflectionWithExtraViewer true
boolProp nhoodWaterReflection true
end
This is the "Toggle Ceiling" setting on the bottom left user interface console. option Ceiling
setting $Off
boolProp includeCeilings false
setting $On
boolProp includeCeilings true
end
This is the "Graphic Effects" setting under the game's Graphics/Performance Options menu. option EffectsQuality
setting $Low
boolProp useEffects true
floatProp particleDensity 1
floatProp particleScale 1
intProp maxParticlesTarget 2000
intProp particleLODOffset 0 # subtracted from the zoom.
intProp effectPriorityLevel 1
boolProp enableOceanReflection false
setting $Medium
boolProp useEffects true
floatProp particleDensity 1
floatProp particleScale 1
intProp maxParticlesTarget 5000
intProp particleLODOffset 0 # subtracted from the zoom.
intProp effectPriorityLevel 2
boolProp enableOceanReflection false
setting $High
boolProp useEffects true
floatProp particleDensity 1
floatProp particleScale 1
intProp maxParticlesTarget 10000
intProp particleLODOffset 0 # subtracted from the zoom.
intProp effectPriorityLevel 3
boolProp enableOceanReflection true
end
This is the "Lighting" setting under the game's Graphics/Performance Options menu. option LightingQuality
setting $Low
boolProp lightingEnabled true
boolProp portalLighting false
boolProp floorAndWallNormalMapping false
boolProp specHighlights false
setting $Medium
boolProp lightingEnabled true
boolProp portalLighting true
boolProp floorAndWallNormalMapping false
boolProp specHighlights true
setting $High
boolProp lightingEnabled true
boolProp portalLighting true
boolProp floorAndWallNormalMapping true
boolProp specHighlights true
end
This is the "Audio Quality" setting under the game's Audio Options menu. option SoundQuality
setting $Low
intProp AudioPerformance 0
setting $Medium
intProp AudioPerformance 1
setting $High
intProp AudioPerformance 2
end
|
| Options Without UI Access |
|---|
option DirtyRect
setting $High
# no dirty rects
intProp dynamicRenderStrategy 0
setting $Medium
# 4 buffer mode
intProp dynamicRenderStrategy 2
setting $Low
# 2 buffer mode
intProp dynamicRenderStrategy 1
end
option FullscreenFadeEffect
setting $Off
boolProp enableSnapshot false
setting $On
boolProp enableSnapshot true
end
option Turbo
setting $High
boolProp useTurboRect true
setting $Medium
boolProp useTurboRect true
setting $Low
boolProp useTurboRect false
end
option SimulatorControls
setting $High
intProp maxNumOfVisitingSims 8
setting $Medium
intProp maxNumOfVisitingSims 6
setting $Low
intProp maxNumOfVisitingSims 2
end
option LightingOptimizations
setting $High
boolProp optimizedDiffusion true
boolProp incrementalLighting true
boolProp lerpLights true
boolProp useDirtyTiles true
end
option AnimationSamplingLevel
setting $Low
# sample nearest animation frame
boolProp animationFrameSampling true
setting $Medium
# sample nearest two animation frames and slerp
boolProp animationFrameSampling false
end
option LivePIP
setting $Off
boolProp livePIP false
boolProp livePIPDefault false
setting $On
boolProp livePIPDefault true
# do not override user's choice if the setting is ON
end
option SpecialEventCamera
setting $Off
boolProp chooseCameraSpecialEventEnabled false
boolProp CameraSpecialEventEnabled false
setting $On
boolProp chooseCameraSpecialEventEnabled true
# do not override user's choice if the setting is ON
end
option ScreenModeResolution
setting $Low
uintProp maxResWidth 800
uintProp maxResHeight 600
uintProp defaultResWidth 800
uintProp defaultResHeight 600
setting $MediumButDefaultLow
uintProp maxResWidth 1280
uintProp maxResHeight 1024
uintProp defaultResWidth 800
uintProp defaultResHeight 600
setting $Medium
uintProp maxResWidth 1280
uintProp maxResHeight 1024
uintProp defaultResWidth 1024
uintProp defaultResHeight 768
setting $High
uintProp maxResWidth 1600
uintProp maxResHeight 1200
uintProp defaultResWidth 1280
uintProp defaultResHeight 1024
end
option SubjectTracking
setting $Low
floatProp centerTrackingDeadZoneMagnitude 70
setting $Medium
floatProp centerTrackingDeadZoneMagnitude 30
setting $High
floatProp centerTrackingDeadZoneMagnitude 30
end
option EnableLotImpostersInLot
setting $On
boolProp enableLotImpostersInLot true
setting $Off
boolProp enableLotImpostersInLot false
end
option EnableNeighborhoodOccupantsInLot
setting $On
boolProp enableNeighborhoodOccupantsInLot true
setting $Off
boolProp enableNeighborhoodOccupantsInLot false
end
option LotSkirtSizeIncrease
setting 0
uintProp lotSkirtSizeIncrease 5
setting 1
uintProp lotSkirtSizeIncrease 9
setting 2
uintProp lotSkirtSizeIncrease 18
setting 3
uintProp lotSkirtSizeIncrease 36
end
log $logGroup $logLevelDebug "Finished parsing option definitions"
|
| Hardware Rendering |
|---|
# This cannot be defined as a local variable, the if clause is still executed when
# sw render path is taken and an exception generated that fails the parsing. Be
# careful with the use of local variables.
setb usingHighDetail false
if (not $useSoftwareRasterizer)
# set a base level of options based on the card rating
if (($memory >= $memoryLevelHigh) and ($cpuSpeed >= $cpuLevelHigh) and ($maxVertexProgramVersionHWMajor >= 1) and not $forceLowSettings and not $isIntegratedChipset)
log $logGroup $logLevelInfo "Selecting High base level"
setOption OpaqueUI $Off
setOption LivePIP $On
setOption Reflection $On
setOption Ceiling $On
setOption EffectsQuality $High
setOption LightingQuality $High
setOption Shadows $High
setOption MaterialDetail $High
setOption ObjectDetail $High
setOption ObjectHiding $Off
setOption SubjectTracking $High
setOption EnableLotImpostersInLot $On
setOption EnableNeighborhoodOccupantsInLot $On
setOption LotSkirtSizeIncrease 1
setb usingHighDetail true #use this to test if current level is set to high
elseif (($memory >= $memoryLevelMedium) and ($cpuSpeed >= $cpuLevelMedium) and ($maxVertexProgramVersionHWMajor >= 1) and not $forceLowSettings)
log $logGroup $logLevelInfo "Selecting Medium base level"
setOption OpaqueUI $Off
setOption LivePIP $On
setOption Reflection $Off
setOption Ceiling $Off
setOption EffectsQuality $Medium
setOption LightingQuality $Medium
setOption Shadows $Medium
setOption MaterialDetail $Medium
setOption ObjectDetail $High
setOption ObjectHiding $On
setOption SubjectTracking $Medium
setOption EnableLotImpostersInLot $On
setOption EnableNeighborhoodOccupantsInLot $On
setOption LotSkirtSizeIncrease 0
else
log $logGroup $logLevelInfo "Selecting Low base level"
# NOTE: don't set forceLowSettings here, because this will force low simulator settings
# if all you have is a low end video card
setOption OpaqueUI $Off
setOption LivePIP $Off
setOption Reflection $Off
setOption Ceiling $Off
setOption EffectsQuality $Low
setOption LightingQuality $Low
setOption Shadows $Low
setOption MaterialDetail $Low
setOption ObjectDetail $Medium
setOption ObjectHiding $On
setOption SubjectTracking $Low
setOption EnableLotImpostersInLot $Off
setOption EnableNeighborhoodOccupantsInLot $Off
setOption LotSkirtSizeIncrease 0
endif
setOption LightingOptimizations $High
setOption SnowOnGround $On
This section determines the sound quality, animation sampling, and simulation based on your computer's CPU capabilities. The higher your computer's CPU, the higher the options are set. # adjust simulator based on cpu speed
# adjust the sound quality based on cpu speed (this may be overridden below for low-end systems)
# adjust animation sampling based on cpu speed
if ($cpuSpeed >= $cpuLevelHigh and not $forceLowSettings)
setOption SimulatorControls $High
setOption SoundQuality $High
setOption AnimationSamplingLevel $Medium
elseif ($cpuSpeed >= $cpuLevelMedium and not $forceLowSettings)
setOption SimulatorControls $Medium
setOption SoundQuality $Medium
setOption AnimationSamplingLevel $Medium
else
setOption SimulatorControls $Low
setOption SoundQuality $Low
setOption AnimationSamplingLevel $Low
endif
??? # turn off fullscreen fade
setOption FullscreenFadeEffect $Off
if ($textureMemory >= 128 and not $isIntegratedChipset)
setOption FullscreenFadeEffect $On
endif
# screen res defaults
if (($maxVertexProgramVersionHWMajor >= 1) and ($textureMemory >= 128) and not $forceLowResolution)
setOption ScreenModeResolution $High
elseif ($textureMemory >= 64 and not $forceLowResolution)
if (($memory <= $memoryLevelLow) and ($cpuSpeed <= $cpuLevelLow))
setOption ScreenModeResolution $MediumButDefaultLow
else
setOption ScreenModeResolution $Medium
endif
else
setOption ScreenModeResolution $Low
endif
if ($defaultLowResolution)
setOption ScreenModeResolution $MediumButDefaultLow
endif
# special event cameras for cinematics
if (($maxPixelProgramVersionMajor >= 1) and ($supportsSpecialEventCamera))
setOption SpecialEventCamera $On
else
setOption SpecialEventCamera $Off
endif
# set dirty rect mode
if ($supportsDirtyRect)
setOption DirtyRect $Medium
else
setOption DirtyRect $High
endif
# set turbo mode
if ($supportsTurboRect)
setOption Turbo $Medium
else
setOption Turbo $Low
endif
if ($forceMediumMaterialDetail and ($memory >= $memoryLevelHigh) and ($cpuSpeed >= $cpuLevelHigh) and not $forceLowSettings)
log $logGroup $logLevelWarning "Setting Material Detail"
setOption MaterialDetail $Medium
endif
if ($usingHighDetail and not $forceLowSettings)
if ($forceMediumShadows)
setOption Shadows $Medium
endif
if ($forceMediumObjectDetail)
setOption ObjectDetail $Medium
endif
endif
endif
|
| Software Rendering |
|---|
# set the options for the software rasterizer
if ($useSoftwareRasterizer)
setOption LightingOptimizations $High
setOption DirtyRect $Medium
setOption Turbo $Medium
setOption OpaqueUI $Off
setOption LivePIP $Off
setOption SpecialEventCamera $Off
setOption Reflection $Off
setOption Ceiling $Off
setOption EffectsQuality $Low
setOption LightingQuality $Low
setOption Shadows $Low
setOption MaterialDetail $Low
setOption ObjectDetail $Medium
setOption ObjectHiding $On
# adjust simulator based on cpu speed
if ($cpuSpeed >= $cpuLevelHigh)
setOption SimulatorControls $Medium # one lower than hw
else
setOption SimulatorControls $Low
endif
setOption SoundQuality $Low
setOption FullscreenFadeEffect $Off
setOption AnimationSamplingLevel $Low
setOption ScreenModeResolution $Low
setOption SubjectTracking $Low
setOption EnableLotImpostersInLot $Off
setOption EnableNeighborhoodOccupantsInLot $Off
setOption LotSkirtSizeIncrease 0
setOption SnowOnGround $On
endif
|
[edit] Disclaimer
This entire section is a work in progress, and several descriptions of each variable is needed and can be updated. The information provided are general examples of each settings and does not reflect any ideal setting for your Sims 2 gaming experience. The descriptions are merely to point out what each variable does and if it can be tweaked or adjusted to improve you gaming experience.
ALWAYS KEEP A COPY OF YOUR ORIGINAL FILE AS BACKUP IN CASE OF CHANGES TO CERTAIN VARIABLES THAT MAY NOT WORK FOR YOUR GAME. BY HAVING A BACKUP COPY, YOU CAN OVERWRITE THE MODIFIED VERSION AND CONTINUE WITH ORDINARY GAME PLAY.