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>
81 lines
6.5 KiB
JSON
81 lines
6.5 KiB
JSON
{
|
||
"type": "Gene",
|
||
// Гены животных: организм-агностичные гены зверя (их несёт геном животного). Тело/обмен/движение/
|
||
// чувства/мозг + пол (локус) и размножение. Признаки читают системы животных (рост, ИИ, здоровье).
|
||
"defs": [
|
||
{ "defName": "GeneMaxBodySize", "parent": "BaseNumericGene", "label": "gene.bodySize",
|
||
"default": 1.0, "min": 0.1, "max": 4.0, "tags": ["animal", "body"],
|
||
"effects": { "bodySize": "value" } },
|
||
{ "defName": "GeneMetabolism", "parent": "BaseNumericGene", "label": "gene.metabolism",
|
||
"default": 1.0, "min": 0.2, "max": 3.0, "tags": ["animal", "metabolism"],
|
||
"effects": { "metabolism": "value" } },
|
||
{ "defName": "GeneMoveSpeed", "parent": "BaseNumericGene", "label": "gene.moveSpeed",
|
||
"default": 1.0, "min": 0.2, "max": 3.0, "tags": ["animal", "movement"],
|
||
"effects": { "moveSpeed": "value" } },
|
||
{ "defName": "GeneBloodVolume", "parent": "BaseNumericGene", "label": "gene.bloodVolume",
|
||
"default": 1.0, "min": 0.2, "max": 3.0, "tags": ["animal", "health"],
|
||
"effects": { "bloodVolume": "value" } },
|
||
{ "defName": "GeneVision", "parent": "BaseNumericGene", "label": "gene.vision",
|
||
"default": 1.0, "min": 0.2, "max": 3.0, "tags": ["animal", "senses"],
|
||
"effects": { "vision": "value" } },
|
||
{ "defName": "GeneBrainSize", "parent": "BaseNumericGene", "label": "gene.brainSize",
|
||
"default": 0.45, "min": 0.0, "max": 1.0, "spread": 0.03, "tags": ["animal", "brain"],
|
||
"effects": { "brainSize": "value" } },
|
||
{ "defName": "GeneInsulation", "parent": "BaseNumericGene", "label": "gene.insulation",
|
||
"default": 0.5, "min": 0.0, "max": 1.0, "tags": ["animal", "temperature"],
|
||
"effects": { "insulation": "value" } },
|
||
{ "defName": "GeneFurColor", "parent": "BaseNumericGene", "label": "gene.furColor",
|
||
"default": 0.5, "min": 0.0, "max": 1.0, "spread": 0.06, "tags": ["animal", "morphology", "color"],
|
||
"effects": { "furHue": "value" } },
|
||
{ "defName": "GeneMaturityAge", "parent": "BaseNumericGene", "label": "gene.maturityAge",
|
||
"default": 90, "min": 1, "max": 400, "tags": ["animal", "lifecycle"],
|
||
"effects": { "maturityAge": "value" } },
|
||
|
||
// --- Диета как ГЕНЫ (хищничество/травоядство/всеядство) ---
|
||
// Каждый ген выражает свой признак [0..1]; рацион выводится порогами: ест растения, если
|
||
// max(herbivory, omnivory) ≥ порога; ест мясо (охота/падаль), если max(carnivory, omnivory) ≥ порога.
|
||
// Поэтому всеядность — отдельный ген, который включает ОБА источника пищи (генералист), а
|
||
// специалисты задаются высоким herbivory ЛИБО carnivory. См. AnimalFactory.Diet.
|
||
{ "defName": "GeneHerbivory", "parent": "BaseNumericGene", "label": "gene.herbivory",
|
||
"default": 0.0, "min": 0.0, "max": 1.0, "tags": ["animal", "diet"],
|
||
"effects": { "herbivory": "value" } },
|
||
{ "defName": "GeneCarnivory", "parent": "BaseNumericGene", "label": "gene.carnivory",
|
||
"default": 0.0, "min": 0.0, "max": 1.0, "tags": ["animal", "diet"],
|
||
"effects": { "carnivory": "value" } },
|
||
{ "defName": "GeneOmnivory", "parent": "BaseNumericGene", "label": "gene.omnivory",
|
||
"default": 0.0, "min": 0.0, "max": 1.0, "tags": ["animal", "diet"],
|
||
"effects": { "omnivory": "value" } },
|
||
|
||
// Устойчивость к растительным ядам (коэволюция): снижает дозу отравления при поедании токсичных
|
||
// растений (effectivePoison = toxicity × (1 − toxinTolerance), см. AnimalActionSystem). Растёт под
|
||
// давлением ядовитого корма — другая сторона гонки вооружений с GeneToxicity растений.
|
||
{ "defName": "GeneToxinTolerance", "parent": "BaseNumericGene", "label": "gene.toxinTolerance",
|
||
"default": 0.0, "min": 0.0, "max": 1.0, "tags": ["animal", "diet"],
|
||
"effects": { "toxinTolerance": "value" } },
|
||
|
||
// Пол как локус (фаза A3): аллели {X=0, Y=1}; самка XX, самец XY. Эффекта нет — пол читается из
|
||
// самих аллелей (наличие Y), не из выраженного значения. mutationChance 0 (X не мутирует в Y).
|
||
// Генерация особи-основателя задаёт пол явно (XX или XY), чтобы не возник невозможный YY.
|
||
{ "defName": "GeneSex", "kind": "Discrete", "label": "gene.sex",
|
||
"variants": 2, "variantWeights": [0.5, 0.5], "mutationChance": 0, "tags": ["animal", "sex"] },
|
||
|
||
// Тип рождения (цикл зачатия): живородящие (eggLaying < 0.5) вынашивают и рожают живых детёнышей;
|
||
// яйцекладущие (≥ 0.5) после вынашивания ОТКЛАДЫВАЮТ яйца-сущности, которые инкубируются и
|
||
// вылупляются (см. AnimalPregnancySystem/EggSystem). Признак фиксирован по виду (spread/mutation 0).
|
||
{ "defName": "GeneEggLaying", "parent": "BaseNumericGene", "label": "gene.eggLaying",
|
||
"default": 0.0, "min": 0.0, "max": 1.0, "spread": 0, "mutationChance": 0, "tags": ["animal", "reproduction"],
|
||
"effects": { "eggLaying": "value" } },
|
||
|
||
// Размножение (фаза A4): сезон гона фиксирован по виду (0 весна … 3 зима), срок вынашивания и помёт.
|
||
{ "defName": "GeneBreedingSeason", "parent": "BaseNumericGene", "label": "gene.breedingSeason",
|
||
"default": 2, "min": 0, "max": 3, "spread": 0, "mutationChance": 0, "tags": ["animal", "reproduction"],
|
||
"effects": { "breedingSeason": "value" } },
|
||
{ "defName": "GeneGestationDays", "parent": "BaseNumericGene", "label": "gene.gestationDays",
|
||
"default": 30, "min": 1, "max": 200, "tags": ["animal", "reproduction"],
|
||
"effects": { "gestationDays": "value" } },
|
||
{ "defName": "GeneLitterSize", "parent": "BaseNumericGene", "label": "gene.litterSize",
|
||
"default": 1, "min": 1, "max": 12, "tags": ["animal", "reproduction"],
|
||
"effects": { "litterSize": "value" } }
|
||
]
|
||
}
|