Garry's Mod

Garry's Mod

260 ratings
SpawnMenu Nested Categories!
2
   
Award
Favorite
Favorited
Unfavorite
Content Type: Addon
Addon Type: Server content
Addon Tags: Build, Fun
File Size
Posted
Updated
371.238 KB
7 Oct, 2024 @ 3:05am
12 Oct, 2024 @ 11:01pm
4 Change Notes ( view )

Subscribe to download
SpawnMenu Nested Categories!

Description
[Update! Categories are now alphabetized]
This addon will override some sandbox scripts to allow spawnmenu categories to be nested. There are a few built-in methods for categorising a few common entities and addons. Also two bonus postprocess effects! (Check texturize)

If you're an add-on developer, and you want to make use of nested categories all you do is:

In ENT, SWEP, or vehicle list entries, where "Category" is used, just create extra entries that are numbered in the nesting you want.

SWEP.Category1 = "FirstCat" --First Category
SWEP.Category2 = "SecondCat"
SWEP.Category3 = "ThirdCat"
SWEP.Category4... blah blah blah
SWEP.Category5... and so on
it keeps nesting until there isn't another category

the menu falls back onto default category behavior if Category1 is missing.
You can assign the icon on each category using list.Set like so:

list.Set("EntityTreeIcons", "FirstCat.SecondCat.ThirdCat", "icon16/cup.png")

Subcategories will appear among the items in the selected category. You can specify what image to show for the icon for this:
list.Set("EntityTreeThumbnails", "FirstCat.SecondCat.ThirdCat", "entities/baloney.png")

For other types, the format is the same:
-VehicleTreeIcons
-WeaponTreeIcons
-EntityTreeIcons
-GlobalTreeIcons (Will apply to all matching categories)

You can also specify single categories and it will apply to ones that match at the bottom level:

list.Set("GlobalTreeIcons", "Half-Life 2", "games/16/hl2.png")
(gives all instances of "Half-Life 2" the HL2 logo.)

Please let me know if you have any requests for this addon or suggestions!

List of built-in addon support:
-TDMCars (Vehicles are categorized by brand)
-Food and Household Items (Food items are divided into subcategories, based on the "kind" of food they are.)
-All NPCs that are reskins of half-life 2 NPCs
-Mac's CoD MW2 SWEPs
-Zelda:BotW Bows Pack
52 Comments
PYROTEKNIK  [author] 3 Jun @ 4:43pm 
at the moment i have other obligations.
Munchy 3 Jun @ 2:50pm 
I hate to be that guy but is there any plans to update this addon?
joby29 1 May @ 8:57pm 
could use settings and fixes and combine and rebels not in crappy reskins but good mod:AngelDude:
Just_Moss 31 Mar @ 2:08pm 
I've noticed the combine and rebels are in crappy reskins any plan on fixing?
Dingus 15 Jan @ 12:56pm 
bro im begging for you to put a "new added addons" category, is always a pain in the ass trying to find the stuff that i just subcribed to
PYROTEKNIK  [author] 11 Jan @ 11:47am 
i plan to
Xer0z 11 Jan @ 12:43am 
bro you should really add the ability for users to be able to edit categories in the entities and weapons and vehicles categories your own like how you can on the spawn lists just more streamlined
Tris The 7 Jan @ 8:38am 
Had some mods Specifically LVS loose their category icons and it shifted its say 15 category menus to the top, technically its their fault for not removing their entities that are on the vehicles tab but worth letting you know.
Moose75 14 Dec, 2024 @ 12:01pm 
Me likey dis mod, good job my friend
PYROTEKNIK  [author] 13 Dec, 2024 @ 10:41am 
i don't understand what you're asking me to do. isn't that what it already does?