October 2022
Posted 2 years ago
I added addons this month. Previously we kind of had addons, but only one could exist at a time, and they were games. 

General Addons


You can create general addons. These will work with any game. An example of a general addon is one that makes everyone's head a pumpkin, or one that spawns grass everywhere.

TARGETED Addons


A targeted addon targets a specific game. For example, to add a gun to a specific game, or to add an entity/npc/tool to sandbox mode.

GMod Differences


Because Garry's Mod uses Lua, it's not hard typed. The code doesn't need to know what other code exists. It gets loaded and then it can feel around to see what exists.

S&box uses c#. It's hard typed. The code for the most part needs to know what's there before it can load. Over the past 20 years coders have realised that this is probably a good thing. It allows you to see if the code works when you compile it - instead of when you run it. Look up typescript for a good example.

This puts restrictions of what we can do in a few ways but ultimately it's a much better development experience.. because you get things like intellisense and compile errors.

Workshop


We don't use workshop. You don't need to subscribe/pre-install addons. You choose the addons you want to use and play, everything else is taken care for you in the background.

Next Steps


This was the first step, there's still plenty to explore here. Ideally you won't have to choose the addons before you start the game.. they should really just download and spawn in your game like the cloud models.