Skip to content

SalmanShhh/C3Addon_SimpleQuests

Repository files navigation


Simple Quests

A lightweight quest and objective tracking system. Create named tasks, track counter and timed progress, attach rewards, and respond to events when things complete or fail. Works for quests, missions, tutorials, achievements, and more.

Version 1.0.0.0


See all releases

What's New in 1.0.0.0

Added: initial release!

View full changelog


Author: SalmanShh
Made using CAW

Table of Contents


Usage

To build the addon, run the following commands:

npm i
npm run build

To run the dev server, run

npm i
npm run dev

Examples Files


Properties

Property Name Description Type
Auto-fail on timer expiry Automatically fail timed objectives when their time limit runs out. check
Allow replay Allow completed or failed quests to be restarted via Reset Quest. check
Max active quests Maximum simultaneous active quests. 0 = unlimited. integer
Debug mode Log all state changes to the browser console. check

Actions

Action Description Params
Add Counter Objective Adds a count-up goal to a quest. The objective completes automatically when the player hits the target. Use Add to Counter each time progress is made. Example: 'Kill 10 enemies' with a target of 10. Quest ID (string)
Objective ID (string)
Text (string)
Target (number)
Add Task Objective Adds a simple check-off task to a quest. Call Complete Objective when the player finishes it. Good for one-time actions like talking to an NPC, picking up a key, or reaching a room. Quest ID (string)
Objective ID (string)
Text (string)
Add Timed Objective Adds a time-limited challenge to a quest. Call Start Objective Timer when the countdown should begin. If time runs out, On Timed Objective Expired fires. Example: 'Escape the dungeon' with a 30-second limit. Quest ID (string)
Objective ID (string)
Text (string)
Add to Counter Increases a counter objective's progress by the given amount. If the total reaches the target, the objective completes automatically. Call this whenever the relevant thing happens — like when the player kills an enemy. Quest ID (string)
Objective ID (string)
Amount (number)
Complete Objective Manually marks a task or timed objective as done. Use this when the player finishes a task — for example, when they collide with an NPC or step on a pressure plate. Quest ID (string)
Objective ID (string)
Fail Objective Manually marks an objective as failed. If it's the last required objective, the quest will auto-fail too. Use this when the player misses a condition — like destroying something they needed to protect. Quest ID (string)
Objective ID (string)
Set Counter Sets a counter objective to a specific value, overwriting the current progress. Useful if you're syncing the quest counter to an existing game variable rather than incrementing step by step. Quest ID (string)
Objective ID (string)
Value (number)
Start Objective Timer Starts the countdown on a timed objective. Place this action when the challenge actually begins — not when you add the objective. When time runs out, On Timed Objective Expired fires. Quest ID (string)
Objective ID (string)
Time Limit (number)
Complete Quest Marks the quest as successfully finished. Fires the On Quest Completed trigger — good for giving rewards, showing a completion screen, or unlocking the next quest. Quest ID (string)
Create Counter Quest Creates and starts a quest with a single counter objective — all in one step. Great for simple quests like 'collect 10 coins'. Leave Objective ID blank to auto-name it as questID & "_obj". Quest ID (string)
Title (string)
Description (string)
Objective ID (string)
Objective Text (string)
Target (number)
Create Quest Sets up a new quest that hasn't started yet. Call Start Quest when you want the player to begin it. Tip: use short IDs with no spaces, like "deliver_package" or "quest_1". Quest ID (string)
Title (string)
Description (string)
Create Task Quest Creates and starts a quest with a single task objective — all in one step. Great for quests like 'talk to an NPC' or 'reach a location'. Call Complete Objective when the task is done. Leave Objective ID blank to auto-name it as questID & "_obj". Quest ID (string)
Title (string)
Description (string)
Objective ID (string)
Objective Text (string)
Create Timed Quest Creates and starts a quest with a single timed objective — all in one step. Great for escape sequences or race challenges. Fires On Timed Objective Expired if time runs out. Access the objective later using the Objective ID param (or questID & "_obj" if left blank). Quest ID (string)
Title (string)
Description (string)
Objective ID (string)
Objective Text (string)
Time Limit (number)
Delete Quest Completely removes a quest and all its data. Good for cleaning up short one-off quests once they're done. This cannot be undone. Quest ID (string)
Fail Quest Marks the quest as failed. Fires the On Quest Failed trigger — use it when the player misses a deadline, dies, or makes a choice that cancels the quest. Quest ID (string)
Remove Quest Tag Removes a label from a quest. Use this if a quest no longer belongs to a group, like removing a "daily" tag after the day resets. Quest ID (string)
Tag (string)
Reset Quest Sends the quest back to its starting state so it can be played again. Only works on completed or failed quests if 'Allow Replay' is turned on in the plugin properties. Quest ID (string)
Set Quest Tag Adds a label to a quest so you can group and filter quests. For example, tag quests as "daily" or "main" to reset them together or check them as a group. Quest ID (string)
Tag (string)
Start Quest Makes the quest active so the player can work on it. Fires the On Quest Started trigger — use that to show a 'New Quest!' notification or play a fanfare sound. Quest ID (string)
Track Quest Marks one quest as the 'active' quest shown in your HUD. Use TrackedQuestID() to get the ID and display its title and progress. Only one quest can be tracked at a time. Quest ID (string)
Untrack Quest Clears the tracked quest so nothing is highlighted in your HUD. Useful when the player closes the quest log or all quests are complete.
Add Reward Attaches a reward to a quest so it can be given when the quest completes. Choose a type to help your game know what to grant. Call Claim Rewards to actually hand out the rewards. Quest ID (string)
Reward ID (string)
Type (combo)
Name (string)
Quantity (number)
Claim Rewards Fires On Reward Claimed once for each unclaimed reward, then marks them as claimed so they can't be given again. Call this after the player dismisses the completion screen. Quest ID (string)
Delete Quests by Tag Permanently removes all quests with a given label. Use this for roguelike-style games where each run creates new quests with a "run" tag — delete them all when the run ends to start fresh. Tag (string)
Load State from JSON Restores all quest data from a JSON string you previously saved. Call this when your game loads — pass in the string from Construct's save system or a storage variable. All quests, objectives, and rewards are restored exactly as they were. JSON String (string)
Reset Quests by Tag Resets all quests with a given label back to inactive in one action. Useful for daily quest systems — tag all daily quests as "daily", then call this at midnight to reset them all at once. Tag (string)

