Skip to content

EngineMessages beta ​

Interface of @v12-engine/engine

ts
export interface EngineMessages

The messages the engine sends, and their params. The client has words for each of these. A game can send keys of its own as well.

Members ​

alreadyHaveHero ​

ts
alreadyHaveHero: {};

The player already has the hero being asked for

alreadyHired ​

ts
alreadyHired: {
        unit: string;
    };

A hero is hired once: the player has it already. unit is its type

alreadyResearching ​

ts
alreadyResearching: {};

The upgrade being asked for is already being researched

buildOnResource ​

ts
buildOnResource: {
        resource: string;
    };

A structure cannot be placed on a resource of that id

buybackNotReady ​

ts
buybackNotReady: {
        seconds: number;
    };

The hero was bought back a moment ago, and may be again in so many seconds

cannotBuildThere ​

ts
cannotBuildThere: {};

A structure cannot be placed at that spot

cannotDoThat ​

ts
cannotDoThat: {};

The thing asked for cannot be done, the engine's word where a handler gave no reason

cannotGather ​

ts
cannotGather: {
        resource: string;
    };

A worker cannot gather from a resource of that id

cannotReach ​

ts
cannotReach: {};

A unit could not find a way to where it was sent

cannotReachSite ​

ts
cannotReachSite: {};

A worker could not find a way to the building site

cannotTargetAir ​

ts
cannotTargetAir: {};

An ability used on a flying unit that does not hit the air

cannotTargetFriends ​

ts
cannotTargetFriends: {};

An ability used on a friend that does not target friends

cannotTargetHero ​

ts
cannotTargetHero: {};

An ability used on a hero that targets anything but heroes (targets.heroes: false)

cannotTargetSelf ​

ts
cannotTargetSelf: {};

An ability used on its caster that does not target itself

cannotTargetThat ​

ts
cannotTargetThat: {};

An ability used on something it is not for

dataRefused ​

ts
dataRefused: {
        why: string;
    };

A field of a definition the game does not let be changed, or a value it does not take (debug.redefine)

defeated ​

ts
defeated: {};

The player has lost the game

exchanged ​

ts
exchanged: {
        amount: number;
        resource: string;
        received: number;
        for: string;
    };

One resource traded for another at a rate (see exchange): amount of resource went, received of for came

grounded ​

ts
grounded: {};

An ability that rushes or jumps the caster, which a buff keeps from it (BuffDef.grounded)

groupLimit ​

ts
groupLimit: {
        item: string;
        group: string;
        limit: number;
    };

The carrier has as many of the item's group as it may (ItemDef.group, groupLimit): one pair of boots. item is the item's id, group the group's, limit how many it may carry

heroAtShop ​

ts
heroAtShop: {};

Buying needs one of the player's heroes at the shop, with a free slot

heroLevel ​

ts
heroLevel: {
        unit: string;
        level: number;
    };

unit is the id of the hero's type

inventoryFull ​

ts
inventoryFull: {};

The unit's inventory has no free slot

mustTargetAir ​

ts
mustTargetAir: {};

An ability used on a unit that is not flying but needs a flying target

mustTargetHero ​

ts
mustTargetHero: {};

An ability used on a unit that is not a hero but needs a hero

noBuyback ​

ts
noBuyback: {};

The game has no buyback for this hero (HeroSettings.buybackCost)

noCharges ​

ts
noCharges: {};

An item that refills has none of its charges now (ItemDef.refill)

noMark ​

ts
noMark: {};

A recast that goes to the unit the cast marked (AbilityRecast.mark), while none carries the mark

noPausesLeft ​

ts
noPausesLeft: {};

Every pause of the player's is used

noShopNear ​

ts
noShopNear: {};

No shop is near enough for the buyer

notAnAlly ​

ts
notAnAlly: {};

Resources given to someone who is not an ally

notEnough ​

ts
notEnough: {
        resource: string;
    };

Cannot afford something: resource is the id of what is short

notEnoughHealth ​

ts
notEnoughHealth: {};

The caster has too little health to pay what the ability costs

notEnoughMana ​

ts
notEnoughMana: {};

The caster has too little mana

nothingToUndo ​

ts
nothingToUndo: {};

No purchase to undo (undoBuy): none within the time, the hero away from the shop, the item used

notReady ​

ts
notReady: {};

The ability or action is not ready yet, such as on cooldown

nowhereToReturn ​

ts
nowhereToReturn: {
        resource: string;
    };

A worker with something to bring back and nowhere to bring it. resource is its id

outOfStock ​

ts
outOfStock: {};

A shop is out of the item

queueFull ​

ts
queueFull: {};

A building's or hero's production queue has no room for more

received ​

ts
received: {
        amount: number;
        resource: string;
        player: string;
    };

Resources arrived from an ally: the amount of the resource from the player by name

requires ​

ts
requires: {
        units: string[];
    };

The unit types the player still needs to build to make or research something, by id

researchDone ​

ts
researchDone: {
        upgrade: string;
    };

Research of the upgrade finished; upgrade is its id

sent ​

ts
sent: {
        amount: number;
        resource: string;
        player: string;
    };

Resources given to an ally, and received from one (see give)

silenced ​

ts
silenced: {};

The caster is silenced and cannot cast

supplyBlocked ​

ts
supplyBlocked: {
        pool?: string;
    };

Out of supply, and could build more of what provides it. pool for one of the game's own (RuleSettings.supply.pools)

supplyLimit ​

ts
supplyLimit: {
        pool?: string;
    };

Out of supply, and at the most anyone can have (RuleSettings.supply.max, a pool's max)

surrendered ​

ts
surrendered: {
        player: string;
    };

Another player gave up. player is their name

targetSpellImmune ​

ts
targetSpellImmune: {};

An ability used on what is immune to spells

theirGroupLimit ​

ts
theirGroupLimit: {
        item: string;
        group: string;
        limit: number;
    };

The unit it is handed to has as many of the item's group as it may (groupLimit's params)

theirInventoryFull ​

ts
theirInventoryFull: {};

The inventory of the unit it is given to has no free slot

tooManyBuildings ​

ts
tooManyBuildings: {};

The navigation has no room for another building in the way (RecastNavigationOptions.maxObstacles)

tooManyCommands ​

ts
tooManyCommands: {};

Sent commands faster than the game takes them (a server's rate, World.commandLimit): the rest went nowhere

tooManyHeroes ​

ts
tooManyHeroes: {};

The player has as many heroes as the rules allow (RuleSettings.heroes)

tooManyLines ​

ts
tooManyLines: {};

Said too much too quickly: the rest goes nowhere for a moment

tooManyPings ​

ts
tooManyPings: {};

Pinged too often: the rest go nowhere for a moment

unitAtShop ​

ts
unitAtShop: {};

Hiring needs one of the player's units at the place that hires

unknownPrefab ​

ts
unknownPrefab: {
        prefab: string;
    };

A prefab asked for by a name the game has not (debug.spawnPrefab)