Skip to content
smartargs
VantageDocumentation

Quests reference

The quest log, quest givers and location markers, the quest, objective, reward and requirement assets, and the base classes for your own objectives, rewards and requirements. For how to use it, see Quests.

VtUnitQuestLog

Component. Add it with Add Component → Vantage → Quests → VtUnitQuestLog.

Per-unit quest log. Tracks active, complete, turned-in and failed quests for the holder, fans world events (kills, inventory changes, talks, location ticks) out to each active quest’s objectives, runs time limits and repeat cooldowns, surfaces lifecycle events for your UI, and grants rewards on turn-in.

Inspector fields

Field Type Default Range Description
Location Tick Interval (locationTickInterval) float 0.25 ≥ 0.05 Seconds between polls of reach-location objectives. 0.25 is responsive; raise it for very large logs.

Scripting API

Member Description
IReadOnlyList<VtQuestProgress> Active { get; } Every quest in VtQuestState.Active, in accept order.
IReadOnlyList<VtQuestProgress> Completed { get; } Every quest in VtQuestState.Complete.
IReadOnlyList<VtQuestProgress> TurnedIn { get; } Every quest in VtQuestState.TurnedIn.
IReadOnlyList<VtQuestProgress> Failed { get; } Every quest in VtQuestState.Failed.
event Action<VtQuestDefinition> OnQuestAccepted Fires after Accept, including a repeat or a retry.
event Action<VtQuestDefinition> OnQuestAbandoned Fires after Abandon.
event Action<VtQuestDefinition, VtQuestObjective, int, int> OnObjectiveProgressChanged Fires when an objective’s progress changes: (quest, objective, old, new).
event Action<VtQuestDefinition> OnQuestComplete Fires once when the last objective completes and the quest becomes VtQuestState.Complete.
event Action<VtQuestDefinition> OnQuestTurnedIn Fires after a successful TryTurnIn; rewards are already granted.
event Action<VtQuestDefinition> OnQuestFailed Fires when a quest fails: time limit expired, a protected unit died, or Fail was called.
void Initialize() Cache siblings and subscribe to the world events. Idempotent; public for the late-attach path.
bool Accept(VtQuestDefinition quest) Accept quest: a new quest, a failed quest again, or a repeatable quest whose cooldown has passed. Progress starts from zero. Returns false when the quest is null or IsAvailable is false.
bool Abandon(VtQuestDefinition quest) Drop an active, complete or failed quest. A quest that was turned in before reverts to VtQuestState.TurnedIn so prerequisites keep working; other entries are removed. Returns false when the quest is not in the log or is currently turned in.
bool TryTurnIn(VtQuestDefinition quest) Turn in a complete quest: grants every reward, records the completion and starts the repeat cooldown. Returns false when the quest is not complete.
bool Fail(VtQuestDefinition quest) Fail an active or complete quest. Returns false when it is not in one of those states. Time limits and protected-unit deaths call this internally.
bool ResetRepeat(VtQuestDefinition quest) Clear the repeat cooldown of a turned-in repeatable quest so it can be accepted right away. Call it from your daily or weekly reset.
bool IsActive(VtQuestDefinition q) True while q is VtQuestState.Active.
bool IsCompleteAndUnclaimed(VtQuestDefinition q) True while q is VtQuestState.Complete.
bool IsTurnedIn(VtQuestDefinition q) True while q is VtQuestState.TurnedIn.
bool IsFailed(VtQuestDefinition q) True while q is VtQuestState.Failed.
bool HasEverTurnedIn(VtQuestDefinition q) True when q has been turned in at least once, whatever its state is now. Prerequisites use this, so a repeatable quest that is active again still unlocks its chain.
float GetSecondsRemaining(VtQuestDefinition q) Seconds left on the time limit of an active quest, 0 otherwise.
float GetRepeatCooldownRemaining(VtQuestDefinition q) Seconds until a turned-in repeatable quest can be accepted again, 0 when ready.
bool IsAvailable(VtQuestDefinition q) True when q can be accepted now: not in progress, level and prerequisite quests met, not excluded by a branch already taken, every VtQuestDefinition.requirements entry met, and, for a failed or repeatable quest, ready to be taken again.
int GetProgress(VtQuestDefinition quest, VtQuestObjective objective) Progress on objective within quest, 0 when unknown.
void ApplyQuestLogFromNet(IReadOnlyList<VtQuestProgress> snapshot) Replace every entry with an authoritative snapshot. Bypasses the authority gate. Fires the lifecycle events only for entries that actually changed.
void Tick(float deltaTime) Advance time limits, repeat cooldowns and the reach-location poll by deltaTime seconds. Authority-only.

