Phaser AE

Party

Free packv3.0.0-0Logic

The party of a role-playing game: heroes with levels, experience, health and magic, the gear each one wears, the bag and gold they share, the consumables they use and the shop they deal with. Every change is an atomic transaction, and the whole party saves and restores.

This is a Free pack. Every phaser.io account can use it in their games.

Released October 19, 2026

Party: a screenshot of its demo
A note about these graphics

Expansion packs don't come with graphics. This screenshot is one way of drawing what the pack does, made for its demo: none of the sprites, tiles or backgrounds in it are in the pack.

That's by design. A pack is a game's logic, mechanics and effects, and it works with whatever art you give it. Some packs draw effects, backdrops or 3D scenes of their own, but none carries a game's sprites.

So the look is yours. Make the art on phaser.io, bring your own, or let your agent draw it in code: the same pack can look like anything.

What it does

You define heroes by their level-one stats (health, magic, attack, defence, speed and luck) and items by their kind, bonuses, effect, price and weight. giveXp hands out experience after a battle and returns every level gained, with the stats before and after, ready for a level-up screen; health and magic grow by the gain. A hero's current stats are their level's growth plus every bonus they are wearing, and their attack element comes from their weapon.

The bag, the gold and every hero's equipment are one inventory underneath. Buying an iron sword takes the gold and adds the sword in one step; equipping it puts the old weapon back in the bag; and if the bag is full or too heavy, the whole change is refused and nothing is lost. Consumables are a registry of effects: heal, restore magic, revive, cure and a rest that reaches the whole party, plus any your game adds. A potion is spent only when it does something, so a heal on a hero at full health keeps the herb.

The shop charges an item's price and buys back at a share of it, refusing kinds it will not take, such as quest items and keys. A save is plain data, and restoring one is defensive: unknown heroes and items are dropped, gear that no longer fits its slot goes back, levels are re-read from experience and health and magic are clamped.

Features

  • Heroes and levels — level-one stats, experience, a level curve and growth, with level-ups reported in full.
  • Live health and magic — pools that grow on level-up, clamp to the maximum and heal on rest.
  • Gear in slots — weapon, armour and accessory by default, any slots you define, with flat stat bonuses.
  • Elements — a hero's attack element from the item in the element slot.
  • One shared inventory — bag, gold and gear as atomic transactions, with stack sizes, capacity and weight.
  • Consumables — heal, magic, revive, cure and whole-party rest, plus your own effects.
  • A shop — buy and sell prices, a sell ratio and kinds it will not buy.
  • Members — heroes join and leave the active party.
  • Defensive saves — snapshot and restore, which repairs damaged or outdated data rather than failing.

Good for

  • Japanese-style role-playing games with a party, levels, equipment and towns with shops.
  • Dungeon crawlers where a party returns to town to sell loot and buy potions.
  • Tactics games, for the roster's levels and gear between battles.
  • Hero-collecting games, where recruits join and leave the active party.
  • Any game with a bag and a shop, where atomic buying and equipping prevent lost items.

Make it yours

Everything is the party's definition: the heroes and items, the equipment slots and which item goes in which, the slot that sets the element, the maximum level, the experience curve, the stat growth, the consumable effects, the sell ratio, the kinds that cannot be sold, the stack size, the bag's capacity and weight limit, the starting gold and the starting members. By default the curve is gentle and growth linear, so gear stays the visible power spike.

Two quite different parties: a classic party with weapon, armour and accessory slots, ten levels, a half-price shop and herbs that heal 30; and a party with head, hand and finger slots, a hundred experience a level, health that doubles each level, a two-stack bag with weights, a quarter-price shop that will not buy rings, and a feast that feeds everyone.

A quick look

A hero, a sword and a herb, through buying, equipping, levelling and healing:

import { Party } from '@phaser-ae/party';
const party = new Party({
  heroes: [{ id: 'wren', stats: { hp: 36, mp: 8, atk: 10, def: 5, spd: 8, lck: 5 } }],
  items: [{ id: 'iron-sword', kind: 'weapon', bonus: { atk: 6 }, price: 180 }, { id: 'herb', kind: 'consumable', effect: 'heal', power: 30, price: 12 }],
  gold: 200, members: ['wren'],
});
party.buy('iron-sword'); party.equip('wren', 'iron-sword');
const ups = party.giveXp(['wren'], 120);   // levels gained, with stats before and after
party.use('herb', 'wren');                 // only spent when it did something

Works with

  • inventory — the containers, stacks and transactions underneath the bag and gear.
  • rpg — a role-playing game that keeps its run in a party.
  • save — keeps the party's snapshot between visits.
  • run-progression — for roguelike drafts and unlocks between runs instead.

Good to know

  • One bag for the whole party; per-hero bags need separate parties or your own containers on inventory.
  • Gear gives flat bonuses only; percentage bonuses, set bonuses and item abilities are your game's, read from gear().
  • Status effects such as poison and sleep are not modelled; cure only reports that it was used.
  • It has no battle system of its own; it holds the party a battle reads and changes.

More Logic packs

Show all →