Conditions

Condition Description Params
All Objectives Complete True if every required objective on the quest is done. Note: the quest does NOT auto-complete — call Complete Quest yourself when this is true, giving you full control over timing and rewards. Quest ID (string)
Objective is Complete True if the specific objective is done. Use this to decide whether to give partial rewards, update an NPC's dialogue, or show a checkmark in your UI. Quest ID (string)
Objective ID (string)
On Counter Updated Runs every time a counter objective's value changes. Enter a Quest ID to only fire for counters on that quest — leave blank to fire for any quest. Use TriggerCounterValue() to get the new number. Quest ID (string)
On Objective Completed Runs when an objective is marked complete. Enter a Quest ID to only fire for objectives on that quest — leave blank to fire for any quest. Use TriggerObjectiveID() to know which objective finished. Quest ID (string)
On Objective Failed Runs when an objective fails. Enter a Quest ID to only fire for objectives on that quest — leave blank to fire for any quest. Use TriggerObjectiveID() to see which objective failed. Quest ID (string)
On Timed Objective Expired Runs when a timed objective's countdown reaches zero. Enter a Quest ID to only fire for timers on that quest — leave blank to fire for any quest. Use TriggerObjectiveID() to know which timer ran out. Quest ID (string)
Has Any Active Quests True if the player is currently working on at least one quest. Use this to show or hide the quest tracker HUD — hide it when nothing is active.
Has Any Active Quests with Tag True if any active quests share a specific label. For example, check if any 'daily' quests are still running before hiding the daily quest panel. Tag (string)
On Quest Completed Runs when a quest is completed. Enter a Quest ID to only fire for that specific quest — leave blank to fire for any quest. Good for giving rewards, showing a completion animation, or unlocking the next quest. Quest ID (string)
On Quest Failed Runs when a quest fails. Enter a Quest ID to only fire for that specific quest — leave blank to fire for any quest. Use this to play a sad sound, show a retry button, or lock off content. Quest ID (string)
On Quest Started Runs when a quest becomes active. Enter a Quest ID to only fire for that specific quest — leave blank to fire for any quest. Use TriggerQuestID() to get the quest that started. Quest ID (string)
On Tracked Quest Changed Runs when the player's tracked quest changes or is cleared. Enter a Quest ID to only fire when that specific quest becomes the tracked one — leave blank to fire on any change. Use TriggerQuestID() to get the new tracked quest ID. Quest ID (string)
Quest Exists True if a quest with this ID has been created. Use as a safety check before reading quest data, or to see if a quest has been given to the player yet. Quest ID (string)
Quest Has Tag True if the quest has a specific label. Use this to show different icons for 'main' vs 'side' quests, or to check if a quest is part of a group before resetting it. Quest ID (string)
Tag (string)
Quest is Active True if the quest is currently in progress. Use this to show quest UI or decide what NPCs say while a quest is running. Quest ID (string)
Quest is Completed True if the quest was successfully finished. Use this to unlock new areas, show completed checkmarks in a quest log, or prevent repeated dialogue. Quest ID (string)
Quest is Failed True if the quest has failed. Use this to play a failure animation, disable a path, or offer the player a retry option. Quest ID (string)
Quest is Tracked True if this is the quest currently shown in your HUD. Use this to highlight a quest in a list — if it's tracked, draw a marker or bold text next to it. Quest ID (string)
Has Pending Reward True if the quest has rewards waiting to be claimed. Use this to show a '!' badge on a quest, or to decide whether to show the rewards screen after completion. Quest ID (string)
On Reward Claimed Runs once for each reward when Claim Rewards is called. Enter a Quest ID to only fire for rewards from that quest — leave blank to fire for any quest. Use TriggerRewardName(), TriggerRewardType(), and TriggerRewardQuantity() to apply the reward. Quest ID (string)
On Rewards Ready Runs when a quest completes and has unclaimed rewards. Enter a Quest ID to only fire for that specific quest — leave blank to fire for any quest. This is a good place to show a rewards popup before calling Claim Rewards. Quest ID (string)

