# Skillcraft: your first ability in 5 minutes Skillcraft is data-driven abilities on Unreal's Gameplay Ability System, for Unreal Engine 5.6, 5.7 and 5.8. An ability is one data asset: what it costs, how long it waits, how it travels and what it does when it lands. One generic ability class runs all of them, so a new skill never needs a new class. It drops on the ability system you already have (on the pawn, or on the player state like Lyra), comes with a skill bar on keys 1 to 0, levels, skill points and a skill tree, and it is predicted: the caster sees the cast, the cost and the cooldown on the frame the key goes down, at any ping. Seven kinds, all from the same asset:  | Delivery | What it does | Example | |---|---|---| | Instant | Lands at once on the caster or the aimed actor | strike, heal, buff | | Projectile | Flies along the aim, lands on what it hits (or in a radius around it) | firebolt, arrow, grenade | | Area | Lands on everything in a radius, around the caster or at the aimed point | nova, meteor, party heal | | Channel | Lands every interval for a duration; can stop when the key is let go | beam, drain, heal over time | | Summon | Spawns an actor at the caster or the aimed point, for a lifetime | totem, turret, minion | | Passive | On while owned, or fires by itself on a gameplay event | +10% speed, mana on cast, thorns | ## 0. The fastest way (1 minute) 1. Enable the plugin and restart the editor. 2. On your character, add an **Ability System Component** (if it has none) and a **BP_SKL_ExampleAbilities** component, from `/Skillcraft/Examples`. 3. Press Play and press 1 to 6. K opens the skill tree. `BP_SKL_ExampleAbilities` is a Skillcraft component with the example's eight abilities, its skill tree and 2 skill points already set. The abilities are data assets next to it (`DA_SKL_Firebolt`, `DA_SKL_Nova` and the rest): duplicate one, change it, put it on your own component. Their damage goes to the example's health set, so on your own targets they fly and land but take no health until you swap in your damage effect (section 2). The rest of this page builds the same from zero. ## 1. Set up a character (1 minute) Skillcraft works on any character that has an Ability System Component. 1. Enable the plugin (Edit > Plugins > Skillcraft) and restart the editor. 2. Add a **Skillcraft Ability** component (`SKLAbilityComponent`) to the character, or to the player state if your ability system lives there. It finds the ability system on that actor, or through `IAbilitySystemInterface`. Lyra: see `lyra.md`. 3. Make sure Project Settings > Input > Default Input Component Class is `EnhancedInputComponent` (it is in every project made from a UE5 template). The component binds keys 1 to 0 to its ten slots and K to the skill tree by itself. No ability system yet? Add an Ability System Component to the character and that's it. Its replication mode can only be changed from C++ (`SetReplicationMode`, Mixed is the usual choice for players); in a Blueprint project leave it as it is, Skillcraft works the same. The component adds a Mana attribute set (`SKLAttributeSet`) when the ability system has none, for the default cost: it starts full at **Starting Max Mana** (100) and comes back at **Starting Mana Regen** (5 per second). ## 2. Your first ability (2 minutes)  1. Content Browser > right click > Miscellaneous > Data Asset > **SKL Ability Definition**. Call it `DA_Firebolt`. 2. Set: - **Ability Tag**: `Ability.Firebolt` (add the tag in Project Settings > Gameplay Tags). It names the ability and, by default, its cooldown. - **Delivery**: Projectile. **Projectile Speed**: 2500. - **Cost**: Base 15. **Cooldown**: Base 1. - **Effects**: one entry with your damage gameplay effect and **Magnitude** Base 20, Per Rank 10. 3. On the Skillcraft component, add `DA_Firebolt` to **Starting Abilities**. 4. Press Play and press 1. The firebolt leaves, the slot shows the cooldown and the mana goes down. No keyboard at hand (a test, a dedicated server)? `Skillcraft.PressSlot 1` in the console does the same. No health in your project yet, like a fresh template? Leave **Effects** empty for now: the firebolt still flies, costs and cools down. Add the damage when your game has health. **Magnitude** reaches your effect as Set By Caller `Skillcraft.SetByCaller.Magnitude`. In your damage gameplay effect, set the modifier's magnitude to Set By Caller with that tag. Any effect works: damage, heal, a buff with a duration, a stun that grants a tag. Skillcraft doesn't bring health or damage of its own; it applies your effects. Every number with **Base** and **Per Rank** grows with the ability's rank: Base at rank 1, plus Per Rank for every rank above. Magnitude 20 + 10 is 20 at rank 1 and 40 at rank 3. ## 3. The fields - **Target**: Self (the caster), Aimed Actor (the first actor the aim trace finds inside **Range**) or Aimed Point (where the trace hits, or the end of Range). The aim is the pawn's view: its control rotation from its eyes. - **Cast Time**: seconds between the press and the ability going off. The cost and the cooldown are paid on the press. - **Cancel On Release**: letting go of the key stops it. A channel ends; a cast still in its cast time is dropped. - **Cost** and **Cost Effect**: the cost is paid with the Cost Effect, `SKLManaCostEffect` by default. To pay with your own attribute (stamina, energy, rage), make a gameplay effect whose first modifier is that attribute, with magnitude Set By Caller `Skillcraft.SetByCaller.Cost`. Skillcraft checks that attribute before casting and passes the cost as a negative value. - **Cooldown** and **Cooldown Tag**: abilities with the same Cooldown Tag share a cooldown. - **Area Radius**, **Affect Caster**: who is inside the area. Area spares the caster unless Affect Caster is on. - **Projectile Class**: a Blueprint child of `SKLProjectile` with your mesh and trail. **Impact Radius** above 0 makes it explode. **Predict Projectile**: the caster sees it leave at once (see Networking). - **Channel Duration** and **Channel Interval**: 2 s at 0.25 lands 8 times. - **Summon Class** and **Summon Lifetime**. - **Passive Trigger Tag**: empty keeps the passive's effects on the owner for as long as it owns the ability. With a tag, every matching gameplay event fires it: `Skillcraft.Event.AbilityCast` (the owner cast something), `Skillcraft.Event.HitDealt` (an ability of the owner landed), `Skillcraft.Event.HitTaken` (an ability landed on the owner), or any event of your own. **Passive Affects Event Target** sends the effects to the other side of the event (lifesteal, thorns). Passives have cost and cooldown too: a 5 s cooldown makes a proc that fires at most every 5 s. - **Cast Cue Tag**, **Impact Cue Tag**: gameplay cues for the cast (predicted on the caster) and for every landing. **Cast Montage**: played on the caster through GAS. - **Learning**: **Point Cost**, **Required Level**, **Levels Per Rank**, **Prerequisites** (another ability at a rank). See section 5. Save the asset and Data Validation tells you what is missing (an ability without a tag, a summon without a class, a cost without an effect). ## 4. The skill bar (1 minute)  The component shows a bar at the bottom of the screen with one slot per **Slot Count** (10): icon (or the first letters of the name), the key, a shade that empties with the cooldown and the seconds left, blue when it can't be paid, gold while it runs. Granted actives fill the first empty slots (**Auto Fill Slots**). - **Your own bar**: a Widget Blueprint child of `SKLHotbarWidget` with a Horizontal Box named `SlotBox`, and of `SKLSlotWidget` with widgets named `Icon`, `CooldownFill`, `CooldownLabel`, `KeyLabel`, `NameLabel`, `Frame` (each optional), or override **Update Slot**. Set them on the component (**Hotbar Widget Class**). Or turn it off and read **Get Slot State** from your own UI. - **Your own keys**: change **Slot Keys**, or give **Slot Mapping Context** and **Slot Input Actions** from your project. Turn **Bind Slot Keys** off and call **Activate Slot** / **Release Slot** from your own input. - **Set Slot** moves an ability to a slot; called on the client it goes through the server. ## 5. Levels and the skill tree (1 minute)  The component keeps **Level**, **Experience** and **Skill Points**, replicated to the owner. - **Add Experience** on the server levels up as many times as it fills. **Experience To Next Level**: Base 100, Per Rank 50 means 100 from level 1 to 2, 150 from 2 to 3. Each level gives **Skill Points Per Level**. **Max Level**: 50. - **Can Learn** says if the next rank can be learned and why not: Max Rank, Level Too Low, Missing Prerequisite, Not Enough Points. **Learn Ability** spends the points and learns it (from a client it goes through the server). **Reset Skills** gives back every point spent and takes those ranks back. - **The tree**: a data asset of class **SKL Skill Tree**, with a node per ability and its column and row. Set it on the component (**Skill Tree**) and K opens the window: a button per ability with its rank, green when it can be learned now, gold at max rank, grey when locked, and a tooltip that says what is missing. Click to learn. ## 6. Saving (1 minute) On the server, **Make Save Data** gives an `SKLSaveData`: level, experience, skill points, every owned ability with its rank and the ranks bought with points, and what each slot of the bar holds. **Load Save Data** puts it all back on a character, removing abilities that aren't in the save. The abilities are kept as soft references, so the save survives a reorganised Content folder as long as the assets keep their names. No save game in your project yet? `SKLSaveGame` is one: Create Save Game Object (SKL Save Game), set its **Data** from Make Save Data, Save Game To Slot. With your own save game, add an `SKLSaveData` property to it. ## 7. The example The `SkillcraftExample` module has a playable arena built in code: open any empty map with `?game=Demo` (or set `SKLDemoGameMode` as the game mode). Manny with the six abilities on the bar, five targets that heal back, a meteor to learn in the tree. Its health attribute (`SKLExampleHealthSet`) and effects are for the example only: health and damage are your game's. Everything is Blueprint: see `blueprint.md`. How it behaves online and what was measured: `networking.md`. Lyra: `lyra.md`.