06. Data Pak Editing - NellsRelo/OMD3-uSDK GitHub Wiki
Data Editing
Note: .pak
editing explicitly doesn't require use of the uSDK. You could, with enough patience, recreate an entire Datatable .uasset
(such as those in Content/Data
), and make changes within the uSDK, however.
The Basics
Asset Editor (and a similar application, UAsset-GUI - this will assume you're using Asset Editor though) makes it fairly simple to make edits to ingame data - Traps, Enemies, Upgrades, Weapons, Scramble Modifiers, you name it, you can probably edit it. Note that you’ll want to make sure the Unreal Engine version in Asset-Editor(dropdown in the top-right of the window) is set to 4.25
. By default this is blank, so you’ll need to set it.
General Structure
While a deep dive into the “Where” and “Why” would be a fairly lengthy section, a general sense of where things are may help you get started. 99% of the time, you’ll be wanting to go into OMD/Content/
to start with. If we assume this as our base folder, Data/
contains the most commonly edited files - these files are essentially the internal database the game relies on - Mapping enemies, weapons, maps, abilities, and more.
Traps/
, Trinkets/
, and Weapons/
cover specific attributes of their respective items. In a few cases, some items won’t have their required information in these folders - for whatever reason, they can be found in the Proto/
folder, under their respective subdirectory.
Finally, Game/
contains a lot of the base gameplay data, and can be a good place to dig around in once you’ve gotten comfortable.
What is a GUID?
GUID stands for Globally Unique Identifier. They are 128-bit integers, and have an incredibly low chance of colliding. Every object has a GUID, and you will regularly find yourself needing to reference them. If you are adding content, you should also generate GUIDs. The most time consuming part of a mod can be documenting all the GUIDs you need to reference or work with.
A map of the known GUIDs is incomplete.
Editing upgrades
Note: Community Library is woefully out of date_ There is work underway on a community library of upgrade data. It’s recommended to submit upgrades you’ll be using in your mod to the library, to preserve compatibility between mods that utilize upgrades. Once added to the library, you can reference the GUID of the upgrade data in the library from your own separate mod.
Eventually, it may be possible to use a Blueprint Mod to add new upgrades and other data on-the-fly, eliminating incompatibility altogether.
Importing and Exporting “Subs”
In Asset-Editor, you may have noticed an option in the Edit menu, Import Subs
and Export Subs
. These are especially useful when adding new data types, but can be tricky to work with. As you can’t remove data, you should always be mindful of how you’re importing.
To Export
To export an object, you’ll need to expand the Code Blocks -> DataTable
entries. From there, you may select anything within DataTable
, and go to Edit -> Export Subs
. This will export the object as a .xml
file. You can make edits to it, and then import the changed file. Note that you won’t be able to overwrite existing objects via Export->Import
, you can only add new entries. You may also do this for entries within a data object, for example, in AICharacterProtos.uasset
, Ogre->Strengths->OMDDamageVulnerability
.
To Import
Importing is simple, but there are some caveats to it. In Asset Editor, always remember to select the entry that you want to import your file into. Typically this will be DataTable
, but adding Upgrades to Traps in TrapProtos
will require you to import with the Upgrades entry in a Trap object selected. To import, go to Edit->Import Subs
.
Additionally, Asset Editor doesn’t like renaming Property Names. Property Names will be at the bottom of the exported file. I would recommend editing the name prior to importing.
Packing your Changes
With Asset-Editor, you’ll want to package your mod using its inbuilt functions. We’ve already taken a look at folder structure earlier, you may have noticed that the Mod’s source folder should contain an OMD\Content\
directory, and that the files you’re modding should follow a similar structure to how they appear in the extracted folder structure, or in the folder structure within the uSDK. When packing, you’ll want to go to Functions -> Package Folder
, and then select the OMD/
folder of your mod. Press Select Folder
, and then hit OK
on the confirmation pop-up. You should now have a file titled 500-ModName_P.pak
. Rename it to match your desired mod name, and move it into your game’s Mods/
folder.