Documents & Components¶
The document is a unique instance of a Template (Specific Item: Hunter's Bow, Gold Bar,...), which has its parameter values. Think of it as an instance of a Class as a programmer.
When you add a new Template (Not Component), a new section in the left navigation appears. If you select any of the Document sections, you'll be able to add new Documents there. Each document can have a unique value for all the parameters of its Template.
The component is a simple Template, which doesn't have its Documents and can exist only inside of another Document.
For example, the ItemActionWeapon (inherited from ItemAction) component template has parameters: damage and reload. If a Document "Item" has a Parameter "action" of type ItemAction, you'll be able to edit the damage and reload values of "action" right inside of the "Item" Document.
Injected components are similar to Components, having several differentiators:
- Inheritance doesn't work for Injected components
- When the data is Deployed, Injected Components don't create an independent JSON file, instead, they inject the parameter right in the place where they are used.
- Injected components work slightly faster.
For example, the Vector3 component template has parameters: x, y, and z. If a Document "Hero" has a Parameter "position" of type Vector3, you'll be able to edit the x, y, and z values of "position" right inside of the "Hero" Document.