Garry's Mod

Garry's Mod

Not enough ratings
GWS Inventory - Global Loot System Guide
By Butcher
Hello everybody! Today I want to show you how to create global loot like in PUBG.
Addon can be found here: https://steamproxy.net/sharedfiles/filedetails/?id=2340992735
   
Award
Favorite
Favorited
Unfavorite
foreword
What is Global Loot System?
It is a loot system like in the Battle Royal games. You need to write a command in the console (load your vaults) and the loot will appear with the items that you mark in the loot list as spawnable items.
So let's begin
[1] Lootlist and Whitelist
First of all, you must create a whitelist. A whitelist is a list of pickable items.

gws_whitelist_add <Entity Class> (iteim)
For example: gws_whitelist_add prop_physics

gws_whitelist_remove <Entity Class>
For example: gws_whitelist_remove prop_physics

gws_whitelist_save
Save your whitelist

gws_whitelist_load

Next is the loot list. Lootlist is a list of spawned items in some repositories when you mark this list as parent (marked in entity properties).
So you can add your items in two way.

First is write command in console that will add or remove your item.

gws_lootlist_add <Entity Class> (iteim)
For example: gws_lootlist_add item_healthkit

gws_lootlist_remove <Entity Class>
For example: gws_lootlist_remove item_healthkit

And the second way. Lootlist tool. You can find it in the gws Inventory tool list. One click on an object on the ground - you will add it to the loot list. Multiple Click - You will change the change to drop this item. Don't worry, this won't create so many same items.
---
For getting log of this cra ... I mean the staff that you marked as loot at list, write the console command gws_loglootlist
Also you can current reset loot list
gws_lootlist_reset
Don't forget to save it.

gws_lootlist_save <name>
Example
gws_lootlist_save UglyCraft

For modify that you can load one of your whitelist

gws_lootlist_load <name>
Example
gws_lootlist_load UglyCraft

Also If you want increase chances of getting that weapon but NOT decrease - click on a weapon multiple times. Dont worry about item it will not spawn multi times at one storage.

If you want decrease chances of getting that weapon decrease - write this (console command) as much as you added
gws_whitelist_remove <Entity Class>
gws_loglootlist
[2] Storages - Global Spawn
First of all spawn your storage / storages.



Go to propenties and select "Edit Propenties"

In "Lootlist" paste your lootlist name.

Now do it with all storages. I recommended to use duplicator with spawning same storages with same lootlist name.
Then write console command

gws_storages_save <name>
Example: gws_storages_save NotCrap

Then wait until your loot saving. I recommended to wait near 10 second to 2 minutes (some big amount of storages can saving around 3 minutes. Do not clean up map.)
Done! You can load your c..loot..
Then write console command
gws_storages_load <name>
Example: gws_storages_load NotCrap
Conclusion

Thanks for reading. I hope I helped you

Discord server - https://discord.gg/JGHxjsr
3 Comments
dsaS 25 May, 2023 @ 10:48am 
Øylevision 5 Feb, 2021 @ 12:10pm 
The loot containers tend to be invisible. Am i missing something?
bravecal9 31 Jan, 2021 @ 11:13am 
Amazing, now I can turn Gmod into a proper zombie survival game!