VtQuestGiver

Component. Add it with Add Component → Vantage → Quests → VtQuestGiver.

Put it on an NPC that offers quests, that talk objectives point at, or both. Players reach it through the normal right-click, walk-to and interact flow, with no extra input wiring.

Inspector fields

Field Type Default Range Description
Offered Quests (offeredQuests) VtQuestDefinition[] Empty Quests this NPC offers. Empty = NPC is a pure talk-target (satisfies talk objectives but doesn’t surface quests). Non-empty = consumer UI should render an offer dialog when OnQuestOffered fires.
Interact Radius (interactRadius) float 2.5 ≥ 0 Distance (world units) within which the player can interact with this NPC. The walk-to-pickup flow stops here.
Dialogue (dialogue) VtDialogueDefinition None Conversation run on the player’s VtUnitDialogue when they interact. Empty = the greeting is shown with the offered quests as answers.
Greeting (greeting) string Empty Line shown when there is no dialogue asset. Empty with nothing to offer = no conversation opens.

Scripting API

Member Description
event Action<VtUnit, VtQuestDefinition[]> OnQuestOffered Fires when a player successfully interacts with this NPC. Args: (player, offeredQuests). Non-null player; offeredQuests may be empty (pure talk-target NPCs). Consumer UI subscribes to render the offer dialog and calls VtUnitQuestLog.Accept on the player’s log when confirmed.
void Initialize() Cache the sibling VtUnit. Idempotent — safe to call any number of times. Call it after adding the component from code.

VtQuestLocationMarker

Component. Add it with Add Component → Vantage → Quests → VtQuestLocationMarker.

Scene-placed marker that names a world location for VtReachLocationObjective to look up by id. Drop one of these onto an empty GameObject at the destination, set locationId to a stable string (“village_square”, “mage_tower”, “treasure_chest_1”), and any quest with a reach-location objective referencing that id will trigger when the holder walks within range.

Inspector fields

Field Type Default Range Description
Location Id (locationId) string Empty Stable string id the reach-location objective references. Convention: lowercase_snake_case. Required.
Gizmo Color (gizmoColor) Color #FFFF0080 Color of the editor gizmo wire sphere drawn when this marker is selected. Helps authors locate quest waypoints in busy scenes.
Gizmo Radius (gizmoRadius) float 2 ≥ 0.5 Wire-sphere radius (editor only — gizmos). Set this to roughly match your quest objectives’ arriveRadius for a useful preview. Has no runtime effect; the actual completion radius is per-objective.

Scripting API

Member Description
static VtQuestLocationMarker Find(string locationId) Look up the registered marker for locationId. Returns null if no marker is currently active for that id (the scene holding the marker isn’t loaded, the marker GameObject is disabled, or the id was never registered). Reach-location objectives use this on every tick.
void Register() Register (or re-register) this marker under its current locationId. Idempotent — safe to call any number of times. Call it after setting locationId from code, because OnEnable runs before the field is set.

VtQuestDefinition

Asset. Create it with Create → Vantage → Quests → Quest Definition.

Authored quest: identity, category, objectives, rewards, prerequisites, requirements, repeat rules and fail conditions. VtUnitQuestLog drives the lifecycle.

Inspector fields

General

Field Type Default Range Description
Id (id) string Empty Stable string identifier for save files and network payloads. Convention: ‘quest..’.
Display Name (displayName) string Empty Name shown in the quest log and the giver dialog.
Description (description) string Empty Quest text shown in the giver dialog and the quest log.

Classification

Field Type Default Range Description
Category (category) VtQuestCategoryDefinition None Category for UI sorting and tinting. Optional.

Objectives & Rewards

Field Type Default Range Description
Objectives (objectives) VtQuestObjective[] Empty Objectives in display order. The quest completes when every one reports IsComplete.
Rewards (rewards) VtQuestReward[] Empty Rewards granted on turn-in, in array order.

