Configuration¶
Complete guide to setting up the Skill Database, XP curves, milestones, and project settings.
Project Settings (UFWSkillSystemSettings)¶
Navigate to Edit > Project Settings > Plugins > FW Skill System to access global configuration.
| Setting | Type | Default | Description |
|---|---|---|---|
| Skill Database | UFWSkillDatabase |
None | Reference to the global skill database containing all skill definitions |
| Default XP Curve | UFWSkillXPCurve |
None | Default XP curve used by skills that do not specify an override |
| Default Max Level | int32 |
99 | Default maximum level when not specified per-skill |
Skill Database Required
The skill system will not function without a UFWSkillDatabase assigned. All calls to AwardSkillXP, GetSkillLevel, and other progression functions require a valid database.
Accessing Settings in C++¶
#include "Settings/FWSkillSystemSettings.h"
const UFWSkillSystemSettings* Settings = GetDefault<UFWSkillSystemSettings>();
UFWSkillDatabase* Database = Settings->SkillDatabase.LoadSynchronous();
Accessing Settings in Blueprint¶
Use the Get Skill Database node from UFWSkillTypeLibrary to retrieve the globally configured database.
Skill Database Setup¶
The UFWSkillDatabase is a UDataAsset that holds references to all 15 skill definitions. It serves as the single source of truth for what skills exist in your game.
Creating the Database¶
- In the Content Browser, right-click and select Miscellaneous > Data Asset.
- Choose
FWSkillDatabaseas the class. - Name it
DA_SkillDatabase. - Open it and add one
UFWSkillDefinitionentry for each skill.
Recommended Asset Organization¶
Content/
Data/
Skills/
DA_SkillDatabase.uasset
Definitions/
DA_Skill_Warfare.uasset
DA_Skill_Marksmanship.uasset
DA_Skill_Magic.uasset
DA_Skill_Bounty.uasset
DA_Skill_Woodcutting.uasset
DA_Skill_Mining.uasset
DA_Skill_Fishing.uasset
DA_Skill_Husbandry.uasset
DA_Skill_Cooking.uasset
DA_Skill_Woodworking.uasset
DA_Skill_Crafting.uasset
DA_Skill_Smithing.uasset
DA_Skill_Alchemy.uasset
DA_Skill_Construction.uasset
DA_Skill_Artifice.uasset
Curves/
DA_DefaultXPCurve.uasset
DA_CombatXPCurve.uasset
Milestones/
DA_Milestone_Mining_10.uasset
DA_Milestone_Mining_50.uasset
DA_Milestone_Mining_99.uasset
Skill Definitions¶
Each UFWSkillDefinition is a UPrimaryDataAsset that configures a single skill.
Creating a Skill Definition¶
- Create a Data Asset of class
FWSkillDefinition. - Name it
DA_Skill_<SkillName>. - Configure the following properties:
| Property | Required | Description |
|---|---|---|
| Skill Type | Yes | Select the EFWSkillType enum value this definition represents |
| Display Name | Yes | Localized name shown in UI (e.g., "Mining") |
| Description | No | Localized description of the skill |
| Icon | No | UTexture2D reference for UI display |
| Category | Yes | EFWSkillCategory -- automatically determined by skill type, but can be verified here |
| Max Level | Yes | Maximum level for this skill (typically 99) |
| XP Curve Override | No | If set, this skill uses a custom XP curve instead of the default |
| Milestones | No | Array of UFWSkillMilestoneDefinition assets for this skill |
Example: Mining Skill Definition¶
| Property | Value |
|---|---|
| Skill Type | Mining |
| Display Name | "Mining" |
| Description | "Extract ores and minerals from rock formations" |
| Category | Gathering |
| Max Level | 99 |
| XP Curve Override | (empty -- uses default) |
XP Curves¶
The UFWSkillXPCurve data asset defines how much cumulative XP is required for each level. This is the core progression tuning mechanism.
Creating an XP Curve¶
- Create a Data Asset of class
FWSkillXPCurve. - Name it
DA_DefaultXPCurve(orDA_<SkillName>XPCurvefor per-skill overrides). - Populate the
LevelXPThresholdsarray.
How the Curve Works¶
The LevelXPThresholds array maps array indices to cumulative XP requirements:
| Array Index | Level | Cumulative XP |
|---|---|---|
| 0 | 1 | 0 |
| 1 | 2 | 83 |
| 2 | 3 | 174 |
| 3 | 4 | 276 |
| ... | ... | ... |
| 98 | 99 | 13,034,431 |
The XP required to go from Level N to Level N+1 is LevelXPThresholds[N] - LevelXPThresholds[N-1].
Curve Design Strategies¶
An exponential curve where each level requires increasingly more XP:
This produces a curve where early levels are quick and late levels require significant grinding.
A flat increase per level (e.g., 100 XP more per level):
| Level | XP Required | Cumulative |
|---|---|---|
| 2 | 100 | 100 |
| 3 | 200 | 300 |
| 4 | 300 | 600 |
Enter any arbitrary values in the array. This gives designers full control over the feel of each level transition.
Per-Skill Overrides
Combat skills might use a steeper curve to slow down power progression, while gathering skills might use a gentler curve to keep the activity loop rewarding. Assign different UFWSkillXPCurve assets to each UFWSkillDefinition via the XP Curve Override property.
Milestones¶
Milestones are special rewards triggered when a player reaches a specific level in a skill.
Creating a Milestone Definition¶
- Create a Data Asset of class
FWSkillMilestoneDefinition. - Name it
DA_Milestone_<Skill>_<Level>(e.g.,DA_Milestone_Mining_10). - Configure:
| Property | Description |
|---|---|
| Milestone Name | Display name (e.g., "Novice Miner") |
| Required Level | The skill level that triggers this milestone (e.g., 10) |
| Rewards | Array of UFWSkillMilestoneReward assets |
Creating Milestone Rewards¶
UFWSkillMilestoneReward is a base class. Subclass it in C++ or Blueprint to define custom reward types:
- Create a new Blueprint class with
FWSkillMilestoneRewardas the parent. - Add variables for the reward data (item references, currency amounts, etc.).
- Override the reward description.
Assigning Milestones to Skills¶
Open the UFWSkillDefinition for the target skill and add your milestone definition to its Milestones array.
Example: Mining Milestones¶
| Level | Milestone Name | Rewards |
|---|---|---|
| 10 | Novice Miner | Bronze pickaxe, 500 gold |
| 25 | Journeyman Miner | Access to iron ore deposits |
| 50 | Expert Miner | Mithril mining ability unlocked |
| 75 | Master Miner | Chance to find gems while mining |
| 99 | Grandmaster Miner | Legendary pickaxe, mining cape |
Milestone Component Setup¶
The UFWSkillMilestoneComponent tracks which milestones have been awarded and triggers reward delivery when new milestones are reached.
Adding the Component¶
- Open your player character or controller Blueprint.
- Click Add Component and search for
FWSkillMilestone. - Add the
FW Skill Milestone Component. - The component automatically binds to the
UFWSkillProgressionComponenton the same actor.
Component Dependency
UFWSkillMilestoneComponent requires a UFWSkillProgressionComponent on the same actor. If the progression component is missing, the milestone component logs a warning and disables itself during BeginPlay.
Combat XP Configuration¶
Combat XP distribution is handled by AwardCombatXP on the progression component. When called, XP is distributed to the four combat skills (Warfare, Marksmanship, Magic, Bounty) based on the combat context.
Distribution Logic¶
The distribution is determined by the skill definitions and the active combat state. By default:
- Primary combat skill receives the largest share of XP
- Secondary combat skills receive a reduced share
- Skills not actively used in the combat encounter may receive no XP
Customizing Distribution
To customize how combat XP is distributed, override the distribution behavior in a subclass of UFWSkillProgressionComponent or configure distribution weights in your skill definitions.
Skill Requirements¶
UFWSkillRequirement objects define skill level prerequisites that other systems can check against.
Creating a Requirement¶
UCLASS(EditInlineNew, DefaultToInstanced)
class UFWSkillRequirement_MinLevel : public UFWSkillRequirement
{
GENERATED_BODY()
public:
UPROPERTY(EditAnywhere, Category = "Requirement")
EFWSkillType SkillType;
UPROPERTY(EditAnywhere, Category = "Requirement")
int32 MinimumLevel;
virtual bool IsMet(const UFWSkillProgressionComponent* Component) const override
{
return Component && Component->GetSkillLevel(SkillType) >= MinimumLevel;
}
virtual FText GetDescription() const override
{
return FText::Format(
NSLOCTEXT("Skills", "ReqMinLevel", "Requires {0} Level {1}"),
UFWSkillTypeLibrary::GetSkillDisplayName(SkillType),
FText::AsNumber(MinimumLevel)
);
}
};
Using Requirements in Other Systems¶
Any system that gates content behind skills can hold a UFWSkillRequirement* property and evaluate it:
// On an item, quest, door, or ability
UPROPERTY(EditAnywhere, Instanced, Category = "Requirements")
TObjectPtr<UFWSkillRequirement> SkillRequirement;
// Check at runtime
UFWSkillProgressionComponent* Skills = UFWSkillProgressionComponent::Get(PlayerActor);
if (Skills && Skills->MeetsRequirement(SkillRequirement))
{
// Player meets the skill requirement
}