Skip to main content

Dungeons

A dungeon is a ruin under the terrain, reached on foot through an entrance cut into the hillside. The first is The Sunken Ruin under the southern reach of Anyxa's Caldera: five levels, 17 hectares of floor, and a walk of nearly 3 km from the entrance to the deepest level. Its first level belongs to kobolds: nine nests in rooms spread across it, none within 50 m of where the entrance stair arrives, each lit by the kobolds' own candles. The levels below are empty so far.

Entrancea stone landing at (−40, 606), 7.8 m up, on the lake's south shore; the stair runs south into the hill
Footprintx −280 to 200, z 608 to 1056, under the rim hills
Levelsfloors at −20, −34, −48, −62 and −76 m
Between levelstwo stairwells per level, placed far from where you arrive
Lightnone: under a roof the sun, moon, sky light and weather are gone, and a torch is the light

Editing a dungeon​

The Blender files are the dungeon. Each level is one file, tools/dungeon/anyxas_ruin/level_<n>.blend (level 0 holds the entrance too). Edit them by hand however you like: reshape rooms, carve passages and caves, add arches, rubble and props. Then put them in the game with one command:

python tools/dungeon/build.py anyxas_ruin

That exports each level to godot_client/dungeons/anyxas_ruin_L<n>.glb, imports them, and bakes the navigation mesh (anyxas_ruin_nav.res) from them, in about 40 seconds. Then sync and restart the dev game server as usual: it builds its collision from the same .glb files.

What the names of objects mean:

