I've tried that, actually. I threw the rcs_base and the rcs_ump into the entities/weapons, then created the item code in the /items/ folder, and gave it the same class name. Yet, I must be missing something, as all it did was make the gun disappear when I tried to "use" it, and it wasn't in my weapon scroll menu.
What goes into the item code that makes it point at the entites/weapons/ folder and links the two files together? Meaning, what line(s) goes in here to make Tiramisu know to grab the SWEP entity data from that folder?
The OA I worked with had a line like (in what would've been the custom SWEP):
ITEM.Name = "UMP";
ITEM.Class = "rcs_ump";
ITEM.Description = "A sturdy, rapid-fire submachine gun.";
ITEM.Model = "models/weapons/w_smg_ump45.mdl";
ITEM.Purchaseable = true;
ITEM.Price = 400;
ITEM.ItemGroup = 3;
ITEM.Offset = Vector( 4,-4,-2 )
ITEM.OffsetAngle = Angle( 45,0,0 )
ITEM.Bone = "chest"
ITEM.WeaponType = "big"
ITEM.Wearable = true
That would point the item.lua file to the entities/weapons/rcs_ump/ folder, with the SWEP code.
ITEM.base = "weapon_base";
ITEM.name = "UMP";
ITEM.weaponClass = "rcs_UMP";
So I assume the same sort of thing applies here? "ITEM.Class = "rcs_ump";" points to the entities/weapons/rcs_ump/ folder. What sort of base do the default HL2RP weapons have then? I'm guessing the errors I'm getting are due to the shared.lua from either the weapon's SWEP code, or the weapon's base code, so does anyone have an example I can check out?
Thanks for the examples.
Believe it or not, I had no trouble making other clothing/helmet items. That's pretty straightforward, since all you need to do really is duplicate another clothing item's fields and rename stuff, then change the model path to the new one.
On the more advanced side of things, would there be a way to adjust where the player's head is if a certain clothing item was worn, or a specific helmet item was worn?
For instance, the Balaclava on a standard citizen outfit makes the neck looked stretched, so is there a way to have the system adjust to something like that if the Balaclava is on? Maybe something like scaling the head down if the default clothes are on?
Chances are the Balaclava might clip if it's vertically moved further down into the body, but I'm not sure if bones can be offset to begin with (through the item code).