Prerequisites

Field Type Default Range Description
Required Level (requiredLevel) int 0 ≥ 0 Minimum holder level to accept. 0 = no gate. Units without a level component count as level 1.
Required Completed Quests (requiredCompletedQuests) VtQuestDefinition[] Empty Every one of these must have been turned in before this quest is offered. Empty = no requirement.
Required Any Of Quests (requiredAnyOfQuests) VtQuestDefinition[] Empty At least one of these must have been turned in. Empty = no requirement. Combine with Required Completed Quests for ‘A and (B or C)’.
Excluded By Quests (excludedByQuests) VtQuestDefinition[] Empty Once any of these has been turned in this quest is never offered. Use it for branches where choosing one path closes the other.
Requirements (requirements) VtQuestRequirement[] Empty Extra conditions on the holder, all of which must pass: items carried, currency, a stat threshold, a unit tag, faction, or your own subclass. Empty = no requirement.

Repeat

Field Type Default Range Description
Repeatable (repeatable) bool Off Can be accepted again after it has been turned in. Progress starts over; the turn-in count is kept for prerequisites.
Repeat Cooldown Seconds (repeatCooldownSeconds) float 0 ≥ 0 Seconds after turn-in before a repeatable quest is offered again. 0 = immediately. Counts in simulation time. For a daily reset, call VtUnitQuestLog.ResetRepeat at your reset moment instead.

Failure

Field Type Default Range Description
Time Limit Seconds (timeLimitSeconds) float 0 ≥ 0 Seconds the holder has to finish the objectives after accepting. 0 = no limit. The timer stops once the quest is complete; it fails if it runs out while still active.
Fail When Tagged Unit Dies (failWhenTaggedUnitDies) VtUnitTagDefinition None The quest fails when any unit carrying this tag dies while the quest is active. Tag the escortee or the caravan and leave everything else untagged.

Scripting API

Member Description
Vector2 graphPosition Where the quest sits in the Quest Graph window. Editor layout only; the quest log ignores it.

VtQuestCategoryDefinition

Asset. Create it with Create → Vantage → Quests → Quest Category.

Authored quest category — Main / Side / Daily / Weekly etc. Each VtQuestDefinition references one category; the category drives UI sort order, tinting, and any consumer-side feature gating (e.g. “show daily quests in a separate tab”). Asset-per-tier and consumer-extensible — same shape as VtItemRarityDefinition.

Inspector fields

Field Type Default Description
Id (id) string Empty Stable string identifier for DB / network payloads. Convention: ‘category.main’, ‘category.daily’. Required.
Display Name (displayName) string Empty UI display name. E.g. ‘Main Story’, ‘Side’, ‘Daily’.
Description (description) string Empty Designer-facing description. Doesn’t affect runtime.
Sort Weight (sortWeight) int 0 Sort priority for quest-log UI ordering. Lower = appears first. Convention: Main 0, Side 100, Daily 200, Weekly 300. Leave gaps for inserts (e.g. ‘Heroic 50’ between Main and Side).
Color (color) Color #FFFFFFFF UI tint applied to the quest’s name / category label in the log. Default Vantage palette: Main = gold, Side = white, Daily = blue, Weekly = purple.
Icon (icon) Sprite None Optional icon shown next to the quest in the log / on the quest-giver indicator. Null for no icon — consumer UI then renders just the tint.

VtKillObjective

Asset. Create it with Create → Vantage → Quests → Objectives → Kill. Inherits VtQuestObjective.

“Kill N units of type X” objective. Matches the killed unit by tag (targetTag) or by direct definition reference (targetDefinition). Both filters are optional and ANDed when both set; if both are null, the objective counts every kill in the world (rarely useful — but lets consumers ship “Kill 1000 of anything” achievement-style quests).

Inspector fields

