Asset loading/writing

There are file system limitations in gmod that don’t allow you writing files with non-whitelisted extensions. I’m not sure what kind of file system limitations will be present in S&Box, but obviously I want it to be flexible enough yet secure.

Here are some points that I personally would love to have available (at least some of them, but ideally all of them :D)

  • Being able to write files with S&Box asset extensions (models, textures, maps, sounds, particles, basically every engine file format that you can load by the engine to use)
  • Being able to load assets from arbitrary data buffers by a URI/GUID. We’d need a class that would construct a URI/GUID from any kind of data buffer, be it a file, a memory stream or else. So you’d do something like myModelUri = new Asset(myBuffer).Uri; myEntity:SetModel(myModelUri);
  • Being able to easily refresh/reload any particular asset using a console command by its path/uri and via C# after its associated file/buffer was changed

What are the chances of any of these making it into the game?

1 Like

These sound fairly simple, I don’t see why they wouldn’t be added to the game, though this would warrant some sort of temporary file type system because I feel this would absolutely fuck anyone’s hard drives if it’s space being mismanaged, perhaps a temporary folder which can be deleted by users automatically or manually?

1 Like

It would be cool to have functionality similar to web browser’s “clear data” stuff, some button in the menu that shows how much disk space is occupied by game data and allows to clear it, either all of it, only downloaded assets, caches or the writable directory (like garry’s mod data folder).

So when you see that your S&Box folder weights 80GB, you can enter the game and clear the caches.

There’s also no reason to create files when those aren’t really needed, that’s why I’d like to have ability to load assets from in-memory buffers.


I would also like to see users able to whitelist specific folders to specific addons. For instance say you want to import a quake .map file in sandbox with this addon and you have a folder on your desktop where your map editor leaves the files for various other workloads. instead of copying them to your Sandbox addon directory you just whitelist that specific folder.

1 Like

Seems very inconvenient to do imo
Maybe addons can open some kind of folder browser and get access on the selected one

1 Like

Which particular point do you mean?

That was a reply to redhacker, but the forum doesnt show it as reply if you directly reply under it

1 Like