Weight system: body mass, carry capacity, Kleiber metabolism
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>
This commit is contained in:
co-authored by
Claude Opus 4.8
parent
0e2cf55a54
commit
1a3f205f86
@@ -16,6 +16,7 @@
|
||||
"body": "Quadruped",
|
||||
"diet": ["plant"],
|
||||
"spawnPer1000Cells": 2.5,
|
||||
"baseMassKg": 70,
|
||||
"genome": {
|
||||
"GeneMaxBodySize": 1.5,
|
||||
"GeneMetabolism": 1.0,
|
||||
@@ -51,6 +52,7 @@
|
||||
"attackDamage": 80,
|
||||
"attackBleed": 3.0,
|
||||
"attackBloodLoss": 5.0,
|
||||
"baseMassKg": 45,
|
||||
"genome": {
|
||||
"GeneMaxBodySize": 1.6,
|
||||
"GeneMetabolism": 1.1,
|
||||
@@ -84,6 +86,7 @@
|
||||
"attackDamage": 45,
|
||||
"attackBleed": 1.8,
|
||||
"attackBloodLoss": 3.0,
|
||||
"baseMassKg": 80,
|
||||
"genome": {
|
||||
"GeneMaxBodySize": 1.3,
|
||||
"GeneMetabolism": 1.2,
|
||||
@@ -116,6 +119,7 @@
|
||||
"spawnPer1000Cells": 1.5,
|
||||
"baseSpeed": 22,
|
||||
"visionCells": 10,
|
||||
"baseMassKg": 2.5,
|
||||
"genome": {
|
||||
"GeneMaxBodySize": 0.5,
|
||||
"GeneMetabolism": 1.3,
|
||||
|
||||
Reference in New Issue
Block a user