Skip to content

Sockets

Sockets allow to attach items onto other items. For example, a Sword can have a socket that allows to attach a Rune so it increases its properties.

Item Sockets

Inherit Parent Sockets

Ticking the Inherit from Parent checkbox will instruct the Item to inherit all Sockets from its parent(s).

The socket section is divided in two parts: The part that defines the object attached to the socket, and the part that accepts attachments.

Objects attached to Sockets

The Socket Prefab field accepts a prefab game object, which is instantiated when attaching this Item onto another Item's Socket.

Item Sockets Prefab instance

To configure where the prefab is instantiated, the scene prefab object must have a Prop component. This component automatically updates and correctly instantiates the attachment prefabs in the right places, defined in the component's Editor.

Item Sockets Prop component

In this case, the Metal Shield has a Prop component that inserts the instance of a prefab of any attached rune at the center of the socket.

Configuration of Sockets

To add a Socket to an item, simply click on the Add Socket button.

Item Sockets new Socket

A Socket is defined by a Base Item that determines which types of objects can be attached to, and a Socket ID, which is used by the Prop component.

Base Item

It is important to note that the Base item determines the type of item that the Sockets accepts, not the specific item. In the example above, it accepts a Rune item, but will also accept any item that has a Rune item parent, such as the Rune of Attack and Rune of Defense included in the examples.

How Properties affect Sockets

When attaching an Item onto another one's Socket, only their shared Properties are added.

Sword with a Rune of Attack

Let's imagine we have a Sword with a single Property

  • attack = 10

And a Rune with the following Properties:

  • attack = 5
  • defense = 5

Attaching the Rune to the Sword results in the latter have an attack value of 15 (10 + 5), but will ignore the defense Property because it is not present in the Sword.