Add ranged combat area effects and admin-authored mobs
This commit is contained in:
@@ -0,0 +1,117 @@
|
||||
# Milestone 4: combat and mobs
|
||||
|
||||
Implemented for manual playtesting. Milestone 4.5 (rigs, equipment attachments,
|
||||
animation, and sound) has not started. This build uses existing model presets.
|
||||
|
||||
## Combat
|
||||
|
||||
Control → Content → Attacks defines reusable melee/projectile attacks, damage or
|
||||
healing, the player stat used for power, multiplier, range, cooldown, stamina cost,
|
||||
projectile speed, area radius, duration, and pulse interval. Weapon definitions can
|
||||
select an attack. Acquired weapon instances copy that attack, so later catalog
|
||||
publication does not rewrite existing equipment. Weapons without one retain basic
|
||||
melee. Weapon switching cannot bypass a cooldown already incurred.
|
||||
|
||||
For this playtest, ranged combat uses **selected targets**. Clicking a creature or
|
||||
pressing F approaches to range and attacks. A projectile flies toward the position
|
||||
where its target was when fired; moving targets can dodge it, and another eligible
|
||||
target can intercept it. Terrain blocks attacks. The server owns range, cooldowns,
|
||||
costs, movement, collision, damage, healing, and rewards. Ammunition, free aiming,
|
||||
weapon proficiency, learned spells, and ability unlocks remain future work.
|
||||
|
||||
Damage is PvE: player attacks hit creatures; creature attacks hit living players.
|
||||
Player healing can target self or other living players. Creature healing supports
|
||||
self/nearby creatures while engaged. Healing cannot resurrect a corpse or heal a
|
||||
sheltered/offline player. Player power uses the chosen final stat; mob power uses
|
||||
its damage value, scaling, and attack multiplier. Healing uses the same power
|
||||
calculation without critical rolls. Existing defence/dodge rules still apply.
|
||||
|
||||
Radius creates a burst at impact. Positive duration adds a stationary area that
|
||||
pulses at its interval through its deadline, in addition to the initial impact.
|
||||
Areas can damage or heal across chunk edges; nearest targets are processed first,
|
||||
with stable ID ordering for ties. Rings show persistent areas; instantaneous bursts
|
||||
currently have no lingering ring. This is the area-effect foundation, not the later
|
||||
buff/debuff, moving aura, spell XP, or resurrection system.
|
||||
|
||||
Projectiles and areas retain IDs, sampled power, positions, and deadlines in world
|
||||
checkpoints. Impact and reward changes are persisted before publication. Movement
|
||||
uses the existing one-second checkpoint cadence; a crash can roll back intervening
|
||||
movement. Restoring does not replay an impact or catch up missed area pulses in a
|
||||
burst. Source death, shelter, or world completion cancels outstanding effects.
|
||||
|
||||
## Mobs, loot, and spawning
|
||||
|
||||
Four new Content tabs follow the existing preview, version check, server-generated
|
||||
IDs, audited publication, and retry-safe workflow: Attacks, Mobs, Loot tables, and
|
||||
Mob spawns. Definitions remain append-only.
|
||||
|
||||
Mobs select a model preset, level, health, damage, defence, speed, aggro range,
|
||||
pursuit limit, world-age scaling, kill XP, attack, and optional loot table. Behaviors:
|
||||
|
||||
- Aggressive: acquire nearby players, pursue within the home leash.
|
||||
- Guard: acquire nearby players, remain within the home aggro radius.
|
||||
- Passive: retaliate when damaged, without initiating attacks.
|
||||
|
||||
Health and damage at spawn/respawn use
|
||||
`base × level × (1 + world age in days × scale per day)`.
|
||||
These are provisional tuning rules. Instances retain their definition, attack,
|
||||
loot table, health, home, and identity across chunk crossings and restarts. They
|
||||
simulate when their current or home chunk is active and return home beyond their
|
||||
pursuit limit. Movement checks slopes and uses deterministic sidesteps; it is not
|
||||
full pathfinding around forests or future structures. Tree collision remains deferred.
|
||||
|
||||
Loot tables support independent entries and weighted groups. Every ungrouped entry
|
||||
rolls its chance; each named group chooses one entry by weight and then rolls that
|
||||
entry's chance. Chance 100 guarantees the listed quantity; luck modifies lower
|
||||
chances. Equipment/materials/consumables are supported. Loot rolls once into a
|
||||
shared lootable corpse, using existing inventory transfer and persistence rules.
|
||||
There is no personal loot reservation, recursive table, or condition editor yet.
|
||||
Existing procedural sentinels retain their legacy direct-to-inventory rewards.
|
||||
|
||||
Mob spawn definitions place deterministic populations in a configured region,
|
||||
optionally filtered by biome, with respawn and minimum player-distance settings.
|
||||
They apply to **every world receiving the catalog**, activate around subscribed
|
||||
chunks, and supplement existing procedural sentinels. Explored biome assignments
|
||||
are retained when catalog weights change. Initial content has no regional rules.
|
||||
|
||||
For a specific world, Control → Worlds → Spawn mobs queues 1–32 mobs near supplied
|
||||
X/Z coordinates (a 2m grid for groups). The world owner validates the entire batch
|
||||
before spawning. Live admin spawns do not respawn. Command completion and the
|
||||
world snapshot commit together; retrying the same request cannot duplicate mobs.
|
||||
Ended worlds reject spawning. Events, directed swarms, announcements, and delaying
|
||||
the Harbinger remain on the later live-operations roadmap.
|
||||
|
||||
Initial work caps in balance.yaml are 512 mobs, 256 projectiles, 64 persistent or
|
||||
pending areas, and 64 targets per area pulse. These are bounds, not increased
|
||||
tested-capacity claims. Region rules can be skipped when the mob cap is reached.
|
||||
|
||||
## Manual playtest
|
||||
|
||||
1. In Content → Equipment, create a level-1 weapon using **Bow shot**. Grant it to
|
||||
your test character in Characters → Manage items and titles, then equip it.
|
||||
Click a sentinel from a distance: approach to range, visible travel, delayed hit,
|
||||
stamina consumption. Unequip and confirm basic melee still works.
|
||||
2. In Worlds → Spawn mobs, choose **Ash guard**, count 2, near your character's
|
||||
displayed coordinates. Check the audit result. Defeat one, gather its corpse,
|
||||
and confirm loot cannot be collected twice. Test a disposable character for death.
|
||||
3. Lead a mob across an X/Z multiple of 128. It should retain health/identity and
|
||||
keep pursuing. Lead it beyond its configured leash; it should return home.
|
||||
4. Create/equip a weapon using **Blast shot**, then hit a group. Nearby creatures
|
||||
should take damage, including across a chunk edge. Verify player allies are safe.
|
||||
5. Create a weapon using **Healing field**, with a +10 flat **magic damage** modifier
|
||||
(the base magic-damage stat can be zero). Equip it on an injured test character.
|
||||
F with no selected player targets self; click another player to target them.
|
||||
Check the green area, repeated healing, maximum-health clamp, expiry, and
|
||||
inability to revive a corpse. Movement or opening a menu stops repeated attacks.
|
||||
6. Create your own attack, loot table, mob, and regional spawn using previews.
|
||||
Try passive and guard behaviors, short respawn, and a biome filter. Walk away
|
||||
beyond minimum spawn distance and return after the respawn time. Remember this
|
||||
rule applies across worlds; use live Spawn mobs for a world-specific test.
|
||||
7. Restart after a mob crosses a chunk, after a kill, or with an active area. Check
|
||||
health, loot, and remaining effect lifetime. Check Esc on each new editor/dialog.
|
||||
|
||||
Required checks: TypeScript, production build, protocol binding consistency, and
|
||||
the Go suite. Focused server coverage includes projectile hits/misses/costs,
|
||||
cooldown swaps, cross-chunk pursuit, damage/healing areas, source death, persisted
|
||||
effects, loot/respawn, work limits, catalog publication, and admin command retries
|
||||
across restart. Playwright runs remain deferred for the user's manual testing.
|
||||
Reference in New Issue
Block a user