Skip to content

Why create GDPatch?

GDPatch is a sort-of “spiritual successor” to GDWeave, a mod loader created for the WEBFISHING community. I (NotNite) created GDWeave because I felt Godot’s modding ecosystem was lacking compared to other ecosystems. (I took particular inspiration from other mod loaders I’ve used in the past: greetings to everyone behind BepInEx, Fabric, Dalamud, REFramework, YYToolkit, and Lovely. Y’all rock! <3)

GDWeave was originally intended to eventually support multiple Godot engine versions, but its hook system turned out to be more fragile than originally assumed, so porting it to other engine versions proved a difficult task. GDWeave also had some rough edges since it grew out of a personal playground for messing around with Godot; we were particularly unhappy with the existing token system and the dependency on a full C# runtime.

Because of these issues, we decided to start working on GDPatch from scratch. Our project goal was making something that just works for users, with a powerful modding API that can do anything that modders need to do, while supporting as many games/versions/platforms as possible. To accomplish this, we made a few major design decisions that shaped the project:

  1. Write it in Rust. Beyond being a great language in general, Rust compiles to native code, has good native interop, and runs everywhere Godot already does. We considered other approaches like C# NativeAOT, but we believe it would have brought more hassle later down the line (particularly with exotic targets like WASM).
  2. Operate at the filesystem level. We chose this approach because simply hooking engine functions was unreliable, particularly with the permutations of engine versions/compilers/forks. We also noticed that file read functions were inlined more often with recent Godot builds.
  3. Operate outside of GDScript. Since #2 effectively forces us to patch game scripts before the pack file is even loaded, script patching has to be done without GDScript. We chose Lua for this as it’s easily embeddable and has a short learning curve.

I (NotNite) also suggest you read my blog post about developing GDPatch, which discusses this topic more in depth.