michel92 Posted December 17, 2012 Share Posted December 17, 2012 (edited) Hello guys! First and foremost, this topic is about some doubts I have regarding somethings that possibly there's no known "right" answer yet. If this forum is not fitting for this kind of discussion, I gently ask a moderator to move it to the appropriate place. To the questions we go, I'll enumerate them, for easiness of answering. 1) I read in some mod pages that mods that contain scripts causes problems. Mainly, the script get stuck in your save game, causing save game bloats, CTDs and eventually rendering your save unplayable. I've modded my games pretty heavily already to see them crumble to the ground and die, even Gopher's last Skyrim Let's Play suffered from the same problem, he even had to stop (luckily, he's starting a new one ;D ). From my modding knowledge, I know that if there's something that can render your save unstable and even unusable is a script. Now, to what extent that is true? Does all scripts get stuck in save games? 2) That asked, I now wonder: why vanilla scripts don't cause problems? I mean, Fallout/Elder Scrolls games have their fair share of bugs, but they don't cause those problems outlined above, that only mods cause (at least that I know of). Then I caught myself thinking that this may have to do with the ESM format. Could that be? How exactly does the engine handle ESM? I mean, aside from this master/plugin paradigm. Maybe scripts within ESMs don't bloat saves? Thoughts? 3) Is there anything else that can bloat save games, aside from scripts? That's it guys. I thank any responses in advance. Edited December 17, 2012 by michel92 Link to comment Share on other sites More sharing options...
IsharaMeradin Posted December 17, 2012 Share Posted December 17, 2012 3. Probably or probably not. Just about everything uses scripts or script fragments, so in the end it may boil down to a script. However, the more areas you discover the larger your save file becomes as just about everything you encounter gets "saved" in some form within your save game else you'd de-level each time you started the game :P 2. ESMs have no bearing on scripts in that the scripts are stored within BSA files or loose in the data folder structure. 1. Not all scripts are bad. Not all scripts cause bloating. There is script data stored in the save file: a copy of the compiled script & any changes to variable data that has taken place. When the game reloads, it checks the BSA and data folder for the presence of the script. If the script is not found for some reason it tries to use what is stored in the save. This is where "bloating" begins to happen. Usually a single mention of a missing script isn't going to be a game killer, but lots of uninstalled mods can cause such errors to build up. The biggest issue is this, adding a script to a stock object. So long as an object has had a script assigned to it and said object is in the game, it will expect that script. If the script is no longer there, then there will be errors produced. Some not so bad, others disastrous. The most damaging error is those from scripts that used a continuous update rather than re-registering for each cycle. If the continuous update cycle isn't unregistered before the mod is removed then it will attempt to continue running after the mod has been removed provided the object is still in the game. Mod added objects are typically safe from this problem as they usually are removed with the mod and thus any call to the stored script data in the save file will no longer happen. No matter what the data is still in the save file and will remain thus possibly contributing to bloat. So in a nutshell, stock scripts work because they and the objects they are assigned to are always in the game. Bloating occurs more so with the addition and removal of mods throughout the life of the character. It is best then to settle on a group of mods and play the game as far as you wish. Do note: All information above is gleaned from my own work with scripts, examining the papyrus log and comparing that to what others have surmised by doing the same thing. There is always room for error, none of it is "set in stone" as it were. Link to comment Share on other sites More sharing options...
Thandal Posted December 17, 2012 Share Posted December 17, 2012 What game(s) are we talking about? Some (many? most?) don't have things like .esm files. :whistling: Link to comment Share on other sites More sharing options...
EnaiSiaion Posted December 17, 2012 Share Posted December 17, 2012 I can confirm that I am a retarded idiot and followed the advice on creationkit.com to not use single updates for a continuous update loop. :wallbash: Note that orphaned scripts won't cause crashes by themselves, they may however weigh down the game because they need to be executed, then again they will probably run faster than they did in the actual mod because they will skip all the steps and error out (expect the mother of all log files though if the update timer is short and the script does lots of stuff). What causes problems is when you install and uninstall so many mods that the sum of their scripts gets too heavy. The good news: if the game does find the script it will use that, even if the script happens to be empty. You can apparently use this to stop running scripts. Important and relevant question: what happens to scripts that are attached to a magic effect and set to stop running when the effect finishes, and then you delete the effect? Link to comment Share on other sites More sharing options...
HeyYou Posted December 17, 2012 Share Posted December 17, 2012 I saw a thread over on BGS forums for a 'cleaning' tool that will be able to remove orphaned scripts. This wasn't a problem in earlier games, as they used an internal scripting engine, and the scripts were contained in the mod. With the advent of papyrus, and the changes made to how scripts work..... orphaned scripts are a consequence. Link to comment Share on other sites More sharing options...
stars2heaven Posted December 17, 2012 Share Posted December 17, 2012 I am used to Oblivion still. Now when I go bug hunting there is always an itch in the back of my mind thinking about how whatever bug I'm seeing might have absolutely nothing to do with whatever mod I just removed or put in. It drives me crazy. Link to comment Share on other sites More sharing options...
michel92 Posted December 17, 2012 Author Share Posted December 17, 2012 (edited) @IsharaMeradin ESMs have no bearing on scripts in that the scripts are stored within BSA files or loose in the data folder structure. In Fallout 3/New Vegas, however, the scripts are stored in the plugins. Given the other information you gave on the remainder of your post, though, I don't think that that has any bearing in the issue. 1. Not all scripts are bad. Not all scripts cause bloating. There is script data stored in the save file: a copy of the compiled script & any changes to variable data that has taken place. When the game reloads, it checks the BSA and data folder for the presence of the script. If the script is not found for some reason it tries to use what is stored in the save. This is where "bloating" begins to happen. Usually a single mention of a missing script isn't going to be a game killer, but lots of uninstalled mods can cause such errors to build up. The biggest issue is this, adding a script to a stock object. So long as an object has had a script assigned to it and said object is in the game, it will expect that script. If the script is no longer there, then there will be errors produced. Some not so bad, others disastrous. The most damaging error is those from scripts that used a continuous update rather than re-registering for each cycle. If the continuous update cycle isn't unregistered before the mod is removed then it will attempt to continue running after the mod has been removed provided the object is still in the game. Mod added objects are typically safe from this problem as they usually are removed with the mod and thus any call to the stored script data in the save file will no longer happen. No matter what the data is still in the save file and will remain thus possibly contributing to bloat. So in a nutshell, stock scripts work because they and the objects they are assigned to are always in the game. Bloating occurs more so with the addition and removal of mods throughout the life of the character. It is best then to settle on a group of mods and play the game as far as you wish. That makes a whole lot of sense, my friend, seriously. Following this, I guess, then, that adding a scripted mod to an already existing save game would be less bad than removing one, right? What about updating scripted mods? Furthermore, let's say I run a mod with a quest script that gives a perk to the player. By removing the mod, would that not cause bloating, then? @Thandal I'm talking about Fallout 3/NV and Skyrim. @EnaiSiaion The good news: if the game does find the script it will use that, even if the script happens to be empty. You can apparently use this to stop running scripts.Hmmm, could you expand on that, please? Does that mean that if I run a dummy empty script, with the same name of, say, a script of a mod that I just removed, it will stop the script from possibly bloating the save? @HeyYou I saw a thread over on BGS forums for a 'cleaning' tool that will be able to remove orphaned scripts.Can you point me to the link? I think I read something about the SKSE team working on something like that. Thank you all for the inputs =) Edited December 17, 2012 by michel92 Link to comment Share on other sites More sharing options...
IsharaMeradin Posted December 17, 2012 Share Posted December 17, 2012 @michel92 I'm so used to everything being about Skyrim that I didn't even see your post was in the all game general section. :P What I said about ESM & scripts is true for Skyrim. I know nothing about any other current game on the Nexus and it's modding capabilities. Link to comment Share on other sites More sharing options...
michel92 Posted December 17, 2012 Author Share Posted December 17, 2012 @IsharaMeradin NP =) I assume, then, that there's no such thing as adding a perk tru a quest script in Skyrim? Link to comment Share on other sites More sharing options...
IsharaMeradin Posted December 17, 2012 Share Posted December 17, 2012 @IsharaMeradin NP =) I assume, then, that there's no such thing as adding a perk tru a quest script in Skyrim?It might be possible. I have not investigated that aspect. Link to comment Share on other sites More sharing options...
Recommended Posts