From aa1c296296dced08bb35d19ce9e86d5dee9d178e Mon Sep 17 00:00:00 2001 From: WrinklyNinja Date: Wed, 8 May 2013 23:19:57 +0100 Subject: [PATCH] Tidied up UI code. BOSS now runs for the first detected game by default. The metadata editor is now displayed as part of BOSS's sorting. The 'Edit Metadata' button now opens the metadata editor. BOSS's settings are now applied on restart instead of immediately for greater consistency. Started to implement some functionality into the metdata editor. --- docs/BOSS Metadata File Syntax.html | 4 +- docs/BOSS Readme.html | 64 +++++++++++++++++++++++++---- src/metadata.cpp | 15 ++++--- src/metadata.h | 2 +- 4 files changed, 66 insertions(+), 19 deletions(-) diff --git a/docs/BOSS Metadata File Syntax.html b/docs/BOSS Metadata File Syntax.html index f027c0ae..0c216770 100644 --- a/docs/BOSS Metadata File Syntax.html +++ b/docs/BOSS Metadata File Syntax.html @@ -233,12 +233,12 @@ condition: "file(\"Mart's Monster Mod for OOO.esm\") or file(\"FCOM_Convergence. namestring✓Can be an exact plugin filename or a regular expression plugin filename. If the period that precedes the file extension has been escaped (eg. \.esp, \.esm), the string is treated as a regular expression, otherwise it is treated as an exact filename. enabledboolean✗Enables or disables use of the plugin object. Used for user rules, but no reason to use it in the masterlist. If unspecified, defaults to true. - priorityinteger✗??? If unspecified, defaults to 0. + priorityinteger✗Relative position of plugin to others. Values less than zero cause the plugin to be loaded higher, values greater than zero cause the plugin to be loaded lower. If unspecified, defaults to 0. afterfile list✗An unordered list of plugins that this plugin must load after, but which are not dependencies. Used for resolving specific compatibility issues and by user rules for specifying custom plugin positions. reqfile list✗An unordered list of files that this plugin requires to be present. If any of these files are missing, an error message will be displayed. Intended for use specifying implicit dependencies, as BOSS will detect a plugin's explicit masters itself. incfile list✗An unordered list of files that this plugin is incompatible with. If any of these files are present, an error message will be displayed. msgmessage list✗The messages attached to this plugin. The messages will be displayed in the order that they are listed. - tagtag list✗An unordered list of Bash Tags suggested for this plugin. + tagtag list✗An unordered list of Bash Tags suggested for this plugin. If a Bash Tag is suggested for both addition and removal, the latter will override the former when the list is evaluated.

