The KRISS Vector mod is published under the Backblast Studios licenseExample code on this site is free to useBug reports: Backblast Studios DiscordLicense
KRISS Vector
Prefab variants New
Eight weapons, one prefab with everything. The others are short.
In plain wordsOne full prefab, and every colour and calibre only holds what is different.
The idea
A prefab can inherit from another prefab (GenericEntity : "{guid}path" { ... }) and hold only the differences. The black 9 mm Vector is the base: it has all the
components, slots, sounds and scripts. A colour or the .45 ACP version is a short child with a different id, material, name and, for the .45 ACP, the magazine well and sounds.
Rules that matter
| Rule | What it means |
|---|---|
| Blocks are matched by object id | A child block with the id of a base block overrides that block. A block with a new id is added. |
| A class change replaces the block | If the child gives the same id a different class (another magazine well type), the whole block is replaced. |
| Arrays and properties are replaced per key | A child that lists a property replaces the whole property, including a whole array. |
| Shared ids must be the same | A material assignment has an id; if a child uses a different id it ADDS a second assignment instead of overriding. |
A generator that builds every full prefab and computes the difference to the base keeps this reliable: it can merge the child back onto the base in memory and compare the result with the full prefab.