Skip to main content
A “hero” in Euca is not a special type — it is a generic entity composed from gameplay components. You spawn it with flags that map one-to-one onto components: healthHealth, teamTeam, combat→an AutoCombat bundle, gold/gold_bounty/xp_bounty→the economy components, and role is a label (EntityRole::Hero). One POST /spawn stamps the whole bundle. This builds on the genre-neutral gameplay primitives; every command is real and runnable against a local server, with output captured from one. The full Dota-style hero kit (mana, abilities, base/growth stats) is assembled by the MOBA example game (games/euca-moba), not by the generic HTTP surface — see MOBA systems.

Compose a unit

Spawn an entity with gameplay components. The flat keys on /spawn each add a component; omit one and that component is left off. This is exactly what the CLI front-end euca entity create --role hero --combat --gold … sends.
The same call over the CLI:
Read the entity back. /entities/{id} shows precisely the components the flags stamped on — Health, Team, Gold, a Level(1) (added alongside gold), and EntityRole::Hero. There is no mana, ability set, or base/growth stats: those are the MOBA game’s hero kit, not the generic spawn.
After one /step, the transform propagates to the spawn position:

What each flag maps to

Behavior and gotchas

The things you only learn by running it:
  • A unit is just components — there is no hero registry or template. The deleted /hero/define, /hero/select, and /hero/list routes are gone (they 404). You compose a unit per-spawn from the flags above; re-create it with different flags to change it.
  • gold adds Level(1), not just Gold. Spawning with gold also stamps a Level(1) so leveling and bounties have something to read; you get "level":1 back even though you passed only gold.
  • combat needs its sub-flags to be useful. combat:true alone enables the auto-combat behavior but with default numbers; pass combat_damage/combat_range/combat_cooldown (and combat_speed:0 for a stationary tower) to tune it. See Gameplay & combat.
  • transform.position is [0,0,0] until the first /step. The component state is correct immediately; the transform is just unpropagated until the tick loop runs — see Simulation.
  • Mana, abilities, and stat growth are the MOBA game’s hero kit. They are inserted in Rust by euca-moba’s spawn_hero, not by /spawn. There is no generic HTTP route that attaches an AbilitySet — see Abilities & status effects.

Endpoints

The combat, economy, and team primitives a unit is built from live on Gameplay & combat; items and the gold economy are on Inventory & economy.

Status

  • Shipped, all headless — composing a unit from gameplay components in one spawn call (health, team, auto-combat, gold + level, bounties, role), with read-back of exactly the stamped components.
  • MOBA hero kit (mana, abilities, base/growth stats) ships in the MOBA example game, assembled in-engine rather than over the generic HTTP surface.

Entity & spawn endpoints

The spawn and entity endpoints, with request and response schemas.