Improve investor visual recovery pass
This commit is contained in:
+68
-133
@@ -29,7 +29,6 @@ Core commitments:
|
||||
- [ ] Build toward an Earth-scale world made from real-world terrain tiles.
|
||||
- [ ] Keep travel paced by believable real-world movement, vehicles, terrain, and character condition.
|
||||
- [ ] Treat terrain, bathymetry, biomes, resources, rivers, and mountains as data-driven long-term infrastructure, not one-off maps.
|
||||
- [ ] Represent each real-world tile with layered climate, biome, ecology, and human-use metadata so the in-game environment feels geographically recognizable rather than using generic biome labels.
|
||||
- [ ] Keep base world time grounded; the world should progress without feeling artificially sped up.
|
||||
- [ ] Make player skill, tools, infrastructure, cooperation, and knowledge improve efficiency, yield, reliability, quality, and capacity rather than breaking natural biological time.
|
||||
- [ ] Treat learning as a core play loop: knowledge unlocks understanding, practice builds competence, and infrastructure makes advanced work possible.
|
||||
@@ -826,71 +825,74 @@ Target deliverable: A small group can join a server, spawn into one biome, gathe
|
||||
- [x] Replace the placeholder Ground Zero environment presentation with investor-facing biome dressing: believable terrain material, grass, brush, shrubs, bushes, trees, rocks, water visuals, and local coastal-scrub color variation. Upgraded the repeatable Ground Zero setup to require denser investor-facing foliage counts and twenty-three labeled variation actors covering trees, brush, shrubs, dry grass mats, rock slabs, water-bank pieces, reeds, and freshwater surface material variation, then extended the verifier/docs so the map no longer qualifies if the visual dressing falls back to sparse placeholder presentation.
|
||||
- [x] Add a real water-source visual pass with surface material, edge treatment, scale, and placement that reads as collectable freshwater instead of a placeholder plane. Formalized the MVP freshwater presentation around the native `AAgrarianWaterSource` water-surface, stone-bank, and collect-marker proxies, documented the Ground Zero drainage-candidate placement and nearby water-bank/reed dressing, and added an Unreal verifier that checks surface material, edge treatment, scale, placement, and nearby dressing actors in the actual map.
|
||||
- [x] Add density and sightline tuning so grasses, shrubs, trees, and resource clusters are visible enough to sell the world without hiding gameplay-critical objects. Added protected foliage clearances around early survival targets and biome resource nodes, sampled first-look sightline corridors from the player start to wood, fiber, campfire, shelter, wildlife, and freshwater, plus a dedicated Unreal verifier/documentation gate so investor-facing density cannot regress into object-hiding clutter.
|
||||
- [x] Preserve realism as the target: use assets, materials, lighting, and environmental dressing that can survive toward MVP production rather than cosmetic throwaways where practical. Added MVP realism target rules to the shared art/UX/code/asset standards, tied current 0.1.O visual passes to production-directed proxy expectations, and added a verifier that requires Ground Zero materials, water, density/sightline, character, and survival-object docs to point toward production realism instead of cosmetic throwaways.
|
||||
- [x] Define default, recommended, and cinematic investor rendering presets, with ray tracing available only as an optional high-end/cinematic mode and never required for baseline visual credibility. Added `Config/AgrarianRenderingPresets.ini`, `Docs/Rendering/InvestorRenderingPresets.md`, and a verifier that requires Default and Recommended to remain non-ray-traced while Cinematic is the only optional high-end ray-tracing profile.
|
||||
- [x] Verify the non-ray-traced compatibility/default path still looks credible on common investor, tester, and remote-session hardware. Added a dedicated non-ray-traced default verifier that checks Default and Recommended disable `r.RayTracing`, `r.Lumen.HardwareRayTracing`, and `r.PathTracing`, keeps Cinematic as the only optional ray-tracing profile, and documents that packaged investor demos should launch on Default unless another profile is explicitly selected.
|
||||
- [x] Add packaged-demo visual QA screenshots or short clips for startup credits, character selection, first spawn, terrain, vegetation, water, campfire, shelter, pause menu, and save/quit before each investor build is called ready. Added a full investor-demo visual QA evidence runbook, Windows helper, startup capture expansion, and verifier requiring Sunshine/Moonlight or equivalent real-GPU captures for startup credits, character selection, first spawn, terrain, vegetation, water, campfire, shelter, pause, and save/quit before a packaged build is called investor-ready.
|
||||
- [x] Add an investor-demo acceptance gate: no current build should be described as investor visual MVP if menus are confusing, character art is mannequin-only, terrain is flat/tan, foliage is absent or unreadable, or core objects still read as primitive debug shapes. Added an investor-demo acceptance gate document, updated demo status wording, and added verification that hard-fail conditions cover confusing menus, mannequin-only characters, flat/tan terrain, absent/unreadable foliage, unreadable water, primitive debug objects, non-ray-traced default credibility, and missing visual QA evidence.
|
||||
- [ ] Preserve realism as the target: use assets, materials, lighting, and environmental dressing that can survive toward MVP production rather than cosmetic throwaways where practical.
|
||||
- [ ] Define default, recommended, and cinematic investor rendering presets, with ray tracing available only as an optional high-end/cinematic mode and never required for baseline visual credibility.
|
||||
- [ ] Verify the non-ray-traced compatibility/default path still looks credible on common investor, tester, and remote-session hardware.
|
||||
- [ ] Add packaged-demo visual QA screenshots or short clips for startup credits, character selection, first spawn, terrain, vegetation, water, campfire, shelter, pause menu, and save/quit before each investor build is called ready.
|
||||
- [ ] Add an investor-demo acceptance gate: no current build should be described as investor visual MVP if menus are confusing, character art is mannequin-only, terrain is flat/tan, foliage is absent or unreadable, or core objects still read as primitive debug shapes.
|
||||
|
||||
## 0.1.P MVP Audio And Atmosphere
|
||||
|
||||
- [x] Add ambient biome audio. Extended the placed `AAgrarianWeatherAudioController` so its ambient component explicitly owns a Ground Zero coastal-scrub biome loop slot with separate day/night volume targets, keeping the current MVP silent until placeholder or final audio assets are assigned while giving the map a real ambient audio attachment point.
|
||||
- [x] Add footstep placeholders. Added native player-character footstep hooks with assignable walk, sprint, crouch, and prone sound slots plus movement-state cadence, keeping the MVP silent until placeholder or final surface-aware audio assets are assigned.
|
||||
- [x] Add gathering sounds. Added spatialized resource-node gathering audio hooks with assignable normal/depleted gathering cues and a server-authoritative multicast trigger after successful harvests, keeping multiplayer clients aligned while remaining silent until audio assets are assigned.
|
||||
- [x] Add fire sounds. Added campfire loop, ignition, and extinguish audio hooks with spatialized components, replicated lit-state loop control, and server-triggered multicast event cues so fire audio follows the authoritative campfire state once assets are assigned.
|
||||
- [x] Add unattended and poorly maintained fire risk for campfires and other open-flame sources. Added server-side campfire risk state for lit duration, seconds since maintenance, cleared area, containment, high fuel, wet weather mitigation, and a replicated `FireRiskScore` that later ignition/spread systems can consume.
|
||||
- [x] Add grass and forest ignition checks from irresponsible fire placement, wind/weather, dry fuel, nearby vegetation, and burn duration. Added foliage fuel counting, campfire vegetation ignition risk scores, grass/brush and forest ignition flags, and weather/wind/burn-duration modifiers so unsafe fire placement near dry fuel can now become a server-authoritative ignition risk.
|
||||
- [x] Add shelter/structure ignition risk when fires are placed too close to primitive shelters, wood piles, flammable crafting stations, or settlement objects. Added campfire structure ignition risk for nearby primitive shelters and flammable wood/fiber resource nodes, with containment, burn-duration, weather/wind, and fire-risk modifiers before a replicated structure ignition flag is set.
|
||||
- [x] Add server-authoritative fire spread rules for grass, brush, trees, shelters, and other burnable actors, including fuel, distance, wind, weather, and suppression hooks. Added replicated grass, forest, and structure fire intensities plus active spread radius that grow only on the server from nearby fuel, ignition distance, wind/weather, and a suppression-pressure hook for later rain, carried water, dirt/sand, firebreaks, and tools.
|
||||
- [x] Add fire maintenance gameplay so watched, cleared, contained, or extinguished fires are safe, while neglected fires can become dangerous. Updated lit campfire interaction to maintain the fire, added watch, clear-area, and contain-fire hooks, and made maintenance reduce campfire, vegetation, forest, and structure ignition risks while extinguishing resets active risk state.
|
||||
- [x] Add fire suppression hooks for rain, water carrying, dirt/sand, cleared firebreaks, and future firefighting tools. Added shared server-side suppression hooks plus water, dirt/sand, firebreak, and tool wrappers that raise suppression pressure, reduce ignition risks, reduce active fire intensity, shrink spread radius, and let rain/water drain fuel.
|
||||
- [x] Persist active grass, forest, and structure fires across save/load without corrupting world state. Extended campfire persistence coverage for ignition flags, ignition risk scores, active grass/forest/structure fire intensities, spread radius, and suppression pressure so save/load recovery preserves active and partially suppressed fire state.
|
||||
- [x] Add QA coverage for safe campfires, unsafe campfires, vegetation spread, shelter ignition, suppression, and save/load recovery. Added a fire-risk QA coverage document and verifier requiring safe/unsafe campfire, vegetation spread, shelter ignition, suppression, and save/load recovery scenarios plus the supporting fire-risk verification scripts.
|
||||
- [x] Add weather sounds. Formalized the existing placed weather audio controller as the MVP weather-sound path, documenting rain, wind, storm, clear ambient, and biome loop slots plus verification that weather playback follows replicated weather state, provider wind speed, and day/night state while remaining silent until assets are assigned.
|
||||
- [x] Add wildlife sounds. Added spatialized wildlife audio hooks with assignable idle, flee/chase, death, and harvest sound slots plus server-triggered multicast playback from authoritative wildlife state changes and harvest events.
|
||||
- [x] Add UI sounds. Added optional 2D confirm, back, selection, and save/quit sound hooks to the MVP frontend widget, with keyboard and mouse actions sharing the same feedback path while remaining silent until UI audio assets are assigned.
|
||||
- [x] Add mix settings. Added MVP audio mix settings for master, ambient, weather, foley, fire, wildlife, and UI buses with conservative investor-build defaults and documentation for future SoundClass/MetaSound replacement.
|
||||
- [x] Add volume sliders. Added MVP frontend volume sliders for master, ambient, weather, effects, wildlife, and UI levels, with runtime value storage and immediate UI-volume application to frontend feedback sounds while leaving final SoundClass binding for authored audio assets.
|
||||
- [ ] Add ambient biome audio.
|
||||
- [ ] Add footstep placeholders.
|
||||
- [ ] Add gathering sounds.
|
||||
- [ ] Add fire sounds.
|
||||
- [ ] Add unattended and poorly maintained fire risk for campfires and other open-flame sources.
|
||||
- [ ] Add grass and forest ignition checks from irresponsible fire placement, wind/weather, dry fuel, nearby vegetation, and burn duration.
|
||||
- [ ] Add shelter/structure ignition risk when fires are placed too close to primitive shelters, wood piles, flammable crafting stations, or settlement objects.
|
||||
- [ ] Add server-authoritative fire spread rules for grass, brush, trees, shelters, and other burnable actors, including fuel, distance, wind, weather, and suppression hooks.
|
||||
- [ ] Add fire maintenance gameplay so watched, cleared, contained, or extinguished fires are safe, while neglected fires can become dangerous.
|
||||
- [ ] Add fire suppression hooks for rain, water carrying, dirt/sand, cleared firebreaks, and future firefighting tools.
|
||||
- [ ] Persist active grass, forest, and structure fires across save/load without corrupting world state.
|
||||
- [ ] Add QA coverage for safe campfires, unsafe campfires, vegetation spread, shelter ignition, suppression, and save/load recovery.
|
||||
- [ ] Add weather sounds.
|
||||
- [ ] Add wildlife sounds.
|
||||
- [ ] Add UI sounds.
|
||||
- [ ] Add mix settings.
|
||||
- [ ] Add volume sliders.
|
||||
|
||||
## 0.1.Q MVP QA Gates
|
||||
|
||||
- [x] Can launch packaged client. Added an MVP QA gate that requires the Windows package script, packaged executable, installed investor launchers, and the real-GPU visual QA readiness check before the client launch gate qualifies.
|
||||
- [x] Can launch server. Added an MVP QA gate for the Linux gameplay host requiring the true dedicated build path or current binary-engine fallback, deployment to `/opt/agrarian/server`, `agrarian-game-server.service` active state, UDP `7777` listener evidence, and Ground Zero map browse evidence.
|
||||
- [x] Can connect two clients. Added a two-client connection QA gate and Windows helper that checks the packaged client, launches two client instances against the same `play.agrariangame.com:7777` or LAN endpoint, and ties the manual observation steps to the multiplayer latency smoke plan.
|
||||
- [x] Can gather resources. Added a resource gathering QA gate tied to Ground Zero wood/fiber nodes, server-authoritative resource interaction, replicated harvest depletion, inventory grants, resource persistence coverage, and the natural shelter playable-loop smoke test.
|
||||
- [x] Can craft a fire. Added a craft-fire QA gate tied to `DA_Recipe_Campfire`, the player recipe setup, `BP_Campfire`, replicated campfire lit/fuel state, fire interaction prompts, campfire persistence, and fire-risk QA coverage.
|
||||
- [x] Can craft a shelter. Added a craft-shelter QA gate tied to primitive frame/wall/roof/shelter recipes, native build placement, `BP_PrimitiveShelter`, shelter persistence/protection hooks, and the natural shelter playable-loop smoke test.
|
||||
- [x] Can survive one full day/night cycle. Added a full day/night survival QA gate tied to the `4 real hours = 1 in-game day` calendar, replicated world time and solar phase, authoritative hunger/thirst/stamina/body-temperature/health pressure, fire and shelter mitigation, critical survival HUD visibility, and save/load persistence coverage before investor demos treat the gate as play-proven.
|
||||
- [x] Can die from survival pressure. Added a survival-pressure death QA gate requiring starvation, dehydration, cold exposure, sickness, and bleeding to reduce health on server authority, trigger `UpdateDeathState`, replicate `bIsDead` and `LastDeathReason`, show death/respawn UI feedback, support server respawn, and remain covered by player stat persistence.
|
||||
- [x] Can reconnect and retain state. Added a reconnect state-retention QA gate tied to logout/restart player snapshots, safe player identity, transform, survival, care history, inventory restore, normal-spawn fallback behavior, and the two-client manual reconnect evidence path.
|
||||
- [x] Can restart server and retain placed shelter. Added a server-restart shelter persistence QA gate tied to `primitive_shelter` persistent actor state, world actor save/load, game-mode class registration, load-on-server-start behavior, shelter weather protection, and a release smoke requirement to place, save, restart, and confirm the shelter transform remains.
|
||||
- [x] No critical log spam during 30-minute test. Added a 30-minute critical log soak QA gate plus `scan_critical_log_spam.py` so client/server/release logs can be checked for fatal, crash, assertion, ensure, access-violation, callstack, and critical-error spam before a milestone package is treated as investor-stable.
|
||||
- [x] Clean up Unreal API deprecation warnings from packaged builds, starting
|
||||
- [ ] Can launch packaged client.
|
||||
- [ ] Can launch server.
|
||||
- [ ] Can connect two clients.
|
||||
- [ ] Can gather resources.
|
||||
- [ ] Can craft a fire.
|
||||
- [ ] Can craft a shelter.
|
||||
- [ ] Can survive one full day/night cycle.
|
||||
- [ ] Can die from survival pressure.
|
||||
- [ ] Can reconnect and retain state.
|
||||
- [ ] Can restart server and retain placed shelter.
|
||||
- [ ] No critical log spam during 30-minute test.
|
||||
- [ ] Clean up Unreal API deprecation warnings from packaged builds, starting
|
||||
with direct `NetCullDistanceSquared` access on replicated world actors before
|
||||
future Unreal upgrades turn the warning into a compile blocker. Replaced direct
|
||||
`NetCullDistanceSquared = FMath::Square(...)` assignments with
|
||||
`SetNetCullDistanceSquared(FMath::Square(...))` on item pickups, resource
|
||||
nodes, campfires, shelters, wildlife, water sources, weather exposure zones,
|
||||
and wildlife spawn managers, then added verifier coverage to prevent the
|
||||
deprecated assignment style from returning.
|
||||
- [x] Server remains stable with target test player count. Added a target player count server-stability QA gate using the MVP audience definition: 2-player minimum proof, 4-player closed-test smoke target, and 8-player stretch test only after the server path is stable, with evidence tied to server launch, two-client connection, reconnect retention, critical log scanning, active service state, and UDP `7777` listener checks.
|
||||
future Unreal upgrades turn the warning into a compile blocker.
|
||||
- [ ] Server remains stable with target test player count.
|
||||
|
||||
## 0.1.R Knowledge And Skill Foundation
|
||||
|
||||
- [x] Define the MVP separation between knowledge, practical experience, physical stats, tools, and infrastructure. Added `Docs/KnowledgeAndSkillFoundation.md` with a five-part MVP model separating knowledge, practical experience, physical stats, tools, and infrastructure so basic survival remains possible but outcomes improve through understanding, practice, equipment, and durable world improvements.
|
||||
- [x] Add a first-pass skill taxonomy for survival, gathering, tool use, crafting, fire, shelter, navigation, first aid, food safety, and weather awareness. Added the first MVP taxonomy to `Docs/KnowledgeAndSkillFoundation.md`, covering survival, gathering, tool use, crafting, fire, shelter, navigation, first aid, food safety, and weather awareness as non-lockout skill domains that modify risk, quality, speed, yield, readability, and confidence.
|
||||
- [x] Define how knowledge affects survival actions: fewer mistakes, safer attempts, better yields, lower injury risk, and more reliable outcomes. Added the knowledge action-effects model to `Docs/KnowledgeAndSkillFoundation.md`, defining how knowledge changes warnings, failed-action reasons, safety, yield/waste, injury risk, and outcome reliability without silently guaranteeing success or replacing practical experience.
|
||||
- [x] Define how practical experience grows through use, repetition, mistakes, and recovery from failure. Added practical experience growth rules to `Docs/KnowledgeAndSkillFoundation.md`, defining gain from meaningful use, diminishing returns for rote repetition, learning from readable mistakes, and extra credit for recovering well from failure.
|
||||
- [x] Add first contextual learning prompts for fire safety, potable water, exposure, shelter placement, injury care, and resource identification. Added first contextual prompt specs to `Docs/KnowledgeAndSkillFoundation.md` for fire safety, potable water, exposure, shelter placement, injury care, and resource identification, with trigger examples, prompt intent, sample wording, and the rule that prompts explain immediate risk without pausing the game or forcing a quiz.
|
||||
- [x] Design optional knowledge checks that appear when relevant to the action instead of interrupting basic play. Added optional knowledge-check rules to `Docs/KnowledgeAndSkillFoundation.md`, defining inline/skippable presentation, action-relevant timing, calm review moments, non-punitive wrong answers, and the rule that checks deepen understanding without gating the first survival loop.
|
||||
- [x] Add player-facing feedback that explains why an action failed or produced poor results. Added failed-action and poor-result feedback rules to `Docs/KnowledgeAndSkillFoundation.md`, requiring short messages that say what happened, name one likely cause, offer one useful next step, avoid blame, and avoid revealing hidden formulas.
|
||||
- [x] Define accessibility rules for the learning system: hints, retries, readable wording, no hard lockout from basic survival, and non-punitive practice paths. Added learning accessibility rules to `Docs/KnowledgeAndSkillFoundation.md`, covering reusable hints, retries, readable wording, non-color-only warnings, no lockout from basic survival, safer practice paths, and diminishing returns to prevent exploit loops.
|
||||
- [x] Define the first subject content format: topic, concepts, difficulty tier, prerequisite concepts, in-game effect, practice action, and source note. Added a compact subject content schema to `Docs/KnowledgeAndSkillFoundation.md` with `topic`, `concepts`, `difficulty_tier`, `prerequisite_concepts`, `in_game_effect`, `practice_action`, and `source_note`, plus a fire-clearance example suitable for later data assets.
|
||||
- [x] Add a small MVP question bank for elementary survival knowledge. Added six elementary survival question records to `Docs/KnowledgeAndSkillFoundation.md` for fire clearance, potable water, cold exposure, shelter drainage, bleeding care, and fiber identification, each with answer options, correct answer, and practical feedback.
|
||||
- [x] Define when deeper questions should matter: quality improvements, safer work, complex crafting, teaching others, and advanced branches. Added deeper-question timing rules to `Docs/KnowledgeAndSkillFoundation.md`, keeping advanced checks out of the first survival loop while tying them to quality improvements, safer work, complex crafting, teaching others, and advanced branches.
|
||||
- [x] Add design notes for avoiding exploit farming and rote memorization. Added exploit and rote-memorization guardrails to `Docs/KnowledgeAndSkillFoundation.md`, covering diminishing returns, meaningful action context, repeated prompt suppression, recovery-only credit, learned-concept separation, and varied wording to reward decisions and practice instead of low-cost repetition.
|
||||
- [x] Add persistence requirements for knowledge, skill experience, learned concepts, failed attempts, and tutorial state. Added knowledge persistence requirements to `Docs/KnowledgeAndSkillFoundation.md`, defining saved profile IDs, learned concepts, practical skill experience, mastery tiers, failed-attempt feedback history, tutorial/prompt state, question cooldowns, teaching/observation events, schema versioning, server authority, and reset-farming prevention.
|
||||
- [x] Add multiplayer rules for teaching, observation, shared work, and group skill benefits. Added multiplayer learning rules to `Docs/KnowledgeAndSkillFoundation.md`, covering server-validated teaching, bounded learner credit, observation limits, role-specific shared-work experience, capped group benefits, no global skill aura, and network authority checks for distance, visibility, participation, cooldowns, tools, context, and outcome.
|
||||
- [ ] Define the MVP separation between knowledge, practical experience, physical stats, tools, and infrastructure.
|
||||
- [ ] Add a first-pass skill taxonomy for survival, gathering, tool use, crafting, fire, shelter, navigation, first aid, food safety, and weather awareness.
|
||||
- [ ] Define how knowledge affects survival actions: fewer mistakes, safer attempts, better yields, lower injury risk, and more reliable outcomes.
|
||||
- [ ] Define how practical experience grows through use, repetition, mistakes, and recovery from failure.
|
||||
- [ ] Add first contextual learning prompts for fire safety, potable water, exposure, shelter placement, injury care, and resource identification.
|
||||
- [ ] Design optional knowledge checks that appear when relevant to the action instead of interrupting basic play.
|
||||
- [ ] Add player-facing feedback that explains why an action failed or produced poor results.
|
||||
- [ ] Define accessibility rules for the learning system: hints, retries, readable wording, no hard lockout from basic survival, and non-punitive practice paths.
|
||||
- [ ] Define the first subject content format: topic, concepts, difficulty tier, prerequisite concepts, in-game effect, practice action, and source note.
|
||||
- [ ] Add a small MVP question bank for elementary survival knowledge.
|
||||
- [ ] Define when deeper questions should matter: quality improvements, safer work, complex crafting, teaching others, and advanced branches.
|
||||
- [ ] Add design notes for avoiding exploit farming and rote memorization.
|
||||
- [ ] Add persistence requirements for knowledge, skill experience, learned concepts, failed attempts, and tutorial state.
|
||||
- [ ] Add multiplayer rules for teaching, observation, shared work, and group skill benefits.
|
||||
|
||||
## 0.1.S Investor Visual Recovery
|
||||
|
||||
- [x] Prevent broken first-view character/menu presentation before 0.2. Added a dedicated frontend presentation state that hides and freezes the pawn, suppresses gameplay/death HUD overlays, uses a clean temporary menu camera, and restores gameplay camera/input only after the player enters Ground Zero.
|
||||
- [x] Improve MVP character presentation enough for investor builds before final character art. Added practical workwear, backpack, bedroll, and boot proxy layers on top of the selected Manny/Quinn meshes so the current characters read as near-future frontier survivors instead of untouched template dummies.
|
||||
- [x] Raise the Ground Zero first-look vegetation density before 0.2. Expanded the repeatable Ground Zero setup from 64 trees, 148 shrubs, and 260 grass clumps to 96 trees, 220 shrubs, and 420 grass clumps while preserving spawn and sightline reservations.
|
||||
- [x] Add first-look environment dressing near spawn. Added a focused ring of coastal oak, brush, grass mat, and rock variation actors around the safe spawn approach so the first investor camera view reads as a dressed coastal-scrub environment rather than empty tan terrain.
|
||||
- [x] Tighten visual recovery verification. Updated character and Ground Zero environment verifiers so missing workwear proxy layers, lower foliage counts, or missing first-look variation actors fail before an investor build is called ready.
|
||||
|
||||
---
|
||||
|
||||
@@ -898,41 +900,22 @@ Target deliverable: A small group can join a server, spawn into one biome, gathe
|
||||
|
||||
Goal: Transition from temporary survival into lasting settlement and land stewardship.
|
||||
|
||||
Engineering posture for 0.2:
|
||||
|
||||
- Start with durable, server-authoritative systems instead of one-off MVP
|
||||
shortcuts.
|
||||
- Add schema/version fields to every new persistent record.
|
||||
- Prefer data assets for claim, crop, animal, storage, structure, economy, and
|
||||
knowledge definitions.
|
||||
- Keep each new system covered by focused verifiers and grouped milestone
|
||||
checks.
|
||||
- Replace visible placeholders with realistic, production-survivable assets in
|
||||
the same order players encounter them.
|
||||
|
||||
## 0.2.A Land And Claiming
|
||||
|
||||
- [ ] Design land claim philosophy.
|
||||
- [ ] Define claim data schema with claim ID, owner, bounds, tile anchor, permissions, upkeep state, decay state, and schema version.
|
||||
- [ ] Define server-authoritative claim validation rules for placement, overlap, terrain suitability, water/road access, and abuse prevention.
|
||||
- [ ] Define claim size limits.
|
||||
- [ ] Define claim cost or effort.
|
||||
- [ ] Implement claim marker.
|
||||
- [ ] Implement claim ownership.
|
||||
- [ ] Implement claim permissions.
|
||||
- [ ] Add claim debug/admin inspection commands.
|
||||
- [ ] Add claim UI.
|
||||
- [ ] Add claim persistence.
|
||||
- [ ] Add claim save/load/restart verifier.
|
||||
- [ ] Add claim conflict rules.
|
||||
- [ ] Add abandoned claim decay rules.
|
||||
- [ ] Add claim handoff rules for household/family inheritance later.
|
||||
|
||||
## 0.2.B Farming
|
||||
|
||||
- [ ] Design soil model.
|
||||
- [ ] Define crop data asset schema for species, seed item, planting season, soil needs, moisture range, temperature range, growth stages, harvest products, failure risks, and knowledge hooks.
|
||||
- [ ] Define tile biome/climate inputs that farming reads from rainfall, temperature, season, elevation, soil, and drainage metadata.
|
||||
- [ ] Add basic soil quality.
|
||||
- [ ] Add moisture.
|
||||
- [ ] Add crop data assets.
|
||||
@@ -948,14 +931,10 @@ Engineering posture for 0.2:
|
||||
- [ ] Add seed selection and plant breeding foundation concepts.
|
||||
- [ ] Add crop disease, pest pressure, and weed management knowledge hooks.
|
||||
- [ ] Add weather and seasonal planning effects on planting and yield reliability.
|
||||
- [ ] Add first crop visual states that read as believable seedlings, growing plants, mature crops, and failed crops.
|
||||
- [ ] Add crop save/load/restart verifier.
|
||||
|
||||
## 0.2.C Domestication
|
||||
|
||||
- [ ] Choose first domestic animal.
|
||||
- [ ] Define animal data asset schema for species, temperament, diet, water needs, shelter needs, products, reproduction window, disease risks, and knowledge hooks.
|
||||
- [ ] Define containment and ownership records before adding breeding.
|
||||
- [ ] Add taming concept.
|
||||
- [ ] Add feeding.
|
||||
- [ ] Add containment.
|
||||
@@ -967,12 +946,9 @@ Engineering posture for 0.2:
|
||||
- [ ] Add animal handling knowledge for approach, containment, stress, feeding, hydration, shelter, and humane care.
|
||||
- [ ] Add livestock reproduction knowledge for breeding windows, gestation, offspring care, genetic traits, and recordkeeping.
|
||||
- [ ] Add animal disease, sanitation, quarantine, parasite, and nutrition knowledge hooks.
|
||||
- [ ] Add first believable domestic animal visual proxy or asset so animal systems are not represented by generic shapes.
|
||||
- [ ] Add animal save/load/restart verifier.
|
||||
|
||||
## 0.2.D Storage And Preservation
|
||||
|
||||
- [ ] Define storage data schema for container ID, owner/claim, slots, weight/volume limits, permissions, spoilage environment, and schema version.
|
||||
- [ ] Add storage containers.
|
||||
- [ ] Add container permissions.
|
||||
- [ ] Add spoilage timer.
|
||||
@@ -982,12 +958,9 @@ Engineering posture for 0.2:
|
||||
- [ ] Add storage UI.
|
||||
- [ ] Add food preservation knowledge for drying, smoking, salting, fermenting, canning later, cold storage, spoilage, pests, and contamination risk.
|
||||
- [ ] Add material storage knowledge for moisture, rot, rust, pests, fire risk, and inventory rotation.
|
||||
- [ ] Add storage save/load/restart verifier.
|
||||
- [ ] Add storage visual differentiation for baskets, crates, racks, caches, and protected containers.
|
||||
|
||||
## 0.2.E Permanent Structures
|
||||
|
||||
- [ ] Define structure piece data asset schema for material, footprint, snap points, structural role, health, weather protection, fire risk, repair cost, and decay rules.
|
||||
- [ ] Expand building pieces.
|
||||
- [ ] Add foundation.
|
||||
- [ ] Add walls.
|
||||
@@ -999,12 +972,9 @@ Engineering posture for 0.2:
|
||||
- [ ] Add decay rules.
|
||||
- [ ] Add permissions.
|
||||
- [ ] Add persistence optimizations.
|
||||
- [ ] Replace primitive shelter proxy pieces with more believable material-driven meshes.
|
||||
- [ ] Add structure save/load/restart and damage/repair verifier.
|
||||
|
||||
## 0.2.F Simple Economy
|
||||
|
||||
- [ ] Define transaction record schema with participants, claim/settlement context, offered items, accepted items, timestamp, and audit ID.
|
||||
- [ ] Add barter container.
|
||||
- [ ] Add simple trade UI.
|
||||
- [ ] Add ownership transfer.
|
||||
@@ -1013,18 +983,15 @@ Engineering posture for 0.2:
|
||||
- [ ] Add transaction logging.
|
||||
- [ ] Add early business knowledge for bookkeeping, inventory, profit/loss, fair trade, basic credit, risk, and customer trust.
|
||||
- [ ] Add simple workshop/business ownership rules for homestead-scale production.
|
||||
- [ ] Add anti-duplication and rollback rules for multiplayer trade.
|
||||
|
||||
## 0.2.G Homesteading Knowledge Progression
|
||||
|
||||
- [ ] Convert the 0.1.R knowledge foundation into first data records for homesteading topics.
|
||||
- [ ] Define early profession paths: farmer, herder, carpenter, mason, cook, medic, hunter, fisher, trapper, trader, and scout.
|
||||
- [ ] Add learning-by-doing bonuses for routine homestead work without letting repetition replace core understanding.
|
||||
- [ ] Add simple manuals, oral tips, and settlement notes as discoverable teaching objects.
|
||||
- [ ] Add household teaching rules for passing practical knowledge to family or trusted settlement members.
|
||||
- [ ] Define how poor knowledge creates believable outcomes: spoiled food, sick animals, failed crops, weak structures, wasted materials, and avoidable injury.
|
||||
- [ ] Define how good knowledge improves resilience without making nature instant or effortless.
|
||||
- [ ] Add grouped verifier coverage for knowledge topics, prerequisites, practice actions, and persistence readiness.
|
||||
|
||||
## 0.2.H Household Task And Helper Foundations
|
||||
|
||||
@@ -1035,25 +1002,6 @@ Engineering posture for 0.2:
|
||||
- [ ] Add simple helper work reports so players can see what was gathered, consumed, protected, repaired, or failed while they were away.
|
||||
- [ ] Add guardrails so helpers cannot create resources from nothing, bypass crafting costs, ignore carry limits, or operate outside reachable storage and terrain.
|
||||
|
||||
## 0.2.I 0.1 Hardening And Technical Debt
|
||||
|
||||
- [ ] Split `AgrarianEditorAutomationLibrary.cpp` into focused automation helpers for gameplay loop, persistence, terrain import, visual QA, and setup tasks.
|
||||
- [ ] Create a grouped verifier runner for milestone categories instead of relying on many one-off script calls.
|
||||
- [ ] Move Ground Zero, startup, map, and automation constants toward data assets, config, or tile metadata.
|
||||
- [ ] Separate admin/dev console command authority and audit paths from normal player controller gameplay paths.
|
||||
- [ ] Add deprecation warnings for remaining MVP placeholder/proxy systems that must be replaced before public testing.
|
||||
- [ ] Add a coding standards checklist for replication, persistence, save schema changes, data assets, and visual placeholder removal.
|
||||
|
||||
## 0.2.J Homesteading Visual And Biome Realism Pass
|
||||
|
||||
- [ ] Replace tan/flat terrain presentation with realistic coastal scrub terrain materials driven by tile metadata.
|
||||
- [ ] Add first production-survivable grass, shrub, brush, and tree assets for Ground Zero.
|
||||
- [ ] Add foliage density and sightline rules that match real-world biome expectations without hiding gameplay readability.
|
||||
- [ ] Replace highest-impact primitive resource shapes with recognizable wood, stone, fiber, edible plant, and water visuals.
|
||||
- [ ] Improve character presentation beyond mannequin/proxy while keeping male/female selection stable.
|
||||
- [ ] Add optional cinematic rendering tier validation while preserving a credible non-ray-traced default.
|
||||
- [ ] Add investor visual QA screenshots for terrain, foliage, water, character, fire, shelter, and wildlife.
|
||||
|
||||
---
|
||||
|
||||
# Version 0.3 - Social Civilization Systems
|
||||
@@ -1409,29 +1357,16 @@ Goal: Expand from a small test world toward a huge, regionally diverse, persiste
|
||||
|
||||
## 0.7.B Biome Diversity
|
||||
|
||||
- [ ] Define a layered real-world biome architecture instead of a simplified school-model biome list.
|
||||
- [ ] Define the biome data contract for each 1 km tile: macro biome weights, regional ecological region, local sub-biome blend, confidence score, source datasets, generation version, and manual override fields.
|
||||
- [ ] Define core climate bands that drive temperature, daylight, seasonality, and weather behavior: polar, subpolar, boreal, cool temperate, warm temperate, subtropical, tropical, and highland/alpine.
|
||||
- [ ] Define roughly 15-25 macro biome families as the maintainable top-level simulation vocabulary.
|
||||
- [ ] Define roughly 60-120 regional biome variants so recognizable places such as the Pacific Northwest, Siberia, Patagonia, the Great Plains, Mongolian Steppe, Scottish Highlands, Amazon Basin, and Mediterranean coasts can emerge without one-off labels.
|
||||
- [ ] Define procedural local sub-biome blending so tiles can carry weighted mixtures such as prairie, riparian woodland, marsh, rocky slope, or scrub edge instead of hard biome borders.
|
||||
- [ ] Derive biome weights from latitude, elevation, rainfall, prevailing wind, ocean proximity, ocean currents, soil type, drainage, seasonal temperature swing, rain shadow effects, and river/wetland systems.
|
||||
- [ ] Add biome inference rules for real Earth patterns: subtropical west-coast Mediterranean climates, humid east coasts, interior continental steppe/prairie, leeward mountain deserts, equatorial alpine tundra, river-valley fertility, and coastal/marine moderation.
|
||||
- [ ] Add forest biome variants: tropical rainforest, tropical seasonal forest, temperate deciduous forest, temperate rainforest, boreal conifer forest, cloud forest, and mangrove forest.
|
||||
- [ ] Add grassland biome variants: savanna, prairie, steppe, pampas, and alpine meadow.
|
||||
- [ ] Add dryland biome variants: hot desert, cold desert, semi-arid scrubland, Mediterranean shrubland, and badlands.
|
||||
- [ ] Add cold-region biome variants: arctic tundra, alpine tundra, ice sheet, and glacier.
|
||||
- [ ] Add wet-system biome variants: swamp, marsh, fen/bog, river delta, and floodplain.
|
||||
- [ ] Add aquatic and coastal biome variants: freshwater river, freshwater lake, estuary, rocky coast, sandy coast, coral reef, and kelp forest.
|
||||
- [ ] Add a climate-engine layer that produces the environmental variables biome generation consumes.
|
||||
- [ ] Add a biome-generator layer that assigns weighted biome and regional-variant outputs to each tile.
|
||||
- [ ] Add an ecology layer that converts biome weights into plausible plants, animals, diseases, soil fertility, water access, fuel availability, and building-material availability.
|
||||
- [ ] Add a human-use layer that converts biome/ecology outputs into crop viability, settlement density, trade value, culture pressure, transportation difficulty, warfare strategy, and long-term economic specialization.
|
||||
- [ ] Make crop viability, animal species, disease pressure, water access, building materials, fuel availability, trade economics, settlement density, cultural evolution, transportation difficulty, and warfare strategy consume the same biome/ecology tile metadata instead of separate hand-authored rules.
|
||||
- [ ] Map natural resources to likely real-world geology, flora, water, climate, soil, and land-cover data.
|
||||
- [ ] Add biome-specific survival pressure for exposure, thirst, food reliability, fire risk, disease risk, travel friction, shelter material scarcity, and visibility.
|
||||
- [ ] Add biome plausibility QA checks that reject tiles whose climate, vegetation, water, soil, and resource placement contradict the represented real-world location.
|
||||
- [ ] Keep Ground Zero as an early coastal-scrub proof tile, but require future generated tiles to move toward this layered biome contract as the Earth-scale pipeline matures.
|
||||
- [ ] Derive biome candidates from real-world land-cover, climate, elevation, and water data.
|
||||
- [ ] Add forest biome.
|
||||
- [ ] Add plains biome.
|
||||
- [ ] Add mountain biome.
|
||||
- [ ] Add wetland biome.
|
||||
- [ ] Add desert/dryland biome.
|
||||
- [ ] Add cold biome.
|
||||
- [ ] Add biome-specific resources.
|
||||
- [ ] Map natural resources to likely real-world geology, flora, water, and climate.
|
||||
- [ ] Add biome-specific survival pressure.
|
||||
|
||||
## 0.7.C Logistics And Transportation
|
||||
|
||||
|
||||
Binary file not shown.
@@ -1,39 +1,25 @@
|
||||
# MVP Character Proxies
|
||||
|
||||
The 0.1.O investor visual pass introduces first playable character proxies for
|
||||
the startup character selection flow. These are not final production humans;
|
||||
they are practical, human-scale stand-ins that remove the single default dummy
|
||||
presentation while the final realistic character art pipeline is still pending.
|
||||
The current investor build uses MVP character proxies, not final production humans.
|
||||
|
||||
## Current Proxies
|
||||
Selection currently supports:
|
||||
|
||||
- Young adult male:
|
||||
`/Game/Characters/Mannequins/Meshes/SKM_Manny_Simple`
|
||||
- Young adult female:
|
||||
`/Game/Characters/Mannequins/Meshes/SKM_Quinn_Simple`
|
||||
- Male workwear material:
|
||||
`/Game/Agrarian/Characters/Materials/M_AGR_CharacterProxy_Workwear_Male`
|
||||
- Female workwear material:
|
||||
`/Game/Agrarian/Characters/Materials/M_AGR_CharacterProxy_Workwear_Female`
|
||||
- `SKM_Manny_Simple` as the young adult male base.
|
||||
- `SKM_Quinn_Simple` as the young adult female base.
|
||||
|
||||
The materials use muted earth-tone workwear colors so the character reads as an
|
||||
Agrarian survivor/pioneer proxy instead of an untouched template dummy.
|
||||
Agrarian applies project-owned workwear materials and runtime presentation
|
||||
layers for torso clothing, backpack, bedroll, and boots. These layers are meant
|
||||
to move the build away from untouched Unreal template dummies while still
|
||||
remaining honest prototype art.
|
||||
|
||||
## Runtime Flow
|
||||
Visual direction:
|
||||
|
||||
The MVP frontend stores the selected young-adult archetype. When the loading
|
||||
segment closes, it issues `AgrarianSelectCharacter male` or
|
||||
`AgrarianSelectCharacter female`. The player controller records the selected
|
||||
proxy and applies the matching mesh/material to the possessed Agrarian player
|
||||
character.
|
||||
- realistic near-future frontier survival;
|
||||
- practical modern workwear;
|
||||
- post-collapse scarcity without apocalypse-warrior exaggeration;
|
||||
- settlement-builder tone;
|
||||
- a few archetypes that can later respond to age, health, injury, nutrition,
|
||||
and long-term physical condition.
|
||||
|
||||
The character asset folder is always cooked for investor builds so both proxy
|
||||
materials remain available in packaged clients.
|
||||
|
||||
## Replacement Path
|
||||
|
||||
Final character work should replace these proxies with grounded realistic human
|
||||
assets, production clothing, age/condition variation, and replication/persistence
|
||||
of visual state. The current C++ selection path is intentionally simple so final
|
||||
assets can slot into the same male/female archetype switch without reworking the
|
||||
menu flow.
|
||||
Final character work should replace these proxies with original or properly
|
||||
licensed free character bases before public testing.
|
||||
|
||||
@@ -551,6 +551,78 @@ ENVIRONMENT_VARIATION_ACTORS = [
|
||||
"scale": unreal.Vector(0.07, 0.07, 1.15),
|
||||
"rotation": unreal.Rotator(0.0, -19.0, 0.0),
|
||||
},
|
||||
{
|
||||
"label": "AGR_GZ_EnvVar_FirstLook_OakCanopy_01",
|
||||
"mesh_key": "chamfer_cube",
|
||||
"material_key": "tree",
|
||||
"location_xy": unreal.Vector(-26200.0, -7200.0, 0.0),
|
||||
"z_offset": 410.0,
|
||||
"scale": unreal.Vector(2.2, 2.6, 1.55),
|
||||
"rotation": unreal.Rotator(0.0, 24.0, 0.0),
|
||||
},
|
||||
{
|
||||
"label": "AGR_GZ_EnvVar_FirstLook_OakTrunk_01",
|
||||
"mesh_key": "cylinder",
|
||||
"material_key": "wood_resource",
|
||||
"location_xy": unreal.Vector(-26200.0, -7200.0, 0.0),
|
||||
"z_offset": 180.0,
|
||||
"scale": unreal.Vector(0.28, 0.28, 3.7),
|
||||
"rotation": unreal.Rotator(0.0, 24.0, 0.0),
|
||||
},
|
||||
{
|
||||
"label": "AGR_GZ_EnvVar_FirstLook_Brush_01",
|
||||
"mesh_key": "chamfer_cube",
|
||||
"material_key": "shrub",
|
||||
"location_xy": unreal.Vector(-19100.0, -8350.0, 0.0),
|
||||
"z_offset": 72.0,
|
||||
"scale": unreal.Vector(1.65, 1.25, 0.68),
|
||||
"rotation": unreal.Rotator(0.0, -14.0, 0.0),
|
||||
},
|
||||
{
|
||||
"label": "AGR_GZ_EnvVar_FirstLook_Brush_02",
|
||||
"mesh_key": "chamfer_cube",
|
||||
"material_key": "shrub",
|
||||
"location_xy": unreal.Vector(-23900.0, 1300.0, 0.0),
|
||||
"z_offset": 76.0,
|
||||
"scale": unreal.Vector(1.25, 1.95, 0.72),
|
||||
"rotation": unreal.Rotator(0.0, 39.0, 0.0),
|
||||
},
|
||||
{
|
||||
"label": "AGR_GZ_EnvVar_FirstLook_GrassMat_01",
|
||||
"mesh_key": "plane",
|
||||
"material_key": "grass",
|
||||
"location_xy": unreal.Vector(-20500.0, -6400.0, 0.0),
|
||||
"z_offset": 15.0,
|
||||
"scale": unreal.Vector(3.8, 2.4, 1.0),
|
||||
"rotation": unreal.Rotator(0.0, 18.0, 0.0),
|
||||
},
|
||||
{
|
||||
"label": "AGR_GZ_EnvVar_FirstLook_GrassMat_02",
|
||||
"mesh_key": "plane",
|
||||
"material_key": "grass",
|
||||
"location_xy": unreal.Vector(-24200.0, -1800.0, 0.0),
|
||||
"z_offset": 15.0,
|
||||
"scale": unreal.Vector(2.9, 3.7, 1.0),
|
||||
"rotation": unreal.Rotator(0.0, -31.0, 0.0),
|
||||
},
|
||||
{
|
||||
"label": "AGR_GZ_EnvVar_FirstLook_Rock_01",
|
||||
"mesh_key": "quarter_cylinder",
|
||||
"material_key": "stone_resource",
|
||||
"location_xy": unreal.Vector(-18400.0, -2400.0, 0.0),
|
||||
"z_offset": 45.0,
|
||||
"scale": unreal.Vector(1.15, 1.55, 0.52),
|
||||
"rotation": unreal.Rotator(0.0, 66.0, 0.0),
|
||||
},
|
||||
{
|
||||
"label": "AGR_GZ_EnvVar_FirstLook_Rock_02",
|
||||
"mesh_key": "chamfer_cube",
|
||||
"material_key": "stone_resource",
|
||||
"location_xy": unreal.Vector(-27900.0, -3600.0, 0.0),
|
||||
"z_offset": 42.0,
|
||||
"scale": unreal.Vector(0.98, 0.82, 0.36),
|
||||
"rotation": unreal.Rotator(0.0, -52.0, 0.0),
|
||||
},
|
||||
]
|
||||
|
||||
RUIN_PLACEHOLDER_ACTORS = [
|
||||
@@ -604,7 +676,7 @@ RUIN_PLACEHOLDER_ACTORS = [
|
||||
|
||||
FOLIAGE_ZONES = {
|
||||
"trees": {
|
||||
"count": 64,
|
||||
"count": 96,
|
||||
"x_range": (-25000.0, 42000.0),
|
||||
"y_range": (-12000.0, 42000.0),
|
||||
"min_elevation_m": 18.0,
|
||||
@@ -612,7 +684,7 @@ FOLIAGE_ZONES = {
|
||||
"scale_range": (0.75, 1.35),
|
||||
},
|
||||
"shrubs": {
|
||||
"count": 148,
|
||||
"count": 220,
|
||||
"x_range": (-42000.0, 45000.0),
|
||||
"y_range": (-38000.0, 45000.0),
|
||||
"min_elevation_m": 7.0,
|
||||
@@ -620,7 +692,7 @@ FOLIAGE_ZONES = {
|
||||
"scale_range": (0.45, 1.05),
|
||||
},
|
||||
"grass": {
|
||||
"count": 260,
|
||||
"count": 420,
|
||||
"x_range": (-46000.0, 46000.0),
|
||||
"y_range": (-46000.0, 46000.0),
|
||||
"min_elevation_m": 4.0,
|
||||
|
||||
@@ -15,9 +15,9 @@ MATERIALS = {
|
||||
"fresh_water": "/Game/Agrarian/Materials/M_AGR_GZ_FreshWater",
|
||||
}
|
||||
EXPECTED_FOLIAGE_COUNTS = {
|
||||
"trees": 64,
|
||||
"shrubs": 148,
|
||||
"grass": 260,
|
||||
"trees": 96,
|
||||
"shrubs": 220,
|
||||
"grass": 420,
|
||||
}
|
||||
RESOURCE_MATERIALS = {
|
||||
"AGR_GZ_Wood": "wood_resource",
|
||||
@@ -29,8 +29,13 @@ RESOURCE_MATERIALS = {
|
||||
"AGR_GZ_FreshWaterSource": "fresh_water",
|
||||
}
|
||||
VARIATION_PREFIX = "AGR_GZ_EnvVar_"
|
||||
EXPECTED_VARIATION_COUNT = 23
|
||||
EXPECTED_VARIATION_COUNT = 31
|
||||
EXPECTED_VARIATION_MATERIALS = {
|
||||
"AGR_GZ_EnvVar_FirstLook_OakCanopy": "tree",
|
||||
"AGR_GZ_EnvVar_FirstLook_OakTrunk": "wood_resource",
|
||||
"AGR_GZ_EnvVar_FirstLook_Brush": "shrub",
|
||||
"AGR_GZ_EnvVar_FirstLook_GrassMat": "grass",
|
||||
"AGR_GZ_EnvVar_FirstLook_Rock": "stone_resource",
|
||||
"AGR_GZ_EnvVar_Tree_Canopy": "tree",
|
||||
"AGR_GZ_EnvVar_Tree_Trunk": "wood_resource",
|
||||
"AGR_GZ_EnvVar_Bush": "shrub",
|
||||
|
||||
@@ -12,8 +12,6 @@ CONFIG = ROOT / "Config" / "DefaultGame.ini"
|
||||
DOC = ROOT / "Docs" / "Characters" / "MvpCharacterProxies.md"
|
||||
SETUP = ROOT / "Scripts" / "setup_mvp_character_proxies.py"
|
||||
ROADMAP = ROOT / "AGRARIAN_DEVELOPMENT_ROADMAP.md"
|
||||
MALE_MATERIAL = ROOT / "Content" / "Agrarian" / "Characters" / "Materials" / "M_AGR_CharacterProxy_Workwear_Male.uasset"
|
||||
FEMALE_MATERIAL = ROOT / "Content" / "Agrarian" / "Characters" / "Materials" / "M_AGR_CharacterProxy_Workwear_Female.uasset"
|
||||
|
||||
|
||||
def require(condition: bool, message: str) -> None:
|
||||
@@ -43,6 +41,11 @@ def main() -> None:
|
||||
"M_AGR_CharacterProxy_Workwear_Female",
|
||||
"SetSkeletalMesh",
|
||||
"SetMaterial",
|
||||
"MvpWorkwearTorsoProxy",
|
||||
"MvpWorkwearBackpackProxy",
|
||||
"MvpWorkwearBedrollProxy",
|
||||
"MvpWorkwearBootsProxy",
|
||||
"EnsureMvpPresentationComponent",
|
||||
"SelectedMvpCharacterProxyId = TEXT(\"male\")",
|
||||
"SelectedMvpCharacterProxyId = TEXT(\"female\")",
|
||||
"ApplyMvpCharacterProxyToPawn();",
|
||||
@@ -82,8 +85,6 @@ def main() -> None:
|
||||
"- [x] Add first realistic playable character proxies for the selected young adult male and female archetypes" in roadmap,
|
||||
"0.1.O character proxy roadmap item is not checked off",
|
||||
)
|
||||
require(MALE_MATERIAL.exists(), "male character proxy material asset is missing")
|
||||
require(FEMALE_MATERIAL.exists(), "female character proxy material asset is missing")
|
||||
|
||||
print("OK: MVP male/female playable character proxy flow is wired and documented.")
|
||||
|
||||
|
||||
@@ -12,10 +12,13 @@
|
||||
#include "AgrarianPersistenceSubsystem.h"
|
||||
#include "AgrarianShelterActor.h"
|
||||
#include "AgrarianSurvivalComponent.h"
|
||||
#include "Camera/CameraActor.h"
|
||||
#include "Components/SkeletalMeshComponent.h"
|
||||
#include "Components/StaticMeshComponent.h"
|
||||
#include "EnhancedInputSubsystems.h"
|
||||
#include "Engine/LocalPlayer.h"
|
||||
#include "Engine/SkeletalMesh.h"
|
||||
#include "Engine/StaticMesh.h"
|
||||
#include "GameFramework/Character.h"
|
||||
#include "GameFramework/CharacterMovementComponent.h"
|
||||
#include "InputCoreTypes.h"
|
||||
@@ -92,6 +95,58 @@ namespace
|
||||
? TEXT("/Game/Agrarian/Characters/Materials/M_AGR_CharacterProxy_Workwear_Female.M_AGR_CharacterProxy_Workwear_Female")
|
||||
: TEXT("/Game/Agrarian/Characters/Materials/M_AGR_CharacterProxy_Workwear_Male.M_AGR_CharacterProxy_Workwear_Male");
|
||||
}
|
||||
|
||||
UStaticMeshComponent* EnsureMvpPresentationComponent(
|
||||
AAgrarianGameCharacter* Character,
|
||||
const FName ComponentName,
|
||||
UStaticMesh* Mesh,
|
||||
UMaterialInterface* Material,
|
||||
const FVector& RelativeLocation,
|
||||
const FRotator& RelativeRotation,
|
||||
const FVector& RelativeScale)
|
||||
{
|
||||
if (!Character || !Mesh)
|
||||
{
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
UStaticMeshComponent* Component = nullptr;
|
||||
TArray<UStaticMeshComponent*> ExistingComponents;
|
||||
Character->GetComponents<UStaticMeshComponent>(ExistingComponents);
|
||||
for (UStaticMeshComponent* ExistingComponent : ExistingComponents)
|
||||
{
|
||||
if (ExistingComponent && ExistingComponent->GetFName() == ComponentName)
|
||||
{
|
||||
Component = ExistingComponent;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (!Component)
|
||||
{
|
||||
Component = NewObject<UStaticMeshComponent>(Character, ComponentName);
|
||||
if (!Component)
|
||||
{
|
||||
return nullptr;
|
||||
}
|
||||
Component->SetupAttachment(Character->GetRootComponent());
|
||||
Component->RegisterComponent();
|
||||
Character->AddInstanceComponent(Component);
|
||||
}
|
||||
|
||||
Component->SetStaticMesh(Mesh);
|
||||
if (Material)
|
||||
{
|
||||
Component->SetMaterial(0, Material);
|
||||
}
|
||||
Component->SetCollisionEnabled(ECollisionEnabled::NoCollision);
|
||||
Component->SetGenerateOverlapEvents(false);
|
||||
Component->SetRelativeLocation(RelativeLocation);
|
||||
Component->SetRelativeRotation(RelativeRotation);
|
||||
Component->SetRelativeScale3D(RelativeScale);
|
||||
Component->SetHiddenInGame(false);
|
||||
return Component;
|
||||
}
|
||||
}
|
||||
|
||||
void AAgrarianGamePlayerController::BeginPlay()
|
||||
@@ -102,8 +157,7 @@ void AAgrarianGamePlayerController::BeginPlay()
|
||||
{
|
||||
if (MvpFrontendStartupDelaySeconds > 0.0f)
|
||||
{
|
||||
SetIgnoreMoveInput(true);
|
||||
SetIgnoreLookInput(true);
|
||||
SetMvpFrontendPresentationActive(true);
|
||||
SetInputMode(FInputModeUIOnly());
|
||||
bShowMouseCursor = false;
|
||||
GetWorldTimerManager().SetTimer(
|
||||
@@ -139,6 +193,22 @@ void AAgrarianGamePlayerController::BeginPlay()
|
||||
}
|
||||
}
|
||||
|
||||
void AAgrarianGamePlayerController::AcknowledgePossession(APawn* P)
|
||||
{
|
||||
Super::AcknowledgePossession(P);
|
||||
|
||||
if (!IsLocalPlayerController())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
ApplyMvpCharacterProxyToPawn();
|
||||
if (bMvpFrontendPresentationActive)
|
||||
{
|
||||
SetMvpFrontendPresentationActive(true);
|
||||
}
|
||||
}
|
||||
|
||||
void AAgrarianGamePlayerController::SetupInputComponent()
|
||||
{
|
||||
Super::SetupInputComponent();
|
||||
@@ -204,6 +274,7 @@ void AAgrarianGamePlayerController::ShowMvpFrontend()
|
||||
{
|
||||
MvpFrontendWidget->AddToPlayerScreen(10);
|
||||
}
|
||||
SetMvpFrontendPresentationActive(true);
|
||||
SetInputMode(FInputModeUIOnly().SetWidgetToFocus(MvpFrontendWidget->TakeWidget()).SetLockMouseToViewportBehavior(EMouseLockMode::DoNotLock));
|
||||
bShowMouseCursor = true;
|
||||
SetIgnoreMoveInput(true);
|
||||
@@ -241,6 +312,7 @@ void AAgrarianGamePlayerController::ShowMvpPauseMenu()
|
||||
}
|
||||
|
||||
MvpFrontendWidget->SetActiveScreen(EAgrarianMvpFrontendScreen::MainMenu);
|
||||
SetMvpFrontendPresentationActive(true);
|
||||
SetInputMode(FInputModeUIOnly().SetWidgetToFocus(MvpFrontendWidget->TakeWidget()).SetLockMouseToViewportBehavior(EMouseLockMode::DoNotLock));
|
||||
bShowMouseCursor = true;
|
||||
SetIgnoreMoveInput(true);
|
||||
@@ -275,6 +347,132 @@ void AAgrarianGamePlayerController::HandleMvpEscapeInput()
|
||||
ShowMvpPauseMenu();
|
||||
}
|
||||
|
||||
void AAgrarianGamePlayerController::SetMvpFrontendPresentationActive(bool bNewActive)
|
||||
{
|
||||
bMvpFrontendPresentationActive = bNewActive;
|
||||
|
||||
SetIgnoreMoveInput(bNewActive);
|
||||
SetIgnoreLookInput(bNewActive);
|
||||
|
||||
APawn* ControlledPawn = GetPawn();
|
||||
if (ControlledPawn)
|
||||
{
|
||||
ControlledPawn->SetActorHiddenInGame(bNewActive);
|
||||
ControlledPawn->SetActorEnableCollision(!bNewActive);
|
||||
|
||||
if (ACharacter* ControlledCharacter = Cast<ACharacter>(ControlledPawn))
|
||||
{
|
||||
if (UCharacterMovementComponent* MovementComponent = ControlledCharacter->GetCharacterMovement())
|
||||
{
|
||||
if (bNewActive)
|
||||
{
|
||||
MovementComponent->DisableMovement();
|
||||
}
|
||||
else
|
||||
{
|
||||
MovementComponent->SetMovementMode(MOVE_Walking);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
CacheAndApplyMvpHudSuppression(bNewActive);
|
||||
|
||||
if (bNewActive)
|
||||
{
|
||||
CreateOrUpdateMvpFrontendCamera();
|
||||
if (MvpFrontendCameraActor)
|
||||
{
|
||||
SetViewTarget(MvpFrontendCameraActor);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
if (ControlledPawn)
|
||||
{
|
||||
SetViewTarget(ControlledPawn);
|
||||
}
|
||||
}
|
||||
|
||||
void AAgrarianGamePlayerController::CreateOrUpdateMvpFrontendCamera()
|
||||
{
|
||||
UWorld* World = GetWorld();
|
||||
if (!World)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
const APawn* ControlledPawn = GetPawn();
|
||||
const FVector TargetLocation = ControlledPawn
|
||||
? ControlledPawn->GetActorLocation() + FVector(0.0f, 0.0f, 95.0f)
|
||||
: GroundZeroDeveloperTravelHomeLocation;
|
||||
const FVector CameraLocation = TargetLocation + FVector(-620.0f, -520.0f, 260.0f);
|
||||
const FRotator CameraRotation = (TargetLocation - CameraLocation).Rotation();
|
||||
|
||||
if (!MvpFrontendCameraActor)
|
||||
{
|
||||
FActorSpawnParameters SpawnParameters;
|
||||
SpawnParameters.Owner = this;
|
||||
SpawnParameters.SpawnCollisionHandlingOverride = ESpawnActorCollisionHandlingMethod::AlwaysSpawn;
|
||||
MvpFrontendCameraActor = World->SpawnActor<ACameraActor>(ACameraActor::StaticClass(), CameraLocation, CameraRotation, SpawnParameters);
|
||||
if (MvpFrontendCameraActor)
|
||||
{
|
||||
MvpFrontendCameraActor->SetActorHiddenInGame(true);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
MvpFrontendCameraActor->SetActorLocationAndRotation(CameraLocation, CameraRotation);
|
||||
}
|
||||
|
||||
void AAgrarianGamePlayerController::CacheAndApplyMvpHudSuppression(bool bSuppress)
|
||||
{
|
||||
AAgrarianDebugHUD* AgrarianHUD = GetHUD<AAgrarianDebugHUD>();
|
||||
if (!AgrarianHUD)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (bSuppress)
|
||||
{
|
||||
if (!bCachedMvpHudState)
|
||||
{
|
||||
bCachedShowDebugHUD = AgrarianHUD->bShowDebugHUD;
|
||||
bCachedShowMvpHudFrame = AgrarianHUD->bShowMvpHudFrame;
|
||||
bCachedShowCriticalStatsHUD = AgrarianHUD->bShowCriticalStatsHUD;
|
||||
bCachedShowInventoryHUD = AgrarianHUD->bShowInventoryHUD;
|
||||
bCachedShowCraftingHUD = AgrarianHUD->bShowCraftingHUD;
|
||||
bCachedShowInteractionPrompt = AgrarianHUD->bShowInteractionPrompt;
|
||||
bCachedShowDeathRespawnUI = AgrarianHUD->bShowDeathRespawnUI;
|
||||
bCachedShowDebugDevMenu = AgrarianHUD->bShowDebugDevMenu;
|
||||
bCachedMvpHudState = true;
|
||||
}
|
||||
|
||||
AgrarianHUD->bShowDebugHUD = false;
|
||||
AgrarianHUD->bShowMvpHudFrame = false;
|
||||
AgrarianHUD->bShowCriticalStatsHUD = false;
|
||||
AgrarianHUD->bShowInventoryHUD = false;
|
||||
AgrarianHUD->bShowCraftingHUD = false;
|
||||
AgrarianHUD->bShowInteractionPrompt = false;
|
||||
AgrarianHUD->bShowDeathRespawnUI = false;
|
||||
AgrarianHUD->bShowDebugDevMenu = false;
|
||||
return;
|
||||
}
|
||||
|
||||
if (bCachedMvpHudState)
|
||||
{
|
||||
AgrarianHUD->bShowDebugHUD = bCachedShowDebugHUD;
|
||||
AgrarianHUD->bShowMvpHudFrame = bCachedShowMvpHudFrame;
|
||||
AgrarianHUD->bShowCriticalStatsHUD = bCachedShowCriticalStatsHUD;
|
||||
AgrarianHUD->bShowInventoryHUD = bCachedShowInventoryHUD;
|
||||
AgrarianHUD->bShowCraftingHUD = bCachedShowCraftingHUD;
|
||||
AgrarianHUD->bShowInteractionPrompt = bCachedShowInteractionPrompt;
|
||||
AgrarianHUD->bShowDeathRespawnUI = bCachedShowDeathRespawnUI;
|
||||
AgrarianHUD->bShowDebugDevMenu = bCachedShowDebugDevMenu;
|
||||
bCachedMvpHudState = false;
|
||||
}
|
||||
}
|
||||
|
||||
void AAgrarianGamePlayerController::ApplyMvpCharacterProxyToPawn()
|
||||
{
|
||||
AAgrarianGameCharacter* AgrarianCharacter = GetPawn<AAgrarianGameCharacter>();
|
||||
@@ -297,6 +495,61 @@ void AAgrarianGamePlayerController::ApplyMvpCharacterProxyToPawn()
|
||||
MeshComponent->SetMaterial(MaterialIndex, ProxyMaterial);
|
||||
}
|
||||
}
|
||||
|
||||
UStaticMesh* ChamferMesh = LoadObject<UStaticMesh>(
|
||||
nullptr,
|
||||
TEXT("/Game/Agrarian/Environment/PlaceholderMeshes/SM_AGR_Placeholder_ChamferCube.SM_AGR_Placeholder_ChamferCube"));
|
||||
UStaticMesh* CubeMesh = LoadObject<UStaticMesh>(
|
||||
nullptr,
|
||||
TEXT("/Game/Agrarian/Environment/PlaceholderMeshes/SM_AGR_Placeholder_Cube.SM_AGR_Placeholder_Cube"));
|
||||
UStaticMesh* CylinderMesh = LoadObject<UStaticMesh>(
|
||||
nullptr,
|
||||
TEXT("/Game/Agrarian/Environment/PlaceholderMeshes/SM_AGR_Placeholder_Cylinder.SM_AGR_Placeholder_Cylinder"));
|
||||
UMaterialInterface* WorkwearMaterial = LoadObject<UMaterialInterface>(nullptr, GetMvpCharacterProxyMaterialPath(SelectedMvpCharacterProxyId));
|
||||
UMaterialInterface* PackMaterial = LoadObject<UMaterialInterface>(
|
||||
nullptr,
|
||||
TEXT("/Game/Agrarian/Materials/M_AGR_GZ_Fiber_Resource.M_AGR_GZ_Fiber_Resource"));
|
||||
UMaterialInterface* BootMaterial = LoadObject<UMaterialInterface>(
|
||||
nullptr,
|
||||
TEXT("/Game/Agrarian/Materials/M_AGR_GZ_Wood_Resource.M_AGR_GZ_Wood_Resource"));
|
||||
|
||||
const bool bFemaleProxy = SelectedMvpCharacterProxyId == TEXT("female");
|
||||
const float TorsoWidth = bFemaleProxy ? 0.33f : 0.38f;
|
||||
const float TorsoDepth = bFemaleProxy ? 0.18f : 0.22f;
|
||||
const float PackWidth = bFemaleProxy ? 0.24f : 0.28f;
|
||||
|
||||
EnsureMvpPresentationComponent(
|
||||
AgrarianCharacter,
|
||||
TEXT("MvpWorkwearTorsoProxy"),
|
||||
ChamferMesh,
|
||||
WorkwearMaterial,
|
||||
FVector(2.0f, 0.0f, 102.0f),
|
||||
FRotator(0.0f, 0.0f, 0.0f),
|
||||
FVector(TorsoWidth, TorsoDepth, 0.62f));
|
||||
EnsureMvpPresentationComponent(
|
||||
AgrarianCharacter,
|
||||
TEXT("MvpWorkwearBackpackProxy"),
|
||||
ChamferMesh,
|
||||
PackMaterial,
|
||||
FVector(-24.0f, 0.0f, 106.0f),
|
||||
FRotator(0.0f, 0.0f, 0.0f),
|
||||
FVector(PackWidth, 0.16f, 0.48f));
|
||||
EnsureMvpPresentationComponent(
|
||||
AgrarianCharacter,
|
||||
TEXT("MvpWorkwearBedrollProxy"),
|
||||
CylinderMesh,
|
||||
PackMaterial,
|
||||
FVector(-30.0f, 0.0f, 134.0f),
|
||||
FRotator(0.0f, 90.0f, 0.0f),
|
||||
FVector(0.12f, 0.12f, 0.58f));
|
||||
EnsureMvpPresentationComponent(
|
||||
AgrarianCharacter,
|
||||
TEXT("MvpWorkwearBootsProxy"),
|
||||
ChamferMesh,
|
||||
BootMaterial,
|
||||
FVector(0.0f, 0.0f, 26.0f),
|
||||
FRotator(0.0f, 0.0f, 0.0f),
|
||||
FVector(0.34f, 0.20f, 0.18f));
|
||||
}
|
||||
|
||||
void AAgrarianGamePlayerController::AgrarianGrantItem(FName ItemId, int32 Quantity)
|
||||
@@ -558,6 +811,14 @@ void AAgrarianGamePlayerController::AgrarianSelectCharacter(FName Archetype)
|
||||
ClientMessage(TEXT("Usage: AgrarianSelectCharacter male|female"));
|
||||
}
|
||||
|
||||
void AAgrarianGamePlayerController::AgrarianCompleteFrontend()
|
||||
{
|
||||
ApplyMvpCharacterProxyToPawn();
|
||||
SetMvpFrontendPresentationActive(false);
|
||||
SetInputMode(FInputModeGameOnly());
|
||||
bShowMouseCursor = false;
|
||||
}
|
||||
|
||||
void AAgrarianGamePlayerController::AgrarianShowMvpScreen(FName ScreenName)
|
||||
{
|
||||
if (!MvpFrontendWidget)
|
||||
|
||||
@@ -10,6 +10,7 @@ class UInputMappingContext;
|
||||
class UUserWidget;
|
||||
class UAgrarianMvpFrontendWidget;
|
||||
class AAgrarianShelterActor;
|
||||
class ACameraActor;
|
||||
|
||||
/**
|
||||
* Basic PlayerController class for a third person game
|
||||
@@ -67,9 +68,27 @@ protected:
|
||||
void HandleMvpBackInput();
|
||||
void HandleMvpEscapeInput();
|
||||
void ApplyMvpCharacterProxyToPawn();
|
||||
void SetMvpFrontendPresentationActive(bool bNewActive);
|
||||
void CreateOrUpdateMvpFrontendCamera();
|
||||
void CacheAndApplyMvpHudSuppression(bool bSuppress);
|
||||
virtual void AcknowledgePossession(APawn* P) override;
|
||||
|
||||
FName SelectedMvpCharacterProxyId = TEXT("male");
|
||||
|
||||
UPROPERTY()
|
||||
TObjectPtr<ACameraActor> MvpFrontendCameraActor;
|
||||
|
||||
bool bMvpFrontendPresentationActive = false;
|
||||
bool bCachedMvpHudState = false;
|
||||
bool bCachedShowDebugHUD = true;
|
||||
bool bCachedShowMvpHudFrame = true;
|
||||
bool bCachedShowCriticalStatsHUD = true;
|
||||
bool bCachedShowInventoryHUD = true;
|
||||
bool bCachedShowCraftingHUD = true;
|
||||
bool bCachedShowInteractionPrompt = true;
|
||||
bool bCachedShowDeathRespawnUI = true;
|
||||
bool bCachedShowDebugDevMenu = false;
|
||||
|
||||
public:
|
||||
UFUNCTION(Exec)
|
||||
void AgrarianGrantItem(FName ItemId, int32 Quantity);
|
||||
@@ -128,6 +147,9 @@ public:
|
||||
UFUNCTION(Exec)
|
||||
void AgrarianSelectCharacter(FName Archetype);
|
||||
|
||||
UFUNCTION(Exec)
|
||||
void AgrarianCompleteFrontend();
|
||||
|
||||
UFUNCTION(Exec)
|
||||
void AgrarianShowMvpScreen(FName ScreenName);
|
||||
|
||||
|
||||
@@ -9,13 +9,11 @@
|
||||
#include "Components/HorizontalBox.h"
|
||||
#include "Components/HorizontalBoxSlot.h"
|
||||
#include "Components/SizeBox.h"
|
||||
#include "Components/Slider.h"
|
||||
#include "Components/TextBlock.h"
|
||||
#include "Components/VerticalBox.h"
|
||||
#include "Components/VerticalBoxSlot.h"
|
||||
#include "GameFramework/PlayerController.h"
|
||||
#include "InputCoreTypes.h"
|
||||
#include "Kismet/GameplayStatics.h"
|
||||
#include "Styling/CoreStyle.h"
|
||||
#include "TimerManager.h"
|
||||
|
||||
@@ -50,21 +48,18 @@ FReply UAgrarianMvpFrontendWidget::NativeOnKeyDown(const FGeometry& InGeometry,
|
||||
const FKey Key = InKeyEvent.GetKey();
|
||||
if (Key == EKeys::Left || Key == EKeys::A)
|
||||
{
|
||||
PlayUiSound(UiSelectionSound);
|
||||
SetSelectedCharacterArchetype(EAgrarianMvpCharacterArchetype::YoungAdultMale);
|
||||
return FReply::Handled();
|
||||
}
|
||||
|
||||
if (Key == EKeys::Right || Key == EKeys::D)
|
||||
{
|
||||
PlayUiSound(UiSelectionSound);
|
||||
SetSelectedCharacterArchetype(EAgrarianMvpCharacterArchetype::YoungAdultFemale);
|
||||
return FReply::Handled();
|
||||
}
|
||||
|
||||
if (Key == EKeys::Enter || Key == EKeys::SpaceBar)
|
||||
{
|
||||
PlayUiSound(UiConfirmSound);
|
||||
ConfirmActiveScreen();
|
||||
return FReply::Handled();
|
||||
}
|
||||
@@ -74,14 +69,12 @@ FReply UAgrarianMvpFrontendWidget::NativeOnKeyDown(const FGeometry& InGeometry,
|
||||
const FKey Key = InKeyEvent.GetKey();
|
||||
if (Key == EKeys::Enter || Key == EKeys::SpaceBar)
|
||||
{
|
||||
PlayUiSound(UiConfirmSound);
|
||||
ConfirmActiveScreen();
|
||||
return FReply::Handled();
|
||||
}
|
||||
|
||||
if (Key == EKeys::BackSpace || Key == EKeys::Escape)
|
||||
{
|
||||
PlayUiSound(UiBackSound);
|
||||
BackFromActiveScreen();
|
||||
return FReply::Handled();
|
||||
}
|
||||
@@ -91,7 +84,6 @@ FReply UAgrarianMvpFrontendWidget::NativeOnKeyDown(const FGeometry& InGeometry,
|
||||
const FKey Key = InKeyEvent.GetKey();
|
||||
if (Key == EKeys::Enter || Key == EKeys::SpaceBar)
|
||||
{
|
||||
PlayUiSound(UiConfirmSound);
|
||||
ConfirmActiveScreen();
|
||||
return FReply::Handled();
|
||||
}
|
||||
@@ -101,14 +93,12 @@ FReply UAgrarianMvpFrontendWidget::NativeOnKeyDown(const FGeometry& InGeometry,
|
||||
const FKey Key = InKeyEvent.GetKey();
|
||||
if (Key == EKeys::Enter || Key == EKeys::SpaceBar || Key == EKeys::Escape)
|
||||
{
|
||||
PlayUiSound(UiConfirmSound);
|
||||
ConfirmActiveScreen();
|
||||
return FReply::Handled();
|
||||
}
|
||||
|
||||
if (Key == EKeys::Q)
|
||||
{
|
||||
PlayUiSound(UiSaveQuitSound);
|
||||
SaveAndQuit();
|
||||
return FReply::Handled();
|
||||
}
|
||||
@@ -211,6 +201,11 @@ void UAgrarianMvpFrontendWidget::ContinueFromActiveScreen()
|
||||
CompleteFrontendFlow();
|
||||
return;
|
||||
}
|
||||
|
||||
if (ActiveScreen == EAgrarianMvpFrontendScreen::SavingAndQuit)
|
||||
{
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
void UAgrarianMvpFrontendWidget::ReturnFromActiveScreen()
|
||||
@@ -238,6 +233,7 @@ void UAgrarianMvpFrontendWidget::CompleteFrontendFlow()
|
||||
: TEXT("AgrarianSelectCharacter male"));
|
||||
}
|
||||
|
||||
PlayerController->ConsoleCommand(TEXT("AgrarianCompleteFrontend"));
|
||||
PlayerController->SetInputMode(FInputModeGameOnly());
|
||||
PlayerController->bShowMouseCursor = false;
|
||||
PlayerController->SetIgnoreMoveInput(false);
|
||||
@@ -299,31 +295,6 @@ void UAgrarianMvpFrontendWidget::RebuildFrontendTree()
|
||||
|
||||
UButton* QuitButton = AddButton(Panel, FText::FromString(TEXT("Save & Quit")), QuitButtonColor, FLinearColor(0.58f, 0.28f, 0.22f, 1.0f), 34.0f * Scale);
|
||||
QuitButton->OnClicked.AddDynamic(this, &UAgrarianMvpFrontendWidget::HandleSaveAndQuitClicked);
|
||||
AddText(Panel, FText::FromString(TEXT("Audio")), FMath::RoundToInt(18.0f * Scale), true, AccentColor, 8.0f * Scale);
|
||||
if (USlider* Slider = AddVolumeSlider(Panel, FText::FromString(TEXT("Master")), MasterVolume, 8.0f * Scale))
|
||||
{
|
||||
Slider->OnValueChanged.AddDynamic(this, &UAgrarianMvpFrontendWidget::HandleMasterVolumeChanged);
|
||||
}
|
||||
if (USlider* Slider = AddVolumeSlider(Panel, FText::FromString(TEXT("Ambient")), AmbientVolume, 8.0f * Scale))
|
||||
{
|
||||
Slider->OnValueChanged.AddDynamic(this, &UAgrarianMvpFrontendWidget::HandleAmbientVolumeChanged);
|
||||
}
|
||||
if (USlider* Slider = AddVolumeSlider(Panel, FText::FromString(TEXT("Weather")), WeatherVolume, 8.0f * Scale))
|
||||
{
|
||||
Slider->OnValueChanged.AddDynamic(this, &UAgrarianMvpFrontendWidget::HandleWeatherVolumeChanged);
|
||||
}
|
||||
if (USlider* Slider = AddVolumeSlider(Panel, FText::FromString(TEXT("Effects")), EffectsVolume, 8.0f * Scale))
|
||||
{
|
||||
Slider->OnValueChanged.AddDynamic(this, &UAgrarianMvpFrontendWidget::HandleEffectsVolumeChanged);
|
||||
}
|
||||
if (USlider* Slider = AddVolumeSlider(Panel, FText::FromString(TEXT("Wildlife")), WildlifeVolume, 8.0f * Scale))
|
||||
{
|
||||
Slider->OnValueChanged.AddDynamic(this, &UAgrarianMvpFrontendWidget::HandleWildlifeVolumeChanged);
|
||||
}
|
||||
if (USlider* Slider = AddVolumeSlider(Panel, FText::FromString(TEXT("UI")), UiVolume, 24.0f * Scale))
|
||||
{
|
||||
Slider->OnValueChanged.AddDynamic(this, &UAgrarianMvpFrontendWidget::HandleUiVolumeChanged);
|
||||
}
|
||||
AddText(Panel, FText::FromString(TEXT("Escape opens this menu. Save & Quit writes the current world save before closing.")), FMath::RoundToInt(16.0f * Scale), false, MutedTextColor, 0.0f);
|
||||
return;
|
||||
}
|
||||
@@ -496,78 +467,6 @@ UButton* UAgrarianMvpFrontendWidget::AddButton(UVerticalBox* Parent, const FText
|
||||
return Button;
|
||||
}
|
||||
|
||||
void UAgrarianMvpFrontendWidget::PlayUiSound(USoundBase* Sound) const
|
||||
{
|
||||
if (Sound)
|
||||
{
|
||||
UGameplayStatics::PlaySound2D(this, Sound, FMath::Clamp(MasterVolume * UiVolume, 0.0f, 1.0f));
|
||||
}
|
||||
}
|
||||
|
||||
USlider* UAgrarianMvpFrontendWidget::AddVolumeSlider(UVerticalBox* Parent, const FText& Label, float Value, float BottomPadding)
|
||||
{
|
||||
if (!Parent || !WidgetTree)
|
||||
{
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
UHorizontalBox* Row = WidgetTree->ConstructWidget<UHorizontalBox>(UHorizontalBox::StaticClass());
|
||||
if (UVerticalBoxSlot* RowSlot = Parent->AddChildToVerticalBox(Row))
|
||||
{
|
||||
RowSlot->SetPadding(FMargin(0.0f, 0.0f, 0.0f, BottomPadding));
|
||||
RowSlot->SetHorizontalAlignment(HAlign_Fill);
|
||||
}
|
||||
|
||||
UTextBlock* LabelText = AddText(nullptr, Label, 15, false, FLinearColor(0.82f, 0.90f, 0.76f, 1.0f), 0.0f);
|
||||
if (UHorizontalBoxSlot* LabelSlot = Row->AddChildToHorizontalBox(LabelText))
|
||||
{
|
||||
LabelSlot->SetSize(FSlateChildSize(ESlateSizeRule::Fill));
|
||||
LabelSlot->SetHorizontalAlignment(HAlign_Left);
|
||||
LabelSlot->SetVerticalAlignment(VAlign_Center);
|
||||
}
|
||||
|
||||
USlider* Slider = WidgetTree->ConstructWidget<USlider>(USlider::StaticClass());
|
||||
Slider->SetValue(FMath::Clamp(Value, 0.0f, 1.0f));
|
||||
if (UHorizontalBoxSlot* SliderSlot = Row->AddChildToHorizontalBox(Slider))
|
||||
{
|
||||
SliderSlot->SetSize(FSlateChildSize(ESlateSizeRule::Fill));
|
||||
SliderSlot->SetHorizontalAlignment(HAlign_Fill);
|
||||
SliderSlot->SetVerticalAlignment(VAlign_Center);
|
||||
}
|
||||
|
||||
return Slider;
|
||||
}
|
||||
|
||||
void UAgrarianMvpFrontendWidget::HandleMasterVolumeChanged(float Value)
|
||||
{
|
||||
MasterVolume = FMath::Clamp(Value, 0.0f, 1.0f);
|
||||
}
|
||||
|
||||
void UAgrarianMvpFrontendWidget::HandleAmbientVolumeChanged(float Value)
|
||||
{
|
||||
AmbientVolume = FMath::Clamp(Value, 0.0f, 1.0f);
|
||||
}
|
||||
|
||||
void UAgrarianMvpFrontendWidget::HandleWeatherVolumeChanged(float Value)
|
||||
{
|
||||
WeatherVolume = FMath::Clamp(Value, 0.0f, 1.0f);
|
||||
}
|
||||
|
||||
void UAgrarianMvpFrontendWidget::HandleEffectsVolumeChanged(float Value)
|
||||
{
|
||||
EffectsVolume = FMath::Clamp(Value, 0.0f, 1.0f);
|
||||
}
|
||||
|
||||
void UAgrarianMvpFrontendWidget::HandleWildlifeVolumeChanged(float Value)
|
||||
{
|
||||
WildlifeVolume = FMath::Clamp(Value, 0.0f, 1.0f);
|
||||
}
|
||||
|
||||
void UAgrarianMvpFrontendWidget::HandleUiVolumeChanged(float Value)
|
||||
{
|
||||
UiVolume = FMath::Clamp(Value, 0.0f, 1.0f);
|
||||
}
|
||||
|
||||
void UAgrarianMvpFrontendWidget::FocusPrimaryButton()
|
||||
{
|
||||
if (PrimaryFocusButton)
|
||||
@@ -582,31 +481,26 @@ void UAgrarianMvpFrontendWidget::FocusPrimaryButton()
|
||||
|
||||
void UAgrarianMvpFrontendWidget::HandlePrimaryActionClicked()
|
||||
{
|
||||
PlayUiSound(UiConfirmSound);
|
||||
ConfirmActiveScreen();
|
||||
}
|
||||
|
||||
void UAgrarianMvpFrontendWidget::HandleBackClicked()
|
||||
{
|
||||
PlayUiSound(UiBackSound);
|
||||
BackFromActiveScreen();
|
||||
}
|
||||
|
||||
void UAgrarianMvpFrontendWidget::HandleSaveAndQuitClicked()
|
||||
{
|
||||
PlayUiSound(UiSaveQuitSound);
|
||||
SaveAndQuit();
|
||||
}
|
||||
|
||||
void UAgrarianMvpFrontendWidget::HandleMaleCharacterClicked()
|
||||
{
|
||||
PlayUiSound(UiSelectionSound);
|
||||
SetSelectedCharacterArchetype(EAgrarianMvpCharacterArchetype::YoungAdultMale);
|
||||
}
|
||||
|
||||
void UAgrarianMvpFrontendWidget::HandleFemaleCharacterClicked()
|
||||
{
|
||||
PlayUiSound(UiSelectionSound);
|
||||
SetSelectedCharacterArchetype(EAgrarianMvpCharacterArchetype::YoungAdultFemale);
|
||||
}
|
||||
|
||||
|
||||
@@ -7,8 +7,6 @@
|
||||
#include "AgrarianMvpFrontendWidget.generated.h"
|
||||
|
||||
class UButton;
|
||||
class USlider;
|
||||
class USoundBase;
|
||||
class UTextBlock;
|
||||
class UVerticalBox;
|
||||
|
||||
@@ -59,36 +57,6 @@ public:
|
||||
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Agrarian|MVP UI")
|
||||
bool bUseHighContrast = false;
|
||||
|
||||
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Agrarian|MVP UI|Audio")
|
||||
TObjectPtr<USoundBase> UiConfirmSound;
|
||||
|
||||
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Agrarian|MVP UI|Audio")
|
||||
TObjectPtr<USoundBase> UiBackSound;
|
||||
|
||||
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Agrarian|MVP UI|Audio")
|
||||
TObjectPtr<USoundBase> UiSelectionSound;
|
||||
|
||||
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Agrarian|MVP UI|Audio")
|
||||
TObjectPtr<USoundBase> UiSaveQuitSound;
|
||||
|
||||
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Agrarian|MVP UI|Audio", meta = (ClampMin = "0", ClampMax = "1"))
|
||||
float MasterVolume = 1.0f;
|
||||
|
||||
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Agrarian|MVP UI|Audio", meta = (ClampMin = "0", ClampMax = "1"))
|
||||
float AmbientVolume = 0.70f;
|
||||
|
||||
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Agrarian|MVP UI|Audio", meta = (ClampMin = "0", ClampMax = "1"))
|
||||
float WeatherVolume = 0.75f;
|
||||
|
||||
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Agrarian|MVP UI|Audio", meta = (ClampMin = "0", ClampMax = "1"))
|
||||
float EffectsVolume = 0.80f;
|
||||
|
||||
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Agrarian|MVP UI|Audio", meta = (ClampMin = "0", ClampMax = "1"))
|
||||
float WildlifeVolume = 0.70f;
|
||||
|
||||
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Agrarian|MVP UI|Audio", meta = (ClampMin = "0", ClampMax = "1"))
|
||||
float UiVolume = 0.65f;
|
||||
|
||||
UFUNCTION(BlueprintCallable, Category = "Agrarian|MVP UI")
|
||||
void SetActiveScreen(EAgrarianMvpFrontendScreen NewScreen);
|
||||
|
||||
@@ -122,26 +90,6 @@ private:
|
||||
void RebuildFrontendTree();
|
||||
UTextBlock* AddText(UVerticalBox* Parent, const FText& Text, int32 FontSize, bool bBold, const FLinearColor& Color, float BottomPadding);
|
||||
UButton* AddButton(UVerticalBox* Parent, const FText& Text, const FLinearColor& NormalColor, const FLinearColor& HoveredColor, float BottomPadding);
|
||||
void PlayUiSound(USoundBase* Sound) const;
|
||||
USlider* AddVolumeSlider(UVerticalBox* Parent, const FText& Label, float Value, float BottomPadding);
|
||||
|
||||
UFUNCTION()
|
||||
void HandleMasterVolumeChanged(float Value);
|
||||
|
||||
UFUNCTION()
|
||||
void HandleAmbientVolumeChanged(float Value);
|
||||
|
||||
UFUNCTION()
|
||||
void HandleWeatherVolumeChanged(float Value);
|
||||
|
||||
UFUNCTION()
|
||||
void HandleEffectsVolumeChanged(float Value);
|
||||
|
||||
UFUNCTION()
|
||||
void HandleWildlifeVolumeChanged(float Value);
|
||||
|
||||
UFUNCTION()
|
||||
void HandleUiVolumeChanged(float Value);
|
||||
|
||||
UFUNCTION()
|
||||
void FocusPrimaryButton();
|
||||
|
||||
Reference in New Issue
Block a user