Quest Progression System
Quests, achievements, dailies and unlock trees as pure data. Your game reports one line; compound objectives, party requirements, timer-free daily resets and progression trees handle the rest.
by GMSKIII
Price History +
ENGLISH
Quest logic is easy to start and hard to finish. Compound objectives ("clear 1-4 twice at rank S AND collect 300 gold"), daily quests that must reset even while the game was closed, prerequisite trees added late in production, and progress that has to fit into a save file you already shipped — this module takes all of it.
Your game reports what happened in one line:
quests.Report("enemy.defeated", "slime");
Which quests count that report is decided by the quest assets, so adding a hundred quests adds zero lines to your game code.
WHAT YOU CAN AUTHOR, WITHOUT WRITING CODE
- Count objectives by target id, by tag ("defeat 5 undead"), or by excluding a tag
- Summed amounts ("collect 300 gold in total") and maximum values ("reach a 25 combo")
- Minimum rank and situation flags ("only rank-S boss fights count")
- Combine objectives with AND, OR, or at-least-N
- One-shot, infinitely repeatable, or limited repeats ("up to three times")
- Daily / weekly / monthly / fixed-interval resets, in local time or UTC
- Prerequisite unlock trees, including branching routes and hidden quests
- Party composition objectives: a named leader, class tags, and an exact party size
RESETS THAT SURVIVE BEING OFFLINE
Elapsed-time timers only advance while the app runs, so dailies silently fail to reset when the date changes with the game closed. This system computes the start of the current period and resets when it differs from the saved one. Launch after three months away and the daily resets once, the weekly resets once, correctly.
IT DOES NOT REPLACE YOUR SAVE SYSTEM OR YOUR UI
Storage is an interface. PlayerPrefs and JSON-file implementations are included, but most projects embed the progress in their existing save with one string (ToJson / LoadFromJson). The persisted data is plain public fields, and quests that never progressed create no record at all.
No UI prefabs are included — a quest log's look is the game's identity, and a prebuilt one is almost always thrown away. Instead every value a UI needs is computed for you: state, progress ratio, per-objective counts, reset countdown, and even tree-diagram coordinates for a progression screen.
EXTENSIBLE WITHOUT MODIFYING THE ASSET
Action keys are strings, so new actions never require editing the asset's source (an optional catalog asset turns them into inspector dropdowns). An event filter lets you inject rules that data cannot express. Replace the clock to trust server time instead of the device clock, and replace the store for cloud or encrypted saves.
INCLUDED
Full C# source behind assembly definitions, editor tooling (custom inspector, collapsed objective rows, action-key dropdowns, automatic registry collection and pre-build baking), a one-click showcase scene that demonstrates every feature in eighteen captioned steps, four minimal samples, a self-test menu that verifies the asset in your own Unity version, and complete documentation in both English and Japanese.
JAPANESE
クエストの実装は、始めるのは簡単で終わらせるのが大変です。複合条件(「1-4 をボスS勝利で2回 かつ 金貨を300集める」)、アプリを閉じている間に日付が変わってもリセットされなければならないデイリー任務、開発終盤で欲しくなる任務ツリー、そして既にリリースしたセーブ形式に収めなければならない進捗——それらを丸ごと引き受けるモジュールです。
ゲーム側が書くのは1行だけです。
quests.Report("enemy.defeated", "slime");
どのクエストがこれを数えるかはクエストアセット側の条件が決めるため、クエストを100件追加してもゲームコードは1行も増えません。
■ コードを書かずに作れるもの
・対象ID指定/タグ指定(「アンデッドを5体」)/除外タグでのカウント条件
・数量の合計(「金貨を合計300枚」)と最大値の到達(「最大コンボ25」)
・ランク下限と状況フラグ(「ボス戦かつS勝利のみ」)
・条件の結合(AND/OR/3つのうち2つ以上)
・1度限り/無限周回/回数上限つき周回(「1日3回まで」)
・デイリー/ウィークリー/マンスリー/固定間隔のリセット(ローカル時間・UTC選択可)
・前提クエストによる解放ツリー(分岐ルート・隠しクエストにも対応)
・編成条件(リーダー指定・職業タグ・ちょうど◯人)
■ 起動していない間もずれないリセット
経過時間タイマー方式は、アプリが動いている間しか進みません。そのため閉じている間に日付が変わるとデイリーが更新されない、という不具合が起きます。本アセットは「今が属する周期の開始時刻」を求め、セーブされた値と違えばリセットします。3か月ぶりに起動しても、デイリーは1回だけ・ウィークリーも1回だけ正しくリセットされます。
■ セーブ機構もUIも置き換えません
保存先はインターフェースです。PlayerPrefs/JSONファイルの実装を同梱していますが、実際には「自分のセーブデータに文字列1つで埋め込む」形が最も多く使われます。進捗データは public フィールドのみで構成され、一度も進捗が動いていないクエストはレコードすら作りません。
UIプレハブは同梱していません。クエストログの見た目はゲームの個性そのもので、既製UIはほぼ確実に作り直しになるからです。代わりに、状態・進捗率・条件別カウント・リセットまでの残り時間、さらに任務ツリー画面用の座標まで、UIが必要とする値を全て計算して返します。
■ アセットを改造せずに拡張できます
行動キーは文字列なので、行動を増やすためにアセット本体を書き換える必要がありません(任意の語彙表アセットを作ればインスペクタのドロップダウンになります)。データで表現しきれないルールはイベントフィルタで差し込めます。時計を差し替えればサーバー時刻基準にでき、保存先を差し替えればクラウドセーブや暗号化セーブにも対応します。
■ 収録内容
アセンブリ定義で分離されたフルC#ソース、エディタ拡張(専用インスペクタ・条件の折りたたみ表示・行動キーのドロップダウン・レジストリの自動収集とビルド直前の自動焼き込み)、全機能を18ステップで実演するワンクリック構築のデモシーン、最小構成のサンプル4種、あなたのUnityバージョンで動作を検証する自己診断メニュー、そして日英両方の完全なドキュメント。