Creating Content ‐ Attachments - FlansMods/FlansModReloaded GitHub Wiki
How to Create Content - Attachments
See Vender's Game Attachment Definitions for some practical examples.
{
"itemSettings": {},
"attachmentType": "Sights",
"modifiers": [],
"mechaEffects": [],
"mechaEffectFilter": "",
"handlerOverrides": [],
"actionOverrides": [],
"reloadOverrides": [],
"abilities": [],
"modeOverride": "FullAuto",
"overrideFireMode": false
}
Attachment Type
Where can this attachment be used? (Not every slot is implemented in the mod yet, armour and/or vehicle slots for example).
Available types:
Barrel,
Sights,
Stock,
Grip,
Generic,
Tool,
Arm,
Leg,
Head,
Shoulder,
Feet,
Hips
Item Settings
See Shared Elements
Attachments can stack above 1, but can only exist on Guns as a stack of 1. This is handled for you when a player attaches one.
Modifiers
See Modifiers
Adding Gun-like behaviours to the parent
Using some of the overrides in an Attachment, you can add actions or handle inputs in your attachments.
When running in game, these are referred to by an extended path, such as barrel/0/ads
.
Note: These action groups are not functional unless the gun provides an InputHandler that checks attachments.
actionOverrides
: Acts like an ActionGroupreloadOverrides
: Acts like a ReloadhandlerOverrides
: Acts like a InputHandler