Gold, items and shop
Players earn gold from last hits, kills, assists, structures, the jungle and a steady income, and spend it in their fountain on items built from recipes. The rules live in the Economy module; the shop screen in the UI module. Buying, selling and every gold payment happen on the server.
Gold
Each player's gold sits on their player state (AMobaPlayerState::GetGold), so it survives death. A player's gold is
sent only to that player, their allies and replays, never to the other team: another team's game reads 0 for it.
The numbers are in Project Settings > Pioneer MOBA Framework > Economy:
-
Starting Gold: 500, given when the match starts.
-
Passive gold: 2 a second from 1:00 of match time (Passive Gold Start). A player who spends nothing has 620 at 2:00.
-
Minions pay the champion that lands the killing blow: 21 for a melee minion, 14 for a caster, 60 for a siege or super minion (the Gold of each Minion Definition). A minion killed by anything else pays nobody.
-
Jungle monsters pay their killer, and epic objectives pay every champion of the team; see Jungle.
-
Champion kills pay the killer the victim's bounty, set by the victim's streak:
- Kill Streak Bounty, by the victim's kills since its last death: 300, 300, 350, 400, 500, 600, then 700 for 0 to 6 and more kills. Ending a streak worth more than 300 is a shutdown.
- Death Streak Bounty, by its deaths since its last kill: 300, 270, 240, 210, 180, then 150 for 1 to 6 and more deaths.
- First Blood Bonus: 100 more for the first champion kill of the match, so it pays 400. A death to a tower or a minion before it leaves First Blood open.
- Assists: the champions that hurt the victim in the last 10 s (Assist Window) split half of the bounty (Assist Share) on top. With no champion as the killer, the assisters split all of it.
-
Structures pay the team that destroys them: a global part to every champion of the team, dead or alive, and a local part split between its living champions within 1500 cm (Structure Local Radius). With nobody there the local part is lost.
Structure Global Local Outer tower 50 250 Inner tower 75 200 Base tower 100 150 Inhibitor 50 0 Core tower 50 0 An outer tower with two allied champions near it pays them 175 each and the other three 50 each.
Every gold gain with a source rises over it as +gold on the screen of the player who got it, and nobody else's: last hits over the unit, a bounty and an assist over the body, a structure's and an epic monster's gold over it. The kill feed names a kill's bounty: "Thorne slew Varra · First blood · 400 gold".
For other bounty rules, subclass UMobaBountyPolicy, override GetKillBounty, and set it as the Bounty Policy.
UMobaEconomySubsystem keeps each player's streaks (GetKillStreak, GetDeathStreak) and IsFirstBloodTaken. A
structure of your own kind pays when its ability system carries one of the tier tags the Structure Gold list names
(Unit.Structure.OuterTower and so on); UMobaEconomySubsystem::PayForStructure pays for one directly.
AMobaPlayerState::AddRewardGold pays a player and shows the gain.
Items
An item is a Moba Item Definition Data Asset. The shop sells every item definition in the folders that Item
Folders in the Economy settings lists, by default the plugin's /PioneerMOBA/Economy/Items. An item has:
- a Display Name, an Icon (empty shows the name's initial on a plate) and a Description;
- a Tier: Component, Intermediate or Finished, which decides its column in the shop;
- its Cost, the full price, and its Components, the items it is built from (the same item may appear twice);
- Stats: Stat tags with a magnitude, applied while the item is held. Shares are written as 0.12 for 12%;
- an optional Extra Effect, a Gameplay Effect of your own for what the stats cannot say;
- Categories (
Item.Category.Attack,.Magic,.Defense,.Movement,.Consumable) for the shop's category list; - a Use Ability, an Ability Definition the key of the item's inventory slot casts while the item is held, and Consumable with its Max Stack: each use takes one charge, and the slot empties with the last.
The stat tags: Stat.Health, Stat.Mana, Stat.AttackDamage, Stat.AbilityPower, Stat.AttackSpeed,
Stat.CritChance, Stat.Lifesteal, Stat.Omnivamp, Stat.Armor, Stat.MagicResist, Stat.MoveSpeed,
Stat.HealthRegen and Stat.ManaRegen. The two regen stats are shares of the champion's base regen.
The definition checks itself on save. An empty name, a negative cost, an empty Components entry, a recipe that reaches itself, a cost below what its components cost together, an unknown stat tag, a Use Ability without an Ability Class, and a consumable without a Use Ability or with Components are errors. Add an item walks through making one.
Consumables
| Item | Cost | Max Stack | Its use (in /PioneerMOBA/Economy/Items/Uses) |
|---|---|---|---|
| Health Potion | 50 | 5 | DA_Use_HealthPotion: restores 120 health over 15 s |
| Mana Potion | 50 | 5 | DA_Use_ManaPotion: restores 100 mana over 15 s |
| Vision Ward | 75 | 2 | DA_Use_VisionWard: places a bought ward; see Vision |
A potion keeps restoring when the champion is hit, and several stack. The 30 sample items are listed on the Riftwood page.
The inventory
Every player state gets a Moba Inventory Component: six slots, the stats of the items held, and the purchases the player can still undo.
- The price of an item is its cost less the cost of the owned components it would use up, found at any depth of its recipe. Buying uses those components up, so a full inventory can still buy an item that uses one of its slots.
- Where. A living champion buys only inside its team's fountain; a dead one buys wherever it lies.
- Selling works wherever buying does. An item sells for half its full cost (Sell Ratio 0.5), rounded down.
- Undo takes back the latest purchase or sale: a purchase's gold comes back and the used-up components return. The last 10 can be undone. Leaving the shop zone, taking or dealing damage, or using a consumable clears them.
- Keys. The six slots are on 1, 2, 3, 5, 6 and 7 by default (
IA_Item_1toIA_Item_6). An item's Use Ability is cast with the key of the slot it sits in. - Moving. Dragging an item onto another slot moves it there or swaps the two, anywhere on the map
(
MoveItem(From, To)).
The shop
P opens and closes the shop. It goes over the game, which keeps running under it. Escape closes it too.
- The ledger shows every item at once in three columns, Components, Intermediate and Finished. The 30 sample items fit a 1920 × 1080 screen with no scrolling. A tile shows the icon, the name and this player's price, in red when the player cannot afford it.
- Search. Typing keeps the items where each word typed starts a word of the item's name or of one of its stats:
armfinds every item with armor. - Categories down the left narrow the ledger. Under them, Consumables lists the potions and wards.
- The detail panel shows the selected item: its stats, what it is built from with the components the player holds tinted green, what it builds into, its price for this player, and Buy, Sell and Undo. When Buy or Sell is off it says why.
- Buying: Buy, a right click or a double click on a tile.
- Selling: pick an item in the HUD's inventory and press Sell, or drag it onto the shop's window.
- Recommended shows the champion's Recommended Build (a Moba Recommended Build Data Asset, named in the Champion Definition) in Starting, Core and Situational rows. Bots buy it too.
To use your own screen, subclass UMobaShopScreen and set it on UMobaShopSubsystem. The look comes from the HUD
theme.
The fountain and recall
Place one Moba Fountain Volume per team over its spawn platform and set its Team; the box's height does not matter. Inside it, the team's champions regain 10% of their maximum health and mana each second and can shop.
Recall is the ability /PioneerMOBA/Economy/DA_Recall on B, which the Match settings' Common Abilities give
every champion. It channels 8 s and then puts the champion in the middle of its team's fountain, on the walkable
ground nearest the middle of the box's floor. Moving, an attack order, casting, crowd control, and any hit taken or
dealt end it. Put the box's floor on the ground; a Nav Modifier Volume with the Null area over a prop in the fountain
keeps champions from landing on it.
Settings
Project Settings > Pioneer MOBA Framework > Economy:
| Setting | Default |
|---|---|
| Starting Gold | 500 |
| Passive Gold Per Second, Passive Gold Start | 2, 60 s |
| Kill Streak Bounty, Death Streak Bounty | 300, 300, 350, 400, 500, 600, 700 and 300, 270, 240, 210, 180, 150 |
| First Blood Bonus | 100 |
| Assist Window, Assist Share | 10 s, 0.5 |
| Bounty Policy | UMobaBountyPolicy |
| Structure Gold, Structure Local Radius | the table above, 1500 cm |
| Item Folders | /PioneerMOBA/Economy/Items |
| Inventory Slots | 6 |
| Buy While Dead | on |
| Sell Ratio | 0.5 |
| Max Undo Steps | 10 |
| Fountain Heal Per Second, Fountain Mana Per Second | 10% of the maximum |
| Recall Arrive Cue | the sample's GameplayCue.Sample.Recall.Arrive; empty plays none |
Playtest commands, outside Shipping builds: Moba.GiveGold 1000, Moba.GiveItem Recurve Bow, Moba.Shop,
Moba.Shop Stormstring Bow (opens it on an item) and Moba.Shop recommended.