This needs to be run before the editor will even compile. This generates all the needed files from parsing the struct & enum dumps.
Name | Desc |
---|---|
Full | This will try to make structs for every single struct in the json dump. This will make 50k+ files. Avoid this unless you absolutely have to. There's no guarantee it'll even compile them and it's a bitch and a half to debug given the sheer length of time required to compile that many files. |
Greylist | This is the preferred method! This reads all the extracted user files (see PathHelper.cs below) and builds a list of all hashes used and generates files from this. This is the best support with the minimal amount of files generated. |
Whitelist | This works based upon a preset list of classes and structs that are included and will produce what's listed + referenced structs. This typically works without issue. Edit the whitelist in GenerateFiles.cs if you need to. |
Note: There are game-specific generator files. (This is to support multiple configurations.)
And may also involve force-closing VS and then try to build again.
Don't do full builds unless you're prepared to wait.
(Assuming it builds at all. Focus shifted to greylist and I haven't bothered fixing the whitelist generation that broke as a result.)
Enums_Internal.hpp
andil2cpp_dump.json
. Both generated by REFramework.- Edit the paths (consts) in PathHelper.cs to point to these files.
- Note: There are game-specific path helper files. The base one does not have any of these constants but is the one linked for ease of finding it. The rest are in the same dir.
- Run the game with REF installed.
- Open the "Object Explorer". This will generate the
Enums_Internal.hpp
in the game's root dir. - Click "Dump SDK" and wait for it to finish. This will generate
il2cpp_dump.json
in the game's root dir.- The game may crash on it's completion. This is a known issue with REF and mostly ignorable.
- Open the project, there will be many errors but ignore them for now.
- Change the configuration to the desired game.
- Edit the paths (consts) in PathHelper.cs to point to these files.
- Files are shown/hidden based on the target game / configuration, so you won't see the right file till after you switch it.
- Set the startup project to
Dump-Parser
and change the launch configuration to "All". - Run
Dump-Parser
- You will probably have to right click on it and select "Debug->Start New Instance" because VS is retarded and will try to build projects that aren't part of the dependency chain and they will fail and VS will refuse to start this one project despite its build succeeding.
- Running this for most of the game takes 10 min or so at most. Running this for MHR takes literally days. Generation for this is split into two parts and luckily it's only the first one that's an issue, but I'm not committing files like that to git.
- See README.md for more on its args.
- Set the startup project to
Generator
and change the launch configuration to "Greylist".- Same "Debug->Start New Instance" shenanigans.
- Use "Greylist (Dry Run)" if you wanna test it first.
- See below for args if you want to run it manually.
- And that's basically it. Switch the startup project back to
RE-Editor
and give it a go building. It should all work now.
Name | Desc |
---|---|
<None> | Does a full generation. (See above.) |
useGreylist | Generates files. (See above.) |
useWhitelist | Generates files. (See above.) |
dryRun | Writes to throwaway memory streams instead of files. This makes unit testing possible. Can be used with any other arguments and will print the generated file count for reference. |