M1d: creatures, hunting, weapons, food buffs and the hide cloak

- Rabbits, deer and boars with procedural meshes and animated legs, a
  state machine (idle/wander/flee/charge/dead) and heightmap steering that
  avoids water, cliffs, the world edge, trees and buildings
- Spawner keeps a habitat-based budget around the player (6/4/3)
- Melee needs a weapon or tool (club, spear, axe, pickaxe); box sweep hits
- Wooden spear (thrust or throw) and crude bow with draw-scaled arrows;
  projectiles stick in the world as saved pickups
- Carcasses: E to butcher for meat, hide and embedded arrows
- Boars charge and gore when hit; hurt flash and a brief healing pause
- Cooked meat gives Well fed (faster stamina and healing); buffs saved
- Hide cloak: wear for warmth, saved, goes in the grave on death
- Feathers as meadow pickups (appended, existing save ids unchanged)
- New test_creatures_combat suite; run_all.sh gets a per-suite time limit
This commit is contained in:
Paul Bailey
2026-11-04 10:55:44 +00:00
parent fed96ef118
commit 67bf85523d
22 changed files with 1782 additions and 33 deletions

View File

@@ -65,12 +65,13 @@
"name": "Wooden Club",
"category": "weapon",
"stack": 1,
"description": "Crude, heavy, effective. (Creatures arrive in M1d.)",
"description": "Crude, heavy, effective. One blow fells a rabbit.",
"mesh": "club",
"weapon": {
"damage": 12,
"reach": 2.2,
"stamina": 8
"reach": 2.4,
"stamina": 8,
"cooldown": 0.55
}
},
{
@@ -266,6 +267,113 @@
2.1
]
}
},
{
"id": "raw_meat",
"name": "Raw Meat",
"category": "food",
"stack": 20,
"description": "Cook it at a campfire. Eaten raw it barely helps.",
"mesh": "raw_meat",
"food": {
"hunger": 5,
"health": -4
}
},
{
"id": "cooked_meat",
"name": "Cooked Meat",
"category": "food",
"stack": 20,
"description": "Hearty. Leaves you Well fed: faster stamina and healing for 10 minutes.",
"mesh": "cooked_meat",
"food": {
"hunger": 34,
"health": 12,
"buff": {
"id": "well_fed",
"name": "Well fed",
"seconds": 600,
"stamina_regen": 1.3,
"health_regen": 2.0
}
}
},
{
"id": "hide",
"name": "Hide",
"category": "resource",
"stack": 20,
"description": "Raw hide from a deer or boar. Makes a warm cloak.",
"mesh": "hide"
},
{
"id": "feather",
"name": "Feather",
"category": "resource",
"stack": 50,
"description": "Found in meadows. Fletching for arrows.",
"mesh": "feather"
},
{
"id": "spear",
"name": "Wooden Spear",
"category": "weapon",
"stack": 1,
"description": "LMB thrusts (long reach). RMB throws it: pick it up again where it lands.",
"mesh": "spear",
"weapon": {
"damage": 18,
"reach": 3.1,
"stamina": 10,
"cooldown": 0.6,
"throw": {
"damage": 30,
"speed": 24.0,
"stamina": 14
}
}
},
{
"id": "bow",
"name": "Crude Bow",
"category": "weapon",
"stack": 1,
"description": "Hold LMB to draw, release to shoot. Uses arrows.",
"mesh": "bow",
"bow": {
"ammo": "arrow",
"draw": 0.9,
"damage": [
8,
32
],
"speed": [
16.0,
46.0
],
"stamina": 6
}
},
{
"id": "arrow",
"name": "Flint Arrow",
"category": "weapon",
"stack": 50,
"description": "Ammunition for the bow. Arrows that miss can be picked up again.",
"mesh": "arrow"
},
{
"id": "hide_cloak",
"name": "Hide Cloak",
"category": "tool",
"stack": 1,
"description": "Right-click to wear it (+15 warmth, less chill from wet). Take it off from the inventory screen.",
"mesh": "hide_cloak",
"wear": {
"warmth": 15,
"wet_chill": 0.6
}
}
]
}

View File

@@ -134,6 +134,57 @@
"wood": 8,
"fiber": 6
}
},
{
"id": "cooked_meat",
"output": "cooked_meat",
"count": 1,
"station": "campfire",
"inputs": {
"raw_meat": 1
}
},
{
"id": "spear",
"output": "spear",
"count": 1,
"station": "workbench",
"inputs": {
"wood": 3,
"flint": 2,
"fiber": 1
}
},
{
"id": "bow",
"output": "bow",
"count": 1,
"station": "workbench",
"inputs": {
"wood": 4,
"fiber": 6
}
},
{
"id": "arrow",
"output": "arrow",
"count": 5,
"station": "workbench",
"inputs": {
"stick": 2,
"flint": 1,
"feather": 2
}
},
{
"id": "hide_cloak",
"output": "hide_cloak",
"count": 1,
"station": "workbench",
"inputs": {
"hide": 4,
"fiber": 4
}
}
]
}