M1b: survival stats, day/night, fire fuel, cooking, foraging, torches, death + grave

- Health, stamina, hunger, warmth and wet with HUD bars, status tags and clock
- 20-minute day/night cycle with moon, stars and lit clouds
- Campfire fuel (2 min start, 15 min max), heat radius, cooking needs a lit fire
- Berry bushes (regrow 10 min), mushrooms, roasted mushroom, torch
- Stamina costs for sprint, jump and harvest hits
- Death respawns at island start and leaves a grave bag
- Saves include stats, time of day, fire fuel, regrowth timers and graves
- New test_survival_stats suite; tests fail if a script error aborts them
This commit is contained in:
Paul Bailey
2026-11-04 01:19:41 +00:00
parent 2b1afc86ba
commit fc7eb3cfed
28 changed files with 1326 additions and 97 deletions

View File

@@ -1,32 +1,196 @@
{
"items": [
{ "id": "stick", "name": "Stick", "category": "resource", "stack": 50,
"description": "A sturdy branch. Handles, kindling, fuel.", "mesh": "stick", "fuel": 20 },
{ "id": "stone", "name": "Stone", "category": "resource", "stack": 50,
"description": "A fist-sized stone.", "mesh": "stone" },
{ "id": "flint", "name": "Flint", "category": "resource", "stack": 50,
"description": "Sharp-edged stone. Knaps into blades and axe heads.", "mesh": "flint" },
{ "id": "wood", "name": "Wood", "category": "resource", "stack": 50,
"description": "Split timber from a felled tree.", "mesh": "wood", "fuel": 60 },
{ "id": "stone_axe", "name": "Stone Axe", "category": "tool", "stack": 1,
"description": "Chops trees. Hold it and click on a tree.", "mesh": "stone_axe",
"tool": { "kind": "axe", "tier": 1, "damage": 1.0 } },
{ "id": "stone_pickaxe", "name": "Stone Pickaxe", "category": "tool", "stack": 1,
"description": "Breaks boulders into stone and flint.", "mesh": "stone_pickaxe",
"tool": { "kind": "pickaxe", "tier": 1, "damage": 1.0 } },
{ "id": "club", "name": "Wooden Club", "category": "weapon", "stack": 1,
"description": "Crude, heavy, effective. (Creatures arrive in M1d.)", "mesh": "club",
"weapon": { "damage": 12, "reach": 2.2, "stamina": 8 } },
{ "id": "campfire", "name": "Campfire", "category": "placeable", "stack": 5,
"description": "Light and warmth. Place it, then keep it burning.", "mesh": "campfire",
"place": { "piece": "campfire", "footprint": [1.4, 1.4] } },
{ "id": "workbench", "name": "Workbench", "category": "placeable", "stack": 1,
"description": "Crafting station for better gear and storage.", "mesh": "workbench",
"place": { "piece": "workbench", "footprint": [2.0, 1.1] } },
{ "id": "chest", "name": "Wooden Chest", "category": "placeable", "stack": 5,
"description": "Stores 16 stacks.", "mesh": "chest",
"place": { "piece": "chest", "footprint": [1.2, 0.8] } }
{
"id": "stick",
"name": "Stick",
"category": "resource",
"stack": 50,
"description": "A sturdy branch. Handles, kindling, fuel.",
"mesh": "stick",
"fuel": 20
},
{
"id": "stone",
"name": "Stone",
"category": "resource",
"stack": 50,
"description": "A fist-sized stone.",
"mesh": "stone"
},
{
"id": "flint",
"name": "Flint",
"category": "resource",
"stack": 50,
"description": "Sharp-edged stone. Knaps into blades and axe heads.",
"mesh": "flint"
},
{
"id": "wood",
"name": "Wood",
"category": "resource",
"stack": 50,
"description": "Split timber from a felled tree.",
"mesh": "wood",
"fuel": 60
},
{
"id": "stone_axe",
"name": "Stone Axe",
"category": "tool",
"stack": 1,
"description": "Chops trees. Hold it and click on a tree.",
"mesh": "stone_axe",
"tool": {
"kind": "axe",
"tier": 1,
"damage": 1.0
}
},
{
"id": "stone_pickaxe",
"name": "Stone Pickaxe",
"category": "tool",
"stack": 1,
"description": "Breaks boulders into stone and flint.",
"mesh": "stone_pickaxe",
"tool": {
"kind": "pickaxe",
"tier": 1,
"damage": 1.0
}
},
{
"id": "club",
"name": "Wooden Club",
"category": "weapon",
"stack": 1,
"description": "Crude, heavy, effective. (Creatures arrive in M1d.)",
"mesh": "club",
"weapon": {
"damage": 12,
"reach": 2.2,
"stamina": 8
}
},
{
"id": "campfire",
"name": "Campfire",
"category": "placeable",
"stack": 5,
"description": "Light and warmth. Place it, then keep it burning.",
"mesh": "campfire",
"place": {
"piece": "campfire",
"footprint": [
1.4,
1.4
]
}
},
{
"id": "workbench",
"name": "Workbench",
"category": "placeable",
"stack": 1,
"description": "Crafting station for better gear and storage.",
"mesh": "workbench",
"place": {
"piece": "workbench",
"footprint": [
2.0,
1.1
]
}
},
{
"id": "chest",
"name": "Wooden Chest",
"category": "placeable",
"stack": 5,
"description": "Stores 16 stacks.",
"mesh": "chest",
"place": {
"piece": "chest",
"footprint": [
1.2,
0.8
]
}
},
{
"id": "fiber",
"name": "Plant Fiber",
"category": "resource",
"stack": 50,
"description": "Tough stems from bushes. Twine, torch wrapping.",
"mesh": "fiber",
"fuel": 5
},
{
"id": "berries",
"name": "Berries",
"category": "food",
"stack": 30,
"description": "A handful of wild berries. Right-click to eat.",
"mesh": "berries",
"food": {
"hunger": 9,
"health": 2
}
},
{
"id": "mushroom",
"name": "Mushroom",
"category": "food",
"stack": 30,
"description": "Edible raw, much better roasted at a campfire.",
"mesh": "mushroom",
"food": {
"hunger": 6,
"health": 0
}
},
{
"id": "roasted_mushroom",
"name": "Roasted Mushroom",
"category": "food",
"stack": 30,
"description": "Smoky and filling. Right-click to eat.",
"mesh": "roasted_mushroom",
"food": {
"hunger": 24,
"health": 8
}
},
{
"id": "torch",
"name": "Torch",
"category": "tool",
"stack": 1,
"description": "Hold it for light and a little warmth.",
"mesh": "torch",
"light": {
"range": 10.0,
"energy": 1.6,
"heat": 0.3
}
},
{
"id": "grave",
"name": "Grave",
"category": "placeable",
"stack": 1,
"description": "Where you fell. Your belongings are inside.",
"mesh": "grave",
"hidden": true,
"place": {
"piece": "grave",
"footprint": [
1.0,
1.6
]
}
}
]
}

