Journal: Osiris Calls
This page outlines the Osiris calls to use when working with the journal in script. If you're unfamiliar with the journal, we recommend familiarising yourself with it via the pages linked in Introduction to the Journal. For more on Osiris calls, see Osiris API.
Functions
QuestUpdate
QuestUpdate((CHARACTER)_Player, (STRING)_QuestID, (STRING)_EntryID)
- Use the
QuestUpdate
call to unlock a quest step. QuestUpdate
always requires the parent quest ID to give out updates, even when updating a subquest.- The
QuestUpdate
call will also respect the quest step property to add or close the quest for you. - NOTE: Adding or Closing a quest does not automatically give you a journal update. It just changes the quest state. You will always want to provide a quest update after adding or before closing a quest.
QuestUpdate((STRING)_QuestID, (STRING)_EntryID)
- Overloads the engine call:
QuestUpdate(_Player, _Quest, _Entry);
- You don’t have to pass the player; since the quest is shared, everybody should get the update anyway.
QuestAdd
QuestAdd((CHARACTER)_Player, (STRING)_QuestID)
- Remember that you need to accept a quest before it will show up in the UI. If your quest step does not unlock the quest for you, you can also manually unlock it through the
QuestAdd
call. - It’s better to avoid starting quests with this call and instead rely on
QuestUpdate
.
QuestClose
QuestClose((STRING)_QuestID)
- Similarly, if your quest steps don't close the quest for you, you can manually close it with the
QuestClose
call. - It’s better to avoid closing quests with this call and instead rely on
QuestUpdate
.
QuestSetCategory
QuestSetCategory((STRING)_QuestID, (STRING)_CategoryID)
- Changes the quest's category to a new one.
- This is useful in a scenario where a quest transitions to a new region, so you can move it to the next region category (probably with an update).
Events
QuestAccepted
QuestAccepted((STRING)_Character, (STRING)_QuestID)
- This is triggered when a quest or subquest is added/opened/unlocked by a character.
- The
_QuestID
is the quest or subquest that has been accepted.
QuestUpdateUnlocked
QuestUpdateUnlocked((STRING)_Character, (STRING)_QuestID, (STRING)_StepID)
- This is triggered when a quest update is unlocked for a character.
- The quest itself may not yet have been added/opened/unlocked. This event receives the top-level parent quest as the
_QuestID
parameter, even if a subquest update got unlocked.
SubQuestUpdateUnlocked
SubQuestUpdateUnlocked((STRING)_Character, (STRING)_QuestID, (STRING)_StepID)
- This is triggered when a subquest update is unlocked for a character.
- The subquest itself may not yet have been added/opened/unlocked. This event is only thrown for subquest updates, and receives the subquest ID as parameter.
QuestClosed
QuestClosed((STRING)_QuestID)
- This is triggered when a quest is closed.
- The
_QuestID
is the quest or subquest that has been closed. - After this event is thrown, no further (Sub)
QuestUpdateUnlocked
events will be thrown anymore for this quest.
Queries
QuestIsAccepted
QuestIsAccepted((STRING)_Character, (STRING)_QuestID, [out](INTEGER)_Bool)
- Returns whether the quest has been added/opened/unlocked.
- Keeps returning true even after the quest gets closed.
- The
_QuestID
can be either a top-level quest or a subquest. - The
_Character
parameter can be nil for non-character level quests.
QuestUpdateIsUnlocked
QuestUpdateIsUnlocked((STRING)_Character, (STRING)_QuestID, (STRING)_QuestStep, [out](INTEGER)_Bool)
- Returns whether a particular quest update has been unlocked yet for a certain quest.
- The
_QuestID
parameter must be a top-level quest, even if the update is from a subquest. - The character parameter can be nil, in which case it simply checks if anyone unlocked an update.
QuestIsClosed
QuestIsClosed((STRING)_QuestID, [out](INTEGER)_Bool)
- Returns whether the quest has been closed.
- The
_QuestID
can be either a top-level quest or a subquest. - NOTE: It always returns false if the quest has not yet been explicitly closed, even while it has not yet been accepted/added/opened/unlocked.
QuestUpdateExists
QuestUpdateExists((STRING)_Character, (STRING)_QuestID, (STRING)_QuestStep, [out](INTEGER)_Bool)
- Returns whether a particular quest update exists in the journal file for a certain quest.
- The
_QuestID
parameter must be a top-level quest, even if the update is from a subquest.
QuestUpdateGetTopLevel
QuestUpdateGetTopLevel((STRING)_QuestID, (STRING)_QuestStep, [out](INTEGER)_TopLevelQuestID)
- Given a quest and a quest update, returns the ID of the top-level quest to which this quest/quest-update pair belongs.
- The quest can already be a top-level quest, in which case the same quest is returned.