Creatures and Birds
Creatures are spawned by spawners, simulated on the server and drawn by the client with animated Blender models (Models and Animation). All creature content is seed data in EF migrations, written as raw SQL. Each migration finds what it changes by name.
Where creatures are defined
| table | holds |
|---|---|
creatures | one species' stats: health, damage, aggro and leash radius, move and fly speed, taming, mount speeds, pet carry weight, food tags, karma penalty, model, and the status effect its hits may give (OnHitEffectId, OnHitChance) |
creature_kinds | behaviour flags shared by a kind: FleesWhenHit, WandersWhenPassive, the taming skill, and for birds StartleRadius, FlockFlightIntervalSec, PerchesInTrees and RoostsOnCeilings; the kind's status-effect Resists |
status_effects | timed effects such as venom: damage per tick, tick, duration, category, tint (see Status effects, below) |
creature_loot | what each species drops, with chances and quantity ranges |
creature_instances | the creatures alive in the world right now |
The creatures
| creature | HP | damage | behaviour | drops |
|---|---|---|---|---|
| Wolf | 20 | 3 | aggressive, hunts rabbits; aggro 15 m, leash 30 m | — |
| Bear | 50 | 7 | aggro 20 m, leash 40 m | — |
| Rabbit | 10 | 0 | flees when hit, wanders | Rabbit Pelt (65%) |
| Goose | 4 | — | flees when hit, wanders, flies | Goose Meat 1–2, Goose Feather 6–12 |
| Horse | 30 | — | tameable and rideable | Horse Meat 3–5, Horse Hide 1 |
| Slime | 12 | 1 | wanders, fights back when hit | Goo 1–3 (always) |
| Owl | 4 | 0 | passive bird, perches in trees, out only at night | Owl Feather 2–4 |
| Crow | 3 | 0 | passive bird, flies in flocks | Crow Feather 3–6 |
| Stegosaurus | 80 | 8 | grazes, fights back when hit; leash 35 m | Stegosaurus Meat 4–7, Stegosaurus Hide 1, Stegosaurus Back Plate 1–2, Stegosaurus Tail Spike 1 (50%) |
| Kobold | 8 | 4 | aggressive; aggro 12 m, leash 25 m; level 0 of the Sunken Ruin | Candle (60%), Gold 3–12 |
| Bat | 4 | 0 | flies; roosts hanging from the ceilings of level 0's halls and rooms; startled at 6 m; tameable (Bat Taming, Vermin Taming 5) | Bat Wing 1–2 |
| Rat | 6 | 2 | wanders, bites back when hit; four rooms of level 0; tameable (Rat Taming, Vermin Taming 1) | Rat Tail (80%) |
| Beetle | 10 | 0 | wanders, flees when hit; the cave quarter of level 0; tameable (Beetle Taming, Vermin Taming 1) | Beetle Shell |
| Spider | 14 | 4 | aggressive; aggro 6 m, leash 15 m; the webbed corridor of level 0; a bite poisons 35% of the time (Spider Venom); tameable (Spider Taming, Vermin Taming 20) | Spider Silk 1–3, Venom Gland (30%), Spider Carapace (50%) |
Wolves and bears came with combat (Step10CombatDeath); each later species has
its own migration (CreatureScenesAndRabbit, GeeseAndBluntArrows, Horse,
Slime, BirdsAndKarma, Stegosaurus, Kobolds, CaveCritters, SpidersAndStatusEffects). The bear has no spawner yet.
Slimes are pink jellies that hop near Anyxa. They do not flee, and a slime that has been hit stops wandering and fights back while anyone on its threat list is near. The hop is the model's animation; the server moves it like any other wanderer. Goo sells for 8 and is tagged as a glue material.
Stegosauruses graze in pairs round a muddy wallow south-east of the wolf den
(-35, -3). Like slimes they never start a fight and fight back when hit, here with
a swing of the spiked tail. Their meat cooks at a campfire like the other meats,
and the back plates and tail spikes are tagged as a Bone material for later
recipes. Since TamingCategories they can be tamed (Stegosaurus Taming, needs
Dinosaur Taming, which opens at Taming 30).
Kobolds are mine goblins of the old German kind: hunched, about a metre tall,
in a pointed red miner's hood, with a lit candle in the left hand and a small knife
in the right. They live on the first level of the Sunken
Ruin, at nine nests spread across it, and attack on
sight and hit a little harder than wolves (8 HP, 4 damage). The
candle really lights the room: any creature model with a bone named Flame gets a
small flickering light there (scripts/CandleLight.gd), without shadows and fading
out past 35 m. Each nest is ringed by the candles they keep: stubs stood on the floor
out to nearly 3 m, most lit, and a few of their flames (nodes named Flame_...)
carry the same light (CandleLight.attach_to_flames, at most four a nest), so a
nest shows as a warm glow in the dark. They guard their corridors with trip-wires
and bells that call a nest's kobolds, and with stone traps
(Dungeons). They cannot be tamed. The model and the nest come from
tools/blender/models/creatures/kobold.py and spawners/kobold_nest.py.
The Candle they drop can be set down anywhere, lit, for ten minutes: double-click
it, or choose Place candle from its menu. It stands on the floor just in front of
you, on the ground, a dungeon floor or a house floor, and everyone sees it. It burns
down as it goes (the wax shortens, and the light sinks over its last two minutes)
and then it is gone. One player can have five burning at once; lighting a sixth
puts out their oldest. Server Candles.cs, client scripts/PlacedCandle.gd.
Bats, rats and beetles
The small life of the Sunken Ruin's first level, all of it tameable, each kind with
its own taming skill under Vermin Taming (migration CaveCritters; see Taming). Bats roost in the
two halls, five to a spawner, and four each in the south-west cave room, the
flooded tunnel's dry cave end, the Moon Hall, the storeroom and the room at
(110, 670) (migration MoreBats), thirty in all, hanging from the ceiling (see
Birds, below), and
scatter to another roost when someone comes within 6 m. Rats live in four rooms
at least 28 m from any kobold nest, three to a room, and bite back. Cave beetles
crawl in the south-west cave quarter, six of them, and flee when hit. About 28 are
alive at once. Tamed, a rat eats vegetables, meat and food and takes a collar and a
charm; a bat eats meat and a beetle vegetables, each with a charm slot. The models
are tools/blender/models/creatures/bat.py, rat.py and beetle.py; the bat's
Idle hangs it upside down by its feet, 0.25 m above where the server puts it, which
is on the stone.
Cave spiders
Two cave spiders keep the webbed corridor of the Sunken Ruin's first level
(spawner at (38, 1018), floor −20 m, back after 2 minutes). Built like a wolf
spider, 1.2 m across the legs: a low hairy body in dark grey-brown, paler banded
legs, a cluster of glossy eyes that catch the torchlight. It waits among the webs
(which do not slow it), and respins one burnt with a torch 5 minutes later: it
walks to the web's edge, turns its back to it, raises its abdomen and shoots silk up
into it (the model's Spin clip; Dungeons) and goes for anyone within 6 m, biting for 4; a bite gives
Spider Venom 35% of the time (see Status effects, below). Its kind resists
venom entirely. Near one you hear it chitter now and then, its legs skitter on
the stone as it moves, and it hisses as it bites
(audio/creatures/spider_chitter_NN, spider_hiss_NN, spider_step_NN, CC0 Freesound; see
audio/CREDITS.md). It drops Spider Silk (a fibre), now and then a Venom Gland
and a Spider Carapace, materials for later; their icons are to come.
Tamed (Spider Taming, skill 10025, needs Vermin Taming 20) it eats meat, takes a collar
and a charm, carries 3 kg, and its bite poisons what it fights just as a wild one
poisons you. The model is tools/blender/models/creatures/spider.py; its legs
splay, so their poses are turned about the vertical and the level line across
each leg in the world and carried into each bone's frame (leg_pose).
Crow feathers fletch blunt arrows (the recipe "Blunt Arrows (crow-fletched)").
The dullahan
The first undead (migration Dullahan). A headless figure about 1.9 m tall,
it walks a beat at night (spawner phase Night) across the low valley between
the village and the Yamauba's mountain, from (-20, -225) to (-20, -295), and is
gone at dawn. The beat is the spawner's "beat": [x1, z1, x2, z2]: an
aggressive creature with no one to fight walks end to end instead of wandering
its leash.
| HP | damage | behaviour | drops |
|---|---|---|---|
| 60 | 8 | aggressive; aggro 15 m, leash 40 m; slow heavy blows with a 1 s warning, 30% heavy; sees all round to 25 m, in the dark; immune to venom | Grave Dust 1–3, Gold 5–20, Spine Whip (5%) |
It fears gold. A dropped pack holding gold within 8 m of it sends it
running from the pack for 8 seconds (creature_kinds.FearsItemId), without the
heal a creature gets on returning home; then it comes back to the fight. The
gold stays where it lies, and keeps working while it does.
Binding it is the undead way of taming (see Taming): beat it below 12 HP, then hold E beside it with an Ofuda in your pack. Dullahan Taming (skill 10063) needs Undead Taming 1, which opens at Taming 30. Tamed, it eats meat and carries 10 kg; it takes no gear.
The Ofuda is written with Calligraphy (skill 10062, a craft open to
everyone) at the Apothecary Table from Bark Paper of birch (two birch Bark
dried at the Drying Rack, 15 minutes) and Ink (Charcoal and Goo ground at
the Crusher, two at a time). The Spine Whip is a one-handed blunt weapon
(8 damage), a stiff spine wound with black leather at the grip; its model is
tools/blender/models/items/spine_whip.py. Grave Dust is a material for
later. Icons are to come.
The live check is scripts/check_dullahan_binding.py.
The hitodama
The first ghost (migration Hitodama): a drifting blue soul-flame, the soul
of a traveller the wolves pulled down. One is out at night (spawner phase
Night) a little way from the wolf den, at (-70, 14). It never fights; struck,
it drifts away, and killing it gives nothing and costs karma.
| HP | damage | behaviour | drops |
|---|---|---|---|
| 6 | 0 | drifts slowly, flees when hit; immune to venom; karma penalty 1 | — |
Taming it is granting its wish (see
Taming). Drop any food (an item
tagged food) on the ground near it: it drifts to the food, takes it, and
whispers its wish: let five wolves answer for its death. Each wolf you or your
pets kill counts, and you are told the count. When the fifth falls the wish is
granted and a hitodama comes to your side, wherever you are (or waits, if you
have no room or too little Ghost Taming, and joins when you do). Hitodama
Taming (skill 10064) needs Ghost Taming 1, which opens at Taming 20. Tamed, it
eats food and heals you: base MP 20, Intellect 10 and Wisdom 10, so 40 MP and
a 10-point heal (see Pet magic).
The model is models/creatures/hitodama.glb
(tools/blender/models/creatures/hitodama.py). It has no Walk clip, so it
moves on its Fly clip (any creature without a Walk clip does). The live check
is scripts/check_hitodama_wish.py.
The yanari
A gang of three tiny oni, red, blue and green, about 0.4 m tall, each with a
little mallet: they bang and rattle in the dark. Four gangs roam the whole of the
Sunken Ruin's first level, walking from room to room (the spawner's roam list:
every room and hall but the two of thin air) and stopping 20–60 s in each, where
they hammer at the stone (the model's IdleBang clip, with knocks and rattles,
audio/creatures/yanari_bang_NN) and giggle now and then (yanari_giggle_NN),
heard 40 m off. They are innocents: they never attack, killing one costs karma,
and they drop nothing. They run when they notice you (sight 10 m in a wide cone
but only by a light in the dark, hearing 14 m, no nose; a pack, so one gang that
startles sets the others near it looking), so sneak up quietly to watch them.
Stay within 12 m of a gang for a minute without striking it and it leaves you
something it rattled loose: a Candle, a Brass Bell or 1–3 coins, at most once an
hour (creatures.GiftCooldownHours). Migration Yanari; model
models/creatures/yanari.glb (tools/blender/models/creatures/yanari.py).
Yōkai friendship
The kappa and the chōchin-obake can be befriended (migration YokaiFriendship;
see Taming). Kappa Taming (10065)
and Chōchin-obake Taming (10066) need Yōkai Taming 1, which opens at Taming 30.
- Kappa: bow to it (B) and let it be while it is helpless; when it recovers it thanks you with its gift, and that counts once. Three times with the same kappa and it comes with you. The friendship is with that one kappa and lives in the server's memory. Tamed, it eats vegetables and fruit.
- Chōchin-obake: keep it company until it leaves you its gift (about once
a night). It is out at dusk and night by the world clock (
@time); its paper glows amber on clients (LANTERN_PAPERin WorldEntityManager.gd), with a small light inside it for the ground. Three gifts, on three nights from any of them, and the one that gave the third follows you home. This friendship is saved. Tamed, it eats food.
Each step tells you how far along you are ("The kappa warms to you (1/3)").
The live check is scripts/check_yokai_friendship.py.
Behaviour
The server runs the creature AI every tick:
- Fleeing. A creature that flees when hit runs from its attacker at 1.5 × its move speed for 3 seconds, then goes idle.
- Wandering. A passive wanderer roams within its spawner's leash. A wanderer that does not flee stops roaming while its threat table is not empty, and fights.
- Hunting prey. An aggressive creature with prey (the wolf, which hunts rabbits) chases and attacks the nearest prey inside its aggro radius, and gives up and returns home if the prey leads it past its leash.
- Fighting players. A hostile creature attacks a player it is alerted to (see Senses below) on a cooldown. Its aggro radius now only matters for hunting prey.
Senses and stealth
Hostile creatures, and prey that flees, see, hear and smell players
(Moondog.GameServer/Stealth.cs). Each creature's senses are set in the admin
creature editor, under Senses:
| Field | Meaning |
|---|---|
| Sight range, Sight cone | How far it sees a standing player in daylight, within a cone of that many degrees in front of it. 0 is eyeless. Walls, rock and trees block sight. |
| Hearing range | How far it hears a player walking. Sprinting carries 2×, crouched 0.4×, prone 0.2×, standing still is silent. Rain takes up to 40% off. |
| Smell range | How far it smells a player, whatever they do. |
| Sees in the dark | Without it, its sight is 35% at night and in dungeons and about two thirds at dawn and dusk. A lit torch or lantern undoes the darkness. |
| Pack animal | When it is alerted, others of its kind within 15 m grow suspicious and come to look. |
Crouching makes you 75% as visible and prone 40%. Awareness builds rather than switching on: the closer a sense has you, the faster it rises. Once suspicious, the creature stops, turns to look (its Alert clip) and walks to where it last sensed you. When alerted, a hunter attacks and prey flees. An alerted creature that loses you for 8 seconds searches where it last had you, then goes home. While it still senses you, it chases up to 10 times its leash. The noise of a fight, a swing or a shot makes creatures that hear it suspicious of where the sound was made, not of where you go afterwards.
Stealth (skill 10039, trains Agility) halves your noise and how far you are
seen at full skill. It trains while a hostile creature is near and has not
noticed you, and with each sneak attack. A blow on a creature that has no idea
you are there does double damage in melee and 1.5× with arrows, and a fully
charged one staggers it. With Stealth 50 or more you see an eye over nearby
creatures: it fills as they grow suspicious and turns red when they are alerted
(ReceiveAwareness). Live check: scripts/check_stealth.py.
Tall grass is cover. It is the Terrain3D clutter mesh Tall Grass
(mesh id 1 in World.tscn), painted with the Terrain3D brush.
tools/terrain/paint_tall_grass.gd can also paint a patch from a script.
Standing in it hides nothing. Crouched in it, you are seen from half as far
again. Prone in it, from 0.15, so nearly nothing sees you until it is on top
of you. It muffles your movement a little (0.9) and does nothing against a
nose. The server reads the painted grass at start (TerrainProbe.cover_cells)
into 1 m squares within 1 m of a tuft. It caches them in
user://cover_cache.json by each region file's modified time, so a start only
reads again the regions repainted since. After repainting, restart the game
server; it picks up the new terrain on boot.
Light undoes darkness for creatures that cannot see in the dark. That
means your own lit torch or lantern, or standing within 4 m of a placed candle,
8 m of a campfire or hearth, or 3 m of one of a dungeon's candles (its FLAME_
markers).
@senses (GMs) lists the creatures within 60 m and how far each would see,
hear and smell you right now, and says whether you are in tall grass or light.
Live check: scripts/check_stealth_cover.py.
Still to come: wind carrying scent (stage 3), and gear noise and scent-masking brews (stage 4).
A creature that is not a bird is kept on the ground: if it ends up less than 1 m above the terrain, it is snapped down onto it.
Status effects
A status effect is timed harm, such as a cave spider's venom: DamagePerTick
every TickSec for DurationSec. A creature's hit gives one at OnHitChance,
wild or tamed, to a player, a pet or another creature. A new dose restarts it;
doses never stack. Effects are rows of status_effects, edited on the admin
panel's Status effects page, and the server reloads them with the rest of the
content (Moondog.GameServer/StatusEffects.cs).
| effect | category | damage | lasts | given by |
|---|---|---|---|---|
| Spider Venom | venom | 1 a second | 6 s | Spider, 35% of bites |
Resisting. An effect has a category, and resists name it, as
category:percent pairs (venom:20):
- A player's Sturdiness (with gear) gives a chance to shrug a dose off entirely, 0.5% a point, at most 75% ("You shrug off the spider venom.").
- Worn items'
Resistsadd up, to at most 80%, and take that much off the damage. Fractions carry over to the next tick. - A creature kind's
Resistsdo the same for its creatures and pets; at 100 they are immune (spiders to venom).
While one runs, your health bar takes the effect's colour and its name counts down
under it (ReceiveStatusEffect, HPBar.gd). Death ends it. A creature killed by
an effect drops no loot, like a pet's kill, and if a pet gave the dose its owner
answers for it (quests, karma).
Antivenom
Each venom has its antivenom, an item whose CuresEffectId names the effect (the
Items admin page's "Cures status effect"). Spider Antivenom ends Spider Venom:
drink it from the inventory ("Drink"), or give it to a poisoned pet with Give
antivenom on the pet panel (ClientCurePet, within 3 m). Drunk without that venom
running it is refused and kept ("You have no venom it would cure.").
It is brewed at the Apothecary's Table, a new station (kind ApothecaryTable):
1 Venom Gland + 2 Healing Herbs, 20 seconds, with a Mortar and Pestle in your
pack. Brewing trains Apothecary (skill 10029, Craft, trains Intellect). One
table stands in the village east of the flax benches (53, 4); another can be made
for a house at the Shaving Bench (3 boards of one wood, 8 treenails, a stone, 2 clay, a
drawknife). The Mortar and Pestle is a tool (tag mortar) that never wears out:
made from 2 stone at the Crusher (Masonry 1), or bought from Anyxa for 25 gold.
Migration Antivenom; the table's model is tools/blender/models/stations/apothecary_table.py.
Draughts
A consumable can start an effect too (GivesEffectId, "Gives status effect" on the
Items page). Clear Breath gives the harmless effect of the same name (category
ward, ten minutes), and while a ward runs thin air in the Sunken Ruin does no harm.
A player can have several effects at once (a venom and a ward); the health bar lists
them all and wears the newest one's colour.
Torpidity and tranquilizer arrows
Every creature has torpidity equal to its max health. A Tranquilizer Arrow
(an arrow tagged tranquilizer, and short-arrow) takes its hit off that instead of
the creature's health; at 0 the creature falls asleep for ten seconds -- a flier drops
from the air or its roost to the floor -- with "Zzz" over it, and can be tamed with
the usual hold-E while it sleeps. It then wakes with full torpidity; torpidity also
refills at 1 a second once 2 seconds have passed since it was last hit. A
tranquilizer still makes an enemy of what it hits. This is how a bat at its roost,
out of taming reach, is tamed. Made with Fletching at the Shaving Bench: a Venom
Gland, 3 wood, 3 flax, 27 goose feathers and a knife give 10
(Moondog.GameServer/Torpor.cs, migration TranquilizerArrows).
Spawners
A spawner is a world_entities row whose node type has Kind = 'Spawner'. Its
settings live in the entity's NpcData:
{"creature_id": 9, "radius": 10, "max_alive": 3, "respawn_sec": 45, "phase": "Night"}
| key | meaning | default |
|---|---|---|
creature_id | the species it spawns | — |
radius | how far from the spawner it places them | — |
max_alive | how many it keeps alive | 2 |
respawn_sec | the delay before it replaces one | 30 |
phase | optional: only spawn during this world phase, such as Night | always |
roam | optional: [[x, z], ...] places its creatures wander between, one after another, staying 20–60 s at each (Roaming.cs), instead of within their leash; points on the spawner's level only | none |
Spawners are drawn as dens, warrens, nests, pools, roosts and a lick, one per
species. Migration SpawnerModels sets each spawner type's model only where none
is set; the client places the model on the terrain once the terrain's height is
available.
Birds
A bird is any creature with a fly speed above 0. The owl, the crow and the goose
fly. Flight is in Moondog.GameServer/BirdFlight.cs.
A bird is grounded, flying or leaving. It takes off when:
- it is hit;
- a player comes within its startle radius (owl 5 m, crow 8 m, goose 6 m) and within 10 m vertically;
- its spawner calls a flock flight, about every flock interval (owl 150 s, crow 200 s, goose 300 s), varied by ±50%.
Flock flights circle the spawner one to one and a half times.
A startled bird escapes. It flies 15 m straight away from the threat, then lands at whichever of six random points within its leash is farthest from the threat. Once landed, nearby players cannot startle it again for 6 seconds.
Altitude. Birds that perch cruise at 5–8 m and others at 8–14 m. They climb at 3.5 m/s and sink at 4 m/s, and stay at least 0.8 m above the ground until within 1.5 m of where they land.
Perching. Owls perch 2.4 m up a standing tree, 1 m from the trunk. A tree is any resource node whose name ends in "Tree" and that was not felled today.
Night birds leave by day. When the world phase stops matching the spawner's
phase, the bird flies 90 m outward and 25 m up, and is then removed with no loot.
Owl spawners are set to Night.
Only arrows reach a bird in the air. An airborne or perched bird is out of reach of melee, pets and wolves. A bird shot down drops its loot on the ground beneath it.
Underground. A flier whose spawner is in a dungeon flies the dungeon, not
the sky. Its flight follows the navigation mesh round the walls (a path planned at
take-off, from the floor under it to the floor under where it will land), and over
each step it keeps between the floor and the ceiling there, which the server asks
Dungeon.span_at for: it cruises 1.6–3 m up and never within 0.6 m of the stone.
It does not fly flock circles or flee in a straight line. A kind that
RoostsOnCeilings (the bat) settles hanging 0.25 m below the ceiling over a point
of the mesh, where the room is 2.6–12 m high; it never stays on the floor, and while
it roosts it is out of reach like a perched owl.
Flying pets. A tamed flier (a bat) flies after its owner instead of walking
(Moondog.GameServer/PetFlight.cs). When its owner gets past its follow distance it
takes off and flies to its place behind them along the navigation mesh, 1.8 m up and
under the ceiling; once it has caught up it settles. Under a ceiling it can reach (a
room 2.6–12 m high) it hangs from the stone like a wild bat; anywhere else it comes
down and rests on the floor, wings folded (State 2, CreatureStateResting, which
plays the model's Rest clip). Told to stay, it settles where it is; attacking, it
flies at its target, low. Unlike a wild bird in the air a flying pet can be struck,
and left at home it rests on the floor there.
On the wire, a flying creature's State is 1 (CreatureStateFlying) and a
grounded one's is 0. The client plays the model's Glide clip when the bird
sinks faster than 0.6 m/s, and Fly otherwise. A bird killed in the air falls
under gravity.
Killing an owl or a crow costs karma (Karma).