Skip to content

Commit dbaf636

Browse files
committed
Squashed version of inf-records-refactoring
commit c19ad63 Author: Infernio <infernio@icloud.com> Date: Mon Dec 30 17:22:10 2019 +0100 Refactor records that changed between SSE and SLE Instead of having two slightly different record definitions, have one definition in the skyrim file and define the different subrecords via unions with a 'GameDecider'. Gets rid of a lot of duplicate code that's been irking me. commit eb56b1b Author: Infernio <infernio@icloud.com> Date: Mon Dec 16 01:44:17 2019 +0100 FO3/FNV: Merge LVL* implementation back into brec Had to add a new class variable to accomplish this, which should probably be updated for Skyrim/FO4 as well. This also brings all fixes and improvements (e.g. the 255+ items fix) that have landed in brec's implementation to FO3 and FNV. Needed for the patchers refactoring, in which we unify the ListsMerger and FidListsMerger classes. commit 02a1144 Author: Infernio <infernio@icloud.com> Date: Sat Nov 30 19:20:11 2019 +0100 Drop some pointless cruft Drop MelBase.debug Bad name, very pointless (since it dumps out so much output that the log becomes useless), and worst of all, it slows down loading of everything, even in release builds (since the if check and subsequent branch won't be optimized out - this is CPython). Drop MelRefrXmrk REFR is in no shape to be loaded, and this isn't the way to handle that anyways - a distributor is. Drops a few more print calls, which is nice. Drop all prints in brec Use deprints instead, should improve load/dump errors a bit. commit 44b62dc Author: Infernio <infernio@icloud.com> Date: Thu Nov 28 00:44:27 2019 +0100 brec.MelArray Drops brec.MelStructs and brec.MelStructA by replacing all usages with MelGroups(MelStruct) and MelArray(MelStruct), respectively. Actually an increase in line count. It does have other advantages, however: - It is now possible to use other classes besides the plain MelStruct with MelArray. For example, MelOptStruct, or any of the primitive wrappers. - Making MelArray usages explicit and forcing an indent via code style guidelines makes it really easy to see which subrecords are lists/arrays. - You no longer have to learn a 'completely new class', MelStructA, just a different way of loading a class you already know, MelStruct. commit d03e524 Author: Infernio <infernio@icloud.com> Date: Wed Nov 27 17:31:21 2019 +0100 brec.MelFull Same idea as with brec.MelEdid. Note that this will make PBash slightly slower for Oblivion, FO3 and FNV, since those will now use MelLString, which will have to check self.hasStrings to determine that it doesn't have to worry about strings. Probably not worth worrying about, but feel free to benchmark. commit 277d7b7 Author: Infernio <infernio@icloud.com> Date: Wed Nov 27 17:18:59 2019 +0100 brec.MelEdid Slightly increases line count, but the benefit here is that we move the definition of editor IDs into a single place - so all the usual benefits of using a constant instead of repeating its value everywhere. commit 34cb87e Author: Infernio <infernio@icloud.com> Date: Wed Nov 27 16:51:14 2019 +0100 brec.MelIcons and related classes Were sitting unused in Skyrim's record definitions. Less about the code reduction, more about all the other benefits (e.g. typo protection, IDE suggestions, etc.). commit 6b146ab Author: Infernio <infernio@icloud.com> Date: Wed Nov 27 01:23:12 2019 +0100 FO3, FNV: Finish some struct definitions Were marked as '#--Should be a struct. Maybe later.', so I finished them. Note that one of them *shouldn't* be a struct, it's 304 bytes of unused junk. FO3: Drop unused MelPnamNam0Handler Was duplicating MelStructA unnecessarily. Copy-pasted from FNV, but FNV only needs it to handle records that use FO3's older format, so it's obviously pointless in FO3. brec.MelReadOnly Puts to rest the MelSounSndx nonsense by standardizing it. Also expands SNDD/SNDX handling to incorporate ANAM/GNAM/HNAM, mirroring what xEdit does. commit 7b5b54d Author: Infernio <infernio@icloud.com> Date: Fri Nov 22 01:58:31 2019 +0100 brec.MelTruncatedStruct The big one. Tons of duplicate classes have died sudden, brutish deaths. Replace MelPackLT with MelUnion Also allows MelTruncatedStruct to handle the upgrading part of this monstrosity. Move MelCoordinates to brec Deduplicates the CELL definitions a bit - unnecessarily complex for Oblivion, but saves 3 lines, so... Minor SSE MATO/STAT updates Added proper defaults and changed names to sync with xEdit. Drop unknownX from SCRL/SPEL flags Too lazy to make a new commit for this :P commit 2a38aee Author: Infernio <infernio@icloud.com> Date: Sat Nov 9 00:31:58 2019 +0100 More random record fixes FO3, FNV: Fix MelModel dumping invalid flags MOD2 and MOD4 subrecords have no MODD/MOSD equivalent. Additionally, 'WEAP/Scope Model' does not have a MOSD subrecord either. This was causing xEdit to spit out errors when loading the BP: [00:04] Background Loader: Error: record ARMO contains unexpected (or out of order) subrecord MO2D 44324F4D [00:04] Background Loader: Error: record ARMO contains unexpected (or out of order) subrecord MO4D 44344F4D [00:04] Background Loader: Errors were found in: HelmetNVNCRTrooperMP "MP Trooper Helmet" [ARMO:0010BEE9] [00:02] Background Loader: Error: record WEAP contains unexpected (or out of order) subrecord MOSD 44534F4D [00:02] Background Loader: Errors were found in: WeapLaserRifle "Laser Rifle" [WEAP:00004336] FO3, FNV: Make model facegen flags optional Were previously MelBase, but should clearly be optional, otherwise we make a ton of unneeded record edits. FO3: Fix CLAS/ATTR definition MelStructA makes no sense here, this is just a fixed-length subrecord, MelStruct is perfectly acceptable. Drop MelTuple Only four usages, and not one of them needed it. Also updated those unkowns to be in line with xEdit, since they're actually decoded there. TES4: Support fids in MISC We were merging this already :/ Thankfully, these seem to be rare to non-existent, so probably wasn't a huge problem. commit 30a2ab7 Author: Infernio <infernio@icloud.com> Date: Fri Nov 8 05:23:39 2019 +0100 Refactor embedded scripts Moved some common code to brec (MelScriptVars), but most of the savings are possible due to the new brec.MelSequential. Use MelSequential for MelKeywords Allows us to expose the keywords list directly at the top level - a bit more intuitive to use than when it's hiding behind a MelObject. commit 3b9fcec Author: Infernio <infernio@icloud.com> Date: Fri Nov 8 04:02:27 2019 +0100 Move bass.null{1,2,3,4} to brec Only used in records code, so makes much more sense there. Also allows some bass imports to be dropped. commit d605647 Author: Infernio <infernio@icloud.com> Date: Sun Oct 20 14:45:35 2019 +0200 Move MelBounds to brec Applies it to FO3 and FNV as well for a significant reduction in code duplication. Also wraps the struct inside a group, which is a prerequisite for inf-461-patchers, in which we devise a new patcher to handle object bounds. commit c626e1c Author: Infernio <infernio@icloud.com> Date: Sat Nov 2 17:34:29 2019 +0100 Improve ModSizeError usage Now shows all sizes that the load method could possibly accept. Was also able to drop the exact_size parameter as a result. Also eliminates all 'raise "Some string here"' usages by standardizing them to use ModSizeError/ModError instead. commit 907e078 Author: Infernio <infernio@icloud.com> Date: Thu Oct 24 00:18:08 2019 +0200 Drop MelFull0 One of the reasons for starting this branch was to exterminate this ugly hack with extreme prejudice. It's only needed for 5 types in Oblivion, but has to be checked for *every* subrecord for every record type in all games. Yuck. _MelDistributor was the final nail in the coffin that allowed this to be dropped. commit 685229e Author: Infernio <infernio@icloud.com> Date: Thu Oct 10 19:13:00 2019 +0200 brec._MelDistributor Our solution to duplicate subrecord signatures. *Very* powerful, was built with Skyrim's RACE record type in mind. Will write a wiki page shortly (for this and all the other tools I built on this branch). Refactor with _MelDistributor Pleasant side effect is that we drop the DataDict imports in each of the records files. TES4: Semi-rewrite MreRace implementation Would have been painful to make this work with MelDistributor otherwise. FO3, FNV: Semi-rewrite MreRace implementation Also dropped the FNV override, since it's actually identical - both our definitions, as well as the xEdit ones. commit 1c8c5f6 Author: lojack5 <lojo.jacob@gmail.com> Date: Sat Oct 26 20:23:52 2019 +0200 TES5: Rewrite VMAD This is a revived and finished version of the (very) old lojack-vmad branch. Revived this because our PERK implementation is broken without it (whoops). It's also another significant leap towards patching/merging/ESL-checking every record type. Almost completely rewritten to update it for changes, PEP8 it, heavily reduce code duplication, (hopefully) make refactoring and moving it to brec eventually possible (for FO4 and future games), etc. Co-authored-by: Infernio <infernio@icloud.com> commit 5c683ee Author: Infernio <infernio@icloud.com> Date: Thu Oct 24 05:22:18 2019 +0200 brec.MelCounter, brec.MelPartialCounter Attacking the problem of updating a counter element from the other direction! Instead of creating more and more MelCounted* classes, why not make some classes that update the counter instead? MelCounter is straight-forward, just updates a single-value struct. MelPartialCounter targets structs that contain more than just a counter. Threw in some docstring noops. Refactor with MelCounter and MelPartialCounter Have I mentioned how fun deleting giant ugly piles of duplicate code is? brec didn't even increase in size much, since I was able to drop both MelCounted* classes. Also implemented counting for all counters that xEdit supports that we didn't update yet. Refactor MelItems and MelItemsCounter Was used in only one place, let's use it to replace some more duplicate code. commit 214ee60 Author: Infernio <infernio@icloud.com> Date: Thu Oct 24 00:28:32 2019 +0200 Primitive type wrappers in brec This is more about limiting the use of MelStruct in favor of more specialized and therefore less error-prone (e.g. due to a much more contrained __init__ method) classes. Refactor with the new primitives Since this commit is completely boring and no one will slog through it, I threw in some formatting changes (newlines, docstrings, etc.) and some MelModel improvements. commit 8074fc2 Author: Infernio <infernio@icloud.com> Date: Wed Oct 23 07:10:03 2019 +0200 Random record fixes Just random ones I stumbled across while looking through. TES5: Drop unused classes, drop MelDecalData argument FO3: PERK fixup FO3: Some minor records fixes FNV: Fix MreDial import Fixup for ed3e24b, pycharm did not like that class inheritance (might not have worked either? not sure). MelStructA: Don't dump empty arrays Uncomment SNDD - unused, but may be present. 0xcd -> \xcd commit 70bf97e Author: Infernio <infernio@icloud.com> Date: Wed Oct 23 19:01:09 2019 +0200 Drop special group handling for REGN and BPDT xEdit doesn't do this, so let's stop doing it too - might very well break everything, so needs testing. Edited to restore the behavior for FO3/FNV, testing shows it's needed there. commit 3f55c26 Author: Infernio <infernio@icloud.com> Date: Thu Oct 24 02:48:37 2019 +0200 Drop brec.MelXpci Was unused in anything but Oblivion and can be replaced by two MelNulls in Oblivion (technically, MreRefr will now need a distributor, but we obviously can't merge it yet, so that's not a problem). commit 1395f0f Author: Infernio <infernio@icloud.com> Date: Wed Oct 23 19:35:40 2019 +0200 Drop unneeded comments in game/*/records.py Many are redundant (e.g. the flags ones, we have the names right below them) or unneeded (e.g. the 'Verified for 305' ones). Also dropped the wbEnum ones, since we don't really care and if you really want to know, you can always look at the xEdit definitions. There were also a bunch of terrible docstrings in there: def __init__(self, *whatever): """Initialize""" I'd rather have no docstring than that - linters would complain about a missing one, but not about this one, even though it contains absolutely no useful information. Makes scrolling through and editing these files much less painful, especially on my laptop where pycharm no longer chokes quite as hard. commit b51e8d2 Author: Infernio <infernio@icloud.com> Date: Tue Oct 22 18:22:50 2019 +0200 brec.MelUnion A union resolves to one of several possible elements, based on a decider. Heavily inspired by xEdit's definitions, I completed this now because it will be very useful for Morrowind (and also put to rest tons of copy-pasted Mel* classes in the game-specific record definitions). Refactor with MelUnion Applying it everywhere - also includes a refactoring to allow MelGroups to contain pretty much everything under the sun, which allowed a few more custom classes to be absorbed here and will *really* come in handy for Skyrim's RACE definition. Furthermore, I also moved the refactored MelRegnEntrySubrecord to brec, since FO3, FNV and Skyrim all use it. Note: None of these should change behavior. However, I am *not* certain that the BPTD stuff was correct before. xEdit seems to have no special treatment of BPTN/BPNN, whereas it does have have special treatment for SCRO/SCRV and ALST/ALLS.
1 parent ea131b3 commit dbaf636

42 files changed

Lines changed: 11360 additions & 10794 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

Mopy/Docs/Wrye Bash Advanced Readme.html

Lines changed: 2283 additions & 413 deletions
Large diffs are not rendered by default.

Mopy/Docs/Wrye Bash General Readme.html

Lines changed: 17 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -694,31 +694,36 @@ <h3 id="patch-importing">Importing From Plugins <a class="back2top" href="#conte
694694
<table>
695695
<thead><tr><th>Section<th>Description<th>When You Should Use It
696696
<tbody>
697-
<tr><td>Import Actors<td><em>Oblivion only.</em> Preserves changes made to actors (ie. NPCs and creatures) by the mods selected.<td>Always, unless you are told otherwise by a mod's readme.
698-
<tr><td id="patchImportActorsAIPackages">Import Actors: AIPackages<td><em>Oblivion only.</em> Merges the changes made to actor AI packages by all the mods selected.<td>Always, unless you are told otherwise by a mod's readme.
699-
<tr><td>Import Actors: Animations<td><em>Oblivion only.</em> Merges the changes made to actor animations by all the mods selected.<td>Always, unless you are told otherwise by a mod's readme.
700-
<tr><td>Import Actors: Death Items<td><em>Oblivion only.</em> Preserves the changes made to the items added to an actor when it dies by the mods selected.<td>Always, unless you are told otherwise by a mod's readme.
701-
<tr><td id="patchImportActorsSpells">Import Actors: Spells<td><em>Oblivion only.</em> Preserves the changes made to the spells actors have by the mods selected.<td>Always, unless you are told otherwise by a mod's readme.
697+
<tr><td>Import Actors</td><td><em>All but Fallout 4.</em> Preserves changes made to actors (ie. NPCs and creatures) by the mods selected.</td><td>Always, unless you are told otherwise by a mod's readme.</td></tr>
698+
<tr><td id="patchImportActorsAIPackages">Import Actors: AI Packages</td><td><em>All but Fallout 4.</em> Merges the changes made to actor AI packages by all the mods selected.</td><td>Always, unless you are told otherwise by a mod's readme.</td></tr>
699+
<tr><td>Import Actors: Animations</td><td><em>Oblivion, Fallout 3 and Fallout&colon; New Vegas only.</em> Merges the changes made to actor animations by all the mods selected.</td><td>Always, unless you are told otherwise by a mod's readme.</td></tr>
700+
<tr><td>Import Actors: Death Items</td><td><em>All but Fallout 4.</em> Preserves the changes made to the items added to an actor when it dies by the mods selected.</td><td>Always, unless you are told otherwise by a mod's readme.</td></tr>
701+
<tr><td id="patchImportActorsSpells">Import Actors: Spells</td><td><em>All but Fallout 4.</em> Preserves the changes made to the spells actors have by the mods selected.</td><td>Always, unless you are told otherwise by a mod's readme.</td></tr>
702702
<tr><td id="patchImportCells">Import Cells<td><em>All but Fallout 4.</em> Preserves the changes made by the mods selected to cell settings such as lighting, climate, music, name, owner, water and more.<td>Always, unless you are told otherwise by a mod's readme.
703+
<tr><td>Import Destructible</td><td><em>All but Oblivion and Fallout 4.</em> Preserves the changes made to the ability to destroy certain parts of the environment.</td><td>Always, unless you are told otherwise by a mod's readme.</td></tr>
703704
<tr><td>Import Factions<td><em>Oblivion, Fallout 3 and Fallout&colon; New Vegas only.</em> Preserves the changes made to the factions an actor belongs to by the mods selected.<td>Always, unless you are told otherwise by a mod's readme.
704705
<tr><td id="patchImportGraphics">Import Graphics<td><em>All but Fallout 4.</em> Preserves the changes made by the mods selected to various textures and models throughout the game.<td>The decision is entirely based on user preference. Choose whichever mods' graphics you prefer.
705706
<tr><td id="patchImportInventory">Import Inventory<td><em>All but Fallout 4.</em> Merges the changes made to the items in an actor's inventory by all the mods selected.<td>Always, unless you are told otherwise by a mod's readme.
706-
<tr><td id="patchImportNPCFaces">Import NPC Faces<td><em>Oblivion only.</em> Preserves the changes made to NPC faces by the mods selected.<td>The decision is entirely based on user preference. Choose whichever mods' NPC faces you prefer.
707+
<tr><td>Import Keywords</td><td><em>Skyrim and Skyrim&colon; Special Edition only.</em> Preserves the changes made to the keywords attached to various things throughout the game by the mods selected.</td><td>Always, unless you are told otherwise by a mod's readme.</td></tr>
708+
<tr><td id="patchImportNPCFaces">Import NPC Faces</td><td><em>Oblivion, Fallout 3 &amp; Fallout&colon; New Vegas only.</em> Preserves the changes made to NPC faces by the mods selected.</td><td>The decision is entirely based on user preference. Choose whichever mods' NPC faces you prefer.</td>
707709
<tr><td id="patchImportNames">Import Names<td><em>All but Fallout 4.</em> Preserves the changes made to various names throughout the game by the mods selected.<td>The decision is entirely based on user preference. Choose whichever mods' names you prefer.
710+
<tr><td>Import Object Bounds</td><td><em>All but Oblivion.</em> Preserves the changes made by the mods selected to the bounds of many types of objects throughout the world.</td><td>Always, unless you are told otherwise by a mod's readme.</td></tr>
708711
<tr><td id="patchImportRelations">Import Relations<td><em>Oblivion only.</em> Preserves the changes made by the mods selected to how factions interact.<td>Always, unless you are told otherwise by a mod's readme.
709712
<tr><td>Import Roads<td><em>Oblivion only.</em> Preserves the changes made by the mods selected to the landscape's roads.<td>Always, unless you are told otherwise by a mod's readme.
710-
<tr><td>Import Scripts<td><em>Oblivion only.</em> Preserves the changes made by the mods selected to the scripts attached to things in the game.<td>Always, unless you are told otherwise by a mod's readme.
713+
<tr><td>Import Scripts<td><em>Oblivion, Fallout 3 and Fallout&colon; New Vegas only.</em> Preserves the changes made by the mods selected to the scripts attached to things in the game.<td>Always, unless you are told otherwise by a mod's readme.
711714
<tr><td id="patchImportSounds">Import Sounds<td><em>All but Fallout 4.</em> Preserves the changes made by the mods selected to various sounds in the game.<td>The decision is entirely based on user preference. Choose whichever mods' sounds you prefer.
712-
<tr><td id="patchImportSpellStats">Import Spell Stats<td><em>Oblivion only.</em> Preserves the changes made by the mods selected to items in order to fix bugs or rebalance them.<td>Always, unless you are told otherwise by a mod's readme. There is an element of user preference, for instance if you are using several mods that overhaul spell stats. In such cases, choose whichever mods' stats you prefer.
713-
<tr><td>Import Stats<td><em>All but Fallout 4.</em> Preserves the changes made by the mods selected to spells in order to fix bugs or rebalance them.<td>Always, unless you are told otherwise by a mod's readme. There is an element of user preference, for instance if you are using several mods that overhaul item stats. In such cases, choose whichever mods' stats you prefer.
715+
<tr><td id="patchImportSpellStats">Import Spell Stats</td><td><em>All but Fallout 4.</em> Preserves the changes made by the mods selected to spells / actor effects in order to fix bugs or rebalance them.</td><td>Always, unless you are told otherwise by a mod's readme. There is an element of user preference, for instance if you are using several mods that overhaul spell stats. In such cases, choose whichever mods' stats you prefer.</td></tr>
716+
<tr><td>Import Stats<td><em>All but Fallout 4.</em> Preserves the changes made by the mods selected to items in order to fix bugs or rebalance them.<td>Always, unless you are told otherwise by a mod's readme. There is an element of user preference, for instance if you are using several mods that overhaul item stats. In such cases, choose whichever mods' stats you prefer.
717+
<tr><td>Import Text</td><td><em>All but Fallout 4.</em> Preserves the changes made by the mods selected to various types of long-form text (e.g. text in a book, descriptions of armor, spells, weapons, etc.).</td><td>Always, unless you are told otherwise by a mod's readme. There is an element of user preference, for instance if you are using several mods that change book texts. In such cases, choose whichever mods' text you prefer.</td></tr>
718+
<tr><td>Import Weapon Modifications</td><td><em>Fallout&colon; New Vegas only.</em> Merges the changes made by the mods selected to weapon modifications.</td><td>Always, unless you are told otherwise by a mod's readme.</td></tr>
714719
</table>
715720

716721
<h3 id="patch-tweaking">Applying Tweaks <a class="back2top" href="#contents">Back to top</a></h3>
717722
<p>The Bashed Patch lets you independently tweak a large number of game settings. Each tweak has a description that is visible when you select it. Some tweaks have several possible values, with the current value given in [square brackets] in the tweak name. Right-clicking these tweaks will display a menu from which you can selected a different value. The tweaks are catagorised into different sections.
718723
<table>
719724
<thead><tr><th>Section<th>Description<th>When You Should Use It
720725
<tbody>
721-
<tr><td id="patchTweakActors">Tweak Actors<td><em>Oblivion only.</em> Allows you to change a number of the game's settings relating to actors (ie. NPCs).<td>The decision is entirely based on user preference.
726+
<tr><td id="patchTweakActors">Tweak Actors</td><td><em>All but Fallout 4.</em> Allows you to change a number of the game's settings relating to actors (i.e. NPCs).</td><td>The decision is entirely based on user preference.</td></tr>
722727
<tr><td id="patchTweakAssorted">Tweak Assorted<td><em>Oblivion only.</em> Contains a set of miscellaneous tweaks to the game.<td>The <strong>Bow Reach Fix</strong> and <strong>Nvidia Fog Fix</strong> are recommended for all users, as they fix bugs that may be uncovered by mods. The <strong>DarNified Books</strong> option is recommended for users of DarNified UI. Other than those, the decision is entirely based on user preference.
723728
<tr><td id="patchTweakClothes">Tweak Clothes<td><em>Oblivion only.</em> Contains a set of tweaks that changes settings relating to the game's clothing.<td>The decision is entirely based on user preference.
724729
<tr><td id="patchTweakNames">Tweak Names<td><em>Oblivion only.</em> Contains a set of tweaks that changes the names of things in the game. Most change the names to change how they are sorted in your inventory.<td>The decision is entirely based on user preference.
@@ -734,7 +739,7 @@ <h3 id="patch-other">Other Bashed Patch Options <a class="back2top" href="#conte
734739
<tr><td id="patchReplaceFormIDs">Replace Form IDs<td><em>Oblivion only.</em> Replaces a set of formIDs with another set of formIDs defined by a .csv file.<td>If you use a mod that tells you to use it.
735740
<tr><td id="patchCoblCatalogs">Cobl Catalogs<td><em>Oblivion only.</em> Updates Cobl's ingredient and effect catalogs to take into account those added by mods you use.<td>If you use Cobl (a.k.a. Common Oblivion).
736741
<tr><td>Cobl Exhaustion<td><em>Oblivion only.</em> Updates greater powers added by the mods that are listed in the selected .csv file options so that they're compatible with Cobl's Exhaustion feature.<td>If you use Cobl's Exhaustion feature.
737-
<tr><td>Contents Checker<td><em>Oblivion only.</em> Checks that leveled lists and inventories contain the correct types of entries, and removes any incorrect entries.<td>Always.
742+
<tr><td>Contents Checker</td><td><em>All but Fallout 4.</em> Checks that leveled lists, outfits, recipes and inventories contain the correct types of entries, and removes any incorrect entries.</td><td>Always.</td></tr>
738743
<tr><td id="patchLeveledLists">Leveled Lists<td>Merges changes made to leveled lists by mods to increase compatibility between them.<td>Always. If you don't have any mods that alter leveled lists, the option won't do anything, in which case it doesn't hurt to have it enabled.
739744
<tr><td id="patchMorphFactions">Morph Factions<td><em>Oblivion only.</em> Updates factions so that they are more likely to work with Wrye Morph.<td>If you use Cobl and Wrye Morph.
740745
<tr><td id="patchRaceRecords">Race Records<td><em>Oblivion only.</em> Some mods make changes to races and want those changes to be preserved even if another mod changes the same race. This ensures that those changes are kept. It also checks for and fixes various errors such as googly eyes and missing hair or eyes. It also has a section of race tweaks which the user can select as desired.<td>Always, even if there are no mods listed on the right.
@@ -1366,7 +1371,7 @@ <h3>Homage Credits <a class="back2top" href="#contents">Back to top</a></h3>
13661371
<li><img alt="Woodman's Icon" src="../bash/images/bash_32_2.png"><span><a href="https://www.nexusmods.com/oblivion/mods/1840">Chase Camera</a> (<a href="https://www.nexusmods.com/users/85866">Woodman</a>)</span></li>
13671372
<li><img alt="Tom Supergan's Icon" src="../bash/images/people/tomsavi32.png"><span>Chase Camera Distance (<a href="https://www.nexusmods.com/users/77237">Tom Supergan</a>)</span></li>
13681373
<li><img alt="Compass Disable Icon" src="../bash/images/bash_32_2.png"><span>Compass Disable (??)</span></li>
1369-
<li><img alt="Compass POI Recognition Icon" src="../bash/images/bash_32_2.png"><span>Compass POI Recognition (??)</span></li>
1374+
<li><img alt="Compass Recognition Distance Icon" src="../bash/images/bash_32_2.png"><span>Compass Recognition Distance (??)</span></li>
13701375
<li><img alt="Ravida's Icon" src="../bash/images/bash_32_2.png"><span>Fatigue from Running/Encumbrance (Ravida)</span></li>
13711376
<li><img alt="Horse Turning Speed Icon" src="../bash/images/bash_32_2.png"><span>Horse Turning Speed (Acleacius, dbolivar)</span></li>
13721377
<li><img alt="David Moyer's Icon" src="../bash/images/bash_32_2.png"><span>PC Death Camera (David Moyer)</span></li>

Mopy/bash/balt.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2472,8 +2472,15 @@ def AppendToMenu(self, menu, window, selection):
24722472
menu = submenu
24732473
for link in self.extraItems:
24742474
link.AppendToMenu(menu, window, selection)
2475+
# After every 30 added items, add a break in the menu to avoid having
2476+
# to use the annoying wx scrolling feature (mostly affects the Bash
2477+
# Tags menu, since there are so many tags)
2478+
i = 1
24752479
for link in (self.choiceLinkType(_text=txt) for txt in self._choices):
2480+
if i % 30 == 0:
2481+
menu.Break()
24762482
link.AppendToMenu(menu, window, selection)
2483+
i += 1
24772484
# returns None
24782485

24792486
class TransLink(Link):

Mopy/bash/basher/gui_patchers.py

Lines changed: 26 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -993,9 +993,6 @@ class NpcFacePatcher(importers.NpcFacePatcher, _ImporterPatcherPanel): pass
993993
class CBash_NpcFacePatcher(importers.CBash_NpcFacePatcher,
994994
_ImporterPatcherPanel): pass
995995

996-
class RoadImporter(importers.RoadImporter, _ImporterPatcherPanel): pass
997-
class CBash_RoadImporter(importers.CBash_RoadImporter, _ImporterPatcherPanel): pass
998-
999996
class SoundPatcher(importers.SoundPatcher, _ImporterPatcherPanel): pass
1000997
class CBash_SoundPatcher(importers.CBash_SoundPatcher, _ImporterPatcherPanel): pass
1001998

@@ -1014,6 +1011,12 @@ class DestructiblePatcher(importers.DestructiblePatcher, _ImporterPatcherPanel):
10141011

10151012
class WeaponModsPatcher(importers.WeaponModsPatcher, _ImporterPatcherPanel): pass
10161013

1014+
class KeywordsImporter(importers.KeywordsImporter, _ImporterPatcherPanel): pass
1015+
1016+
class TextImporter(importers.TextImporter, _ImporterPatcherPanel): pass
1017+
1018+
class ObjectBoundsImporter(importers.ObjectBoundsImporter, _ImporterPatcherPanel): pass
1019+
10171020
# Patchers 30 -----------------------------------------------------------------
10181021
class AssortedTweaker(multitweak_assorted.AssortedTweaker,
10191022
_TweakPatcherPanel): default_isEnabled = True
@@ -1074,15 +1077,26 @@ class CBash_ContentsChecker(special.CBash_ContentsChecker, _PatcherPanel):
10741077
# scope
10751078
from importlib import import_module
10761079
gamePatcher = import_module('.patcher', ##: move in bush.py !
1077-
package=bush.game_mod.__name__)
1078-
for patcher_name, typeInfo in gamePatcher.gameSpecificPatchers.items():
1079-
globals()[patcher_name] = type(patcher_name, (typeInfo.clazz, _PatcherPanel), {})
1080-
if typeInfo.twinPatcher:
1081-
otherPatcherDict[patcher_name] = typeInfo.twinPatcher
1082-
for patcher_name, typeInfo in gamePatcher.gameSpecificListPatchers.items():
1083-
globals()[patcher_name] = type(patcher_name, (typeInfo.clazz, _ListPatcherPanel), {})
1084-
if typeInfo.twinPatcher:
1085-
otherPatcherDict[patcher_name] = typeInfo.twinPatcher
1080+
package=bush.game_mod.__name__)
1081+
# Patchers with no options
1082+
for patcher_name, p_info in gamePatcher.gameSpecificPatchers.items():
1083+
globals()[patcher_name] = type(
1084+
patcher_name, (p_info.clazz, _PatcherPanel), {})
1085+
if p_info.twinPatcher:
1086+
otherPatcherDict[patcher_name] = p_info.twinPatcher
1087+
# Simple list patchers
1088+
for patcher_name, p_info in gamePatcher.gameSpecificListPatchers.items():
1089+
globals()[patcher_name] = type(
1090+
patcher_name, (p_info.clazz, _ListPatcherPanel), {})
1091+
if p_info.twinPatcher:
1092+
otherPatcherDict[patcher_name] = p_info.twinPatcher
1093+
# Import patchers
1094+
for patcher_name, p_info in \
1095+
gamePatcher.game_specific_import_patchers.items():
1096+
globals()[patcher_name] = type(
1097+
patcher_name, (p_info.clazz, _ImporterPatcherPanel), {})
1098+
if p_info.twinPatcher:
1099+
otherPatcherDict[patcher_name] = p_info.twinPatcher
10861100

10871101
del import_module
10881102

Mopy/bash/basher/mod_links.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1563,17 +1563,18 @@ def Execute(self):
15631563
masterFile.load(True)
15641564
mapper = masterFile.getLongMapper()
15651565
for record in masterFile.SCPT.getActiveRecords():
1566-
id_text[mapper(record.fid)] = record.scriptText
1566+
id_text[mapper(record.fid)] = record.script_source
15671567
mapper = modFile.getLongMapper()
15681568
newRecords = []
15691569
for record in modFile.SCPT.records:
15701570
fid = mapper(record.fid)
15711571
#--Special handling for genericLoreScript
15721572
if (fid in id_text and record.fid == 0x00025811 and
1573-
record.compiledSize == 4 and record.lastIndex == 0):
1573+
record.compiled_size == 4 and record.last_index == 0):
15741574
removed.append(record.eid)
15751575
badGenericLore = True
1576-
elif fid in id_text and id_text[fid] == record.scriptText:
1576+
elif fid in id_text and id_text[fid] == \
1577+
record.script_source:
15771578
removed.append(record.eid)
15781579
else:
15791580
newRecords.append(record)

Mopy/bash/bass.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -32,12 +32,6 @@
3232
active_locale = None
3333
AppVersion = u"307" # must represent a valid float
3434

35-
#--Null strings (for default empty byte arrays)
36-
null1 = '\x00'
37-
null2 = null1*2
38-
null3 = null1*3
39-
null4 = null1*4
40-
4135
#--Global dictionaries - do _not_ reassign !
4236
# Bash's directories - values are absolute Paths - populated in initDirs()
4337
dirs = {}

Mopy/bash/bosh/faces.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,13 @@
2222
#
2323
# =============================================================================
2424
import re
25-
from .. import bass, bush, bolt
25+
from .. import bush, bolt
2626
from ..bolt import Flags, encode, sio, Path, struct_pack, struct_unpack
2727
from ..exception import SaveFileError, StateError
2828
from . import SaveInfo
2929
from ._saves import SreNPC, SaveFile
3030
from ..parsers import LoadFactory, ModFile, MasterMap
31-
from ..brec import getModIndex, MreRecord, genFid, RecordHeader
31+
from ..brec import getModIndex, MreRecord, genFid, RecordHeader, null2
3232

3333
class PCFaces(object):
3434
"""Package: Objects and functions for working with face data."""
@@ -46,7 +46,7 @@ def __init__(self):
4646
self.eid = self.pcName = u'generic'
4747
self.fggs_p = self.fgts_p = '\x00'*4*50
4848
self.fgga_p = '\x00'*4*30
49-
self.unused2 = bass.null2
49+
self.unused2 = null2
5050
self.health = self.unused3 = self.baseSpell = self.fatigue = self.level = 0
5151
self.skills = self.attributes = self.iclass = None
5252
self.factions = []

0 commit comments

Comments
 (0)