INI Settings (Papyrus)

From Creation Kit
Jump to: navigation, search

Papyrus has several INI settings that can control some elements of how it operates and utilizes resources. All of these settings are under the [Papyrus] section of the "Skyrim.ini" file, which can be found in the "Libraries\Documents\My Documents\My Games\Skyrim" folder.

Defaults

The following block shows the defaults for all the various settings. If you end up messing something up you can always copy this block back into your ini file (or delete the block entirely):

[Papyrus]
fUpdateBudgetMS=1.2
fExtraTaskletBudgetMS=1.2
fPostLoadUpdateTimeMS=500.0 ;Xenon and PS3 use 2000.0
iMinMemoryPageSize=128
iMaxMemoryPageSize=512
iMaxAllocatedMemoryBytes=76800
bEnableLogging=0
bEnableTrace=0
bLoadDebugInformation=0
bEnableProfiling=0

Individual Settings

Most of the settings won't need to be changed. The only ones users usually need to mess with are bEnableLogging, bEnableTrace, bLoadDebugInformation, and bEnableProfiling. However all of the settings are listed here for completion.

fUpdateBudgetMS

This setting controls how much time the main Papyrus update loop gets. This loop mainly controls function dispatch. If a lot of function calls are being made and a lot of scripts are running, increasing this value may improve script performance at the cost of reduced game framerate. However most of the time the VM won't take this entire time slice and increasing the value will have no effect.

Default: 1.2

fExtraTaskletBudgetMS

This setting controls how much time taken out of another game thread is taken up by running script tasklets (the code that runs the raw script byte code). This time is on top of the time that the tasklets normally get in their own thread, but because that thread is shared they may end up being starved if other systems are highly stressed. If the game is not stressed, this time will not be used. Increasing this value may improve script performance in high-stress situations at the expense of framerate.

Default: 1.2

fPostLoadUpdateTimeMS

This setting controls how much time is added onto the load screen to do additional script processing in case the cell being loaded into needs to set itself up. Adjusting the time will adjust your visible load screen time. Adjust this setting if a cell with very complicated scripting is not getting quite set up in time by the time the player loads. This also may depend on the story manager since quests may not start until the load screen finishes if they are started up right before the player hits a load door. If the quest initial stage has a lot of scripting then it may need the extra time to run before the load screen is pulled down.

Default: 500.0 (on PC), 2000.0 (on Xenon and PS3)

iMinMemoryPageSize

This is the smallest amount of memory the VM will allocate for a single stack page, in bytes. Smaller values will waste less memory on small stacks, but larger values will reduce the number of allocations for stacks with many small frames (which improves performance).

Max: 2147483647

Default: 128

iMaxMemoryPageSize

This is the largest amount of memory the VM will allocate for a single stack page, in bytes. Smaller values may force the VM to allocate more pages for large stack frames. Larger values may cause the memory allocator to allocate differently, decreasing performance for large stack frames.

Max: 2147483647

Default: 512

iMaxAllocatedMemoryBytes

This is the maximum amount of memory the VM will allocate in total for stack frames. If an allocation would push memory usage over this limit, the VM will instead wait for more memory to be freed. Increasing this value may improve performance in high-stress situations with lots of scripts running, but will use more memory. Note that it is possible to exceed this value temporarily while loading a save game due to slightly different allocation ordering.

Max: 2147483647 (2GB)

Default: 76800 (75kB)

WARNING: this setting is for stack size not heap size, so there is no reason for setting this to a huge value even though it is possible. Increasing iMaxAllocatedMemoryBytes to values much larger than default can cause stack thrashing (stack buffer overflows), intermittent game stuttering, erratic game behavior and CTDs. Stack thrashing will produce stack dumps in the Papyrus log, similar to the example below. The dumps can be very large if many scripts are running, producing a very large log file.

[03/30/2013 - 12:21:08PM] Suspended stack count is over our warning threshold, dumping stacks:
[03/30/2013 - 12:21:08PM] VM is freezing...
[03/30/2013 - 12:21:08PM] VM is frozen
[03/30/2013 - 12:21:08PM] Dumping stack 137790:
[03/30/2013 - 12:21:08PM] 	Frame count: 0 (Page count: 0)
[03/30/2013 - 12:21:08PM] 	State: Running (Freeze state: Freezing)
[03/30/2013 - 12:21:08PM] 	Type: Normal
[03/30/2013 - 12:21:08PM] 	Return register: None
[03/30/2013 - 12:21:08PM] 	Has stack callback: No
[03/30/2013 - 12:21:08PM] 	Stack trace:
[03/30/2013 - 12:21:08PM] 		[ (0010DCE8)].mineorefurniturescript.OnLoad() - (requested call)

bEnableLogging

This setting turns logging on and off. If off, no logging will occur, even traces, and so it will override the bEnableTrace value. The in-game log display will still work, but nothing will be written to disk. Turning this off may improve performance due to less disk activity.

Default: 0

bEnableTrace

This setting turns on and off the script trace commands. System error and warning messages will still be logged to disk. If bEnableLogging is false, this setting is ignored as nothing will be written to disk anyway. Trace commands will NOT be visible in the in-game log display if this setting is off. Turning this off may improve performance due to less disk activity.

Default: 0

bLoadDebugInformation

This setting enables or disables the loading of additional debug information - essentially line number information. If this setting is off, error messages cannot generate line number data. Turning this on will allow line numbers to be available in error traces at the cost of increased memory usage.

Default: 0

bEnableProfiling

This setting enables or disables the script profiler. If off, none of the script profiling commands will be available. Turn this setting on to allow profiling information to be collected and logged. If on, script performance will degrade slightly.

Default: 0

uTraceStatusOfQuest

This setting sets a quest to track for script changes by form ID (converted to decimal). The quest that this setting specifies will spit out a Papyrus stack trace to the log every time a Papyrus script tries to change something with it like starting, stopping, setting a stage, or showing an objective.

Default: 0


Language: English  • français