What would you change if you could?

Oh no. Definitely not. The current hook system has flaws: if one addon decides to return a value, other addons’ hooks don’t get run. However, what we get in return is shit like this:

The dozens of hooks in DarkRP.

These DarkRP, along with the functions it provides is the biggest reason there are so many addons that hook into DarkRP. The same applies to the sandbox gamemode, although that is less visible because it is a default gamemode.

The modding community will take a huge hit when addons live on their own little islands unless you make a very effective system to make addons able to communicate with one another. Currently that method is global tables/functions and hooks.

Seriously, there will be a lot less a developer can do if addons can only communicate with the game and not with one another.

This is a limitation by Valve, I really want to get this for GMod 1, but alas.

And maybe this for GMod 1 one day.

Forgot to mention also: bring back the debugging website so we can actually trace crashes in the mdmp files to see which lua/engine functions are triggering crashes.

Natively bringing back Fretta or a Fretta-like gamemode base would also promote new and original (or even old and gold) content.

[editline]5th July 2015[/editline]

Metastruct has that functionality.

Shame, is there really no way to do it from the steamworks panel? I guess it wouldn’t hurt to bother valve about it, since it’d be unfair that they do it on their own games.


The more you change the lexer and/or parser of a language, the more effort it will be to replace the language with an updated or different version. You’ve probably noticed it when switching to LuaJIT.

Hell, you’d be in big trouble right now if you wanted to switch to the latest version of Lua 5.3 because the language would be ambiguous unless you remove the floor division (//) operator or disable c-style comments.

Why so? I feel like if anything, Valve should be happy as fuck. I know for a fact that if Gmod couldn’t mount CS:S, I wouldn’t have bought it (CS:S) at all.

I agree with this. What I would like to do is use Lua, but get rid of the stupid syntaxes, like the comments syntax, and add in c style syntax like && || and the binary operators and whatever, and make arrays 0 based instead of 1 based. I feel like if we encourage people to use Lua syntax - especially as their first language, we’re doing them in an injustice because its syntax is just contrary a lot of the time.

Because people are reuploading the game content everywhere, including the workshop, I assume.

Lua was my first coding language and I was really confused as to why there were multiple ways you could do something in the syntax i.e. Inequality operators could be ~= or !=

I don’t agree with this. Lua has a lot going for it, but the syntax being purposely contrary to any kind of established standards isn’t one of them. We can use it, change it, and open source our changes, that way the community can implement our changed syntax. We can call it something other than Lua to avoid confusion.

I think that if you do decide to make a change in Luas syntax, then you should remove what it was previously instead of having two different ways to do something.

This is exactly what I wanted to hear, but please keep comments as – if you do use lua 5.3, as falco mentioned.

This too. The less inconsistencies, the better.

Yeah this is a different problem though I feel. Addons for addons, addon hierarchy. I’m sure we can cater for this, but I would love to get more clamped down on it. Right now it’s a free for all… to install addon A you need to have addon C D E and F installed. That’s confusing and horrible. We can definitely do better here.

I feel like if there was an option to make GMod a multi-cored process, it would develop the ability of gamemodes a lot.
lately a lot of big mapped gamemodes are trying to get into GMod, and its a bit harsh because of all of our source engine limits and the fact that GMod is still single cored.
I’m guessing that if GMod will change its source engine, the limitations will be changed, but what about the fact of its problems running as a single-core application?

Was just wondering if its possible at all.

Yeah if we make our own syntax we’ll be replacing, not adding

• A real settings menu
• Modular scripts - Like Node.JS ( https://nodejs.org/api/modules.html ), this would make third-party-libraries actually feasible. Maybe this could live alongside a package manager (or just workshop dependencies).

• Better support for binary modules, the current interface is really limiting (you can’t create vectors, angles, players, any userdata really without hacks) and is also flawed when it comes to coroutines as old verisons of gmod were

• If you’re using Lua still, don’t give people access to the registry/debug library - it just lets people screw the game over and forces use of the odd method of securing userdata that gmod has. The correct way to keep userdata secure is to remove access to the registry, remove access to the debug table and to use luaL_checkudata and force people to use FindMetaTable.

• If you’re using a Source Engine still: No, or extremely limited with a whitelist, console command access. Most console commands in the engine just weren’t made to be secure, that’s why in other games there’s no ways (Valve tries at least) for the server to execute many of them. Servers shouldn’t be able to touch a user’s configuration at all.

• Document everything. Creating an API from scratch gives you the chance to just document every method you add as you add it. Some functions currently in Garry’s Mod were either completely forgotten about or added as quick hacks to perform a single purpose and never documented.

• Real support for HTML panels. Awesomium is a joke, maybe that’s because it’s bad software or maybe just because it hasn’t been implemented properly. Either way, developers should be able to utilise how amazing HTML renderers tend to be at rendering text. One of the greatest reasons people liked the idea of Awesomium being added was to possibly use it for some sort of UI in-game, but you can’t even render transparent HTML panels properly.

• If you’re using Lua still, a cooler way to handle ENT/SWEP base classes could perhaps be to make each file loaded have an implicit “BaseClass” local variable. After the script has been loaded, this could be populated based on the ENT.Base/SWEP.Base variables.

I try not to use the C-Syntax that has been added to gmod, but I have made a couple of small changes myself that I think are pretty cool: https://gist.github.com/wiox/8b50cf0fb562d83bb620 (I’d definitely use these sort of changes as well as bitwise operators)
If you want to change the Syntax a lot, that’d be pretty awesome. Just make it go one way or the other, no need to go all PHP and have multiple operators such as “and” and “&&”. Just do one.

If the language isn’t going to be Lua, but something else. It needs real support and documentation.

So I assume Garry’s mod 1 addons would have to have some changes made to them to work in 2.

This would be an engine thing. Lua is single core - so that wouldn’t do anything. But by having multiple Lua instances we could run them on different threads. Right now in GMod we have one mammoth instance.

[editline]5th July 2015[/editline]

They would all be incompatible, in probably every way possible

Alright, thanks for the answer!