Life Skills & Crafting¶
Overview¶
UMIPBaseLifeSkillComponent is the shared implementation for life skills (Crafting, Cooking, Alchemy, etc.): per-skill level/EXP (via UMIPBaseLevelComponent), learned recipes, timed crafting with deferred material consumption, and optional bonus yield via UMIPBaseLifeSkillBonusCalculation. Crafting UI widgets live under Widget/Crafting/ and are wired through settings (UMIPSettings life-skill/crafting widget defaults).
All paths below are relative to Plugins/ModularInventoryPlus/Source/ModularInventoryPlus/.
Key Classes & Files¶
| Class / asset | File |
|---|---|
UMIPBaseLifeSkillComponent |
Public/LifeSkill/MIPBaseLifeSkillComponent.h |
FMIPLifeSkillRecipeInfo, pools, requirement enum |
Public/LifeSkill/MIPLifeSkillTypes.h |
MIPLifeSkillGameplayTags |
Public/LifeSkill/GameplayTag/MIPLifeSkillGameplayTags.h |
UMIPBaseLifeSkillBonusCalculation |
Public/LifeSkill/Calculation/MIPBaseLifeSkillBonusCalculation.h |
UMIPLifeSkillRecipeDataAsset |
Public (data asset; referenced by component) |
| Crafting container widget | Public/Widget/Crafting/MIPCraftingContainerWidget.h |
UMIPClientSoundPlayer (crafting UI sounds) |
Public/Sound/MIPClientSoundPlayer.h |
UMIPBaseLifeSkillComponent¶
- Base:
UMIPBaseLevelComponent— save/load, replication, level gates for recipes. - Delegates:
OnCraftingStartedDelegate,OnCraftingCompletedDelegate,OnRecipeLearnedDelegate,OnCraftingCancelledDelegate. - Crafting API:
StartCrafting,CancelCrafting,IsCrafting,GetEffectiveCraftDuration,LearnRecipe,HasLearnedRecipe,GetAvailableRecipes,CheckRecipeRequirementByTag. - Behavior: Multi-craft runs one cycle at a time; materials consumed when each cycle completes (not at start). Movement can interrupt (movement check timers). Server RPCs:
Server_StartCrafting,Server_LearnRecipe,Server_CancelCrafting; clients receiveClient_OnCraftingStarted/Completed/Cancelled. - Properties:
LifeSkillTag(LifeSkill.Type.*),DefaultCraftDuration,CraftDurationReductionTag(ASC tag count / 100 = reduction %),RecipeDataAssets[],BonusYieldCalculationClass, replicatedLearnedRecipeTags.
Recipe & output rules¶
- Requirements and outcomes are defined in data (
FMIPLifeSkillRecipeInfoinMIPLifeSkillTypes.h): inputs, fees, level, output pools (weighted pick vs independent probability perFMIPLifeSkillOutputPool).
Integration¶
- Ability System — duration reduction via gameplay tags on the ASC.
- Inventory —
UMIPPlayerServerIMC, slots, and item grants. - Currency — fee checks via
GetCurrencyComponent(). - Sound —
UMIPClientSoundPlayerbinds life-skill crafting delegates for UI audio.