CA <source id>, <association type identifier>, <target id>
- A numeric identifier for the source or "owner" node.
<association type identifier>
- A pre-defined association, that was created with the CAD command.
- A numeric identifier specifying the node that is being associated with the source.
This is a CLI command that creates an association between source and target nodes. The association used (such as "in" "on" "spoken_with" "explored", etc.) must be a pre-created association from one of the association groups. The flags that are set on the group, such as "exclusive" or "unique" will determine how this association is applied to the nodes with the CA command.
For example, the "in" association could be part of a pre-created association group called "container_attachments" which is comprised of the associations "in on under behind". That group could be EXCLUSIVE, which means that a given node could only be "in/on/under/behind" one other node at a time. Therefore, this new CA association would override and remove other associations in the group that it conflicted with. Please see the Create Association Type Definition (CAD) page for more information.
Suppose you have a sword node, id# 333, which you wish to place "in" a container such as a backpack node, id# 23456. The source would be the backpack since it's the "owner" of the sword, which is the target.
: ca 23456, "in" , 333
Then if you wished to later place the sword in a locker, node id #34567:
: ca 34567, "in", 333
This would create the "in" association between the sword and locker, and remove the "in" association from the backpack, since the group was exclusive and one node can only be "in" one other node at a time.