Yeah, and these mods were so good that they became their own games.
If you want to do that, you're a game developer. So license (or develop) an engine, and also pay for all the non-permissively licensed other code you use.
Congratulations, you're now on a solid base for charging money for your game.