Will we be able to compile addons in DLL since we are programming in C#

I don’t plan to do this but I would like to know if we will be able to compile our addons in dll since it is coded using c#.
I mean, some addon makers can find this feature useful if they plan to sell their addons. They could let 1 “config” script and put all the source code in a compiled script to have strong DRMs so the addon can not be stole.

If someone has any information about it :slight_smile:

1 Like

I don’t know if it is possible yet because the game is still not finished yet but I think eventually they will add that. (I’m not saying they don’t have that I’m saying I think they don’t have it right now)

DLL’s aren’t good DRM solutions… you can easily extract them and get pretty much all the source code out of them.
Also addons are already compiled into DLL’s by the server before they get sent to clients.

1 Like

Server sends addons to clients as serialized assemblies, if you really want to you could obfuscate it but this would likely break RPCs & replication


Apparently not. The client (and server) compiles C# source code (that is sometimes sent from the server) in real time in memory and then executes it.

It is only compiled on the server, not client

Anything you send to the client has to be ran, and therefore drm is not going to work in the long term. Even large companies such as denuvo cannot stop people from cracking their drm.

If you really want to stop people from seeing how your code works, then do it on the server and don’t send it to the client. Obfuscation at most only makes it slightly more annoying to do.

The people most likely to go through the effort of actually stealing source code are highly unlikely to pay no matter the cost, and some just do it for fun. I’d you want to make people less interested in piracy, then implement features that require the internet, such as cosmetics people can buy, interaction mechanics they can show off on official servers, etc. This is exactly what valve does with steam…

1 Like

If the source code is stolen, it will have to be integrated into the S&Box environment anyway (or rewritten to work as a standalone). Either way, you are able to see these servers and what they have done, and as a result you can address them directly, contacting the workshop facilitation or whatever FP plans to implement for such things, or in the worst case, or if it goes against licenses etc., go the legal route.

If they just wanna use the source code to get an idea for an own system or hard rewrite, there is nothing to do, except the previously mentioned obfusction that could get rid of some rather unmotivated kiddies.

But tbh, if you wanna use that idea to make money, I think doing a standalone instead of using S&Box would make more sense as I don’t heard about a subscription or payment model in S&Box. And if you still don’t plan selling it, I can understand that it could be annoying, but maybe you gonna plan going OpenSource with the right licence then…


Okay but paying for addons in garry’s mod is commmon. If we go through obfuscating and compiling most of people will give up cracking the addon if it is not super expensive.

Thank you all for your answers!

Yeah I understand. Anyway I don’t plan to make money with my addons. I will keep them private or share for free useful ones :slight_smile: