# Skillcraft in Blueprint Everything in Skillcraft is reachable from Blueprint. The abilities themselves are data assets: nothing to script to make one. ## Skillcraft Ability component (`SKLAbilityComponent`) Server only (they do nothing on a client): | Node | What it does | |---|---| | Grant Ability (Definition, Rank) | Gives the ability, or sets its rank when owned. Actives go to the first empty slot | | Remove Ability (Definition) | Takes it away and clears its slot. A passive takes its effects with it | | Set Ability Rank (Definition, Rank) | 1 to its Max Rank | | Add Experience (Amount) | Levels up as many times as it fills | | Set Level (Level) | For a save or a cheat; gives no points | | Add Skill Points (Amount) | Negative takes them | From the owning client (they go through the server) or the server: | Node | What it does | |---|---| | Activate Ability (Definition) | Casts it, predicted | | Cancel Ability (Definition) | Stops a channel or a cast in its cast time | | Activate Slot / Release Slot (Index) | Like pressing and letting go of the slot's key | | Set Slot (Index, Definition) | Puts an ability in a slot, moving it from where it was | | Learn Ability (Definition) | Spends the points, learns rank 1 or the next rank | | Reset Skills | Gives back every point spent through Learn Ability | | Toggle Skill Tree | Opens or closes the tree window | Reading (any machine): | Node | Returns | |---|---| | Get Ability System | The ability system it works on | | Get Ability Rank (Definition) | 0 when not owned | | Get Cooldown Remaining (Definition) | Seconds, 0 when ready | | Get Owned Abilities | Every owned Skillcraft ability | | Get Slot / Get Slot State (Index) | The ability in the slot; or everything a bar shows: rank, cooldown left and its fraction, can afford, running, key | | Can Learn (Definition) | Can Learn, Max Rank, Level Too Low, Missing Prerequisite, Not Enough Points | | Get Level, Get Experience, Get Experience For Next Level, Get Skill Points | Progression | Saving (server): **Make Save Data**, **Load Save Data**. `SKLSaveGame` holds one in its **Data**. Events: **On Slots Changed**, **On Level Changed** (old and new level), **On Progress Changed** (experience, points or a learned rank). Settings, in the Details panel of the component: | Setting | Default | What it does | |---|---|---| | Starting Abilities | empty | Granted by the server as soon as the ability system is found, each at its rank | | Add Mana Attribute Set | on | Adds `SKLAttributeSet` when the ability system has none | | Starting Max Mana, Starting Mana Regen | 100, 5 per second | The mana that set starts with, full, and how fast it comes back | | Slot Count, Auto Fill Slots | 10, on | The bar's size; granted actives take the first empty slot | | Bind Slot Keys, Slot Keys | on, 1 to 0 | The keys the component binds by itself | | Slot Mapping Context, Slot Input Actions | empty | Your own input instead of Slot Keys | | Hotbar Widget Class | `SKLHotbarWidget` | Your bar, or empty for none | | Max Level, Experience To Next Level, Skill Points Per Level, Starting Skill Points | 50, 100 + 50 per level, 1, 0 | Progression | | Skill Tree, Skill Tree Widget Class, Skill Tree Key | empty, `SKLSkillTreeWidget`, K | The tree window | `/Skillcraft/Examples/BP_SKL_ExampleAbilities` is a child of this component with the example's abilities, tree and points set. Console (not in Shipping): **Skillcraft.PressSlot N** and **Skillcraft.ReleaseSlot N** press and let go of slot N of the local player, for trying abilities with no keyboard or from a test. ## Ability Definition (`SKLAbilityDefinition`) **Get Cooldown Tags**, **Get Required Level (Rank)**, and every field as a Blueprint property. ## Gameplay events and tags Passives and your own abilities can listen to: - `Skillcraft.Event.AbilityCast`: an ability of the owner committed. Optional Object is its definition. - `Skillcraft.Event.HitDealt`: an ability of the owner landed. Target is who got hit. - `Skillcraft.Event.HitTaken`: an ability landed on the owner. Instigator is the caster. Owned tags: `Skillcraft.State.Casting` during a cast time, `Skillcraft.State.Channeling` during a channel. Every Skillcraft ability has the asset tag `Skillcraft.Ability`, and its definition's Ability Tag on its spec. Set By Caller tags your effects read: `Skillcraft.SetByCaller.Magnitude` (an effect entry's value at the rank), `Skillcraft.SetByCaller.Cost` (negative), `Skillcraft.SetByCaller.Cooldown` (seconds). ## Widgets `SKLHotbarWidget` and `SKLSlotWidget` (the bar), `SKLSkillTreeWidget` and `SKLSkillNodeWidget` (the tree). Each builds its own look when used as is. A Widget Blueprint child draws its own by naming its widgets as the C++ ones (`SlotBox`, `Icon`, `CooldownFill`, `CooldownLabel`, `KeyLabel`, `NameLabel`, `Frame`; `NodeGrid`, `HeaderLabel`, `ResetButton`; `NodeButton`, `RankLabel`), or overrides **Update Slot** / **Update Node**. **Describe Learn Result** gives the text for why a node is locked.