Field Type Default Range Description
Description (description) string Empty UI text shown in the quest log entry. E.g. ‘Slay 5 wolves’, ‘Collect 10 bluebells’, ‘Talk to the Elder’. Render in your consumer-side log UI; the library doesn’t render it itself.
Required Count (requiredCount) int 1 ≥ 1 Threshold the progress counter must hit for this objective to be Complete. Kill / collect objectives use this as ‘kill N’ / ‘have N in inventory’; binary objectives (talk / reach) ignore values > 1 unless the subclass overrides for distinct-N semantics.
Target Tag (targetTag) VtUnitTagDefinition None Optional. When set, only kills of units carrying this tag count. Pair with VtUnitDefinition.tags. Leave null to skip the tag filter.
Target Definition (targetDefinition) VtUnitDefinition None Optional. When set, only kills of units with this exact definition asset count. Useful for boss-specific quests. Leave null to skip the definition filter.

Scripting API

Member Description
override int OnUnitDied(VtUnit killed, VtUnitId killer, VtUnit holder, int currentProgress) Adds one to the progress when the holder, its summon or a party member sharing credit killed a unit that matches targetTag and targetDefinition.

VtCollectObjective

Asset. Create it with Create → Vantage → Quests → Objectives → Collect. Inherits VtQuestObjective.

“Have N of item X in your inventory” objective. Reads VtUnitInventory.GetCount on every inventory change and sets progress to the current stack count (capped at VtQuestObjective.requiredCount).

Inspector fields

Field Type Default Range Description
Description (description) string Empty UI text shown in the quest log entry. E.g. ‘Slay 5 wolves’, ‘Collect 10 bluebells’, ‘Talk to the Elder’. Render in your consumer-side log UI; the library doesn’t render it itself.
Required Count (requiredCount) int 1 ≥ 1 Threshold the progress counter must hit for this objective to be Complete. Kill / collect objectives use this as ‘kill N’ / ‘have N in inventory’; binary objectives (talk / reach) ignore values > 1 unless the subclass overrides for distinct-N semantics.
Item (item) VtItemDefinition None Item to count in the holder’s inventory. Required — objective is silently skipped if null.

Scripting API

Member Description
override int OnInventoryChange(VtUnitInventory inv, VtUnit holder, int currentProgress) Sets the progress to how many of item the holder carries now, capped at the required count.

VtTalkObjective

Asset. Create it with Create → Vantage → Quests → Objectives → Talk. Inherits VtQuestObjective.

“Talk to NPC matching X” objective. Triggers when the holder interacts with any VtQuestGiver whose unit matches targetTag and/or targetDefinition.

Inspector fields

Field Type Default Range Description
Description (description) string Empty UI text shown in the quest log entry. E.g. ‘Slay 5 wolves’, ‘Collect 10 bluebells’, ‘Talk to the Elder’. Render in your consumer-side log UI; the library doesn’t render it itself.
Required Count (requiredCount) int 1 ≥ 1 Threshold the progress counter must hit for this objective to be Complete. Kill / collect objectives use this as ‘kill N’ / ‘have N in inventory’; binary objectives (talk / reach) ignore values > 1 unless the subclass overrides for distinct-N semantics.
Target Tag (targetTag) VtUnitTagDefinition None Optional. When set, only NPCs carrying this tag count. Pair with VtUnitDefinition.tags to mark ‘Elder’, ‘Merchant’, ‘QuestGiver’ etc. Leave null to skip the tag filter.
Target Definition (targetDefinition) VtUnitDefinition None Optional. When set, only the NPC with this exact definition asset counts. Useful for ‘Talk to Elder Brennan’ specifically. Leave null to skip the definition filter.

Scripting API

Member Description
override int OnTalked(VtUnit npc, VtUnit holder, int currentProgress) Adds one to the progress when the holder talks to an NPC that Matches.
bool Matches(VtUnit npc) True when talking to npc counts for this objective: it carries targetTag and uses targetDefinition, where those are set.

VtReachLocationObjective

Asset. Create it with Create → Vantage → Quests → Objectives → Reach Location. Inherits VtQuestObjective.

“Reach a named world location” objective. Pairs with a VtQuestLocationMarker placed in the scene at the destination — the marker’s VtQuestLocationMarker.locationId must match locationId.

Inspector fields

