https://github.com/insality/defold-quest
Defold Quest System
https://github.com/insality/defold-quest
defold defold-extension defold-library defold-module quest
Last synced: 29 days ago
JSON representation
Defold Quest System
- Host: GitHub
- URL: https://github.com/insality/defold-quest
- Owner: Insality
- Created: 2024-08-03T12:00:17.000Z (10 months ago)
- Default Branch: main
- Last Pushed: 2025-04-30T20:44:44.000Z (about 1 month ago)
- Last Synced: 2025-05-13T03:59:39.683Z (29 days ago)
- Topics: defold, defold-extension, defold-library, defold-module, quest
- Language: Lua
- Homepage:
- Size: 883 KB
- Stars: 7
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
Awesome Lists containing this project
README

[](https://github.com/Insality/defold-quest/tags)
[](https://github.com/Insality/defold-quest/actions)
[](https://codecov.io/gh/Insality/defold-quest)[](https://github.com/sponsors/insality) [](https://ko-fi.com/insality) [](https://www.buymeacoffee.com/insality)
# Disclaimer
The library in development stage. May be not fully tested and README may be not full. If you have any questions, please, create an issue. This library is an adoptation of [Quest](https://github.com/Insality/defold-eva/blob/master/eva/modules/quest.lua) module from my [Defold-Eva](https://github.com/Insality/defold-eva) library.
# Quest
**Quest** - module is a comprehensive system for managing quests in a game. It allows for the registration, tracking, and completion of quests, with various events and callbacks to handle quest-related activities.
## Features
- **Quest Management** - Create, start, and complete quests with ease.
- **Quest Progress** - Track the progress of quests and their tasks.
- **Quest Events** - Listen for quest-related events and adjust it for your needs.## Setup
### [Dependency](https://www.defold.com/manuals/libraries/)
Open your `game.project` file and add the following line to the dependencies field under the project section:
**[Defold Event](https://github.com/Insality/defold-event)**
```
https://github.com/Insality/defold-event/archive/refs/tags/11.zip
```**[Defold Quest](https://github.com/Insality/defold-quest/archive/refs/tags/1.zip)**
```
https://github.com/Insality/defold-quest/archive/refs/tags/1.zip
```After that, select `Project ▸ Fetch Libraries` to update [library dependencies]((https://defold.com/manuals/libraries/#setting-up-library-dependencies)). This happens automatically whenever you open a project so you will only need to do this if the dependencies change without re-opening the project.
### Library Size
> **Note:** The library size is calculated based on the build report per platform
| Platform | Library Size |
| ---------------- | ------------ |
| HTML5 | **3.91 KB** |
| Desktop / Mobile | **7.57 KB** |## API Reference
### Quick API Reference
```lua
quest.init(quest_config_path)
quest.reset_state()-- Events
quest.on_quest_register -- event (quest_id, quest_config)
quest.on_quest_start -- event (quest_id, quest_config)
quest.on_quest_completed -- event (quest_id, quest_config)
quest.on_quest_progress -- event (quest_id, quest_config, delta, total, task_index)
quest.on_quest_task_completed -- event (quest_id, quest_config, task_index)
quest.is_can_start -- event (quest_id, quest_config): boolean
quest.is_can_complete -- event (quest_id, quest_config): boolean
quest.is_can_event -- event (quest_id, quest_config): booleanquest.quest_event(action, object, amount)
quest.get_current(category)
quest.get_progress(quest_id)
quest.get_completed(category)
quest.is_active(quest_id)
quest.is_completed(quest_id)
quest.is_current_with_task(action, object)
quest.is_can_start_quest(quest_id)
quest.start_quest(quest_id)
quest.is_can_complete_quest(quest_id)
quest.complete_quest(quest_id)
quest.force_complete_quest(quest_id)
quest.reset_progress(quest_id)
quest.get_quest_config(quest_id)
quest.update_quests()
quest.set_logger(logger_instance)
```### API Reference
Read the [API Reference](API_REFERENCE.md) file to see the full API documentation for the module.
## Use Cases
Read the [Use Cases](USE_CASES.md) file to see several examples of how to use the this module in your Defold game development projects.
## License
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
## Issues and Suggestions
For any issues, questions, or suggestions, please [create an issue](https://github.com/Insality/defold-quest/issues).
## 👏 Contributors
## ❤️ Support project ❤️
Your donation helps me stay engaged in creating valuable projects for **Defold**. If you appreciate what I'm doing, please consider supporting me!
[](https://github.com/sponsors/insality) [](https://ko-fi.com/insality) [](https://www.buymeacoffee.com/insality)