File information

Last updated

Original upload

Created by

PJM

Uploaded by

PJMail

Virus scan

Safe to use

About this mod

My scripts to find Precombine/Previs (Flickering/Occlusion) errors in your game (or individual Mods), and optionally generate a patch Mod to fix those problems. Can also create Lighting/weather etc Load Order patches. Includes tools to help you visualize what a mod effects, and the overlap with other mod's previs changes.

Requirements
Permissions and credits
Changelogs
This is a set of tools for people with experience Creating Patch Mods (using FO4Edit and CreationKit to resolve Mod conflicts) and want to fix flickering/occlusion conflicts as well, and/or merge Lighting/Weather (etc) changes without breaking Previs (see article). Mod Authors can also use these scripts to add Previsbines to their Mod (see article).

Check out the FAQ Post and Articles for How-to information.
READ everything on these Stickied Posts (and those Articles), before continuing otherwise you will have problems!

This mod consists of FO4Edit script (FO4Check_Previsbines) to analyze your mods and generate a 'seed' file used by the CK to fix those errors, a CMD script (GeneratePrevisibines.bat) to automate the generation of Precombine/Previs (Previsbine) files from that 'seed' file, and a number of other useful scripts I have written to create patch mods and visualize Previsbine conflicts. Full usage  details in the attached guide.

New users SHOULD download/extract the full archive PJMScripts (Main files), and then replace the following updated scripts (in Update Files):
Latest versions of xEdit Scripts:
[Jan 2025] New V1.0 FO4CopyCellchangesToPatch.pas (Create Patch to restore Cell settings overriden in selected Mod)
[Jan 2025] New V1.1
FO4RemovePrecombines.pas (Remove Previsbine information from the Mod it is run against, changed script name)
[Jan 2025] Updated V2.2
Batch_FO4MergePreVisandCleanRefr.pas (Minor error reporting update)
[Jan 2025] Updated V4.6o
FO4Check_Previsbines.pas (Minor Bug fixes)
[Dec 2024] Updated V1.1 FO4MergePrevisPatchIntoMaster.pas (Used for merging Previsbine patch back into original Mod. See Article)
[Dec 2024] Updated V1.7b FO4FindNewPCStatics.pas (Better nif error handling - forgot to upload this version back in july...)
[Dec 2024] Updated V1.5
Batch_FO4MergeCombinedObjectsandCheck.pas (Blank XCRI on override mitigation - improved implementation)
[Dec 2024] Updated V2.7 FO4CheckPrevisbineAssets.pas (Minor bug Fixes, better reporting)
[Jul 2024] Updated V1.2 FO4CleanPrevisPatchMasters.pas (Various bug fixes)
Latest Batch Script:
[Dec 2024] Updated V2.3 GeneratePrevisibines.bat (Better error checking. Uses xEdit64/FO4Edit64 in current directory if found, script version check)

Pre-release updates (for testing):
[Jan 2025] Update V4.7 FO4Check_Previsbines.pas (Updated GUI, Seed overwrite check)
[Feb 2025] Updated V2.4 GeneratePrevisibines.bat (Takes mod name as parameter for unattended running of build process)

The FO4Check_Previsbines script can be used on its own to find all Previsbine issues introduced by Mod conflicts - without having to go in the game and look for 'visual issues' - and  builds a 'seed' patch to resolve those issues.

The GeneratePrevisibines.bat CMD script is used for fully automatic generation of Previsbines (for a mod) without manual intervention.
Together they are used in a 2 step process to generate Previsbines (Precombines and Previs) for all your needs.

It can also be used to create a patch to add missing regions (eg from 'region names on saves') as well as Locations, EditorIDs, Weather and Lighting effects (eg from ELFX), and MHDT info deleted/overwritten by other mods (or PRP). Full details in this new  Guide.

