- Added "GeneFeedingStyle" to animal definitions, allowing for varied feeding behaviors (grazing vs. gorging).
- Updated animal JSON files to include feeding style genes with appropriate values.
- Enhanced UI localization for feeding styles in both English and Russian, providing clearer descriptions and inspection options.
- Introduced new event logging features in the world scene to track animal behaviors related to feeding.
- Improved animal decision-making systems to utilize the new feeding style attributes for more dynamic behavior.
This update aims to enrich gameplay by introducing more nuanced animal behaviors and enhancing the user interface for better clarity and interaction.
The settings screen was ragged: bare gray TextButtons (off-theme), each row
center-aligned on its own so labels/controls never lined up, and a latent bug —
clicking a segment or toggle only changed the value, the highlight didn''t refresh
until Apply rebuilt the panel.
- Wrap in a Card with title + accent rule, matching the other menus.
- Every setting is a "label (fixed width) + control" row, left-aligned, so the
controls form a clean column.
- Segments and toggles use the themed ChoiceButton with an active state
(Ui.SetChoiceActive: accent fill/border) instead of text-color-only.
- Toggles read On/Off (new settings.on/off loc) instead of ●/○ glyphs.
- Any click now runs all refreshers immediately, so highlights track the value
live, not just after Apply.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Replace the single per-tab text blob with structured widgets:
- StatBar: RimWorld-style colored bars for needs, skills, capacities, blood/pain,
mood. Good→bad gradient (red/amber/green); drives & skills use a neutral blue;
pain fills by amount but colors inverted (more pain = red).
- Section headers (accent) group Health (vitals/capacities/conditions) and Mood;
section keys lose the "— … —" dashes (the header styling separates them now).
- Body lives in a fixed-height ScrollViewer so long tabs (Health) scroll and the
panel keeps a constant size instead of jumping between tabs.
- Active tab gets a background highlight, not just accent text; tab buttons padded.
- Narrative data (overview/genes/products) stays as styled lines; plant growth-to-
next-stage shown as a bar.
New loc: inspect.health.vitals, inspect.vital.blood/pain (ru/en).
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
- speed.pause was "⏸" (U+23F8), a glyph the bitmap font lacks, so the pause button
rendered blank/invisible (x1/x3/x6 are ASCII and showed). Use the word Pause/Пауза.
- Selection bracket was radius x2.2 of the sprite''s bounding CIRCLE (half-diagonal),
so it sat much larger than the entity, in a bright opaque blue. Shrink to x1.4 and
mute the tint so it hugs the target without shouting.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Foundation for the perception system. Adds Smell and Touch capacities (CapacityCalc
dependency chain x consciousness) with organs on the Quadruped body (nose->Smell,
skin->Touch; eyes/ears already give Sight/Hearing) so hediffs and organ damage
reduce them for free. New genes: acuity GeneHearing/GeneSmell/GeneTouch (radius
multipliers, default 1 if a species omits them) and detectability GeneCamouflage
(lower sight), GeneScent (raise smell), GeneNoise (raise hearing) on AnimalPhenotype.
Deer/wolf/boar/chicken get sensible values (wolf smells well, deer is alert +
dappled). cap.smell/cap.touch localized. Build + --check-content clean
(48 genes, 47 traits). Multi-sense detection + memory come next.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Dropped the Mountain terrain def and extended Forest to maxHeight 1.01, so the
former mountain elevations generate forest instead. No terrain blocks light now;
the occluder mechanism stays generic (mature trees still cast shadows) -- updated
the stale "mountain" comments. Removed the unused terrain.mountain localization.
Build + --check-content clean.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
World generation (WorldScene.OnLoad: terrain, atlases, spawn) runs synchronously
and blocks the frame; previously only a blank fade covered it, with no feedback.
New WorldLoadingScene shows a "Generating world" label, lets it draw, then switches
to WorldScene WITHOUT a transition so its last drawn frame (the label) stays on
screen during the blocking generation. Both New World and Load Game route through
it. Localized loading.world ru/en. Build + --check-content clean.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
A side panel (F9, only when developer mode is on) lists entries by category:
animals and plants are auto-populated from their defs (so modded content shows up
automatically), plus action tools. Spawn entries arm a "tool in hand" — left-click
the world to spawn at the cursor (right-click clears); action tools (injure/kill/
infect) apply to the currently selected creature, so you can line up entities and
damage them to compare. Moddable via a new DevToolDef def type: mods add buttons
referencing a code handler kind (spawn-animal/plant/infect/damage/kill) + target,
without touching code. Localized dev.* ru/en. Build + --check-content clean
(13 def types).
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Generic data-driven skills (SkillDef + skills.json: Foraging, Hunting, Evasion),
mirroring the needs registry. Skills component (per-skill level [0..1] + passion)
on every animal, built by AnimalFactory; passion is rolled deterministically from
the genome (no RNG param threaded). Levels grow from PRACTICE (XP on the matching
action, scaled by passion''s learn-rate) and slowly decay toward a floor when
unused (AnimalSkillSystem), so animals specialize.
Effects wired now: Foraging -> satiety from grazing, Hunting -> attack damage,
Evasion -> flee speed. A missing skill def -> factor 1 (no effect), so it is safe
to mod the set. Inspector gains a Skills tab (level% + passion stars); `skills`
console command shows live mean levels; skills are saved/loaded (levels+passions).
Same model will carry to future humans. Build + --check-content clean.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
GameSettings.DeveloperMode (default ON) + a toggle in the settings panel. WorldScene
only stands up the dev console (and, later, the dev spawner) when it is enabled, so
without dev mode the backtick key does nothing. GodCameraSystem''s console arg is now
nullable (no console when dev mode off). Localized settings.devmode ru/en. Build clean.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Mass is derived by a cubic law: mass = BaseMassKg * (size / reference)^3, so a
juvenile/seedling weighs far less than an adult/mature and the size gene moves
mass too. New Mass helper + BaseMassKg on AnimalDef/PlantDef (deer 70, wolf 45,
boar 80, chicken 2.5; trees ~450, grass 0.4, etc.) and MassKg per unit on
ProductDef (foundation for hauling/inventory).
Wired into the sim (as chosen):
- Corpse meat is now proportional to body mass (Mass.MeatFraction), not raw
bodySize; Corpse gained a BodySize field so sprite scale stays independent of
meat (save/load updated).
- Kleiber metabolism: need decay x= (mass/refMass)^0.75, normalized per species,
so juveniles are cheaper to feed and heavier individuals eat a bit more,
without cross-species balance blowups (adults of typical size are unchanged).
- Carry capacity = mass x fraction x carry capability (Moving for quadrupeds;
Manipulation for future humans), shown in inspector/console. A dormant Carrier
component + Mass.LoadSpeedFactor hook slow an overloaded animal — the
foundation for item hauling.
Inspector shows body/plant weight (+carry); `animal`/`plant` console print mass.
Build + --check-content clean (42 genes, 41 traits). Not GUI-verified.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Two health threads finished, both via the existing hediff engine in
AnimalHealthSystem (now also takes Climate + the new hediff defs):
- Thermoregulation revives the dead GeneInsulation. A comfort band is derived
per animal: fur (insulation) widens cold tolerance but worsens heat tolerance,
larger body resists cold. Outside it, Hypothermia/Heatstroke severity builds
(Poisoned-pattern: Intensify zeroes immunity so it can't recover while still
exposed), capacities drop, severity 1 = death; back in comfort it heals.
Seasonal/climate mortality and a real cold↔heat adaptation tradeoff.
- Wound infection marries the injury and disease systems: while bleeding, a
chance (∝ wound severity) to contract Infection, a progressing disease fought
by immunity × blood filtration — weak kidneys/liver or many wounds = worse.
New hediffs Hypothermia/Heatstroke/Infection (+ru/en). Build + --check-content
clean. Not GUI-verified.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
GeneEggLaying (species-fixed) selects the conception cycle: viviparous animals
carry to a live birth (existing path); oviparous animals, after the same gravid
period, LAY eggs instead. New Egg entity (carries the already-bred offspring
genome) + EggSystem incubates and hatches it into a baby. AnimalPregnancySystem
branches on the mother's birth type. Adds an oviparous showcase species, Chicken.
Eggs are serialized (WorldSave.Eggs) like corpses, so clutches survive save/load.
Also lays the foundation for creating any species or hybrid (full command/UI
deferred): AnimalSet.HybridGenome(base, other) produces a cross anchored to a
base species' body/gene-set with shared genes blended Mendelian-style — so
Create(species, GenerateGenome) makes any species and Create(species,
HybridGenome) makes any hybrid.
EggTexture on AnimalDef (defaults to the seed dot placeholder); reproduction line
added to the `animal` console command. Build + --check-content clean (41 genes,
40 traits). Not GUI-verified.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Adds the first plant↔animal coupling beyond "herbivore eats plant": a toxin/
thorns ↔ tolerance arms race built on the existing gene + hediff engines, plus
the fuller RimWorld capacity set on the health scaffold.
Coevolution C1 — plant defense → poisons/injures the eater:
- Plant genes GeneToxicity/GeneThorns/GenePalatability (GenomeDef + PlantSet
template + PlantPhenotype); animal gene GeneToxinTolerance.
- Hediff Poisoned (non-progressing; grows from eating via HealthState.Intensify,
immunity heals it, overdose is lethal).
- AnimalActionSystem.ApplyPlantDefense on each bite: poison dose =
toxicity × (1 − tolerance); thorns → ApplyInjury (reuses predator-cluster).
- Cost of defense: PlantGrowthSystem growth ×= DefenseGrowthFactor()
(1 − 0.4·toxicity − 0.3·thorns) — without a cost defense would max out and
coevolution would stall.
- Showcase: cactus thorns, poisonous mushroom; grass starts clean so toxicity
can evolve on the staple. Deer/boar get small starting tolerance.
Coevolution C2 — discrimination + the other half of the arms race:
- Smart foraging (reuses A7 intelligence gating): herbivores with effective
intelligence ≥ tier-4 weigh plants by palatability − perceived-toxin −
distance; reflex grazers (or sick animals with dropped consciousness) eat the
nearest plant and risk poison.
- Cost of tolerance: detox raises metabolism (need decay ×= 1 + 0.5·tolerance),
closing the arms race so tolerance doesn't fix at 1.
- popstats reports mean toxinTolerance and a plants line (mean toxicity/thorns/
palatability) to watch the drift.
Health capacities (RimWorld parity, user-requested):
- New capacities BloodFiltration/Hearing/Talking/Eating; CapacityCalc rewritten
to emit only capacities the body declares (a destroyed organ still shows 0%)
with the full dependency chain (blood → pumping/breathing/filtration →
consciousness → moving/sight/hearing/talking/eating, digestion).
- Quadruped body gains kidneys + liver (filtration), ears (hearing), jaw/tongue
(eating/talking). Inspector health tab lists all of a body's capacities.
Localization (ru/en) for new genes' defense line, Poisoned, and the new
capacity labels. Build + --check-content clean (11 def types, 40 genes,
39 traits). Not GUI-verified (headless can't render the world scene).
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Main independently adopted the engine Core/Host split in G1, so the
scene adaptations conflicted with identical changes here — resolved in
main's favor (its scenes also carry the gene-driven world). Kept from
this branch: BootScene's --connect path into MultiplayerScene, the
buildAtlases switch in GameContent.Load (with the Task.Run lambda fix
its optional parameter requires), net.* localization keys, and the
Net/Server/Web projects in the solution. Program.cs now has both CLI
modes: --check-content (main) and --connect (here). The engine pointer
lands on d044caf, which linearly contains both lines of work.
Verified on the merged tree: 366 engine tests pass, --check-content
reports genes/traits intact, and a live --listen server replicates
moving pawns to the probe.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
New plant content, all driven by genes through the trait layer (no engine
change — the genetics machinery already supports it).
- ProductDef + products.json (wood, grass, berries, acorn) — what plants
yield; localized labels (ru/en).
- New numeric genes (genes.json): GeneFruitYield, GeneFruitSeason,
GeneHarvestAmount, GeneLeafHue, each declaring its trait via formula.
GenomeDef carries the per-species bases (PlantSet maps them into the
species template); PlantDef gains harvestProduct / fruitProduct.
- PlantPhenotype gains FruitYield/FruitSeason/HarvestAmount/LeafHue.
PlantFactory tints the sprite from the leaf-hue gene (combined with the
morph variant). Plants carry a Fruiting component; PlantFruitingSystem
ripens fruit on mature plants during their gene-chosen season and drops
it off-season.
- plants.json: trees give wood + acorns (autumn), bushes berries (summer),
grass gives grass — amounts/season/hue from genes.
- 'plant <species> [seed]' console command samples a species genome and
prints its gene-driven traits and products.
Build clean; def JSON validated; boot smoke loads the new content.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Engine bump brings MrGameEng.Net (WebSocket transport, RFC 6455 server,
delta component replication) — this commit is its showcase.
LittleSim.Server --listen runs the world online: 24 pawns wander, tire
and rest on the engine's fixed-tick HeadlessHost (the same Wander/
Needs/Decision systems the windowed world uses), a WebSocketServer
accepts clients and a ReplicationServer ships Transform2D + PawnNeeds
deltas at 10 snapshots/s per the shared NetSchema. --probe is the CLI
check: it connects, listens for a second and prints replicated pawns
with positions sampled twice to show the world is alive.
The game gains MultiplayerScene (dotnet run --project src/LittleSim --
--connect [ws://host:port]): simulation stays on the server, the client
applies snapshots into its scene store, decorates spawned entities with
sprites and reuses PawnAppearanceSystem so replicated fatigue darkens
pawns locally. HUD strings go through ru/en localization; the `net`
console command reports connection state and entity count. Esc returns
to the main menu.
Verified end to end: probe sees 24 pawns moving between samples; the
windowed client connects and runs against a live local server.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Bump the engine submodule to a684c23 (Climate + day/night ambient). The
world scene now registers UseClimate and UseDayNight, so it darkens at
night and the HUD shows the season and temperature alongside the date.
Add docs/растения.md capturing the whole plant-ecosystem design (growth as
a suitability product, hybrid Mendelian genome, climate, lighting with
shadows, reproduction, persistence) and the A-D phase plan.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Bump the engine submodule to 4b91b60 (calendar time of day) and display
the current date and time in the world HUD (День N, HH:MM) instead of just
the day number. Set the day length to 480 scaled seconds so the base (x1)
speed runs at 3 in-game minutes per real second.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Bump the engine submodule to 09dbdfa (MrGameEng.Inspector) and wire the
new DevTools-style ECS debugger into WorldScene via UseInspector(renderer),
before UseDevConsole so the console still draws on top. The HUD controls
hint now mentions F1.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Bump the engine submodule to f791ee6 (Calendar) and use it to drive plant
growth. PlantDef gains a Stages list (texture/size/growDays per stage,
inheritable via abstract parents in plants.json); a resolved PlantSet
table turns those into atlas regions and day thresholds at scene load.
New PlantGrowth component plus PlantGrowthSystem advance each plant by
in-game days from the Calendar and swap its sprite/scale at stage borders.
WorldScene scatters plants again with a seed-deterministic, varied initial
maturity, registers the calendar and growth system, and the HUD now shows
the current day. Stage durations and visuals are pure data in plants.json.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Bump the engine submodule to 5365945 (MrGameEng.WorldGen) and drive
terrain from it: WorldGenerator is now a thin adapter over the engine's
seed-based Perlin/fBm/island HeightmapGenerator instead of the old
random+smoothing pass.
Strip WorldScene down to terrain + camera: render the world as a single
Tilemap entity using per-biome surface textures from the atlas (water
falls back to a tinted tile), and remove pawns, plants, AI systems,
population and save-restore for now. Delete the TerrainScene demo (its
tile approach now lives in WorldScene) along with its console command
and the hud.terrain/population localization strings.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
- Added new UI strings for menus, settings, and pause functionality in both English and Russian localization files.
- Introduced a new WorldPresetDef class to define world size and population settings, allowing for dynamic world creation.
- Updated world generation logic to support customizable terrain smoothing and population settings based on user-defined presets.
- Refactored WorldScene to utilize the new WorldConfig structure for improved world initialization and loading.
This commit improves the user experience by providing more options for world creation and enhancing the overall localization of the game.
The whole game is now described by Mods/Core — the first consumer of
the engine's new MrGameEng.Mods module:
- textures/ moved to Mods/Core/Textures; atlases are built at game
start from the merged texture tree of all active mods into Cache/
(gitignored, incremental) instead of being committed, and the
GameAssets atlas handles are gone with them
- terrain, plants and pawns are JSON defs (Mods/Core/Defs) with parent
inheritance; scenes read TerrainDef/PlantDef/PawnDef instead of
hardcoded arrays, and the TerrainKind enum is retired
- HUD strings come from Mods/Core/Languages (ru default, en fallback)
through LanguageManager; the language switches at runtime
- new console commands: mods, lang [code], defs [type]; atlas now
inspects the runtime-built cache
- bump engine: MrGameEng.Mods module and the explicit-sources
AtlasBuilder overload
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>