The limits of a C++ module?

Hey. I’m not very experienced with C++(hell, half the operators that are used in gmod module codes like ->, *, and other things I don’t even know the definitions of), but I’m wondering, what are the limits of a C++ module? Like, for example, with enough work and effort, would it be possible to, let’s say, code a weapon that could be used in the game, without having to rewrite the game DLLs? Or, could something be done beyond that, like creating new AI npcs? Adding the C++ nextbot player base? Adding vehicles that use the Jeep and airboat’s base code? I’m wondering what the limits of what it is possible to make with modules are.

Doable in Lua

Doable in Lua

Not sure what you mean, probably doable in Lua

Doable in Lua

I know it’s doable in Lua(I’m not a beginner, you can tell by my past threads), I’m just wondering if it’s possible to do any of this in C++, not which one I should use.

Yes, but it’s absolutely atrocious to do with finding all of the pointers. The one thing you can’t do is modify NextBot.

I’d say you’re really only limited by yourself and the server being unable to load modules on the client. Of course, being able to send and load modules from the server to the client is a terrible idea, but obviously it’s still a limit.

You can still bypass limits set in place by the Source and Garry’s Mod developers, though, so that’s pretty cool.

The entire point of a c++ module is to add lua bindings into the engine that don’t currently exist, so as far as limitations go - you can add any function into the game you want as long as you know how to program it.

On the other hand though - don’t make life harder than it needs to be. If you can use lua just do so - c++ takes longer and requires people to have the module to use the added functions.