View File

@@ -1,16 +1,83 @@
{
"recipes": [
{ "id": "stone_axe", "output": "stone_axe", "count": 1, "station": "",
"inputs": { "stick": 2, "flint": 2 } },
{ "id": "stone_pickaxe", "output": "stone_pickaxe", "count": 1, "station": "",
"inputs": { "stick": 2, "stone": 3, "flint": 1 } },
{ "id": "campfire", "output": "campfire", "count": 1, "station": "",
"inputs": { "stone": 5, "stick": 4 } },
{ "id": "workbench", "output": "workbench", "count": 1, "station": "",
"inputs": { "wood": 10, "flint": 2 } },
{ "id": "club", "output": "club", "count": 1, "station": "",
"inputs": { "wood": 4 } },
{ "id": "chest", "output": "chest", "count": 1, "station": "workbench",
"inputs": { "wood": 10, "stick": 4 } }
{
"id": "stone_axe",
"output": "stone_axe",
"count": 1,
"station": "",
"inputs": {
"stick": 2,
"flint": 2
}
},
{
"id": "stone_pickaxe",
"output": "stone_pickaxe",
"count": 1,
"station": "",
"inputs": {
"stick": 2,
"stone": 3,
"flint": 1
}
},
{
"id": "campfire",
"output": "campfire",
"count": 1,
"station": "",
"inputs": {
"stone": 5,
"stick": 4
}
},
{
"id": "workbench",
"output": "workbench",
"count": 1,
"station": "",
"inputs": {
"wood": 10,
"flint": 2
}
},
{
"id": "club",
"output": "club",
"count": 1,
"station": "",
"inputs": {
"wood": 4
}
},
{
"id": "chest",
"output": "chest",
"count": 1,
"station": "workbench",
"inputs": {
"wood": 10,
"stick": 4
}
},
{
"id": "torch",
"output": "torch",
"count": 1,
"station": "",
"inputs": {
"stick": 1,
"fiber": 2
}
},
{
"id": "roasted_mushroom",
"output": "roasted_mushroom",
"count": 1,
"station": "campfire",
"inputs": {
"mushroom": 1
}
}
]
}