Input and camera¶
All · 12 min read · No code
What the player sees: every button does one thing at a time, depending on the moment: A jumps, talks to an NPC, or uses the selected Art; the triggers switch the party leader; buttons go quiet behind a menu. The camera follows the leader on a boom, recentres on a button, blends to a new leader on a switch, and frames both speakers in a conversation.
XenoCore uses Lyra's input chain unchanged: a key is mapped to an input action by a mapping
context, the action raises an input tag (a gameplay tag), and
the tag starts whichever ability was granted with it. So almost every button in XenoCore is a small
input ability named GA_XenoCore_*. The camera is built with Unreal's Gameplay Cameras plugin: a
camera component on each playable character runs a camera asset, which runs a rig. The idea that
makes the rest make sense: the input you press never talks to a system directly. It raises a
tag, and the ability system decides whether anything may happen right now. That is also why a
menu, a conversation or target mode can switch buttons off without touching the bindings.
What you can change¶
- Which key does what: the rows of
Input/Mappings/IMC_XenoCore(Settings). - A new button with an on-screen prompt: Add an input action with a button prompt.
- The exploration and conversation camera: Tune the camera.
- When a button is blocked (in a menu, in a conversation): rows of
Game/TagRelationships_XenoCore.
How it fits together¶
Input¶
| Piece | Where | Job |
|---|---|---|
Input/Mappings/IMC_XenoCore |
XenoCore | Keys for XenoCore's actions: targeting, interact, palette, party switch, party tactics, menu, minimap, camera reset, quest tracker |
/Game/Input/Mappings/IMC_Default |
Lyra | Move, look, jump, crouch |
Input/InputActions/IA_XenoCore_* |
XenoCore | One input action per button |
Input/InputData_XenoCore |
XenoCore (a Lyra input config) | Maps each action to an input tag, such as InputTag.XenoCore.TargetNext |
Game/AbilitySet_XenoCore_Input |
XenoCore | Grants every input ability, each with its input tag, to the player's body and every party member's |
Game/AbilitySet_XenoCore_Interact |
XenoCore | Interact on A and X, the three party-switch abilities and the four party-tactics abilities, granted to the leader only (the party's Leader Only Ability Set) |
Input/Abilities/GA_XenoCore_* |
XenoCore | What each button does |
Game/TagRelationships_XenoCore |
XenoCore | Which states block which abilities |
Config/DefaultInput.ini |
Project | Turns gameplay input off while a menu is open |
Both mapping contexts are added by the plugin's own game feature data (XenoCore.uasset at the
plugin content root), IMC_XenoCore at priority 2 and Lyra's IMC_Default at priority 1, so they
are active in every XenoCore Experience. The pawn data (Game/PawnData_XenoCore_Player and each
Characters/Party/PawnData_XenoCore_Party_*) points at InputData_XenoCore, and lists
AbilitySet_XenoCore_Input beside the body's own set (AbilitySet_XenoCore_Hero for the player's
pawn, AbilitySet_XenoCore_PartyMember for the others), which hold only non-input abilities.
| Button | Input tag | Ability |
|---|---|---|
| Lock on / next target | InputTag.XenoCore.TargetNext |
GA_XenoCore_TargetNext (its XenoCore.Event.SwitchTarget event also starts GA_XenoCore_TargetMode) |
| Previous target | InputTag.XenoCore.TargetPrev |
GA_XenoCore_TargetPrev |
| Leave target mode | InputTag.XenoCore.TargetModeExit |
GA_XenoCore_TargetModeExit |
| Palette up, down, left, right | InputTag.XenoCore.PaletteUp (and so on) |
GA_XenoCore_PaletteUp (and so on) |
| Use the selected Art | InputTag.XenoCore.PaletteConfirm |
GA_XenoCore_PaletteConfirm |
| Interact, second verb | InputTag.XenoCore.Interact, InputTag.XenoCore.InteractSecondary |
GA_XenoCore_InteractPress, GA_XenoCore_InteractPressSecondary |
| Open the menu | InputTag.XenoCore.ToggleMenu |
GA_XenoCore_ToggleMenu |
| Open the menu (Escape key) | Lyra's UI.Action.Escape UI action |
Pushes the HUD layout's Escape Menu Class, W_XenoCore_MenuShell |
| Switch to the previous member (tap LT / Z) | InputTag.XenoCore.PartySwitchPrev |
GA_XenoCore_PartySwitchPrev |
| Switch to the next member (tap RT / C) | InputTag.XenoCore.PartySwitch |
GA_XenoCore_PartySwitch |
| Party cursor (hold LT, RT, Z or C) | InputTag.XenoCore.PartySelect |
GA_XenoCore_PartySelect |
| Show or hide the quest tracker (View/Back, J) | InputTag.XenoCore.QuestTracker |
GA_XenoCore_QuestTrackerToggle |
| Switch Attack between Focus and At Will (tap X / F) | InputTag.XenoCore.PartyCommand |
GA_XenoCore_PartyTacticFocus |
| Hold the party tactics list open (hold X / F) | InputTag.XenoCore.PartyTactics |
GA_XenoCore_PartyTacticsPanel |
| Tactics for the next / previous member, while the list is open (RB / LB, Tab / Q) | InputTag.XenoCore.TacticsScopeNext, .TacticsScopePrev |
GA_XenoCore_TacticsScopeNext, GA_XenoCore_TacticsScopePrev |
| Full-screen minimap (L3 / M) | InputTag.XenoCore.MinimapOverlay |
A built-in C++ ability (no asset to edit) |
| Recentre the camera | InputTag.XenoCore.CameraReset |
GA_XenoCore_CameraReset |
| Jump | InputTag.Jump |
Lyra's GA_Hero_Jump |
The key for each button is listed on Controls.
Camera¶
| Piece | Job |
|---|---|
Cameras/CA_XenoCore_Player |
The camera asset. A single-rig director that always runs the explore rig |
Cameras/CameraRig_XenoCore_Explore |
The exploration camera: boom arm, collision push, position and rotation damping, offset, field of view |
Cameras/CameraRig_XenoCore_Dialogue |
The conversation camera: field of view and the XenoCore Dialogue Framing node, blended in and out |
Gameplay camera component on Game/B_XenoCore_Player and Characters/Party/B_XenoCore_PartyMember_Base |
Runs CA_XenoCore_Player for that character |
Lifecycle¶
A press. Enhanced Input fires the action. Lyra's hero component turns it into the input tag, and the ability system activates the ability granted with that tag, unless something blocks it.
One press, one activation. Every IA_XenoCore_* action carries a Pressed trigger. Without
a trigger, Enhanced Input fires every frame the key is held. An ability that ends on the same
frame it starts (most input abilities do) would then run again on each of those frames, so one tap
became several presses.
Blocking by state. TagRelationships_XenoCore blocks abilities while a state tag is on the
player. Its rows:
| Ability tag | Blocked while the body has |
|---|---|
Ability.Type.Action.Jump (Lyra's jump) |
Status.XenoCore.Looting (the prompt holds A), .TargetMode, .Dialogue, .Downed |
Ability.XenoCore.Art |
Status.XenoCore.Dialogue, .Defence |
Ability.XenoCore.AutoAttack, Ability.XenoCore.TargetMode, Ability.XenoCore.ToggleMenu |
Status.XenoCore.Dialogue |
Ability.XenoCore (every XenoCore ability) |
Status.XenoCore.Downed |
A row keyed on a parent tag such as
Ability.XenoCore.Art covers every Art, including ones you add later. An ability with no ability
tags cannot be reached by any row.
Tap and hold on one key. The triggers carry two input actions each. IA_XenoCore_PartySwitchPrev
(LT, Z) and IA_XenoCore_PartySwitch (RT, C) have a Tap trigger; IA_XenoCore_PartySelect (all
four keys) has a Hold trigger. Both use 0.25 s, so a short press switches and a long one opens
the party cursor. The three switch abilities differ only in Mode (Next, Previous, Select) in
their Class Defaults, and they live in the leader-only set, so only the body you drive holds them. While the cursor is open
the D-pad (arrow keys) moves it instead of the Arts palette; left, right and confirm do nothing, so
a stray press cannot fire an Art.
Fails silently: a one-shot Hold trigger
IA_XenoCore_PartySelect's Hold trigger has Is One Shot off. With it on, the trigger
reports a release on the frame after it fires, so the cursor opens and commits at once and
the hold looks like a tap. Keep it off on any hold-to-open input.
Menus. While a menu screen is open, IMC_XenoCore and IMC_Default switch off, so nothing in
the game world can react to a key behind a menu. That is set project-wide in
Config/DefaultInput.ini (the default mapping-context query asks for InputMode.Game), and needs no
setting on each mapping context.
Enter and Space click. Config/DefaultGame.ini sets CommonUI's Common Button Accept Key
Handling to TriggerClick (Project Settings › Plugins › Common UI Framework › Button), so
Enter and Space press the focused menu button, as the pad's A does.
X is shared with Trade. While the interaction prompt offers a second verb (Trade, at a trader NPC), tap X is Trade and does not change the tactic.
The camera runs on every playable character all the time, but only the character the player is
viewing steers the view. Switching the party leader switches which one that is: the view blends
from where it was over Switch Camera Blend Time (0.35 s, on BP_XenoCore_Party). In battle it
then turns onto the locked enemy; out of battle it turns to face the new leader's forward.
- Recentre:
GA_XenoCore_CameraResetsweeps the view round behind whichever character you are driving: over Recentre Duration (0.35 s) it turns toward the character's facing at Recentre Pitch (−10°). It works for whichever character leads. To recentre on something else, such as the locked target, make a child Blueprint ofGA_XenoCore_CameraResetand override its Get Recentre Rotation function. - Conversations stop look input, so the camera cannot turn while a line is on screen, and blend
in
CameraRig_XenoCore_Dialogue: over the player's shoulder at the NPC, close enough to read, held still until the conversation ends. See Interaction, NPCs and dialogue.
Settings¶
| Setting | Where it lives | What it does |
|---|---|---|
| Key rows | IMC_XenoCore › Mappings |
Which key or button fires each XenoCore action |
| Movement, look, jump keys | IMC_Default (Lyra) |
Lyra's bindings. Copy the context rather than editing Lyra's |
| Action to tag | InputData_XenoCore › Native Input Actions, Ability Input Actions |
Which tag each action raises |
| Tag to ability | AbilitySet_XenoCore_Input › Granted Gameplay Abilities › Input Tag |
Which ability a tag activates, for every playable body at once |
| Blocking rules | TagRelationships_XenoCore |
Which states block which abilities |
| Boom length, offset, damping, collision, field of view | CameraRig_XenoCore_Explore |
Exploration camera feel |
| Focus Bias, Distance, Orbit Angle, Elevation, Box Headroom, field of view, blend times | CameraRig_XenoCore_Dialogue › XenoCore Dialogue Framing node, Field of View node, transitions |
The conversation shot. The camera backs off from Distance only as far as it must to fit both heads and the box over them |
| Dialogue Camera Rig | Project Settings › XenoCore Content › Dialogue | Which rig conversations use. Clear it to leave the camera alone |
| Party-switch keys and tap/hold time | IA_XenoCore_PartySwitch, IA_XenoCore_PartySwitchPrev, IA_XenoCore_PartySelect › Triggers |
Which keys switch and open the cursor, and how long a press must be to count as a hold (0.25 s) |
| Switch Camera Blend Time | BP_XenoCore_Party › XenoCore › Party › Switch |
The camera blend on a leader switch. 0 cuts |
| Recentre Duration, Recentre Interp Speed, Recentre Pitch | Input/Abilities/GA_XenoCore_CameraReset › XenoCore › Camera |
The recentre sweep: its length (0.35 s; 0 snaps), speed (8) and final pitch (−10°) |
See Tune the camera and Add an input action with a button prompt.
Several keys are shared
Pad A is Jump, Interact and Palette Confirm; Space is Jump and Palette Confirm; pad B is
Crouch and Leave Target Mode. Each trigger carries a tap action and a hold action on purpose. Which one wins depends on state and on the blocking rules above.
InputData_XenoCore also maps Lyra's Crouch.
Fails silently: a new one-shot action with no trigger
If you add an input action without a Pressed trigger and bind it to an ability that ends at once, one tap fires the ability several times. Nothing is logged. Add the Pressed trigger to every new button action.
IMC_XenoCore's priority is load-bearing
IMC_XenoCore is added at priority 2, above Lyra's IMC_Default (1) and any context at 0
another plugin adds on the same keys. Lowering it to 0 lets such a context win the tie, and
the pad's look stick can stop working.
Fails silently: an input ability granted twice
Granting an input ability in AbilitySet_XenoCore_Input and in AbilitySet_XenoCore_Hero
or AbilitySet_XenoCore_PartyMember gives that body two copies, and one press activates both.
Grant input abilities only in AbilitySet_XenoCore_Input.
Button prompts. A prompt on a menu's action bar comes from a CommonUI action row, such as the
rows in UserInterface/Foundation/DT_XenoCore_Actions, not from an Enhanced Input action. Some of
those rows exist only to draw a glyph for an Enhanced Input button (the quest tracker toggle on
View/Back and J, dismissing a banner). Such a row must name the same key as the mapping context; nothing checks it
at runtime, so a mismatch is a prompt that lies.
Extending it¶
- A new button: create an input action with a Pressed trigger, add a key row to your copy
of the mapping context, add an action-to-tag row to the input config, and grant an ability with
that tag in
AbilitySet_XenoCore_Input, once. See Add an input action with a prompt. - Rebinding keys: edit
IMC_XenoCore(a XenoCore asset). For Lyra's keys, make your own mapping context and add it in your own Experience or game feature rather than editingIMC_Default. - A different camera: duplicate
CameraRig_XenoCore_ExploreandCA_XenoCore_PlayerintoContent/MyGame/Cameras/, change the rig, and point the camera components at your camera asset. - An Art close-up for another Art: copy the start and stop camera-modifier nodes from
GA_XenoCore_TurnStrike.
For programmers: classes
The full-screen minimap ability is UXenoCoreGameplayAbility_MinimapOverlay; the three switch
abilities are Blueprint children of UXenoCoreGameplayAbility_PartySwitch; the recentre is a
child of UXenoCoreGameplayAbility_CameraRecentre. Menus filter mapping contexts through
Enhanced Input's mode filtering: DefaultMappingContextInputModeQuery and DefaultInputMode
in Config/DefaultInput.ini both carry InputMode.Game, which CommonUI adds and removes. The
conversation camera is started as a global camera modifier rig, and look input is held with
SetIgnoreLookInput.
Why it's built this way¶
For programmers
- Lyra's chain, untouched. Input actions to tags to abilities is Lyra's own design, so every Lyra rule (blocking, relationships, cooldowns) applies to XenoCore buttons for free.
- Blocking by state, not by input. A state tag plus a relationship row is data: the widget or system that owns the state knows nothing about which buttons it blocks.
- Menus filter contexts. CommonUI already reports Game and Menu modes to Enhanced Input. The project default query makes gameplay contexts listen to it, with no change to Lyra's assets.
- Gameplay Cameras. Rigs are data assets a designer tunes in the editor, and a camera modifier rig layers a close-up on top without replacing the exploration camera.
Next: Events you can listen to · Targeting