Complete tutorial for creating your first quest using Argonath Systems.
A simple “Welcome to the World” quest that:
Estimated Time: 15 minutes
# Create mod structure
mkdir my-first-quest
cd my-first-quest
Create build.gradle:
plugins {
id 'java'
}
group = 'com.example'
version = '1.0.0'
sourceCompatibility = JavaVersion.VERSION_17
repositories {
mavenCentral()
maven {
url = 'https://maven.pkg.github.com/Argonath-Systems/Argonath-Systems'
}
}
dependencies {
// Use the Quest Bundle
implementation 'com.hytale.argonath:bundle-quest:1.0.0'
// Or individual modules
// implementation 'com.hytale.argonath:framework-quest:1.0.0'
}
src/main/java/com/example/firstquest/
├── FirstQuestMod.java
├── quests/
│ └── WelcomeQuest.java
└── npcs/
└── VillageElderNPC.java
Create WelcomeQuest.java:
package com.example.firstquest.quests;
import com.hytale.argonath.framework.quest.Quest;
import com.hytale.argonath.framework.quest.QuestBuilder;
import com.hytale.argonath.framework.objective.Objective;
import com.hytale.argonath.framework.objective.ObjectiveType;
import com.hytale.argonath.framework.condition.Condition;
import com.hytale.argonath.framework.npc.NPC;
public class WelcomeQuest {
public static Quest create() {
return QuestBuilder.create("welcome_quest")
.name("Welcome to the World")
.description("The Village Elder wants to speak with you.")
// Quest appears when player joins for the first time
.startCondition(Condition.firstJoin())
// Objective: Talk to the Village Elder
.addObjective(
Objective.builder()
.type(ObjectiveType.TALK_TO_NPC)
.target("village_elder")
.description("Talk to the Village Elder")
.build()
)
// Reward
.addReward(reward -> reward
.item("gold_coin", 10)
.experience(50)
)
// Quest dialog
.onComplete(player -> {
player.sendMessage("§a[Elder] Welcome, young adventurer! " +
"May your journey be filled with glory!");
})
.build();
}
}
Create VillageElderNPC.java:
package com.example.firstquest.npcs;
import com.hytale.argonath.framework.npc.NPC;
import com.hytale.argonath.framework.npc.NPCBuilder;
import com.hytale.argonath.framework.npc.DialogNode;
public class VillageElderNPC {
public static NPC create() {
return NPCBuilder.create("village_elder")
.name("Village Elder")
.model("models/npc/elder.json")
.location(100, 64, 200) // x, y, z coordinates
// Dialog when quest is active
.addDialog(
DialogNode.builder()
.condition("quest_active:welcome_quest")
.text("Greetings, traveler! Welcome to our village.")
.option("Hello! What can I do?", "quest_accept")
.build()
)
// Dialog after quest completion
.addDialog(
DialogNode.builder()
.condition("quest_completed:welcome_quest")
.text("I see you've settled in nicely!")
.build()
)
// Quest completion handler
.onInteract((npc, player) -> {
// Automatically handled by Quest Framework
})
.build();
}
}
Create FirstQuestMod.java:
package com.example.firstquest;
import com.hytale.argonath.platform.sdk.ModInitializer;
import com.hytale.argonath.framework.quest.QuestRegistry;
import com.hytale.argonath.framework.npc.NPCRegistry;
import com.example.firstquest.quests.WelcomeQuest;
import com.example.firstquest.npcs.VillageElderNPC;
public class FirstQuestMod implements ModInitializer {
@Override
public void onInitialize() {
// Register the quest
QuestRegistry.register(WelcomeQuest.create());
// Register the NPC
NPCRegistry.register(VillageElderNPC.create());
System.out.println("[First Quest] Mod initialized!");
}
}
Create src/main/resources/mod.json:
{
"id": "first_quest",
"name": "My First Quest",
"version": "1.0.0",
"description": "A simple welcome quest",
"authors": ["YourName"],
"entrypoints": {
"main": ["com.example.firstquest.FirstQuestMod"]
},
"depends": {
"argonath-quest": ">=1.0.0"
}
}
./gradlew build
Output JAR: build/libs/my-first-quest-1.0.0.jar
# Copy to Hytale mods folder
cp build/libs/my-first-quest-1.0.0.jar ~/hytale/mods/
# Launch Hytale
/quests or press QPlayer Joins (First Time)
↓
Quest Activates Automatically
↓
Quest Appears in Quest Log
↓
Player Finds Village Elder NPC
↓
Player Talks to NPC
↓
Objective Completes
↓
Rewards Given
↓
Quest Marked Complete
Fluent API for creating quests:
name() - Display namedescription() - Quest descriptionstartCondition() - When quest becomes availableaddObjective() - What player must doaddReward() - What player receivesTrack player progress:
TALK_TO_NPC - Interact with specific NPCKILL_ENTITY - Defeat enemiesCOLLECT_ITEM - Gather itemsREACH_LOCATION - Travel to areaControl quest availability:
firstJoin() - New players onlyhasQuest() - Prerequisite questshasItem() - Inventory requirementsinLocation() - Area requirementsInteractive characters:
addDialog() - Conversation treescondition() - Context-aware responsesonInteract() - Custom behavior.addObjective(
Objective.builder()
.type(ObjectiveType.TALK_TO_NPC)
.target("village_elder")
.build()
)
.addObjective(
Objective.builder()
.type(ObjectiveType.COLLECT_ITEM)
.target("apple")
.count(5)
.description("Collect 5 apples")
.build()
)
// Second quest unlocks after first
.startCondition(
Condition.questCompleted("welcome_quest")
)
.addReward(reward -> reward
.item("gold_coin", 10)
.item("iron_sword", 1)
.experience(100)
.title("Village Friend")
.custom(player -> {
// Custom reward logic
player.unlockAchievement("first_quest");
})
)
.addDialog(
DialogNode.builder()
.text("Need help with something?")
.option("Tell me about the village", "village_info")
.option("Any quests for me?", "quest_offer")
.option("Goodbye", "end")
.build()
)
.startCondition(Condition.timeOfDay(6, 18)) // 6 AM to 6 PM
.expiresIn(Duration.ofHours(1))
.startCondition(Condition.level(5))
.requiresParty(true)
.partySize(2, 4) // 2-4 players
In config/argonath/platform.json:
{
"debug": true,
"logLevel": "DEBUG"
}
/argonath quest status welcome_quest
/argonath quest complete welcome_quest # Force complete for testing
/argonath quest reset welcome_quest # Reset for retesting
Quest not appearing?
NPC not spawning?
Objective not completing?
Now that you’ve created your first quest, explore:
Full working example available at: examples/first-quest
Congratulations! You’ve created your first quest with Argonath Systems. 🎉