Facts
phantom.aj.factsPlaying
Facts collected in the world.
Scripts and plugins
A script has all of it, as phantom.aj.facts, and so does a plugin, from ctx.phantom(): the SDK runs in the plugin's own frame. Each call is marked with what it needs: game:read for what the area knows and hears, which "game": "read" in the manifest grants, and game:act for doing things in it as the player, which needs "game": "act" (see Permissions).
Overview
| Member | What it does | Plugins |
|---|---|---|
all() | Every definition the client has in hand (_factDefCache), read a page at a time: the facts of each room walked into, the Journey Book's whole list once it has arrived, and anything load asked for. | game:read |
bubbleSpot() | Where the client will draw a fact's bubble (_factLocs[defId]), in room coordinates: what the room handed requestFactInfo. | game:read |
cache() | Puts a definition into the client's cache (updateFactDefCache, the door the Journey Book uses), over the one held for that id, and resolves with it as the cache now holds it. | game:act |
eventList() | The event fact list the client last loaded (_genericFactDefList), in the order its arrows walk: the facts a room's ajeventfact%<list>%<fact> volume opens. | game:read |
framesFor() | Which frame of the client's art a type is drawn on, as a bubble and as a popup (_tabFrameLabelLookup, _popupFrameLabelLookup). | game:read |
get() | One cached definition by id (_factDefCache[defId]), in one message; null until fetched. | game:read |
hasViewed() | Whether the player has seen one fact (UserVarCache.isBitSet on its own stat and bit), which is what dims its bubble. | game:read |
inRoom() | The facts the room on screen carries, from its own action points (_actionPoints, type 2), which stay for as long as the room is up. | game:read |
load() | Fetches definitions the client does not hold (requestFactInfo), and resolves with all of them once they are in its cache. | game:act |
loadBookFact() | Fetches one of the Journey Book's definitions as a page of the book does (requestJourneyBookFactDef with a callback, so no popup opens), and resolves with it once the client has it. | game:act |
loading() | What the fact system is waiting on: popup art it has yet to fetch (the first fact of a kind opens a moment late), definitions and pictures in flight, and a fact held for its list. | game:read |
markViewed() | Marks a fact seen, as pressing its bubble does (tabMouseDownHandler): its own bit, and bit 1 of its type's stat where the type has one, each sent as zs and confirmed by the server's answer. | game:act |
museumList() | The museum's endangered animals the client last loaded (_museumFactDefList), in its arrows' order. | game:read |
ofType() | The cached definitions of one type, such as every mineral the client knows of. | game:read |
show() | Opens one fact's popup through the client's own call for its type (showJourneyBookFact, showTierneyFact, showBradyFact, displayMuseumEngangermentPopup, the archive through requestFactInfo, and displayNormalNonTabFact for the rest, bubble types included), and resolves once it is drawn, with the fact and the popup it went into. | game:act |
showFromList() | Opens a fact out of an event list, as a room's ajeventfact%<list>%<fact> volume does (requestFactInfoByList): the list is asked of the game server (gl) when it is not loaded. | game:act |
showMuseum() | Opens a museum endangerment popup, as the museum's museum%<list>%<fact> volumes do (requestMuseumFactInfo), asking the game server for the list when it is not loaded. | game:act |
statForType() | The stat that marks a type seen, asked of the client (uvForType), which stays right if a build changes the mapping; factTypeUserVar answers from the table without asking. | game:read |
viewedTypes() | The types the player has seen at least one fact of: bit 1 of each type's stat (FACT_TYPE_USER_VARS), which only eleven types have. | game:read |
onAddedToJourneyBook() | Hears a fact go into the Journey Book: its Add to Book animation finishing (onAddToJBBookAnim), where the client counts a gift and lights the HUD. | game:read |
onFound() | Hears a fact bubble pressed in a room, with what the client wrote onto it. | game:read |
onLoaded() | Hears a definition arrive from the fact file server (onFactDefReceived). | game:read |
onStep() | Hears the client place a bubble, reopen the event popup, have a Journey Book page's stat answered, offer a pet from a popup's pet button, and work out a type's stat. | game:read |
onSystem() | Hears the fact system set itself up (init, destroy) and take lists in: an event or museum list landing, which is what a fact waiting on one needs, the Journey Book caching a definition, and one of its pages asking for one. | game:read |
facts.popup: The fact popup on screen (NGFactManager._factPopup): phantom.aj.facts.popup.
| Member | What it does | Plugins |
|---|---|---|
close() | Closes the popup, as its close box does (closeFact, the blunt close: the Journey Book popup's animation is skipped), and resolves once the client has let it go. | game:act |
current() | The popup on screen, or null when there is none. | game:read |
reopenEvent() | Puts another fact of the event list in the event popup, as its arrows do (reloadGenericFactPopup: closes it and opens it again). | game:act |
walkMuseum() | Walks the museum popup on to the next endangered animal, or back to the one before, as its arrows do (reloadMuseumPopup), with the ends joined as the client joins them. | game:act |
onChange() | Follows the popup in the game and hears it change: opened, closed, redrawn on another fact by the museum's arrows, or the same bubble's popup shown again, which no display function says. | game:read |
onClose() | Hears a fact popup come down, by its close box, close, or the Journey Book popup's closing animation (animated). | game:read |
onMuseum() | Hears the museum popup: its arrows, its redraw on another fact, and its videos button, which asks the server for the stream list and opens the lone movie player on it. | game:read |
onOpen() | Hears a fact popup go up through one of the client's six display functions, with the fact. | game:read |
Methods
all
all() => Promise<FactDefinition[]>Every definition the client has in hand (_factDefCache), read a page at a time: the facts of each room walked into, the Journey Book's whole list once it has arrived, and anything load asked for. Empty at the login screen.
Returns
Promise<FactDefinition[]>
Types
bubbleSpot
bubbleSpot(defId: number) => Promise<{ x: number; y: number; } | null>Where the client will draw a fact's bubble (_factLocs[defId]), in room coordinates: what the room handed requestFactInfo. Null for a fact with no place, which is one load asked for.
Parameters
| Name | Type | |
|---|---|---|
defId | number |
Returns
Promise<{ x: number; y: number; } \| null>
cache
cache(def: FactDefinitionInput, options?: ActOptions) => Promise<FactDefinition>Puts a definition into the client's cache (updateFactDefCache, the door the Journey Book uses), over the one held for that id, and resolves with it as the cache now holds it. Fields left out keep what is cached.
It changes this screen only: the fact file server is not told, and the stat a fact marks when it is opened is still sent to Animal Jam, so a userVarId of your own has the client set a stat that has nothing to do with the fact. It is for showing something, not for changing progress.
Parameters
| Name | Type | |
|---|---|---|
def | FactDefinitionInput | |
options optional | ActOptions |
Returns
Promise<FactDefinition>
Types
eventList
eventList() => Promise<FactDefinition[]>The event fact list the client last loaded (_genericFactDefList), in the order its arrows walk: the facts a room's ajeventfact%<list>%<fact> volume opens. Empty until one has.
Returns
Promise<FactDefinition[]>
Types
framesFor
framesFor(type: number | "endangered" | "animal" | "plant" | "journeyBook" | "mineral" | "tiki" | "gecko" | "bat" | "cat" | "insect" | "weather" | "holiday" | "aquarium" | "museum" | "journeyBookBig" | "brady" | "millions" | "earthDay" | "migration" | "holidayTwo" | "archive") => Promise<{ tab: string | null; popup: string | null; }>Which frame of the client's art a type is drawn on, as a bubble and as a popup (_tabFrameLabelLookup, _popupFrameLabelLookup). A type with no tab frame gets no bubble.
Parameters
| Name | Type | |
|---|---|---|
type | number | "endangered" | "animal" | "plant" | "journeyBook" | "mineral" | "tiki" | "gecko" | "bat" | "cat" | "insect" | "weather" | "holiday" | "aquarium" | "museum" | "journeyBookBig" | "brady" | "millions" | "earthDay" | "migration" | "holidayTwo" | "archive" |
Returns
Promise<{ tab: string \| null; popup: string \| null; }>
get
get(defId: number) => Promise<FactDefinition | null>One cached definition by id (_factDefCache[defId]), in one message; null until fetched.
Parameters
| Name | Type | |
|---|---|---|
defId | number |
Returns
Promise<FactDefinition \| null>
Types
hasViewed
hasViewed(defId: number) => Promise<boolean | null>Whether the player has seen one fact (UserVarCache.isBitSet on its own stat and bit), which is what dims its bubble. Null rather than a guess when the definition is not cached, or is one the client never marks.
Parameters
| Name | Type | |
|---|---|---|
defId | number |
Returns
Promise<boolean \| null>
inRoom
inRoom() => Promise<RoomFact[]>The facts the room on screen carries, from its own action points (_actionPoints, type 2), which stay for as long as the room is up. Empty with no room, or a room with no facts.
Returns
Promise<RoomFact[]>
Types
load
load(defIds: readonly number[], options?: ActOptions) => Promise<FactDefinition[]>Fetches definitions the client does not hold (requestFactInfo), and resolves with all of them once they are in its cache. Nothing goes to the game socket.
The client then does with each what it does in a room: a bubble type is placed in the world (at its origin, since no place is given), and any other type opens its popup. Ids already cached are not handed over, so nothing they would show is shown again.
Parameters
| Name | Type | |
|---|---|---|
defIds | readonly number[] | |
options optional | ActOptions |
Returns
Promise<FactDefinition[]>
Types
loadBookFact
loadBookFact(defId: number, options?: ActOptions & { page?: number | undefined; sequence?: number | undefined; }) => Promise<FactDefinition>Fetches one of the Journey Book's definitions as a page of the book does (requestJourneyBookFactDef with a callback, so no popup opens), and resolves with it once the client has it. page and sequence are handed back to the book's callback as the client does. A definition that is not a Journey Book fact is routed by the client as load routes it.
Parameters
| Name | Type | |
|---|---|---|
defId | number | |
options optional | ActOptions & { page?: number | undefined; sequence?: number | undefined; } |
Returns
Promise<FactDefinition>
Types
loading
loading() => Promise<FactLoading>What the fact system is waiting on: popup art it has yet to fetch (the first fact of a kind opens a moment late), definitions and pictures in flight, and a fact held for its list.
Returns
Promise<FactLoading>
Types
markViewed
markViewed(defId: number, options?: ActOptions) => Promise<FactViewed>Marks a fact seen, as pressing its bubble does (tabMouseDownHandler): its own bit, and bit 1 of its type's stat where the type has one, each sent as zs and confirmed by the server's answer. Resolves with the stats the server kept.
Throws NOT_READY for a fact the client has not cached or never marks (load fetches it), and REFUSED while the player is invisible, when the client sends no stat at all.
Parameters
| Name | Type | |
|---|---|---|
defId | number | |
options optional | ActOptions |
Returns
Promise<FactViewed>
Types
museumList
museumList() => Promise<FactDefinition[]>The museum's endangered animals the client last loaded (_museumFactDefList), in its arrows' order. A museum fact's title holds its name, biography and frame label joined by |.
Returns
Promise<FactDefinition[]>
Types
ofType
ofType(type: "endangered" | "animal" | "plant" | "journeyBook" | "mineral" | "tiki" | "gecko" | "bat" | "cat" | "insect" | "weather" | "holiday" | "aquarium" | "museum" | "journeyBookBig" | "brady" | "millions" | "earthDay" | "migration" | "holidayTwo" | "archive") => Promise<FactDefinition[]>The cached definitions of one type, such as every mineral the client knows of.
Parameters
| Name | Type | |
|---|---|---|
type | "endangered" | "animal" | "plant" | "journeyBook" | "mineral" | "tiki" | "gecko" | "bat" | "cat" | "insect" | "weather" | "holiday" | "aquarium" | "museum" | "journeyBookBig" | "brady" | "millions" | "earthDay" | "migration" | "holidayTwo" | "archive" |
Returns
Promise<FactDefinition[]>
Types
show
show(defId: number, options?: ActOptions) => Promise<FactPopupOpened>Opens one fact's popup through the client's own call for its type (showJourneyBookFact, showTierneyFact, showBradyFact, displayMuseumEngangermentPopup, the archive through requestFactInfo, and displayNormalNonTabFact for the rest, bubble types included), and resolves once it is drawn, with the fact and the popup it went into.
A fact not cached yet is fetched first. The first popup of a sitting waits for its art. Like the client's, a Journey Book fact the player has not seen marks itself seen as it opens; a bubble press marks a fact too, which is markViewed here. Throws REFUSED for a millions fact, which the client cannot show.
Parameters
| Name | Type | |
|---|---|---|
defId | number | |
options optional | ActOptions |
Returns
Promise<FactPopupOpened>
Types
showFromList
showFromList(listId: number, defId: number, options?: ActOptions) => Promise<FactPopupOpened>Opens a fact out of an event list, as a room's ajeventfact%<list>%<fact> volume does (requestFactInfoByList): the list is asked of the game server (gl) when it is not loaded. Resolves once the popup is drawn. Only migration, endangered, earth day, holiday and archive facts are shown this way; any other type times out, as the client shows nothing for it.
Parameters
| Name | Type | |
|---|---|---|
listId | number | |
defId | number | |
options optional | ActOptions |
Returns
Promise<FactPopupOpened>
Types
showMuseum
showMuseum(listId: number, defId: number, options?: ActOptions) => Promise<FactPopupOpened>Opens a museum endangerment popup, as the museum's museum%<list>%<fact> volumes do (requestMuseumFactInfo), asking the game server for the list when it is not loaded. Resolves once the popup is drawn; its arrows then walk that list (popup.walkMuseum).
Parameters
| Name | Type | |
|---|---|---|
listId | number | |
defId | number | |
options optional | ActOptions |
Returns
Promise<FactPopupOpened>
Types
statForType
statForType(type: number | "endangered" | "animal" | "plant" | "journeyBook" | "mineral" | "tiki" | "gecko" | "bat" | "cat" | "insect" | "weather" | "holiday" | "aquarium" | "museum" | "journeyBookBig" | "brady" | "millions" | "earthDay" | "migration" | "holidayTwo" | "archive") => Promise<number | null>The stat that marks a type seen, asked of the client (uvForType), which stays right if a build changes the mapping; factTypeUserVar answers from the table without asking. Null for a type it keeps none for.
Parameters
| Name | Type | |
|---|---|---|
type | number | "endangered" | "animal" | "plant" | "journeyBook" | "mineral" | "tiki" | "gecko" | "bat" | "cat" | "insect" | "weather" | "holiday" | "aquarium" | "museum" | "journeyBookBig" | "brady" | "millions" | "earthDay" | "migration" | "holidayTwo" | "archive" |
Returns
Promise<number \| null>
viewedTypes
viewedTypes() => Promise<("endangered" | "animal" | "plant" | "journeyBook" | "mineral" | "tiki" | "gecko" | "bat" | "cat" | "insect" | "weather" | "holiday" | "aquarium" | "museum" | "journeyBookBig" | "brady" | "millions" | "earthDay" | "migration" | "holidayTwo" | "archive")[]>The types the player has seen at least one fact of: bit 1 of each type's stat (FACT_TYPE_USER_VARS), which only eleven types have. Empty before the stats arrive.
Returns
Promise<("endangered" \| "animal" \| "plant" \| "journeyBook" \| "mineral" \| "tiki" \| "gecko" \| "bat" \| "cat" \| "insect" \| "weather" \| "holiday" \| "aquarium" \| "museum" \| "journeyBookBig" \| "brady" \| "millions" \| "earthDay" \| "migration" \| "holidayTwo" \| "archive")[]>
Events
onAddedToJourneyBook
onAddedToJourneyBook(listener: (added: { fact: FactDefinition | null; }) => void) => () => voidHears a fact go into the Journey Book: its Add to Book animation finishing (onAddToJBBookAnim), where the client counts a gift and lights the HUD. The client's method names no fact, so each listener remembers the last Journey Book popup it saw go up; fact is null for one it did not.
Parameters
| Name | Type | |
|---|---|---|
listener | (added: { fact: FactDefinition | null; }) => void |
Returns
() => void. Call it to stop listening.
Types
onFound
onFound(listener: (found: FactFound) => void) => () => voidHears a fact bubble pressed in a room, with what the client wrote onto it. firstTime is read before the press changes it, so it says whether this press marks the fact.
Parameters
| Name | Type | |
|---|---|---|
listener | (found: FactFound) => void |
Returns
() => void. Call it to stop listening.
Types
onLoaded
onLoaded(listener: (fact: FactDefinition) => void) => () => voidHears a definition arrive from the fact file server (onFactDefReceived). A definition the client already holds is never fetched again, so nothing is heard for one.
Parameters
| Name | Type | |
|---|---|---|
listener | (fact: FactDefinition) => void |
Returns
() => void. Call it to stop listening.
Types
onStep
onStep(listener: (event: FactStepEvent) => void) => () => voidHears the client place a bubble, reopen the event popup, have a Journey Book page's stat answered, offer a pet from a popup's pet button, and work out a type's stat.
Parameters
| Name | Type | |
|---|---|---|
listener | (event: FactStepEvent) => void |
Returns
() => void. Call it to stop listening.
Types
onSystem
onSystem(listener: (event: FactSystemEvent) => void) => () => voidHears the fact system set itself up (init, destroy) and take lists in: an event or museum list landing, which is what a fact waiting on one needs, the Journey Book caching a definition, and one of its pages asking for one.
Parameters
| Name | Type | |
|---|---|---|
listener | (event: FactSystemEvent) => void |
Returns
() => void. Call it to stop listening.
Types
facts.popup
The fact popup on screen (NGFactManager._factPopup): phantom.aj.facts.popup. One popup is up at a time, whichever kind it is. Reading and following it, closing it, and walking the museum's and the event list's popups on to another fact.
close
close(options?: ActOptions) => Promise<void>Closes the popup, as its close box does (closeFact, the blunt close: the Journey Book popup's animation is skipped), and resolves once the client has let it go. Resolves at once with no popup up. Nothing is sent to Animal Jam, and whether the fact was seen is left as it was.
Parameters
| Name | Type | |
|---|---|---|
options optional | ActOptions |
Returns
Promise<void>
Types
current
current() => Promise<FactPopup | null>The popup on screen, or null when there is none. One message.
Returns
Promise<FactPopup \| null>
Types
reopenEvent
reopenEvent(defId: number, options?: ActOptions) => Promise<FactDefinition>Puts another fact of the event list in the event popup, as its arrows do (reloadGenericFactPopup: closes it and opens it again). Resolves with the fact once it shows; throws NOT_READY when the event list does not hold it, REFUSED for a type the event popup does not show.
Parameters
| Name | Type | |
|---|---|---|
defId | number | |
options optional | ActOptions |
Returns
Promise<FactDefinition>
Types
walkMuseum
walkMuseum(direction?: "back" | "next", options?: ActOptions) => Promise<FactDefinition>Walks the museum popup on to the next endangered animal, or back to the one before, as its arrows do (reloadMuseumPopup), with the ends joined as the client joins them. Resolves with the fact now showing; throws NOT_READY with no museum popup up or no museum list loaded.
Parameters
| Name | Type | |
|---|---|---|
direction optional | "back" | "next" | |
options optional | ActOptions |
Returns
Promise<FactDefinition>
Types
onChange
onChange(listener: (popup: FactPopup | null, previous: FactPopup | null) => void) => () => voidFollows the popup in the game and hears it change: opened, closed, redrawn on another fact by the museum's arrows, or the same bubble's popup shown again, which no display function says. The listener is told the popup now (null for none) and the one before.
Parameters
| Name | Type | |
|---|---|---|
listener | (popup: FactPopup | null, previous: FactPopup | null) => void |
Returns
() => void. Call it to stop listening.
Types
onClose
onClose(listener: (closed: FactPopupClosed) => void) => () => voidHears a fact popup come down, by its close box, close, or the Journey Book popup's closing animation (animated). The client does not say which fact it was, so each listener remembers the last fact a display function put up while it listened; fact is null for one it did not see go up.
Parameters
| Name | Type | |
|---|---|---|
listener | (closed: FactPopupClosed) => void |
Returns
() => void. Call it to stop listening.
Types
onMuseum
onMuseum(listener: (event: MuseumFactEvent) => void) => () => voidHears the museum popup: its arrows, its redraw on another fact, and its videos button, which asks the server for the stream list and opens the lone movie player on it.
Parameters
| Name | Type | |
|---|---|---|
listener | (event: MuseumFactEvent) => void |
Returns
() => void. Call it to stop listening.
Types
onOpen
onOpen(listener: (opened: FactPopupOpened) => void) => () => voidHears a fact popup go up through one of the client's six display functions, with the fact. The first popup of a sitting is heard twice (once as the art starts loading, once drawn), and a popup a bubble press builds itself is heard by facts.onFound instead; onChange follows what is actually on screen.
Parameters
| Name | Type | |
|---|---|---|
listener | (opened: FactPopupOpened) => void |
Returns
() => void. Call it to stop listening.
Types
Types
The types the calls above take and give, with every field. Import any of them in a plugin from @phantomclient/plugin/sdk, or use them as they are in a script.
FactDefinition
One fact definition, as the client holds it. title and description are localisation ids, and media the picture's media id. A museum fact's title is three fields joined by | (name, biography, frame label), which the museum popup splits itself.
| Field | Type | |
|---|---|---|
defId | number | |
type | "endangered" | "animal" | "plant" | "journeyBook" | "mineral" | "tiki" | "gecko" | "bat" | "cat" | "insect" | "weather" | "holiday" | "aquarium" | "museum" | "journeyBookBig" | "brady" | "millions" | "earthDay" | "migration" | "holidayTwo" | "archive" | null | The kind of fact, or null for a type number this build has no name for. |
typeNumber | number | The raw type number, which the client's popups are chosen by. |
media | number | null | The picture's media id, or null for a fact with none. |
userVarId | number | null | The stat whose bit marks it seen, or null for a fact that is never marked. |
bit | number | Which bit of that stat. The archive popup also uses it as its frame. |
title | number | The title's localisation id. |
description | number | The description's localisation id. |
index | number | null | Its place in the list it came from (the arrows' order), or null for one fetched on its own. |
RoomFact
A fact the room definition puts in the room (an action point of type 2).
| Field | Type | |
|---|---|---|
defId | number | |
position | { x: number; y: number; } | Where the room definition puts it, in room coordinates. |
slot | number | The action point's place in the room's list, which the client uses as its idx. |
FactLoading
What the fact system has fetched, and what it is still waiting on.
| Field | Type | |
|---|---|---|
popupArt | boolean | Whether each popup template has been fetched (media 87, 1544 and 6592). |
museumArt | boolean | |
archiveArt | boolean | |
definitionSlots | number | How long the definition fetch table is (_factDefHelpers): keyed by id with gaps, so the highest id asked for this sitting rather than a count. 0 when nothing has been asked for. |
pictures | number | How many popup pictures are still coming (_factMediaRequests). |
eventFactWaiting | number | null | The event fact held until its generic list lands (_genericFactId), or null. |
museumFactWaiting | number | null | The museum fact held the same way (_museumRequest), or null. |
started | boolean | Whether init has run, which fills the frame tables and hands the room over. |
ActOptions
How long something that acts may take, and what may end it first.
| Field | Type | |
|---|---|---|
timeoutMs optional | number | undefined | 10 seconds by default. |
signal optional | AbortSignal | undefined |
FactDefinitionInput
A definition to put in the client's cache: its id, and whatever of the rest is to change.
type FactDefinitionInput = { defId: number } & Partial<Omit<FactDefinition, 'type'>>FactPopupOpened
A fact popup going up.
| Field | Type | |
|---|---|---|
fact | FactDefinition | The fact, as the client handed it to its own display function. |
kind | FactPopupKind | Which display function put it up. |
FactPopupKind
What the client does with a fact of a type (NGFactManager.requestFactInfo, onFactDefReceived):
tab: a pressable bubble in the room (setupNormalFact), which opens the ordinary popup.popup: the ordinary popup at once (displayNormalNonTabFact).journeyBook: the Journey Book popup, with its Add to Book button.tierney,brady,museum,archive: those popups of their own.broken: routed tosetupNormalFact, which throws for it (millionsonly).
type FactPopupKind = 'tab' | 'popup' | 'journeyBook' | 'tierney' | 'brady' | 'museum' | 'archive' | 'broken'FactViewed
A fact marked seen (markViewed): the stats the server kept.
| Field | Type | |
|---|---|---|
defId | number | |
userVarId | number | The fact's own stat and bit, and its value as the server kept it. |
bit | number | |
value | number | |
typeUserVarId | number | null | The type's "seen one" stat the client also sets, or null for a type with none. |
FactFound
A fact bubble pressed in a room (onFound).
| Field | Type | |
|---|---|---|
defId | number | |
type | "endangered" | "animal" | "plant" | "journeyBook" | "mineral" | "tiki" | "gecko" | "bat" | "cat" | "insect" | "weather" | "holiday" | "aquarium" | "museum" | "journeyBookBig" | "brady" | "millions" | "earthDay" | "migration" | "holidayTwo" | "archive" | null | |
typeNumber | number | |
title | number | |
description | number | |
media | number | null | |
firstTime | boolean | Whether this press is the first time the player has seen it, read before the press. |
userVarId | number | null | The stat the press marks, or null: the client writes it only on an undimmed bubble. |
bit | number | null |
FactSystemEvent
The fact system setting itself up and taking lists in (onSystem).
| Field | Type | |
|---|---|---|
kind | "started" | "stopped" | "eventList" | "museumList" | "cached" | "bookFact" | - started, stopped: NGFactManager.init and destroy. - eventList, museumList: a generic list landed, which lets a waiting fact open. - cached: a definition was put in the cache (updateFactDefCache). - bookFact: one of the Journey Book's definitions was asked for. |
count | number | null | eventList and museumList: how many the list holds. |
defId | number | null | cached and bookFact: the definition it was about. |
FactStepEvent
A step the client takes with one fact (onStep).
| Field | Type | |
|---|---|---|
kind | "bubblePlaced" | "eventReopened" | "bookVarSet" | "petOffered" | "statAsked" | - bubblePlaced: a fact became a bubble in the room (setupNormalFact). - eventReopened: the event popup closed and opened again on another fact. - bookVarSet: the server answered a Journey Book page being marked (onJBVarSet). - petOffered: a popup's pet button was pressed (onPetCreateBtn). - statAsked: the client worked out which stat marks a type seen (uvForType). |
defId | number | null | |
typeNumber | number | null | |
userVarId | number | null | bookVarSet: the stat the server answered for. |
name | string | null | petOffered: the button's name, which carries the pet's definition after an underscore. |
FactPopup
The fact popup on screen.
| Field | Type | |
|---|---|---|
open | boolean | Whether it is showing. |
frame | number | Its frame: the art for the fact's type (the archive's is its bit plus one). |
index | number | null | Its place in its list, as the arrows count, or null for one with no list. |
bit | number | null | The fact's bit, which the museum popup's videos button sends as its stream list. |
FactPopupClosed
A fact popup coming down.
| Field | Type | |
|---|---|---|
fact | FactDefinition | null | The fact it showed, or null when it went up before the listening started, or by a bubble. |
animated | boolean | Closed by the Journey Book popup's closing animation rather than at once. |
MuseumFactEvent
The museum popup being walked through (popup.onMuseum).
| Field | Type | |
|---|---|---|
kind | "back" | "next" | "redrawn" | "videosPressed" | "videosArrived" | - back, next: its arrows. redrawn: drawn again on another fact (reloadMuseumPopup). - videosPressed: its videos button, which asks the server for the stream list. - videosArrived: that list came back and the lone movie player opened on it. |
defId | number | null | |
index | number | null | The place in the museum's list the popup was showing. |