THK Compiler Decompiler Notes and Workflow - Ezekial711/MonsterHunterWorldModding GitHub Wiki

The decompiler-compiler is stable: Decompiling and Compiling from a thk or an entire thkl will result in the inputs The compiler-decompiler is NOT stable: Compiling induces data loss, however the compiler-decompiler-compiler loop will match the result of a single compilation.

The decompiler can decompile individual .thk files into .nack files. In this capacity it has minimal syntactical capabilities. The decompiler can decompile a .thkl file. The .thkl is treated as a project. It will not only decompile the .thkl but also all of the .thk referenced on it that it can find. If all .thk references are correctly decompiled it can perform furhter analysis in terms of register usage and node naming (thkl missing a single thk are forced to have coerced functions on the global thk). The .thkl decompiles to an entire project (including a project folder), and the file itself produces a .fand header. A .fand file is used as a project orchestrator. The compiler uses it to generate the compilation structure.

Decompiled Compiled
.thk - Think .nack
.thkl - Think List .fand
.fexty - Forked Function Extension .py