Working with Quests
Quests are meant to be created through the Editor Window, which will automatically updated the quest database. Editing quests through code is not a recommended task but can be necessary for some use cases, like procedural generation.
Creating a Quest
A quest can be created by using it's constructor.
When a quest is created, it's not automatically added to the database. This needs to be done manually.
Database
Quests can be added and removed from the database at runtime. All your created quests shouldn't be stored in memory, especially not if you have a lot of them. It's a good idea to add your quests to the database if you believe the game would need to access them at a later time.
Locking
Quests are designed to be automatically updated in the database as their data changes in-game. When certain properties are edited, a database update is performed right away. You can prevent this from happening by setting the updateLock
value to true
before making any changes. This lock is only on the instance of the quest rather than the database itself.
After making your changes, simply set the lock off.
Adding to the Database
Removing from the Database
Last updated