PrimalItem Class

They probably don’t make it up on the fly, it takes some design aspect, and foresight in creating groups, in this case they are programming with object oriented, with game object decoupling in mind.

I was a bit baffled to find C4 is a ammo type (as I thought you could pace it by hand) realized the c4 detonator is the weapon that consumes c4.
But most of the setup they did was to create a template for the items (base classes) that has the components and variables that would be shared among all of that type PrimalItem being the great-grand-parent why even things like a helmet will have an option for a weapon template. This is so things like inventories can hold them all more easily thanks to inheritance (parenting classes)

I bet if you look at base_pants it will have a parent of armor_base or something like that, and all armors will point to that.
But like I mentioned, it’s easier to get the list of “do not want” and compare against them rather than the list of “I want” if you are doing a vastly broad want. Some of my buffs and items have small want lists so I don’t mind going “It is this, or this, or this” because it’s only like 5 items.