I wonder if the source or some devlogs are available for ntt, especially the parts around networking. Trying to dig into modding multiplayer support into games!
An online multiplayer mod for Nuclear Throne. · By
All available technical details are on the blog.
My extension for interfacing with Steam networking/matchmaking backends in GameMaker is publicly available.
Other engines have their own tools (sometimes built-in, sometimes not).
Patching is engine and version specific. For GameMaker you'd probably be looking at tools made for Undertale as that had grown the largest modding community as far as tinkering with file formats goes.
Actual networking can be done very differently game-to-game (this isn't specific to modding) and engines can be more or less fit for specific kinds of networking - search around for details on what people have been doing for similar games.