Recruit a party member by talking to them¶
Designer · 10 min · No code
Result: a character standing in your map. Walk up, press Talk, they say their lines, and they join the party at its current level. The NPC disappears and the new member is standing where they were.
Before you start¶
- Give an NPC a conversation. A recruit is an ordinary NPC with one extra setting.
- The character exists as a party member definition (
Characters/Party/PartyMember_*). See Add a party member. Leave them out ofBP_XenoCore_Party→ Starting Roster, or they are in the party before you ever meet them.
How it works¶
The NPC Blueprint already has the logic. Its On Interact graph calls Try Recruit in two places:
- at the end of plain talk, before the shop check;
- straight after a quest is handed in.
Try Recruit does nothing on an NPC with no Member To Recruit, so every other NPC is unaffected. On a recruit it adds the member to the roster, fields them if there is a free slot, and moves their body to where the NPC stood. Then the NPC leaves.
Steps¶
1. Place the NPC and give them their lines¶
Place Characters/NPC/B_XenoCore_Npc and fill in Display Name and Dialogue, as in
Give an NPC a conversation. This is what the character says before joining.
To make the hand-over read, give the NPC the member's own body: the NPC plays one clip, Idle
Animation, straight on its mesh, so the clip must be on that mesh's skeleton.
- A VRoid member: select the NPC's inherited mesh component and set Skeletal Mesh Asset to
the member's
Characters/VRoid/<Name>/Mesh/SK_AvatarSample_<X>_Lit(<X>is the letter in the member's asset names, for exampleLfor Kael). On the actor, set Idle Animation toCharacters/VRoid/<Name>/Animation/AS_XenoCore_NpcIdle_<X>, a standing idle already retargeted to that skeleton for each of the seven sample members. Set Portrait to the member'sCharacters/VRoid/<Name>/T_XenoCore_Portrait_VRoid_<X>. This is how the five Gaur Plain recruits are set up. For a VRoid character of your own, retarget a standing idle onto its skeleton (right-click the idle, Retarget Animations, using that character's IK Retargeter). - A Mannequin member: its mesh and colour materials, with Lyra's
MM_Unarmed_Idle_Ready.
2. Pick who joins¶
On the placed NPC, under XenoCore › NPC › Recruit:
| Setting | Default | What it does |
|---|---|---|
| Member To Recruit | empty | The only field you must set. The party member definition who joins. |
| Recruit After Quest | empty | Optional. They join only once this quest has been turned in. Usually the NPC's own Quest. Empty = they join the first time you talk to them. |
| Join At Party Level | on | They arrive at least at the leader's level. A recruit authored above the party keeps their own level. |
| Leave When Recruited | on | The NPC leaves and the member stands in their place. Turn it off for someone who stays behind (a recruiter, not the recruit). |
Set it on the placed NPC, never on the Blueprint
Setting Member To Recruit on B_XenoCore_Npc's defaults makes every NPC in every level the
same recruit.
3. Optional: "help me first"¶
- Give the NPC a Quest (see Create a collection quest).
- Set Recruit After Quest to that same quest.
Talk once: they offer the quest. Hand it in: they say their Turn In Dialogue and join.
4. Save the level¶
Test it¶
- Press Play and walk up to the NPC. Their name and a Talk prompt appear.
- Press A (keyboard E) and advance through the lines.
- When the conversation ends, the join banner plays, the NPC is gone, and the member is standing where the NPC was.
- Open the menu (pad Y, keyboard I) and the Party screen: they are listed, at least at the leader's level.
- With Recruit After Quest set: the first talk offers the quest and nobody joins. Hand the quest in, and they join after their Turn In Dialogue.
Things to know¶
- Saves. The roster is saved, so after loading, a recruit already in the party is not standing in the world any more. The NPC checks this a few times a second and removes itself.
- A full party. If every active slot is taken, the recruit goes to the reserve.
- Other ways to recruit. A walk-in volume is
XenoCore Party Recruit Trigger; any Blueprint can call Add To Roster on Get Party Component with Join At Party Level ticked. All three go through the same code.
If it doesn't work¶
Fails silently: the conversation ends and nobody joins
Member To Recruit is empty on this placed NPC (you may have set it on a different copy), or Recruit After Quest names a quest that has not been turned in yet. Only accepting the quest is not enough.
The member is already in the party at the start
They are listed in Characters/Party/BP_XenoCore_Party › Starting Roster, or in Project
Settings › Game › XenoCore Content › Startup › Starting Roster Override. Remove them there.
The NPC is gone when I load a save
Intended: the member is already in the loaded roster, so the NPC removes itself.
The NPC stands in a T-pose
Idle Animation is on a different skeleton from the NPC's mesh. Use an idle made for that mesh.
The member joined but is not fighting. Every active slot was full, so they went to the reserve. Swap them in from the Party screen.