Expand description
Native functions for the conditional_progress category — quest progress
behaviors (QuestTemplate::progress_behavior). Output is the new i64
progress value assigned to QuestInstance::current.
Quest progress collapses to ~12 patterns; per-quest constants (level
thresholds, dungeon/currency/rarity ids) are const parameters of generic
fns, registered once per shipped constant. Content uuids baked into
patterns are exported as consts and validated against the config at deploy
time (see [super::validate]).
Structs§
- Conditional
Progress Ctx - Inputs available to a
conditional_progressnative fn.
Constants§
Functions§
- always_
one - Always 1.
- complete_
daily_ quest - complete_
loop_ task_ quest - complete_
weekly_ quest - count_
equipped_ at_ rarity - On
PlayerEquipItem: the number of equipped inventory items whose rarityqis at least the target rarityR’sq; other events leave progress unchanged. - current_
chapter_ level character.current_chapter_level(raw, monotonic). Paired with a quest whoseprogress_targetis the TARGET chapter, so the quest completes exactly when the player reaches that chapter — one behavior gates ANY chapter without a per-threshold const registration (active_quest.current = progress, sois_completediscurrent_chapter >= progress_target). Used by the progress-pass (trophy road) tiers, which span the whole game (chapter-level 20→115; the pass button itself unlocks at chapter-level 20 pergatings.progress_pass_button_unlock_chapter).- increment_
by_ batch_ size quest.current + event.batch_size.- increment_
one quest.current + 1.- log_
in_ today - +1 when the event references the log-in daily quest.
- loop_
task_ collect_ currency CompleteAllLoopTasks→ 100; other custom events → unchanged; otherwisequest.current + amountof the target currency in the event’s currency list, or 0 when the currency isn’t present (preserved from the shipped behavior — note: 0, notquest.current).- loop_
task_ increment_ batch - Loop-task-aware
+batch_sizewith completion valueN. - loop_
task_ increment_ one - Loop-task-aware
+1:CompleteAllLoopTasks→N(the completion target), other custom events → unchanged, else+1. - loop_
task_ pvp_ win - Loop-task-guarded PvP win. A
CompleteAllLoopTaskscustom event force- completes; otherwise the same player-won-PvP gate aspvp_win. - loop_
task_ raid_ dungeon - Loop-task-guarded dungeon raid.
- loop_
task_ reach_ chapter_ level - Loop-task-guarded reach-chapter-level.
- loop_
task_ reach_ level - Loop-task-guarded reach-level:
CompleteAllLoopTasks→ 1, other custom events → unchanged, elseevent.level >= T ? 1 : 0. - pvp_win
EndFightthat the player won in a PvP fight → +1, else unchanged. Theis_wingate is what distinguishes a “Win in the Arena” objective from mere participation — without it a loss would (wrongly) count as a win.- quest_
current_ 0_ then_ 1_ else_ 2 - current 0 → 1, otherwise 2.
- quest_
event_ level_ 1_ then_ 2 - level 1 → 1, level 2 → 2, otherwise 0.
- raid_
dungeon - +1 on a
RaidDungeonevent for dungeonD, or while the active fight is in dungeonD; otherwise unchanged. - reach_
chapter_ level character.current_chapter_level >= T ? 1 : 0(no guard).- reach_
level event.level >= T ? 1 : 0(no loop-task guard).- register
- Register this category’s native fns into the registry.
- upgraded_
abilities_ delta quest.current + Σ (final - current)overevent.upgraded_abilities.
Type Aliases§
- Conditional
Progress Fn - Signature of a
conditional_progressnative fn. Capturelessfnso it isCopyand storable in the registry; context arrives viaConditionalProgressCtx.