Skyrim Special Edition

Classes of Loading Screens

There are two classes of loading screens:
  • Unconditional: These loading screens have no condition, so they can show up any time. Most vanilla loading screens are like that.
  • Conditional: These loading screens have specific conditions under which they can be used. Vanilla uses conditions to implement location specific loading screens

If there are conditional loading screens, whose conditions are met, they will be prioritized over unconditional loading screens. This means, as long as there is at least one conditional loading screen, whose conditions are met, unconditional loading screens are ignored. Conditional loading screens, whose conditions are met, will be called valid.

Understanding conditional Loading Screens

This makes it very hard to control the frequency of loading screens, because as soon as you try to control them with conditions, they are prioritized over vanilla loading screens. Because of that, conditional loading screens often have additional random conditions, so that their conditions are only met rarely.

As an example, if you were to add a 3% chance to all 50 loading screens from a mod, you would frequently get loading screens from this mod, even though 3% seems like an extremely small chance. The probability, that all 50 loading screen evaluate to false is (97%)^50 = 21.8%. So there is only a 21.8% chance that unconditional loading screens are used. Keep in mind, that the majority of vanilla loading screens are unconditional, so you would rather want 70%+ chance to get unconditional loading screens.

Mods that replace vanilla loading screens, generally give their loading screens a 100% chance, so that unconditional loading screens are never used. In theory, conditional vanilla loading screens could still be used, but due to small random chances and location or quest specific conditions, usually only 1 or 2 conditional vanilla loading screens are valid. On the other hand, the replacer mod might add 20 loading screens, of which all have a 100% chance. So in the rare cases, where a conditional vanilla loading screen could be chosen, it still has to fight against 20 mod added loading screens. As a result vanilla loading screens are extremely rare and the replacer mod works as a replacer mod.

Frequency and Compatibility

Now the question is: How do you make a mod configurable, so that you can select how frequently its loading screens will be used and how can you use that frequency to make it compatible with other mods?
In order to be compatible with a replacer mod, you essentially make your own mod a replacer mod as well. Then all loading screens are conditional and valid, so each loading screen has the same chance to be used. Mods with more loading screens will be chosen more frequently because of that.

In order to be compatible with vanilla loading screens, you have 2 options. First, you can use unconditional loading screens. The disadvantage of this approach is, that you cannot control the frequency and all loading screens are equally likely. You will probably get more vanilla loading screens, because there are simply a lot of vanilla loading screens. Another option is to use conditional loading screens, which have a tiny chance to be used.

For example, if you add 10 loading screens and want them to be used 25% of the time, you would want to make sure that in 25% of the cases, at least one of your loading screens is valid and in 75% of the cases, no loading screen is valid (so an unconditional loading screen from vanilla will be used). This leads to a mathematical equation:
(1-p)^10 = 1 - 0.25 and p evaluates to 0.028
So every loading screens needs a chance of 2.8%. Then the chance of all being invalid (97.2%)^10 = 75.28%.

This allows you to control how frequently a conditional loading screen is used compared to unconditional loading screens from vanilla.

Minor Problems

However, there is a small downside. If loading screen from your mod are valid, the number of valid loading screens is usually low.  In the example of above, the chances of 0 valid loading screens was 75.28% and the chances of exactly one valid loading screen is 21.67%. So the chances of having multiple of valid loading screens is extremely low.

The problem is, that a conditional loading screen from vanilla could be valid as well, in which case you get either a vanilla loading screen or one from your mod. As a result, the frequency for loading screens from your mod is a bit lower. Especially in areas, where conditional vanilla loading screens are frequent, you will get noticeably less loading screens from your mod than you calculated with this formula.

Another issue is that you cannot easily express conditions with chances of 2.8%, because the condition function uses integers. This can be solved by using multiple random conditions.

Article information

Added on

Written by