Field Type Default Range Description
Description (description) string Empty UI text shown in the quest log entry. E.g. ‘Slay 5 wolves’, ‘Collect 10 bluebells’, ‘Talk to the Elder’. Render in your consumer-side log UI; the library doesn’t render it itself.
Required Count (requiredCount) int 1 ≥ 1 Threshold the progress counter must hit for this objective to be Complete. Kill / collect objectives use this as ‘kill N’ / ‘have N in inventory’; binary objectives (talk / reach) ignore values > 1 unless the subclass overrides for distinct-N semantics.
Location Id (locationId) string Empty String id matching a VtQuestLocationMarker.locationId in the scene. The marker’s transform is the destination. Required — objective silently no-ops if no marker is registered for this id.
Arrive Radius (arriveRadius) float 2 ≥ 0.5 Distance (XZ-plane, world units) the holder must be within to trigger completion. 2 = standard ‘walk into the spot’ feel; larger for vague ‘enter the village’ objectives.

Scripting API

Member Description
override int OnLocationTick(VtUnit holder, int currentProgress) Completes the objective once the holder stands within arriveRadius of the marker named locationId.

VtItemQuestReward

Asset. Create it with Create → Vantage → Quests → Rewards → Item. Inherits VtQuestReward.

Quest reward: grant N copies of an item to the recipient’s inventory. No-ops gracefully if the recipient lacks a VtUnitInventory component (e.g. a non-player unit accidentally turning in a quest).

Inspector fields

Field Type Default Range Description
Item (item) VtItemDefinition None Item granted on turn-in. Required — reward silently no-ops if null.
Count (count) int 1 ≥ 1 Number of copies granted. Stackable items merge into one inventory entry; non-stackable items each occupy a separate slot.

Scripting API

Member Description
override void Grant(VtUnit recipient) Adds count copies of item to the recipient’s inventory. Does nothing without an inventory; copies that do not fit are lost.

VtCurrencyQuestReward

Asset. Create it with Create → Vantage → Quests → Rewards → Currency. Inherits VtQuestReward.

Quest reward: credit a currency amount to the recipient’s wallet. No-ops gracefully if the recipient lacks a VtUnitWallet component.

Inspector fields

Field Type Default Range Description
Currency (currency) VtCurrencyDefinition None Currency type credited on turn-in. Required — reward silently no-ops if null.
Amount (amount) int 0 ≥ 0 Amount credited. Negative or zero values no-op (use the wallet API directly if you need to subtract).

Scripting API

Member Description
override void Grant(VtUnit recipient) Adds amount of currency to the recipient’s wallet. Does nothing without a wallet.

VtXpQuestReward

Asset. Create it with Create → Vantage → Quests → Rewards → XP. Inherits VtQuestReward.

Quest reward: credit XP to the recipient’s VtUnitLevel. No-ops gracefully if the recipient lacks the level component (which is the typical case for non-leveling units like merchants or pets).

Inspector fields

Field Type Default Range Description
Xp (xp) int 0 ≥ 0 XP credited on turn-in. Negative or zero values no-op.

Scripting API

Member Description
override void Grant(VtUnit recipient) Credits xp to the recipient’s VtUnitLevel, scaled by its XP gain bonus. Does nothing on a unit that does not level.

VtItemQuestRequirement

Asset. Create it with Create → Vantage → Quests → Requirements → Item. Inherits VtQuestRequirement.

Quest requirement: the holder carries at least count of item in its VtUnitInventory. A holder without an inventory never meets it. The items are not consumed; pair with a collect objective if the quest should take them.

Inspector fields

Field Type Default Range Description
Item (item) VtItemDefinition None Item the holder must carry. Required; a null item never passes.
Count (count) int 1 ≥ 1 Minimum stack count across the whole inventory.

Scripting API

Member Description
override bool IsMet(VtUnit holder) True when the holder’s inventory holds at least count of item.

VtCurrencyQuestRequirement

Asset. Create it with Create → Vantage → Quests → Requirements → Currency. Inherits VtQuestRequirement.

Quest requirement: the holder’s VtUnitWallet holds at least amount of currency. A holder without a wallet never meets it. Nothing is deducted.

Inspector fields

Field Type Default Range Description
Currency (currency) VtCurrencyDefinition None Currency to check. Required; a null currency never passes.
Amount (amount) int 1 ≥ 1 Minimum balance.

Scripting API

Member Description
override bool IsMet(VtUnit holder) True when the holder’s wallet holds at least amount of currency.

VtStatQuestRequirement

Asset. Create it with Create → Vantage → Quests → Requirements → Stat. Inherits VtQuestRequirement.

