About this mod
A tool to edit various user data files in the game assets.
- Requirements
- Permissions and credits
- Mirrors
- Changelogs
- Donations
(I wish I could make that bigger.)
This is a tool to edit the user files you extract from the game's assets (pak files).
Google "RE Engine" and "RETool" and any other RE Engine tutorials if you need more help because I'm only going into a basic overview of how to extract and use files.
I'll explain the principles behind how modded files and such work in this game, but it's on you to use your brain, think critically, google, and fill in the rest.
DO NOT RUN THIS FROM WITHIN THE ZIP! EXTRACT THE CONTENTS FIRST!
If something doesn't work PROVIDE AS MUCH INFORMATION AS YOU CAN!
- File path & name.
- Error info.
- What you did to cause it.
- Anything else you can think of. I don't have a crystal ball; I cannot read your mind or see your screen. Explain your process/error as if you were explaining it to a blind person.
- Please don't make me have to ask because I'll probably just ignore you if all you say is "x doesn't work".
Current features:
- Can read/write about 80% of the DD2 user files.
- Press `Ctrl+I` to add a row to the bottom of grid views and scroll to it.
- Row should have default/empty data so don't forget to change what you need.
- Just because you *can* add a row doesn't mean you *should* add a row. Sometimes the game has a hard-coded array size.
- Press `Ctrl+R` to delete any/all of the selected rows/cells.
- If you open a file from within the proper `natives` structure, the editor will warn you if the opened files is not supported.
- The `Index` column on the far right of the data grids are the object index you can see with RE_RSZ. It is not something you can edit so just ignore it unless you're using RSE_RSZ as well.
- The 'Name' column in many files is for reference only! Names are not in 99% of the files. This is pre-extracted data from the `msg` files.
Known issues:
- There's no batch edit or paste. There probably won't be.
- Enum flag (bit flag) fields only show and allow selection of singular enum entries. If you want multiple flags active, edit the files with RE_RSZ.
- This means issues changing enum fields in the swap database files.
- This means issues changing enum fields in the swap database files.
- Some enum drop-downs are long and hard to sift through as they're unsorted.
Extracting:
- Download RETool
- Download the file list for DD2.
- Edit `extract-pak.bat` and pay attention to the list file argument. Either:
- Change the name of the list file you downloaded to match.
- Or change the argument to match the list file.
- Drag the pak you want to extract onto `extract-pak.bat`. NOT THE EXE!
- Again, use the bat, not the exe!
- The paks are not mutually exclusive, they are chronological. Higher pak # = priority.
Whilst latter paks will have newer files, it might not have *all* the files of something and you'll have to look in earlier paks for those.
- The list file is just a text file with a list of paths. That's it. Edit or create one with only the paths you want and extract with that if you just want a handful of files. Else you'll be extracting the whole 100gb.
Common issues:
- If you see "Failed to read {list file}" in RETools output, you didn't do step 3.
- If the extracted files like `108373695-472378171.tex.760230703` without any sort of `natives` folder structure, you didn't do step 4.
- "Extraction cancelled: There are invalidated entries in the PAK file. Try again with a non-modified PAK archive." means you have mods installed. See below for more on how archive invalidation works.
- Double extensions on files, the list file especially, cause by hidden file extensions.
Making paks:
- Put all the edited files (files you want in the mod) somewhere preserving the `natives` folder structure!
- Drag the folder containing the `natives` folder onto `create-DD2-pak.bat`. NOT `create-pak.bat`!
How FMM and file loading works:
- There's three options right now:
- pak files:
- This is how the game natively loads paks and requires no external tools to support.
- Just pop a pak into the game folder and follow the pak/patch naming scheme, and the game'll load files from then with higher # files having higher priority.
- FMM will auto-rename and manage mod paks so use it.
- Archive invalidation:
- FMM can install loose files (files not in a pak) into the `natives` dir in the game directory.
- FMM will show "altered {n} paths in game archives" when doing this and that is FMM invalidating pak entries.
- The game will always prefer loading files from the paks first, so FMM invalidates those entries in the pak files, so the game can't find them there and needs to look in natives instead.
- This method means altering the pak directly. This means game updates will reset them but leave the `natives` files behind making a mess.
- Always to clean mod installs on game updates if you go this route. (Deactivate all mods, confirm the game dir is clean of mods, update the game, activate mods again.)
- REQUIRES REF! The game is coded to look for the `natives` folder and will crash if it exists. REF (without the loose file loading option) patches this to disable the check. (There's no performance cost for this one.)
- "Loose File Loader" in REF:
- This is just dropping files in the `natives` folder without installing anything through FMM.
- Comes with a performance hit as extra logic is needed for ever file loaded to know if it's in `natives` and to ignore the pak file.
- Any game that claims to need this doesn't actually and can work with the archive invalidation method above. (e.g. Mesh Mod Enabler)
- Basically just makes the game check `natives` first without needing to invalidate the paths in the paks.
- Will survive game updates since the paks aren't being altered.
- FirstNatives:
- Effectively, this works the same as the "Loose File Loader" in REF.
- Not all game releases have this option though, like DD2 where anti-tamper crap necessitated it being built directly into REF.
- Newer version of REF (like build 700+) can just use "Loose File Loader" instead of this if they want.
- pak files:
This is currently built for and supports v1.0.6.0 (Update 2, 2024-04-08) of the game. Most minor updates aren't going to break or change that.
It will always need to be updated for new item names and such if the game adds more content, or changes struct sizes.
Source: https://github.com/Synthlight/MHR-Editor