The Forager's Town: A Blueprint for AI-Guided Game Development in Unreal Engine 5
My Goal: To learn how to build a first-person simulation game in Unreal Engine 5 using Blueprints. I have absolutely no experience with Unreal Engine or Blueprints, so I need extremely detailed, step-by-step guidance for each task, with clear explanations as if I'm starting from scratch.

Game Concept:

Relaxing and Immersive: A peaceful experience focused on foraging, crafting, building a home, and exploring a charming town surrounded by wilderness.

Mushroom-Centric Survival: Mushrooms are the primary resource for food, cooking, and trade. Hunger is a core mechanic.

No Combat or Multiplayer: The game is purely single-player, with no combat or enemy encounters.

Game Features: (To be implemented in phases)

Phase 1: Core Mechanics and Player Setup

Set Up Project:

Create a new Unreal Engine 5 project using the First Person template. Name it "TheForagersTown".

Create a clear file structure in the Content Browser, with folders for Blueprints, Meshes, Materials, Animations, Textures, Sounds, etc.

Player Character:

Blueprint: "BP_PlayerCharacter" (inherits from "Character").

Mesh: "SK_PlayerCharacter".

Movement: WASD, Space (jump), Left Ctrl (crouch), Shift (sprint).

Animations: "Anim_Walk", "Anim_Run", "Anim_Jump", "Anim_Crouch".

Stamina System: Implement stamina drain and regeneration, affecting actions like sprinting.

Player Attributes:

Variables: "Health", "Stamina", "Hunger" (Float variables in "BP_PlayerCharacter").

HUD: "WBP_HUD" displays visual bars for health, stamina, and hunger.

Hunger System:

"Hunger" depletes over time.

If "Hunger" reaches 0, "Health" slowly decreases.

Create the "EatMushroom" function to restore hunger.

Phase 2: Foraging and Basic Resources

Mushrooms:

Meshes: Import 8-10 unique meshes (e.g., "SM_RedcapMushroom", "SM_Glowshroom").

Actors:

Base: "BP_Mushroom" (inherits from "Actor").

Child Blueprints: One for each mushroom type (e.g., "BP_RedcapMushroom"), with corresponding mesh, "NutritionalValue" (Float), and optional "SpecialEffect" (String).

Foraging:

In "BP_PlayerCharacter":

Press "E" to pick up a mushroom (line trace detection).

Play "Anim_Forage" animation.

Add the mushroom to the inventory.

In "BP_Mushroom": Implement a timer for mushroom respawning.

Inventory:

Blueprint: "BP_Inventory" (inherits from "Object").

Array: "InventoryArray" (type "Struct_InventoryItem").

Structure: "Struct_InventoryItem" with "MushroomType", "Quantity", "NutritionalValue", and "SpecialEffect".

Inventory UI:

Widget Blueprint: "WBP_Inventory" to display inventory contents.

Phase 3: Crafting, Building, Cleaning, and Radial Menu

Cooking Recipes:

Structure: "Struct_Recipe" with "RecipeName", "RequiredMushrooms", "ResultingMeal", "MealNutritionalValue", "MealEffect".

Crafting System:

Workbench:

Mesh: "SM_Workbench".

Actor: "BP_Workbench" (inherits from "Actor").

UI:

Integrate crafting into "WBP_Inventory".

Show available recipes near a workbench.

Allow crafting if the player has the required mushrooms.

Build Mode:

Wrench: "SM_Wrench".

Building Tool:

Blueprint: "BP_BuildingTool" (invisible).

Variables: "SelectedBuildingPart", "PreviewMesh".

Activation:

Equip "SM_Wrench" when in "Build" mode (from Radial Menu).

Spawn and attach "BP_BuildingTool".

Building Parts:

Example meshes: "SM_WallSection_Wood", "SM_Door_Wood", "SM_Window_Wood", etc.

Functions in "BP_BuildingTool" for selecting parts, updating "SelectedBuildingPart" and "PreviewMesh".

Preview Placement:

"PreviewMesh" follows the mouse (line trace).

Rotate preview with Left/Right Arrow keys.

Placement:

Left-click to place.

Valid placement: Spawn the actual mesh, play "Anim_PlaceObject", consume resources.

Invalid placement: Display the "You can't place it here" notification.

Clean Mode:

Mop: "SM_Mop".

Activation: Equip "SM_Mop" when in "Clean" mode (Radial Menu).

Cleaning:

Line trace in "BP_PlayerCharacter" to find dirt decals in "Clean" mode.

Holding left-click: Play "Anim_Clean", reduce decal opacity, destroy when clean, award XP.

Radial Menu:

Widget Blueprint: "WBP_RadialMenu".

Buttons: "Inventory", "Build", "Clean".

Functionality: Right-click to open, click buttons for actions.

Phase 4: Day-Night Cycle, Sleep System, and Environment

Day-Night Cycle:

Rotating skybox with distinct day, night, dawn, dusk.

Dynamic lighting.

Time progresses at an accelerated rate (e.g., 1 real minute = 1 game hour).

Sleep System:

Bed Mesh: Import a bed mesh (e.g., "SM_Bed_Simple").

Bed Actor: Create a Blueprint class "BP_Bed" (inherits from "Actor") and assign the bed mesh.

Sleep Interaction:

Player can interact with the bed using "E".

Show a UI prompt asking if the player wants to sleep.

If the player confirms, advance time to the next morning (06:00 or a designated morning time).

Optionally play a fade-out/fade-in effect or a "sleep" animation on the character.

Weather System:

Basic rain and sunshine, affects mushroom growth.

Environment:

Create a town with houses (some purchasable), shops, and foraging areas (forest, cave, meadow).

Use meshes for trees, rocks, bushes, and other environment details.

Phase 5: Housing and Economy

House Purchasing:

Blueprint: "BP_House".

Variations in size and style.

Purchase houses from merchants with currency.

House Customization:

Place furniture (e.g., "SM_Bed_Simple", "SM_Table_Wood", "SM_Chair_Wood") and decorations.

Add storage containers.

Economy:

Merchants (mesh "SK_Merchant_Eleanor") buy and sell with dynamic prices based on rarity, demand, and events.

Phase 6: Immersive Elements and Refinement

NPC Interaction:

Text dialogue with NPCs (e.g., "SK_Merchant_Eleanor", "SK_QuestGiver_OldMan").

NPCs offer quests with rewards.

Readable Notes:

Place note meshes (e.g., "SM_Note_Lore") with text in the world.

Sound Design:

Ambient sounds, music, and sound effects for actions and events.

Polish and Optimization:

Optimize performance, visuals, and address any bugs.

Phase 7: Saving and Loading

Save Game:

Blueprint: "BP_SaveGame".

Save all relevant game data (player stats, inventory, buildings, time, weather, quest progress).

Implement save function in "BP_PlayerCharacter".

Load Game:

Implement load function in "BP_PlayerCharacter" to restore game state from save files.

Additional Notes:

Provide constant feedback during each phase.

Use this prompt as a starting point, adding clarifications or adjustments as needed.