# Codexcraft What the player knows and how the game teaches it, for multiplayer games. Four components, each usable alone and wired to the others when they sit together, with every function as a Blueprint node and no other plugin needed. - **Codex**: entries in a table, unlocked on the server, by player or shared by the team. Sections that open after the entry, entries that bring others with them, closed slots with a hint, read marks, progress per category. - **Notices**: a queue of messages on each player's screen. Channels with four queue modes (queue, stack, replace, drop if busy), priority that cuts in, the same notice counting up, pause for cutscenes. - **Tutorials**: an event or a rule about the game (health low, bag full) starts one, and events or rules move its steps. What the player already did is not asked again, a finished tutorial never comes back in a later session, and a stuck player is reminded. A step can point at a place in the world or a part of the UI. - **Inspection**: the player turns and zooms a model, reads a document page by page and plays a recording. Looking at the thing is what puts it in the codex. - **Screens**: the codex (with search, filter and order), the notices of each channel, the inspection screen and the tutorial's marker. Mouse, keyboard and gamepad. Logic in C++, look in Widget Blueprints you can replace. - **Keys in texts**: `{Action:Jump}` in any text shows the key the player has on that action now, on the device in use, rebinds included. - **Three languages**: every text of the plugin and the demo is localizable, with English, Portuguese and Spanish included. The server changes everything that is kept. Clients read and ask. ## Start in 5 steps 1. On your **PlayerState**, add the components you want: **Codexcraft Codex**, **Codexcraft Notices**, **Codexcraft Tutorial**, **Codexcraft Inspection**. 2. On your **GameState**, add **Codexcraft Codex** if some entries are shared by a team. Leave it out and team entries become personal. 3. Create Data Tables with the row structs you need (**CDXEntryRow**, **CDXTutorialRow**, **CDXInspectRow**, and optionally **CDXCategoryRow**, **CDXNoticeChannelRow**, **CDXNoticeRow**) and set them in **Project Settings > Plugins > Codexcraft**. 4. On the server, call **Unlock Entry For** with the player's pawn and the entry tag. Anywhere, call **Report Tutorial Event** when the player does something worth teaching, and **Open Inspection** from your interaction. 5. Add `WBP_CDXCodex`, `WBP_CDXNoticeToasts` and `WBP_CDXInspect` to the viewport. Tags are your own gameplay tags. The codex works with no table at all: an unlocked tag with no row is a plain flag you can ask about with **Is Unlocked**. The demo level is `/Codexcraft/Demo/L_CDXDemo`. Its tables (`DT_CDXDemo...`) show every field in use, and the classes in the `CodexcraftExample` module are the smallest working setup: a PlayerState and a GameState with the components, pads that call the server nodes, and stands that open the inspection. ## How the four fit together | When | What happens by itself | |---|---| | An entry or a section unlocks | The player's Notices show "New entry: ..." (the row's Announce Unlock turns it off) | | A tutorial step comes up | It is shown as a notice in the tutorial channel, with its count, until the step changes | | A tutorial ends | Its Unlocks Entry goes to the codex | | A tutorial lists Required Entries | It waits for the codex to have them | | An inspection opens | The codex is asked for the row's Unlocks Entry, and the tutorials are told the row's Reports Event | | The player reaches a page of a document | The codex is asked for the section in the same position of Page Unlocks Sections | Each link is looked for on the same actor and skipped when the other component is not there. ## Codex ### The entry table (CDXEntryRow) | Field | What it does | |---|---| | Entry Tag | Identifies the entry everywhere. | | Category Tag | The tab it is listed under. | | Title, Summary, Body, Image, Audio | Shown by the codex screen. Summary is also the body of the unlock notice. | | Audio Caption | What the audio says, on screen while it plays. | | Video | A Media Source the screen plays where the picture goes, on a loop and with no sound of its own (see Video below). | | Inspect Tag | The object the entry is about: the codex shows **Examine**, which opens it in the inspection screen again. | | Sections | Parts that unlock one by one after the entry, each with a tag, a title and a body. Up to 31. | | Scope | Player: each player unlocks it. Team: one unlock serves the whole team. | | Known At Start | Unlocked when the game starts. | | Client May Request | A client can ask for it with Request Unlock. For what the player learns by looking (a note, an inspected object). Leave it off for anything worth cheating for. | | Required Entries | Entries the player must already have for a client's request to be accepted. | | Also Unlocks | Entries that unlock together with this one. | | Listed While Locked, Locked Hint | The list shows it as a closed slot with the hint before it is unlocked. Off hides it. | | Announce Unlock | The unlock goes to the notice queue. | | Sort Order | Lower comes first in its category. Ties go by title. | The category table (**CDXCategoryRow**: tag, name, icon, order) is optional. A category with no row is named after the last part of its tag. ### Nodes Server only: **Unlock Entry For** (from any player actor), **Unlock Entry**, **Unlock Section**, **Unlock Category**, **Remove Entry**, **Set Team Id**. Any machine: **Request Unlock**, **Mark Entry Read**, **Mark All Read**, **Is Unlocked**, **Is Section Unlocked**, **Has All Entries**, **Is Read**, **Get Unlocked Entries**, **Get Entries In Category**, **Get Categories**, **Get Entry Info**, **Get Category Info**, **Get Unread Count**, **Get Progress**, **Get Unlock Time**, **Player Knows Entry** (from any player actor). Events, on the server and on every client: **On Entry Unlocked**, **On Section Unlocked**, **On Entry Removed**, **On Team Changed**. On the owner's machine: **On Read Changed**, **On Unlock Refused**. **Just Now** on the unlock events is false for what came from the save and for what the team already had when the player joined, so a late joiner does not get twenty notices at once. ### Teams A team is a number you set with **Set Team Id** on the player's codex: your party, your guild, your faction. 0 is no team, and a player with no team keeps team entries as their own. Read marks are always personal: each player reads a team entry on their own. ## Notices ### A notice (CDXNotice) | Field | What it does | |---|---| | Channel Tag | Where it goes. Empty uses Default Notice Channel from Project Settings. | | Title, Body, Icon, Sound | What the row widget shows and plays. | | Priority | Higher goes in front in the queue. | | Duration | Seconds on screen. 0 uses the channel's, below 0 stays until dismissed. | | Notice Tag | Two notices with the same tag in the same channel merge into one with a count. | | Linked Entry Tag | A codex entry the notice is about, for a widget that offers to open it. | ### A channel (CDXNoticeChannelRow) | Field | What it does | |---|---| | Queue Mode | **Queue**: one at a time, the rest wait. **Stack**: up to Max Visible at once. **Replace**: the newest takes the place. **Drop If Busy**: thrown away when something is showing. | | Default Duration, Gap Seconds | Time on screen for a notice that does not say, and the pause before the next one comes up. | | Max Queued | Beyond this the least urgent and oldest waiting notice is thrown away. | | Priority Interrupts | A more urgent notice cuts in at once, and the one it cut comes back with the time it had left. | | Merge Same Tag | The same Notice Tag adds to the count of the notice already there and starts its clock again. | | Ignores Pause | Keeps showing while the queue is paused. | A channel with no row is a queue of one, 4 seconds each. One `WBP_CDXNotice...` widget shows one channel: place a copy where each channel belongs and set its Channel Tag. ### Nodes Server only: **Send Notice To Player**, **Send Notice To All** (with an optional team), **Send Notice**, **Send Notice By Tag** (only the tag travels; each machine reads the text from its own notice table, already in the player's language). The player's machine: **Push Notice**, **Push Notice By Tag**, **Dismiss Notice**, **Clear Notices**, **Set Paused**, **Get Visible Notices**, **Get Queued Count**, **Get Channel Info**, **Advance Queue**. Events, on the player's machine: **On Notice Shown**, **On Notice Hidden**, **On Notice Updated**. ## Tutorials ### The tutorial table (CDXTutorialRow) | Field | What it does | |---|---| | Tutorial Tag, Title | Identity and the name shown. | | Steps | In order. See below. | | Start Event | The tutorial starts when this event is reported. | | Start Condition | A rule about the game (see Conditions below). With no Start Event, the tutorial starts each time the rule begins to hold: a repeatable one is a hint that comes back. With a Start Event, the event only counts while the rule holds. | | Auto Start | Starts by itself as soon as its requirements are met. | | Required Tutorials, Required Entries | Tutorials finished and codex entries known before it can start. | | Repeatable | Starts again every time. Off, a finished or skipped tutorial never comes back, in any session. | | Retrigger Delay Seconds | A repeatable one waits this long after it ended before it can start again, so a hint does not nag. A rule that still holds when the wait ends starts it then. | | Skippable | The player can leave it with Request Skip. | | Server Events Only | Only events reported on the server count for it. | | Unlocks Entry | A codex entry the player gets when it ends. Skipping gives it too. | | Priority | When two are waiting, the higher goes first. One tutorial runs at a time. | | Cuts In | Starts at once even while another runs (a hint about health should not wait for the crafting lesson). The one it cut comes back at the same step when it ends. | ### A step (CDXTutorialStep) | Field | What it does | |---|---| | Title, Text, Image | What the step shows. | | Video | A Box step plays it where the picture goes, on a loop, with no sound of its own. | | Style | **Card**: in the corner, through the tutorial notice channel, and the game goes on. **Box**: in the middle of the screen, through **Tutorial Box Channel** of Project Settings, with a big picture and a Continue button that takes the focus (Enter, the gamepad's A or a click). | | Pauses Game | Box only: the game pauses while the box is up. In a game with no network only, since a server does not stop for one player. | | Complete Event, Complete Count | The step is done when the event was reported this many times. With no event, no condition and no actions the player closes it with Request Continue. | | Complete Actions, Complete Needs All Actions | The step closes when the player uses these input actions, by the names the texts use (`Jump` for `{Action:Jump}`): "Press {Action:Jump} to jump" ends on the jump, with no code. Any one of them, or all (move with W, A, S and D). Checked on the player's machine, so not for a reward worth cheating for. | | Complete Condition | The step is also done when this rule holds. Whichever comes first, the event or the rule. | | Skip If Done Before | A player who already did this before the tutorial got here is not asked again. | | Reminder Seconds | The step is shown again after this long with no progress. | | Auto Advance Seconds | The step moves on by itself after this long. | | Highlight Tag | What to point at while the step is up: a **Codexcraft Highlight** component in the world gets a marker or an edge arrow, a **CDX Highlight Frame** widget pulses. A step tag `A.B` also lights `A.B.C`, the nearest one wins. | ### Nodes Any machine: **Report Tutorial Event** (from any player actor), **Report Event**, **Request Continue**, **Request Skip**, **Is Tutorial Active**, **Get Progress**, **Get Active Step**, **Is Tutorial Completed**, **Get Tutorial Info**. Server only: **Start Tutorial**, **Complete Tutorial**, **Reset Tutorial**, **Get Event Count**. Events, on the server and on the owner's machine: **On Tutorial Started**, **On Step Changed** (also the reminder), **On Step Progress**, **On Tutorial Finished**. **Clocks Paused** holds the reminder, the auto advance and the conditions during a fight or a cutscene. ### Conditions A condition is a rule the server checks about once a second for each player. Make a Blueprint child of **CDX Tutorial Condition** and override **Is Met** (it gets the tutorial component, the PlayerState and the pawn), or use one of these three with no code, as a Blueprint child with its values filled in: | Class | Holds while | |---|---| | CDX Condition Value | A number of the pawn, the PlayerState or the controller, read by its name (`Health`, `Stamina`), is below or above a limit. Blueprint and C++ variables, float, double or int | | CDX Condition Actor Tag | The pawn or the PlayerState has an actor tag your game adds and removes (`Swimming`, `InDarkness`) | | CDX Condition Knows Entries | The player knows codex entries, all of them or any one | Each tutorial component keeps its own copy of each condition class, so a Blueprint condition can keep values between checks. **Is Condition Met** asks one from your own code. ### Highlights Put a **Codexcraft Highlight** component on whatever a step can point at (a door, a chest, an NPC), set its **Highlight Tag**, and put `WBP_CDXHighlight` on the screen: while the step names that tag, a ring with the distance sits over it, an arrow on the edge of the screen points the way when it is behind or off screen, and the actor's meshes glow at the edges (**Glow Owner**, through the mesh's Overlay Material, so nothing to set in the project). For UI, place `WBP_CDXHighlightFrame` over the widget to point at, in the same Overlay, and set its tag: it pulses while the step is up. **Get Active Highlight Tag** gives the tag of the step in course to your own widgets. ### Places Drop a **Codexcraft Trigger Volume** in the level and scale it over a place: a cave mouth, a shrine, the edge of a region. When a player walks in, on the server, it can report an event (**Reports Event**), start a tutorial (**Starts Tutorial**), unlock a codex entry (**Unlocks Entry**) and send a notice from the notice table (**Sends Notice**), once per player in the session (**Once Per Player**) or every time. **On Player Entered** and **On Player Left** are there for the rest, and **Is Player Inside** answers for one player. The tutorial rule **CDX Condition In Volume** holds while the player is inside a volume with an actor tag you name, or any volume: "the hint about the cold shows while the player is on the mountain". ## Inspection ### The inspect table (CDXInspectRow) | Field | What it does | |---|---| | Inspect Tag, Title, Description | Identity and what the screen shows. | | Static Mesh or Skeletal Mesh, Model Scale | The model in the viewer. A note or a recording can have none. | | Start Rotation, Start Zoom, Can Rotate, Min Zoom, Max Zoom | How the model starts and how far the player can go. The viewer frames the model by its size. | | Pages | Text to read, one page at a time. | | Audio, Play Audio On Open | A recording the player can play. | | Audio Caption | What the recording says, on screen while it plays. | | Points | Details to find by turning the model: where on the mesh (in its own space), which way their side faces, how far off the camera still counts, the text the player learns, and a section of Unlocks Entry or a tutorial event it gives. | | Video | Shown in the frame for an object with no model: a tape, a projector, a screen. | | Unlocks Entry, Page Unlocks Sections | What the codex is asked for when the viewer opens and as the pages are reached. The entry's row needs Client May Request. | | Reports Event | Told to the tutorials when the viewer opens. | ### Nodes **Open Inspection** (from any player actor, on that player's machine), **Close Inspection**, **Is Inspecting**, **Add Rotation**, **Add Zoom**, **Reset View**, **Next Page**, **Previous Page**, **Set Page**, **Get Page Text**, **Get Page Count**, **Play Audio**, **Stop Audio**, **Get View Texture**. Events: **On Inspection Opened**, **On Inspection Closed**, **On Page Changed**, **On Point Found**. A point counts as found once its side has faced the camera, inside the picture, for **Point Found Seconds** (0.6 by default). The screen shows a faint ring over a side that faces the camera and an accent ring once it is found, and lists "1 / 3 details found" with what each one said. **Get Point Count**, **Get Found Point Count**, **Is Point Found**, **Get Point Position** and **Find Point** (for a game that finds points its own way) are there for your own screens. Points start hidden each time the object opens; what they teach stays in the codex. **Reader mode** (T on the keyboard, R3 on the gamepad, or the Reader button) puts the model away and makes the page's letters bigger, for a long document. **Toggle Reader Mode** does it from your code. How the player gets to the object is your game's business: a trace, an overlap, an inventory slot. Codexcraft starts at **Open Inspection**. ### The stage The model is photographed in a small studio that exists only on the machine of the player who is inspecting: **CDXInspectStage**, an actor with a pivot, two lights and a camera that draws into a texture. To change the lights or add a backdrop, make a Blueprint child and name it in **Project Settings > Plugins > Codexcraft > Inspect Stage Class**. `M_CDXInspectView` is the UI material that draws the texture in the screen. ## Keys and gamepad Every screen works with the mouse, the keyboard and the gamepad. The codex and the inspection screen take keyboard focus when they open (**Takes Mouse** on the inspection, your own Set Input Mode on the codex) and every key they read is a list in the Details panel: change the keys, or empty a list to turn a key off. The codex screen asks to be closed with **On Close Requested**, so whoever opened it decides how. | Screen | Keyboard | Gamepad | |---|---|---| | Codex | Q / E tabs, W / S or arrows entries, F filter, R order, / search, X examine, Esc close | LB / RB tabs, D-pad or left stick entries, LT filter, RT order, X recording, L3 examine, Y mark all read, B close | | Inspection | Drag and wheel, Left / Right pages, T reader, R reset, P recording, Esc close | Sticks turn, triggers zoom, LB / RB pages, R3 reader, Y reset, X recording, B close | The help line at the bottom of each screen follows the device the player touched last. ### Keys in texts Write `{Action:Jump}` in any text the plugin shows (a tutorial step, a notice, an entry body) and the player sees the key they have on that action now, on the device in use: `[Space]` on the keyboard, `[A]` on the gamepad. A rebind shows at once. The tutorial notice also shows the first key big, as a key cap or as your picture. - Name your actions in **Project Settings > Plugins > Codexcraft > Input Actions** (name to Enhanced Input action), or at runtime with **Register Input Action**. - **Key Icons** comes filled with pictures of the gamepad buttons, sticks, D-pad and triggers (`/Codexcraft/UI/Keys`). Point any of them at your own, add keyboard keys, or empty the map for key caps with names. - **Gamepad Style** picks the pad the prompts are drawn for: **Xbox** (A, B, LB) or **PlayStation** (Cross, Circle, L1, with their own pictures in **PlayStation Key Icons**). Your game changes it at runtime with **Set Gamepad Style** on the **CDX Input Subsystem**, when it learns which pad the player has (Steam Input tells it). The codex and the inspection have a help line for each. - On Windows the engine reads Xbox pads (XInput). A PlayStation pad works through Steam Input or DS4Windows, which hand it to the game as an Xbox pad: that is when Gamepad Style matters. - **Key Labels** renames a key on screen, **Key Opening** and **Key Closing** are the brackets. - **Format Text** reads braces as its own arguments: a pattern with `{Action:Jump}` in it logs a warning every time it runs. Put the key in with **Format Input Text** first, and pass the result to Format Text as an argument. - **Is Using Gamepad**, **Get Key For Action**, **Get Key Label**, **Format Input Text** and the **On Input Device Changed** event of the **CDX Input Subsystem** are there for your own widgets. The plugin reads no input itself: your game calls the nodes. It needs Enhanced Input enabled (it is by default) and nothing in Project Settings. ## Screens | Widget Blueprint | Parent class | What it is | |---|---|---| | `WBP_CDXCodex` | CDXCodexWidget | Tabs, the list of the open tab, the entry | | `WBP_CDXEntryRow`, `WBP_CDXCategoryTab` | CDXEntryRowWidget, CDXCategoryTabWidget | A line of the list and a tab | | `WBP_CDXSectionRow` | CDXSectionRowWidget | One section of the open entry, open or still locked | | `WBP_CDXNoticeToasts` | CDXNoticeListWidget | The default channel, bottom right | | `WBP_CDXNoticeTutorial`, `WBP_CDXNoticeTutorialBox`, `WBP_CDXNoticeAlert`, `WBP_CDXNoticeBanner` | CDXNoticeListWidget | The demo's other four channels, each in its place: the tutorial box sits in the middle | | `WBP_CDXNoticeRow`, `WBP_CDXNoticeTutorialRow`, `WBP_CDXNoticeTutorialBoxRow`, `WBP_CDXNoticeAlertRow`, `WBP_CDXNoticeBannerRow` | CDXNoticeRowWidget | A notice as a panel, as a tutorial step, as a tutorial box with its Continue button, as an alert and as a centered line | | `WBP_CDXInspect` | CDXInspectWidget | The model, the page, the buttons. Drag turns, the wheel zooms | | `WBP_CDXHighlight` | CDXHighlightWidget | The marker and the edge arrow of the step in course. Fills the screen | | `WBP_CDXHighlightFrame` | CDXHighlightFrame | The frame that pulses over a part of your UI | Every screen and every notice comes in with a short fade and slide (**Show Animation** on each: seconds and offset, 0 turns it off). They also sound: the codex opens and closes like a book and rustles when you move in it, a page turns in the inspection, and a notice, a new entry and a tutorial step each have their own. Every sound is a property of the widget (**Open Sound**, **Close Sound**, **Move Sound**, **Page Sound**, **Show Sound**, **Entry Sound**): change it, or empty it for silence. A notice with a **Sound** of its own plays that one instead. The sounds in `/Codexcraft/UI/Sounds` are from Kenney's packs, CC0. The codex screen has a search box that looks in every tab at once, and only at what the player can read (a locked section does not give its secret away), a filter (all, unread) and an order (the table's, by name, the last unlocked first). **Set Search Text**, **Set Filter**, **Set Sort**, **Select Next Category** and **Select Next Entry** do the same from your own code. To make your own, create a Widget Blueprint with one of the parent classes and name your widgets like the ones in ours (`TitleText`, `EntryContainer`, `TimeBar` and so on). Every one is optional: leave out what you do not show. Each class has an event for the rest (**On Row Filled**, **On Entry Shown**, **On Notice Set**, **On Inspect Filled**), where a sound or an animation goes. ### Video The codex entry, the tutorial box and the inspection frame play a **Media Source** on a loop, in the image where the picture would go, with no sound of their own (give the entry or the object an Audio for narration). The easy way: put an mp4 in your project's `Content/Movies` folder, which the engine packs as it is, and make a **File Media Source** for it. The demo's film lives in the plugin's `Content/Movies` and is staged by a line in the demo's `DefaultGame.ini` (`DirectoriesToAlwaysStageAsNonUFS`). ### Common UI A game built on Common UI gets the codex and the inspection as **Common Activatable Widgets** from the **CodexcraftCommonUI** module: **Codexcraft Common Codex Screen** and **Codexcraft Common Inspect Screen**. Set the widget class inside (`WBP_CDXCodex`, `WBP_CDXInspect` or your own), push the screen on your menu stack, and it takes the input as a menu, gives the focus to the screen inside and goes back on the Back action. The codex's close request and closing the object both take the screen off the stack. Inside the screens, Examine keeps the codex on the stack and the inspect widget leaves the input mode to Common UI, so push the inspect screen on **On Inspection Opened** and Back from the object lands on the codex again. A Widget Blueprint child of the screen can place the widget in a panel named `ScreenSlot`. The plugin enables Common UI for this module; the plugin's own screens do not need it. `/Codexcraft/Demo/L_CDXCommonUIDemo` is the demo room with both screens on one Common UI stack (**CDXCommonUIDemoHUD**), and a line on top that names what is on it. C pushes the codex, E or Examine pushes the inspection, Escape or B takes off the top screen. It needs what every Common UI game has in Project Settings: the viewport client `CommonGameViewportClient` and an Input Data with Click and Back. The demo's are `BP_CDXCommonUIDemoInputData` and `DT_CDXCommonUIDemoActions` in `Demo/CommonUI`, set in the demo project's `DefaultEngine.ini` and `DefaultGame.ini`. ## Make it yours Nothing here needs C++. The four components are Blueprintable: make a Blueprint child, add it to your PlayerState in place of ours, and override what you want. | Override | On | What it decides | |---|---|---| | **Can Client Unlock** | CDXCodexComponent | The last word on a client's request, after the row's own rules. Return false and the client gets **Refused By Game** | | **Filter Notice** | CDXNoticeComponent | Sees every notice before it enters the queue. Change its text, channel or time, or return false to drop it | | **Can Start Tutorial** | CDXTutorialComponent | Holds a tutorial back (in combat, in a cutscene) without touching its row | | **Can Open Inspection** | CDXInspectComponent | Blocks the viewer while your game does not want it | Rows do not have to come from a table. **Register Entry**, **Register Tutorial** and **Register Inspectable** add one at runtime, on each machine that needs it: procedural content, mods, DLC loaded late. Every row (entry, tutorial, inspectable) carries **Custom Data**, a soft reference to any asset of yours, and **Custom Tags**. The plugin does not read them. Your widgets and your rules do: a rarity, a voice line, a quest the entry belongs to. What else is exposed: every look of the stage (**Field Of View**, **Frame Margin**, **Exposure Bias**, the lights), **Zoom Step** on the inspect component, **Step Notice Priority** on the tutorial, the channels and formats in Project Settings, and every list widget takes its row class as a property, so one screen can be reskinned a piece at a time. ## Languages Every text is localizable: the plugin's own words (labels, help lines, formats) with LOCTEXT, the demo's in its tables and its code. English, Portuguese (pt-BR) and Spanish come in `Content/Localization/Codexcraft`, loaded by the plugin's localization target. Your own tables go through your project's localization like any other text. A project whose only translations are a plugin's should switch language with **Set Current Culture** after the game starts (the demo does it with `-CDXCulture=pt-BR` and the L key): the engine checks `-culture=` on its command line before plugins mount their translations, and falls back to English. A game with its own translations in the same languages is not affected. For a packaged game, stage the cultures in **Project Settings > Packaging > Localizations to Package**, and set **Internationalization Support** to a preset that has them (Portuguese needs **All**): without its data the game cannot switch to that language. ## The demo `/Codexcraft/Demo/L_CDXDemo` is one room with 14 pads, 5 stands and a trigger volume around the stands. The first tutorial opens with a box and a step that closes when you jump; the lantern, the journal and the dummy hide details to find; The Founding has a short film; the Letter reads itself with its words on screen. The player is **CDXDemoCharacter**, a third person character on Enhanced Input (WASD and mouse, or a gamepad), with its actions made in code, so the demo asks for no change in Project Settings. None of Codexcraft is on it, the components are on the PlayerState, so your own pawn works the same. L (D-pad up on the gamepad) switches the language. What it shows: entries and sections, team entries, the notice queue in four channels, three tutorials in a row with keys in their texts, a marker that leads to the stands and a frame on the codex search box, a hint that watches the player's health (the thorn pad), a model, a key, a journal with a recording, a four page letter read aloud, and a model with bones. Its body is the Unreal Engine template mannequin, kept apart in `Content/Demo/Epic`. It is Epic's content, not ours, and nothing in the plugin depends on it: delete the folder and the demo still runs, with a capsule that walks. ## Credits - Screen sounds: Kenney (kenney.nl), CC0. - The demo's voices: made with Kokoro (Apache 2.0 model). - The demo's codex pictures: made for Codexcraft with PixelLab. - The demo's player and dummy: the Unreal Engine template mannequin, in `Content/Demo/Epic`, under Epic's terms. ## Packaging The plugin finds its screens and the tables of Project Settings by path. At the start of every cook it hands the cooker its `UI` folder and every asset Project Settings names, and the cooker follows what those point at (pictures, recordings, meshes). A packaged game has them with nothing for you to set. Your own widgets and tables that nothing names in Project Settings are referenced like any of your content. ## Save **Codex** and **Tutorial** save by themselves. With **Auto Save** on, the server reads each player's slot when they join and writes it 2 seconds after a change and when they leave. The slot is named after the store account (Steam, EOS), or after the player name where there is no account: **Project Settings > Plugins > Codexcraft > Save Key Source**. A game with its own save turns Auto Save off and calls **Save To Bytes** and **Load From Bytes** on each component. Tags are stored as text, and sections by tag, so a table that changes does not break an old save: what is not in the project anymore is dropped. ## Network - State travels as replicated properties, never as multicast events: a lost packet delays a change and does not lose it. - Read marks and tutorial progress go to their owner only. - A client's request is one reliable call, checked on the server (the row allows it, its requirements are met) and limited to 10 a second per component. A refusal comes back with its reason in **On Unlock Refused**. - Conditions run on the server only. The highlight and the keys are local to each player's screen. - Tested with one server and four clients at 150 ms and 5% packet loss, listen and dedicated, and again from the save.