Garry's Mod

Garry's Mod

95 ratings
Loot for Breakable Objects
   
Award
Favorite
Favorited
Unfavorite
Content Type: Addon
Addon Type: Effects
Addon Tags: Roleplay, Realism
File Size
Posted
Updated
7.629 KB
7 Dec, 2024 @ 4:02am
1 Jul @ 1:48am
3 Change Notes ( view )

Subscribe to download
Loot for Breakable Objects

Description
Rewritten code of this guy's addon: https://gtm.steamproxy.vip/sharedfiles/filedetails/?id=654149429&searchtext=ttt+loot

Now works for sandbox!!

Basically allows many different props that it would make sense to contain stuff, contain loot. Also adds an optional chance for headcrabs to also pop out when looting props. Allows custom drops through use of Cvars too! Just refer to the console variables below to add custom entities and weapons to the default drop pool.

Cvars:
lootable_enabled 0/1 - enables/disables the mod
lootable_drop_chance 0-100 - determines chance of entity drops (0 to disable)
lootable_max_items_per_drop - determines max amount that can spawn (I don't reccomend anything past 15)
lootable_headcrab_chance 0-100 - determines chance of random heacrab npc in drop (0 to disable)
lootable_headcrab_ragdoll_chance 0-100 - determines chance of headcrab corpse in drop (0 to disable)
lootable_(add/remove)_entity - adds/removes entity from default spawnpool
lootable_clear_items - Removes all added entities from list
lootable_add_tab - adds all entities from specified tab in weapons or entities tab (If there is a space in tab's name, encase in quotation marks)

Please let me know of any problems, post lua error messages too.

Note: This works on a specific model basis unlike the original, so it doesn’t support custom breakable props or other source game props. If you suggest games or mods for me to support I will most likely do just that.

Tags: Breakable, lootable, props, object, system, crate, drawer, hl2, half-life 2, headcrabs, entities.
16 Comments
Gake 3 Sep @ 2:15pm 
Any chance of adding chance per item?
Gake 3 Sep @ 1:59pm 
Hey, I love your mod, but I'm frustrated by the lack of ability to remove the default list from spawning. I'm trying to get the mod to only spawn plausibly civilian supplies and such from various mods, but it's still spawning guns and ammo.
TRY TO AIM 30 Aug @ 8:02pm 
this is QOL improving, very nice!!
Jiyū to anzen  [author] 1 Jul @ 1:49am 
@Fuyu ⋆˙⟡ ハクウ Should work now
23 Jun @ 9:58pm 
removing and clear doesnt do anything
:steamsad:
parrot 23 May @ 10:51am 
got it
Jiyū to anzen  [author] 22 May @ 2:50pm 
Forgot to fix that… I will update it soon.
parrot 22 May @ 12:41pm 
removing doesnt do anything, i just try removing a half life revolver, doesnt know what that is
Jiyū to anzen  [author] 21 May @ 6:55pm 
I updated it and added some requested things, check the change notes!
Jiyū to anzen  [author] 27 Mar @ 2:13pm 
@TTV Gamejunkiez I was planning on adding an “add tab” option to add an entire spawnmenu tab, along with an options menu. Also some optimization because I made this a long time ago and it kinda sucks.