Customizable Randomized Item Crates
note: forgive the inconsistent name pls
Found in Spawnmenu->Entities->Customizable Random Item Crate
Once you spawn it, you must turn on Editing to change the crate in any way. Open the spawnmenu and go to Options->RandomItemCrate->Options and turn on "Enable Edit Mode" to begin. Press E to open the crate’s options. The following will explain each part of the crate options.
I will refer to the options found in the spawnmenu at Options->RandomItemCrate->Options the "RIC Options"
These are the categories that the crate will pull from when choosing a random weapon to drop.
Click on "Add Category" to choose from a list of the weapon categories you have. If there aren’t any/it doesn’t dropdown, go into the RIC Options and click "Reload Categories".
You can also type in manually the name of the category if anything is wrong with the dropdown in the text field on the right of the dropdown.
These are the entities that can be chosen when the crate is opened.
You can get entity names by right clicking an entity or a weapon in the spawnmenu and clicking "Copy To Clipboard"
You can use the special character & to combine two entities in one entry. Example: Putting "weapon_pistol&weapon_shotgun" will make the crate have a chance to drop both a pistol and a shotgun together.
Commas can be used for further random selection. Example: Putting "weapon_pistol,weapon_shotgun" will make an entry that can be a pistol or a shotgun, chosen randomly.
Using & and commas together can make very interesting drops. Example: An entry that drops a pistol and a randomly chosen item with it
"weapon_pistol&item_healthkit,item_healthvial,item_battery"
You can also add the % symbol and a number from 1-100 to the end to give a chance to the drop. Example:
"weapon_pistol%15" would add a drop of a pistol that only spawns 15% of the time
(Note: if there is only one entry in the list with a percentage, it will still always get picked, if you would rather this not happen, you can put this in the persistent entities text field.)
Right clicking any entry in the list will start editing it, pressing enter in the text field or right clicking again will stop editing and save your changes.
One thing to note is that you cannot spawn vehicles, since they are sorta complicated.
This is a single text line where you can type in entities that will always spawn with the random drops.
Example: Typing in "weapon_pistol" into the persistent entities line will make a pistol always drop whenever the crate is opened.
This supports the formatting using commas and &’s mentioned above.
Open your spawnmenu and right click on any prop to get its model path by clicking "Copy To Clipboard", put it in the custom model path override field and it’ll change, simple.
Health is health.
Respawn time can be overridden for the specific crate if you toggle the "Override" checkbox and type in a number.
Type a save name into the field and click save to save every changeable thing in the crates options. It’ll also save the current color and material of the crate. The save files are stored in (STEAMFOLDER)/GarrysMod/garrysmod/data/
And that’s about it! all other things are in the RIC Options which control the console commands with the prefix "randomitemcrate_"
extra notes: I am aware that the pickup notification has/will have bad grammar, and I am sadly aware of that nuclear spelling mistake in the last image.
I was pretty surprised that no one had done this so I hope this helps some people out with gamemodes or what-not.
enjoy!