Spell Piece

Spell Pieces are a mechanic added by Psi. They are used to create custom spells in a Spell Programmer for Casting Assistant Devices (CADs) and can be loaded onto Spell Bullets. They can be classified by:
 * Category: Most Spell Pieces fall under one of the following categories:
 * Trick: Spell Pieces have a direct action in the world or on the player and their inventory.
 * Selector: Spell Pieces target a specific class of entity or an element for a Trick to be activated by.
 * Constant: Spell Pieces will provide a constant value.
 * Operator: Spell Pieces will modify spells on a numerical level, either by magnitude or direction.


 * Type: Some Spell Pieces require other Spell Pieces of certain types to properly function:
 * Entity (List): an Entity or Entity List is required.
 * Number (Constant): a numerical value or a constant is required.
 * Time: a number (which can be created by Constant Spell Pieces) is required. Depending on the spell piece this value can be in seconds or ticks.
 * Vector: a direction (which is usually generated by Operator Spell Pieces) is required.

When a Spell Piece needs other Pieces for its parameters, a config interface will appear on the left-hand side of the GUI. Clicking on the arrows will connect the Spell Piece to the parameter in the position relative to it. If the parameter is optional there will be a dot in the center of the arrows which can be selected to leave the parameter unused.

Spell Pieces are acquired by learning lessons in the Psi menu ("C" key by default when not holding a CAD, a Psimetal tool, or an Exosuit Controller). When a lesson is being learned, the Spell Pieces at the bottom of the description will be unlocked for use.