Combat Teaching¶
The game teaches the parry, the charge and the flask to players who haven't used them yet. For the parry and the charge the world shows the move first, the game then asks for it once against a safe target, and a short line of text appears only for a player who hasn't done the move. The flask gets one line at the moment it is needed. Nothing pauses, nothing blocks, and nothing slows down: slowing a tell teaches the wrong timing. Each line is a first-time hint, recorded per character as a quest tag, so a player who already parries never sees it.
Design and the forest-start layout: ImplementationDocs/CombatTeaching.plan.md.
The three pieces¶
Echo (scenery) Charge breakable (world object) Teaching subsystem (local player)
ACombatEchoActor AChargeBreakableActor UCombatTeachingSubsystem
two apparitions replay light swings chip it; watches what this machine sees:
tell -> parry -> charge, a charged swing breaks it telegraph cue, guard window, hits,
naming each button and drops its loot parry cue, charge level
| | |
+---- ShowInput ----------------+---- ShowChargeHint ------------------+
v
UFirstTimeHintSubsystem (world anchors)
Teaching subsystem¶
UCombatTeachingSubsystem (a local-player subsystem) reads only events this machine already has, so it adds no network traffic:
| Event | Source | What it does |
|---|---|---|
| An enemy's warning plays near the player | UGameplayCueNotify_Telegraph::OnTelegraphPlayed (seconds to contact, parryable or not) |
Shows "[Block] Block as the blow lands" beside the enemy until the blow has passed |
| The guard's parry window opens | State.Parrying added on the player's ASC (predicted, so it marks the press) |
Records the press time |
| The warned blow lands | Health drops on the player's ASC near the expected contact | A press before it: "Early". No press: waits half a second for a late press, then "Late" |
| The player parries | UGameplayCueNotify_Parry::OnParryPlayed |
Marks the parry learned and logs the first-parry line |
| A charge level is reached | UPlayerCombatComponent::OnChargeLevelChanged (fires on clients) |
Marks the charge learned |
| Health falls below 35% | The health attribute on the player's ASC | Shows "[key] Heal" at the flask's slot on the skill bar, if a charge is left. It goes once health is back above 60%, or the flask is empty |
| A flask ability starts | AbilityActivatedCallbacks on the player's ASC (a UConsumableAbility on the flask slot) |
Marks the flask learned |
The parry line retires. A player who lets five warnings pass without touching the guard has been told, and fights another way: the line is marked learned and stops (MaxIgnoredTells). A press that misses does not count, so a player who is still trying keeps the line and the Early and Late words. A guard held through the warning counts as letting it pass: that player has chosen to hold.
No line on a boss. A boss (UBossDataAsset) is where the parry is tested, so its warnings carry no text.
The two flask thresholds are apart so a bleed ticking across one of them does not flick the line on and off.
The warning comes about 0.5 s before contact, and the parry window lasts 0.25 s from the press. A press made when the star flashes has already closed its window by the time the blow lands. That's why the line says to block as the blow lands, not when the star flashes. The Early and Late words exist because a player told only "missed" has no way to correct.
Button names come from the active device's binding, in the skill bar's short form ("Alt", "RMB", "LT", "RB").
Eternal.Teaching.Forget clears the three lessons on the local players, for testing a character that has already learned them. Each world logs one LogCombatTeaching line at the first parry (seconds into the level, warnings seen, early and late misses), one at the first charge, and one if the parry line retires unanswered.
World anchors for first-time hints¶
FFirstTimeHint accepts a WorldAnchor (a scene component) and an offset. The hint subsystem projects that point every frame and draws the hint beside it, the same way it does for a widget anchor. A point behind the camera or off screen counts as not drawn, and the hint waits. LearnedBy = Doing keeps a hint about doing something from being marked learned just because it was read. An NPC's first-meeting line uses the same anchor (World Systems).
Echo¶
ACombatEchoActor places two skeletal figures, a fighter and a foe, with optional weapons and a look layer posed by the foe's body. They act out a list of FCombatEchoBeats: an animation on a figure, an effect on a named component's socket, a sound, a button named above the figure, and a short freeze that gives a parry or a break its weight. It plays while a local player is within ShowRadius, rests between showings, and fades for good once the player walks within DismissRadius. An echo with LastsUntilClearedSpawner set ignores DismissRadius and stays until the spawner reports every enemy it made dead or gone (AEnemySpawner::AreSpawnedEnemiesDefeated, replicated, so a guest who never saw those enemies, having joined after the fight, still sees the echo go); the tutorial room's parry echo is tied to the first cultist's spawner, so it keeps showing until the cultist falls. An echo with LastsUntilBroken set stays until that breakable is broken (its replicated broken state, so a guest's goes with the host's). Every mesh gets the echo material, and the fade drives that material's Dissolve. It is local scenery: no collision and no replication. Out of sight and not playing, it looks for a player ten times a second rather than every frame. When it disperses it withdraws only a button named above its own figures.
A beat that names the button already shown above the same figure keeps it up rather than showing it again, so a held button named on several beats reads as one steady prompt instead of popping in once per beat. The prompt names the move with its key, because a player who has never parried or charged can't tell the two apart from a key alone: Block reads "[key] Parry", HoldHeavy reads "Hold [key] Charge", and a plain Heavy reads "[key] Heavy attack".
Each echo teaches one new move. The parry echo (BP_CombatEcho_Parry) shows the cultist's overhead swing, the fighter's parry under "[key] Parry", and then a plain heavy attack under "[key] Heavy attack" that lands on the reeling cultist: the payoff of a parry, with a button the player already knows. The charge is left to the charge echo at the totem, further down the road.
The echo plays the fight as it looks in play, timed to the clips' own contact frames. The cultist's blade lands 1.12 s into its overhead (played at rate 2, as its montage is); the fighter's guard goes up as the press is made, 0.12 s before. On the parry the cultist plays the stagger a parried enemy plays (LS_HitLegsRight_ALS, from AM_Stunned_ALS) on the same beat, and is shoved back by it. The heavy (AS_2HSword_HeavyAttack_01) starts within the 1.2 s opening a parry gives, steps in, and its blade reaches the cultist on the beat its hit reaction plays.
A beat's InputSeconds is how long its button stays named (1.2 s by default): a word that flashes up only with the press is gone before it is read. A beat's bMovesFigure lets the clip's root motion carry the figure, as it carries a character in play; off, the clip plays on the spot. Each showing puts the figures back where they began. A clip's own rate scale counts toward when the figure returns to its idle.
The charge echo (BP_CombatEcho_Charge) is the fighter alone: no foe is drawn and no beat is the foe's, because what it strikes is a real totem placed beside it. It winds up a charge with "Hold [key] Charge" above it for the whole hold, releases into the totem, and freezes on the blow, which breaks nothing. Tied to that totem by LastsUntilBroken, it keeps showing until the player breaks the totem.
The Glyph Wall echo (BP_CombatEcho_GlyphWall, placed at the wall in L_Room_Forest_End) is a figure standing at the wall, with no beats and no text: someone was here before and used it. bLastsUntilGlyphWallOpened keeps it until this machine's player has the Glyph Wall panel open, then it is gone for the rest of that visit; nothing is recorded, so it stands again the next time the room loads. It shows for 6 s and rests for 14 s, since it has nothing timed to teach and should not hold the eye. Its pose is the cultist's relaxed idle, a stand-in until a clip of someone working at the wall exists.
The echo material (M_EchoHaze, instance MI_EchoHaze) is unlit translucency with refraction, so the world bends a little through the figure. It needs the Clothing usage flag. Without it, a figure's cloth sections draw the default material. Its look lives in Shaders/EchoApparition.ush (a Custom node includes /ProjectEternal/EchoApparition.ush): a warm rim where the surface turns away from the camera, and a soft key light on the body (BodyFill) so the pose and the swing read. There is no noise on a standing figure, so every showing looks the same. Noise only erodes the feet and the figure as it fades.
Only the nearest surface draws. The material writes translucent custom depth and each mesh renders custom depth, so a back face or a limb behind the body is skipped instead of doubling the glow where faces overlap. Echo meshes use custom stencil 200, which the camera's outline post process (M_PP_Outline) skips; otherwise every echo would get a white outline.
The Echo of Martha (BP_EchoOfMartha) wears the same look through MI_EchoHaze_Martha, with no light of her own. Vapor comes off her from the chest up: a card (Vapor) plays T_MarthaVapor_Flipbook, which FlipbookForge baked from her own outline (recipes/MarthaVapor.json). M_MarthaVapor fades the smoke by its distance from the outline, so it reads as her body coming apart near the edge and as smoke further out. In the forest start she is not there until the player reaches the metal sheet, then fades in on the road (Scripted Staging).
Her outline changes with the side the camera sees (from the side she is half as wide), so the flipbook holds twelve bakes, one every 30 degrees around her, starting 25 degrees off her facing. The material picks the bake from the direction between the camera and her, and crossfades two only near the midpoint between them. The card turns to face the camera in the material (world position offset), at the size and height of the captured frame (FrameWidth, VMin, VMax), so she can stand at any yaw. The component itself only sets the frame's centre (24 cm above her origin) and follows her rotation, which the material reads as her facing. After changing her mesh or pose, capture the views again (Tools/FlipbookForge/ue_capture_views.py in PIE, then silhouettes_from_capture.py) and rebake. The atlas keeps only the rows the card shows (CropV0, CropV1).
The wandering merchant (BP_WanderingMerchant) wears the same haze through MI_EchoHaze_Merchant, in pale gold so he reads apart from Martha's orange, with the same custom stencil and no light of his own. He has no vapor. His placed instances still hold the material instance their construction script made from the old apparition look; MI_EchoApparition_Recolor is kept as an empty child of MI_EchoHaze_Merchant so those instances resolve to the haze until the maps are saved again.
Smoke rises off both figures: a Niagara component per figure runs NS_EchoWisp, which spawns flipbook wisps (T_EchoWisp_Flipbook, baked by FlipbookForge) on the figure's spine, head and limb bones. The echo sets the effect's Fade user float with the material's fade, so the smoke stops as the figure goes. A freeze slows both figures and their smoke, so the smoke holds with the pose. Effects a beat spawns and the button names above the figures keep real time.
Charge breakable¶
AChargeBreakableActor is a loot container that a weapon swing can strike. It implements IWeaponHitReceiver, which UCombatComponent::OnActorHit checks before its "victims have an ASC" gate, passing the swing's weapon type. Every strike plays the impact matrix row for that weapon on the surface the actor's Mesh physical material names, as a hit on a body does, so the totem (PM_BreakableWood, a Wood surface) throws wood chips (NS_Impact_WoodChips) and gets the hit stop and shake of any connect. The striker, weapon type and blow direction replicate with the strike, so every machine plays the same row. Only a player's swing counts: an enemy swinging at a player beside it neither wears it down nor shows the line. It has a little health. An ordinary swing takes StrikeDamage and makes it shudder. A charged swing takes ChargedStrikeDamage, enough to break it in one; a swing counts as charged when the attacker's charge component holds a successful stored charge for that swing. After StrikesBeforeHint strikes, every local player is shown the charge line (once: further strikes leave the line already up as it is), unless an echo is tied to this breakable (LastsUntilBroken): that echo already shows the charge with its button, and the line would say it twice. A totem with no echo beside it keeps the line. Broken, it topples as a physics body pushed away from the blow and lies where it lands, ignored by pawns and the camera (or, with bToppleOnBreak off, swaps to BrokenMesh), and it opens the container. With a Shatter geometry collection set (Chaos, pieces cut by Eternal.Fracture.FromMesh), an ordinary strike only shudders it (its chips are the impact row's effect) and the break cuts the post down: everything above StumpHeight comes loose and goes along the blow, and the stump stays. The throw is slow (ShatterSpeed 320 cm/s where the blow lands, a quarter of that at the far end, with little lift or spray), so the post tips over the way it was struck and falls with its own weight; a fast throw makes pieces this size read as sticks. A strike that knocked pieces loose would cut the post through, because each piece spans its whole width, and leave the top hanging where it stood until the break. The pieces land dead (PM_BreakableWood: restitution 0.02, friction 0.9) and stay where they fell, because removal on break and on sleep is off. Pieces only rest on simple collision, so a level's ground needs a simple collision shape with depth: the forest ground meshes had a box 0 cm thick, which carried the player but let every piece fall out of the world (their boxes now go 50 cm down from the same top). Swings strike StrikeVolume, a plain box. The player's weapon trace tests exact geometry, so it would lunge past a thin post. The server decides and keeps the health; strikes, the break and its direction replicate with the server time of each, and each machine runs the shudder and the fall itself. A strike or break learned of more than a second later (a guest joining, or coming back into range) is applied without its effects: the totem is simply already broken, its pieces lying where they fall without being thrown.
BP_ChargeBreakable_Totem is the authored one: a cult totem, placed here and there in forest rooms (not in the start room). The first stands near the tutorial room's far end, past the first cultist (L_Room_Forest_Tutorial, local (-1250, 230), 2.3 m off the road; the cultist's spawner is at (-500, 8), 13 m past the parry echo), with the charge echo's fighter on the road 1.7 m from it, so the charge is the next thing taught after the parry; rooms J and LM have one each. Breaking a totem withdraws the charge line beside it (HideChargeHint), which would otherwise float on where the post stood when it was worn down rather than charged; a line beside another totem stays, and the next totem shows it again until a charge is done.
BP_ChargeBreakable_Cage is the same thing as a cult cage (SM_Cage_01a, a strike box the size of the whole cage, the totem's health, sounds and loot settings). The three cages in rooms J and LM are placed as this Blueprint; variants 01b and 01c set their mesh and their collection (GC_Cage_01b, GC_Cage_01c) on the placed actor. A cage is bars, so its cut has many more pieces than a post (160 to 200, whatever the site count).
A swing aimed loosely at a breakable turns to it when no enemy could take that swing (Combat Overview): the breakable offers its strike volume's centre as the aim point until it is broken.
Eternal.Fracture.FromMesh <StaticMesh> <GeometryCollection> [Sites] [Seed] (editor console) cuts a static mesh into a one-level Voronoi geometry collection and saves it, rebuilding an existing collection in place. A material drawn on a collection needs the Geometry Collections usage flag.
Related¶
- Block System: the parry window and its whiff recovery
- Charge System: charge levels and the stored claim
- Poise System: an ordinary enemy loses its whole stance to one parry (
NormalTierParryPoiseDamageFraction) Documentation/07_AI_World/01_Enemy_AI.md: enemy telegraphs