Just to be clear... if you have access to the source code of a program or game then you are changing the program in the best way possible and not modding... you can release a patch, or your own version of the game (fork), etc.
Moding means that you are changing the game without change the Engine (Game) source code.







