7.4 KiB
7.4 KiB
Future Plan
Objective
Define the next major gameplay and platform systems:
- NPC framework (combat + non-combat + shops + dialog/quests).
- Party + clan systems.
- Party XP sharing.
- Overworld runtime + browser/in-game world editing with VIP-gated build areas.
- Player spell system (separate from mob abilities), with learning requirements and hotbar integration.
Workstream 1: NPC System
Scope
- Add NPC entity model with behavior modes:
- passive
- aggressive
- retaliate-on-hit
- killable / non-killable
- Reuse combat foundation (stats, resistances, cooldowns, combat state), but keep NPC-specific behavior profiles.
- Support optional attachments per NPC:
- shop/trade profile
- dialog tree root
- quest giver hooks
Data Model (Draft)
NpcDefinition- identity, faction, behavior mode, killable flag, respawn config
- stat block, equipment/loot profile, spell/ability loadout for retaliation/combat
NpcSpawn- world/dungeon context, x/y, conditions, schedule
NpcShopProfile- stock entries, prices, buy/sell rules, refresh behavior
NpcDialogNode+NpcDialogEdge- branching text, requirements, rewards, quest state transitions
Milestones
- M1: NPC spawning + core AI/combat + retaliation.
- M2: Shop/trade interactions.
- M3: Dialog tree runtime + quest hooks.
Workstream 2: Party + Clan System
Party
- Party lifecycle:
- invite, accept, leave, kick, disband, leader transfer
- Shared state:
- member list, leader id, optional role tags
- Runtime support:
- proximity checks, shared dungeon entry, party chat channel
Clan
- Clan lifecycle:
- create, invite, join, leave, remove, rank/role management
- Shared systems:
- clan roster, MOTD, permissions, clan chat
- Future-ready extension:
- clan progression/perks (deferred)
Milestones
- M1: Party backend + party UI + chat.
- M2: Clan backend + role permissions + chat.
- M3: Party/clan hooks in dungeon and overworld systems.
Workstream 3: Party XP Sharing
Rules (Initial)
- XP source events are tagged with killer + eligible nearby party members.
- Split XP by party size with configurable efficiency curve.
- Add anti-abuse checks:
- proximity radius
- minimum contribution or activity
- Add optional bonus multipliers by party size.
Config
PartyXpShareEnabledPartyXpShareRadiusPartyXpEfficiencyBySize(array/map)PartyXpBonusBySize(array/map, optional)
Milestones
- M1: Server-side XP split logic.
- M2: Combat log + UI feedback per member.
- M3: Balance pass on scaling curve.
Workstream 4: Overworld + Editing + VIP Build Gate
Overworld Runtime
- Persistent map/chunk model using
region -> zone -> chunk. - Overworld entity simulation (players, NPCs, mobs, objects).
- Cross-zone travel and persistence checkpoints.
World Sizing (v1 Defaults, Configurable)
- Chunk size:
64x64tiles. - Zones per region:
4x4zones (16zones total). - Chunks per zone:
8x8chunks (64chunks per zone). - Region footprint:
32x32chunks (2048x2048tiles at 64px chunks). - Runtime config keys:
World.ChunkWidthTiles,World.ChunkHeightTilesWorld.ZonesPerRegionX,World.ZonesPerRegionYWorld.ChunksPerZoneX,World.ChunksPerZoneY
- Hard requirement: bounds and coordinate conversion must be server-authoritative.
Editing Surfaces
- Browser editor:
- admin/world-authoring controls, tile/object/NPC placement
- select region + zone + chunk, or load full zone edit mode
- region minimap outline showing all zones, with selected zone/chunk highlighted
- In-game editor:
- restricted build mode with safe action logs and undo windows
Browser Live Editor Requirements
- Tile placement:
- pick sprite sheet
- pick frame/tile
- set
isWalkable(bool) - set
isInvisiblePaywall(bool)
- Object placement:
- pick object definition (filterable search)
- place/move/remove
- NPC placement:
- pick NPC definition (filterable search)
- place/move/remove
- Edit transport:
- use existing proximity update model for delta broadcasts
- edits apply as chunk-scoped change batches with monotonic version
- support explicit resync snapshot per chunk/zone
- Safety:
- server validates all writes (bounds, permission, definition IDs)
- audit log for every edit operation (who/where/what).
VIP Paywall Barrier
- Add an invisible barrier tile/object type and tile flag (
isInvisiblePaywall). - Entry/build permission checks:
- allow if player is VIP or explicitly whitelisted
- deny with clear client feedback if not allowed
- Region-level policy:
- per area
BuildAccessMode(public, vip_only, whitelist_only)
- per area
Milestones
- M1: Overworld chunk load/save loop.
- M2: Browser editor core (tile/object/NPC + chunk selector + zone minimap).
- M3: Live delta sync hardening (versioned chunk updates + resync path).
- M4: In-game editor + permission model.
- M5: VIP barrier/paywall enforcement + admin tooling.
Workstream 5: Player Spell System (Separate from Abilities)
Design Direction
- Player spells are a separate system from mob abilities.
- Spell categories:
- combat
- enchantment
- buff
- debuff
- summon
- Spells are learned through requirements:
- required item(s)
- required stat thresholds
- optional class/faction/quest gates
Runtime Requirements
SpellDefinition+ effect payload schema.PlayerLearnedSpelltracking with source and timestamp.- Cast pipeline:
- cost checks
- cooldown/global cooldown checks
- target validation
- effect application
- Hotbar integration:
- drag/drop assignment
- cooldown display
- lockout/error messaging
Milestones
- M1: Spell data model + learning requirements.
- M2: Cast runtime + networking + hotbar wiring.
- M3: First spell packs (combat + buff/debuff + summon).
- M4: Enchantment and advanced conditional spell behaviors.
Cross-Cutting Requirements
Admin Tooling
- NPC editor (stats/behavior/shop/dialog links).
- Party/clan moderation tools.
- Overworld region editor with access policy controls.
- Spell editor + requirement rule builder.
Telemetry / Audit
- Track economy events (shop buys/sells, quest rewards).
- Track party XP distribution.
- Track in-game editing operations (who, what, where, when).
- Track spell learn/cast metrics and failures.
Security / Abuse Prevention
- Server-authoritative validation for all permissions and cast rules.
- Rate limits on invites, chat, shop operations, and spell casts.
- Explicit anti-cheat checks for world editing and VIP barrier bypass attempts.
Suggested Delivery Order
- NPC core + retaliation combat.
- Party system + XP sharing.
- Clan system.
- Spell framework + learning + hotbar.
- Overworld runtime base.
- Browser editor, then in-game editor.
- VIP build/paywall barriers and region policy hardening.
Open Design Decisions
- Should non-killable NPCs still enter combat animation/state when attacked, or only retaliate with non-lethal behavior?
- Party XP model preference:
- equal split
- weighted by contribution
- hybrid
- Clan feature depth for v1: chat + roster only, or include progression/perks immediately?
- Overworld editor authority: admin-only at launch, or delegated trusted roles?
- Spell learning consumption: should required item be consumed on learn or only checked as prerequisite?