See the FAQ Post for more details, but examples of what you can do:-
  • Find all the Cells in your game that will have visual issues (flickering)
  • Fix all flickering, conflicting Lighting changes, PRP compatibility, etc for your full Load order
  • Create a specific Previsbine patch for a mod that doesn't have them (to improve its performance)
  • Create a patch for PRP to fix missing Region-names, Lighting (ELFX), Fog, music etc changes added by mods

Additionally these scripts can be used to create Previsbines for new Worldspace/Interiors in any mod, create a PRP patch for a mod that did not support PRP,  add Previsbines to a mod that does not have them (i.e. to increase FPS for mods that add lots of 'new' content), etc. Full instructions in the Guide.

More information on Previsbines is available in my Previsbines Deep Dive article, as well as the xEdit Discord topic "PreCombines and Previs"
 (and if you have a spare couple of days - this Nexusmods forum).

Notes:
  • These scripts are for use with FO4Edit, CreationKit, and CKFixes - so are intended for people with a reasonable amount of experience using these tools, and have the computing resources to generate Previsbines (which can require A LOT of memory and time).
  • If you use someone else's guide to building Previsbines then you are on your own (My scripts are more recent, and don't require any extra steps).
  • You can modify the resulting 'seed' (my script generates) for your own purposes, and you can also use any another author's command script to build previsbines from it (such as the powershell version by Feedanoob). Ymmv.

To use these scripts you must first put the files from this mod in the correct directories:
Spoiler:  
Show
  • Manually download this archive (DO NOT use a Mod manager).
  • Extract it into your directory containing FO4Edit.exe (so all the scripts go into the "Edit Scripts" subdirectory).
  • (Optionally) move the "bat" and "txt" files to somewhere else. These are help files, and the Previsbine generation CMD script.
  • I would recommend creating a shortcut to the "GeneratePrevisibines.bat" CMD script to make it easier to use.
  • If you use MO2 then you must register this command script as an external program otherwise it will not see your mods.
  • If using the steam version of CK you must register the steamID as well, especially for Generateprevisbines.bat.
  • (Optionally) you can also create a shortcut to FO4Edit.exe, with the parameter "-Script:FO4Check_Previsbines.pas", which will invoke the Previsbine Checker script to run against all the mods you selected in the FO4Edit selection window (batch mode).
These scripts MUST be able to see your plugins in the Data directory, so if you use MO2 they must be run from within MO2.