Expressions

Expression Description Return Type Params
CompletedObjectiveCount Returns how many required objectives are done. Pair with ObjectiveCount() to show progress like '2 of 3 objectives complete'. number Quest ID (string)
CounterProgress Gets the current counter value for a counter objective. Use this to show progress like '6 / 10 enemies killed'. number Quest ID (string)
Objective ID (string)
CounterProgressPercent Returns counter completion as a number from 0 to 100. Set a progress bar's width to CounterProgressPercent() / 100 multiplied by the bar's max width. Example: 60 means 60% done. number Quest ID (string)
Objective ID (string)
CounterTarget Gets the target count for a counter objective. Use this alongside CounterProgress() to display progress like '6 / 10 enemies killed'. number Quest ID (string)
Objective ID (string)
ObjectiveCount Returns the total number of objectives on a quest. Use this to show '3 objectives' in a quest details panel, or to loop through all objectives to build a list. number Quest ID (string)
ObjectiveText Gets the display text of an objective. Use this to fill in rows in a quest log list — show the text next to a checkbox or bullet point. string Quest ID (string)
Objective ID (string)
TimerRemaining Returns the seconds left on a timed objective's countdown. Update a timer label every tick using this expression. Returns 0 when expired. number Quest ID (string)
Objective ID (string)
TriggerCounterValue Inside On Counter Updated, returns the counter's new value at the moment it changed. Use this to update a live progress display without calling ObjectiveProgress() separately. number
TriggerObjectiveID Inside an objective trigger, returns the ID of the objective that caused the event. Use this to look up the objective's text or progress. Do not use this outside of an objective trigger. string
ActiveQuestCount Returns how many quests are currently active. Use this to show a badge like '3 active quests' on your quest log button, or to enforce a quest limit. number
CompletedQuestCount Returns how many quests have been completed. Use this for a progress counter like '4 / 10 quests completed' or to unlock an achievement. number
QuestDescription Gets the description text of a quest. Use this to fill in a quest details panel when the player selects a quest from the log. string Quest ID (string)
QuestsByTagAsJSON Returns a JSON array of quest IDs that share a tag, like ["quest_1","quest_2"]. Useful for listing all quests in a category. Parse it with Construct's JSON object to build a quest list UI. string Tag (string)
QuestState Returns the quest's current state as text: "inactive", "active", "completed", or "failed". Useful for displaying a status label or storing the state in a variable. string Quest ID (string)
QuestTitle Gets the display title of a quest. Use this to show the quest name in your HUD. Example: set a Text object's text to QuestTitle("my_quest"). string Quest ID (string)
TrackedQuestID Returns the ID of the quest currently shown in your HUD. Use with QuestTitle() and other expressions to populate your tracker. Returns an empty string if no quest is tracked. string
TriggerQuestID Inside any quest, objective, or reward trigger, this returns the ID of the quest that caused the event. Use it to look up that quest's title or show the right info. Do not use this outside of a trigger. string
RewardName Gets the display name of a specific reward on a quest. Use this to list rewards in a quest preview screen before the player accepts the quest. string Quest ID (string)
Reward ID (string)
RewardQuantity Gets the quantity of a specific reward. Use this alongside RewardName() to display '× 100 Gold' in a rewards preview. number Quest ID (string)
Reward ID (string)
RewardType Gets the type of a specific reward ("item", "currency", "xp", etc.). Use this to decide what icon to show next to a reward name in your UI. string Quest ID (string)
Reward ID (string)
TriggerRewardName Inside On Reward Claimed, returns the name of the reward being claimed right now. Use this to display a message like 'You received: Gold Coins!' or add it to an inventory list. string
TriggerRewardQuantity Inside On Reward Claimed, returns the quantity of the reward being claimed. Use this with TriggerRewardType() to give the right amount — like adding TriggerRewardQuantity() to the player's gold variable. number
TriggerRewardType Inside On Reward Claimed, returns the type of the reward being claimed. Use this to branch your logic — add XP to a level-up system, add items to an inventory, or add currency to a wallet. string

