health→Health,
team→Team, 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.
/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.
/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/listroutes are gone (they 404). You compose a unit per-spawn from the flags above; re-create it with different flags to change it. goldaddsLevel(1), not justGold. Spawning withgoldalso stamps aLevel(1)so leveling and bounties have something to read; you get"level":1back even though you passed onlygold.combatneeds its sub-flags to be useful.combat:truealone enables the auto-combat behavior but with default numbers; passcombat_damage/combat_range/combat_cooldown(andcombat_speed:0for a stationary tower) to tune it. See Gameplay & combat.transform.positionis[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’sspawn_hero, not by/spawn. There is no generic HTTP route that attaches anAbilitySet— 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.