Modifying 2DA tables via a DLC mod (ME1 LE1) (original) (raw)

Introduction
STEP 1. Creating a DLC mod including a 2DA package file
STEP 2. Implementing our 2DA modifications
STEP 3: Informing the game that it has to load our file

Introduction

In the first game of the trilogy, a lot of information is stored in the 2DA tables that can be found towards the bottom of the Engine.u (ME1) or Engine.pcc (LE1) file.

Figuring out the organisation of the data in those tables might require a little bit of digging and poking around, as it is not always trivial. But we'll assume here that the reader knows exactly what they want to modify.

There are 3 options for making a mod that modifies values in 2DA tables:

  1. Directly editing the values in the 2DA tables in Engine.pcc. This is the easiest way, and it can sometimes be useful for preliminary tests of feasibility, but it is absolutely not a good option for distributing a mod. I would even recommend to avoid this for personal use mods, and to steer away from this as quickly as possible during development. It is indeed very unpractical to install-uninstall.

Caution

(Legendary Edition only) ME3Tweaks Mod Manager will automatically reset 2DA tables that shipped in the original game as part of its Bio2DA Merge feature. Turn this setting off in Mod Manager during prototyping if you decided to use this method.

  1. The games have a system to incorporate updates of the 2DA tables (row replacements or additions) via DLC files. Shipping updates to tables as DLC is more preferable both in terms of compatibility (it allows different mods to alter the same 2DA table) and user-friendliness (the mod can be installed / uninstalled / temporarily disabled like any DLC mod).

Warning

(Legendary Edition only) This feature is not fully implemented in LE1 due to changes made in the PS3 port of Mass Effect 1 (2011), which leads to inconsistent results. Use the Bio2DA merge feature in ME3Tweaks Mod Manager instead.

  1. For Legendary Edition, shipping 2DA updates via ME3Tweaks Mod Manager's Bio2DA Merge feature is the preferred method, as it provides flexibility to both the developer and the user and works properly. The files this method use are the same as #2 in this list, but they are referenced differently by the mod.

In this tutorial we will detail and illustrate the process of modifying a 2DA table via a DLC mod, by creating a very simple mod that tells the player where Earth is, and where it isn't. This will hopefully make taking Earth back slightly easier when push will come to shove. In practice, the main steps consist in 1) Creating a DLC mod that includes the necessary 2DA package file, 2) Implementing our modifications in the 2DA table, and 3) Properly informing the game that we wish our new 2DA package file to be taken into account. We will also briefly address the situation where a merge mod may be necessary.

STEP 1. Creating a DLC mod including a 2DA package file

We start by creating a new DLC Starter Kit using Mod Manager, which has recently been upgraded with the option to add 2DA packages. So we simply need to check the boxes corresponding to the 2DA tables that we want to modify. Here we only want to modify GalaxyMap_PlotPlanet, which defines the trackers on the galaxy map.

Once the DLC mod has been created, we can go look inside the CookedPCConsole folder, and we'll find a file named BIOG_2DA_MOD_TUTO_EARTH_GalaxyMap_X.pcc. Note that the 2DA tables are divided into groups, with the GalaxyMap group containing the table we want to edit PlotPlanet, but also others like Cluster or Planet. If we had selected more than one table from the same group, they would end up in the same file BIOG_2DA_MOD_TUTO_EARTH_GalaxyMap_X.pcc. If we had also selected 2DA tables from another group (e.g. Equipment), a separate file would have been created.

If we open BIOG_2DA_MOD_TUTO_EARTH_GalaxyMap_X.pcc with Package Editor, we'll see that it contains 2 exports:

  1. The empty 2DA table. Importantly, the name is somewhat different than that of the corresponding table in Engine.pcc:
  1. The ObjectReferencer (LE1 only), which should have in its properties an array named ReferencedObjects that contains a reference to the ObjectReferencer itself, and to each of the 2DA tables exports. Check that it is indeed the case, and if not you can add/remove/modify the items in the ReferencedObjects array.

Alternative: create manually the 2DA package file

Using Mod Manager's feature to create the 2DA package files along with the DLC Starter Pack is the easiest way to do this. But it is also possible to do it manually.

STEP 2. Implementing our 2DA modifications

We can start from the vanilla 2DA table in Engine.pcc, and export it to excel using the relevant button in the top right corner:

In Excel, we make the modifications we want. Here we have made some modifications to the row corresponding to Noveria (id=23), and added a new row (id=9001). I won't go into what the different columns and numbers correspond to, since this tutorial is about turning 2DA modifications into a DLC mod, assuming the author knows what to do in the 2DA table.

Once this is done, we go back to our 2DA DLC package, and we import the Excel file into the 2DA table.

The important points are:

The last point can become difficult once several mods start modifying the same tables. This is why I very highly recommend to keep a list of the indexes of modified rows, and new rows, for each modified table, and put it somewhere it can easily be accessed by other mod authors. I did this here for my ME1 mods. Maybe a database will be set up at some point in the future.

STEP 3: Informing the game that it has to load our file.

Using Bio2DA Merge (Legendary Edition)

See the Bio2DA Merge documentation. The package file created above can be used and will be referenced by the mod's .m3da file. Creating a mod with Starter Kit in Mod Manager and selecting 2DAs will automatically create blank 2DA packages and set them up for use by the mod in the generated .m3da files.

Using Autoload (Original Trilogy)

The file Autoload.ini in our mod directory should contain instructions for the game to properly load the 2DA package files in our DLC mod. The DLC Starter Kit feature of Mod Manager should have automatically done this if you've used the option to add all your 2DA tables when creating the DLC mod. In case you want to see how it looks, or have created your package files manually, you can open Autoload.ini with any plain text editor.

For our example mod, it should simply include the line 2DA1=BIOG_2DA_MOD_TUTO_EARTH_GalaxyMap_X:

Conclusion

Now we can install our DLC mod with mod manager, and we go check out the Galaxy Map, which is full of new exciting and extremely useful information.