Add an item
An item is a Data Asset in a folder the shop reads. This guide adds a finished item built from two sample components, then a consumable, and puts the item in a champion's recommended build. Gold, items and shop describes the shop and the inventory in full.
Step 1: Tell the shop where your items are
The shop sells every item definition in the folders that Project Settings > Pioneer MOBA Framework > Economy > Item
Folders lists. By default that is the plugin's /PioneerMOBA/Economy/Items. Add your own folder, for example
/Game/Items. Keep the plugin's folder in the list if you want to keep selling the sample items; take it out once your
own items replace them.
Step 2: Make the item
In /Game/Items, choose Add > Miscellaneous > Data Asset, pick Moba Item Definition, and name it
DA_Item_Frostbrand. Fill it in:
| Field | Value |
|---|---|
| Display Name | Frostbrand |
| Icon | your icon texture (empty shows the name's initial on a plate) |
| Description | A blade that never warms. |
| Tier | Finished |
| Cost | 2800 |
| Components | Bearded Axe (DA_Item_BeardedAxe), Spellbook (DA_Item_Spellbook) |
| Stats | Stat.AttackDamage 30, Stat.AbilityPower 40, Stat.MoveSpeed 15 |
| Categories | Item.Category.Attack, Item.Category.Magic |
- Cost is the full price. A player who owns a Bearded Axe pays 2800 less its 875, found at any depth of the recipe. The cost must be at least what its components cost together.
- Stats are applied while the item is held. Shares are written as 0.12 for 12%, as for
Stat.AttackSpeedorStat.CritChance. The two regen stats,Stat.HealthRegenandStat.ManaRegen, are shares of the champion's base regen. - For what the stats cannot say, set an Extra Effect: a Gameplay Effect of your own, applied while the item is held.
Save. The definition checks itself: a recipe that reaches itself, a cost below its components', an empty Components entry or an unknown stat tag is an error in the message log.
Step 3: Try it
Play Riftwood, then:
Moba.Shop Frostbrandopens the shop on it: its stats, its components (tinted green when you hold them) and its price for you.Moba.GiveGold 3000gives you the gold. Buy it in your fountain, then undo the purchase.Moba.GiveItem Frostbrandputs it in your inventory for nothing, wherever you stand.
A consumable
The sample's Health Potion is a model. A consumable is an item with Consumable on, a Max Stack, and a Use Ability: an Ability Definition the key of its inventory slot casts. Each use takes one charge, and the slot empties with the last.
- Make the use: an Ability Definition with the AoE cast type, Range 0 and Affects Self, so it is cast on the
caster at once, with one Effects entry for the caster. The sample's
DA_Use_HealthPotion(in/PioneerMOBA/Economy/Items/Uses) appliesUMobaRestoreHealthEffectwith a Duration of 15 s and the whole amount, 120, as its Magnitude; the effect spreads it over the time.UMobaRestoreManaEffectdoes the same for mana. - Make the item: Tier Component, a Cost, no Components, Consumable on, Max Stack 5, the Use Ability,
and the category
Item.Category.Consumable, so the shop lists it under Consumables.
A consumable with Components, or without a Use Ability, is an error. Any item can have a Use Ability; only a consumable uses up charges.
Put it in a recommended build
A champion's Recommended Build is a Moba Recommended Build Data Asset with Starting, Core and Situational rows.
Open the champion's build, for example your copy of DA_Build_Varra, and add Frostbrand to a row. The shop's
Recommended tab shows it, and bots buy the Starting and Core rows in order.
Change the sample items
The 30 sample items and the three consumables are ordinary item definitions in /PioneerMOBA/Economy/Items. Copy them
into your folder, change the copies, and take the plugin's folder out of Item Folders. A copy keeps its components
pointing at the plugin's items until you point them at your copies. Changing the plugin's own assets in place works
too, but an update from Fab replaces them, unless the plugin is a copy in your project's Plugins folder (see
Changing the plugin).