64 bit modding. How does it work? - VenoMKO/RealEditor GitHub Wiki

Patch 97 introduced us BHS concept of package compositing. With UDKs async loader, this gives a good performance boost but makes modding much harder.

A small diagram that shows how 32-bit and 64-bit Tera works: Don't worry if you don't understand the 64-bit part. RE and TMM do all the heavy lifting for you. Diagram

Click to enlarge

So what exactly did they do?

I bet you have seen 200+Mb files in the CookedPC folder. BHS developers collected all objects with there dependencies and put them in individual packages and glued those together. Offsets and package names were saved to the encrypted mapper file CompositePackageMapper.dat. Composites have many duplicate objects to make loads faster, but this makes it harder for us to find the item we need to mod. Mapping from old-style packages to composites is done via PkgMapper.dat. The CH folder now contains simple handles that can be used to find source objects inside the composite Hell.

How can we do mods now?

RE allows you to extract composite packages and save them as separate files. You can mod these files and patch CompositePackageMapper.dat the way that Tera will load your modded packages instead of originals.

This solution gives you the freedom of naming mod GPKs the way you like, and as a bonus, you will always have unmodded package backups. The only modded file would be CompositePackageMapper.dat. So if something goes wrong, you can restore that small file, and your client is like a new one.

Starting from Real Editor version 1.00 you don't need to patch anything to install a mod. TMM will do it automatically. Just a few clicks and the mod is installed. After Tera's update, you might need to start TMM to re-apply mods to your CompositePackageMapper.dat file.

Engine changes

Here is a list of improvements Tera got from updating to a newer UDK version:

  • DX11 with multithreaded rendering
  • Tessellation (Not used by BHS)
  • DOF, SSAO, Translucency, and Motion blur improvements
  • Shader Model 5 support (Not utilized by BHS yet)
  • Async file loader
  • SpeedTree 5 (BHS keeps using SpeedTree 4)
  • Foilage improvements
  • Texture cache
  • Per package texture pre-allocations
  • ULevel streaming update
  • Tone Mapper (I don't think Tera developers use it tho)
  • 32-bit skeletal mesh index buffer (Old Tera used 16-bit buffer, tho I haven't checked if they switched to unsigned int buffer)
  • Cross-level references (I dought BHS uses this feature. In 32-bit client cross-level refs were achieved by a custom S1StreamingLevel setup)