Garry's Mod

Garry's Mod

562 ratings
Sandbox Shields
2
   
Award
Favorite
Favorited
Unfavorite
Content Type: Addon
Addon Type: Server content
Addon Tags: Build, Fun
File Size
Posted
Updated
41.558 KB
16 May, 2022 @ 6:38am
13 Aug, 2024 @ 9:07am
4 Change Notes ( view )

Subscribe to download
Sandbox Shields

Description
"Sandbox Shields" is a catchy name I couldn't not use for shields that actually would work in all gamemodes.

This addon adds shields from the Draconic Base to all players when they initially spawn. The shields have 100 health, and have a five second recharge delay after taking damage. These shields are only visible when taking damage or when they recharge. In the images above where the shield is permanently on it was done through a debug command in the Draconic Base.

This addon was created merely as an example for the Draconic Base's shield functionality. If you want to know how this system works / how to use it yourself / how to make your HUD compatible with this system, then check the wiki page here for documentation: https://github.com/Vuthakral/Draconic_Base/wiki/Shield-System

This addon has the following convars:
  • sv_sandshields_enabled -- Turn the mod on/off
  • sv_sandshields_shielddelay -- How long after being hit should shields start to regenerate
  • sv_sandshields_shieldhealth -- Total HP of the shield players have
  • sv_sandshields_shieldregenamount -- Enter a number for how much health per second you want to recharge. (Default 33)

These values update for players on respawn.

If you're looking for a HUD compatible with displaying DRC Shields: https://gtm.steamproxy.vip/sharedfiles/filedetails/?id=2810649799


Everything I do is free because I can find some fun in making it, or because it helps others make fun things. If you would like to help support me financially so that I may keep doing what I do, then please consider checking out my Patreon[www.patreon.com] page. It is also tied in with my server community / servers which I host. I love doing what I do and I hope to be able to keep doing it for as long as I can.

If you need immediate help with the Draconic Base (or any of my addons), or just want to know what I'm working on or etc, then consider joining my Discord[discord.gg] server.
151 Comments
Vuthakral  [author] 9 Sep @ 6:27pm 
These shields are just applied to all players in this addon, the shield code is from the Draconic Base. You could set up shield definitions for some kind of serverside code, maybe pick-up entities or something, that apply them to players. Draconic's wiki details how the shield system works.
Reaps 9 Sep @ 11:11am 
Is there a way to make it so each player could toggle on if they have a shield? I've been wanting to have some people on my server have shields and some not and these shields are rad
Vuthakral  [author] 15 Aug @ 11:22pm 
(also I've literally used that addon in tandem with mine in the recent past without issue)
Vuthakral  [author] 15 Aug @ 11:20pm 
I highly doubt Draconic is the source of your issue as this sounds like something is breaking the input system, which Draconic does not mess with, that said I'll still look into it to be sure.
Jdramirez165 15 Aug @ 6:09pm 
It even broke some other stuff, like im trying to use the flashlight, but it doesn't work. I tried reloading guns, but doesn't work. I have no idea why is this conflicting with the other addon...
Jdramirez165 15 Aug @ 6:06pm 
This addon is conflicting with the BO3 Exosuit Movement addon, which causes the latter addon to spew out console errors.

[BO3 Exosuit Movement] lua/autorun/server/sv_aewallrun.lua:133: attempt to compare nil with number
1. v - lua/autorun/server/sv_aewallrun.lua:133
2. unknown - lua/includes/modules/hook.lua:102
Vuthakral  [author] 16 Jul @ 3:10pm 
I'll look into it
Lynx Void 16 Jul @ 2:07pm 
could there be an option for the shield to only activate when you also have suit charge only?
Vuthakral  [author] 26 Jun @ 7:07am 
What branch of the game are you on, also what operating system?
Klonade 26 Jun @ 5:46am 
Shield is invisible except for some particle effects, but functions as expected. The only two addons enable on my singleplayer are Draconic Base and this addon. The console log is as follows (Shortened for Steam's Character Limit):

{Draconic Log}
Using map cycle file cfg/mapcycle.txt.
{Server info}
Attemped to precache unknown particle system "drc_halo_3_shield_deplete"!
Attemped to precache unknown particle system "drc_halo_3_shield_deplete_arcs"!
Attemped to precache unknown particle system "drc_halo_3_shield_impact_effect"!
Attemped to precache unknown particle system "drc_halo_3_shield_recharge"!
Clientside Lua startup!
{Draconic log}
Failed to load custom font file 's:\common\garrysmod\garrysmod\cache\workshop\resource\fonts\clearsans-medium.ttf'
Trying to create entities too early! (drc_shieldmodel)
{JoyStick info}
Redownloading all lightmaps

To me it seems like it is unable to find some particles and was unable to create the shield model. Any ideas on how I can fix this?