Layers Tool - Construct in multiple layers!

http://dl.dropbox.com/u/2399384/Layers%20tool%20-%20menu%20WIP.jpg

Instructions

It’s quite self-explanatory, but here’s the details:

Left click sets the layer of an entity you are looking at to the layer you selected in the panel.
Right click sets the layer of yourself to the selected layer.

Selecting a layer is as simple as clicking the rectangle of the layer you want to select. Your currently selected layer will be colored blue like this:

http://dl.dropbox.com/u/2399384/Layers%20layerlist.png

From the left to the right, the icons mean amount of entities, layer owner and players in the layer. Layer owner is redundant right now, because the layer name specifies the owner, but this will probably change in the future.

Every player is able to manage a single layer. When it is removed by the owner or because the owner disconnects, the entities in the layer will be removed and the players in the layer are moved to the default layer. The default layer is owned by the world and is always available to anyone. It is also the layer people will spawn in.

Known issues

Since this is a beta release, there’s several known issues.

[ul]Visiblity hook fails sometimes[/ul]
[ul]Lights of the jalopy, physgun beams and particle effects are visible through all layers.[/ul]
[ul]E2 holograms are also visible through all layers, but this might be kept that way for convenience.[/ul]
[ul]Unmodified player name scripts just show player names through all layers[/ul]
These will be looked into as soon as possible.

Fun things to try out

[ul]Sneak into someone’s base[/ul]
[ul]Try spawning a camera in one layer and looking through it from another layer[/ul]
[ul]Build a huge fortress spanning over multiple layers[/ul]

Media (Old)

[hd]http://www.youtube.com/watch?v=QPEVXTZhJZ4[/hd]

What’s next?

[ul]Full layer management (Players allowed to join, title of layer, props that can be spawned in your layer)[/ul]
[ul]Clientside settings saving, so you can carry your layer from server to server[/ul]

Download

http://www.garrysmod.org/img/?t=dll&id=92046


You need to have [```

gm_guardian

```](http://azuisleet.gayluadad.net/gmode/gm_guardian.zip) installed on the server!

After downloading it, just put gm_guardian.dll in lua/includes/modules and you’re set.

Servers running Layers for demonstration

http://www.game-monitor.com/server-stat-image/89.238.160.175:27015.png
http://www.game-monitor.com/server-stat-image/195.90.98.240:27015.png
http://www.game-monitor.com/server-stat-image/91.204.208.108:27017.png
http://www.game-monitor.com/server-stat-image/http://www.game-monitor.com/server-stat-image/69.162.91.34:27015.png.png

Feedback

I’d like you to give it a try in singleplayer or on your own server and tell me about any bugs you encounter. I’m especially interested in how much lag it causes, so check that out too. Finally, feature requests are also more than welcome!

Happy layering! :v:

Nice :sotw:

Yey tested this on you’re server some time ago :smiley: It’s really nice :smiley:

Very, VERY nice.

Still much to override to make it perfect. But this is definitely the best I’ve seen.

Can you make a developer’s version for gamemodes and stuff?

Wow, different universes :buddy:
Add screen filters/color mod for the lulz

This is looking very nice, good work. :smiley:

What exactly does gm_guardian do? Otherwise great, I’m getting it installed ASAP.

Edit: And where would you put the gm_guardian.dll module? And the lua file needs to be in /lua/autorun/server I take it?

I haven’t looked into the exact difference yet, but the hook **[Gamemode.ShouldCollide

http://wiki.garrysmod.com/favicon.ico](wiki.garrysmod.com/?title=Gamemode.ShouldCollide)** seems to cause a lot of lag when used serverside, while gm_guardian doesn’t. They both override collision. You need to put gm_guardian.dll in lua/includes/modules.

Me and Robbis created something similar to this as well, except it hid everything(almost) except sounds. We ran into some problems with it and it got discontinued, but if you wish you could contact Robbis_1 and see if he’d be willing to share his method of hiding things such as the physgun beam.

Nice work Overv, you are magic.

My server’s got it installed. 69.162.91.34:27015

Edit: Found a bug, if you use the customizable third person camera, then change layers, you break the functionality of hiding the props in different layers. The effects die, but thank god the collisions still work, so your fine on that end.

This is perfect if your tired of having low framerates when people are building huge contraptions, as you can completely hide the effects of it.

Suggestions:
-Some kind of HUD to tell you what layer your currently on.
-A bigger indicator to when you change layers and there are no visible props(facing a wall, for example).

Edit 2: I did the following and broke the layer tool:
-Spawned a dupe
-Changed layers
-Changed back
-Undid said dupe and got this:



AdvDupe (obby 5) undone
Hook 'LayersEntityDrawing' Failed: autorun/client/cl_layerscore.lua:12: Tried to use a NULL entity!


And suddenly layers is broken for the whole server.

Tomorrow I’m setting up an SVN and fixing some of the GUI issues. I’ll also add an indicator of the current layer you’re in and perhaps start working on the more advanced layer administration features.

How does one install said “gm_guardian” on ones server?

Quoting a PM I sent to Overv:

If you rent a server, send in a support ticket with the link and the information on how to install it.

does this just offer more space or is the clientside render lower in an empty layer

This offers more space, because you can reuse the same space multiple times and you have to render less things clientside when you’re in an empty layer.

Hosting it on my own server if anyone is interested.

every so offent it has a lua error cuaseing you to get stuck in one layer only.

(The error is above a few posts)

Bugs:
-If someone leaves, the layer isn’t deleted and any props you have in it are stuck there forever, because you can’t change back to the layer.
-All entities that are weapons(crossbow bolts, combine balls, rpgs) go through everything
-You can select multiple layers
-Malawar stuff specifically seems to stay in all layers and is un-removable in any layer
-You can’t edit the world in any layer

Compliments:
-Everyone shat bricks when they saw it
-Everyone loves it
-Only complaints are the bugs

Cheers!