diff --git a/CHANGELOG.md b/CHANGELOG.md index b15bc25..9b9d2a5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -52,9 +52,12 @@ versioned release tag yet, so entries are organized as pre-alpha snapshots. so implementation agents do not reopen settled scope by accident. - Alpha stats and skills design: `docs/design/39-alpha-stats-and-skills-design.md` defines alpha stat scale, - derived stat direction, body archetype budgets, skill taxonomy, first body + derived stat direction, body archetype budgets, skill origin, first body kits, skill data, rank rules, agent skill use, UI requirements, and - validation guardrails. + validation guardrails. It now clarifies the skill origin model: physical + stats are mostly body-bound, while skills may come from durable soul learning, + borrowed body imprint, physical body capability, equipment, profession, + agent routine, or anomaly. - Nakama now has a server-owned prototype Relay Yard facility action lane: `secondspawn_yard_status`, `secondspawn_yard_action_start`, and `secondspawn_yard_action_complete` expose Clinic stabilization, Training diff --git a/ROADMAP.md b/ROADMAP.md index c17528a..d01dd82 100644 --- a/ROADMAP.md +++ b/ROADMAP.md @@ -105,8 +105,8 @@ Recommended views: - [x] Alpha design decision register documented for settled decisions, working assumptions, later JOY inputs, and out-of-scope features. - [x] Alpha stats and skills design documented for stat scale, derived stat - direction, body archetype budgets, skill taxonomy, first body kits, skill - data, rank rules, agent skill use, UI requirements, and validation guardrails. + direction, body archetype budgets, skill origin, first body kits, skill data, + rank rules, agent skill use, UI requirements, and validation guardrails. - [x] Backend tests for Nakama runtime behavior and model-backed fallback. - [x] Unity project baseline upgraded to Unity `6000.5.0b9`. - [x] Local Nakama runtime smoke-tested with the current TypeScript module. @@ -358,8 +358,8 @@ prototype. any alpha scope debate or treating older TODO text as blocking. - [ ] Implement alpha stats and skills from `docs/design/39-alpha-stats-and-skills-design.md`: 1-15 stat scale, body - archetype budgets, first skill slots, Sentinel starter kit, semantic skill - intents, and server validation. + archetype budgets, skill origin model, first skill slots, Sentinel starter + kit, semantic skill intents, and server validation. - [x] Define the first Town/Yard building slice: clinic, body hall, workshop, signal tower, mess hall, memorial wall, market stall, and timer rules as world-simulation time, not pay-to-skip friction. diff --git a/docs/design/03-systems-index.md b/docs/design/03-systems-index.md index 9c58d3e..c6ce964 100644 --- a/docs/design/03-systems-index.md +++ b/docs/design/03-systems-index.md @@ -70,8 +70,8 @@ The first alpha execution spine is: for settled alpha decisions, working assumptions, later JOY inputs, and scope-control rules. 12. [39-alpha-stats-and-skills-design.md](39-alpha-stats-and-skills-design.md) - for alpha stat scale, body archetype budgets, skill slots, first body kits, - skill data, and validation rules. + for alpha stat scale, body archetype budgets, skill origin, skill slots, + first body kits, skill data, and validation rules. Use these files when creating GitHub issues, technical designs, or Unity blockout tasks for the alpha. diff --git a/docs/design/12-game-design-document.md b/docs/design/12-game-design-document.md index e06dc0f..35c81f3 100644 --- a/docs/design/12-game-design-document.md +++ b/docs/design/12-game-design-document.md @@ -57,7 +57,7 @@ The alpha-specific playable target is now split into focused build documents: out-of-scope features. - [39-alpha-stats-and-skills-design.md](39-alpha-stats-and-skills-design.md) defines alpha stat scale, derived stat direction, body archetype budgets, - skill taxonomy, first body kits, skill data, and validation rules. + skill origin, first body kits, skill data, and validation rules. Use those files as the execution spine for the first alpha. This larger GDD remains the broad product source, but implementation tasks should reference diff --git a/docs/design/14-character-stat-and-relationship-system.md b/docs/design/14-character-stat-and-relationship-system.md index 9fbe9ea..d0a4a68 100644 --- a/docs/design/14-character-stat-and-relationship-system.md +++ b/docs/design/14-character-stat-and-relationship-system.md @@ -2,7 +2,7 @@ *Status: Design baseline* *Created: 2026-05-18* -*Last updated: 2026-05-18* +*Last updated: 2026-05-23* --- @@ -25,8 +25,8 @@ skill slots, first body kits, and skill validation, see - Keep the MVP stat model compact enough for Nakama, Unity, and future Fusion server validation. -- Separate body-bound combat stats from soul identity, AI personality, - relationship state, memory, and policy. +- Separate mostly body-bound physical stats from origin-bound skills, soul + identity, AI personality, relationship state, memory, and policy. - Support Diablo IV and Path of Exile 2 style ARPG readability without copying their full UX complexity. - Make defensive scaling clear: show ratings and effective percentages where @@ -85,6 +85,7 @@ presentation attribute, not a core stat. | ---- | ---- | ---- | | Core Stats | `strength`, `dexterity`, `endurance`, `perception`, `focus`, `presence`, `intelligence`, `luck` | Game backend, then Fusion server for live combat | | Secondary Stats | HP, energy, attack power, armor, elemental resistance, dodge, crit | Derived or cached by backend and server simulation | +| Skill Origin | Soul learning, body imprint, body physical action, equipment skill, profession skill, agent routine, anomaly | Backend-owned unlock and permission data, then Fusion server validation | | Social Attributes | Appeal band, reputation, faction standing | Backend-owned profile and presentation data | | Body Presentation | Visual tags, intimidation tags, style, voice profile | Backend-owned, Unity-rendered | | Identity | Name, callsign, profession, gender identity, pronouns, age fields | Backend-owned identity layer | @@ -122,6 +123,12 @@ The current prototype runtime should keep these fields stable: New gameplay systems should read the canonical eight. Legacy aliases should only exist at compatibility boundaries. +Skills are not treated as simple body stats. A durable learned skill can live on +the soul/account layer, while the current body still controls physical +execution, equipment compatibility, borrowed imprint access, and soul-body sync. +See [39-alpha-stats-and-skills-design.md](39-alpha-stats-and-skills-design.md) +for the alpha skill origin contract. + --- ## Core Stats diff --git a/docs/design/26-alpha-game-design-document.md b/docs/design/26-alpha-game-design-document.md index fcadf96..74e9fbf 100644 --- a/docs/design/26-alpha-game-design-document.md +++ b/docs/design/26-alpha-game-design-document.md @@ -44,7 +44,7 @@ Companion execution docs: out-of-scope features. - [39-alpha-stats-and-skills-design.md](39-alpha-stats-and-skills-design.md) defines alpha stat scale, derived stat direction, body archetype budgets, - skill taxonomy, first body kits, skill data, and validation rules. + skill origin, first body kits, skill data, and validation rules. Alpha means: diff --git a/docs/design/38-alpha-design-decision-register.md b/docs/design/38-alpha-design-decision-register.md index 77adcd6..93f1606 100644 --- a/docs/design/38-alpha-design-decision-register.md +++ b/docs/design/38-alpha-design-decision-register.md @@ -41,6 +41,7 @@ Use this file when: | Gear coherence | Gear should travel plausibly from Yard to Gate. Do not split into modern outside and fantasy-only inside. | The same body goes into the Gate, so visual language should stay coherent. | | NPC intelligence | NPCs are AI agents with memory, traits, relationships, and server-validated intents. | The LLM is a brain service, not game authority. | | LLM authority | LLM output is dialogue or intent only. Nakama and Fusion validate and mutate game state. | Required by the open-source and anti-cheat model. | +| Skill ownership | Physical stats are mostly body-bound, but skills are origin-bound. Durable soul learning can survive body loss, while body imprint, physical body actions, equipment access, and sync decide what can be executed now. | A skill logically lives in learned consciousness, body imprint, gear, or agent routine. Body loss should hurt execution without deleting all player learning. | | Convai product pattern | Learn from Convai patterns such as Mindview, Knowledge Bank, Narrative Design, Action API, and NPC-to-NPC manager, but do not make Convai the durable state backbone. | Keeps useful product lessons while preserving ownership in Nakama and `api.dos.ai`. | | Advanced body progression | Cultivation and Nibirium XP remain deferred and out of alpha. | The concept felt too much like a normal XP bar and needs a fresh design pass. | @@ -68,6 +69,7 @@ first playable alpha. | Alpha stat scale | Core stats use a compact 1-15 alpha range, with 16+ reserved for post-alpha, elite, boss, anomaly, or tuned content. | `39-alpha-stats-and-skills-design.md` | | Alpha skill slots | First body kits use Basic Attack, Defensive/Mobility, Role Skill, Interact, and optional Utility. No Ultimate slot in alpha. | `39-alpha-stats-and-skills-design.md` | | Alpha starter kit | Sentinel or balanced contractor is still the recommended first playable kit. | `39-alpha-stats-and-skills-design.md` | +| Alpha skill origin | Skill data must distinguish origin from slot and animation intent. The minimum useful origins are soul, body imprint, body physical, weapon, profession, agent routine, and anomaly. | `39-alpha-stats-and-skills-design.md` | --- @@ -83,6 +85,8 @@ These questions should not block A0-A3 unless directly touched by the task. | Live reinhabitation package | Whether the live default leans 5 days, 7 days, or another tuned package. | Before economy beta, not alpha. | | TIME seeding | Whether reinhabitation SECOND directly seeds new body TIME or only pays access. | Before production reinhabitation economy. | | Memory decay | How much body-level memory survives across body loss. | Before deeper relationship and memory progression. | +| Soul skill carryover | Which learned skills remain durable, partial, or body-limited after reinhabitation. | Before permanent progression and skill unlock implementation. | +| Soul-body sync | How quickly a player adapts to a new body and how sync limits old learned skills. | Before real skill progression and body-change tuning. | | Faction reputation carryover | Which faction state follows account/soul vs body. | Before faction rewards and social penalties. | | Transfer rules | How players transfer or loot SECOND from each other. | Before PvP or contested time-loot. | | Wallet top-up | Whether wallet SECOND can ever top up loaded TIME. | Post-alpha economy and anti-abuse design. | diff --git a/docs/design/39-alpha-stats-and-skills-design.md b/docs/design/39-alpha-stats-and-skills-design.md index 8d8fd6b..6e704db 100644 --- a/docs/design/39-alpha-stats-and-skills-design.md +++ b/docs/design/39-alpha-stats-and-skills-design.md @@ -15,6 +15,7 @@ This document defines the first alpha details for: - core stat scale - derived stat direction - body archetype stat budgets +- skill origin model - skill taxonomy - first playable skill slots - starter body kits @@ -27,14 +28,20 @@ the alpha into a full ARPG spreadsheet. ## 2. Design Principles -1. Stats are body-bound unless an explicit carryover rule says otherwise. -2. Skills belong to bodies, equipment, training, soul/title unlocks, or agent - policy. Do not collapse them into one generic skill sheet. -3. The first alpha uses a small skill set per body. -4. All stat mutation and skill effects are server-owned. -5. LLMs can choose allowed skill intents, but cannot invent skills, cooldowns, +1. Physical stats are mostly body-bound unless an explicit carryover rule says + otherwise. +2. Skills are origin-bound, not body-bound by default. A skill can come from + soul learning, body imprint, equipment, profession, agent policy, or anomaly. +3. A durable learned skill can survive body loss, but the new body still limits + execution through strength, dexterity, endurance, focus, equipment, and + soul-body sync. +4. Borrowed body imprint skills can be used while inhabiting the body, but do + not automatically become durable account skills. +5. The first alpha uses a small skill set per body. +6. All stat mutation and skill effects are server-owned. +7. LLMs can choose allowed skill intents, but cannot invent skills, cooldowns, damage, rewards, or unlocks. -6. Skill readability matters more than build complexity in alpha. +8. Skill readability matters more than build complexity in alpha. --- @@ -131,25 +138,70 @@ Starter body recommendation: --- -## 7. Skill Taxonomy +## 7. Skill Origin Model + +The player does not become a blank body pilot. The player is a durable +consciousness with learned habits, timing, knowledge, and preferences. The body +is the physical instrument that may help, limit, or distort execution. + +Skill availability is the intersection of several layers: + +```text +Available Skill = +Soul Knowledge ++ Body Physical Capability ++ Body Imprint ++ Equipped Gear or Tool ++ Soul-Body Sync ++ Server Validation +``` + +Examples: + +- A player who learned sword timing keeps that knowledge after body loss, but a + weak or stiff body swings with lower damage, slower recovery, higher energy + cost, or blocked advanced moves. +- A Clinic Operator body may provide a borrowed `Stabilize` imprint because the + body and its embedded professional memory know the procedure. Leaving that + body does not automatically teach the account permanent clinic skill. +- A Crossline body with good perception may expose better mark or signal skills, + but those still require the correct weapon, line of sight, cooldown, and + server permission. +- A rare hostile shell can expose unusual actions only when the server marks + that body as inhabitable and the policy allows those actions. + +This model makes body loss meaningful without deleting all player learning. It +also makes new bodies interesting because each body can add temporary imprint +skills, physical strengths, and physical weaknesses. + +Alpha implementation should avoid a full permanent skill tree. It only needs +enough data to distinguish durable soul learning from borrowed body or equipment +capability. + +--- + +## 8. Skill Taxonomy SECOND SPAWN should not use one flat fantasy skill tree. -| Skill Layer | Owner | Meaning | Alpha Status | +| Skill Origin | Owner | Meaning | Alpha Status | | ---- | ---- | ---- | ---- | -| `BodySkill` | Current body | Built-in body action such as guard, sprint, stabilize, mark. | Alpha-ready. | +| `SoulSkill` | Durable player consciousness or account | Learned timing, tactics, crafting knowledge, language, or title-derived options that may survive body loss. | Design-ready, minimal alpha hooks only. | +| `BodyImprintSkill` | Current body imprint | Borrowed profession, reflex, routine, or memory-backed action from the inhabited body. | Alpha-ready. | +| `BodyPhysicalSkill` | Current body capability | Built-in physical action such as guard, sprint, brace, or body-specific movement. | Alpha-ready. | | `WeaponSkill` | Equipped weapon or tool | Attack shape, range, hit window, stance, reload, block. | Alpha-ready for one weapon set. | -| `ProfessionSkill` | Body job or facility role | Clinic stabilize, scout sweep, salvage repair, route read. | Alpha-ready as Yard or context action. | -| `SoulRecordSkill` | Durable account/soul/title | Knowledge or title-derived option that may survive body loss. | Design-only for alpha. | +| `ProfessionSkill` | Learned profession, credential, or facility role | Clinic stabilize, scout sweep, salvage repair, route read. | Alpha-ready as Yard or context action. | | `AgentRoutine` | Agent policy/runtime | Offline behavior package such as safe scout, guard Yard, stop low TIME. | Alpha-ready as policy/report surface. | | `AnomalySkill` | Rare body condition | Bonebound checkpoint, boss-shell restriction, unstable hostile body action. | Post-alpha design-ready. | -This separation keeps reinhabitation meaningful. Losing a body loses its -body-bound skills unless a future explicit carryover rule says otherwise. +This separation keeps reinhabitation meaningful. Losing a body loses physical +capability and borrowed imprint skills, while explicitly learned soul skills can +survive but may perform poorly or become unavailable until the new body meets +their physical, gear, and sync requirements. --- -## 8. Alpha Skill Slots +## 9. Alpha Skill Slots The first playable body does not need a full hotbar. @@ -169,15 +221,15 @@ server validation can explain. --- -## 9. First Body Kits +## 10. First Body Kits ### Sentinel Starter Kit -| Skill | Layer | Inputs | Effect Direction | Validation | +| Skill | Origin | Inputs | Effect Direction | Validation | | ---- | ---- | ---- | ---- | ---- | | Guard Cut | WeaponSkill | strength, attack_power | Short melee arc. | range, cone, target alive, cooldown | -| Shield Brace | BodySkill | endurance, focus | Brief damage reduction or stagger resistance. | duration, cooldown, body has shield | -| Intercept Step | BodySkill | dexterity, endurance | Short controlled reposition toward ally or threat. | distance cap, nav validity, cooldown | +| Shield Brace | BodyPhysicalSkill | endurance, focus | Brief damage reduction or stagger resistance. | duration, cooldown, body has shield | +| Intercept Step | BodyPhysicalSkill | dexterity, endurance | Short controlled reposition toward ally or threat. | distance cap, nav validity, cooldown | Alpha default: @@ -187,39 +239,39 @@ Alpha default: ### Courier Kit -| Skill | Layer | Inputs | Effect Direction | Validation | +| Skill | Origin | Inputs | Effect Direction | Validation | | ---- | ---- | ---- | ---- | ---- | | Quick Slash | WeaponSkill | dexterity, attack_power | Fast low-stagger melee. | range, cone, cooldown | -| Route Step | BodySkill | dexterity, focus | Short dash or dodge with high readability. | distance cap, cooldown, no wall bypass | -| Mark Route | ProfessionSkill | perception, luck | Reveals route clue or safer mission hint. | mission state, clue cap, cooldown | +| Route Step | BodyPhysicalSkill | dexterity, focus | Short dash or dodge with high readability. | distance cap, cooldown, no wall bypass | +| Mark Route | BodyImprintSkill | perception, luck | Reveals route clue or safer mission hint. | mission state, clue cap, cooldown | ### Clinic Operator Kit -| Skill | Layer | Inputs | Effect Direction | Validation | +| Skill | Origin | Inputs | Effect Direction | Validation | | ---- | ---- | ---- | ---- | ---- | | Tool Jab | WeaponSkill | dexterity, intelligence | Weak close hit or interrupt. | range, cone, cooldown | -| Stabilize | ProfessionSkill | focus, intelligence | Restore small HP or reduce injury state. | target eligibility, cost, cooldown | -| Triage Read | ProfessionSkill | perception, intelligence | Shows body condition or hazard warning. | visible target, permission, cooldown | +| Stabilize | BodyImprintSkill | focus, intelligence | Restore small HP or reduce injury state. | target eligibility, cost, cooldown | +| Triage Read | BodyImprintSkill | perception, intelligence | Shows body condition or hazard warning. | visible target, permission, cooldown | ### Scrap Warden Kit -| Skill | Layer | Inputs | Effect Direction | Validation | +| Skill | Origin | Inputs | Effect Direction | Validation | | ---- | ---- | ---- | ---- | ---- | | Heavy Swing | WeaponSkill | strength, attack_power | Slow heavy arc with stagger. | windup, range, cone, cooldown | -| Brace Weight | BodySkill | endurance, presence | Resist knockback or hold position. | duration, cooldown | -| Salvage Break | ProfessionSkill | strength, intelligence | Break object or open salvage route. | object tag, mission state, cooldown | +| Brace Weight | BodyPhysicalSkill | endurance, presence | Resist knockback or hold position. | duration, cooldown | +| Salvage Break | BodyImprintSkill | strength, intelligence | Break object or open salvage route. | object tag, mission state, cooldown | ### Crossline Surveyor Kit -| Skill | Layer | Inputs | Effect Direction | Validation | +| Skill | Origin | Inputs | Effect Direction | Validation | | ---- | ---- | ---- | ---- | ---- | | Bolt Shot | WeaponSkill | perception, attack_power | Ranged single target hit. | line of sight, range, reload/cooldown | -| Mark Signal | ProfessionSkill | perception, focus | Mark weak point or objective signal. | target visible, mark cap, cooldown | -| Disengage Step | BodySkill | dexterity, focus | Short backward reposition. | distance cap, nav validity, cooldown | +| Mark Signal | BodyImprintSkill | perception, focus | Mark weak point or objective signal. | target visible, mark cap, cooldown | +| Disengage Step | BodyPhysicalSkill | dexterity, focus | Short backward reposition. | distance cap, nav validity, cooldown | --- -## 10. Skill Data Contract +## 11. Skill Data Contract The current `FrameSkillDto` already supports: @@ -235,8 +287,14 @@ future fields: | Field | Meaning | | ---- | ---- | | `slot` | basic, defensive, role, utility, interact | -| `layer` | body, weapon, profession, soul_record, agent_routine, anomaly | +| `origin` | soul, body_imprint, body_physical, weapon, profession, agent_routine, anomaly | +| `layer` | Backward-compatible category if existing code still expects it. | | `required_tags` | body, weapon, profession, or animation tags required | +| `physical_requirements` | minimum strength, dexterity, endurance, focus, or body tags | +| `knowledge_requirements` | soul skill, recipe, language, tactic, or memory requirements | +| `sync_requirement` | minimum soul-body sync or adaptation threshold | +| `carryover_rule` | none, partial, full, or explicit future rule id | +| `body_imprint_source` | optional source body, profession, or frame template | | `primary_stat` | main stat for scaling and UI explanation | | `secondary_stat` | optional secondary stat | | `energy_cost` | server-owned cost | @@ -252,9 +310,13 @@ Do not let gameplay code call raw Animator state names. Gameplay requests a semantic action, then the animation registry maps that intent to the active body's controller. +Do not infer carryover from the skill name. Carryover is data. A sword skill can +be a durable `SoulSkill`, a temporary `WeaponSkill`, or a borrowed +`BodyImprintSkill` depending on source and unlock rule. + --- -## 11. Skill Rank Rules +## 12. Skill Rank Rules Alpha skill rank can stay simple. @@ -279,20 +341,22 @@ Rank must not: - grant economy state directly - change body ownership - mutate relationship or memory without a validated event +- change carryover behavior without an explicit origin and carryover rule --- -## 12. Agent Skill Use +## 13. Agent Skill Use AI agents and NPCs can choose skills only from allowed intents and visible state. Rules: -- The prompt receives skill summaries, not hidden formulas. +- The prompt receives skill summaries, origin, carryover hints, and visible + requirements, not hidden formulas. - The model chooses a skill intent such as `use_skill` with `skill_id`. - Nakama or Fusion validates actor state, cooldown, cost, range, line of sight, - target, and policy. + target, body capability, equipment, sync, and policy. - If validation fails, the action becomes a rejected intent or fallback. - Agent policy can forbid risky skills while offline. @@ -311,7 +375,7 @@ The reason is useful for logs and prompt trace, not authority. --- -## 13. Alpha UI Requirements +## 14. Alpha UI Requirements The first stats/skills UI should show: @@ -321,10 +385,11 @@ The first stats/skills UI should show: - attack and defense - skill names - skill slot +- skill origin - short skill summary - primary stat - cooldown and cost if implemented -- body-bound warning +- carryover note such as body imprint, equipment-bound, or learned Do not show: @@ -335,16 +400,21 @@ Do not show: --- -## 14. Acceptance Checklist +## 15. Acceptance Checklist - [ ] The current body shows the eight core stats. - [ ] The first playable body has Basic Attack, Defensive/Mobility, and Role Skill slots defined. +- [ ] Skill data distinguishes origin from slot and animation intent. +- [ ] Durable learned skills, borrowed body imprint skills, equipment skills, + and physical body actions are not collapsed into one generic body skill. - [ ] Skill effects are server-owned or server-validated. - [ ] LLMs can only request allowed skill intents. - [ ] The animation registry maps semantic action intent to body-specific animation controller state. -- [ ] Losing a body does not carry body-bound skills unless a future explicit - rule says so. +- [ ] Losing a body preserves only explicitly durable soul skills; borrowed + body imprint and physical body skills are lost with the body. +- [ ] A surviving soul skill can still be blocked or penalized by the new + body's stats, equipment, injury, and sync state. - [ ] No skill grants TIME, SECOND, reward, body access, quest completion, or relationship state directly from client or LLM output.