Docs · Engineering reference
Atmosphere (music and background sound)
docs/features/atmosphere.mdEdit on GitHub
-
✅ Ambient emitters (2026-11-13).
LF_AmbientEmitterComponent(Feature/Atmosphere) is a looped positional sound on a prop or an area entity: sound project, start radius, stop margin, priority, group, hours of the day (local solar time) and an optionalLF_AmbientCondition. Every machine that renders runsLF_Atmosphere: a 500 ms tick reads each emitter's distance to the listener (AudioSystem.GetDistance) andLF_AtmosphereMix.Selectpicks which sound: in range, allowed, one per group, at mosts_iMaxVoices(6), higher priority then nearer. Voices go throughSCR_SoundManagerModule, so a source inside a building is muffled outside. A dedicated server runs none of it. Logs[LFDebug:Atmosphere] start|voice up|stop|mix. Tests:atmosphere/mix(LOGIC),atmosphere/switch(WORLD),atmosphere-selftestintools\cli validate,session.mjs atmosphere-proof(needssession up --profile full --sound). -
✅ Radio switch.
LF_AmbientSwitchComponentis the only replicated state: oneRplPropbool, written by the server inSetOn(the radio'sLF_AmbientSwitchAction, "Switch off" / "Switch on", anyone may use it) andPulse(seconds).LF_ProcessActioncallsLF_AmbientSwitchComponent.PulseOnafter a successful process (m_fRunSoundSeconds, 12), so the sawmill is heard running after each log. ⚠️ Not persisted: a radio switched off is on again after a restart. -
✅ Ten places in the playtest town. Store radio (
Shop_GeneralStore_Radio,Prefabs/Atmosphere/LF_Radio_Store.et, placed withtools\cli place on), pub music from inside the pub building (10:00 to 02:00), furnace (Furnace.et, always), sawmill (Sawmill.et, after a cut), quarry bed (MiningArea_Debug, 06:00 to 20:00), farm hens (FarmPlot_Cabbage.et, groupfarm, 05:00 to 21:00), moonshine still (LF_ChainStill.et, while a batch is in it:LF_AmbientConditionChainWorkingreads the station percent), police duty desk (LF_PoliceDutyDesk.et), chop shop (LF_ChopBench.et), spawn square (the fountain, 06:00 to 22:00). The ranked survey and what is left:docs/architecture/atmosphere.md. -
✅ Seven more sounds and a terrace radio (#897, 2026-11-13). Bank (the two counters in
ATM.layer:Atmosphere_BankMurmurandAtmosphere_BankTill, a clock tick with a till drawer), hospital (LF_HospitalBed.et: equipment hum, grouphospital_equipment;LF_MedicDutyDesk.et: a quiet ward, overriding the police desk sound it inherited), payphones (LF_Payphone.et:LF_AmbientConditionPhoneLine, the line hum whileLF_PhoneLineComponentis BUSY, receiver up), fuel station (Prefabs/Atmosphere/LF_FuelPumpHum.etat the pumps: a moddedSCR_FuelSupportStationComponent.OnExecutedServerpulses itsLF_AmbientSwitchComponentfor 4 s per fuelling step,LF_AmbientFuelPump), cash van (the van's cash boxRoadmap_Cash_Van_BoxinStreet_CashVan.layer, which stands 1.9 m from the van and moves with it: engine idle, always, because the route only ever parks the van; an emitter put on the vehicle entity itself never registered on the client), and a radio on a table outside the pub (Prefabs/Atmosphere/LF_Radio_Pub.et, priority 3, grouppub_musicshared with the building so one voice plays: the radio, or the building when it is switched off). TestsLF_Test_AmbientTown,LF_Test_AmbientFuelPump. 1950 credits. ⚠️ Nobody has heard the audio; the hospital equipment take is hum without the beep. -
✅ Ambience pipeline.
tools\cli asset ambience [--only generate|process|wire] [--again id] [--status](tools/assets/pipeline/ambience.mjs, spec and credit recordtools/assets/atmosphere/ambience.json): ElevenLabs Music for the two radio tracks and text-to-sound-effects loops for the rest, ffmpeg decode, a crossfaded loop point, 16-bit mono WAV with its.meta, and one sound project per sound underSounds/Atmosphere/with an inline distance curve. 3550 credits spent. ⚠️ No agent has heard the audio; a human listens before a public build. -
✅ Community hall corner in the grid (#1930, 2026-11-16). Cell
c2r2(Grid_community_hall.layer, claimtools/grid/cells/community-hall.json): the USSR cork notice board (NoticeBoardCork_USSR_01_filled_V1), a table withLF_Radioon it, a street bench and two green chairs (LF_Seat_BenchStreet_02,LF_Seat_Chair_02_green, so five Sit places). A test-zone set the town card copies into a real hall;tools\cli look grid:community-hallshows it. ⚠️placeverify skips Grid layers (its audit records are the town model), so this set went in with--no-verifyandaudit placement --grid --strictlists no finding on it (the failures it prints are Annex and frame entries). Nobody has sat on every seat in a session. -
✅ Six period radio tracks (#1015, #1967 replaced).
Sounds/Atmosphere/Atmosphere_Radio{EstradaBallad,EstradaDance,AccordionWaltz,AccordionKolo,OrchestralMorning,OrchestralSerenade}.acpinLF_Everon1989, about 60 s each, generated with ElevenLabs Music (music_v1, instrumental; prompts and dates inambience.json) and wired byasset ambience --only wire. One credit row each indocs/credits.md("Music generated with ElevenLabs");tools/validation/radio-tracks-selftest.mjschecks the record, credits and sample format. Nothing plays them yet: the story's radio picks one by project. -
✅ Radio playlists (#1969, 2026-11-16). A radio rotates through a list instead of looping one track.
LF_RadioPlaylist(Feature/Atmosphere/LF_RadioPlaylist.c) is a list ofLF_RadioTrack(project, seconds) keyed by the emitter's sound slot, so no prefab changes: a moddedLF_AmbientEmitterComponentplays the list's current track, moves on when the track's seconds are up (or the voice stops: a radio out of earshot carries on), wraps after the last, skips a track that does not load with oneLF_Debug.Error, and is silent outside the list's hours (m_fHourFrom/m_fHourTo, may wrap midnight). The core holds only the mechanism; lists are pack data (LF_RadioPlaylistConfigoverlays named in the mission header).LF_Everon1989/Configs/Atmosphere/:atmo_store_radio(ballad, dance, waltz, morning, all day),atmo_cafe_radio(waltz, morning, kolo, 07:00 to 22:00 since #3180),atmo_square_radio(serenade, ballad, 20:00 to 02:00);LF_RadioSlots_Everon1989.confadds the two new slots. TestLF_Test_RadioPlaylist(LOGIC). ⚠️ The café and the square have the slots and lists but no radio prop yet (a town-layer placement, #1015); nobody has heard a rotation in a session. -
✅ Night light (#3390).
LF_NightLightComponent(Feature/Atmosphere) enables its childLightEntitybetweenm_fHourOn(18) andm_fHourOff(6, wraps midnight) from the local world hour (LF_Atmosphere.HourNow), checked every 30 s with aCallLater; the rule isLF_NightLight.IsOn(reusesLF_AtmosphereMix.InHours; equal bounds mean always). Client only, noRplComponent, no RPC: a dedicated server does not tick it and builds noLightEntitychild at all. Two prefabs inPrefabs/Props/Lights/:LF_WindowGlow.et(warm point light, radius 4 m,CastShadow 0) andLF_LampHeadNight.et(spot, radius 16 m,CastShadow 0, for a post whose vanilla light does not switch on). Both sit insidedocs/architecture/performance.md"Lights" (one unshadowed light each). Logs[LFDebug:NightLight] <name> on|off at hour H; a rendering machine with noLightEntitychild logs oneLF_Debug.Error. Testatmosphere/night-light(WORLD): the rule at 18:00, 22:00, 03:00, 12:00 and a same-day window, then both prefabs driven at 22:00 and 12:00;RedProof()skipsEvaluate(RED-OK). Nothing places these yet (a town-layer or grid slice does). ⚠️ The test server is headless, so the light's own enabled state was never asserted there: a rendering session at night is the proof (PR manual steps). -
❓ Do vanilla street lamps light at night? (answer for
signs-lights-street.md:195). Partly answered, 2026-11-19. Read from the pak:LampStreet_E_01_4mhangs a glass prefab with aStreetLampComponent(IsLightOn,SetBroken, an "Emissive Color") over a childLampStreet_E_01_light.et(LightEntity, spot, radius 20,ClipEV -10,RplComponent). Spawned on the headless test server at world hour 14.3 it reportedIsLightOn=false, which says nothing about night (no clock change was made, to leave the day cycle alone). Not yet seen: a lamp at 22:00 on a client that renders. Until thenLF_LampHeadNightis the fix for any post that stays dark, and nobody should place it on a post that lights itself (two lights on one head). -
✅ Saint-Philippe at night (#3534, 2026-11-19). The first placement of #3390's prefabs. The check the card asked for came out yes: vanilla street lamps (
LampStreet_E_01_4m, which carry aStreetLampComponent) switch themselves on, seen inlook 4437,10670 --world island --hour 22(a Workbench render at 22:00, not a full-profile session), so noLF_LampHeadNightgoes on a post that lights itself.tools/town/nightlights.mjs saint-philippewrites the pack layerLF_Everon1989/.../MainWorld_Layers/Lights_saint-philippe.layer(a generated file,--checkcompares it): 38LF_WindowGlowon the street-facing wall of every building somebody uses (a fitted business or civic building, a resident's home, the open church; never a for-sale house, a locked shop, a shed or a garage), 1 to 3 per building at window height, off at 23:00 (shops), 01:00 (pub) or 23:00 to 02:00 (homes, hostel) so the square does not go dark in one blink; 10 vanillaLampStreet_E_01_4min the biggest gaps of the existing lamps near the square and the main street (ground height from the dossier's measured props, a gap with no two agreeing props gets none); 3LF_LampHeadNighton the dead_offposts in the dossier. No light casts a shadow; the densest 60 m holds 21 lights.tools/town/nightlights.selftest.mjs(viavalidate) checks the rules and that the committed layer matches. ⚠️ Not asserted anywhere: that a glow sits on a real window (the wall is the dossier footprint edge, 0.35 m out); a session at night is the proof. -
🔧 Street life on six Saint-Philippe houses (#3360, town draft; merged, in-dev).
tools\cli town street-life saint-philippefits thestreet-lifeslot: 14 vanilla props on the houses the mapping names (b10, b09, b16, b17, b50, b47), each seated on the host's real wall or yard from the dossier, none in a doorway or on a carriageway. FourLF_Seat_BenchStreet_01_*(sittable, three green and one red) and fourBinStreet_01at the doors, fourFlowerpotStreet_01boxes under the front walls, and twoClotheslineFrame_01frames in the back yards of b50 and b47. LayerPlace_saint-philippe_street-life.layer, claimsaint-philippe-street-life.json. The house list and each house's props arePLANintools/town/street-life.mjs. Not here: bicycles (the game ships no bicycle prefab; a Meshy or library model is a follow-up), and benches on the square, dock and bus shelters (other vanilla bench types need anLF_Seatwrapper). -
✅ Night-light lamps stand clear of rocks (2026-11-21, #3938).
nightlights.mjs --probealso casts a ring of 8 rays 1 m round each new lamp; a lamp with a rock or cliff in the ring, ground that steps more than 0.45 m under it, or (for a lamp the run moved) a seat on top of a wall or stall is rejected, its spot goes inrejectedintools/town/probes/lights-<place>.json, and the next best gap is probed. A re-probe keeps every committed glow and every lamp that did not move. Lamp 10 stood beside a granite cliff (read 36 cm over it) and now stands at the next gap, on bare ground. -
✅ Window glows seated on the wall, not on a street prop (2026-11-21, #3888). The glow wall ray starts 1.2 m outside the footprint wall (was 2.5 m, behind a post or bush in front of the shop), and
nightlights.mjs --probe --reseat Glow_a,Glow_btakes a fresh seat for named committed glows (b12_0 hung 2 m in the road, b23_0 was never seated). The placement audit measures a light's attachment on 16 horizontal directions, so a wall off the axes no longer reads as 0.66 m. -
🔧 Shift whistle and work-site beds (2026-11-23, #4183; merged, in-dev).
addons/LF_Everon1989/Sounds/Work/holdsWork_ShiftWhistle.acp(two steam blasts, audible to 110 m),Work_MineBed.acpandWork_SawmillBed.acp(quiet pick, cart, handsaw and hammer beds), andmanifest.json(source, licence, prompt, GUIDs, the whistle hours and sites). The overlayConfigs/SoundSlots/LF_SoundSlots_Work_Everon1989.confadds the slotsatmo_shift_whistle,atmo_mine_bedandatmo_sawmill_bed; the pack header lists it. A site sounds the whistle with anLF_AmbientEmitterset to slotatmo_shift_whistleand hours 6 to 6.02 (a second one 18 to 18.02): the client logs[LFDebug:Atmosphere] start <emitter name> ... Work_ShiftWhistle.acp. Beds take hours 6 to 18. Regenerate withnode tools/assets/site-ambience/build.mjs; check withnode tools/assets/site-ambience/site-ambience-selftest.mjs. The mine and sawmill place cards put the emitters on their sites;node tools/assets/site-ambience/whistle-proof.mjs <emitter name>is the session proof (start inside the window, voice up, stop after).
Ambience beds as rows with hours (#4227, WO-W1.1). Configs/Atmosphere/LF_AmbientBeds_Everon1989.conf (pack, an LF_RadioPlaylistConfig, one track per row) holds four beds keyed by sound slot: atmo_bed_harbor_day 06:00 to 21:00 (gulls, water, rigging), atmo_bed_harbor_night 21:00 to 06:00 (water only), atmo_bed_square 06:00 to 22:00 (the existing square loop) and atmo_bed_village_night 21:00 to 05:00 (crickets, a far dog). The new loops are in LF_Everon1989/Sounds/Ambience/ (ElevenLabs; credit rows in docs/credits.md, record tools/assets/atmosphere/ambience-beds.json). Rows only: the mission header does not name the file yet and no emitter uses these slots, so nothing plays until the placement card lists the overlay and puts an emitter on each slot. LF_Test_EveronAmbientBeds (pack leg) checks that each row resolves its sound, has valid hours, and that the quay is never silent.
- 🔧 Bird flocks kit (#4233, W1.2; merged, in-dev).
tools/town/kits/birds.jsonis three vanillaSCR_Birdflocks: twoBirdFlock_DomesticPigeon(the square) and oneBirdFlock_Seagull(the dock), no art and no sound of our own. A flock lifts off by itself when a player or vehicle comes within 50 m (DangerEventRange) and lands again after 35 s. Proof cell: GridWorldc19r3,grid:slice-4233. GridWorld has no AIWorld, so alookthere shows the placed rows but no birds; the fly-off is a manual check on the island (MainWorld has an AIWorld). Not yet placed in a town layer: atown-pass stamps it.