It’s not that simple. Even using it as a base gets you into a legal gray area. Learning from a work and incorporating elements into your own work is legal, but copying someone else’s legwork like this is legally murky even if you don’t take the actual code.
Yeah I’m sure Microsoft-owned Bethesda is shaking in their boots about learning from modifications to their own game. That’s gotta be everything stays buggy.
If an employee writes code for a company, the employer* owns the copyright.
If an individual writes code on their own time, they own the copyright.
If someone publishes a free mod containing code, that mod could contain a combination of that person’s code, code from other contributors, and even other copyrighted code that none of them had the right to in the first place but it either hasn’t been noticed or isn’t being pursued because there’s not likely any money in it anyways.
It’s that murky area that I’m guessing they’d want to avoid. They might be more likely to hire the modder to do that again from scratch for them than to use their work directly. Blizzard did that back in the day with two (that I know of) of the people writing modding tools for StarCraft. Their tools remained on the modding site and were never officially adopted by Blizzard but the authors worked on the WC3 map editor to add some of that functionality right into the official map editor that was going to be released with the game.
Edit: corrected a mistake where I said the opposite of what I intended to (that the employee owned the copyright rather than the employer)
Hiring the modder is not necessary, to look at a mod, go ‘oh that’s what we did wrong,’ and fix it. That’s not the ctrl+c/ctrl+v situation you seem to expect. And considering it’s their own game, and fixing bugs, the legal concerns are practically nonexistent.
If an employee writes code for a company, that employee owns the copyright.
Bet.