# Skillcraft in Lyra Lyra keeps the ability system on `LyraPlayerState`, so Skillcraft goes there too. Everything below was done in Lyra on Unreal Engine 5.8, on L_Expanse with the Elimination experience and bots, once on a single machine and once with a dedicated server and a client. ## 1. The component 1. Make a Blueprint child of `SKLAbilityComponent` (say `BP_SkillcraftLyra`) and fill its **Starting Abilities**. 2. In your experience (or its action set), add an **Add Components** action: Actor Class `LyraPlayerState`, Component Class `BP_SkillcraftLyra`, Client and Server both on. The server creates the component and it reaches every client by replication, bots included. 3. That's all the wiring. Skillcraft finds Lyra's ability system through `IAbilitySystemInterface` and adds its mana set next to Lyra's health and combat sets. Mana starts full and comes back at 5 per second: **Starting Max Mana** and **Starting Mana Regen** on the component. The component lives on the player state, so it survives death: after a respawn the bar, the ranks and the cooldowns are where they were. ## 2. Keys Lyra's shooter puts 1, 2 and 3 on its weapon bar (`IA_QuickSlot1` to `IA_QuickSlot3` in `IMC_ShooterGame`). With Skillcraft on the same keys, pressing 1 switches weapons and casts at once. Change **Slot Keys** on the component to keys Lyra leaves free, 4 to 0 for instance, or take the three quick slot mappings out if your game has no weapon bar. The skill bar goes on the screen together with Lyra's HUD. If it covers something of yours, give the component your own **Hotbar Widget Class** or turn it off and read **Get Slot State** from your UI. ## 3. Damage and healing Lyra's health is `LyraHealthSet`, and its `Damage` attribute is marked hidden from modifiers: a gameplay effect made in the editor can't pick it. Damage goes through Lyra's own execution, the same one its guns use. **Damage effect**: Duration Policy Instant. Under **Executions**, one entry with Calculation Class `LyraDamageExecution` and one Calculation Modifier: - Backing Capture Definition: Attribute `LyraCombatSet.BaseDamage`, Attribute Source `Source`, Snapshot on; - Modifier Op `Add`, Magnitude Calculation Type `Set By Caller`, Data Tag `Skillcraft.SetByCaller.Magnitude`. **Heal effect**: Duration Policy Instant, one Modifier on `LyraHealthSet.Healing`, Add, Set By Caller with the same tag. Put them in the **Effects** of your abilities as usual. The Magnitude of the ability becomes the base damage of the hit. Skillcraft's areas land on everyone in the radius except the caster. Lyra's execution is what keeps teammates out: it asks `LyraTeamSubsystem` if the hit can cause damage, like it does for a bullet. In our matches a Nova never caught a teammate, so that part comes from reading Lyra's code, not from a measurement. ## What was measured `Tools/LyraTest/run_lyra.sh` builds a copy of Lyra with Skillcraft and a test driver that adds the component through the component manager (what the Add Components action calls), then plays with no window. | Run | Result | |---|---| | One machine, 120 s against bots | 54 casts, 23 firebolt and nova hits through Lyra's damage execution, enemies brought to 0 health, 4 heals through `Healing`, 4 respawns with the bar still working | | Dedicated server and a client | the component reached the client's player state, slots 1 to 3 and the bar on the client, 3 of 3 presses with the mana off on the frame of the press, the client's heal landed on the server |