Quest requirement: the holder’s resolved value for stat is at least minimum. Reads the aggregated stat, so equipment, buffs and attribute formulas all count. Use it for gates such as “Armor 50 or more” or a consumer-authored reputation stat.

Inspector fields

Field Type Default Description
Stat (stat) VtStatDefinition None Stat to compare. Required; a null stat never passes.
Minimum (minimum) float 1 The holder’s resolved stat value must be at least this.

Scripting API

Member Description
override bool IsMet(VtUnit holder) True when the holder’s resolved stat is at least minimum.

VtUnitTagQuestRequirement

Asset. Create it with Create → Vantage → Quests → Requirements → Unit Tag. Inherits VtQuestRequirement.

Quest requirement: the holder carries tag on its unit definition. Use it for class or race gates such as “Mage only” when those are modelled as unit tags. Check invert to require that the tag is absent instead.

Inspector fields

Field Type Default Description
Tag (tag) VtUnitTagDefinition None Tag the holder must carry. Required; a null tag never passes.
Invert (invert) bool Off When checked the holder must NOT carry the tag.

Scripting API

Member Description
override bool IsMet(VtUnit holder) True when the holder carries tag, or lacks it when invert is checked.

VtFactionQuestRequirement

Asset. Create it with Create → Vantage → Quests → Requirements → Faction. Inherits VtQuestRequirement.

Quest requirement: the holder belongs to one of factions. Use it so an NPC offers different quests to different sides.

Inspector fields

Field Type Default Description
Factions (factions) VtFaction[] Empty The holder’s faction must be one of these. Empty never passes.

Scripting API

Member Description
override bool IsMet(VtUnit holder) True when the holder’s current faction is one of factions.

VtQuestStateRequirement

Asset. Create it with Create → Vantage → Quests → Requirements → Quest State. Inherits VtQuestRequirement.

Requirement: a quest is in a given state on the holder’s VtUnitQuestLog. Use it to show a dialogue answer only while a quest is active, or a turn-in answer only once it is complete. A holder without a quest log never meets it.

Inspector fields

Field Type Default Description
Quest (quest) VtQuestDefinition None Quest to check. Required; a null quest never passes.
State (state) VtQuestState Complete State the quest must be in. Available means it could be accepted right now.

Scripting API

Member Description
override bool IsMet(VtUnit holder) True when quest is in state on the holder’s quest log.

VtQuestProgress

Serializable struct.

Per-quest state held in a VtUnitQuestLog: one entry per quest the holder has accepted at some point.

Inspector fields

Field Type Default Description
Quest (Quest) VtQuestDefinition None The quest this entry tracks. Null entries are ignored.
State (State) VtQuestState Available Lifecycle state of the quest in the log.
Objective Progress (ObjectiveProgress) int[] Empty Progress counter per objective, in the same order as the quest’s objectives.
Seconds Remaining (SecondsRemaining) float 0 Seconds left on the time limit while the quest is active. 0 when the quest has no limit.
Times Turned In (TimesTurnedIn) int 0 How many times the quest has been turned in. Prerequisites read this.
Repeat Cooldown Remaining (RepeatCooldownRemaining) float 0 Seconds until a repeatable quest can be accepted again. 0 when ready.

VtQuestObjective

Abstract asset base. Shipped subclasses: VtCollectObjective, VtKillObjective, VtReachLocationObjective, VtTalkObjective.

Abstract authored quest objective. Subclass to ship a new objective type; the four built-ins (VtKillObjective, VtCollectObjective, VtReachLocationObjective, VtTalkObjective) cover ~80% of MMO/ARPG quests, and consumer-authored subclasses ship a new file with one virtual override each (escort, defend, time-limited, deliver, etc.).

Inspector fields

Field Type Range Description
Description (description) string UI text shown in the quest log entry. E.g. ‘Slay 5 wolves’, ‘Collect 10 bluebells’, ‘Talk to the Elder’. Render in your consumer-side log UI; the library doesn’t render it itself.
Required Count (requiredCount) int ≥ 1 Threshold the progress counter must hit for this objective to be Complete. Kill / collect objectives use this as ‘kill N’ / ‘have N in inventory’; binary objectives (talk / reach) ignore values > 1 unless the subclass overrides for distinct-N semantics.

