Skip to content

Package Editor Basics

Mgamerz edited this page Dec 15, 2023 · 4 revisions

This page serves as a basic guide to Package Editor, which is the main general purpose tool for modding in Legendary Explorer. Package Editor can open game package files (ending with .pcc, .sfm, .u, and .upk) from Mass Effect, Mass Effect 2, and Mass Effect 3, and their Legendary Edition counterparts.

Main Window

Package files in Mass Effect games (and Unreal Engine 3 games) have 3 main entries in them: Names, Imports, and Exports. Each category of item is defined in their own metadata table, however the indexing system for Imports and Exports is shared, as these are both a type of 'entry' in the file.

  • Imports start at -1 and decrement for every new entry (-1, -2, -3 ...)
  • Exports start at 1 and increment for every new entry (1, 2, 3...)
  • The 0 indexed item is used for NULL

Legendary Explorer has individual views for all three of these items, as well as a combined view for the logical hierarchy of package files, called Tree View.

Names

Names account for nearly every string in a file (though there are exceptions to this) - from object names, property names and values, and other things. You can find the list of names that are in the package's Name Table in the Names view.

Names view

You can right click a name to perform operations on the name, or the name table itself.

Name table right click

Imports

Imports are references to Exports that are loaded from another file. You cannot specify which file they will come from, as the game will simply reference the one in memory. Imports almost always point to higher 'tier' files (such as the master BioD or level BioP, or the startup files such as SFXGame or Engine). If an import is not in memory and it is referenced, the value will be treated as null, which can cause various problems.

You can view imports in the Imports tab.

Imports tab

Note that Unreal Engine will remove unreferenced objects from memory. If you change a reference in a BioP file for example, the reference to the original items may be lost. An example of this would be changing what weapon an enemy has - the original weapon may become unreferenced. If a subfile uses an import on this lost reference, or an object that was referenced by this (such as a VFX that was only in the file because of that weapon), it may no longer reside in memory. You can force a reference in the binary of TheWorld by adding it to ExtraReferencedObjects. For non-level packages you must add it to ObjectReferencer.

Imports resolve based on their in-memory path as well as their Class and PackageFile matching. In-memory path will change depending on the ForcedExport flag being set (or not set) on the export they are trying to find, or its parents. PackageFile is what package contains the class definition of the object's class. For example, a Texture2D import (let's say HMM_HGR_Helmet01) will have a package file of Engine - because Texture2D, the object it is trying to find's class, is defined in the Engine package file.

Exports

Exports define the actual data stored in the file and are what you will spend a majority of your time editing. Exports are singular objects that are logically sorted by their link to their parent object. You can view exports in the Export view.

Exports View

When you click on an export, many tabs will appear on the right side pane. These will allow you to edit different features of that export, including properties (if the object has any), the metadata for the export (which is part of the export metadata table and contains things like object name, export data size, etc), as well as object specific editors, such as textures, audio, and binary (post-properties data).

Tree View

Tree View is the combined Imports + Exports view that organizes objects by their links (which define an entry's parent). You will spend the majority of your time in Package Editor in Tree View, as this view is where most of the development of the toolset has been done. Tree view

Tree View supports dragging and dropping between Package Editor Tree View - so if you want to copy and object from one package to another, you can drag it from one tree view to one in another Package Editor instance.

Items highlighted in yellow are items that have been modified but have not yet been saved.

Clone this wiki locally