Quick Reference
Setup & Creation 8
| load() | Loads the interfaces file once; missing or malformed means none. |
| installCaptureHooks() | Install capture hooks. |
| registerPluginCommands() | Register plugin commands. |
| createOverlay() | Creates the overlay. |
| createFightHud() | Creates the fight hud. |
| createActionHud() | Creates the action hud. |
| createBattleHud() | Creates the battle hud. |
| installSceneRouting() | Wraps the latest plugin-provided methods; safe to verify repeatedly. |
Getting Information 9
| dataUrls() | The files to read, first found wins: a battle test reads the Test_ copy the editor wrote from its unsaved dat… |
| resolveRect() | Screen-space rectangle of a node given its parent's rectangle. |
| colorIndex() | Window-skin index of a text colour the game drew with, or the colour itself. |
| resolveActor() | Resolves the common actor binding carried by Text, Image, Gauge, and actor Lists. |
| resolveContextTokens() | Resolve context tokens. |
| resolveActorTokens() | Resolve actor tokens. |
| listRowsSignature() | List rows signature. |
| itemKind() | Item kind. |
| listRows() | Rows for the fixed declarative List sources. |
Checks (True / False) 8
| isPreview() | Whether it is preview. |
| isReady() | Whether it is ready. |
| isPoolHidden() | Whether key is a resource pool the project turned off (System.json rrPoolsOff, Database > System 1 > Options)… |
| isActiveActor() | The actor choosing commands now, or acting now: the one a turn marker points at. |
| isSpriteElement() | Parts that change every frame live in sprites over the row, so the row itself is not repainted. |
| isInterfaceClass() | Whether a class on SceneManager's stack is this scene. |
| isPersonalAction() | Whether it is personal action. |
| canUseOn() | Whether it can use on. |
Actions 15
| endPreview() | Ends the interface preview; there is no game underneath to return to. |
| beginCapture() | Open the requested scene the way the game would: every menu opens over the map (plugins snapshot it for the m… |
| openCaptureScene() | From a running map, open the requested scene as the game would. |
| performCapture() | Write the scene to the request's directory; true when written. |
| call() | Call. |
| equipPreviewActor() | The actor as it would be with the equipment chosen in compareContext, while that list has focus - the stock e… |
| changeOption() | Changes the option. |
| releaseHudBitmaps() | Let go of every picture the HUD made under a window or layer (see hudBitmap). |
| destroyFightHud() | Destroy fight hud. |
| placeFightWindow() | A stock map battle window, moved and sized to its node; it slides in each time it opens. |
| takeFightHud() | The HUD for a battle that begins: the one made ahead when it was made from this same record, else a new one. |
| destroyActionHud() | Destroy action hud. |
| releaseMapHuds() | A map scene's battle HUDs are let go with it. |
| placeBattleWindow() | Place battle window. |
| runCommandEvent() | A Common Event command: the event runs now while the battle waits (time progress stops, its messages show), t… |
Updating & Drawing 18
| drawActorGauge() | Draws the actor gauge. |
| drawLog() | Draws the log. |
| updateCapture() | Once per frame while a capture is pending: wait for the scene to be the requested one, started, settled, and… |
| drawnCenter() | Where a window's center is drawn, in its layer: what direction keys and anything else that asks "where is it"… |
| drawWindowIcon() | Draws the window icon. |
| drawImageMeter() | A meter picture cut to the rate and stretched to the part's box. |
| drawImageNumber() | Digits from a sheet of ten (0-9) side by side, scaled to the part's height; other characters leave a gap. |
| updateFightHud() | Updates the fight hud each frame. |
| updateFightScene() | Once a frame on the map: the HUD exists exactly while a battle runs here. |
| refreshActionState() | What changes only when the battle says so: the player's unit, the weapon's picture and steps, the keys and co… |
| updateActionHud() | Updates the action hud each frame. |
| updateActionCrosshair() | The crosshair: one sprite at the battle's aim point, redrawn when its whole-number state changes. |
| updateActionBars() | Bars over opponents that were hit a moment ago or are aimed at, from a pool; and the mark on the locked one. |
| updateActionDamage() | Where a hit came from (an arc that turns toward it and fades) and the low-HP edge (one small picture, stretch… |
| updateActionScene() | Once a frame on the map: the HUD of a real-time mode exists exactly while a battle of that mode runs here. |
| updateBattleHud() | Updates the battle hud each frame. |
| updateCommandEvent() | Runs a Common Event command each frame; returns true while one runs. |
| updateBattleCursor() | Updates the battle cursor each frame. |
Other 108
| screenMetrics() | Physical screen and centred UI-area metrics used by every interface. |
| migrateLegacyCoordinates() | Re-expresses legacy UI-area root offsets in physical screen pixels. |
| windowRect() | Converts a physical rectangle to coordinates local to the scene's WindowLayer. |
| interface() | Interface. |
| storedMode() | A stored record's mode as normalizeInterface would give it, without building the record. |
| cssColor() | A CSS color from "#rrggbb" and an 0-255 alpha. |
| controlStyle() | Sparse visual-state values resolved without changing the authored node. |
| nineSliceSegments() | Source and destination rectangles for a clamped nine-slice draw. |
| normalizeCondition() | Normalize condition. |
| normalizeActorElements() | Normalize actor elements. |
| actorPanelLayout() | Actor panel layout. |
| actorPanelLayoutAll() | Actor panel layout all. |
| actorGaugePath() | Actor gauge path. |
| normalizeAction() | Normalize action. |
| normalizeSe() | Normalize se. |
| normalizeLiteralItems() | Normalize literal items. |
| normalizeNode() | Normalize node. |
| upgradeMenuActorPanel() | Upgrade menu actor panel. |
| upgradeMenuFormation() | Upgrade menu formation. |
| normalizeInterface() | Normalize interface. |
| orderNodes() | Nodes in draw order: every parent before its children, siblings in authored order, so a child never hides und… |
| normalizeDesign() | The size a record was designed for: { width, height }, or null when it does not say. |
| fitRecord() | Fits a normalized record to the screen it runs on (or to screen, for a preview). |
| shownScale() | How large a node window is shown: 1 unless its record was fitted to another screen. |
| evaluateCondition() | Evaluate condition. |
| compileCondition() | Compile condition. |
| compileScript() | Compile script. |
| bootInterfaceId() | Boot interface id. |
| launchTokens() | Every &-delimited launch-line token, from the URL and NW's argv. |
| captureRequest() | The capture request on the launch line, or null. |
| wrapMethod() | Wrap method. |
| partySlot() | 0-based party slot of an actor, or -1 when it is not in the party. |
| slotCode() | A slot-bound code for a party member, or the literal for anyone else. |
| cssToHex() | "#rrggbb" + 0..255 alpha from a CSS colour the engine drew with. |
| imageSourceFromUrl() | Image-node source and file for an image URL the engine loaded, or null. |
| imageFromFrame() | An image element (or {icon}) for a blt / sprite frame off a loaded image. |
| mergeTextRuns() | Text primitives on one line become one Text element with \C[n] and \I[n] codes; centred / right-aligned draws… |
| elementsFromDraws() | Elements from a bitmap's draw log (text merged, icons folded into text, images and fills kept). |
| fontContext() | Font context. |
| spriteElements() | Elements of an inner sprite of a window (gauges, names) or a scene sprite, at (x, y). |
| windowElements() | Everything a window shows, in window-local pixels. |
| sceneElements() | Sprites of the scene outside windows (title art, drawn titles), in screen pixels. |
| collectWindows() | Every window in the scene tree with its screen rect. |
| _pngBytes() | Png bytes. |
| screenshotDataUrl() | Screenshot data url. |
| motionState() | A moving node's state: its settings, its age in updates, and the pose it is drawn at. |
| motionLeave() | How far the interface has closed (0 to 1), or -1 while it is not closing: Appear runs backward as it closes. |
| linkCarried() | Once a scene or an overlay has made its windows: which of them stand inside a node that moves or has an Angle. |
| partyMember() | The party member in a 0-based slot, or null past the party's end. |
| actorFromContext() | Actor from context. |
| actorTextValue() | Actor text value. |
| contextTokens() | The {context.field} pattern and its lower-case field table, built once (again if the field list grows). |
| convertPartyCodes() | Convert party codes. |
| formatListRow() | Format list row. |
| filterRow() | The row selected in the list a node follows (its filterContext), or null. |
| filterCategory() | The inventory category a node shows: the chosen category row's, else its own. |
| inCategory() | In category. |
| goodsItem() | A Shop Processing goods entry [type, id, priceType, price] as its database record. |
| skillCostText() | A skill's cost the way the stock skill list prints it: TP first, then MP. |
| slotDateText() | Slot date text. |
| readInput() | Read input. |
| writeInput() | Write input. |
| iconBitmap() | Isolate atlas tiles before scaling or fractional placement. |
| gaugeLabelRenderer() | Borrow the engine's escape parser without creating an extra window. |
| gaugeSpriteClass() | Sprite_Gauge at the node's size: the bar is the lower half, label and value fonts scale with the height (24 p… |
| readyPicture() | A picture that is loaded, or null: ref if it can be drawn, else fallback (the normal picture while a state's… |
| blitPicture() | Draws a picture over a rectangle of a bitmap by fit: stretched, whole inside, repeated or nine-sliced by the… |
| spritePortrait() | Whether a panel draws its portrait as an animated sprite rather than into the row. |
| softImage() | Soft image. |
| softFailed() | Whether a soft image failed to load (the caller draws its fallback). |
| whenReady() | When ready. |
| faceEvent() | Face event. |
| faceState() | The portrait's frame and motion for an actor now; timers run down once a frame. |
| atbRate() | An actor's time gauge in a time-progress battle (0 to 1), else 0. |
| actorGaugeData() | Actor gauge data. |
| actorPanelRevision() | Actor panel revision. |
| interfacePictures() | Every picture a record's nodes name as their look: fills, state and row pictures, gauge bars. |
| optionProbe() | The stock Options window's list, made with no window behind it: makeCommandList and everything plugins hang o… |
| fightStripUnit() | The unit whose turn tile is under a point of the screen, or 0: the Tactical HUD's strip can be clicked to loo… |
| fightPanelAt() | Whether a point of the screen is on one of the HUD's unit panels that can be seen. |
| fightTheme() | Fonts, colors, terms and pictures as the game has them, for the shared drawing. |
| fightThumbnail() | A model's portrait for the HUD: a canvas, null while it is being made, false when there is none. |
| fightModelOf() | The model a unit is shown by on this map (a flat map draws models too), or null. |
| fightMenuRow() | The highlighted row of the map battle menu that is up, written into out (kind, symbol, enabled, item, and key… |
| fightIconExists() | Whether the project's icon sheet has a picture at an index (an empty cell has none). |
| styleFightCommands() | The battle's own commands (Mount, Dismount, Overwatch, Wait, End Turn) on the stock command window, written t… |
| fitFightWindow() | A list window sized to what it lists, inside its node's rectangle and against the edges its anchor names: the… |
| fightNow() | The Tactical battle running on the map the party stands on, or null (no battle, another map, another mode). |
| fightInterface() | The Tactical battle HUD record: the one System binds as Tactical Battle (reactorTacticalInterfaceId, a Tactic… |
| hudBitmap() | A picture a map battle HUD draws into (a turn box, the crosshair, a bar). |
| readyFightHud() | The HUD a battle on this map would open, made ahead on a quiet map frame and kept out of sight, so the battle… |
| actionNow() | The battle of a real-time mode (Action, First Person) running on the map the party stands on, or null. |
| actionInterface() | A real-time mode's HUD record: the one System binds for that mode (reactorActionInterfaceId / reactorFirstPer… |
| battleInterface() | The project's battle HUD record (System 2), or null. |
| battleSlotRect() | An actor's row in the HUD's party panel, in window-layer coordinates. |
| customizeBattleCommands() | Command alignment and an authored command list on the Actor or Party Command window. |
| escapeFromActorCommand() | Escape chosen by an actor: the party gives up its choices first, as when Escape is chosen before anyone acts,… |
| defaultCursorBitmap() | A small downward arrow, the cursor when no image is chosen. |
| battlerTop() | The top centre of a battler as it is drawn, in the scene's coordinates: the projected box of a 3D model in a… |
| battleTarget() | Where the cursor points: over the chosen enemy, or the chosen ally's HUD row (else their sprite). |
| victoryTheme() | Fonts, colors, pictures and the game's own words, for the shared drawing. |
| replacementRole() | Replacement role. |
| replacementId() | Replacement id. |
| gotoStockRole() | Goto stock role. |
| gotoStockTitle() | Goto stock title. |
| routedId() | The record bound in place of a stock scene class, or 0. |
| sceneRouter() | The scene is swapped as late as possible, so plugins wrapped around goto and push see the stock class: a pre-… |
| sceneRoutingInstalled() | Scene routing installed. |
Setup & Creation
load
static sourceReactorUI.load()
Loads the interfaces file once; missing or malformed means none.
installCaptureHooks
static sourceReactorUI.installCaptureHooks()
Install capture hooks.
registerPluginCommands
static sourceReactorUI.registerPluginCommands()
Register plugin commands.
createOverlay
static sourceReactorUI.createOverlay(scene, record, options = {})
Creates the overlay.
createFightHud
static sourceReactorUI.createFightHud(scene, record)
Creates the fight hud.
createActionHud
static sourceReactorUI.createActionHud(scene, record, mode)
Creates the action hud.
createBattleHud
static sourceReactorUI.createBattleHud(scene, record)
Creates the battle hud.
installSceneRouting
static sourceReactorUI.installSceneRouting()
Wraps the latest plugin-provided methods; safe to verify repeatedly.
Getting Information
dataUrls
static sourceReactorUI.dataUrls()
The files to read, first found wins: a battle test reads the Test_ copy the editor wrote from its unsaved database, when it wrote one.
resolveRect
static sourceReactorUI.resolveRect(node, parentRect, measured)
Screen-space rectangle of a node given its parent's rectangle.
colorIndex
static sourceReactorUI.colorIndex(color)
Window-skin index of a text colour the game drew with, or the colour itself.
resolveActor
static sourceReactorUI.resolveActor(node, scene)
Resolves the common actor binding carried by Text, Image, Gauge, and actor Lists.
resolveContextTokens
static sourceReactorUI.resolveContextTokens(value, node, scene)
Resolve context tokens.
resolveActorTokens
static sourceReactorUI.resolveActorTokens(value, node, scene)
Resolve actor tokens.
listRowsSignature
static sourceReactorUI.listRowsSignature(rows)
List rows signature.
itemKind
static sourceReactorUI.itemKind(item)
Item kind.
listRows
static sourceReactorUI.listRows(node, scene)
Rows for the fixed declarative List sources.
Checks (True / False)
isPreview
static sourceReactorUI.isPreview()
Whether it is preview.
isReady
static sourceReactorUI.isReady()
Whether it is ready.
isPoolHidden
static sourceReactorUI.isPoolHidden(key)
Whether key is a resource pool the project turned off (System.json rrPoolsOff, Database > System 1 > Options): its gauge is not drawn.
Details
Whether key is a resource pool the project turned off (System.json rrPoolsOff, Database > System 1 > Options): its gauge is not drawn. HP is never off.
isActiveActor
static sourceReactorUI.isActiveActor(actor)
The actor choosing commands now, or acting now: the one a turn marker points at.
isSpriteElement
static sourceReactorUI.isSpriteElement(node, element)
Parts that change every frame live in sprites over the row, so the row itself is not repainted.
isInterfaceClass
static sourceReactorUI.isInterfaceClass(sceneClass)
Whether a class on SceneManager's stack is this scene.
Details
Whether a class on SceneManager's stack is this scene. pixi_compat wraps the global after this file loads, so the stack holds the wrapper, which shares this prototype.
isPersonalAction
static sourceReactorUI.isPersonalAction(action)
Whether it is personal action.
canUseOn
static sourceReactorUI.canUseOn(user, item, targets)
Whether it can use on.
Actions
endPreview
static sourceReactorUI.endPreview()
Ends the interface preview; there is no game underneath to return to.
beginCapture
static sourceReactorUI.beginCapture(request)
Open the requested scene the way the game would: every menu opens over the map (plugins snapshot it for the menu background and assume it is there), a battle starts from the map, and the title stands on its own.
Details
Open the requested scene the way the game would: every menu opens over the map (plugins snapshot it for the menu background and assume it is there), a battle starts from the map, and the title stands on its own. So a new game is set up, the map starts, and only then is the scene pushed.
openCaptureScene
static sourceReactorUI.openCaptureScene()
From a running map, open the requested scene as the game would.
performCapture
static sourceReactorUI.performCapture()
Write the scene to the request's directory; true when written.
call
static sourceReactorUI.call(id)
Call.
equipPreviewActor
static sourceReactorUI.equipPreviewActor(node, scene, actor)
The actor as it would be with the equipment chosen in compareContext, while that list has focus - the stock equip screen's comparison.
Details
The actor as it would be with the equipment chosen in compareContext, while that list has focus - the stock equip screen's comparison. Null when there is nothing to compare.
changeOption
static sourceReactorUI.changeOption(symbol, forward, wrap)
Changes the option.
releaseHudBitmaps
static sourceReactorUI.releaseHudBitmaps(container)
Let go of every picture the HUD made under a window or layer (see hudBitmap).
Details
Let go of every picture the HUD made under a window or layer (see hudBitmap). Returns how many.
destroyFightHud
static sourceReactorUI.destroyFightHud(scene, hud)
Destroy fight hud.
placeFightWindow
static sourceReactorUI.placeFightWindow(scene, hud, entry)
A stock map battle window, moved and sized to its node; it slides in each time it opens.
takeFightHud
static sourceReactorUI.takeFightHud(scene, record)
The HUD for a battle that begins: the one made ahead when it was made from this same record, else a new one.
destroyActionHud
static sourceReactorUI.destroyActionHud(scene, hud)
Destroy action hud.
releaseMapHuds
static sourceReactorUI.releaseMapHuds(scene)
A map scene's battle HUDs are let go with it.
Details
A map scene's battle HUDs are let go with it. A scene that ends under a battle (the menu, a transfer, a load, Game Over) never sees the frame on which the battle is over, and what its HUD holds outside the scene would stay for good: the pictures it made, the listener of its feed, the built-in HUD's stand-down.
placeBattleWindow
static sourceReactorUI.placeBattleWindow(scene, hud, entry)
Place battle window.
runCommandEvent
static sourceReactorUI.runCommandEvent(scene, win, commonEventId)
A Common Event command: the event runs now while the battle waits (time progress stops, its messages show), then the window that chose it opens again for the same actor, or the party.
Details
A Common Event command: the event runs now while the battle waits (time progress stops, its messages show), then the window that chose it opens again for the same actor, or the party. It is not the actor's action; a skill with a Common Event effect is.
Updating & Drawing
drawActorGauge
static sourceReactorUI.drawActorGauge(ctx, rect, element, rate, colors)
Draws the actor gauge.
drawLog
static sourceReactorUI.drawLog(bitmap)
Draws the log.
updateCapture
static sourceReactorUI.updateCapture()
Once per frame while a capture is pending: wait for the scene to be the requested one, started, settled, and its windows fully open (or 3 seconds, whichever comes first), then capture and exit.
drawnCenter
static sourceReactorUI.drawnCenter(window, out)
Where a window's center is drawn, in its layer: what direction keys and anything else that asks "where is it" go by.
drawWindowIcon
static sourceReactorUI.drawWindowIcon(index, x, y)
Draws the window icon.
drawImageMeter
static sourceReactorUI.drawImageMeter(bitmap, r, file, rate, redraw, rows, trail)
A meter picture cut to the rate and stretched to the part's box.
Details
A meter picture cut to the rate and stretched to the part's box. A
two-row picture (MOG's) holds the meter on top and the damage trail
underneath; the trail is drawn at trail first. Returns false when the
picture is missing, so the caller can draw the plain gauge instead.
drawImageNumber
static sourceReactorUI.drawImageNumber(bitmap, r, file, text, align, redraw)
Digits from a sheet of ten (0-9) side by side, scaled to the part's height; other characters leave a gap.
updateFightHud
static sourceReactorUI.updateFightHud(scene, hud, fight)
Updates the fight hud each frame.
updateFightScene
static sourceReactorUI.updateFightScene(scene)
Once a frame on the map: the HUD exists exactly while a battle runs here.
refreshActionState
static sourceReactorUI.refreshActionState(fight, hud, data, state)
What changes only when the battle says so: the player's unit, the weapon's picture and steps, the keys and costs.
updateActionHud
static sourceReactorUI.updateActionHud(scene, hud, fight)
Updates the action hud each frame.
updateActionCrosshair
static sourceReactorUI.updateActionCrosshair(hud, entry, data, state, shown)
The crosshair: one sprite at the battle's aim point, redrawn when its whole-number state changes.
updateActionBars
static sourceReactorUI.updateActionBars(hud, entry, data, state, shown)
Bars over opponents that were hit a moment ago or are aimed at, from a pool; and the mark on the locked one.
updateActionDamage
static sourceReactorUI.updateActionDamage(hud, entry, data, state, shown)
Where a hit came from (an arc that turns toward it and fades) and the low-HP edge (one small picture, stretched).
updateActionScene
static sourceReactorUI.updateActionScene(scene)
Once a frame on the map: the HUD of a real-time mode exists exactly while a battle of that mode runs here.
updateBattleHud
static sourceReactorUI.updateBattleHud(scene, hud)
Updates the battle hud each frame.
updateCommandEvent
static sourceReactorUI.updateCommandEvent(scene)
Runs a Common Event command each frame; returns true while one runs.
updateBattleCursor
static sourceReactorUI.updateBattleCursor(scene, hud, entry)
Updates the battle cursor each frame.
Other
screenMetrics
static sourceReactorUI.screenMetrics()
Physical screen and centred UI-area metrics used by every interface.
migrateLegacyCoordinates
static sourceReactorUI.migrateLegacyCoordinates(nodes, metrics)
Re-expresses legacy UI-area root offsets in physical screen pixels.
windowRect
static sourceReactorUI.windowRect(rect, scene, fit)
Converts a physical rectangle to coordinates local to the scene's WindowLayer.
interface
static sourceReactorUI.interface(id)
Interface.
storedMode
static sourceReactorUI.storedMode(raw)
A stored record's mode as normalizeInterface would give it, without building the record.
cssColor
static sourceReactorUI.cssColor(hex, alpha)
A CSS color from "#rrggbb" and an 0-255 alpha.
controlStyle
static sourceReactorUI.controlStyle(node, state)
Sparse visual-state values resolved without changing the authored node.
nineSliceSegments
static sourceReactorUI.nineSliceSegments(sw, sh, dw, dh, insets)
Source and destination rectangles for a clamped nine-slice draw.
normalizeCondition
static sourceReactorUI.normalizeCondition(raw)
Normalize condition.
normalizeActorElements
static sourceReactorUI.normalizeActorElements(raw)
Normalize actor elements.
actorPanelLayout
static sourceReactorUI.actorPanelLayout(node, width, height, fontSize)
Actor panel layout.
actorPanelLayoutAll
static sourceReactorUI.actorPanelLayoutAll(node, width, height, fontSize)
Actor panel layout all.
actorGaugePath
static sourceReactorUI.actorGaugePath(ctx, rect, shape, corner)
Actor gauge path.
normalizeAction
static sourceReactorUI.normalizeAction(raw)
Normalize action.
normalizeSe
static sourceReactorUI.normalizeSe(raw)
Normalize se.
normalizeLiteralItems
static sourceReactorUI.normalizeLiteralItems(raw)
Normalize literal items.
normalizeNode
static sourceReactorUI.normalizeNode(raw)
Normalize node.
upgradeMenuActorPanel
static sourceReactorUI.upgradeMenuActorPanel(entry)
Upgrade menu actor panel.
upgradeMenuFormation
static sourceReactorUI.upgradeMenuFormation(entry, enabled, label)
Upgrade menu formation.
normalizeInterface
static sourceReactorUI.normalizeInterface(raw)
Normalize interface.
orderNodes
static sourceReactorUI.orderNodes(nodes)
Nodes in draw order: every parent before its children, siblings in authored order, so a child never hides under its own parent.
normalizeDesign
static sourceReactorUI.normalizeDesign(raw)
The size a record was designed for: { width, height }, or null when it does not say.
fitRecord
static sourceReactorUI.fitRecord(record, screen)
Fits a normalized record to the screen it runs on (or to screen, for a preview).
Details
Fits a normalized record to the screen it runs on (or to screen, for a preview). A record that names no
design size, or whose design size is the screen's, is returned as it is: fit stays null and nothing in
its layout changes. Otherwise its nodes are placed in the screen's frame in the record's own units and
fit says how large to show them: every window is made at its designed size and shown at fit.scale,
so text, padding and line height shrink or grow together.
shownScale
static sourceReactorUI.shownScale(window)
How large a node window is shown: 1 unless its record was fitted to another screen.
evaluateCondition
static sourceReactorUI.evaluateCondition(condition, scene)
Evaluate condition.
compileCondition
static sourceReactorUI.compileCondition(source)
Compile condition.
compileScript
static sourceReactorUI.compileScript(source)
Compile script.
bootInterfaceId
static sourceReactorUI.bootInterfaceId()
Boot interface id.
launchTokens
static sourceReactorUI.launchTokens()
Every &-delimited launch-line token, from the URL and NW's argv.
captureRequest
static sourceReactorUI.captureRequest(tokens)
The capture request on the launch line, or null.
wrapMethod
static sourceReactorUI.wrapMethod(proto, name, wrapper)
Wrap method.
partySlot
static sourceReactorUI.partySlot(actor)
0-based party slot of an actor, or -1 when it is not in the party.
slotCode
static sourceReactorUI.slotCode(actor, code, literal)
A slot-bound code for a party member, or the literal for anyone else.
cssToHex
static sourceReactorUI.cssToHex(color)
"#rrggbb" + 0..255 alpha from a CSS colour the engine drew with.
imageSourceFromUrl
static sourceReactorUI.imageSourceFromUrl(url)
Image-node source and file for an image URL the engine loaded, or null.
imageFromFrame
static sourceReactorUI.imageFromFrame(frame)
An image element (or {icon}) for a blt / sprite frame off a loaded image.
mergeTextRuns
static sourceReactorUI.mergeTextRuns(runs, ctx)
Text primitives on one line become one Text element with \C[n] and \I[n] codes; centred / right-aligned draws and code-carrying draws stand alone.
Details
Text primitives on one line become one Text element with \C[n] and
\I[n] codes; centred / right-aligned draws and code-carrying draws
stand alone. ctx.mainFontSize and ctx.lineHeight describe the
window font so a line's y can be re-expressed for a text node, whose
line box is fontSize + (lineHeight - mainFontSize) tall.
elementsFromDraws
static sourceReactorUI.elementsFromDraws(draws, ctx)
Elements from a bitmap's draw log (text merged, icons folded into text, images and fills kept).
fontContext
static sourceReactorUI.fontContext(win)
Font context.
spriteElements
static sourceReactorUI.spriteElements(sprite, x, y, ctx)
Elements of an inner sprite of a window (gauges, names) or a scene sprite, at (x, y).
windowElements
static sourceReactorUI.windowElements(win)
Everything a window shows, in window-local pixels.
sceneElements
static sourceReactorUI.sceneElements(scene)
Sprites of the scene outside windows (title art, drawn titles), in screen pixels.
collectWindows
static sourceReactorUI.collectWindows(scene)
Every window in the scene tree with its screen rect.
_pngBytes
static internal sourceReactorUI._pngBytes(dataUrl)
Png bytes.
screenshotDataUrl
static sourceReactorUI.screenshotDataUrl()
Screenshot data url.
motionState
static sourceReactorUI.motionState(node)
A moving node's state: its settings, its age in updates, and the pose it is drawn at.
motionLeave
static sourceReactorUI.motionLeave(window, progress)
How far the interface has closed (0 to 1), or -1 while it is not closing: Appear runs backward as it closes.
linkCarried
static sourceReactorUI.linkCarried(windows, nodes)
Once a scene or an overlay has made its windows: which of them stand inside a node that moves or has an Angle.
Details
Once a scene or an overlay has made its windows: which of them stand inside a node that moves or has an
Angle. Such a window keeps its ancestors that carry it, outermost first (_uiCarry), and each moving
ancestor keeps the windows it carries, so its update places them. Worked out here, once; a window with
no such ancestor and no motion keeps _uiPosed false and is placed as it always was.
partyMember
static sourceReactorUI.partyMember(slot)
The party member in a 0-based slot, or null past the party's end.
actorFromContext
static sourceReactorUI.actorFromContext(scene, name)
Actor from context.
actorTextValue
static sourceReactorUI.actorTextValue(actor, token)
Actor text value.
contextTokens
static sourceReactorUI.contextTokens()
The {context.field} pattern and its lower-case field table, built once (again if the field list grows).
convertPartyCodes
static sourceReactorUI.convertPartyCodes(text)
Convert party codes.
formatListRow
static sourceReactorUI.formatListRow(template, row)
Format list row.
filterRow
static sourceReactorUI.filterRow(node, scene)
The row selected in the list a node follows (its filterContext), or null.
filterCategory
static sourceReactorUI.filterCategory(node, scene)
The inventory category a node shows: the chosen category row's, else its own.
inCategory
static sourceReactorUI.inCategory(item, category)
In category.
goodsItem
static sourceReactorUI.goodsItem(good)
A Shop Processing goods entry [type, id, priceType, price] as its database record.
skillCostText
static sourceReactorUI.skillCostText(actor, skill)
A skill's cost the way the stock skill list prints it: TP first, then MP.
slotDateText
static sourceReactorUI.slotDateText(timestamp)
Slot date text.
readInput
static sourceReactorUI.readInput(node, scene)
Read input.
writeInput
static sourceReactorUI.writeInput(node, scene, value)
Write input.
iconBitmap
static sourceReactorUI.iconBitmap(sheet, index)
Isolate atlas tiles before scaling or fractional placement.
Details
Isolate atlas tiles before scaling or fractional placement. Canvas filtering otherwise samples neighboring icons, leaving bright seams at tile edges.
gaugeLabelRenderer
static sourceReactorUI.gaugeLabelRenderer(gauge)
Borrow the engine's escape parser without creating an extra window.
gaugeSpriteClass
static sourceReactorUI.gaugeSpriteClass()
Sprite_Gauge at the node's size: the bar is the lower half, label and value fonts scale with the height (24 px is the engine's own), and a "variable" gauge reads a game variable against the node's max.
readyPicture
static sourceReactorUI.readyPicture(ref, fallback, redraw)
A picture that is loaded, or null: ref if it can be drawn, else fallback (the normal picture while a state's own is loading or missing).
Details
A picture that is loaded, or null: ref if it can be drawn, else fallback (the normal picture while a
state's own is loading or missing). redraw runs when a picture still loading arrives or fails.
blitPicture
static sourceReactorUI.blitPicture(bitmap, image, x, y, width, height, fit, node, opacity, radius)
Draws a picture over a rectangle of a bitmap by fit: stretched, whole inside, repeated or nine-sliced by the node's slice borders.
spritePortrait
static sourceReactorUI.spritePortrait(node)
Whether a panel draws its portrait as an animated sprite rather than into the row.
softImage
static sourceReactorUI.softImage(ref)
Soft image.
softFailed
static sourceReactorUI.softFailed(bitmap)
Whether a soft image failed to load (the caller draws its fallback).
whenReady
static sourceReactorUI.whenReady(bitmap, redraw)
When ready.
faceEvent
static sourceReactorUI.faceEvent(actor, kind)
Face event.
faceState
static sourceReactorUI.faceState(actor)
The portrait's frame and motion for an actor now; timers run down once a frame.
atbRate
static sourceReactorUI.atbRate(actor)
An actor's time gauge in a time-progress battle (0 to 1), else 0.
actorGaugeData
static sourceReactorUI.actorGaugeData(actor, key, element = {})
Actor gauge data.
actorPanelRevision
static sourceReactorUI.actorPanelRevision(node, rows)
Actor panel revision.
interfacePictures
static sourceReactorUI.interfacePictures(record)
Every picture a record's nodes name as their look: fills, state and row pictures, gauge bars.
optionProbe
static sourceReactorUI.optionProbe()
The stock Options window's list, made with no window behind it: makeCommandList and everything plugins hang on it run on a stand-in that only keeps the list.
Details
The stock Options window's list, made with no window behind it: makeCommandList and everything plugins
hang on it run on a stand-in that only keeps the list. Its statusText, processOk, cursorRight and
cursorLeft are the stock window's and the plugins', so an added option reads and changes as it would
there. Null where there is no stock window or its list cannot be made this way.
fightStripUnit
static sourceReactorUI.fightStripUnit(x, y)
The unit whose turn tile is under a point of the screen, or 0: the Tactical HUD's strip can be clicked to look at a unit (the battle asks this of a press before it reads the press for the map under the strip).
fightPanelAt
static sourceReactorUI.fightPanelAt(x, y)
Whether a point of the screen is on one of the HUD's unit panels that can be seen.
Details
Whether a point of the screen is on one of the HUD's unit panels that can be seen. A panel covers the map: what lies behind it is not pointed at through it.
fightTheme
static sourceReactorUI.fightTheme()
Fonts, colors, terms and pictures as the game has them, for the shared drawing.
fightThumbnail
static sourceReactorUI.fightThumbnail(model)
A model's portrait for the HUD: a canvas, null while it is being made, false when there is none.
fightModelOf
static sourceReactorUI.fightModelOf(unit)
The model a unit is shown by on this map (a flat map draws models too), or null.
fightMenuRow
static sourceReactorUI.fightMenuRow(out)
The highlighted row of the map battle menu that is up, written into out (kind, symbol, enabled, item, and key, a number that changes when the row does), or null with no menu up.
Details
The highlighted row of the map battle menu that is up, written into
out (kind, symbol, enabled, item, and key, a number that
changes when the row does), or null with no menu up.
fightIconExists
static sourceReactorUI.fightIconExists(index)
Whether the project's icon sheet has a picture at an index (an empty cell has none).
styleFightCommands
static sourceReactorUI.styleFightCommands(win, node)
The battle's own commands (Mount, Dismount, Overwatch, Wait, End Turn) on the stock command window, written the way the project writes Attack, Skill and Item so the window draws all its rows alike: the node's word, else the project's (System.json reactorBattle.terms), else the stock word in the case of those three; and, where those carry icons, an icon from the project's sheet as the same icon co…
Details
The battle's own commands (Mount, Dismount, Overwatch, Wait, End Turn) on the stock
command window, written the way the project writes Attack, Skill and
Item so the window draws all its rows alike: the node's word, else the
project's (System.json reactorBattle.terms), else the stock word in
the case of those three; and, where those carry icons, an icon from the
project's sheet as the same icon code (the HUD's own drawing only where
the sheet has no picture there). The rows share one alignment.
fitFightWindow
static sourceReactorUI.fitFightWindow(scene, entry, win)
A list window sized to what it lists, inside its node's rectangle and against the edges its anchor names: the command window as wide as its widest row and as tall as its rows (squeezed to keep the node's height where they allow, so it stands as tall as the panel beside it); the skill and item lists cut to whole rows.
fightNow
static sourceReactorUI.fightNow()
The Tactical battle running on the map the party stands on, or null (no battle, another map, another mode).
fightInterface
static sourceReactorUI.fightInterface()
The Tactical battle HUD record: the one System binds as Tactical Battle (reactorTacticalInterfaceId, a Tactical Battle HUD), else the stock layout sized for this screen.
hudBitmap
static sourceReactorUI.hudBitmap(width, height)
A picture a map battle HUD draws into (a turn box, the crosshair, a bar).
Details
A picture a map battle HUD draws into (a turn box, the crosshair, a bar). It is marked as the HUD's own, so the HUD can let it go when the battle ends: a sprite's destruction frees its texture but not the picture behind it, and one battle after another would leave them all with the graphics card's texture list.
readyFightHud
static sourceReactorUI.readyFightHud(scene)
The HUD a battle on this map would open, made ahead on a quiet map frame and kept out of sight, so the battle's first frame has only to show it (its windows were the longest thing on that frame).
Details
The HUD a battle on this map would open, made ahead on a quiet map frame and kept out of sight, so the battle's
first frame has only to show it (its windows were the longest thing on that frame). Made only where the map
names a unit or spawns one; scene._reactorFightHudReady is it, or false where there is nothing to ready.
actionNow
static sourceReactorUI.actionNow()
The battle of a real-time mode (Action, First Person) running on the map the party stands on, or null.
actionInterface
static sourceReactorUI.actionInterface(mode)
A real-time mode's HUD record: the one System binds for that mode (reactorActionInterfaceId / reactorFirstPersonInterfaceId, a record presented as that mode's HUD), else the mode's stock layout.
battleInterface
static sourceReactorUI.battleInterface()
The project's battle HUD record (System 2), or null.
battleSlotRect
static sourceReactorUI.battleSlotRect(hud, actor)
An actor's row in the HUD's party panel, in window-layer coordinates.
customizeBattleCommands
static sourceReactorUI.customizeBattleCommands(scene, win, node)
Command alignment and an authored command list on the Actor or Party Command window.
escapeFromActorCommand
static sourceReactorUI.escapeFromActorCommand(scene)
Escape chosen by an actor: the party gives up its choices first, as when Escape is chosen before anyone acts, so a failed escape starts the turn (turn-based) or leaves the party charging (time progress) instead of reopening a command window.
defaultCursorBitmap
static sourceReactorUI.defaultCursorBitmap()
A small downward arrow, the cursor when no image is chosen.
battlerTop
static sourceReactorUI.battlerTop(scene, sprite)
The top centre of a battler as it is drawn, in the scene's coordinates: the projected box of a 3D model in a battle room, else the sprite's own picture (its feet are at x, y) wherever the battlefield sits on screen.
battleTarget
static sourceReactorUI.battleTarget(scene, hud, node)
Where the cursor points: over the chosen enemy, or the chosen ally's HUD row (else their sprite).
victoryTheme
static sourceReactorUI.victoryTheme()
Fonts, colors, pictures and the game's own words, for the shared drawing.
replacementRole
static sourceReactorUI.replacementRole(sceneClass)
Replacement role.
replacementId
static sourceReactorUI.replacementId(role)
Replacement id.
gotoStockRole
static sourceReactorUI.gotoStockRole(role)
Goto stock role.
gotoStockTitle
static sourceReactorUI.gotoStockTitle()
Goto stock title.
routedId
static sourceReactorUI.routedId(sceneClass)
The record bound in place of a stock scene class, or 0.
sceneRouter
static sourceReactorUI.sceneRouter(method, base, engine)
The scene is swapped as late as possible, so plugins wrapped around goto and push see the stock class: a pre-title splash that steps in for Scene_Title still plays before a replaced title.
Details
The scene is swapped as late as possible, so plugins wrapped around goto
and push see the stock class: a pre-title splash that steps in for
Scene_Title still plays before a replaced title. The router next to the
engine's goto (engine, installed before plugins load) makes the swap,
and push reaches it through goto. A router installed over plugins only
opens a route and, if no call ever reached the engine's router (a plugin
that replaced goto outright), swaps the stock scene it left queued.
sceneRoutingInstalled
static sourceReactorUI.sceneRoutingInstalled()
Scene routing installed.