Jump to content

Solutions to slow running scripts in Skyrim


Recommended Posts

So I was frustrated after cobbling a multicore PC together on the cheap, only to find Skyrim ran its scripts SO SLOOOWWly. I monkey with my settings in game and at the OS level with zero net gains for my efforts. While graphics ran fine on even the highest settings, scripts sometimes took minutes to run. I started blaming mods as removing mods seemed to have a positive effect. Today I discovered the issue is actually the design of the Papyrus script system used in Skyrim. I read an informative treatise written by a scripter that was quite informative as to why it wasn't working as intended here. A little more research lead me to 2 different solutions that when used together made the issue almost inperceptable. One is a plugin for SKSE and the other is settings to add to your Skyrim.INI. I'm kind of impulsive when it comes to tweaking my games for performance and so applied both solutions at the same time. The results were so impressive, I saw no need to test them individually.

Anyway to the point of this post:

IF you are running mods or even not, and you find scripts take minutes to run or fail to run, these solutions will fix that.

 

1. TESV Acceleration Layer. This is an SKSE plugin written by one of the developers of SKSE. the official forum post and the current file link is found here.

 

2. INI tweaks. Normally I view INI tweaks as risky business in Skyrim, especially when running from save games. So with Skyrim I have really taken the habit of dated copies of my Skyrim.ini file ( I'm still amazed Skyrim functions at all as I begin to understand its construction). But so far so good with the following additions:

[Papyrus]
fUpdateBudgetMS=800
fExtraTaskletBudgetMS=800
fPostLoadUpdateTimeMS=2000
iMinMemoryPageSize=256
iMaxMemoryPageSize=512
iMaxAllocatedMemoryBytes=2457600

 

I stumbled across this tweak here (kudos and thanks to Steve40)

 

The results? Running about 90 mods (of which more than 75% add new scripts) slowed my system to the point where having a vanilla companion, a mod companion and running AFT along with Convenient Horses meant I could go get a coffee, come back and still have to wait for my companions to mount up. (sometimes pausing would speed things up for the moment).

Now I can have 5 followers mount up after me in about 10 secs (including the anims and sounds). Any lag I experience now can be directly attributed to my old clunky HDD and I`m betting I can find a INI solution that will help with that too.

 

So enjoy faster running scripts with these two simple solutions. Of course if you already knew this, never mind :cool: 

Link to comment

I've been using TESVAL.dll since it came out. To be honest I'm not even sure if it still works. I have it in for 1.9.32 but I can't tell you if it's still effective. I'm going to test out the INI tweak I use a lot lol. Don't have any real problems running skyrim with a bunch of skyrim.ini, skyrim pref.ini, and SKSE.ini tweaks.

Link to comment

The compiler optimizations that TESVAL (and Skyboost) addressed were patched waaaaay back in February 2012 with patch 1.4.15.  After that TESVAL wasn't useful, and Skyboost focused on other optimizations.  They're both pretty obsolete.

 

FWIW I've got a TON of scripts (270) including Frostfall (which KILLS Papyrus) on a 4 GHz Core 2 Duo, and things are running pretty well for me.  Here's what I've got:

 

 

[Papyrus]
fUpdateBudgetMS=1.2
fExtraTaskletBudgetMS=1.2
fPostLoadUpdateTimeMS=500.0
iMinMemoryPageSize=128 
iMaxMemoryPageSize=512
iMaxAllocatedMemoryBytes=76800
 
 
There will be a tradeoff by maxing out the Papyrus limits, but I'm looking forward to seeing what your numbers do.  Your numbers might be better with an i-class proc instead of my dinosaur, though.
 
 
 
Link to comment
  • 3 months later...

You are a god amongst men. I was desperate so I started to google skyrim script lag, and I found this topic on the second page. I played Skyrim for a long time with many mods, and I always had VERY big script issues, I had 60fps on maxed out settings, but my scripts... oh god. The little script plugin in Convenient Horses told me that I have an average 3kms, It peaked on 6k.

 

After I wrote the quote from this topic into the .ini I got an average 50 ms peaking on 90, no fps drop, it's just fantastic and I recommend it to everyone, it solved many issues. (I was running these mods: Frostfall, RnD, Convenient horses, Skyrim Redone, Better Vampires, TK hitstop, so as you can see, I was basically killing my Skyrim. Total of 170 .esp, I'm sure half of these uses scripts including the very heavy script based mods mentioned above [especially Skyre]).

 

So many thanks to the poster :)

Link to comment

I am sure that this is DUMB :(...but can you Please tell me, "Step By Step" on how to do all that? (I mean...Do what You have done, to have Skyrim play at it's most optimal level with all the cool and sexy mods that make it look and feel better) Basically, I want to make Skyrim look AWESOME with some HOT looking toons to view, but I was not only having issues with mods slowing me down but seams in the skin textures too (really at the wrists). I just about cr**med my panties with a NERDGASM reading your posts. However, I overloaded my system with too many mods, to the point I just started over again. Now I am fresh and so clean and ready to it right. I learned from that debacle that this mistake has been made many many times and I could just ask the experts here.

PC WISE, I am running:

 

Windows 7 Home Premium 64-bit

AMD Phenom II X4 945 Processor (4 CPUs), ~3.0GHz

Memory: 12 Gb

Card name:XFX Radeon HD 7750

 

I recently updgraded and want to make Skyrim look the best I can with this Gear! So, find it in your heart to help me. Thanks!!!!

Sincerely,

Brascoboy

 

PS: Be Gentle, I'm still learning... ;-)

Link to comment
  • 3 weeks later...

I'm wondering, do I just insert this line:

[Papyrus]
fUpdateBudgetMS=800
fExtraTaskletBudgetMS=800
fPostLoadUpdateTimeMS=2000
iMinMemoryPageSize=256
iMaxMemoryPageSize=512
iMaxAllocatedMemoryBytes=2457600

 

After all the other texts in the ini file? Or is there some specific order to it.

 

 

Link to comment
  • 2 weeks later...
  • 5 months later...

So enjoy faster running scripts with these two simple solutions. Of course if you already knew this, never mind :cool: 

 

Why thank you for providing not one but *two* possible solutions!!

 

I run a fully modded Skyrim and out of 4 different characters, -1- has severe

issues with scripts lagging, ie. catching butterflies/dragonflies/fish actually happens long after

pressing 'E', activating a skill like 'Deadly Focus' takes forever to execute, soultrapping

with enchanted weapons has serious delays, "Melting-" mods take forever to compile lists,

some dialogues take long to open, drinking water from a river (RND), etc. All things scripted!

 

(as a curiosity for those who go and brew coffee whilst slow scripts are executing, press 'ESC'! ^^)

I noticed that pressing Escape/pause speeds up the scripts in the background, sometimes resulting

in *a-lot* of noices playing at one time, unpausing yields that some effects have passed through.

...just a bizzare discovery I made...

 

I added both the SKSE-plugin and the 'papyrus'-extras and the speed increased

much noticeably in-game! Thanks again!

Link to comment

The authors of both TESV Acceleration Layer and SkyBoost have stated these plugins no longer work with 1.9.32.8 Skyrim.

 

The INI edits to the Papyrus section (as shown in the OP)  have also been shown to be harmful to your install (save games), and they have been removed from S.T.E.P.  

 

The following are standard ini tweaks not harmful to your install:

 

 

1.F. INI Tweaks

INI files can be used to managed many aspects of the game and also ancillary mods to Skyrim. The following tweaks apply to all systems using STEP. Optional tweaks such as those that aren't relevant to all systems are included in the ["STEP Skyrim Configuration Guide"].

The Skyrim INI files are located in "Documents/My Games/Skyrim" or "My Documents/My Games/Skyrim," depending on Operating System. At this point, the default INI files should have been established due to actions completed in step 1.B, and the following tweaks assume that the Skyrim INI files are not already customized in any way. If using Mod Organizer, editing INI files is done by clicking [Edit Ini]. Wrye Bash users can edit and manage all INI files via the INI Tweaks tab.

20px-Info-Logo.png      Notice:Changing settings in the Skyrim Launcher can undo some of the below INI tweaks. To avoid this, make sure to set the INI files as "read only" when all the tweaks are in place.
1.F.1. Skyrim INI

Most of the following tweaks are recommended updates to existing INI entries. New entries will be explicitly indicated.

Create the following at the end of each of the indicated INI sections. Sections are marked by names within square brackets '[ ]', and some of these sections already exist, but for those that do not, create the section:

Increases the distance arrows fly. (From "Arrows and Bolts Tweaks").

[Actor]
fVisibleNavmeshMoveDist=12288.0000

Add the following under [Combat]:

Shifts the point of aim to the center of the aiming reticule for arrows and crossbows (with this setting targets will be hit where the cursor is placed at approximately 100 feet from the target).

f1PArrowTiltUpAngle=0.7
f3PArrowTiltUpAngle=0.7
f1PBoltTiltUpAngle=0.7
f3PBoltTiltUpAngle=0.7

Add the following under [Display]:

Fixes the shadow flickering issue. Shadow flickering is caused by updating sun shadows.

fSunShadowUpdateTime=0
fSunUpdateThreshold=2.0

Add the following under [General]:

Disables the annoying intro sequence.

sIntroSequence=

Helps prevent lighting “pop-in” by pushing back the distance at which the flicker/pulse animation loops begin.

fFlickeringLightDistance=8192

1.F.2. SkyrimPrefs INI

Modify the following under [Controls]:

Disable mouse acceleration.

bMouseAcceleration=0

Add the following under [Decals]:

Enables higher resolution blood decals on NPCs.

bDecalsOnSkinnedGeometry=1

Modify the following values under [Display]:

Valid values range from 0 - 7. Lower values will sharpen shadows (not the resolution), making vegetation more "vibrant." It gives a subtle increase in performance, but also gives more pixelated and striping effects to shadows. Higher values will make shadows softer and more blurred. Consider a value of two if using ENB.

iBlurDeferredShadowMask=3

Enables shadows rendering on trees.

bTreesReceiveShadows=1

 

ENB users ONLY! Enabling these without an ENB will decrease performance with no visual impact and possibly introduce excessive shadow striping.

bDrawLandShadows=1
bFloatPointRenderTarget=1

 

 

 

If we could put some of these myths to be bed, some of these graveyard posts won't be resurrected and people will stop using them.

 

$0.02

Link to comment
  • 1 month later...
  • 3 weeks later...

Entered Solitude, started experiencing massive script lag.

Did search your topic came up.

Did just the .ini tweaks.

Script latency before entering Solitude: 63ms avg
Save file size: 10Mb

 

After Solitude:  90,000ms avg
Size: 30Mb <----- wtf?

After .ini tweaks
59 - 68ms avg
10Mbs

Seriously wtf Bethesda? Why not a more stable system??

Link to comment

They just released a mod called "save tool" its on the nexus front page that cleans your save from "orphaned scripts"  and deletes unused scripts cleaning your save and possibly getting rid of pesky scripts that lagged behind since you started playing try that out also..reaching 1000 endorsements real soon....seems like its helping lots of people...I tried it and it deleted lots of old scripts....entering a certain area in game ....skyrim might be loadign old scripts further making it slow.

Link to comment
  • 3 weeks later...

These are my settings


[Papyrus]


fUpdateBudgetMS=4.5 (Start at 1.2 and increase by .5)


fExtraTaskletBudgetMS=4.5 (Start at 1.2 and increase by .5)


fPostLoadUpdateTimeMS=1000


bEnableLogging=0


bEnableTrace=0


bLoadDebugInformation=0


Thanks for reading and let me know if you have any questions.


Updated: Please read Mastercobia's post http://www.reddit.com/r/skyrimmods/comments/22rbk5/whats_the_best_papyrus_tweaks_to_use/cgq4qk0


Edit: Another correction per the nexus forum. Do not increase those values willy-nilly. They should ALWAYS be below the script fire value that your FPS allows. For example, 60FPS gives you a maximum of 16ms, 35FPS gives you a value of 30ms, and so on.


Link to comment
  • 9 months later...
  • 5 months later...

I recently uninstalled Skyrim in order to get a clean install in order to finally fix what prevented the game from even starting, even after all mods had been taken off. Once I had the game installed again scripts took a long time to kick in, changing race or sex in racemenu during chargen took almost a minute and I was unable to even get the camera to respond at all. After adding the setting for the skyrim ini mentioned here, the game finally responded. Why this is I do not know since the game worked fine right out of the box after the original install but now it works again.

Link to comment

 

These are my settings

[Papyrus]

fUpdateBudgetMS=4.5 (Start at 1.2 and increase by .5)

fExtraTaskletBudgetMS=4.5 (Start at 1.2 and increase by .5)

fPostLoadUpdateTimeMS=1000

bEnableLogging=0

bEnableTrace=0

bLoadDebugInformation=0

Thanks for reading and let me know if you have any questions.

Updated: Please read Mastercobia's post http://www.reddit.com/r/skyrimmods/comments/22rbk5/whats_the_best_papyrus_tweaks_to_use/cgq4qk0

Edit: Another correction per the nexus forum. Do not increase those values willy-nilly. They should ALWAYS be below the script fire value that your FPS allows. For example, 60FPS gives you a maximum of 16ms, 35FPS gives you a value of 30ms, and so on.

 

 

thank you..

 

Link to comment

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more information, see our Privacy Policy & Terms of Use