Gamemode Zone Tool

What is Gamemode Zone Tool?

This was an addon that @Sarcly and I worked on in Gmod originally. It’s a tool designed around making gamemodes map independent and easily implementable for casual audiences and quick development. It allows for the placement of ‘zones’, a 3d region of space with arbitrary programmable properties and event hooks. There is also an inheritance aspect to zones, where a gamemode developer can define a template or default event implementations and players can then go place them about a map of their choice, i.e. traitor trap zones on gm_construct or placing numbered checkpoints for a racing gamemode on a map not designed for it by going in sandbox and using a tool versus going in hammer and modifying the map or other gamemode specific files. There is a brief overview of most things in our readme on the git.

Inspiration

Originally we were interested in remaking the sledbuild gamemode and making some modifications to it and realized we needed some sort of checkpoints built into the map statically to know who is in first, second, etc during the race, but didn’t like the idea of making it so static to specific maps. We envisioned a tool that would make it map independent such that a user could go build their own map out of props, make their own track, and still have it function normally within the gamemode.

Prior work

Previously, on Garry’s Mod we worked on this concept off and on in our free time for a year and a half. We spent a lot of time on the tool gun aspect of it and making these zones easily placeable and modifiable, iterating over different aspects of how one can modify a zone. We set up systems for creating collision handlers on each face of a zone for individual collision handling. Something that we had implemented and working was a zone which would only allow players of certain teams or certain props through that is defined completely externally and loaded after the map does. There were a few iterations of a GUI to modify zone’s but they became deprecated as the systems changed.

Questions

We’re interested in porting this to s&box since we think it’d be useful, but there are some technical differences between it and gmod. In particular, we’re unsure of how our addon can access the zone definitions of other addons. Previously, in Gmod there was a lua file in the gamemode that would call a function on our global object to add it to a registry, though it’s unclear to us if something like this is possible. Furthermore, what scope does an addon have to other addons, or is this an issue with dependencies where it would be expected for this to be packaged within an addon that wants to make use of it?

2 Likes