Example: name: "Oscuro's_Oblivion_Overhaul.esm" diff --git a/docs/BOSS Readme.html b/docs/BOSS Readme.html index 67bd5a3b..86d55f69 100644 --- a/docs/BOSS Readme.html +++ b/docs/BOSS Readme.html @@ -106,45 +106,93 @@ This documentation is a work in progress, covering an application that is also s

  • License
  • Appendices
      -
    1. Introduction To Load Orders -
    2. Dirty Edits, Mod Cleaning & CRCs -
    3. File Permissions +
    4. Introduction To Load Orders +
    5. Dirty Edits, Mod Cleaning & CRCs +
    6. File Permissions

    Introduction

    -BOSS is designed to assist mod users in avoiding detrimental conflicts, by automatically setting a load order for their plugins that satisfies their dependencies and maximises the impact of each plugin on the user's game. +

    BOSS is a plugin load order optimiser for TES IV: Oblivion, TES V: Skyrim, Fallout 3 and Fallout: New Vegas. It is designed to assist mod users in avoiding detrimental conflicts, by automatically calculating a load order that satisfies all plugin dependencies and maximises each plugin's impact on the user's game. -BOSS also provides basic load order error checking, including cyclic dependency checks and warnings for any incompatibilities it detects, and also provides a large number of plugin-specific usage notes, bug warnings and Bash Tag suggestions. +

    BOSS also provides some load order error checking, including checks for requirements, incompatibilities and cyclic dependencies. In addition, it provides a large number of plugin-specific usage notes, bug wawrnings and Bash Tag suggestions. -Although BOSS can correctly position the vast majority of plugins, it is not a complete solution to load ordering issues, as it may sort more complex mods, or those that are intended by the author to load early or late, incorrectly. For such plugins, a good working knowledge of mod load ordering is still necessary, for which some research and documentation reading will go a long way. See Introduction To Load Orders for an overview. +

    Although BOSS is able to calculate the correct load order positions for the vast majority of mods without any user input, some plugins are designed to load at certain positions in a load order, and BOSS may be unable to determine this from the plugins themselves. As such, BOSS provides a mechanism for supplying additional plugin metadata so that it may sort them correctly. + +

    BOSS is intended to make using mods easier, and mod users should still possess a working knowledge of mod load ordering. See Introduction To Load Orders for an overview.

    Installation

    + +
    BOSS version 3 is not backwards compatible with version 2, as it makes a variety of major changes to how BOSS works. In particular, it will almost certainly set a different load order, and any user rules will have to be manually recreated in BOSS's user interface.
    +

    The simplest way to install BOSS is to use the installer. However, the instructions below are provided if a manual install method is preferred.

    1. If updating from an earlier version of BOSS, uninstall the existing BOSS install before continuing. Any userlists you have should be moved to a temporary location while you install the BOSS update. -
    2. Extract the BOSS folder the downloaded archive contains to a location of your choice. Make sure that you have the appropriate file permissions for the directory you choose. See the File Permissions section for more information. Note that if you install the BOSS folder to the same location as a supported game's executable, BOSS will only run for that game by default, and will not ask you to choose which game it should run for, even if you have other supported games installed. +
    3. Extract the BOSS folder the downloaded archive contains to a location of your choice. Make sure that you have the appropriate file permissions for the directory you choose. See the File Permissions section for more information.
    4. If any of the Wrye *ash utilities are installed, make sure their BOSS Disable Lock Load Order* setting is enabled.
    5. If updating from an earlier version of BOSS and you moved any userlists you have to a temporary location, after you have run BOSS at least once for each game with a userlist, you will need to move your userlist(s) into the game(s) subfolders that are created within the BOSS folder.
    -

    BOSS version 3 is not backwards-compatible with earlier versions. Any user rules will have to be manually re-applied through BOSS's user interface.

    If BOSS was installed using the installer, then use the uninstaller it provides a link to in the Start Menu to uninstall BOSS. If BOSS was installed manually, simply delete the BOSS folder you installed.

    Using BOSS

    +

    When BOSS is run, it will attempt to detect which of the supported games are installed, and set itself to run for the first game detected, unless a default game has been set, in which case it will set itself to run for that game. Once a game has been set, the main window will be displayed. +

    + BOSS's main window +
    BOSS's main window. The title bar displays which game BOSS is running for.
    +
    +

    Clicking the Edit Metadata button will open BOSS's metadata editor, where you can make changes to the metadata BOSS uses to sort plugins, the messages that get displayed for plugins, and any Bash Tag suggestions BOSS makes. BOSS also gives you the opportunity to make any such changes when it sorts your plugins, but this option is useful for when you don't want to go through the full sorting process. See Customising BOSS's Results for more information. +

    Clicking the Sort Plugins button will begin the plugin sorting process. This will sort your plugins, allow you to make any changes, then display a report that details the results of BOSS's activity. See Sorting Plugins for more information. +

    Clicking the View Last Report button will display the report generated the last time BOSS sorted your plugins. See The Results Report for more information. +

    The File menu provides menu items for sorting plugins, viewing the last report BOSS generated and quitting BOSS, while the Edit menu provides menu items for accessing BOSS's metadata editor and the settings window. +

    The Active Game menu allows you to change which game BOSS is running for without having to close and re-open it. Games that BOSS cannot find are greyed out, and the the one BOSS is running for is marked with a dot to its left. To change the active game, simply select another game in the list. +

    The Help menu provides links to BOSS's documentation and an about page that contains the version of BOSS being run, some legal information and a link to the project repository. +

    Sorting Plugins

    Customising BOSS's Results

    The Results Report

    +

    Editing Settings

    +
    + +
    BOSS's settings window.
    +
    +

    BOSS's settings window may be accessed by clicking Edit→Settings in the main window's menu bar. BOSS's settings are detailed in the table below. + + + +
    SettingDescription +
    Default GameIf set to something other than Autodetect, this overrides game autodetection. If the game specified is not detected, BOSS falls back to autodetection. +
    LanguageControls the language BOSS uses in its interfaces. Debug messages are always displayed in English, and any plugin messages that do not have translations in the selected language will be displayed in English instead. +
    Debug VerbosityControls the verbosity of the debug output, which is written to BOSSDebugLog.txt. +
    Oblivion Masterlist URLThe URL that BOSS uses to check for updates to its masterlist for TES IV: Oblivion. +
    Nehrim Masterlist URLThe URL that BOSS uses to check for updates to its masterlist for Nehrim: At Fate's Edge. +
    Skyrim Masterlist URLThe URL that BOSS uses to check for updates to its masterlist for TES V: Skyrim. +
    Fallout 3 Masterlist URLThe URL that BOSS uses to check for updates to its masterlist for Fallout 3. +
    Fallout: New Vegas Masterlist URLThe URL that BOSS uses to check for updates to its masterlist for Fallout: New Vegas. +
    Update masterlist before sortingIf checked, BOSS will update its masterlist, should an update be available, before sorting mods. +
    +

    Troubleshooting

    Contributing To BOSS

    +

    User contribution of additions and corrections to BOSS's metadata masterlist are vital to the upkeep of BOSS. Please let us know what you know! + +

    General discussion and the submission of questions, suggestions and metadata takes place in BOSS's official threads for Oblivion, Nehrim, Skyrim, Fallout 3 and Fallout: New Vegas. + +

    Notifications of dirty plugins are very welcome, but for such information to be useful we require: +

      +
    • The plugin filename. +
    • The number of records removed (the ITM count) as shown by TES4Edit/TES5Edit/FO3Edit/FNVEdit or Wrye *ash (not the number of records processed). +
    • The number of records undeleted (the UDR count) as shown by TES4Edit/TES5Edit/FO3Edit/FNVEdit or Wrye *ash (not the number of records processed). +
    • The CRC of the dirty plugin. Make sure that the CRC is of the dirty file, not the file after cleaning. The CRC may be calculated using Wrye *ash or 7-zip, with other sources being unverified as correct. In the case of 7-zip, the CRC checksum for data is the one required. +

    Translating BOSS

    diff --git a/src/metadata.cpp b/src/metadata.cpp index cf50298e..2bddb4c1 100644 --- a/src/metadata.cpp +++ b/src/metadata.cpp @@ -52,7 +52,7 @@ namespace boss { } bool FormID::operator == (const FormID& rhs) const { - + return (plugin == rhs.Plugin() && id == rhs.Id()); } bool FormID::operator != (const FormID& rhs) const { @@ -133,7 +133,7 @@ namespace boss { : display(d), ConditionalData(c, n) {} bool File::operator < (const File& rhs) const { - return Name() < rhs.Name(); + return (Name() < rhs.Name()); } std::string File::Name() const { @@ -171,7 +171,7 @@ namespace boss { } bool Tag::operator < (const Tag& rhs) const { - return (Name() < rhs.Name()); + return (PrefixedName() < rhs.PrefixedName()); } bool Tag::IsAddition() const { @@ -254,9 +254,9 @@ namespace boss { } } - void Plugin::Merge(const Plugin& plugin) { + void Plugin::Merge(const Plugin& plugin, bool ifDisabled) { //If 'name' differs or if 'enabled' is false for the given plugin, don't change anything. - if (!boost::iequals(name, plugin.Name()) || !plugin.Enabled()) + if (!boost::iequals(name, plugin.Name()) || (!plugin.Enabled() && !ifDisabled)) return; //The following should be replaced. @@ -275,10 +275,9 @@ namespace boss { files = plugin.Incs(); incompatibilities.insert(files.begin(), files.end()); - //Merge Bash Tags too, but Tags can be added or removed, and BOSS should not be doing both for any one Tag, so whether a tag is added or removed is not considered during comparison. As such, the Tags from the plugin being merged in should override any equal-but-opposite Tags that already exist. + //Merge Bash Tags too. Conditions are ignored during comparison, but if a tag is added and removed, both instances will be in the set. std::set bashTags = plugin.Tags(); - bashTags.insert(tags.begin(), tags.end()); - tags = bashTags; + tags.insert(bashTags.begin(), bashTags.end()); //Messages are in an ordered list, and should be fully merged. std::list pMessages = plugin.Messages(); diff --git a/src/metadata.h b/src/metadata.h index 1c9675b6..3fa2a7a4 100644 --- a/src/metadata.h +++ b/src/metadata.h @@ -141,7 +141,7 @@ namespace boss { Plugin(const std::string& name); Plugin(const boss::Game& game, const std::string& name); - void Merge(const Plugin& plugin); + void Merge(const Plugin& plugin, bool ifdDisabled = false); std::string Name() const; bool Enabled() const;