diff --git a/docs/PLAYER-DRAWER.md b/docs/PLAYER-DRAWER.md new file mode 100644 index 0000000..9843ed9 --- /dev/null +++ b/docs/PLAYER-DRAWER.md @@ -0,0 +1,54 @@ +# Player interface — revised milestone 1 + +The character drawer now separates Bag, Character, Equipment, Skills, Abilities, +and Spells with six labeled icon buttons. Open with the backpack / Inventory and +crafting button or the existing inventory binding. Collapse with its close button, +the same opener, or Esc. The last selected view remains selected while playing. +Existing housing controls remain available at the bottom of the drawer; building +placement and the crafting workbench are in Skills. Existing in-house shortcuts +still open house controls. + +Bag items use a five-column grid with category icons, quantities, accessible names, +and hover names. Select an item for inspection and existing equip, ring destination, +drop, or gathering-consumable actions. Exact equipment identities and crafted-stack +provenance remain intact. Item artwork uses the existing Lucide icon vocabulary; +authored item images are a later content/presentation feature. + +Character includes level/XP, point allocation, health/mana choices, base and total +primary values, expandable complete stats, and expandable titles. Equipment includes +every slot, item inspection, unequip controls, and a modifier list by equipped item. +Skills shows gathering, crafting and weapon progress beside the existing workbench. +Abilities and spells retain their server definitions, rank/XP, requirements and +eight-slot assignment controls. They are displayed separately by definition kind. + +The power hotbar starts hidden and appears only after a playable character snapshot. +It and the game controls are hidden during reconnect, disconnection, death and daily +time exhaustion. Menu input retains the existing server-intent and focus boundaries. + +This is a presentation slice. Encumbrance remains advisory. Generic use targeting, +breakdown, destruction dialogs, consumable/equipment hotkeys, modifier-source filters, +and authoritative worlds-survived display are follow-ups. Crafting discovery still +records valid failed attempts; no progression, item ownership or lifecycle rule is +changed. Infinite terrain and new Harbinger rules remain planning work. + +## Manual playtest + +1. Open a fresh game page. Confirm no numbered action slots appear before entry. + Enter a character and confirm controls and slots appear after synchronization. +2. Open the backpack. Visit all six icon buttons; check names on hover/focus and + that each view displays its own content. Esc and the close button collapse it. +3. Check five bag columns on desktop and a narrow phone viewport. Select a stack + and equipment item. Inspect provenance; drop one stack unit, equip an item, + choose a ring slot, then unequip it from Equipment. +4. In Character, inspect titles/stats and spend available points/vital choices. + Confirm live updates preserve the selected view and item inspection. +5. In Skills, use the existing crafting workbench and building placement. In Spells + and Abilities, expand a learned power, assign it to a slot, and check it remains + assigned after closing/reopening the drawer. +6. Open housing controls and check entering/leaving still works. Confirm controller + focus and touch reach all drawer buttons without horizontal page overflow. +7. Disconnect/reconnect and check controls do not remain active over the ending + screen. Test death and daily exhaustion on a disposable test character. + +Required validation: TypeScript check, production build, Go tests. Routine +Playwright test creation and suite execution remain deferred for manual playtesting. diff --git a/planning/Changes-Needed.md b/planning/Changes-Needed.md new file mode 100644 index 0000000..46b0ea6 --- /dev/null +++ b/planning/Changes-Needed.md @@ -0,0 +1,215 @@ +Game play UI Changes + Slot Bar shows up before login. (Should not) + Collapsable drawer panel: (each button should be icon with tooltip) + Button for Bag + grid based box with item icon + count (5 columns, n rows. exceeding weight limit will slow player down by a small % up to complete imobolization at 2x weight limit) + on hover will display name, click bring up context menu depending the item + Consumable options: consume, use, drop, destroy, inspect, add to hotbar/keybind + consume: activates the effect of the consumable and consumes it. + use: puts it into a 'use context' where the next thing you click it will try and use it on, ie if it is a poison, and you use it on a weapon, the weapon will be poisoned and the consumable with be consumed. if it is a healing item, and you use it on yourself, or another player, or... mob... it will heal them. We will have use effects for each item. + drop: drops it to the ground for anyone to pick up. + destory: destroys it (needs confirmation) + inspect: displays name, effects, creator/source + add to hotbar/keybind: allows the item to be mapped to a hotkey/keybind when binding hit, will use the consumable, once all of that consumable is used, the keybind/hotkey is removed for that item. + Equipable options: equip, use, drop, destory, breakdown, inspect, add to hotbar/keybind (enable quick gear swap) + equip: Equip the item, if slot already occupied, swaps with the currently equiped piece + use: puts it into a 'use context' where the next thing you click it will try and use it on + drop: drops it to the ground for anyone to pick up. + destory: destroys it (needs confirmation) + breakdown: needs confirmation. Will attempt to destory the item, but return some of the resources used to craft it. Will base amount of resources returned by a % of what is required to make it scaling by the item level, and armor crafting skill if armor, weapon crafting skill if weapon. has flat 0.01% chance to learn the recipe of the item. + inspect: Gives Name of item, and crafter/source, All details about item, equipment slot, stats, weight, requirements + add to hotbar/keybind: allows the item to be mapped to a hotkey/keybind when binding hit, Equip the item, if slot already occupied, swaps with the currently equiped piece + Resource options: inspect, use, drop, destory + inspect: provides name of the item, and some details such as 'possible uses' + use: puts it into a 'use context' where the next thing you click it will try and use it on + drop: drops it to the ground for anyone to pick up. + destory: destroys it (needs confirmation) + Building Material: inspect, place, use, drop, destroy + place: enters a placement context, where next space on map the mouse clicks if it is valid, will place the structure. + inspect: Gives Name of item, and crafter/source, All details about item + use: puts it into a 'use context' where the next thing you click it will try and use it on + drop: drops it to the ground for anyone to pick up. + destory: destroys it (needs confirmation) + House Key: inspect, use, destroy, drop + inspect: provides Name of House, Owner, and hub location + use: puts it into a 'use context' where the next thing you click it will try and use it on, will be used on house door to enter house. + drop: drops it to the ground for anyone to pick up. + destory: destroys it (needs confirmation) + Button for Character + Name, level, current xp/xp to next level, Worlds Survived + HP or mana choice if available + Available State points for placement + Stats : Name, Current base stat without equipment/buffs : total stat : Option to place an available stat point + on hover for each will offer a 'details' option to click and bring up a popup detailing the stat and its effects + Collapsed List of Stat Details + Have a Button for 'Total, Base, Equipment, Titles, Temporary (include timer on each stat for when it will return to normal)' + Total: will provide complete current stats (including current weight and weight limit) (Including Skill/ability/spell levels) + Base: All Stats only from Character Stat placement/HP/Mana Selection (Including Skill/ability/spell levels) + Equipment: All Stats gained/Lost from equipment (Including Skill/ability/spell levels) + Titles: All Stats gained/Lost from titles (Including Skill/ability/spell levels) + Temporary: All Current Temporary Stats/Effects applied to the character with durations/source (Including Skill/ability/spell levels) + Collapsed List of titles + Button for Equipment + Equipment pane: + show equiped item, on mouse over inspect, on click unequip + Collapsed pane of total modified stats from gear + Collapsed list of abilities/effects/spells/skill modificatiosn (buffs/ debuffs/ ability to use x spell or ability when equipped) + Button for Skills + Buttons for each Skills to enter the Skills context window + Craft (prompt Attempt Craft or select Known Recipe) + Attempt will have select ingrediant and amount (with an inspect button read details of the ingrediant) + Record Recipe on success + Attempt will be done in the cotnext of the selected profession + Select known recipe will auto populate the items (if possible) will then allow button to inspect what the expected result would be and then confirm the craft. + Button for Abilities + List all Abilities + On Hover gives details + On click brings up context panel + Provide Details of the ability + Name, Level, Current XP, XP to next level, Ability Type (Active/Passive), Effect/Details/requirements to use + If Active, Option to add to hotkey/keybind + Button for Spells + List of all Spells + On Hover gives details + On click brings up context panel + Provide Details of the spell + Name, Level, Current XP, XP to next level, spell Type (Support/Debuff/Attack), Effect/Details/requirements to use + Option to add to hotkey/keybind +Hotkeys/keybinds + Reset to Default Settings + Keyboard/Mouse + Controller + Custom + + For setting a keybind, you either select the key, or select combo key. + Combo Keys are 'Alt + ' and 'Ctrl + ' + For controller we will have to map this out during play testing, We will most likely end up with hotkey groups, where using the dpad arrow keys on the controller will allow cycling through, but holding a trigger key and hitting specific ones will jump to a specific hotkey group. + + Goal would be to make it fully customizable + + Traveling between hub and world. + In the Worlds you will have to click on the portal that spawns when a harbinger dies, or consume an escape stone. + + In the Hub, you will have to click on a portal that is in the hub, it will bring up a context window to display the available worlds. + We will need to come up with a way to handle high leveled players joining worlds, to make sure they don't over power the harbinger, but also dont make the harbinger extremely difficult for the lower leveled players in the world. + + Environment + We will need to texture the worlds, possible tweak camera angle, or maybe enable the camera angle to be changed. + Currently everything looks flat. + + + +I think there was a missconception, the whole '9 chunks' was meant that was what would stay in the players monitoring range, each world will be n chunks. When a player gets withen a chunk of a border, a new chunk will be generated in that direction. the further away from the initial spawn of the wandering player, the higher leveled the chunk will be, where the resources, and mobs will be of higher level. + +We will handle this by having another pod that is not handling players, handle the chunk generation. + +We will also use the same server to determine where players will spawn, the first player to join a world will set the origin spawn. players of higher level will spawn in a area away from the origin spawn that would make the region 10 levels lower then they are. So if the player who spawned into the origin walked to that player, the chunk that would be generate would be 10 levels lower then the player who spawned there. + +If the player who spawned not at the origin spawn walks towards chunks closer to the origin, they would be going easier in level. + +This is ONLY for the Worlds. Not for the Hubs. + +Harbingers Spawn at the origin and when a harbinger leaves a chunk and no players are in, that chunk is no longer able to be entered by players or the harbinger, The world will no longer generate new chunks. and the harbinger will move through all the chunks until no chunks remain. Once all players are dead/ the harbinger is defeated/ there are no movable chunks, the world falls. + +The World pod will only keep in memory any chunks that a player is on and the 8 chunks surrounding it, other chunks are stored until needed. + +## World design follow-up — 2026-09-10 + +These confirmed decisions supersede the earlier origin, blocked-chunk, and +immediate-world-end descriptions above. They are planning changes, not implemented +gameplay. Recommendations below still require agreement. + +### Confirmed decisions + +- Defeating the Harbinger stops destruction and opens the hub portal. When the + final logged-in player uses that portal, all remaining living characters are + sent to the hub and the world ends. Dead characters are not resurrected. +- Survival worlds have one fixed origin at the existing static spawn coordinates. + Region difficulty increases with distance from that origin. Arrival placement + targets a region approximately ten levels below the incoming character, with a + minimum region level of one. This also applies to a high-level first arrival; + that character does not redefine the world origin. +- During the Harbinger phase, generation toward higher-difficulty regions stops, + while generation back toward the origin remains possible. Exact frontier and + admission rules still need the definition proposed below. +- Destroyed/depleted chunks remain traversable. Remove their gatherable resources + and dropped items; disable resource respawning and mob spawning there. This + replaces the proposal to block players and the Harbinger from entering them. +- These generation/difficulty/destruction rules apply to survival worlds, not hubs. +- Before the Harbinger awakens, survival worlds expand without a fixed outer + gameplay boundary. "Infinite" means generation on demand, not pre-generating + infinite terrain. The finite frontier begins only when the Harbinger awakens. +- Chunk depletion retains player corpses and their remaining inventory. Ordinary + ground loot is removed; resurrection remains possible at a retained corpse + until the world itself ends, subject to the existing replacement/consent rules. + +### Current implementation clarification + +The reported circular invisible boundary is real: balance.yaml currently sets +worldRadius to 1024. Nine chunks is the per-player monitoring window, not the +world's total chunk count. Removing the fixed-radius movement boundary requires +the planned expanding-world system; increasing the configured radius alone would +not implement it. Inactive terrain meshes are evicted today, but persistent +resource layouts and other world state are still retained by the world owner. + +### Proposed solution to indefinite evasion — not yet approved + +- Freeze a finite outer generation frontier when the Harbinger awakens. Measure + it by distance/chunk coordinates, not rounded region levels, so walking sideways + through equally rated regions cannot expand the frontier. New admissions and + outstanding generation jobs cannot extend it after that point. +- Allow generation of missing terrain toward the origin inside that frontier. + Preserve access to already-generated regions. Define the finite eligible chunk + set once so delayed generation cannot add an unlimited supply of fresh regions. +- The Harbinger advances through remaining productive regions. Combat targeting + cannot pull it into an endless chase through already-depleted terrain. Player + presence does not veto depletion when it leaves a chunk. +- Track depletion durably even for eligible chunks that have not been generated + yet: loading them later cannot recreate resources or mobs after the destructive + advance has passed them. The world owner advances this process outside player + monitoring range too. +- Recommended loss condition: the world ends when that finite territory is fully + depleted and the Harbinger is still alive. Players may cross depleted chunks + until then. This is a visible world-state condition rather than a fixed wall-clock + deadline. Depletion alone, without a terminal condition, cannot prevent evasion. +- Harbinger movement and depletion pacing remain tuning decisions. Existing + daily-limit protection continues; final world loss follows the established + world-destruction rules rather than bypassing the daily limit to force combat. + +### Remaining lifecycle details + +- Victory closes new survival-world admissions. Recommended: also evacuate if no + living players remain connected after victory, including disconnection rather + than portal use. This fallback is proposed, not part of the confirmed trigger. +- Bulk evacuation must durably reserve each living character and their possessions + for hub transfer before world cleanup. A full/unavailable hub must leave a + recoverable transfer, not cause item loss or character duplication. Preserve + character progression, titles, daily usage, and survivor credit exactly once. +- Player corpses are retained. Still specify existing mobs, placed structures and + their contents, later drops, and house keys lost with deleted ordinary loot. +- During the Harbinger phase, high-level arrivals need an existing valid spawn or + an allowed inward-generated location. If no suitable location exists, propose + rejecting that destination with an explanation instead of extending the frontier. + +## Revised build order — 2026-09-10 + +The next sequence supersedes the remaining numbered implementation order in the +original systems roadmap. Completed foundations remain in place. Each milestone +ends with commit/push and a manual playtest handoff; routine Playwright authoring +and suite runs remain deferred. + +1. HUD visibility, collapsible character drawer, five-column bag grid, and separate + character/equipment/skills/abilities/spells views. Preserve existing actions. +2. Shared item actions and targeting, configurable bindings, encumbrance, breakdown. +3. Physical hub portals and house-door interactions. +4. Finalize expanding-world, spawning, and destruction rules and lifecycle contract. +5. Implement chunk persistence/generation and roaming Harbinger behavior. +6. Terrain textures and depth on the revised generation system. +7. Cosmetics and customization (previous milestone 9). +8. Dungeons and social expansion (previous milestone 10). +9. Revamp the Control panel and website layout, UI, and UX. + +Milestone 1 handoff: [Player drawer](../docs/PLAYER-DRAWER.md). Weight penalties, +new item-use behaviors, source-filtered stats, and expanded binding semantics are +not implemented by the first presentation slice. Character-owned worlds-survived +display needs an authoritative snapshot field; it must not be inferred from titles. diff --git a/planning/SYSTEMS-ROADMAP.md b/planning/SYSTEMS-ROADMAP.md index 69a8957..786e389 100644 --- a/planning/SYSTEMS-ROADMAP.md +++ b/planning/SYSTEMS-ROADMAP.md @@ -1,5 +1,14 @@ # Aeternalis systems roadmap +**September 10 follow-up:** the next implementation sequence is now the nine-step +[revised build order](Changes-Needed.md#revised-build-order--2026-09-10). It starts +with the player drawer and inventory presentation, and places the former cosmetics +and dungeon/social milestones at 7 and 8. Step 9 revamps Control and website UI/UX. +The original milestone table below remains the history of the first playable build. +Survival worlds are planned to expand without a fixed radius before the Harbinger; +depleted chunks remain traversable and retain player corpses. See the same follow-up +for confirmed world rules and the remaining proposed destruction mechanics. + Draft for discussion, 2026-09-08. This document organizes requested work; it does not authorize gameplay implementation or finalize the open decisions below. Existing behavior is described in `docs/ARCHITECTURE.md` and `docs/PROGRESSION.md`. diff --git a/tests/progression.spec.ts b/tests/progression.spec.ts index 12ba0d5..5dc26a4 100644 --- a/tests/progression.spec.ts +++ b/tests/progression.spec.ts @@ -29,37 +29,38 @@ test('progression and signed permanent titles render in game, account, and admin }; sendSnapshot(); }); - /* await page.setViewportSize({ width: 1440, height: 900 }); await page.goto('/game?world=e2e'); await expect(page.locator('#character-level')).toHaveText('Level 2'); await expect(page.locator('#character-experience')).toHaveText('40 / 150 XP'); await expect(page.locator('#stat-point-bank')).toHaveText('5 stat points saved'); await page.getByRole('button', { name: 'Inventory and crafting' }).click(); + await page.getByRole('button', { name: 'Trial Ring × 1', exact: true }).click(); await page.getByLabel('Ring slot for Trial Ring').selectOption('ring8'); sendSnapshot(); await expect(page.getByLabel('Ring slot for Trial Ring')).toHaveValue('ring8'); await page.locator('[data-focus-key="equip-ring-fixture"]').click(); await expect.poll(() => intents.at(-1)).toMatchObject({ op: 'equip', target: 'ring-fixture', slot: 'ring8' }); character.equipment.ring8 = 'ring-fixture'; sendSnapshot(); - await page.locator('.character-sections').getByRole('button', { name: 'Equipment', exact: true }).click(); + await page.getByRole('navigation', { name: 'Character menus' }).getByRole('button', { name: 'Equipment', exact: true }).click(); await expect(page.locator('.equipment-slot')).toHaveCount(21); await page.locator('[data-focus-key="unequip-ring8"]').click(); await expect.poll(() => intents.at(-1)).toMatchObject({ op: 'unequip', target: 'ring8' }); - await page.locator('.character-sections').getByRole('button', { name: 'Character', exact: true }).click(); + await page.getByRole('navigation', { name: 'Character menus' }).getByRole('button', { name: 'Character', exact: true }).click(); await page.getByRole('button', { name: 'Allocate one point to Constitution' }).click(); await expect.poll(() => intents.at(-1)).toMatchObject({ op: 'allocate-stat', target: 'constitution' }); await page.getByRole('button', { name: '+5 mana', exact: true }).click(); await expect.poll(() => intents.at(-1)).toMatchObject({ op: 'choose-vital', target: 'mana' }); await page.getByText('Inspect all stats', { exact: true }).click(); await expect(page.locator('.stat-table tbody tr').filter({ hasText: 'Strength' })).toContainText('50%'); - await expect(page.locator('#earned-titles')).toContainText('+3 damage'); - await expect(page.locator('#earned-titles')).toContainText('-0.5 movement speed'); - await expect(page.locator('#earned-titles')).toContainText('First ever'); + await page.getByText('Titles (1)', { exact: true }).click(); + await expect(page.locator('#inventory .title-list')).toContainText('+3 damage'); + await expect(page.locator('#inventory .title-list')).toContainText('-0.5 movement speed'); + await expect(page.locator('#inventory .title-list')).toContainText('First ever'); await page.screenshot({ path: 'test-results/progression-desktop.png' }); await page.setViewportSize({ width: 390, height: 844 }); expect(await page.evaluate(() => document.documentElement.scrollWidth <= innerWidth)).toBe(true); - await expect(page.locator('#earned-titles .earned-title')).toBeVisible(); + await expect(page.locator('#inventory .title-list .earned-title')).toBeVisible(); await page.screenshot({ path: 'test-results/progression-mobile.png' }); character.level = 1000; character.experience = 0; character.experienceToNextLevel = 0; character.statPoints = 4995; sendSnapshot(); @@ -79,6 +80,5 @@ test('progression and signed permanent titles render in game, account, and admin await expect(page.locator('#character-detail .stat-table tbody tr').filter({ hasText: 'Strength' })).toHaveText('Strength2+2+50%6'); await expect(page.locator('#character-detail')).toContainText('Trial Ring'); await page.screenshot({ path: 'test-results/progression-control.png' }); - */ expect(errors).toEqual([]); });