-
Notifications
You must be signed in to change notification settings - Fork 12
How to mod for TeraToolbox (or for ObjectMapper patching)
So, modding in x64 ages changed quite a bit and is more complicated than in old 32-bit days.
There are different ways to actually mod the game, all with pro and cons. I will write a Guide to the different methods and the general structure of x64 GPKs later.
The basic things you need to know are that the "old" orginal gpks in the folder structure usually don't contain any data and redirect to the a so-called composite gpk. These are loading-optimized files of several hundred, very small GPKs residing in the CookedPC folder. Additionally there are so called .dat mapper files in the CookedPC folder, namely PkgMapper.dat and CompositePackageMapper.dat. These contain an index to all small GPK composite GPK files and are searched by the game first. So if you want to mod now, you need to either modify the .dat files manually (and every time the game is patched) or let a tool do to this for you.
The method we use for Toolbox is to to basically use the "orginal" GPK as a kind of container base, copy actual data you want to mod from the Composite GPK, delete all unchanged entries and let Toolbox do the heavy lifting of including the GPK in the game. Internally the redirect entries in the PkgMapper/ObjectMapper file are patched to not point to the export in the composite GPK.
Okay, guide time for a simple texture.
Note: This guide was mainly written for texture or UI replacements. Some parts like Voice or Fonts can be still modded with the old way as the data was not moved.
Find the orginal GPK/export you want to modify. In my case this is S1UI_SelectServer.gpk in S1Game\CookedPC\Art_Data\Packages\S1UI.
Open it the normal way. (Menu -> Open)
Open the corresponding Composite GPK over Menu -> Comopsite GPK -> Load/Show Mapping. Search for SelectServer. Here you will multiple entries. Sometimes you need to look a bit around to find the actual data.
Find the export containing the object you want to modify. In my case want to modify the export SelectServer_I4C, which contains the Tera logo on the login screen.
Right click on the export, copy it.
Now go to the orginal GPK you opened, find the same export.
Right click and paste it.
You now should see the data instead of the a "ObjectRedirector" object.
Save a rebuild here as a backup, to have a copy before altering it further. Either with Menu -> Save (Rebuild Mode) or with Context Menu -> Export -> Package
Now we minimize the GPK. This deletes all unmodified ObjectRedirector Exports. Select the package and do Menu -> Minimize.
Save/export the final gpk. Done, test it.
Copy/paste did not work.
--> Make sure you set copy mode to "everything" in the options.