> For the complete documentation index, see [llms.txt](https://wiki.redmodding.org/scripting-cyberpunk/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://wiki.redmodding.org/scripting-cyberpunk/scripting/game-systems/journal.md).

# Journal

In the game, the journal is the database that references the vast amount of *things* you can either accomplish and/or collect, some of those things being:

* quests, which can be further split into phases and objectives,
* contacts and messages,
* shards,
* tarot cards,
* etc.

With [WolvenKit](https://wiki.redmodding.org/wolvenkit), you're able to open and view all of the entries by opening the path `base/journal/cooked_journal.journal` for the base game and `ep1/journal/cooked_journal.journal` for entries from Phantom Liberty.

You can use the [`JournalManager`](https://nativedb.red4ext.com/JournalManager) to get a reference to a specific journal entry and do whatever with it in scripts.

## Getting An Entry

Each entry in the journal has the following properties:

* a hash, which is the unique id for the entry,
* a path, which is the full path from the top of the dictionary to this entry, and
* class name, which is the entry's respective class name in the game system.

To get a reference to an entry in scripts, you'll either need the entry's hash or the full path with the class name. You can get these properties by looking at the [#dumps](#dumps "mention") section below, which will most likely have the information you need but if you can't find the entry you want you may have to open WolvenKit and manually find the path and class name.

So for example, if you want to get the entry for the heist quest, here's how you can do it:

### Without A Hash

{% tabs %}
{% tab title="Redscript" %}

```swift
let journalManager = GameInstance.GetJournalManager(GetGameInstance());
let entry = journalManager.GetEntryByString("quests/main_quest/prologue/q005_heist", "gameJournalQuest");
```

{% endtab %}

{% tab title="Lua" %}

```lua
local journalManager = GameInstance.GetJournalManager()
local entry = journalManager:GetEntryByString("quests/main_quest/prologue/q005_heist", "gameJournalQuest")
```

{% endtab %}
{% endtabs %}

### With A Hash

{% tabs %}
{% tab title="Redscript" %}

```swift
let journalManager = GameInstance.GetJournalManager(GetGameInstance());
let entry = journalManager.GetEntry(1130542605u);
```

{% endtab %}

{% tab title="Lua" %}

```lua
local journalManager = GameInstance.GetJournalManager()
local entry = journalManager:GetEntry(1130542605)
```

{% endtab %}
{% endtabs %}

## Getting An Entry's State

After you have gotten a reference to the specific entry, you can use [`gameJournalManager#GetEntryState`](https://nativedb.red4ext.com/gameJournalManager#GetEntryState) to get the respective entry's state, which will return one of [the following values](https://nativedb.red4ext.com/gameJournalEntryState).

{% hint style="info" %}
The valid states for your entry may depend on the context of the entry, as it may not resolve into all states.

For example, quest entries may be resolved into all states as quests may fail but for contact messages, you'll either get `Inactive` if the player hasn't received the message or `Active` if they have (may need a fact check), you won't get the other stuff.
{% endhint %}

{% tabs %}
{% tab title="Redscript" %}

```swift
let journalManager = GameInstance.GetJournalManager(GetGameInstance());
let entry = journalManager.GetEntry(1130542605u);
let state = journalManager.GetEntryState(entry); // https://nativedb.red4ext.com/gameJournalEntryState

FTLog(s"\(state)");
```

{% endtab %}

{% tab title="Lua" %}

```lua
local journalManager = GameInstance.GetJournalManager()
local entry = journalManager:GetEntry(1130542605)
local state = journalManager:GetEntryState(entry) -- https://nativedb.red4ext.com/gameJournalEntryState

print(state.value)
```

{% endtab %}
{% endtabs %}

### Listening For Changes

If you want to do something when a specific entry (such as a quest) is updated or has a specific state, look here:

{% content-ref url="/pages/2D2ZK3hfdxbUQRlzbxeh" %}
[Listening to Journal Updates](/scripting-cyberpunk/scripting/game-systems/journal/listening-to-journal-updates.md)
{% endcontent-ref %}

## Dumps

### Quest Dump

A dump with information (such as hashes and description) for all quests.

{% file src="/files/MmhFRPtoPofDaoLLYJmm" %}

### Quest List

{% file src="/files/yf1I2tFpXmAzmTVRPM9K" %}

### Contacts

A dump with information from all contacts and messages.

{% file src="/files/o5TXISxSVIqSZQ6Ee2RE" %}