You also require:
  • FO4Edit.exe (or FO4Edit64.exe) V4.1.5 or later.
  • FO4 CreationKit. If using the Steam version read the stickied post for extra steps.
  • CKPE ( Creation Kit Platform Extended) verson appropraite for your CK version.
  • Add lines bBSPointerHandleExtremly=true and sOutputFile=CK.log to CreationKitPlatformExtended.ini.
  • If you have more than 5 cores/threads then try setting iMaxUmbraBakeThreads=n (n=#cores-1) in CreationKit.ini under [General].

Only supported CK/CKPE version combinations are:
  • FO4 OG, CK OG  (Bethnet V1.10.162) and CK Fixes V2.0.1 (2.0 + 2.0.1 hotfix)
  • FO4 OG, CK OG (Steam V1.10.162) and CKPE V0.2 build 941 (requires bOwnArchiveLoader=false set in CreationKitPlatformExtended.ini)
  • FO4 OG + NG archives + Bass, CK OG (Steam V1.10.162) and CKPE V0.3 build 241 or later (ie. you downgraded FO4 and CK NG)
  • FO4 NG, CK NG (Steam V1.10.982.3) and CKPE V0.4 build 625 (or later)
Update: Old CKPE versions no longer available. If you use CK V1.10.162 (OG), CKPE V0.4 b968, and still have Previs issues then try Github CKPE V0.3
Note:
If you are running Downgraded CK with NG archives you can use CK Next Gen (V1.10.982.3) and latest CKPE but must also use the latest steam_api64.dll (note then the game then WILL NOT work unless you swap back to the older Steam dll).

There are a number of authors with guides on installing FO4Edit and the Creation Kit if you have problems.
Also help is available on the xEdit discord I mentioned above, as well as the Collective Modding Discord.

Brief List of primary scripts included in download:
Spoiler:  
Show

- GeneratePrevisibines.bat:  CMD script to use FO4Edit and CreationKit to generate Previsbines (can be placed anywhere on your system).
- FO4Check_PreVisbines.pas: Main script to find previsbine conflicts and optionally build a seed mod that can be used to build previsbines.
- FO4FindNewPCStatics.pas: Locates STATic references in a CELL(s) that may cause the CK to crash, and optionally allows you to exclude them.
- FO4CleanPrevisPatchMasters.pas: Smart "cleanmasters" script designed for Previsbine patch mods (ONLY!).
- FO4MergePrevisPatchIntoMaster.pas: Smart Merge of Previsbine Patch back into Original Master Mod.
- (Batch_)FO4MergeCombinedObjectsAndCheck.pas: Improved version of the original MergeCombinedObjects script (Batch_ * is cmd line version)
- (Batch_)FO4MergePreVisandCleanRefr.pas: Improved version of the original MergePreVis script (Batch_* version is commandline version)
- FO4CheckPrevisbineAssets.pas: Validate a Previsbine mod's Archive to make sure it contains all the expected Previsbine files.
- Worldspace browser with PrevisCheck.pas: Modified version of the Default script with options to visually display a Mod's Previsbines impact.
- Merge overrides into master with VCI1.pas, Copy_version_control_info_from_another_plugin_Redux.pas: Enhanced versions of default scripts.
- FO4SetTimeStampToToday.pas, FO4SetTimeStampToTodayIfNone.pas,FO4SetRefrTimestampToParentIfNone.pas: VCI1 manipulation scripts.
- FO4CheckRVIS.pas, FO4AddFixRVIS.pas,FO4SetRVISifMissing.pas: Scripts to Validate/Add/Fix RVIS on Exteriors Cells.
- FO4CopyMHDTtoWinningOverride.pas, FO4CreateMHDTPatchFromOverride.pas: Scripts to Extract/Merge MHDT Information between Plugins.
- count_loaded_refs_in_load_order_CK.pas: Script to Count the Total References in loaded Plugins. The CK (without CK Fixes) fails if above 2097152
Other files/scripts found in this mod are used internally by the GeneratePrevisibines.bat Script.


FO4Check_Previsbines.pas (V4.6) script has a Tasks based GUI, but also offers finer control via the Advanced button.

FO4FindNewPCStatics.pas (V1.7)  FO4Edit script to locate/exclude problem Precombineable Meshes that may/do crash the CK:
Can be run against multiple mods (only updates last mod in xEdit). Note that FO4CheckPrevisbines will automatically exclude most bad meshes anyway, so no point running it against your seed/patch. Only run it if you get a crash building Precombines, then run it against suspect mods (or everything - will be slow!)
Above shows it run against a Vault1080, and the meshes it found that did crash Precombine building in the CK. Note that the previs patch has automatically exclude others that would have crashed it, but missed the first one (as it was in the persistent cell). Use "Exclude Bad?" to exclude it so it won't crash the CK.

AutoCellDisplay (Optional download) - shows you the cell boundaries:
When wearing the craftable Display Cells Ring you can see the Cell borders in game, and their Cell details (to easier find it in FO4Edit).

Blue walls are Cell borders, Purple walls are Cluster Borders. Crouch (sneak) to display your current location.

The enhanced "Worldspace browser with PrevisCheck.pas" FO4Edit script has extra options to allow you to visually see precombines:
The extent a mod effects the cells (and thus previsbines) in your game can be clearly seen. More than one mod can be displayed also.

The above image show 2 mods and you can see their overlap (conflict) area where you will probably have visual issues.
Right-click on any cell to get it's details. You can overlay as many mods as you want, but use the "Select colour" option to change it each time. It helps...
Dotted Cell outline - Cell override found in Mod.
Solid Cell outline - Cell override also includes new/updated precombineable References.
Dotted slant - Cell has new Previs supplied by Mod.
Solid slant - Cell has new Precombines supplied by Mod.