NameDrawnCollidesFor
DECO_...yesnostair treads, props, anything you walk through
COL_...noyesinvisible blockers, the smooth slope under a stair
anything elseyesyeswalls, floors, ceilings, pillars
GLOW_... (an empty)——where a root cluster's faint light hangs; the client lights it (GLOWB_ the fungus's blue)
DRIP_... (an empty)——a puddle water drips into from the ceiling, with a plip (scripts/WaterDrip.gd); SEEP_ a trickle's loop
FLAME_... (an empty)——a lit candle flame (the kobolds' wax shrines)
DUST_... (an empty)——dust sifting down from a broken ceiling
ECHO_<KIND>_... (an empty)——a muffled noise from off in the dark, heard only 18–70 m away, every 40–120 s and never two within 15 s anywhere: KOBOLD chatter, STONES tumbling, SCRAPE stone dragged on stone (scripts/DistantNoise.gd)
WEB_... (an empty, scaled)——a web you push through at 40% speed: a box of the empty's size, read by client and server alike; burnable with a torch, its threads the DECO_ mesh whose middle lies in the box
TRAP_BELL_..., TRAP_STONE_... (empties)——the kobolds' traps: a trip-wire along the empty's X (its scale the half-length, the bells at its −X end), a loose slab of radius its scale
AIR_... (an empty, scaled)——thin air: a box of the empty's size (Hazards.cs)
ROCKFALL_... (an empty)——where stones fall now and then, within a radius of its scale
WEAK_... (a mesh)yesyesa crumbling floor slab over a pit: both sides switch its collision off when it gives way

A body has no step height, so stairs are two objects: treads you see (DECO_) over a smooth slope you walk on (COL_). Keep to that for any new stair. Anything flat enough to stand on becomes walkable navigation, with no other marking needed.

Materials are picked by name: RuinWall, RuinFloor and RuinRock get the Poly Haven textures in godot_client/textures/ruin/ (CC0; see its README), and RuinRoot is the rock texture tinted pale and faintly glowing, for roots; RuinFungus the same in a cold blue; RuinWater dark, still and glossy; and RuinTint_rrggbb (kit's tint()) the rock texture tinted to that colour, for bone, wax, wood, rags and pots. The .glb files carry only the names and UVs; the game supplies the images. To texture a new face, give it one of those materials and UV it in metres divided by the texture's size (2.5 m wall, 2.4 m floor, 2.0 m rock); a cube projection at that scale does it.

The manifest, godot_client/dungeons/anyxas_ruin.json, lists the levels' files and, for the entrance, the terrain to cut over the open stair (holes, whole-metre vertex ranges) and press down under the landing (lowers, with the height to press to), and where the navigation link from the surface starts (entrance). Edit it by hand if the entrance moves.

The shapes stay sane only if: floors are flat or gently sloped (under 40 degrees for navigation), there are 2 m of headroom wherever someone walks, and every face is closed, since a ray through a gap finds no floor.

Objects named REF_... are never exported: they are there to model against. Level 0 keeps REF_Terrain, the real ground over the entrance at 1 m steps (with the manifest's holes cut), so walls can be fitted to the hillside. To make one for another stretch of ground, write the heights with tools/dungeon/export_terrain.gd and load them with tools/dungeon/terrain_ref.py; the instructions are at the top of each. The heights export_terrain.gd writes already have the entrance's holes in them, as nan.

The kit​

tools/dungeon/kit.py is a small library for hand work done by script in Blender (import kit after putting tools/dungeon on sys.path). It works in the game's frame (x east, y up, z south), so positions match the manifest, the draft and @tele, and it gives every face one of the three materials and the same world-metre UVs as the rest of the ruin:

CallMakes
Mesh().extrude(outline, to3d, w0, w1)a prism from a 2D outline: walls, facades, keystones
arch_outline, ring_outline, arcan opening filled except for an arched passage; an archivolt band
block, bouldera chipped dressed stone, tilted; a rough rock (convex hulls)
lining(...)rock over the inside of a room or corridor, pushed in by noise, with holes left at its doorways
Mesh().finish(name)the object, replacing one of that name

Name what it makes by the usual rule: DECO_ for things to walk through.

Level 0's hand work​

  • The entrance. The cut's side walls are retaining walls whose tops follow the hillside 0.35 m proud, under a coping, with a pier and cap at each front corner. The tunnel mouth is a carved portal (L0_Entrance): a level parapet at 13.6 m, pilasters and a cornice, an arch with archivolt, imposts and keystone over a 6.6 m opening, and a crescent-moon medallion above.
  • Arches (L0_Arches_<tile>) in the 78 doorways where a corridor meets a room or hall and rock flanks the doorway on both sides: jambs narrow a 4 m doorway to 3 m (an 8 m one to 7 m), under a round or segmental arch. A doorway into a wider corridor has none, since its arch would stand on its own.
  • Rubble (L0_Rubble_<tile>, solid, and DECO_L0_Rubble_<tile>): heaps of scree and fallen blocks in room corners and along walls, never within 4 m of a doorway; eleven hall pillars broken off, with jagged stumps and their fallen lengths; and nine places in corridors where the rock has burst through a wall. Blocks and mounds are solid; pebbles are not. No solid stone lies inside a kobold nest's radius.
  • Caves (L0_Cave_<n>, DECO_L0_CaveFloor_<n>): the two rooms in the south-west corner and the corridor between them are natural rock, the masonry still standing behind it. The rock leaves a hole where each doorway is, and their doorways have no arches.
  • Roots (DECO_L0_Roots_<tile>, material RuinRoot): pale roots poke down through the ceilings of about a third of the rooms and halls, and thicker in the caves, in clusters of a few long roots and more short ones. They glow faintly, and each cluster casts a very faint cool light round it (a GLOW_ empty that Dungeon.gd lights on the client: no shadows, fading out past 30 m). Nothing else in the ruin gives light: what lives there either needs none or carries its own, as the kobolds do. kit.root() makes one.
  • Water. Under about two thirds of the root clusters a puddle lies on the floor, and water drips into it from the stone above: every few seconds, on its own uneven beat, a drop falls the whole height of the room and lands with a plip (13 single drips cut from five CC0 Freesound recordings, audio/ambient/drip_NN). The cave room has a seep: a wet streak down the rock into a pool, with the steady trickle of audio/ambient/trickle_01 (Freesound 405137, which loops). All of it runs only within 30 m of the camera. More puddles lie about the cave floors.
  • Fungus. Patches of small pale mushrooms glowing a cold blue grow against the cave walls, near some root clusters, and in the odd damp corner; the larger patches cast a faint blue light of their own. Not gatherable yet.
  • The kobolds' home. Round each nest, a heap of junk against a wall (pots, shards, rags, a broken tool, gnawed bones) and their tally scratches on the nearest wall at kobold height. Middens of dirt and bones in five corridor corners near nests. Low barricades of piled stone across five corridors leading to nests, with planks propped on them and a gap left to squeeze through (solid). Three wax shrines: mounds of melted wax with stubs on them, three still burning.
  • How the builders lived. Six rooms show what each was for, in what is left after thousands of years: stone, fired clay, bronze and soot. Wood, straw, cloth and rope are gone entirely, and iron is crusted thick with rust where it is thick enough to have lasted at all; thin iron bands have rusted away to rings of stain and flakes on the floor. The kitchen (−24, 702): a raised hearth between masonry cheeks under a stone hood whose flue runs up into the rock, soot spread over the ceiling round it, ash and charcoal on the hearth stone and a rust-crusted cauldron by it; a domed clay bread oven on a plinth; two stone worktops; hand querns; storage jars, broken jars, and the rust rings where barrels and buckets stood. Two sleeping halls (−132, 708) and (−196, 694): stone bed ledges, a pillow stone at the head, all round the walls and in two rows head to head down the middle, bare stone. The storeroom (22, 678): big clay storage jars in rows along the walls and across the middle, a third of them smashed, their sherds about them, and the rust rings of barrels by the east wall. The well room (−204, 754): a round stone well head in the middle, dark inside, the stone posts of its winch still standing, notched for an axle long gone; rust rings of buckets; a row of water jars. Orsan the Lampwright's workshop (−128, 798): seven stone workbenches with clay lamp moulds and rows of finished oil lamps on them, and his domed lamp kiln in the south-east corner. Oil lamps lie about all of these rooms. Each kind of thing is one script in tools/dungeon/props/ (one model to a script), run in Blender on level_0.blend; place.py finds each room's walls and doorways from the draft and keeps every piece off rubble and other props. Big stone pieces are solid; small clutter (DECO_) is walked through.
  • The halls and the Moon Hall. The room at (−20, 886), which its inscription gives to the Moon, has a low dais across its east end, 10 m wide with a ramp up its front, a grey stone altar on it and behind it a great white stone disc 4.4 m across, the Moon as they remembered her; bronze offering bowls and burnt-down candle stubs on the altar and along the dais. The east hall was their gathering hall: long stone tables in rows north and south of the kobolds' nest (never within 14 m of it), stone benches either side, a few tables cracked and slumped with their benches fallen. The west hall is Orsan's memorial: rows of stone benches facing his inscription on the west wall, and under it a stone table crowded with his oil lamps. Tall iron lamp stands, crusted with rust, stand about all three, some toppled, and high on the walls of both halls are the rusted iron rods the builders' hangings hung from, the cloth long gone. Scripts as above (moon_dais.py, altar.py, moon_disc.py, offering_bowl.py, candle_stub.py, stone_table.py, stone_bench.py, iron_lamp_stand.py, hanging_rod.py).
  • The corridors. Rust-crusted iron lamp brackets at head height about every 12 m (124 of them), each with an oil bowl and a streak of soot up the stone above it; carved round-headed niches about every 30 m (49), two in three holding an oil lamp and the rest a bronze bowl; cracked floor slabs with a heaved edge in about one corridor cell in three; and here and there something dropped against a wall, the rust stains of a crate's corner irons or a bucket's hoops. All of it walked through (DECO_) and kept clear of the traps, weak floors, webs, barricades, middens, puddles and shrines (place.hazards()), on bare masonry only. lamp_bracket.py, wall_niche.py, floor_crack.py, rotted_crate.py. Every dressed room is checked for a body to get round in it with tools/dungeon/walk_check.py (run in Blender on the level file): a 0.4 m-radius body, the player's capsule, must reach every doorway, and it reports any floor walled in by solid pieces. Gaps meant to be walked through are at least 1.4 m (the east hall's tables stand that far apart end to end).
  • The kobolds' life. Nothing has lived here but the creatures since the builders went, and only the kobolds' things are fresh. Round each of their nine nests: two to four sleeping hollows, low rims of dirt they carried in round a floor of trodden earth, with rags and fresh straw from outside; gnawed bones (small leg bones cracked for marrow, rat and bird skulls) scattered by the hollows and about the nest; crude drawings daubed low on the nearest bare walls in ochre and soot, stick-figure kobolds with spears, a rat, a staring eye and three-fingered handprints; a hole in the wall stuffed with mud, sticks and rags; and a crooked pole of fresh timber wedged in stones, shoring up a cracked ceiling with a board (solid). They make no fires. kobold_hollow.py, gnawed_bones.py, kobold_drawing.py, kobold_patch.py, kobold_prop.py.
  • The builders. Raised moon reliefs, the portal's crescent on a disc, high on the walls of the halls and a few rooms. In the west hall, a robed statue has toppled off its plinth: the feet still stand, the body lies broken across the floor, the head rolled away. In the room at (70, 1038) a sealed stone door is set into the wall, carved with the moon, rubble fallen before it: a door to somewhere below, for later.
  • The kobolds' traps (Moondog.GameServer/ServerTraps.cs). Five trip-wires are strung ankle-high across corridors near nests, a fine glinting thread between two pegs, with a cluster of brass bells on the wall at one end: walk through one and the bells jangle and the kobolds of the nearest nest within 50 m come for you. Four loose slabs sit a little proud of the floor under a cracked ceiling with stones wedged in it: step on one and the stones come down for 3–5 damage. Both rearm after a minute. The server watches every player's step against them (a step across a wire, onto a slab) and tells everyone near (ReceiveTrapSprung): the bells from audio/ambient/bell_NN, stones falling from the ceiling with dust and the crash of audio/ambient/rockfall_NN (scripts/TrapEffects.gd). A GM with @aggro off still rings the bells but brings no kobolds.
  • Spotting and disarming traps (Moondog.GameServer/TrapCraft.cs, scripts/TrapSense.gd, migrations TrapSkills and GlowcapBeltLantern). With a lit torch out, within 6 m of a trap you have not spotted, each second you may notice it: 20% + 4% a level of Trap Sense (skill 10027, trains Wisdom); by the dimmer light of a Glowcap Belt Lantern alone, half that. The first spot of each trap trains it, once ever. A spotted trap is outlined for you alone, a red line along the wire or a red ring round the slab, with a "Trip-wire" or "Loose slab" label. Spotting only warns: a spotted trap still springs. Within 2.2 m of one, "Hold E Disarm ..." shows; hold E for 3 seconds without moving and Disarming (skill 10028, trains Dexterity) decides: 40% + 6% a level it is harmless for 10 minutes, for everyone (it shows grey, "(harmless)", to whoever has spotted it), and a trip-wire gives a Brass Bell (its icon is to come). A failure springs the trap on you half the time, and otherwise you may try again. A trap that has just sprung is harmless until it rearms, and shows so: ReceiveTrapSprung carries the trap and how long. Success trains Disarming more than failure. What you have spotted is kept across logout (character_traps_spotted, by the marker's name, which dungeon_check keeps unique) and sent back at login (ReceiveTrapsSpotted); renaming a TRAP_ or WEAK_ object in Blender makes it a new trap to everyone. A spotted weak floor's frame hides while the floor is broken.
  • The collapse. At (−14, 766) the ceiling of a corridor has come down: a heap of rock and blocks with a slab of the ceiling leaning on it fills the corridor but for a 1.2 m squeeze along one wall, rock hangs where the ceiling was, and dust sifts down through the torchlight.
  • The stream. From the seep the water runs on across the cave room, down the cave corridor and through the second cave room into a dark crack in the floor, about 60 m, pebbles along its banks. Its surface is a shader (RuinStream) with ripples scrolling down it, lit only by real lights; its UVs run with the flow (kit's ribbon()). The trickle loop plays every 12 m along it and where it drains. You walk through it.
  • Spider webs. Orb webs of fine threads (RuinWeb, kit.thread()): three across one little-used corridor at (38, 1018), two choked low in room corners, and twelve high in corners for show. In the low ones you move at 40% while inside (Dungeon.web_factor, applied by Player.gd and the server's ProcessMovement from where each step starts, so prediction agrees). Two cave spiders keep the webbed corridor, and their bite is venomous (Creatures).
  • Burning webs (Moondog.GameServer/ServerWebs.cs, scripts/WebFire.gd). With a lit torch out, click a web you push through, within 3 m: it catches, small flames run over the threads for two seconds with a crackle (audio/ambient/web_burn_NN, CC0 Freesound) and the threads fade away. A burnt web slows no one, on the server and every client alike (Dungeon.set_web_burnt, synced by ReceiveWebBurnt and sent to each player as they arrive). A web with a Spider Spawner within 20 m is respun 5 minutes after it burnt by one of its spiders: the nearest one walks to the web's edge, turns its back, raises its abdomen and shoots four strands of silk up into it, each with a soft puff (creatures/spider_spin_NN, CC0 Freesound), and after three seconds the web fades back in. A spider that is attacked, or has a player it would go for within its aggro range, stops and fights, and one tries again later. The two corner webs, which no spider tends, grow back after 20 minutes. The fire harms no one. Burnt webs are not kept over a server restart, on purpose: a restart leaves every web whole. The click is the attack button, so it also swings whatever is in your hand. A web's threads are found by the mesh (DECO_...Webs...) whose middle lies in its WEB_ box, so a new web you push through needs its threads as their own object.
  • Inscriptions (Moondog.GameServer/Inscriptions.cs, scripts/InscriptionReader.gd). Ten panels of the builders' worn script in raised frames on the walls of the halls and rooms: lines of strokes, bars and dots. Face one within 3 m and press E ("E Read the inscription" shows) and its words come up in a box low on the screen, as many as your Old Script (skill 10026, Lore, trains Wisdom) lets you make out: a quarter of the words at first, 15% more a level, all of them at level 5; the rest are dots. Which words come first is fixed per panel, so a better reader sees the same words and more. Studying a panel for the first time gives 50 Old Script experience. Every panel read goes into the Lore tab of the journal (character_inscriptions), as clearly as you have made it out; read it again later to make out more. The texts are rows of inscriptions, edited on the admin panel's Inscriptions page (migration BuildersInscriptions).
  • Pass 2 (the hand script is ruin_l0_pass4.py in the session notes): the flooded shortcut (L0_Tunnel), a tunnel from the cave room east to the bat hall, its floor dipping 3.2 m under the water and its roof under the surface for ten metres in the middle, so it is swum holding your breath (a torch goes out in water; the Glowcap Belt Lantern does not). Its water is a water_bodies row with a shallow Depth, so the levels beneath it are dry; a solid block over that stretch's roof (COL_L0_TunnelRoof) keeps a floating body from being pushed through it. Thin air fills two dead-end rooms, (−212…−184, 824…836) and (144…156, 872…892): inside, stamina drains instead of recovering and your torch burns low; after 20 seconds you lose 1 health every 3 seconds until you leave. Clear Breath wards it off. Falling stones: while anyone is within 20 m of the collapse, every 30–90 seconds dust sifts down at one of three spots beside it, and a moment later stones fall there for 2–4 damage. Crumbling floors: three cracked 2 × 2 m slabs in corridors, at (−231, 850), (37, 985) and (149, 845), over 1.3 m pits with a rubble ramp out. Stand on one for two seconds and it gives way for everyone, with dust and a crash, for 3 damage; it is whole again ten minutes later, once the pit is empty. Trap Sense spots them ("Weak floor", outlined in red); they cannot be disarmed. All of it is Moondog.GameServer/Hazards.cs and scripts/Hazards.gd.
  • Glowcap. Sixteen clusters of glowing blue mushrooms at the larger fungus patches can be picked (Foraging, 2 Glowcap each) and regrow half an hour later (node_types.RegrowSeconds). At the Apothecary's Table they become a Glowcap Belt Lantern (4 Glowcap, 1 clay, 1 linen thread, Apothecary 2), worn in the Belt slot and hung at the left hip: a soft blue light half a torch's reach that never burns out and needs no hand, so it stays lit with a bow drawn (which still puts a torch away). Trap Sense works half as well by it as by a torch, and it cannot burn webs. It replaced the off-hand Glowcap Lamp (migration GlowcapBeltLantern turned every lamp into a lantern); and Clear Breath (2 Glowcap, a Healing Herb and a Mortar and Pestle, Apothecary 1), a draught that wards off thin air for ten minutes. Migration Glowcap.
  • The kobold hoard. In the far south-east room, behind the nest at (182, 1038), a battered strongbox under a heap of junk (models/placeholders/kobold_hoard.glb). E opens it: 80–120 gold, 2–5 candles, 1–3 brass bells, up to 2 venom glands, and a 15% chance of a Compass or a Mortar and Pestle. Each player may take from it once every 12 hours (hoard_loots); what it holds is its NpcData (Moondog.GameServer/Hoard.cs, migration KoboldHoard).
  • The yanari. Four gangs of tiny oni with mallets roam level 0 from room to room, banging on the stone and giggling, and scatter when they notice you (Creatures). Innocent: leave them be and one may leave you a little something.
  • Noises off. Sixteen ECHO_ markers: kobolds chattering at six of the nests, stones tumbling by the collapse, in the caves and two rubble rooms, and something heavy scraping over stone in five quiet rooms, the graveyard among them. You only ever hear them from 18–70 m away, muffled by the walls between.
  • Hearing what lives there. The ruin's creatures make themselves heard in the dark, echoing off the stone: kobolds yip, giggle and growl, and their claws click on the floor as they come; rats squeak and scurry; bats squeak on the roost and their wings beat as they fly; beetles click; the spiders' legs skitter. Calls carry 40 m, footsteps 20 m (scripts/CreatureCalls.gd; clips in audio/creatures/, CC0 Freesound, see audio/CREDITS.md).
  • The kobold graveyard. The room at (−20…4, 936…960): twelve low cairns in rows, bones showing between the stones, each with a scratched marker stick, candles left burning on a few, and two kobold skeletons laid out between them, never covered.

The builders​

The ruin's builders worshipped the Moon. When it was stolen from the sky the air began to thin, and on the moonless nights unseen horrors came that wanted only destruction, so they sealed themselves into the hill. Their inscriptions mark their years below, counted from the theft ("the Dark"): the sealing of the doors; the north halls falling in in their second year, the water filling them, which is the lake by the entrance; a first child born below; the night the horrors beat on the doors; the moon hall; Orsan the Lampwright; the living cave; their dead; a sound like a tide below the floor; and in the forty-first year, the way down past the sealed door, to find what was taken. A new Moon has since formed in the sky, but they are long gone. What lies past the door is for a later level.

Where it came from​

The ruin was drafted by a generator, once, and converted to the Blender files. It is kept for drafting the next dungeon:

python tools/dungeon/generate.py --map
"W:/Blender Foundation/Blender 5.2/blender.exe" -b --factory-startup --python tools/dungeon/to_blender.py -- <name>

generate.py lays out each level on a 4 m grid. Rooms and halls go where there is enough rock over them (it reads the terrain from tools/dungeon/anyxas_ruin_terrain.csv, written by export_terrain.gd), stairwells are placed far from each level's arrivals, and A* corridors join everything with a few loops. It writes a draft to tools/dungeon/drafts/, and to_blender.py turns that into the level files and the manifest. Running to_blender.py again overwrites the level files and every hand edit in them, so it refuses unless given --force.

In the game​

godot_client/scripts/Dungeon.gd loads every manifest in dungeons/ and is shared by both sides: scripts/sync_terrain.py copies it, the manifests, the .glb files and the navigation mesh into the game server, as it does map_data. Client and server build the same collision from the same models: every mesh not named DECO_ becomes a collision shape of its own triangles.

  • Floors. Everywhere else the floor is the terrain heightmap; underground it is not. Dungeon.floor_at(x, y, z) casts a short ray down the dungeon's own collision (from 0.6 m above the point to 2.5 m below it) and answers the floor it meets, or nothing: that is what "not in a dungeon" means. Over the entrance's open cut a point is inside at any height. under_roof casts up the same way. The server's GetFloorHeight(x, y, z) asks it first. Spawning, login relocation, probe teleports, GM placement, pets, creatures, carts and dismounting all use it, so a character who logs out on level 3 logs back in on level 3.
  • The entrance. Holes in the terrain hide the ground over the open stair. Godot's heightmap collision has no real holes, though: a body tested against a cut cell logs "Vector3 cannot be normalized" tens of thousands of times a second and can stick. So dungeon collision is on its own layer (layer 6, as well as layer 1), and a body inside a dungeon collides only with it, never the terrain. The mask is set before each step from where the step starts, the same way on client and server. The landing is the first place that counts as inside, so a body has stopped testing the terrain metres before it reaches the cut.
  • Navigation. Baked from the models with 1 m cells, to match the world's navigation map, and no erosion: a cell's worth off every wall closed 4 m doorways. A link joins the ground in front of the landing to the landing. Ceiling tops in the rock bake as walkable too, cut off from everything; spawn and wander points near a dungeon must lie within 3 m of the height asked for, so none lands there.
  • Drawing. Each mesh fades out past 140 m: it is underground, and from the surface nothing of it can be seen. Godot measures that to the middle of a mesh's box, so a big mesh is given half its width more: each level's stair treads (DECO_L<n>_Stairs) are one object hundreds of metres across, and used to vanish underfoot on the entrance stair.
  • Darkness. Under a roof, Weather.gd fades out the sun, moon, sky ambient, rain, snow and lightning, and turns the fog to black.

Things in a dungeon​

  • Collision. A node, station or chest placed in a dungeon has its collision added to the dungeon layer, on the server when it builds the entity's body and on the client when it builds the model (Dungeon.join_layer). Without that, a body underground would walk through it.
  • Who sees whom. The 310 m view radius takes rock into account: when either side is in a dungeon and they are more than 12 m apart in height, they are not sent to each other. That covers another level or the surface overhead. The stair down from the entrance stays within 12 m, so someone in the tunnel mouth still sees the shore.
  • Creatures. Spawn and wander points near a dungeon must lie within 3 m of the height asked for, not 20 m, or they could land on the level above or below. Creatures do not aggro on players or hunt prey through rock (the same 12 m rule). The ground-snap that keeps walkers on the terrain only makes small corrections: a creature brushing a wall stands for a moment on the edge of a rock cell, and the snap used to lift it out onto the hillside overhead.

Finding your way​

A Compass keeps you oriented in the dark: while one is anywhere in your pack, a heading strip runs across the top of the screen, with the cardinal and intercardinal points sliding past as you turn and your heading in degrees under the marker. North is −Z, the same as the map (the ruin lies south of the lake). Anyxa sells it for 60 gold. The strip is scripts/ui/Compass.gd, part of the HUD, and it finds the item by its compass tag, so a crafted one later only needs the tag too.

GM tools​

@tele x y height reaches a dungeon: with a height inside one, you land on that level's floor. For example, @tele 130 798 -20 puts you in a hall on level 0. Without a height, @tele lands on the terrain as before.

GM placement uses your own height, so a node placed underground goes on the dungeon floor, not on the hillside above.

Checks​

godot --headless --path godot_client -s res://tests/dungeon_check.gd

This loads the real terrain and the ruin's models, and checks that:

  • floor_at answers in its halls and on the landing, and nothing in rock or on the surface over it; under_roof is true in a hall and false in the open cut;
  • the cut has no terrain over it, and counts as inside at any height;
  • a path leads from the surface to the deepest level;
  • every drawn mesh wears its textured material.

Not yet​

  • Contents for levels 1 to 4: creatures, ore, loot and lighting such as braziers.
  • The kobold nests' positions are in the Kobolds migration. Moving rooms in Blender means moving them too.
  • Levels 1 to 4 are still the generator's boxes, textured: level 0's arches, rubble and caves are not on them yet. The hall pillars broken on level 0 no longer exist in its tile meshes, so re-running anything that expects them there will not find them.