Scripting API

Member Description
bool IsComplete(int progress) True when progress meets or exceeds requiredCount. The log uses this to decide quest completion; subclasses should not override unless they’re encoding non-monotonic progress (rare).
virtual int OnUnitDied(VtUnit killed, VtUnitId killer, VtUnit holder, int currentProgress) Hook fired when any unit dies in the world (via VtUnitStats.OnAnyUnitDied). Default no-op; kill objectives override.
virtual int OnInventoryChange(VtUnitInventory inv, VtUnit holder, int currentProgress) Hook fired when the holder’s VtUnitInventory changes (via VtUnitInventory.OnInventoryChanged). Default no-op; collect objectives override.
virtual int OnTalked(VtUnit npc, VtUnit holder, int currentProgress) Hook fired when the holder talks to a quest-giver / talkable NPC (via VtQuestEvents.OnTalked). Default no-op; talk objectives override.
virtual int OnLocationTick(VtUnit holder, int currentProgress) Hook fired on the quest log’s per-tick coroutine (~4Hz by default). Default no-op; reach-location objectives override to poll distance to a VtQuestLocationMarker.

VtQuestReward

Abstract asset base. Shipped subclasses: VtCurrencyQuestReward, VtItemQuestReward, VtXpQuestReward.

Abstract authored quest reward. Subclass to ship a new reward type; the three built-ins (VtItemQuestReward, VtCurrencyQuestReward, VtXpQuestReward) cover the standard MMO/ARPG turn-in payoff. Consumer-extensible — a “grant a buff” or “unlock a recipe” reward is one file with a Grant override.

Scripting API

Member Description
abstract void Grant(VtUnit recipient) Apply the reward to recipient (the unit whose VtUnitQuestLog is turning in the quest). Authority-gated by the underlying systems (wallet / inventory / level already gate); the reward itself doesn’t need to re-check.

VtQuestRequirement

Abstract asset base. Shipped subclasses: VtCurrencyQuestRequirement, VtDialogueFlagRequirement, VtFactionQuestRequirement, VtItemQuestRequirement, VtQuestStateRequirement, VtStatQuestRequirement, VtTimeOfDayRequirement, VtUnitTagQuestRequirement.

Abstract authored condition a unit must satisfy before a quest is offered to it. Subclass to ship a new gate; the built-ins cover items in the backpack (VtItemQuestRequirement), currency (VtCurrencyQuestRequirement), a stat threshold (VtStatQuestRequirement), a unit tag (VtUnitTagQuestRequirement) and faction (VtFactionQuestRequirement). A reputation, class or custom-flag gate is one file with an IsMet override.

Scripting API

Member Description
abstract bool IsMet(VtUnit holder) True when holder satisfies this condition right now. Called with a non-null holder; return false for anything that cannot be verified.

VtQuestEvents

Static class.

Static event hub for the quest system. One global subscription point per signal that needs world-wide reach without forcing every quest log to subscribe to every potential producer.

Scripting API

Member Description
static event Action<VtUnit, VtUnit> OnTalked Fired when a player interacts with a VtQuestGiver. Args: (npc, player). Both args are non-null. Talk objectives advance from it; your UI may also subscribe to render quest-offer dialogs.
static void RaiseTalked(VtUnit npc, VtUnit player) Raise OnTalked. VtQuestGiver does this on interact; call it yourself only from a custom talk interaction.

Enums

VtFaction

Team or allegiance of a VtUnit. Units of different factions fight each other unless either is Neutral; AI targeting, splash damage and projectiles all respect it.

Value Description
Neutral Unaffiliated or ambient — not targeted, not hostile.
Player The local player and their summons / pets.
Enemy Scripted hostile units (waves, bosses).
Wildlife Passive NPCs (deer, rabbits) — flee when attacked, don’t aggro.

VtQuestState

Lifecycle state of a single quest in a VtUnitQuestLog.

Value Description
Available Not in the log and every prerequisite is met. Computed only.
Active Accepted; objectives in progress.
Complete Every objective satisfied; rewards not yet granted.
TurnedIn Rewards granted. Counts for prerequisites; repeatable quests can be accepted again from here.
Failed Time ran out or a fail condition triggered. Can be accepted again.