EngineMessages beta
Interface of @v12-engine/engine
export interface EngineMessagesThe 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
alreadyHaveHero: {};The player already has the hero being asked for
alreadyHired
alreadyHired: {
unit: string;
};A hero is hired once: the player has it already. unit is its type
alreadyResearching
alreadyResearching: {};The upgrade being asked for is already being researched
buildOnResource
buildOnResource: {
resource: string;
};A structure cannot be placed on a resource of that id
buybackNotReady
buybackNotReady: {
seconds: number;
};The hero was bought back a moment ago, and may be again in so many seconds
cannotBuildThere
cannotBuildThere: {};A structure cannot be placed at that spot
cannotDoThat
cannotDoThat: {};The thing asked for cannot be done, the engine's word where a handler gave no reason
cannotGather
cannotGather: {
resource: string;
};A worker cannot gather from a resource of that id
cannotReach
cannotReach: {};A unit could not find a way to where it was sent
cannotReachSite
cannotReachSite: {};A worker could not find a way to the building site
cannotTargetAir
cannotTargetAir: {};An ability used on a flying unit that does not hit the air
cannotTargetFriends
cannotTargetFriends: {};An ability used on a friend that does not target friends
cannotTargetHero
cannotTargetHero: {};An ability used on a hero that targets anything but heroes (targets.heroes: false)
cannotTargetSelf
cannotTargetSelf: {};An ability used on its caster that does not target itself
cannotTargetThat
cannotTargetThat: {};An ability used on something it is not for
dataRefused
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
defeated: {};The player has lost the game
exchanged
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
grounded: {};An ability that rushes or jumps the caster, which a buff keeps from it (BuffDef.grounded)
groupLimit
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
heroAtShop: {};Buying needs one of the player's heroes at the shop, with a free slot
heroLevel
heroLevel: {
unit: string;
level: number;
};unit is the id of the hero's type
inventoryFull
inventoryFull: {};The unit's inventory has no free slot
mustTargetAir
mustTargetAir: {};An ability used on a unit that is not flying but needs a flying target
mustTargetHero
mustTargetHero: {};An ability used on a unit that is not a hero but needs a hero
noBuyback
noBuyback: {};The game has no buyback for this hero (HeroSettings.buybackCost)
noCharges
noCharges: {};An item that refills has none of its charges now (ItemDef.refill)
noMark
noMark: {};A recast that goes to the unit the cast marked (AbilityRecast.mark), while none carries the mark
noPausesLeft
noPausesLeft: {};Every pause of the player's is used
noShopNear
noShopNear: {};No shop is near enough for the buyer
notAnAlly
notAnAlly: {};Resources given to someone who is not an ally
notEnough
notEnough: {
resource: string;
};Cannot afford something: resource is the id of what is short
notEnoughHealth
notEnoughHealth: {};The caster has too little health to pay what the ability costs
notEnoughMana
notEnoughMana: {};The caster has too little mana
nothingToUndo
nothingToUndo: {};No purchase to undo (undoBuy): none within the time, the hero away from the shop, the item used
notReady
notReady: {};The ability or action is not ready yet, such as on cooldown
nowhereToReturn
nowhereToReturn: {
resource: string;
};A worker with something to bring back and nowhere to bring it. resource is its id
outOfStock
outOfStock: {};A shop is out of the item
queueFull
queueFull: {};A building's or hero's production queue has no room for more
received
received: {
amount: number;
resource: string;
player: string;
};Resources arrived from an ally: the amount of the resource from the player by name
requires
requires: {
units: string[];
};The unit types the player still needs to build to make or research something, by id
researchDone
researchDone: {
upgrade: string;
};Research of the upgrade finished; upgrade is its id
sent
sent: {
amount: number;
resource: string;
player: string;
};Resources given to an ally, and received from one (see give)
silenced
silenced: {};The caster is silenced and cannot cast
supplyBlocked
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
supplyLimit: {
pool?: string;
};Out of supply, and at the most anyone can have (RuleSettings.supply.max, a pool's max)
surrendered
surrendered: {
player: string;
};Another player gave up. player is their name
targetSpellImmune
targetSpellImmune: {};An ability used on what is immune to spells
theirGroupLimit
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
theirInventoryFull: {};The inventory of the unit it is given to has no free slot
tooManyBuildings
tooManyBuildings: {};The navigation has no room for another building in the way (RecastNavigationOptions.maxObstacles)
tooManyCommands
tooManyCommands: {};Sent commands faster than the game takes them (a server's rate, World.commandLimit): the rest went nowhere
tooManyHeroes
tooManyHeroes: {};The player has as many heroes as the rules allow (RuleSettings.heroes)
tooManyLines
tooManyLines: {};Said too much too quickly: the rest goes nowhere for a moment
tooManyPings
tooManyPings: {};Pinged too often: the rest go nowhere for a moment
unitAtShop
unitAtShop: {};Hiring needs one of the player's units at the place that hires
unknownPrefab
unknownPrefab: {
prefab: string;
};A prefab asked for by a name the game has not (debug.spawnPrefab)