Godot game loop harvest

From thedivergentai/GD-Agentic-Skills · View interactive version

Godot game loop harvest is an AI agent skill from the GitHub repository thedivergentai/GD-Agentic-Skills. Data-driven resource harvesting (mining, logging, foraging) for Godot 4: apply_hit tool/tier validation via HarvestToolData enums, HarvestResourceData yields, harvestable_node shake/deplete, respawn_manager world persistence, UNIX offline progress, autosave, and noise vein proc-gen. Trigger keywords

How to use this skill

Skill file

Script Catalog (MANDATORY by path)

| Path | MANDATORY reads |

|---|---|

| Hit / gather | harvestable_node.gd, resource_data.gd, harvest_tool_data.gd |

| Offline / autosave | harvest_loop_patterns.gd, harvest_autosave_manager.gd, harvest_inventory_manager.gd |

| Vein / respawn / world | harvest_respawn_manager.gd + FastNoiseLite vein notes below |

Setup (short)

  1. Author HarvestResourceData / HarvestToolData .tres (tool enum + tier, yield range, optional drop scene).
  2. Attach harvestable_node.gd to StaticBody3D; assign data + mesh_to_shake; keep interaction on Layer 1.
  3. Autoload harvest_respawn_manager.gd as HarvestRespawnManager when world persistence is required.

Hit path

Raycast/interact → apply_hit(tool_data: HarvestToolData):

if collider is HarvestableNode:
    collider.apply_hit(player_tool)

| Signal | Payload | Wire to |

|---|---|---|

| harvested | (data, amount) | Inventory / harvest_inventory_manager |

| took_damage | (curr, max) | HUD bar / popup pool |

| interaction_failed | (reason: StringName) | "wrong_tool" / "low_tier" feedback |

NEVER Do

Vein proc-gen (noise)

Use FastNoiseLite thresholds for organic clusters; spawn HarvestableNode instances where noise.get_noise_2dv(pos) > threshold. Persist depleted IDs via respawn manager — do not re-roll veins every load without a seed.

Tool durability

Keep durability on HarvestToolData (Resource), not the player node. Emit durability/break signals from the tool Resource after successful hits.

MANDATORY for offline UNIX math, worker-thread batching, popup pools, and vein proc-gen depth: harvest-elite-patterns.md. Do NOT Load when hit path + respawn manager suffice.

Reference

Progressive disclosure: Skim Official Documentation only for the APIs you are implementing (Resources, StaticBody3D hits, signals, timers, save/offline time). Open Related Skills when wiring inventory, autoloads, raycasts, or economy balance—do not preload the whole lattice.

Official Documentation

Related Skills

Prerequisites
Complements
Downstream / consumers
Master
Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.