Inheritance, duplicate and override
This reference explains prefab creation commands. Use it when choosing a base or deciding how to make a copy.
Inheritance — a shared base
Section titled “Inheritance — a shared base”Suppose a rifleman and a medic need the same uniform but different equipment. Create a shared uniform prefab, then use Inherit in to make rifleman and medic prefabs from it. The shared prefab is called the parent; the variants are its children.
- Shared base: jacket, trousers, boots
- Rifleman: shared uniform + own weapon and ammunition
- Medic: shared uniform + own weapon and medical supplies
Change the jacket in the shared base and both characters get the new jacket. If you assign a different jacket in the medic’s own prefab, the medic stops taking that setting from the base.
Duplication — a copy to edit separately
Section titled “Duplication — a copy to edit separately”Duplicate to copies a prefab. For example, copy a finished rifleman and change the copy’s weapon — the original rifleman stays as it was.
Duplication does not remove existing inheritance. If the original rifleman took its uniform from a shared base, the copy will also take it from that base.
Do not duplicate a prefab just to rename it or make one for every soldier. You can assign an existing hat directly from the game. For characters sharing a uniform, inheritance is easier: you only need to configure that uniform in one place.
Override — changing the original prefab
Section titled “Override — changing the original prefab”Use Override in when you want to change the original prefab itself. For example, overriding a vanilla rifleman’s jacket gives the new jacket to every character using that prefab while your addon is loaded.
For a separate rifleman variant in your mission, create a child or a duplicate. An override also affects other places where the original prefab is used.