Notebook concept implementation - DarkOceanInteractive/project-wendigo GitHub Wiki

Notebook concept

Related PR: https://github.com/DarkOceanInteractive/project-wendigo/pull/38

Usage

For the player

The player can press M to open the maps section of the notebook, L to open the archive (lore), J to open the journal, and the key of the current section or Escape to close the notebook. From there, the player can navigate through sections using the above keys or using the bookmarks on the side of the notebook.

For developers

The notebook API is accessible through the Singletons object.

Adding an entry through code

An entry can be added from anywhere in the code using one of the following functions:

// Add entry by collection entry id
Singletons.Main.Notebook.AddJournalEntryById(0);
// or by collection entry title
Singletons.Main.Notebook.AddArchiveEntryByTitle("Flashlight broke");

// See also
Singletons.Main.Notebook.AddArchiveEntryById(0);
Singletons.Main.Notebook.AddArchiveEntryByTitle("Cave Art 3/6");
Singletons.Main.Notebook.AddJournalMapsById(0);
Singletons.Main.Notebook.AddJournalMapsByTitle("The Mine");

Adding an entry through an event

Event triggers can also add an entry to the notebook using the methods described above (from the Singletons/NotebookManager object):

image

Creating new entries

All possible entries for each section (journal, maps, archive) are listed in the corresponding collection tables. The collection tables are located in Assets/Scripts/Gameplay/Notebook/{Section}/Database. Click on the collection table and add an entry to the list: image image

Demo

Notebook demo