JournalEntryAddedEvent
A beat was written into the session journal.
Full documentation: JournalEntryAddedEvent. Wire type: journal_entry_added.
Default visibility: player
Message codes: session.journal.entry_added
JSON Schema
{
"$defs": {
"Visibility": {
"description": "Who is allowed to see an event.\n\nEvery event has one of these two values, and the split exists because B/X keeps some rolls behind the\nreferee's screen. Filter a log on it before you show anything to a player, or call\n`GameSession.view`, which builds the player's and the referee's\nviews for you. A narrator playing referee reads both.\n\nThe values are the lowercase strings and they serialize into every event, so a renamed value is a\n`schema_version` bump.\n\nExamples:\n ```python\n from osrlib.core.events import DamageDealtEvent, HitPointsReportedEvent, Visibility\n\n log = [\n DamageDealtEvent(target_id=\"monster-0001\", amount=5),\n HitPointsReportedEvent(target_id=\"monster-0001\", current_hp=2, max_hp=7),\n ]\n shown = [event.code for event in log if event.visibility is Visibility.PLAYER]\n assert shown == [\"combat.damage.dealt\"] # the goblin's remaining hit points stay hidden\n ```",
"enum": [
"player",
"referee"
],
"title": "Visibility",
"type": "string"
}
},
"description": "A beat was written into the session journal.\n\nEmitted by `AddJournalEntry`. The\njournal is the party's own record of the adventure, appended in order and never\nrewritten, and it's part of what\n`GameSession.view` shows a player.\n\nIt isn't the only event a growing journal produces. A quest beat appends its\nentry and reports itself through its own lifecycle event instead, so the table\nisn't told the same line twice. Read the whole journal from the view, and read\nthese events to know when a line arrived.",
"properties": {
"code": {
"default": "session.journal.entry_added",
"title": "Code",
"type": "string",
"description": "The message code, always `session.journal.entry_added`."
},
"visibility": {
"$ref": "#/$defs/Visibility",
"default": "player",
"description": "Player visibility: the journal is written for the table."
},
"event_type": {
"const": "journal_entry_added",
"default": "journal_entry_added",
"title": "Event Type",
"type": "string",
"description": "The wire discriminator, `journal_entry_added`."
},
"text": {
"title": "Text",
"type": "string",
"description": "The beat as it was written. Content the game or the adventure supplied, not prose the\nengine wrote."
},
"rounds": {
"title": "Rounds",
"type": "integer",
"description": "Where the clock stood when the beat landed, in rounds since the session began. The stored\nentry has the same stamp."
}
},
"required": [
"text",
"rounds"
],
"title": "JournalEntryAddedEvent",
"type": "object"
}