How to utilize OBMM.

This page updated on May 29 2017 CST

Script Templates

This page contains scripts that I put together for mods that I have converted into OMODs. They are to be considered templates or code snippets. I will try to keep from duplicating the same functions unless they are showing multiple ways of doing the same thing.

Table of Contents

My Personal Scripting Template

Purpose: This is the base scripting template I start with for each mod. These are the most-used functions even though many mods don't need any scripting at all.

The Code:

OBMM Version Check

Purpose: If your script uses scripting functions that didn't work or exist in older versions of OBMM, you should include an OBMM version check. When you finish creating your script, check the Script History page to see if you used any functions that didn't exist or wasn't stable when OBMM version 0.6.10 released.

The Code:

Oblivion Version Check

Purpose: If your mod requires a patched version of oblivion, this will be helpful to avoid unwanted problems.

Code for requiring Oblivion 1.1.511:

Code for requiring Oblivion 1.2.214:

Code for requiring Oblivion 1.2.416:

Oblivion Script Extender Check

Purpose: If your mod requires (any version) of Oblivion Script Extender (OBSE), this will be helpful to avoid unwanted problems.

The Code:

Oblivion Script Extender Check (Specific Version)

Purpose: If your mod requires Oblivion Script Extender (OBSE) as well as a specific version of OBSE, this will be helpful to avoid unwanted problems.

The Code:

Menu Video Loop Replacement

Purpose: This script will allow you to install a custom menu video without overwriting the original video and without manually editing anything just like any other non-destructive mod. Of course, you'll need to name your video file with a unique filename.

The Code:

Avoid Incompatible Mods (that you know about)

Purpose: If you know this mod is incompatible with another and it uses the same .esp file for every version, this script will work fine.

The Code:

Recommending Complimentary Mods

Purpose: If your mod compliments another mod but does not require it, add an FYI message stating so.

The Code:

Selecting Multiple Plugins

Purpose: If your mod has more than one .esp file and can be enabled at the same time, this script will allow the player to pick one or more.

The Code:

CopyPlugin

Purpose: This script os for mods that have more than one .esp file and only one can be enabled at a time with a strong importance be placed on the .esp name remaining the same no matter which .esp you select.

The Code:

CopyDataFile

Purpose: If your mod has more than one texture option for an object, you can use CopyDateFile to give the player an option for which texture to use. The OBMM manual states that using the function can cause the conflict detector to go haywire.

The Code:

--SCRIPT TITLE HERE--

Purpose: --INSERT PURPOSE HERE--

The Code: