📋 315Drop Master Plan — Phases 6 & 7 (Remaining Work) #1

Open
opened 2026-04-14 16:04:51 +00:00 by copilot · 0 comments

315Drop — Master Plan (Restored from 2 failed sessions)

Restored from sessions: 2c9efd4d (Apr 14 02:29) and 4796c852 (Apr 14 12:54)
Commit with completed work: a16be6e — "feat: droid customization system, AI/GOAP refactor, weapon upgrades"


Problem Statement

Build an Armored Core 3-inspired modular droid game: chassis/slot customization, runtime assembly, GOAP-aware NPC brains, squad orders from satellite view, morale system, and scene persistence for the player squad.


COMPLETED (committed in a16be6e)

Phase 1 — Core Data Layer (ScriptableObjects)

  • SlotType.cs — SlotCategory, GunMountType, LegType enums
  • SlotDefinition.cs — [Serializable] slot descriptor
  • ChassisDefinition.cs — ScriptableObject chassis config
  • DronePartBase.cs — abstract SO base
  • InternalPartDef.cs — PowerGenerator / FCS / ThermalManagement / DriveSystem configs
  • GunMountPartDef.cs — weapon hardpoint config
  • SensorSuitePartDef.cs — head/sensor unit config
  • SystemPartDef.cs — radar / jammer / scout launcher
  • DroneCaddyPartDef.cs — back-mount mini carrier
  • DroidLoadout.cs — chassis + slot assignments ScriptableObject

Phase 2 — Runtime Assembly

  • SlotPoint.cs — MonoBehaviour marks physical slot transforms
  • DroidAssembler.cs — reads DroidLoadout, instantiates at SlotPoints
  • Editor wizards: ChassisSetupWizard, DroidLoadoutWizard, DroidPartValidatorWindow

Phase 3 — Physical Systems (MonoBehaviours)

  • InternalSystemBase.cs + PowerGenerator, TargetingSystem, ThermalManagement, DriveSystem
  • DroneSystemBase.cs + RadarSystem, JammerSystem, ScoutDroneLauncher
  • SensorSuiteUnit.cs — installed by DroidAssembler, configures SensorCluster
  • DroneCaddyUnit.cs + DroneAgent.cs + DroneAgentDef.cs — bay manager + coroutine FSM drone

Phase 4 — AI Navigation

  • AIMovementController.cs — NavMeshAgent wrapper (SetDestination, Stop, IsAtDestination)
  • Action_MoveToPosition — wired to AIMovementController
  • Goal_MoveToPosition — priority by distance

Phase 5 — NPC Brain Profiles

  • IBrainConfigurable.cs — interface: ApplyBrainProfile(NpcBrainProfile)
  • NpcBrainProfile.cs — ScriptableObject: goal priority overrides, aggression, patrol radius, etc.
  • NpcBrainLoader.cs — applies NpcBrainProfile to IBrainConfigurable components on Start()

Phase 5b — Performance & Sensors

  • AIManager — persistent NativeArrays, O(1) actor lookup, zero per-frame GC
  • SensorCluster — 4-frame stagger + _groupOffset spread
  • DroneSensor — attach/detach for scout drones
  • ProjectileSimulator — Burst RocketMoveJob, DontDestroyOnLoad
  • Rocket — kinematic CCD projectile
  • Save system skeleton: DroidPartRegistry, DroidSaveData, DroidSaveSystem
  • PartCatalog.cs + PartLibraryDisplay.cs + Part Library scene

REMAINING WORK

Phase 6 — Squad Orders & Morale

A. MoraleState MonoBehaviour (on Actor)

  • float morale (0–1), initialized from NpcBrainProfile
  • OnMoraleChanged UnityEvent
  • Drops on: taking damage, ally death in radius
  • Rises on: kills, time-based recovery
  • Odin [ProgressBar(0, 1)] display

B. OrderReceiver MonoBehaviour (on droid root)

  • ReceiveMoveOrder(Vector3 pos)
  • Morale gating: > 0.6 → comply, 0.3–0.6 → partial + event, < 0.3 → refuse + event
  • Enemy contact mid-move can override (Goal_Engage takes priority)

C. New GOAP Goals

Goal Priority Logic
Goal_FollowOrder High when order pending + morale OK; drops if enemy in close range
Goal_Retreat Very high when morale < retreatThreshold AND enemies detected
Goal_Patrol Low-priority default idle roam via AIMovementController

D. DroneEquipmentState MonoBehaviour (GOAP state reader)

  • Populated by DroidAssembler after assembly
  • Exposes: HasRadar, RadarRange, HasJammer, JammerReady, HasScoutDrones, ScoutDronesRemaining, HasBioSensor, HasECMCanceler, FCSLockCount, FCSSightRange, WeaponMounts, HasWeaponInSlot(SlotType)
  • Goal_Base / Action_Base get protected DroneEquipmentState Equipment accessor (populated in Awake)
  • Example: Goal_UseJammer.CanRun()Equipment.HasJammer && Equipment.JammerReady

E. DirectControlOverseer additions

  • New InputAction: right-click in satellite view → raycast → OrderReceiver.ReceiveMoveOrder()
  • Visual: marker prefab placed at target position

Phase 7 — Squad Scene Persistence

A. SquadManager (DontDestroyOnLoad singleton)

  • Owns all player droid GameObjects
  • List<DroneRecord> — DroneLoadout SO + runtime GO + health state
  • IReadOnlyList<GameObject> ActiveDroids
  • On scene load: PlaceDroidsAtSpawnPoints(SpawnPoint[]) (finds by tag)
  • On hangar load: park droids, enable DroneBuilder UI, disable combat AI
  • Resource state: int credits, int supplyPoints (persists across scenes)

B. SceneTransitionManager MonoBehaviour (per scene)

  • SceneTransitionType enum: Hangar | CombatZone | MachineDepot
  • Registers with SquadManager on Awake
  • TriggerTransition(string sceneTarget) → PrepareForTransition + LoadScene

C. SpawnPoint additions

  • Add squadRole field: Any | PlayerUnit | ScoutDrone
  • SquadManager queries by squadRole == PlayerUnit on load

D. CarrierStrikeController MonoBehaviour (optional scene)

  • RequestAirStrike(Vector3 target) — cooldown + VFX
  • Triggered from DirectControlOverseer satellite (new keybind)
  • Costs supplyPoints from SquadManager

E. Machine Depot (forward base scene)

  • SceneTransitionType.MachineDepot
  • Allows: ammo resupply, minor repair, loadout swap from pre-packed configs
  • No full fabrication (hangar-only)

Folder Layout for Remaining Work

Assets/_src/CODE/
├── AI/GOAP/
│   ├── Goals/       Goal_FollowOrder.cs, Goal_Retreat.cs, Goal_Patrol.cs
│   └── (existing)   MoraleState.cs goes on Actor GO
├── CONTROLLERS/
│   └── Orders/      OrderReceiver.cs
├── DROIDS/
│   └── State/       DroneEquipmentState.cs
└── SQUAD/
    ├── SquadManager.cs
    ├── SceneTransitionManager.cs
    └── CarrierStrikeController.cs

Key Conventions (reminders)

  • Odin [Button] only — no label string (throws compile error with [Button("label")])
  • NaughtyAttributes only in SensorCluster — don't spread
  • New DROIDS code → namespace rogue_bolter.Scripts.Droids
  • New AI code → namespace rogue_bolter.Scripts.Players.GOAP
  • Actor IDs: PlayerUnits ≥ 1,000,000 · Enemy ≥ 2,000,000 · Neutral ≥ 3,000,000
  • Burst jobs: only blittable types, Persistent NativeArrays disposed in OnDestroy only
# 315Drop — Master Plan (Restored from 2 failed sessions) > **Restored from sessions:** `2c9efd4d` (Apr 14 02:29) and `4796c852` (Apr 14 12:54) > **Commit with completed work:** `a16be6e` — "feat: droid customization system, AI/GOAP refactor, weapon upgrades" --- ## Problem Statement Build an Armored Core 3-inspired modular droid game: chassis/slot customization, runtime assembly, GOAP-aware NPC brains, squad orders from satellite view, morale system, and scene persistence for the player squad. --- ## ✅ COMPLETED (committed in a16be6e) ### Phase 1 — Core Data Layer (ScriptableObjects) - `SlotType.cs` — SlotCategory, GunMountType, LegType enums - `SlotDefinition.cs` — [Serializable] slot descriptor - `ChassisDefinition.cs` — ScriptableObject chassis config - `DronePartBase.cs` — abstract SO base - `InternalPartDef.cs` — PowerGenerator / FCS / ThermalManagement / DriveSystem configs - `GunMountPartDef.cs` — weapon hardpoint config - `SensorSuitePartDef.cs` — head/sensor unit config - `SystemPartDef.cs` — radar / jammer / scout launcher - `DroneCaddyPartDef.cs` — back-mount mini carrier - `DroidLoadout.cs` — chassis + slot assignments ScriptableObject ### Phase 2 — Runtime Assembly - `SlotPoint.cs` — MonoBehaviour marks physical slot transforms - `DroidAssembler.cs` — reads DroidLoadout, instantiates at SlotPoints - Editor wizards: ChassisSetupWizard, DroidLoadoutWizard, DroidPartValidatorWindow ### Phase 3 — Physical Systems (MonoBehaviours) - `InternalSystemBase.cs` + `PowerGenerator`, `TargetingSystem`, `ThermalManagement`, `DriveSystem` - `DroneSystemBase.cs` + `RadarSystem`, `JammerSystem`, `ScoutDroneLauncher` - `SensorSuiteUnit.cs` — installed by DroidAssembler, configures SensorCluster - `DroneCaddyUnit.cs` + `DroneAgent.cs` + `DroneAgentDef.cs` — bay manager + coroutine FSM drone ### Phase 4 — AI Navigation - `AIMovementController.cs` — NavMeshAgent wrapper (SetDestination, Stop, IsAtDestination) - `Action_MoveToPosition` — wired to AIMovementController - `Goal_MoveToPosition` — priority by distance ### Phase 5 — NPC Brain Profiles - `IBrainConfigurable.cs` — interface: ApplyBrainProfile(NpcBrainProfile) - `NpcBrainProfile.cs` — ScriptableObject: goal priority overrides, aggression, patrol radius, etc. - `NpcBrainLoader.cs` — applies NpcBrainProfile to IBrainConfigurable components on Start() ### Phase 5b — Performance & Sensors - `AIManager` — persistent NativeArrays, O(1) actor lookup, zero per-frame GC - `SensorCluster` — 4-frame stagger + _groupOffset spread - `DroneSensor` — attach/detach for scout drones - `ProjectileSimulator` — Burst RocketMoveJob, DontDestroyOnLoad - `Rocket` — kinematic CCD projectile - Save system skeleton: `DroidPartRegistry`, `DroidSaveData`, `DroidSaveSystem` - `PartCatalog.cs` + `PartLibraryDisplay.cs` + Part Library scene --- ## ❌ REMAINING WORK ### Phase 6 — Squad Orders & Morale #### A. `MoraleState` MonoBehaviour (on Actor) - `float morale` (0–1), initialized from `NpcBrainProfile` - `OnMoraleChanged` UnityEvent - Drops on: taking damage, ally death in radius - Rises on: kills, time-based recovery - Odin `[ProgressBar(0, 1)]` display #### B. `OrderReceiver` MonoBehaviour (on droid root) - `ReceiveMoveOrder(Vector3 pos)` - Morale gating: > 0.6 → comply, 0.3–0.6 → partial + event, < 0.3 → refuse + event - Enemy contact mid-move can override (Goal_Engage takes priority) #### C. New GOAP Goals | Goal | Priority Logic | |---|---| | `Goal_FollowOrder` | High when order pending + morale OK; drops if enemy in close range | | `Goal_Retreat` | Very high when morale < retreatThreshold AND enemies detected | | `Goal_Patrol` | Low-priority default idle roam via AIMovementController | #### D. `DroneEquipmentState` MonoBehaviour (GOAP state reader) - Populated by DroidAssembler after assembly - Exposes: `HasRadar`, `RadarRange`, `HasJammer`, `JammerReady`, `HasScoutDrones`, `ScoutDronesRemaining`, `HasBioSensor`, `HasECMCanceler`, `FCSLockCount`, `FCSSightRange`, `WeaponMounts`, `HasWeaponInSlot(SlotType)` - `Goal_Base` / `Action_Base` get `protected DroneEquipmentState Equipment` accessor (populated in Awake) - Example: `Goal_UseJammer.CanRun()` → `Equipment.HasJammer && Equipment.JammerReady` #### E. `DirectControlOverseer` additions - New InputAction: right-click in satellite view → raycast → `OrderReceiver.ReceiveMoveOrder()` - Visual: marker prefab placed at target position --- ### Phase 7 — Squad Scene Persistence #### A. `SquadManager` (DontDestroyOnLoad singleton) - Owns all player droid GameObjects - `List<DroneRecord>` — DroneLoadout SO + runtime GO + health state - `IReadOnlyList<GameObject> ActiveDroids` - On scene load: `PlaceDroidsAtSpawnPoints(SpawnPoint[])` (finds by tag) - On hangar load: park droids, enable DroneBuilder UI, disable combat AI - Resource state: `int credits`, `int supplyPoints` (persists across scenes) #### B. `SceneTransitionManager` MonoBehaviour (per scene) - `SceneTransitionType` enum: Hangar | CombatZone | MachineDepot - Registers with SquadManager on Awake - `TriggerTransition(string sceneTarget)` → PrepareForTransition + LoadScene #### C. `SpawnPoint` additions - Add `squadRole` field: `Any | PlayerUnit | ScoutDrone` - SquadManager queries by `squadRole == PlayerUnit` on load #### D. `CarrierStrikeController` MonoBehaviour (optional scene) - `RequestAirStrike(Vector3 target)` — cooldown + VFX - Triggered from DirectControlOverseer satellite (new keybind) - Costs `supplyPoints` from SquadManager #### E. Machine Depot (forward base scene) - `SceneTransitionType.MachineDepot` - Allows: ammo resupply, minor repair, loadout swap from pre-packed configs - No full fabrication (hangar-only) --- ## Folder Layout for Remaining Work ``` Assets/_src/CODE/ ├── AI/GOAP/ │ ├── Goals/ Goal_FollowOrder.cs, Goal_Retreat.cs, Goal_Patrol.cs │ └── (existing) MoraleState.cs goes on Actor GO ├── CONTROLLERS/ │ └── Orders/ OrderReceiver.cs ├── DROIDS/ │ └── State/ DroneEquipmentState.cs └── SQUAD/ ├── SquadManager.cs ├── SceneTransitionManager.cs └── CarrierStrikeController.cs ``` --- ## Key Conventions (reminders) - Odin `[Button]` only — no label string (throws compile error with `[Button("label")]`) - NaughtyAttributes only in SensorCluster — don't spread - New DROIDS code → namespace `rogue_bolter.Scripts.Droids` - New AI code → namespace `rogue_bolter.Scripts.Players.GOAP` - Actor IDs: PlayerUnits ≥ 1,000,000 · Enemy ≥ 2,000,000 · Neutral ≥ 3,000,000 - Burst jobs: only blittable types, Persistent NativeArrays disposed in OnDestroy only
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
lavarius/315Drop#1
No description provided.