QuestLand
Alegacy VS Quest can optionally fire an action string when a player enters/leaves a land claim while they have a matching active quest. This is controlled by an optional quest pack config file: config/questland.json.
QuestLand works as a quest helper — it only activates when the player has an active quest whose ID matches one of the allowedQuestPrefixes. The system checks player positions every 5 seconds and fires enter/exit actions when the player crosses a land claim boundary.
Configuration File
Create assets//config/questland.json:
{
"allowedQuestPrefixes": ["yourmod:"],
"enterAction": "notify '{message}'",
"exitAction": "notify '{message}'",
"defaultExitMessage": "Outside",
"enterMessages": {
"Some Claim": "Entering Some Claim"
}
}Config Keys
| Key | Type | Description |
|---|---|---|
allowedQuestPrefixes | string[] | Array of quest ID prefixes that enable QuestLand for the player. The system chooses the most specific/longest prefix match among active quests. |
enterAction | string | Action string template executed when the player enters a tracked land claim. |
exitAction | string | Action string template executed when the player leaves a tracked land claim. |
defaultExitMessage | string | Localization key for the default exit message (e.g., "albase:questland-bosshunt-exit"). |
enterMessages | object | Map of claim name → localization key for custom enter messages. |
Placeholders
Placeholders are supported inside enterAction / exitAction templates:
| Placeholder | Description |
|---|---|
{message} | The localized enter/exit message (e.g., "Entry: BossHunt"). |
{claim} | The name of the current land claim the player entered. |
{lastclaim} | The name of the previous land claim the player left. |
How It Works
graph TD
A[Player has active quest] --> B{Quest ID matches allowedQuestPrefixes?}
B -->|NO| Z[Nothing happens]
B -->|YES| C{Player moved to new land claim?}
C -->|Entered| D[Fire enterAction]
C -->|Exited| E[Fire exitAction]
D --> F[Check inland objectives]
E --> G[Update last claim]Key Behavior
- Only fires while quest is active — If the player completes or abandons the quest, QuestLand stops tracking.
- Prefix matching — The system uses the longest matching prefix. If
allowedQuestPrefixesis["albase:bosshunt"], it matchesalbase:bosshunt-intro,albase:bosshunt-kill1, etc. - 5-second tick — Position checks run every 5 seconds to avoid performance issues.
- Dimension safe — Teleporting/dimension changes suppress firing to avoid double actions.
- Multiple actions — The
enterAction/exitActioncan contain multiple semicolon-separated actions.
Real-World Example
This is the actual albase quest pack configuration:
{
"allowedQuestPrefixes": ["albase:bosshunt"],
"defaultExitMessage": "albase:questland-bosshunt-exit",
"enterAction": "discover '{message}'; playsound sounds/effect/tempstab-drain 0.55; addplayerattribute alegacyvsquest:questlandmusic 1",
"exitAction": "discover '{message}'; playsound sounds/effect/tempstab-drain 0.35; removeplayerattribute alegacyvsquest:questlandmusic",
"enterMessages": {
"BossHunt": "albase:questland-bosshunt-enter"
}
}What happens when the player enters a BossHunt area:
discover— Shows a discovery notification (e.g., "The darkness of the Ossuary closes in around you.")playsound— Plays a creepy ambient soundaddplayerattribute— Sets a flag for music system
When the player leaves:
discover— Shows exit message (e.g., "The cold of the crypt reluctantly releases you.")playsound— Plays a softer soundremoveplayerattribute— Clears the music flag
Tips
- Use
allowedQuestPrefixesfor specificity — Set it to your quest pack prefix so it only activates for your quests. - Custom messages per claim — Use
enterMessagesto have different flavor text for different areas. - Fallback localization — If no custom message is found, the system uses
alegacyvsquest:questland-enterandalegacyvsquest:questland-exit. - Actions can be anything —
notify,playsound,setattribute,addreputation, etc. Not just notifications. - Combine with inland objective — QuestLand fires notifications, while
inlandobjective tracks quest progress. Use both together.
Related: inland Objective
The inland objective uses land claims as quest objectives:
{
"id": "inland",
"objectiveId": "reach_village",
"args": ["derevnia"]
}This completes when the player enters a land claim named "derevnia".
💡 questland.json is for notifications/actions when entering claims, while inland objective is for quest progress tracking.