Add item actions, targeting, bindings, and encumbrance
This commit is contained in:
@@ -0,0 +1,89 @@
|
||||
# Item actions — revised milestone 2
|
||||
|
||||
The bag and equipment views share item actions. Equip swaps an occupied slot while
|
||||
keeping both exact instances. Rings retain an explicit destination. Destroy and
|
||||
breakdown require confirmation. Dropping a stack drops one unit; destroying a stack
|
||||
from the bag destroys one unit. House-key destruction uses the existing three-second
|
||||
action and cancellation rules, including its last-key recovery/deletion contract.
|
||||
|
||||
Use selects a target. Click a world entity, choose yourself or the selected target,
|
||||
or select a bag item. Equipped items have a Target this item button. Esc first closes
|
||||
the focused menu, then cancels an outstanding use context. Unsupported combinations
|
||||
return an explanation without consuming the item. House keys open existing housing
|
||||
controls; physical door targeting remains milestone 3. Structure kits start placement;
|
||||
the Skills building view still provides orientation selection. Books, revival stones
|
||||
and escape stones use their established server operations and lifecycle constraints.
|
||||
|
||||
Admins can create three consumable profiles: gathering modifiers, immediate healing,
|
||||
and weapon coating. Healing reaches a nearby living player or mob through an
|
||||
unobstructed line, with no resurrection. A coating targets an owned damage weapon,
|
||||
adds its configured amount to weapon attacks, and expires in real time, including
|
||||
offline time. New coatings replace the old coating. The first coating profile adds
|
||||
hit damage; damage-over-time/status variants are not defined by this milestone.
|
||||
Projectiles still have to collide before damage applies, and spells do not inherit
|
||||
weapon coatings. Copied coating data stays with the exact weapon on drop/loot/travel.
|
||||
|
||||
Consumables can occupy the same eight hotbar slots as powers. A consumable binding
|
||||
uses its item type and clears when the final unit leaves inventory. Equipment binds
|
||||
an exact instance and destination slot for quick swaps; losing that instance clears
|
||||
its binding. These browser preferences remain scoped to the character. Settings
|
||||
support keyboard and mouse buttons, Ctrl/Alt combinations, gamepad buttons, and
|
||||
separate keyboard/mouse and controller resets. Left-stick movement remains available.
|
||||
Controller hotbar groups await playtesting; browser-reserved shortcuts may take priority.
|
||||
|
||||
## Authoritative rules
|
||||
|
||||
- `POST /api/item-action` authenticates the active character and validates ownership,
|
||||
state, quantity, target, range, obstruction and cooldown. Equip, destroy, breakdown,
|
||||
consume and targeted use save their complete result and request receipt atomically.
|
||||
Retry pending action resolves an uncertain save with the same request ID, including
|
||||
after a page reload in the same tab. A changed request cannot reuse a receipt. A
|
||||
replay reports the original outcome without changing inventory or reactivating a life.
|
||||
- Carry weight includes all carried gear and unit-weight stacks. Movement remains
|
||||
normal at capacity, becomes 99% at 1.1×, 75% at 1.5×, and zero at 2× or more with
|
||||
the initial quadratic curve. Apply this after speed and capacity modifiers, in
|
||||
worlds and houses. Immobilization also prevents starting a jump. Gravity still
|
||||
finishes an existing fall. Survivors can drop weight after victory to reach a portal.
|
||||
- Breakdown uses the item's original recipe revision. Future recipe publications
|
||||
archive their preceding revision. Old crafted items whose original revision is
|
||||
unavailable cannot be salvaged by substituting a newer recipe. Unmarked equipment
|
||||
requires one unambiguous recipe producing it. Houses, furniture and keys cannot
|
||||
be broken down.
|
||||
- Base material recovery is 25% at the required crafting level. Under-level recovery
|
||||
decreases exponentially; higher levels approach 75%. Recovery is divided across
|
||||
the original output batch and rounded down, possibly to zero. Armor uses armor
|
||||
making; primary weapons use weapon smithing; other items use their recipe profession.
|
||||
Recovery never fabricates crafted provenance. Every valid breakdown has a flat
|
||||
0.01% recipe discovery chance and grants no XP, including in a hub.
|
||||
- Curve, salvage percentages, discovery chance and item cooldown are configured in
|
||||
`server/content/balance.yaml`; old snapshots acquire defaults once. Further balance
|
||||
changes should follow manual playtesting. Permanent-death, replacement, travel,
|
||||
daily-time and housing access rules still apply.
|
||||
|
||||
## Manual playtest handoff
|
||||
|
||||
1. Swap two weapons in the same slot; move a ring between occupied slots. Confirm
|
||||
neither item disappears and no instance is assigned twice. Assign gear to a
|
||||
hotbar slot and use it after closing the drawer.
|
||||
2. Cancel and confirm destroy/breakdown. Inspect surviving stacks' crafting origin.
|
||||
Revise a recipe after crafting gear, then break that gear down; it should recover
|
||||
from the old inputs. A zero-resource result is possible at low skill levels.
|
||||
3. Create healing and coating consumables in Control and grant them. Heal yourself,
|
||||
another player and a mob. Try distant/blocked/full-health targets. Apply a coating
|
||||
to a carried weapon, equip it and compare hits before/after expiry. A failed use
|
||||
must leave the consumable intact.
|
||||
4. Assign a consumable to a hotbar slot; consume/drop its last unit and confirm the
|
||||
slot clears. Reload to check saved bindings. Exercise Ctrl/Alt combos, a mouse
|
||||
binding, controller controls and each separate reset. Confirm menus remain usable.
|
||||
5. Load up above capacity, then at twice capacity. Check movement and jumping in a
|
||||
world and house; drop/store weight to recover. Check victory-portal movement too.
|
||||
6. Confirm key destruction shows a three-second action and that death/drop/disconnect
|
||||
cancellation still works. Check recipe/consumable use after travel without XP in hubs.
|
||||
7. If a save loses its response, use Retry pending item action and confirm the result
|
||||
is applied once. Reloading the same tab should retain an unresolved request.
|
||||
|
||||
Automated browser expansion/full-suite runs remain deferred to the existing TODO.
|
||||
Required TypeScript/build and Go checks cover this milestone; focused Go regressions
|
||||
cover inventory recovery, transactional retries, target isolation, restart/death,
|
||||
coating expiry, recipe history and encumbrance. PostgreSQL variants require
|
||||
`TEST_DATABASE_URL` in an environment with a database.
|
||||
@@ -1,5 +1,9 @@
|
||||
# Player interface — revised milestone 1
|
||||
|
||||
The subsequent [item-action milestone](ITEM-ACTIONS.md) implements the weight,
|
||||
targeting, breakdown and binding follow-ups described below. This document records
|
||||
the original presentation milestone and its manual checks.
|
||||
|
||||
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,
|
||||
|
||||
Reference in New Issue
Block a user