Skip to content

0.30-prerelease001

Pre-release
Pre-release
Compare
Choose a tag to compare
@Noggog Noggog released this 21 May 04:00
· 2002 commits to pre-release since this release

Namespace Revamp
Mutagen is growing and adding more functionality every day. The single namespace of Mutagen.Bethesda was getting a bit cramped.
Almost every class has been migrated to a more organized namespace. Some new ones include:

  • Mutagen.Bethesda.Plugins
    Things related to esp/esm/esls, such as FormKey, ModKey, FormLinks, etc
  • Mutagen.Bethesda.Plugin.Records
    Things related to the autogenerated records, such as MajorRecord, IMod, IGroup, etc
  • Mutagen.Bethesda.Plugin.Order
    LoadOrder, ModListing, etc
  • Mutagen.Bethesda.Plugin.Cache
    LinkCache, ModContext, and implementations
  • Mutagen.Bethesda.Plugin.Aspects
    Aspect interfaces like INamed, IKeyworded, etc
  • Mutagen.Bethesda.Plugin.Allocators
    Persistence concepts like IFormKeyAllocator and implementations
  • Mutagen.Bethesda.Plugin.Binary
    Tooling specific to binary parsing of plugins. Custom streams, decompression and alignment processors, Header structs
  • Mutagen.Bethesda.Plugin.Exceptions
    Exception classes related to Plugins like RecordException
  • Mutagen.Bethesda.Plugin.Meta
    GameConstant helper registries
  • Mutagen.Bethesda.Plugin.Utility
    Miscellenious and sparingly used tooling

And now also:

  • Mutagen.Bethesda.Strings
    Strings files code, TranslatedString, etc
  • Mutagen.Bethesda.Archives
    BSA/BA2 parsing
  • Mutagen.Bethesda.WPF
    WPF controls and related tooling
  • Mutagen.Bethesda.Ini
    Code related to Ini parsing
  • Mutagen.Bethesda.Pex
    Pex related classes

Once you upgrade, you will get a lot of compiler errors complaining about types not being found. This is just because the new namespaces need to be added to your file. The easiest way to do this is hover over the type it cannot find, and Ctrl - . (In Visual Studio), which should bring up fix suggestions, which should include importing the correct namespace. Rinse and repeat.
On a side note: The new Synthesis exe will automatically add these namespaces to patchers, so there should be minimal breaks, barring other issues.

Archives

  • IArchive.GetBytes, GetSpan, GetMemorySlice
  • IArchive.AsStream call, replacing the CopyDataTo API (removed)
  • Fix for BSAs listed in the ini but not found on the LO going at the start of the BSA "load order"
  • Archive.GetApplicableArchivePaths more accurate

Load Order

  • LoadOrderListing/ModListing naming unification. The two terms were competing. LoadOrderListing removed, and renamed to be ModListing
  • ModListing interfaces and API filled out a bit more
  • .ghost support. Any file suffix that is not expected is treated as a ghost plugin
  • ILoadOrder(Getter) interface defined and filled out

Magic Effects

  • IBindableEquipment Link Interface for Magic Effects
  • MagicEffect.Archetype was returning unexpected null when no DATA subrecord was present
  • "Association" fields API made more consistent with common patterns. These are the strongly typed FormLinks for the various archetypes (MagicEffectLightArchetype has a FormLink)

Mutagen.Bethesda.WPF

Other Changes

  • FormLinkInformation struct moved to be internal. IFormLinkGetter is the preferred type to use in its place
  • ToString on MajorRecords now print something sensible
  • List fields on generated records now have init setter, which means you can more easily set their default values when creating a new record:
var faction = new Faction()
{
    // Can now set the list here
    Relations = new ExtendedList<Relation>()
    {
        new Relation()
        // ...
    }
}
  • LinkCaches in identifier only mode should throw if full records queried for
  • Cells with two landscapes no longer throw exceptions. 2nd Landscape just replaces the first.
  • CSharpExt (a parent library) had its FilePath/DirectoryPath structs revamped. These are also used more in the Mutagen library instead of string to help convey intent
  • A lot more documentation written and organized, and more to come.
  • Lots of internal refactoring of how binary parsing code was generated, to help facilitate reuse for future projects like Pex/Nif/others

Other Fixes

  • MajorRecord enumerations when using IMajorRecordCommonGetter were not iterating some deep records
  • Relaxed Ini parsing, so it gets upset about small issues less
  • MasterReferenceReader Stream constructor not passing ModKey, causing downstream problems