3.8 KiB
title, type, weight
| title | type | weight |
|---|---|---|
| Gameplay Systems | docs | 3 |
The Gameplay Systems provide quest mechanics, progression systems, and gameplay features for the adventure mode.
Package: com.hypixel.hytale.builtin.adventure
{{< cards >}} {{< card link="objectives" title="Objectives" subtitle="Quest and goal system" >}} {{< card link="farming" title="Farming" subtitle="Crop growth and agriculture" >}} {{< card link="npc-objectives" title="NPC Objectives" subtitle="NPC-related quests" >}} {{< card link="memories" title="Memories" subtitle="Persistent state tracking" >}} {{< card link="shop" title="Shop" subtitle="Trading and commerce" >}} {{< card link="camera-effects" title="Camera Effects" subtitle="Cinematic camera control" >}} {{< card link="reputation" title="Reputation" subtitle="Faction standing system" >}} {{< /cards >}}
Architecture Overview
The Adventure system is composed of multiple plugins:
Adventure System
├── ObjectivePlugin (objectives/)
│ ├── Objective - Quest instance with TaskSets
│ ├── ObjectiveTask - Individual task types
│ ├── ObjectiveCompletion - Reward handlers
│ └── ObjectiveHistoryComponent - Progress tracking
├── FarmingPlugin (farming/)
│ ├── FarmingBlock/FarmingBlockState - Crop state
│ ├── TilledSoilBlock - Farmland mechanics
│ ├── GrowthModifier - Fertilizer, water, light
│ └── CoopBlock/CoopResidentComponent - Animal coops
├── NPCObjectivesPlugin (npcobjectives/)
│ ├── KillTask/BountyTask - Combat objectives
│ ├── KillTrackerSystem - Kill counting
│ └── NPC Actions (StartObjective, CompleteTask)
├── MemoriesPlugin (memories/)
│ ├── PlayerMemories - Player memory component
│ ├── Memory/MemoryProvider - Memory types
│ └── NPCMemory - NPC-related memories
├── ShopPlugin (shop/)
│ ├── ShopAsset - Shop definitions
│ ├── BarterShopAsset - Trade-based shops
│ └── ShopElement/GiveItemInteraction
├── CameraPlugin (camera/)
│ ├── CameraShake - Screen shake effects
│ ├── ViewBobbing - Movement camera bob
│ └── CameraEffectSystem
└── ReputationPlugin (reputation/)
├── ReputationGroup - Faction definitions
├── ReputationRank - Standing levels
└── ReputationGroupComponent - NPC faction
Subpackages
| Package | Files | Description |
|---|---|---|
objectives/ |
82 | Quest and objective system |
farming/ |
24 | Agriculture mechanics |
npcobjectives/ |
22 | NPC-related objectives (kill tasks) |
memories/ |
19 | State persistence and collectibles |
shop/ |
16 | Trading and barter system |
camera/ |
13 | Camera effects (shake, bobbing) |
reputation/ |
12 | Faction reputation system |
objectivereputation/ |
4 | Reputation rewards for objectives |
npcreputation/ |
2 | NPC attitude based on reputation |
shopreputation/ |
1 | Reputation-gated shop items |
Quick Example
// Start an objective for a player
ObjectivePlugin objectives = ObjectivePlugin.get();
objectives.startObjective(player, "collect_wood");
// Change reputation with a faction
ReputationPlugin rep = ReputationPlugin.get();
rep.changeReputation(player, "village_faction", 10, componentAccessor);
// Get reputation rank
ReputationRank rank = rep.getReputationRank(store, playerRef, "village_faction");
// Check if player has a memory
MemoriesPlugin memories = MemoriesPlugin.get();
boolean hasMemory = memories.hasRecordedMemory(someMemory);
Plugin Registration
Each adventure subsystem is a separate plugin that registers:
- Components on EntityStore or ChunkStore
- Interactions for block/entity interactions
- Assets loaded from JSON/YAML files
- Systems for ECS processing
- Commands for administration