While I'm at it, if you had an interaction with I_TARGET:A:whatever, what does the A do? I've seen B and C there as well and I can't find what they mean anywhere
A, B, C etc. are identifiers used to label the targets for an interaction, and work the same way as they do in reaction raws. They can be anything you like in the
interaction definition, but the
can do interaction code must use whatever identifier is defined in the
interaction definition. Lemme try and unpack the cat's head bump interaction as an example:
The following is the interaction definition for the cat's bump:
[INTERACTION:BP_BUMP]
[I_SOURCE:CREATURE_ACTION]
[I_TARGET:A:CREATURE]
[IT_LOCATION:CONTEXT_BP]
[I_TARGET:B:CREATURE]
[IT_LOCATION:CONTEXT_CREATURE]
[IT_MANUAL_INPUT:creature]
[I_EFFECT:CONTACT]
[IE_TARGET:A]
[IE_TARGET:B]
[IE_IMMEDIATE]
From this, we can see that there is a target called
A, a creature whose provided body part is going to be used in the interaction, and
B, that must be a creature. The effect of the interaction (outlined in I_EFFECT) is to make the thing designated as
A (so the creature
A's given body part) make contact with target
B (which is a creature).
Then within the cat's creature definition, it has its own
can do interaction which governs how it selects the targets
A and
B to feed into that interaction:
[CAN_DO_INTERACTION:BP_BUMP]
[CDI:ADV_NAME:Head bump]
[CDI:USAGE_HINT:GREETING]
[CDI:BP_REQUIRED:BY_CATEGORY:HEAD]
[CDI:VERB:head-bump:head-bumps:bump heads]
[CDI:CAN_BE_MUTUAL]
[CDI:TARGET:A:SELF_ONLY]
[CDI:TARGET:B:TOUCHABLE]
[CDI:TARGET_RANGE:B:1]
[CDI:MAX_TARGET_NUMBER:B:1]
[CDI:WAIT_PERIOD:20]
This section is where we define what body part is being used as the CONTEXT_BP in the interaction. Because the interaction itself only cares that it is a body part, we could use whatever body part we wanted in this CDI.This section is where we define what creature is set to be A (and it must be a creature, because that's what the interaction has said that it is expecting for A). Because the CDI says that A is going to be set to SELF_ONLY, that means that the cat doing this interaction is going to be selecting itself to be A in this instance.This outlines what creature the cat selects to be B. It says that there must only be 1 target for B, and that it must be touchable and within 1 range of the cat using this interaction. Because the interaction itself only cares that it's being given a creature for B, we could edit this CDI entry in a number of ways. We could remove the touchable requirement, change the range of how far away the creature can be, or make it so the cat can select any number of creatures to be the target B.If we wanted to make the labels more descriptive, we could change the
interaction definition so that
A is instead called
BUMPER, and
B is called
TARGET. Of course, after changing what the ids are called in the interaction, we'd also have to change the
can do interaction to use
BUMPER and
TARGET instead of
A and
B.
I kinda went on a bit of a tangent there just to get to that simple explanation, I hope that was possible to follow
tl;dr - Stuff like A, B, C, etc. are just arbitrary labels that can be anything.
Interaction definitions define what each of those targets should be (like a creature, location, etc.), and
can do interaction definitions define what a creature chooses to be each of those targets.