From d69311363ddc7e1f69ce75c1afadc90c2fd54a1f Mon Sep 17 00:00:00 2001 From: nathan Date: Sun, 17 May 2026 15:51:54 -0700 Subject: [PATCH] Document stone resource support --- AGRARIAN_DEVELOPMENT_ROADMAP.md | 4 +- Docs/TechnicalDesignDocument.md | 12 +++++ Scripts/verify_stone_resource.py | 83 ++++++++++++++++++++++++++++++++ 3 files changed, 98 insertions(+), 1 deletion(-) create mode 100644 Scripts/verify_stone_resource.py diff --git a/AGRARIAN_DEVELOPMENT_ROADMAP.md b/AGRARIAN_DEVELOPMENT_ROADMAP.md index 563e267..168653b 100644 --- a/AGRARIAN_DEVELOPMENT_ROADMAP.md +++ b/AGRARIAN_DEVELOPMENT_ROADMAP.md @@ -529,7 +529,9 @@ Target deliverable: A small group can join a server, spawn into one biome, gathe - [x] Create resource node base class. - [x] Add wood resource. -- [ ] Add stone resource. +- [x] Add stone resource. Stone is defined as `DA_Item_Stone`, exposed through + `BP_StoneResourceNode`, placed in the Ground Zero resource pass, and covered + by focused stone-resource verification. - [x] Add fiber resource. - [ ] Add edible plant resource. - [ ] Add water gathering interaction. diff --git a/Docs/TechnicalDesignDocument.md b/Docs/TechnicalDesignDocument.md index 378432b..3203e74 100644 --- a/Docs/TechnicalDesignDocument.md +++ b/Docs/TechnicalDesignDocument.md @@ -415,6 +415,18 @@ Use Unreal Data Assets for designer-facing definitions such as: Data Assets should describe content. Server code should enforce gameplay rules. +### Gatherable Resources + +The 0.1.F resource baseline uses `AAgrarianResourceNode` for simple gatherable +world resources. Wood, fiber, and stone each have item definitions, resource +Blueprints, deterministic Ground Zero placements, replicated remaining harvest +counts, and bare-hand gathering through the shared interaction path. + +Stone specifically is represented by `DA_Item_Stone` and +`BP_StoneResourceNode`. Ground Zero includes stone nodes in slope, exposed +terrain, and valley-edge positions so primitive tools, campfires, and early +construction recipes have an in-world source instead of relying on debug grants. + ### Wildlife Navigation MVP wildlife movement is server authoritative. `AAgrarianWildlifeBase` uses an diff --git a/Scripts/verify_stone_resource.py b/Scripts/verify_stone_resource.py new file mode 100644 index 0000000..0c4edae --- /dev/null +++ b/Scripts/verify_stone_resource.py @@ -0,0 +1,83 @@ +from pathlib import Path + + +ROOT = Path(__file__).resolve().parents[1] +FILES = { + "setup_item_definitions.py": ROOT / "Scripts" / "setup_item_definitions.py", + "setup_playable_blueprints.py": ROOT / "Scripts" / "setup_playable_blueprints.py", + "setup_ground_zero_demo_map.py": ROOT / "Scripts" / "setup_ground_zero_demo_map.py", + "verify_playable_blueprints.py": ROOT / "Scripts" / "verify_playable_blueprints.py", + "verify_ground_zero_resources.py": ROOT / "Scripts" / "verify_ground_zero_resources.py", + "GroundZeroResourcePass.md": ROOT / "Docs" / "Terrain" / "GroundZeroResourcePass.md", + "TechnicalDesignDocument.md": ROOT / "Docs" / "TechnicalDesignDocument.md", + "AGRARIAN_DEVELOPMENT_ROADMAP.md": ROOT / "AGRARIAN_DEVELOPMENT_ROADMAP.md", +} + +EXPECTED = { + "setup_item_definitions.py": [ + '"asset": "DA_Item_Stone"', + '"item_id": "stone"', + "Field stone suitable for crude tools", + '"unit_weight": 1.5', + ], + "setup_playable_blueprints.py": [ + 'STONE_ITEM_PATH = "/Game/Agrarian/DataAssets/Items/DA_Item_Stone"', + '"asset": "BP_StoneResourceNode"', + '"yield_item_definition": STONE_ITEM_PATH', + '"remaining_harvests": 12', + '"quantity_per_harvest": 2', + ], + "setup_ground_zero_demo_map.py": [ + '"/Game/Agrarian/Blueprints/Resources/BP_StoneResourceNode"', + '"AGR_GZ_Stone_Slope_01"', + '"AGR_GZ_Stone_Slope_02"', + '"AGR_GZ_Stone_ExposedTerrain_03"', + '"AGR_GZ_Stone_ValleyEdge_04"', + ], + "verify_playable_blueprints.py": [ + '"/Game/Agrarian/Blueprints/Resources/BP_StoneResourceNode"', + '"yield_item_id": "stone"', + ], + "verify_ground_zero_resources.py": [ + '"stone": [', + '"AGR_GZ_Stone_Slope_01"', + 'f"{len(EXPECTED_RESOURCE_LABELS[\'stone\'])} stone nodes."', + ], + "GroundZeroResourcePass.md": [ + "- Stone: slope, exposed terrain, and valley-edge areas.", + "Added `BP_StoneResourceNode`", + "Stone nodes: `4`", + ], + "TechnicalDesignDocument.md": [ + "### Gatherable Resources", + "`AAgrarianResourceNode`", + "`DA_Item_Stone`", + "`BP_StoneResourceNode`", + "primitive tools, campfires, and early", + "construction recipes", + ], + "AGRARIAN_DEVELOPMENT_ROADMAP.md": [ + "[x] Add stone resource.", + "`DA_Item_Stone`", + "`BP_StoneResourceNode`", + "Ground Zero resource pass", + ], +} + + +def main(): + missing = [] + for label, path in FILES.items(): + text = path.read_text(encoding="utf-8") + for snippet in EXPECTED[label]: + if snippet not in text: + missing.append(f"{label}: {snippet}") + + if missing: + raise RuntimeError("Stone resource verification failed: " + "; ".join(missing)) + + print("Agrarian stone resource verification complete.") + + +if __name__ == "__main__": + main()