Wrye Bash is a powerful mod management utility for TES IV: Oblivion and TES V: Skyrim. Its features include:
Wrye Bash can appear daunting at first. To help make it more manageable, the documentation has been split into a few readmes that are targeted towards different usage requirements.
This readme covers the most technical aspects of Wrye Bash, being the Wizard scripting language, the syntax used in Mod Checker rulesets and the formatting of PMs archives expected by the PM Archive tab. Information on the most commonly used aspects of Wrye Bash may be found in the General Readme, and the Advanced Readme holds information on more advanced and less commonly used features. Wrye Bash's version history is stored in the Version History document.
The DarNified Books setting in the Bashed Patch's tweaks allows the use of Wtxt formatting, which is applied if the first line of a book is == title ==
<<
, ^^
or >>
at the beginning of a line generate a div align=left
, div align=center
or div align=right
tag respectively.
== text ==
generates a level 2 header.
=== text
generates a level 3 header.
__text__
, ~~text~~
and **text**
generate emphasised text.
Bain Wizards allow mod authors to include a simple configuration script with their packages. Wizards run on a simple scripting language similar to OBMM script, contained in a wizard.txt
file in the package. When run, the wizard will run through a series of windows to allow you to select options, then show a summary page at the end telling you which sub-packages and esps/esms will be selected, and any INI tweaks that will be applied.
Those using Notepad++ to write their install scripts may want to use utumno's BAIN wizard Script Highlighter for Notepad plus plus as it features code folding and syntax highlighting to make spotting mistakes easier.
There is a similar BAIN Wizard Syntax for EmEditor syntax highlighter for EmEditor created by broken85.
You may use a number of different dialogues in a wizard. The available dialogs are described in this section.
SelectOne - This dialog gives you a list of options, with the option to select one of them. It will be shown when a SelectOne keyword is used. Each option can display an image associated with it, and a description as well. To see a larger version of the image displayed, either right click or middle click on the image. The wizard can specify a default answer, and if you are running it as an Auto-Wizard, then this page will be skipped, using the default option.
SelectMany - This dialog gives you a list of options, with the option to select one or more of them, or even none of them. It will be shown when a SelectMany keyword is used. Each option can display an image associated with it, and a description as well. To see a larger version of the image displayed, either right click or middle click on the image. The wizard can specify default options, and if you are running it as an Auto-Wizard, then this page will be skipped, using the default options.
Cancel - This dialog will be shown if the wizard cancels execution for some reason, activated by the Cancel keyword. If a reason is given, it will be displayed.
Error - This dialog will be shown if the wizard encounters an error in the wizard file. The wizard will then quit.
Finish - This dialog will be shown at the end of the wizard, to show you which sub-packages, esps, and esms will be selected. It will be shown either when the end of a wizard file is reached, or if the Return keyword is used. It also shows what INI Tweaks will be applied, and also serves as a place for any extra notes from the mod auther to be displayed.
Version Warning - This dialog is displayed if the user's system doesn't meet the package's game, script extender or graphics extender requirements.
Each line of a Wizard contains one statement. To carry a statement across multiple lines, end each line of the statement with a backslash \
. This will cause BAIN to read the next line as if it were part of the first.
Wizard syntax is case-sensitive, apart from filenames. Make sure when writing Wizards that you use the correct case.
Variable names may contain any alphanumeric characters (a-z, A-Z, 0-9) and underscores (_), but cannot start with a number. You cannot declare a variable with the same name as a keyword, function or constant. Variables can be assigned values using an assignment operator, and can hold the following data types:
0.123
, -3.5
, 7.0
. You can perform mathematical operations on decimals using the mathematical operators.
"Hello"
, 'World!'
. As in the examples, strings must be enclosed within double or single quotes. Special characters may be included in strings by using an escape sequence. Strings can be added and multiplied using the addition and multiplication operators. One string may be checked for within another using the in operator.
Constants are variables that are pre-defined by BAIN and cannot have their values changed. You cannot create new constants.
Comments are extra text ignored by the Wizard engine, to explain what the Wizard code does to other readers. Comments begin with a semicolon ;
and last until the end of the line.
Expressions are evaluated using the standard order of operations, eg. 3 + 6 * 2
will evaluate to 15
.
SelectSubPackage
and not SeleCtsUbpacKage
.
"","",""\
CompareObVersion - Used to test the installed version of Oblivion against the one you specify. Deprecated. Use CompareGameVersion instead.
CompareGameVersion - Used to test the installed version of the game Wrye Bash is running for against the version you specify.
CompareGameVersion(version_string)
"1.2.0.416"
.
Return values:
-1
- Installed version is less than the version specified in version_string.
0
- Installed version is equal to the version specified in version_string.
1
- Installed version is greater than the version specified in version_string.
CompareOBSEVersion - Used to test the installed version of OBSE against the one you specify. Deprecated. Use CompareSEVersion instead.
CompareSEVersion - Used to test the installed version of the Script Extender of the game that Wrye Bash is running for against the one you specify.
CompareSEVersion(version_string)
"0.0.20.1"
.
Return values:
-1
- Installed version is less than the version specified in version_string.
0
- Installed version is equal to the version specified in version_string.
1
- Installed version is greater than the version specified in version_string, or there is no Script Extender available for the game.
CompareOBGEVersion - Used to test the installed version of OBGE against the one you specify. Deprecated. Use CompareGEVersion instead.
CompareGEVersion - Used to test the installed version of the Graphics Extender of the game that Wrye Bash is running for against the one you specify.
CompareGEVersion(version_string)
"0.0.20.1"
.
Return values:
-1
- Installed version is less than the version specified in version_string.
0
- Installed version is equal to the version specified in version_string.
1
- Installed version is greater than the version specified in version_string, or there is no Graphics Extender available for the game.
CompareWBVersion - Used to test the installed version of Wrye Bash against the one you specify.
CompareWBVersion(version_string)
"0.0.20.1"
.
Return values:
-1
- Installed version is less than the version specified in version_string.
0
- Installed version is equal to the version specified in version_string.
1
- Installed version is greater than the version specified in version_string.
DataFileExists - Tests for the existance of a file in the Data directory. If the file you are testing for is an ESP or ESM, this will also detected ghosted versions of the file.
DataFileExists(file_name [, ..., file_name_n])
Return values:
True
- All of the files exist.
False
- One or more of the files do not exist.
GetEspmStatus - Tests the current status of an ESP or ESM in the Data directory. This function takes esp/m ghosting into account when testing the status.
GetEspmStatus(file_name)
Return values:
-1
- The esp/m does not exist.
0
- The esp/m is not active, imported, or merged. Its checkbox in Wrye Bash's Mods tab is .
1
- The esp/m is not active, but has portions imported into the Bashed Patch. Its checkbox in Wrye Bash's Mods tab is .
2
- The esp/m is active. Its checkbox in Wrye Bash's Mods tab is .
3
- The esp/m is merged into the Bashed Patch. Its checkbox in Wrye Bash's Mods tab is .
EditINI - Tells Wrye Bash to create an ini tweak file with some tweaks in it. If the file that you tell Wrye Bash to apply the tweak to is from the current installer or is the game's ini file, then Wrye Bash will also automatically apply the tweak, otherwise, it will just be generated for the user to apply manually.
EditINI(file_name, section, setting, value [,comment])
Exec - This will cause the Wizard to execute lines that are passed to it. This is usefull for creating dynamically generated menus.
Exec(lines)
\'
should be written \\\'
.
str - Used to convert a value into a string, for example when trying to concantenate a integer or decimal to a string.
str(value)
Returns:
str(5)
would return "5"
.
int - Used to convert a value to an integer, for example converting a value held in a string to a integer value.
int(value)
Returns:
int('65')
would return 65
.
0
- If integer conversion is not possible.
float - Used to convert a value to decimal, for example converting a value held in a string to a decimal value.
float(value)
Return values:
int('2.4')
would return 2.4
.
0.0
- If decimal conversion is not possible.
len - Used to find the length of a string.
len(string)
Return values:
0
- If length calculation was not possible.
endswith - Test what a string ends with.
endswith(string, ending_1 [, ..., ending_n])
Return values:
True
- If the string ends in any of the endings specified.
False
- If the string does not end in any of the endings specified.
startswith - Test what a string starts with.
startswith(string, prefix_1 [, ..., prefix_n])
Return values:
True
- If the string begin with any of the prefixes specified.
False
- If the string does not begin with any of the prefixes specified.
lower - Convert a string to lower case.
lower(string)
Return values:
find - Return index of first occurrance of a substring.
find(string, substring [, start, stop])
Return values:
-1
- If substring could not be found.
rfind - Return index of last occurrance of a substring.
rfind(string, substring [, start, stop])
Return values:
-1
- If substring could not be found.
GetFilename - For a string that contains a path, returns the filename part of the string.
GetFilename(path_string)
Return values:
GetFolder - For a string that contains a path, returns the folder part of the string.
GetFolder(path_string)
Return values:
Keywords are like functions, but don't require brackets around their arguments, and are used for controlling the flow of a wizard or performing special tasks.
SelectSubPackage - Cause the specified sub-package to be selected for installation. This is equivilant to checking the sub-package and all the esps or esms in that subpackage in the BAIN window.
SelectSubPackage name
DeSelectSubPackage - Cause the specified sub-package to be de-selected from installation. This is equivilant to un-checking the sub-package in the BAIN window.
DeSelectSubPackage name
name
- A string or variable holding the name of the sub-package to de-select.
SelectEspm - Cause the specified esp or esm to be selected for installation. This is equivilant to checking the esp or esm from the BAIN window.
SelectEspm name
DeSelectEspm - Cause the specified esp or esm to be deselected from installation. This is equivilant to un-checking the esp or esm from the BAIN window.
DeSelectEspm name
SelectAll - Cause all sub-packages, esps, and esms to be selected for installation. This is equivilant to first checking all sub-packages in the BAIN window, then checking all esps and esms in the BAIN window.
SelectAll
DeSelectAll - Cause all sub-packages, esps, and esms to be de-selected from installation. This is equivilant to first un-checking all esps and esms in the BAIN window, then un-checking all sub-packages in the BAIN window.
DeSelectAll
SelectAllEspms - Cause all esps and esms to be selected for installation. This is equivilant to checking all esps and esms in the BAIN window.
SelectAllEspms
DeSelectAllEspms - Cause all esps and esms to be de-selected from installation. This is equivilant to un-checking all esps and esms in the BAIN window.
DeSelectAllEspms
RenameEspm - Change the installed name of an esp or esm.
RenameEspm original_name, new_name
ResetEspmName - Resets the name of an esp or esm back to its default name.
ResetEspmName original_name
ResetAllEspmNames - Resets the names of all the esps and esms back to their default names.
ResetAllEspmNames
Note - Add a note to the user to be displayed at the end of the wizard, on the finish page. The '- '
will be added automatically.
Note text
Return - Signals completion of the wizard. This will jump right to the finish page.
Return
Cancel - Cancels the wizard, with an optional text to display in a dialog as to why the wizard was canceled.
Cancel [text]
RequireVersions - Tests the users system agains version requirements you specify. If the requirements are not met, a warning dialog will be shown asking if you wish to continue anyway.
RequireVersions game_version [, se_version, ge_version, wrye_bash_version]
If-Elif-Else-EndIf - A basic If control block.
If statement
lines
Elif statement
lines
Elif statement
lines
Else
lines
EndIf
If
- Begins the control block.
True
, then the lines following it will be run, until the next Elif, Else, or EndIf.
Elif
True
, and the initial If
and none of the previous Elif
s were True
, then the lines following this Elif
will be run, until the next Elif
, Else
, or EndIf
.
Else
- If the initail If
and none of the previous Elif
s were True
, then the lines following will be run until an EndIf
is met.
EndIf
- Signals the end of the If
control block.
While-Continue-Break-EndWhile - A while loop.
While statement
lines
Continue
lines
Break
lines
EndWhile
While
- Begins the while loop.
True
, execution of the lines begins, otherwise execution skips to after the EndWhile
.
Continue
- Signals the while loop to begin over again at the While
statement.
Break
- Signals the while loop to end execution, skipping to after the EndWhile
.
EndWhile
- Ends the while loop. statement is re-evaluated, and if True
, execution begins again at the start of the While
block.
For-Continue-Break-EndFor - A For loop.
For var to start_value to end_value [by increment_value]
lines
Continue
lines
Break
lines
EndFor
For sub in SubPackages
For file in sub
lines
EndFor
EndFor
For
- Begins the for loop. There are three types of for loop.
var from start_value to end_value [by increment_value]
1
if start_value is greater than end_value or -1
otherwise.
sub in SubPackages
- This type of for loop iterates over the names of the SubPackages in the current package.
file in sub
- This type of for loop iterates over the names of the files in the given subpackage. Filenames are relative to the Data directory, before any remapping that would normally be done by BAIN.
Continue
- Signals the for loop to begin over again at the For
statement.
Break
- Signals the for loop to end execution, skipping to after the EndFor
.
EndFor
- Ends the for loop.
SelectOne - Shows a dialog where the user can select one option from a list of options.
SelectOne 'description', \
'option 1', 'description 1', 'image 1', \
'option 2', 'description 2', 'image 2', \
..., \
'option n', 'description n', 'image n'
Case 'option 1'
lines
Break
Case 'option 2'
lines
Break
Case 'option n'
lines
Break
Default
lines
Break
EndSelect
SelectOne
- After the user presses the "Next" button, this begins a Select control block.
Case option
- The lines following the Case
will be run if the user selected its corresponding option on the dialog, until a Break
or EndSelect
is met.
Case
corresponds to.
Default
- The lines following the Default
will be run, until a Break
or EndSelect
, if none of the Case
options have been run.
Break
- Stops running lines in the current Case
or Default
block.
EndSelect
- Signals the end of the Select control block.
SelectMany - Shows a dialog where the user can select multiple options from a list. After the user presses the "Next" button, this begins a Select control block. See SelectOne for usage.
SelectMany 'description', \
'option 1', 'description 1', 'image 1', \
'option 2', 'description 2', 'image 2', \
..., \
'option n', 'description n', 'image n'
Case 'option 1'
lines
Break
Case 'option 2'
lines
Break
Case 'option n'
lines
Break
EndSelect
Assignment operators are used to assign values to variables. Compound assignment operators are a combination of assignment operator and mathematical operator, performing the operation and assigning it to a variable in one step.
Assignment: =
variable = value
Compound Assignment: +=
, -=
, *=
, /=
, ^=
variable += value
variable -= value
variable *= value
variable /= value
variable ^= value
Mathematical operators allow you to add, subtract, multiply, divide and exponentiate integers and decimals. The addition and multiplication operators can also be used on strings.
Addition: +
var1 + var2
Subtraction: -
var1 - var2
Multiplication: *
var1 * var2
Division: /
var1 / var2
Exponentiation: ^
.
var1 ^ var2
Boolean operators can be used to test the logical truth of values.
And: &
, and
. Returns True
if both sides of the expression are true and False
otherwise.
var1 & var2
var1 and var2
Or: |
, or
. Returns True
if either side of the expression is true and False
otherwise.
var1 | var2
var1 or var2
Not: !
, not
. Returns True
if the expression is False
, and False
if the expression is True
.
!value
not value
In: in
. Returns True
if the left hand side of the expression is contained in the right hand side, and False
otherwise.
var1 in var2
Comparison operators are used to compare two values or variables with one another.
Equal: ==
. Returns True
if the left hand side of the expression is equal to the right hand side of the expression, and False
otherwise.
var1 == var2
Not Equal: !=
. Returns True
if the left hand side of the expression is not equal to the right hand side of the expression, and False
otherwise.
var1 != var2
Greater Than or Equal: >=
. Returns True
if the left hand side of the expression is greater than or equal to the right hand side of the expression, and False
otherwise.
var1 >= var2
Greater Than: >
. Returns True
if the left hand side of the expression is greater than the right hand side of the expression, and False
otherwise.
var1 > var2
Less Than or Equal: <=
. Returns True
if the left hand side of the expression is less than or equal to the right hand side of the expression, and False
otherwise.
var1 <= var2
Less Than: <
. Returns True
if the left hand side of the expression is less than the right hand side of the expression, and False
otherwise.
var1 < var2
Some of the operators have case insensitive versions, which function in the same way as their normal versions, but when comparing strings they ignore case. Case insensitive versions of operators end with a colon :
. The following case insensitive operators are available:
==:
!=:
>=:
>:
<=:
<:
in:
The dot operator can be used to call a function on a variable without having to specify the variable in the function's arguments. This functionality will be familiar to anyone with experience in Object-Orientated programming. The syntax is:
variable.function
The following functions can be used with the dot operator:
len
endswith
startswith
lower
find
rfind
Indexing is used to access a specific location in a sequence. Currently only strings and string variables can be indexed. The syntax used is similar to Python's indexing syntax.
string[start:stop:step]
Arguments:
:
is supplied, indexing will continue to the end of the sequence. If not specified and no colon is supplied, only one character will be indexed.
2
would return every second item in the sequence. If not specified, a value of 1
will be used.
Negative valus for start and stop will be relative to the end of the sequence. For example, -1
would mean the first character from the end of the sequence.
Examples:
"Hello"[0] ;returns "H"
"Hello"[0:] ;returns "Hello"
"Hello"[:] ;returns "Hello"
"Hello"[0:2] ;returns "He"
"Hello"[-1] ;returns "o"
"Hello"[1:3] ;returns "el"
"Hello"[-2:] ;returns "lo"
Only two constants are defined in BAIN Wizards.
True - True
. Equal to boolean true
(text representation) or 1
(binary representation).
False - False
. Equal to boolean false
(text representation) or 0
(binary representation).
Escape sequences are special sequences of characters you can use to get a different character outputted. The escape sequences allowed are:
\"
: Outputs a double quote character "
. This allows you to put quotes in a string without causing the Wizard engine to think it's reached the end of the string.
\'
: Outputs a single quote character '
. This allows you to put quotes in a string without causing the Wizard engine to think it's reached the end of the string.
\t
: Outputs a tab.
\n
: Outputs a new line.
\\
: Outputs a backslash \
.
The following mods have Wizard scripts that may be useful references: Animated Window Lighting System and Chimneys - AWLS, Bain Conversion Files, Bananasplit Better Cities, Fast and Easy Frans WIZBAIN Archive Maker -ENGLISH ONLY-, Metallicow Cursor Mod, Unique Landscapes Compilation, Weather - All Natural.
Every Wizard should have a short overview for the user to read before proceeding with the actual installation questions. Notice how in the example below there are no Case
statements used and the default character |
is before the Start Here_Readme
.
SelectOne "Welcome to the ExampleMod's mod Setup Wizard", \
"|Start Here_Readme", "If this is the first time you install this mod it's recommended that you carefully read the rest of the selections readme's to have an idea of what the optional parts of this mod do.", "", \
"ExampleMod Overview", "ExampleText bla bla bla \n\nBla Bla Bla \n\n Bla Bla\n Bla", "", \
"Changelog", "Example Fixes Release 1.01 \nExample Full Public 1.0 Release \nExample 2nd Beta Release 0.91 \n0.9 - Example Beta Release \n0.3 - Example Alpha Release \n0.01 - Example Initial Release", "", \
"Guidelines for a Example install", "", "", \
"ExampleMod Screenshots", "", "Screenshots\\ExampleScreenshot.jpg", \
"Credits\\Authors", "Wrye - For BAIN. Woooooooot! \nLojack - For the wonderful BAIN wizard installer feature. \nMetallicow - For chewing the cud.", "", \
"Language", "Language or Nationality this BAIN wizard was written in. \n\n English (USA)", "Wizard Images\\EnglishUSA.jpg"
EndSelect
Useful for when you want to ask the user a yes/no question. SelectOne
and SelectSubPackage
in the example below could be replaced by another keyword.
SelectOne "Example: Yes/No Question?", \
"Yes", "Description", "Wizard Images\\Yes.jpg", \
"No", "Description", "Wizard Images\\No.jpg"
Case "Yes"
SelectSubPackage "00 Example Subpackage" ;;;Action/No Action
Break
Case "No"
;No Plugin ;;Action/No Action
Break
EndSelect
Lets say that you want to check the users data folder for a specific plugin, to check if a patch (you might have created) should apply.
If DataFileExists("ExamplePlugin.esp")
Note "ExamplePlugin Detected." ;;;Action/No Action
SelectEspm "PatchPlugin.esp" ;;;Action/No Action
Else ; ExamplePlugin.esp wasn't detected
;No Plugin ;;;Action/No Action
EndIf
Useful for when you use features available only in recent versions of Wrye Bash but want to retain support for users with older versions.
If CompareWBVersion('292') >= 0
; User is running 292+
; Do some 292+ only stuff here, like...
EditINI('Oblivion.ini', 'Display', 'bAllowScreenShot', 1)
Else
; User is running < 292, so EditINI is unavailable.
Note "Don't forget to enable screenshots in Oblivion.ini"
EndIf
These:
EditINI('TargetINI.ini', 'set', 'ANVars.UseEW', 1)
EditINI('TargetINI.ini', 'setGS', 'fPCBaseMagickaMult', 1)
Would create Ini Tweaks:
set ANVars.UseEW to 1
setGS fPCBaseMagickaMult 1
This:
GetFilename("C:\Program Files\Bethesda Softworks\Oblivion\Oblivion.exe")
Would return "Oblivion.exe"
. This:
GetFilename("C:\Program Files\Bethesda Softworks\Oblivion")
Would return an empty string.
This:
GetFolder("Data\mine.esp")
Would return "Data"
. This:
GetFolder("mine.esp")
Would return an empty string.
This section compares the functions and keywords available in Wizards against those available in OBMM scripts.
OBMM Script | Wizards |
---|---|
If <function> [...]
IfNot <function> [...]
| If statement
If not statement
|
Else
EndIf
| Elif
Else
EndIf
|
If DialogYesNo <Message> [Title]
| SelectOne message, "Yes", yes_description, yes_image, "No", no_description, no_image
Case "Yes"
statements
Break
Case "NO"
statements
Break
EndSelect
|
If DataFileExists <FileName>
| If DataFileExists(filename)
|
If ScriptExtenderPresent
| If CompareSEVersion("0.0.0.0") == 1
|
If ScriptExtenderNewerThan <version>
| If CompareSEVersion(version) == 1
|
If GraphicsExtenderPresent
| If CompareGEVersion("0.0.0.0") == 1
|
If GraphicsExtenderNewerThan <version>
| If CompareGEVersion(version) == 1
|
If OblivionNewerThan <version>
| If CompareGameVersion(version) == 1
|
If Equal <arg1> <arg2>
If GreaterThan <arg1> <arg2>
If GreaterEqual <arg1> <arg2>
If fGreaterThan <arg1> <arg2>
If fGreaterEqual <arg1> <arg2>
| If statement == statement
If statement > statement
If statement >= statement
If statement > statement
If statement >= statement
|
Select <Title> <Option1> [Option2] [...]
SelectWithPreview <Title> <Option1> <ImagePath1> [Option2] [ImagePath2] [...]
SelectWithDescriptions <Title> <Option1> <Description1> [Option2] [Description2] [...]
SelectWithDescriptionsAndPreviews <Title> <Option1> <ImagePath1> <Description1> [Option2] [ImagePath2] [Description2] [...]
| SelectOne title, option1, description1, image1, option2, description2, image2 [...]
|
SelectMany <Title> <Option1> [Option2] [...]
SelectManyWithPreview <Title> <Option1> <ImagePath1> [Option2] [ImagePath2] [...]
SelectManyWithDescriptions <Title> <Option1> <Description1> [Option2] [Description2] [...]
SelectManyWithDescriptionsAndPreviews <Title> <Option1> <ImagePath1> <Description1> [Option2] [ImagePath2] [Description2] [...]
| SelectMany title, option1, description1, image1 [...]
|
Case <option>
Default
Break
EndSelect
| Case option
Default
Break
EndSelect
|
For Count <Variable> <Start> <End> [Step]
Continue
Exit
EndFor
| For variable from start to end by step
Continue
Break
EndFor
|
Return
| Return
|
DontInstallPlugin <Plugin>
InstallPlugin <Plugin>
| DeSelectEspm plugin
SelectEspm plugin
|
CopyPlugin <CopyFrom> <CopyTo>
| RenameEspm original_name new_name
|
EditINI <section> <key> <value>
| EditINI("Oblivion.ini", section, setting, value)
|
FatalError
| Cancel [message]
|
SetVar <Variable> <Value>
| variable = value
|
StringLength <Variable> <String>
| variable = len(string)
variable = string.len()
|
iSet <Variable> <expression>
fSet <Variable> <expression>
| variable = expression
|
ExecLines <lines>
| Exec(lines)
|
SubString <Variable> <String> <startfrom> [length]
| find(variable, string, start, stop)
variable.find(string, start, stop)
|
OBMM Script | Wizards |
---|---|
If VersionGreaterThan <version>
If VersionLessThan <version>
| Use CompareWBVersion to check the Wrye Bash version.
|
Message <Message> [Title]
DisplayImage <Image File Path> [Title]
DisplayText <Text File Path> [Title]
| Similar functionality can be reproduced using Note and SelectOne or SelectMany keywords.
|
ConflictWith <ModName> [Comment] [Level]
DependsOn <ModName> [Comment] [Level]
| Similar functionality can be reproduced using If DataFileExists(modname) .
|
DontInstallDataFile <FileName>
InstallDataFile <FileName>
DontInstallDataFolder <FolderName> [RecurseSubfolders]
InstallDataFolder <FolderName> [RecurseSubfolders]
CopyDataFile <CopyFrom> <CopyTo>
CopyDataFolder <CopyFrom> <CopyTo> [RecurseSubfolders]
| Similar functionality can be obtained by packaging the mod differently, and then using SelectSubPackage and DeSelectSubPackage .
|
For Each DataFolder <Variable> <FolderPath> [RecurseSubFolders] [SearchString]
For Each DataFile <Variable> <FolderPath> [RecurseSubFolders] [SearchString]
For Each PluginFolder <Variable> <FolderPath> [RecurseSubFolders] [SearchString]
For Each Plugin <Variable> <FolderPath> [RecurseSubFolders] [SearchString]
| Use:
For subpackage in SubPackages
and/or:
to iterate over files and folders in an installer. Then use:
and other string manipulation functions to test file names and folders. |
SelectVar <Variable>
SelectString <Variable>
Goto <label>
Label <label>
LoadBefore <Plugin1> <Plugin2>
LoadAfter <Plugin1> <Plugin2>
UncheckESP <plugin>
SetDeactivationWarning <plugin> <warning>
ConflictsWith <ModName> <MinMajorVersion> <MinMinorVersion><MaxMajorVersion> <MaxMinorVersion> [Comment] [Level]
ConflictsWithRegex <ModName> [Comment] [Level]
ConflictsWithRegex <ModName> <MinMajorVersion> <MinMinorVersion><MaxMajorVersion> <MaxMinorVersion> [Comment] [Level]
DependsOn <ModName> <MinMajorVersion> <MinMinorVersion><MaxMajorVersion> <MaxMinorVersion> [Comment] [Level]
DependsOnRegex <ModName> [Comment] [Level]
DependsOnRegex <ModName> <MinMajorVersion> <MinMinorVersion><MaxMajorVersion> <MaxMinorVersion> [Comment] [Level]
RegisterBSA <FileName>
UnregisterBSA <FileName>
EditShader <ShaderPackage> <ShaderName> <BinaryObjectPath>
SetGMST <file> <Editor ID> <new value>
SetGlobal <file> <Editor ID> <new value>
SetPluginByte <file> <offset> <new value>
SetPluginByte <file> <offset> <new value>
SetPluginShort <file> <offset> <new value>
SetPluginLong <file> <offset> <new value>
SetPluginFloat <file> <offset> <new value>
GetFolderName <Variable> <path>
GetFileName <Variable> <path>
GetFileNameWithoutExtension <Variable> <path>
CombinePaths <Variable> <path1> <path2>
RemoveString <Variable> <String> <startfrom> [length]
InputString <Variable> [Title] [Initial]
ReadINI <Variable> <section> <value>
ReadRenderInfo <Variable> <value>
EditXMLLine <file> <line number> <new line>
EditXMLReplace <file> <text to find> <text to replace>
CompareWBVersion(version)
GetEspmStatus(plugin)
str(value)
int(value)
float(value)
SelectAll
DeSelectAll
SelectAllEspms
DeSelectAllEspms
While expression
Continue
Break
EndWhile
RequireVersions oblivion, obse, obge, wrye_bash
OBMM Script | Wizards |
---|---|
PatchDataFile <NewFile> <FileToPatch> [Create]
PatchPlugin <NewFile> <FileToPatch> [Create]
| Unnecessary due to BAIN's conflict resolution abilities. |
AllowRunOnLines | Wizards support run-on lines as standard. |
Rulesets allow the expansion of Wrye Bash's Mod Checker to analyse active load orders based on additional rules. There can be any number of ruleset files, which must be plain text files located in [Game]\Data\Bash Patches
, with filenames ending in Rules.txt
, for Wrye Bash to recognise them.
Rulesets are processed in alphabetical order of their filenames. A ruleset's output is given in the following order:
Any text beginning with ##
will be ignored when the ruleset is processed, so can be used for making silent comments.
xxx ## [comment]
The header command can be used to define what text is displayed in the header of the ruleset's output.
>> HEADER [text]
## A bulleted list:
* [text]
* [text]
* [text]
The NOTES
command lets you output notes to the Mod Checker report. The possible formatting options are given in the formatting sub-section below. Notes can be multiline.
The ONLYONE
command is a simple rule that states that only one of the rules following it may be active at any one time.
>> ONLYONE
Cobl Races.esp
Cobl Races - Balanced.esp
The IF
command is used to specify that the NOTES
, CONFIG
, SUGGEST
and WARN
commands following it are conditional on the existence of the plugin(s) specified as part of the IF
command. The effect of an IF
command lasts until the next IF
command or the end of the file, whichever comes first.
If the IF
command lists more than one plugin, then the condition statement is a logical AND combination of all listed plugins. You can also specify logical OR and NOT combinations.
|
: This is the symbol for an OR combination of the previous plugin and the following plugin.
-
: This is the symbol for a NOT combination of the following plugin.
To specify that none of a set of plugins may exist, use a NOT for the first plugin of the set, then OR combine the it with the rest.
>> IF Alpha.esp
Beta.esp
| Gamma.esp
| Delta.esp
- Epsilon.esp
- Zeta.esp
| Eta.esp
Theta.esp
The above equates to Alpha AND (Beta or Gamma or Delta) AND NOT(Epsilon) AND NOT(Zeta or Eta) AND Theta.
The CONFIG
command lets you specify check the status of a plugin or plugins and output its/their status (active/inactive/merged) and a comment. It is intended as a way of reminding the user what plugins they have active.
>> CONFIG
o Plugin1.esp //[comment]
o Plugin2.esp //[comment]
The o
symbol denotes an Option
rule type.
The SUGGEST
command is intended as a way of providing non-critical suggestions. Its syntax is similar to that of the CONFIG
command, but it has different rule types available for usage. The rule types are:
x
: Inclusionrule type. The specified plugin must be active. If the plugin is not active, the Mod Checker will output a message.
-
: Exclusionrule type. The specified plugin must not be active. If the plugin is active, the Mod Checker will output a message.
+
: Merge Onlyrule type. The specified plugin must be merged but not active. If the plugin is active or inactive and not merged, the Mod Checker will output a message.
e
: Existencerule type. The specified file must exist. The file can be any file type, with the file path being given relative to the Data folder. If the file does not exist, the Mod Checker will output a message.
>> SUGGEST
x Plugin1.esp //[comment]
- Plugin2.esp //[comment]
+ Plugin3.esp //[comment]
e Plugin4.esp //[comment]
The WARN
command is intended as a way of providing critical suggestions. It shares the same rule types as the SUGGEST
command.
>> WARN
x Plugin1.esp //[comment]
- Plugin2.esp //[comment]
+ Plugin3.esp //[comment]
e Plugin4.esp //[comment]
The ASSUME
command inserts the assumption that the given plugin exists into any IF
statements following the command.
ASSUME
commands last until the next ASSUME
command or until the end of the file, whichever occurs first.
ASSUME
commands are not additive: each ASSUME
command completely replaces the previous one.
ASSUME
command, use an ASSUME
command with no mod listed for it.
ASSUME
command, like how is done for the IF
command.
>> ASSUME Master.esm
Plugin1.esp
Plugin2.esp
Non-silent comment lines have a few formatting options:
__[bold text]__
~~[italic text]~~
**[bold italic text]**
[[http://example.com|Link to example.com]]
The example ruleset below is a simple ruleset for Cobl.
>> HEADER This ruleset covers Cobl (Common Oblivion) and related mods.
>> ONLYONE
Cobl Races - Balanced.esp
bgBalancingEVCore.esp
>> IF Cobl Main.esm
>> CONFIG
o Cobl Glue.esp // Glues Cobl items into vanilla lists, cells
o Cobl Si.esp // Glues Cobl items into Shivering Isles cells.
o Cobl Tweaks.esp // Adds Cobl items to creatures and NPCs.
o Cobl Races.esp // Additional races, hairs, eyes.
o Cobl Races - Balanced.esp // Races and birthsigns given better balanced pros and cons.
o Salmo the Baker, Cobl.esp // Enhances Salmo the Baker in Skingrad.
o Cobl Filter Late.esp // Adds foods from various mods to the Dinner Plate. (Requires OBSE.)
>> SUGGEST
- Denock Arrows.esp // **Deactivate** and use Cobl Denock instead. (See Options menu.)
## HOMES
- AlchemistsCave.esp // Use [[http://planetelderscrolls.gamespy.com/View.php?view=OblivionMods.Detail&id=3996|Coblized version]] instead.
- Jagnot-SI-Bliss Aquaduct House.esp // Use [[http://ljosa.proboards57.com/index.cgi?board=releases&action=display&thread=548|Coblized version]] instead.
- PrincessImperialCityApartment.esp // Use [[http://planetelderscrolls.gamespy.com/View.php?view=OblivionMods.Detail&id=3997|Coblized version]] instead.
- PrisonersCampsite.esp // Use [[http://planetelderscrolls.gamespy.com/View.php?view=OblivionMods.Detail&id=4106|Coblized version]] instead.
- SkyShip.esp // Use [[http://ljosa.proboards57.com/index.cgi?board=releases&action=display&thread=548|Coblized version]] instead.
>> WARN
## Required
e meshes\Cobl\StaticApp\apparatusalembics.nif // __Missing meshes [StaticApp].__ Try reinstalling full Cobl package (including all textures/meshes).
## Obsolete components
- Cobl Glue MW Ingred.esp // **Deactivate.** Obsolete. (Merged into Cobl Glue.esp.)
## Superceded mods.
- Beer! for Oblivion.esp [1.2.3:]-- **Deactivate.** Included in Cobl Main.esm.
- DaggerfallBooks.esp // **Deactivate.** Included in Cobl Main.esm.
- FirstEditionGuidetotheEmpire.esp // **Deactivate.** Included in Cobl Main.esm.
- Ingredient Storage Shelves.esp // **Deactivate.** Included in Cobl Glue.esp
- MorrowindBooks.esp // **Deactivate.** Included in Cobl Main.esm.
- Salmo the Baker v2.0.esp // **Deactivate** Use Salmo the Baker, Cobl instead.
- Tamrielic_Ingredients.esm // **Deactivate.** Included in Cobl Main.esm.
- Tamrielic_Ingredients.esp // **Deactivate.** Included in Cobl Main.esm.
>> ASSUME Cobl Main.esm
>> IF Cobl Races.esp
>> WARN
e meshes\characters\saram\femalehair\type0\01.nif // __Missing meshes [Saram].__ Be sure that you have installed [[http://oblivion.nexusmods.com/mods/21104|Cobl Cosmetics Res 01]].
e meshes\clothes\asxivilai\xivilaicollar.nif // __Missing meshes [xivilai].__ Be sure that you have installed [[http://oblivion.nexusmods.com/mods/21104|Cobl Cosmetics Res 01]].
x DLCShiveringIsles.esp // **Activate** Required (meshes and textures).
>> IF Cobl Races - Balanced.esp
>> WARN
x Cobl Races.esp // **Activate.** Required.
>> IF Cobl Si.esp
>> WARN
x DLCShiveringIsles.esp // **Activate.** Required.
## Patch Mods ----------------------------------------------------------------
>> IF FF_REAL_Thirst.esp
>> SUGGEST
x FF_REAL_Thirst, Cob.esp // Patch FF Real Thirst to work with Cobl water wells.
Wrye Bash's PM Archive tab expects the PM archives it reads to be in a specific format. This section details the format and how to most easily convert PM archives to it.
Wrye Bash's PM archive format uses HTML formatting. The formatting can be broken down into a header, a set of PMs in a specific HTML formatting and a footer.
As well as the formatting of the file itself being important, so too is the filename, which must begin with the date that the archive was created, in the format YY.MM.DD
, eg. 07.11.06 archive.html
. PM archive files must be saved as .html
files, but can be created in any text editor.
The header:
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1" />
<title>Private Message Archive</title>
<style type="text/css">
html{
overflow-x: auto;
}
body{
background-color: #fff;
color: #000;
font-family: Verdana, Tahoma, Arial, sans-serif;
font-size: 11px;
margin:0px;
padding:0px;
text-align:center;
}
a:link, a:visited, a:active{
color: #000;
text-decoration: underline;
}
a:hover{
color: #465584;
text-decoration:underline;
}
img{
border: 0;
vertical-align: middle;
}
#ipbwrapper{
margin: 0 auto 0 auto;
text-align: left;
width: 95%;
}
.post1{
background-color: #F5F9FD;
}
.post2{
background-color: #EEF2F7;
}
/* Common elements */
.row1{
background-color: #F5F9FD;
}
.row1{
background-color: #DFE6EF;
}
.row3{
background-color: #EEF2F7;
}
.row2{
background-color: #E4EAF2;
}
/* tableborders gives the white column / row lines effect */
.plainborder{
background-color: #F5F9FD
border: 1px solid #345487;
}
.tableborder{
background-color: #FFF;
border: 1px solid #345487;
margin: 0;
padding: 0;
}
.tablefill{
background-color: #F5F9FD;
border: 1px solid #345487;
padding: 6px;
}
.tablepad{
background-color: #F5F9FD;
padding:6px;
}
.tablebasic{
border: 0;
margin: 0;
padding: 0;
width:100%;
}
.pformstrip{
background-color: #D1DCEB;
color: #3A4F6C;
font-weight: bold;
margin-top:1px
padding:7px;
}
#QUOTE{
background-color: #FAFCFE;
border: 1px solid #000;
color: #465584;
font-family: Verdana, Arial;
font-size: 11px;
padding: 2px;
}
#CODE{
background-color: #FAFCFE;
border: 1px solid #000;
color: #465584;
font-family: Courier, Courier New, Verdana, Arial;
font-size: 11px;
padding: 2px;
}
/* Main table top (dark blue gradient by default) */
.maintitle{
background-color: #D1DCEB;
background-image: url(http://www.bethsoft.com/bgsforums/style_images/bgsdark/tile_back.gif);
color: #FFF;
font-weight: bold;
padding:8px 0px 8px 5px;
vertical-align:middle;
}
.maintitle a:link, .maintitle a:visited, .maintitle a:active{
color: #fff;
text-decoration: none;
}
.maintitle a:hover{
text-decoration: underline;
}
/* Topic View elements */
.signature{
color: #339;
font-size: 10px;
line-height:150%;
}
.postdetails{
font-size: 10px;
}
.postcolor{
font-size: 12px;
line-height: 160%;
}
</style>
</head>
<body>
<div id="ipbwrapper">
The footer:
</div>
</body>
</html>
The PM formatting:
<div class="borderwrapm">
<div class="maintitle">PM: Re:Next Cobl Update</div>
<div class="tablefill"><div class="postcolor"><!--quoteo--><div class='quotetop'>QUOTE</div><div class='quotemain'><!--quotec--><!--quoteo--><div class='quotetop'>QUOTE</div><div class='quotemain'><!--quotec--><!--quoteo--><div class='quotetop'>QUOTE</div><div class='quotemain'><!--quotec-->Haama,<br /><br />I'd like to include OBSE sorter in next Cobl release...Wrye</div></div>
<div class="formsubtitle">Sent by <b>Wrye</b> on Jan 10 2008, 05:34 PM</div>
</div>
<br />
The easiest way to convert PMs is to create a new file for the converted PMs, open up the existing PM file in a text editor with regular expression search/replace functionality (eg. Notepad++) and follow these instructions:
"([^"]*)","([^"]*)","([^"]*)","([\s\S]*?)"\n
(copy/paste it in to be sure).
<div class="borderwrapm">\n\t<div class="maintitle">PM: $1</div>\n\t<div class="tablefill"><div class="postcolor"><!--quoteo--><div class='quotetop'>QUOTE</div><div class='quotemain'><!--quotec-->$4</div></div>\n\t<div class="formsubtitle">Sent by <b>$3</b> on $2</div>\n</div>\n<br />
(copy/paste it in to be sure).