I think from a legal perspective modding is technically a violation of the ToS.
But ofcourse the videogame industry has always turned a blind eye to it provided you don't make money from it.