QuestingLib is a standalone quest generation library for Java-based games. It provides a flexible, modular system for creating dynamic and replayable quest content that can be easily integrated into any Java game or engine.
- Procedural quest generation
- Modular quest components
- Easy integration into Java projects
- Lightweight and engine-agnostic
- Designed for replayability
Clone the repository and build the library using Gradle:
git clone https://github.com/LotrExtendedTeam/QuestingLib.git
cd QuestingLib
./gradlew build
After building, the compiled outputs will be in the 'QuestingLib/builds' folder.
- Generate Eclipse project files:
./gradlew eclipse
- Open Eclipse → File → Import → General → Existing Projects into Workspace
- Select the
QuestingLibfolder and finish the import.
- Open IntelliJ and select Open or Import.
- Navigate to the QuestingLib folder.
- If prompted, use the Gradle configuration to set up the project.
- Gradle will handle dependencies and project structure automatically.
When prompted, the questing engine returns a quest based on a set of available parameters. The engine’s job is to select a quest that fits the current game context and constraints.
When a quest is requested:
- The engine iterates through a weighted list of quest categories.
- It applies restrictions to eliminate categories and subcategories that don’t fit the current context. 3.Once a valid pool of quests remains, the engine selects one at random. This ensures both structure (via weighting and rules) and variety (via randomness).
- Categories define broad quest types, such as:
- Single-goal vs multi-goal
- Procedurally generated vs statically authored
- Categories can contain subcategories to further specialize behavior.
Restrictions prevent certain quests from appearing under specific conditions.
Examples of restrictions include:
- Biomes / regions
- Time of day
- NPC presence
- Player alignment
- Held items
- World state flags
When a quest is requested, the engine first generates a context object that describes the current environment and situation. This context is then:
- Passed to quest categories to rule out invalid subcategories.
- Passed to subcategories to validate parameters and generate eligible quests.
- The engine should be created when the implementing project parameters are valid.
- All quest categories, subcategories, and restriction types are registered at initialization time.
- This registration is not done inside the library.
- Instead, the implementing project is responsible for defining and registering its own categories, subcategories, and rules.