Компонент Corpse + CorpseSystem: после смерти животное оставляет труп (AnimalFactory.CreateCorpse, мясо ∝ размер тела) вместо деспавна; труп разлагается Fresh→Rotting→Skeleton→исчезает со скоростью от температуры, тинтуясь по стадии. AnimalDef.CorpseTexture + спрайт трупа в AnimalSet; смертность спавнит труп. Продукты мясо/кости/шкура заданы (разделка/падальщики — позже).
Сборка чистая, --check-content (9 типов дефов). Части тела/кровь/capacities — часть 2 A5.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Стадии стали данными: AnimalStageDef + AnimalDef.Stages (возраст входа = EnterAt x якорь maturity/lifespan, масштаб, набор текстур baby/adult, флаг adult для размножения); пусто -> встроенный дефолт Baby/Juvenile/Adult/Senior. AnimalFactory.StageAt/RegionFor/Scale/IsAdult работают по данным стадий; системы роста/решения/гона используют флаг adult вместо индекса. Спавн стал данными: AnimalDef.SpawnPer1000Cells — WorldScene рассыпает ВСЕ виды по плотности, не только захардкоженного оленя. Устраняет блокеры расширяемости #5 и #7.
Сборка чистая, --check-content (9 типов дефов).
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Нужды стали данными: NeedDef + needs.json (Hunger/Thirst/Rest/Mating), NeedSet (реестр: индексы, тип deplete/drive, поведение-исполнитель по id), динамический AnimalNeeds.Values (managed-массив — новая нужда не меняет структуру). AnimalNeedsSystem универсально считает убывание/рост по NeedDef; UtilityAi строится из NeedSet; действия исполняются по строковому id (реестр поведений) с восполнением нужды через NeedSet. Диета — AnimalDef.Diet (поиск корма гейтится). Добавить нужду/рацион виду = JSON без кода. Устраняет блокеры расширяемости #2 и #4.
Сборка чистая, --check-content (9 типов дефов).
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
AnimalGenomeDef (фикс. поля) убран; AnimalDef.Genome теперь словарь geneId->base. AnimalSet.BuildTemplate строит шаблон generically по реестру генов (разброс из самого GeneDef, дискретные поддержаны). Модер добавляет ген особи одной строкой JSON в animals.json — без правки кода. Устраняет блокер расширяемости #1.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Нужда Mating + лёгкий hediff-каркас (HediffDef, hediffs.json с Rut, Health/HealthState). Гены GeneBreedingSeason/GeneGestationDays/GeneLitterSize. AnimalRutSystem навешивает сезонный гон-хедиф взрослым и поднимает влечение (вне сезона зачатия нет). Действие Mate ищет партнёра противоположного пола и сближается; при контакте самка получает Pregnant (геном отца). AnimalPregnancySystem тикает срок и рожает помёт через Genome.Breed (пол наследуется без YY, поколение+1), с потолком численности.
Сборка чистая, --check-content (8 типов дефов, 33 гена, 32 признака).
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Компонент AnimalGrowth (стадия + возраст). Ген пола GeneSex (локус XX/XY; генерация основателя задаёт пол явно через AnimalSet.GenerateGenome, исключая невозможный YY) и GeneMaturityAge. Стадии Baby->Juvenile->Adult->Senior с порогами из генов. AnimalGrowthSystem меняет спрайт (детёныш/самец/самка) и размер по стадии; AnimalMortalitySystem — смерть от старости и истощения (деспавн), замыкает контур ёмкости среды. Стадо спавнится разновозрастным.
Сборка чистая, --check-content (30 генов, 29 признаков).
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Новый тип дефа Animal (AnimalDef : PawnDef) + animals.json (Deer). 8 организм-агностичных животных генов в genes.json. AnimalPhenotype/AnimalOrganism, AnimalSet (шаблон генома вида) и AnimalFactory — зеркала растительных PlantSet/PlantFactory. Детерминированный спавн стада оленей по суше в WorldScene с рендером и тинтом меха по гену; консольная команда 'animal <species>'.
Проверено: сборка чистая, --check-content (7 типов дефов, 28 генов).
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Engine pointer -> d044caf (formula gene grouping, content patches, def
field validation). Game-side demonstration of all three:
- genes.json: GeneHardiness whose effect is gsum('Gene.*Tolerance') — a
derived trait summing all tolerance genes via regex grouping.
- patches.json: a content patch giving every Bush* plant a wood harvest
product, applied to Core's own defs at load.
- GameContent registers load-time validators: Gene/Product defNames must
carry their type prefix.
- Program: a --check-content headless mode that loads all mod defs (running
patches + validators) and computes a sample genome's traits (compiling
every gene formula, grouping included) — a CI-friendly content lint.
Verified: --check-content reports 6 def types, 18 genes, 8 plants, 18
traits with hardiness computed from the gene group. Full suite green.
Co-Authored-By: Claude Opus 4.8 <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 pointer -> bc18db5: brings in the organism-agnostic gene
foundation (GeneDef, managed Genome, Phenotype trait computation) plus a
parallel MrGameEng.Net library the game does not use.
Game wiring: register the "Gene" def type and ship Mods/Core/Defs/
genes.json — a full gene set covering the plant phenotype dimensions
(environment optima/tolerances, vigor, lifecycle, reproduction) plus a
discrete morph gene, each declaring its trait effects as formulas. A
dev-console 'gene [seed]' command generates a genome from these defs,
prints its alleles, expressed values and computed traits, then breeds a
child — demonstrating the whole pipeline end to end. These genes seed
the G3 migration of plants onto traits.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Bump the engine submodule to 79d406a (2D lightmap). The world scene now uses
UseLighting instead of the per-sprite ambient: a lightmap multiplies day/night
× occlusion over the world, so forests cast soft shade and the world darkens
spatially toward night. Occluders are mountains (new TerrainDef.BlocksLight)
plus mature trees, rebuilt from the live population. PlantGrowthSystem samples
the local light per plant (Lighting.SampleAt), so undergrowth under canopy
grows slower. A dev-console 'light' command places a point light at the cursor
to show cast shadows at night. Completes the plant ecosystem (A–D).
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Plants now live full lives. The genome gains lifespan, dispersal, fecundity,
self-pollination, mutation-rate and a discrete dominant/recessive Morph gene;
PlantGenome.Breed models meiosis (one allele per parent) plus mutation. A
gated PlantLifecycleSystem builds a per-cell grid (density + a species/genome
representative), reaps plants past their lifespan, and lets mature plants seed
offspring — cross-pollinating with a mature same-species neighbour in dispersal
range (falling back to self-pollination by gene) into a nearby land cell under
the density cap. A shared PlantFactory creates every plant (initial scatter,
births, save restore) and tints recessive-morph plants. Growth keeps aging
mature plants so they can die of old age. The whole population (genomes,
positions, age, stage) is saved to WorldSave and restored on load instead of
re-scattering from the seed. plants.json carries the new genes.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Bump the engine submodule to d0104df (Suitability.Gaussian). Each plant now
carries a diploid PlantGenome (allele pairs, phenotype = allele average) seeded
from a per-species GenomeDef baseline at spawn. PlantGrowthSystem replaces the
flat fertility multiplier with vigor times a product of Gaussian suitabilities
for light (day/night), temperature (climate season) and the cell's fertility —
so plants grow faster in their preferred light/warmth/soil and crawl outside it.
Genomes are visible and editable in the ECS inspector. plants.json carries the
species genomes.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Bump the engine submodule to f39ee9e (half-texel UV inset that removes the
black tile seams seen while zooming). Add a Fertility multiplier to
TerrainDef (forest soil rich, sand/mountain poor); plants record their
cell's fertility as PlantGrowth.GrowthRate at spawn, and the growth system
multiplies the per-frame calendar day-delta by it — so growth stays tied to
the in-game calendar and runs faster on fertile soil.
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>
- 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>