Preface

Fallout 4 has a object reference limit of about 2 million. If this limit is reached, game will not function properly. It will CTD when starting or loading a save. New game will not even start and so on. This same limit seems to also apply to Creation Kit and almost all of its features. From loading plugins, merging plugins in Version Control and even creating Cell Resource Index File List (CDX file). Keeping object reference limit under 2 million keeps your Fallout 4 and Creation Kit in working condition.

With help of this article you can identify mods that are "heavy hitters" with object references and flag them as a master. As any plugin that has ESM flag in it, is not counted towards reference limit. This happens regardless of file extension as long as flag is set. This way initial object reference limit can be dropped from 600k to 160k or even lower.

Idea here is to make space with temporary measures to work with extra large "heavy hitter", which is plugin you are going to create with this mod articles. Plugin created with this mod articles will easily hit over 1.5 million object references right of the bat. But when all is done it should have 5K or even less.

You can haphazardly, as a temporary measure, "ESMify" any "heavy hitter" for duration of this process. Or you can permanently "ESMify" almost any plugin with this script (get ESMifyer and set unique NPCs Persistent combined script from files). Even tough script is designed to work with Skyrim, it also works with Fallout 4. Which ever route you decide to use, changes in load order will be temporary or permanent.

There could be mods that do not play well with “ESMifying”. It is possible that this procedure can brake mods scripts, AI packages and quest NPC (for example). So, if you are not willing to take that risk, just “ESMify” plugins for duration of this process. Do not use script specified earlier.

Usage

  • Open FO4Edit

    NOTE: use X64 version of FO4Edit. X86 version of FO4Edit will crash on "out of memory" message.
  • In module selection click OK. This will load all active plugins from your load order.
  • Right click any plugin, choose Apply script... and choose script 01 - Count loaded refs in load order.
  • When script execution is done there should be calculations in Messages tab.
  • Take a note on sum, the grand total of references.
  • Look for "heavy hitters" from total count. For example:
  • Sots.esp (79076 total)
  • BTInteriors_Project.esp (23759 total)Commonwealth Underground and Forgotten Spaces2.0.esp (16729 total)
  • NEST_BUNKER_PROJECT.esp (17204 total)
  • subwayrunnnerdynamiclighting.esp (127086 total)
  • InsideJobs.esp (11905 total)
  • MutilatedDeadBodies.esp (19490 total)
  • 0_Vault120.esp (16066 total)
  • Stm_DiamondCityExpansion.esp (22491 total)
  • A Forest.esp (57589 total)
  • Simple_lighting_Merge.esp (27895 total) (see more information about this plugin from article: Completely optional. Introducing: Version Control Merge - Not so handy replacement for zMerge.)
Also look for any mod that has only areas in it. For example:
  • TheSewers.esm
  • stumbleuponinteriors.esp
  • HagenEXPANDED.esp
  • SalemEXPANDED.esp
  • moreXplore.esp
  • FallonsBasementOverhaul.esp
  • WelcometoGoodneighbor.esp
  • RynsFallout4.esp
  • JalbertBrotherSettlement.esp
  • DWUK_LexingtonInteriors.esp
  • Immersive_Lexington.esp
  • On these kind of plugins, one by one, open File Header double click column next to Record flag. In drop down list choose ESM.
  • Or permanently "ESMify" plugin with this script (get ESMifyer and set unique NPCs Persistent combined script from files).
  • Save modified plugins and close FO4Edit.
  • Open FO4Edit again and in module selection click OK. This will load all active plugins.
  • Right click any plugin, choose Apply script... and choose script 01 - Count loaded refs in load order.
  • When script execution is done there should be calculations in Messages tab.
  • See what is the grand total of references and compare it to the note you made earlier. It should be much, much lower. Threshold what you are looking for is under 300k in grand total.

Done! To next article!

Article information

Added on

Edited on

Written by

muucow

3 comments

  1. MrBaloneyPony
    MrBaloneyPony
    • supporter
    • 29 kudos
    406 mods I expected this to take a while.. only 265k references... i expected more.  I guess I can skip this step.

    nope, apparently you need to ESM everything or CK will have a hissy fit
  2. ikillyou233
    ikillyou233
    • premium
    • 30 kudos
    Use this script if you plan on keeping those plugins as esm flagged.
    https://www.nexusmods.com/skyrimspecialedition/mods/40260
    The optional file.
    1. muucow
      muucow
      • member
      • 5 kudos
      This works with Fallout 4 too? Nice find. Thank you!