electronicarts / CnC_Remastered_Collection

Other
18.33k stars 4.74k forks source link

Suggestion: Improvement to mod creation/distribution process #90

Open Roman215 opened 4 years ago

Roman215 commented 4 years ago

So one of the concerns I had as it relates to creating mods is that when creating a mod, it seems like ultimately you're building the source code yourself, compiling it to a C++ library, and redistributing that library. The problem with that approach is that 1) it's a security concern if you don't know what arbitrary C++ code is inside someone's mod, and 2) It guarantees that any mod will break for any official patch that's released for the game. In order to improve these issues, I propose that you find a way to change how mods are distributed to take advantage of .patch or .diff files. So basically a modder will modify the source code, create a .patch file, put the .patch file in the mod folder to be redistributed, and then from in the game, when you try to launch a mod, it will apply the .patch file to the source code, build the C++ library locally, and launch the mod. The benefit here is that a .patch file is easily human readable so you know what's all in the mod and someone can't put any nasty surprises in it. Also as long as the .patch file can still apply cleanly after an official patch, an official patch shouldn't necessarily break compatibility with an existing mod.

abergmeier commented 4 years ago

I think it is nice for you to acknowledge these problems and proposing a solution. IMO the more practical approach would be to have a wasm engine embedded in the game. Then you would execute to a wasm "sandbox" anyhow and compromising the system way less likely. That said I think any change to the current method is very unlikely