Posted 2 hours ago2 hr comment_120351 Quest System — Complete GuideOverviewThe quest system allows you to create custom quests with NPC dialogue, requirements, stage tracking, and rewards. Player progress is saved automatically via MongoDB.Part 1 — InstallationFile StructureCreate these folders and files in your project: This is the hidden content, please Sign In or Sign Up Step 1 — Register Quest ModuleFile: StaticInit.javaSearch for: This is the hidden content, please Sign In or Sign Up Add directly after: This is the hidden content, please Sign In or Sign Up Step 2 — Register NPC ActionsFile: StaticInit.javaSearch for: This is the hidden content, please Sign In or Sign Up Add directly after: This is the hidden content, please Sign In or Sign Up Step 3 — Add Quest Storage to PlayerFile: PlayerAttributes.javaSearch for: This is the hidden content, please Sign In or Sign Up Add directly after: This is the hidden content, please Sign In or Sign Up Search for: This is the hidden content, please Sign In or Sign Up Add directly after: This is the hidden content, please Sign In or Sign Up Step 4 — Add Quest CommandFile: CommandHandlerRegular.javaAdd imports at the top with other imports: This is the hidden content, please Sign In or Sign Up Add this case inside the switch (command) block: This is the hidden content, please Sign In or Sign Up Step 5 — Rebuild This is the hidden content, please Sign In or Sign Up Step 6 — Test in Game This is the hidden content, please Sign In or Sign Up Part 2 — Adding a New QuestCreate YourQuest.java in quest/impl/ extending QuestOverride all required methods (see template below)Add to Module.java: This is the hidden content, please Sign In or Sign Up Create NPC action file in npc/actions/Register NPC in StaticInit.javaRebuildPart 3 — Full File ReferenceQuest.javakronos-server/src/main/java/io/ruin/model/quest/Quest.java This is the hidden content, please Sign In or Sign Up QuestManager.javakronos-server/src/main/java/io/ruin/model/quest/QuestManager.java This is the hidden content, please Sign In or Sign Up QuestStage.javakronos-server/src/main/java/io/ruin/model/quest/QuestStage.java This is the hidden content, please Sign In or Sign Up Module.javakronos-server/src/main/java/io/ruin/model/quest/module/Module.java This is the hidden content, please Sign In or Sign Up ASimpleErrand.javakronos-server/src/main/java/io/ruin/model/quest/impl/ASimpleErrand.java This is the hidden content, please Sign In or Sign Up Part 4 — Quest TemplateUse this as a starting point for every new quest: This is the hidden content, please Sign In or Sign Up
Create an account or sign in to comment