Jump to content

NOTICE: The new site is now moved to the original www.loverslab.com URL. The site may be up and down during this transition and there is still some tweaks and setup going on, so you may experience the occasional broken link, visual oddity, and other such errors. 

If you notice anything any particular that's broken or have any suggestions or comments, please post them in the following thread: http://www.loverslab.com/topic/87535-new-site-questions-comments-and-suggestions/

The old site will remain accessible for the next week via the URL http://old.loverslab.com

Sign in to follow this  
yosecretsquirrel

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: 

Share this post


Link to post

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.

Share this post


Link to post

The result of putting the dll into my Skyrim folder is that the game does not start at all. No error, just nothing. I made the papyrus changes though. Let's see how they work out for me ;)

Share this post


Link to post

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.
 
 
 

Share this post


Link to post

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 :)

Share this post


Link to post

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... ;-)

Share this post


Link to post

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.

 

 

Share this post


Link to post

Oh, wow! thank you so much! Now my character can actually use submit without me having enough time to get a coffee before the animations start!

 

And terror, I've set mine in Skyrim.ini. Seems to work

Share this post


Link to post

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!

Share this post


Link to post

Actually, i have another kind of problem....sometimes, animations just dont work, and often my character (vampire) got stuck while trying to sneak-feed on npcs. How to fix that?

Share this post


Link to post

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

Share this post


Link to post

i put .ini tweaks in it works pefectly but there some stuttering going on can you guys help with that.

Share this post


Link to post

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??

Share this post


Link to post

I am completely missing the fields in my INI file. Do I have to insert the fields to make this tweak happen, or should those fields already be present?

 

They may not be there, if not just make them.

Share this post


Link to post

 

I am completely missing the fields in my INI file. Do I have to insert the fields to make this tweak happen, or should those fields already be present?

 

They may not be there, if not just make them.

 

 

Thanks

Share this post


Link to post

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.

Share this post


Link to post

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.


Share this post


Link to post

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.

Share this post


Link to post

 

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..

 

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this  

×