[Suggestion] Sandboxed Scripting

Sent this in an email but I am almost sure it got buried: “Sandboxed scripting: I heard you thought modules shouldn’t be put on workshop for security reasons, understandable but I ask that you add another way to do scripting that can be on workshop and interact with other mods and content. Maybe block some system libraries like System.IO. Scripts would go along with mods and only be loaded on servers with the mods installed (similar to all the other UGC we have)”. I think this is a really useful idea. As a content creator I feel like I have fully extinguished the fire of originality there once was. I always tended to try to stick to more unique things rather then just releasing another gun mod or some random vehicle. There isn’t much left to do and I would like the opportunity.


The code for it already exists, I wrote it some months ago.
See https://github.com/RocketMod/Rocket/tree/sandbox/Rocket.Sandbox
Also see https://github.com/RocketMod/Rocket/blob/sandbox/Rocket.Sandbox/SandboxCodeChecker.cs.

(Nelson can feel free to adapt the code to Unturned, since its my code I can grant him any permission)

I have written Nelson an email about this before, sadly got no response yet.

It has been tested a bit and works great so far.

Can be used like this:


Well that requires Rocket mod doesn’t it. I would like a safer way to distribute scripts with the pre-existing format of mods over workshop. I feel if I had to download stuff from external sources this kind of defeats the purpose.

It is part of the RocketMod repository, but it does not require RocketMod itself, it is completely independent from it. Can be integrated to Unturned to check if modules access illegal code. The idea behind it was to get Nelson to integrate it to Unturned and use it for workshop modules.


What is this magic?!

Hush muggle xD

Neat, I totally stand behind that if it can be supported over workshop.

Frankly all I know is some HTML, CSS and javascript so this is all new to me.

You should get into C#, messing with Unity games is fun, especially Unturned for whatever reason.

1 Like

Any recommended tutorials/introductions? I don’t have any classes at my school so I might as learn it online.

Hmm, idk where I started really, I guess I just stared at it for a long time and eventually got it after tons of trial and error. If you get DnSpy, you can write in code directly to the assembly so you can play around with variables, then more on to more complicated things. If you have no experience with object based programming I suggest you read up on how the hell that works because it is really complicated for beginners.

Alright. I’ve only done 2d stuff, thanks!