Changelog

Version 1.0.0.0

Added: initial release!


Version 0.2.0.0


Version 0.1.0.0

Added:

  • Create "Quick Start" ACEs
  • simplify the number of ACEs.

Version 0.0.1.0

Added: Quest.

  • Create, start, complete, fail, reset, and delete quests by ID
  • Quests have title, description, and state (inactive / active / completed / failed)
  • Auto-completes a quest when all required objectives finish
  • Set and clear a tracked quest for driving HUD displays
  • Freeform tag system — apply multiple tags per quest; bulk reset or delete quests by tag
  • Key/value custom data store per quest (Set Quest Data / QuestData)
  • Plugin property: Max Active Quests (0 = unlimited)
  • Plugin property: Allow Replay — lets completed/failed quests be reset

Objectives.

  • Four objective types: Counter (auto-completes at target), Flag, Timed, Location
  • Two order modes: Parallel (all active at once) and Sequential (one unlocks after the previous completes)
  • Mark individual objectives as Optional so they don't block quest completion
  • Counter objectives fire On Counter Updated on every change with TriggerCounterValue
  • Timed objectives tick via Construct's native tick system; fire On Timed Objective Expired on timeout
  • Plugin property: Auto-fail on timer expiry

Rewards Attach rewards to quests with types: "item", "currency" , "xp", "unlock", "custom" On Reward Ready fires at quest completion when unclaimed rewards exist Claim Rewards fires On Reward Claimed once per reward with full context expressions

Save & Load support.


Version 0.0.0.0

Added: Initial release.


About

No description, website, or topics provided.

Resources

Stars

2 stars

Watchers

0 watching

Forks

Packages

 
 
 

Contributors