Namespace in reactor_battle_presentation.js

P

59 functions in 4 groups · hide internal

Battle Rooms and Action Sequences.

Quick Reference

Setup & Creation 12

load() Load.
installActionRules() Victor Battle Motions vocabulary that imported sequences lean on: an action steps forward instead of walking…
installCommandWindowAnchor() Install command window anchor.
installMogHudNames() MOG_BattleHud's MZ port draws each actor's name on a bare Bitmap, which MZ starts in sans-serif (MV started i…
installPsychronicHud() Install psychronic hud.
installPartyLimit() Install party limit.
installBattlebackLoading() Install battleback loading.
installRoomAnchors() Install room anchors.
installSequenceAnimations() Install sequence animations.
installGraphics() Install graphics.
install() Install.
createRoom() Creates the room.

Actions 4

resetSlow() Resets the slow.
requestGraphicMotion() Requests the graphic motion.
clearBattlerLayers() Pictures a battler state left on its sprite go at the end of the battle.
showRoomPass() The view's pass sprite for a room on the game's context, inside holder: made when there is none, and again wh…

Updating & Drawing 6

updateGraphicBitmap() Updates the graphic bitmap each frame.
updateGraphicFrame() Updates the graphic frame each frame.
updateStates() Updates the states each frame.
drawnInRoom() A battler (or a room event) drawn by its battle room, as a picture or a model there, draws nothing of its own…
updateRoom() Updates the room each frame.
drawsEveryRefresh() Draws every refresh.

Other 37

warn() Warn.
json() Json.
sequence() Sequence.
usesSheet() Whether a battler is drawn from a character sheet (rows per facing) rather than a side-view sheet (mirrored t…
spriteYaw() The way a battler faces, as a yaw: the pose of a running sequence, the last Face Direction it was given, else…
compatibility() Compatibility.
gatherResultDisplay() Of the log methods queued from from on, the popups and battler reactions (popupDamage, perform*) move ahead o…
enginePlugins() A battle engine plugin that moves and draws the battlers itself keeps them: Reactor's battler states (entry,…
reachAlong() How far a body's box (world units: a room tile x is world x + 0.5, its y world z + 0.5) reaches from to, its…
adapter() Adapter.
sequenceVisuals() Sequence visuals.
evalSequence() A sequence's script: a condition, a formula or a Run Script step, with the user and a target in reach.
gameCue() The steps that change game data, audio or the screen play the same wherever a sequence runs: the battle scene…
extendAdapter() Extend adapter.
battlerScreenBox() Where a battler stands on the screen: its foot point and the top of its picture, in canvas pixels.
anchorCommandWindow() With BattlePresentation.json's "commandWindow": "battler", the actor command window stands above the actor wh…
roomScreenPosition() Room screen position.
patchBattleCursors() Patch battle cursors.
slowAllowed() Only in a room on Cinematic Cuts, with the game's battle camera not off and its slow motion on, and never in…
slowMotion() Slow motion.
timeScale() How fast the battle runs: 1, or less in slow motion.
rampSlow() One frame of the screen: the speed moves toward what is asked, and what is asked runs out.
mirrorSpriteLook() Mirror sprite look.
publishRoomBounds() Publish room bounds.
battlerIdentity() Battler identity.
graphicFor() Graphic for.
engineMotion() The engine asks an undecided side-view actor for 'walk' and a decided one for 'wait': the idle bob of a side-…
authoredState() Whether the project wrote a sequence for this battler's state (through its own binding, its class, or a state…
battlerState() Battler state.
cancelStates() Cancel states.
preloadBattleModels() The models a battle may throw or hold, asked for before the fight so the first throw does not fly for its twe…
rebuildRoom() The game canvas's context came back after a loss: the room is built again as at the start of the battle.
fallPose() Fall pose.
liePose() A room model amount of the way down (0 standing, 1 flat).
lieBillboard() Where a flat picture is drawn in a room when it lies amount of the way down: turned onto its side, resting on…
roomSpriteRefresh() Sprite._refresh for a sprite drawn by its battle room: the pivot its frame gives it, and no texture.
flushRoom() The room's picture for the frame: rendered, its battlers' bounds published, copied onto the battle's sprite.

Setup & Creation

load

static source
P.load()

Load.

installActionRules

static source
P.installActionRules()

Victor Battle Motions vocabulary that imported sequences lean on: an action steps forward instead of walking up when it is friendly, self, magical, or a ranged weapon attack (attack motion type missile).

installCommandWindowAnchor

static source
P.installCommandWindowAnchor()

Install command window anchor.

installMogHudNames

static source
P.installMogHudNames()

MOG_BattleHud's MZ port draws each actor's name on a bare Bitmap, which MZ starts in sans-serif (MV started it in the game font), so the name is the one label on the HUD in the wrong face.

Details

MOG_BattleHud's MZ port draws each actor's name on a bare Bitmap, which MZ starts in sans-serif (MV started it in the game font), so the name is the one label on the HUD in the wrong face. It also draws at one size, so a long name runs past its box. The name takes the game font and shrinks until it fits the layout box.

installPsychronicHud

static source
P.installPsychronicHud()

Install psychronic hud.

installPartyLimit

static source
P.installPartyLimit()

Install party limit.

installBattlebackLoading

static source
P.installBattlebackLoading()

Install battleback loading.

installRoomAnchors

static source
P.installRoomAnchors()

Install room anchors.

installSequenceAnimations

static source
P.installSequenceAnimations()

Install sequence animations.

installGraphics

static source
P.installGraphics()

Install graphics.

install

static source
P.install()

Install.

createRoom

static source
P.createRoom(scene,config,token)

Creates the room.

Actions

resetSlow

static source
P.resetSlow()

Resets the slow.

requestGraphicMotion

static source
P.requestGraphicMotion(sprite,name)

Requests the graphic motion.

clearBattlerLayers

static source
P.clearBattlerLayers(ss)

Pictures a battler state left on its sprite go at the end of the battle.

showRoomPass

static source
P.showRoomPass(holder,room)

The view's pass sprite for a room on the game's context, inside holder: made when there is none, and again when the view's passes were (a new render scale from Auto quality, a resize), as the map's own pass sprites are.

Updating & Drawing

updateGraphicBitmap

static source
P.updateGraphicBitmap(sprite,graphic,kind)

Updates the graphic bitmap each frame.

updateGraphicFrame

static source
P.updateGraphicFrame(sprite,graphic)

Updates the graphic frame each frame.

updateStates

static source
P.updateStates(ss)

Updates the states each frame.

drawnInRoom

static source
P.drawnInRoom(sprite)

A battler (or a room event) drawn by its battle room, as a picture or a model there, draws nothing of its own: its flat sprite holds the empty texture for good.

Details

A battler (or a room event) drawn by its battle room, as a picture or a model there, draws nothing of its own: its flat sprite holds the empty texture for good. Its frame changes every few updates (the motion's cells), and a sprite builds itself a new texture for each (Sprite._refresh); here a change only moves its pivot, as it would have, so nothing is made and nothing is left behind.

updateRoom

static source
P.updateRoom(ss)

Updates the room each frame.

drawsEveryRefresh

static source
P.drawsEveryRefresh()

Draws every refresh.

Other

warn

static source
P.warn(message)

Warn.

json

static source
P.json(file,optional=false)

Json.

sequence

static source
P.sequence(subject,action)

Sequence.

usesSheet

static source
P.usesSheet(sprite)

Whether a battler is drawn from a character sheet (rows per facing) rather than a side-view sheet (mirrored to turn).

spriteYaw

static source
P.spriteYaw(sprite,target)

The way a battler faces, as a yaw: the pose of a running sequence, the last Face Direction it was given, else toward its opponents in flat battles (a party along the bottom looks up) or its side for sprite sheets.

compatibility

static source
P.compatibility()

Compatibility.

gatherResultDisplay

static source
P.gatherResultDisplay(methods,from)

Of the log methods queued from from on, the popups and battler reactions (popupDamage, perform*) move ahead of the lines and waits, each group in its own order.

enginePlugins

static source
P.enginePlugins()

A battle engine plugin that moves and draws the battlers itself keeps them: Reactor's battler states (entry, idle, damage, victory...) stand aside for Victor's Battle Motions and the YEP and VisuStella battle cores, and its battler graphics for Victor's Battle Motions and Battler Graphic Setup.

reachAlong

static source
P.reachAlong(box,from,to)

How far a body's box (world units: a room tile x is world x + 0.5, its y world z + 0.5) reaches from to, its battler's place, back along the line toward from: where that line leaves the box.

Details

How far a body's box (world units: a room tile x is world x + 0.5, its y world z + 0.5) reaches from to, its battler's place, back along the line toward from: where that line leaves the box. 0 when they meet.

adapter

static source
P.adapter(manager,subject,targets,stateOnly=false)

Adapter.

sequenceVisuals

static source
P.sequenceVisuals({ss,room,subject,manager,targets})

Sequence visuals.

evalSequence

static source
P.evalSequence(code,subject,target,action,statement=false)

A sequence's script: a condition, a formula or a Run Script step, with the user and a target in reach.

gameCue

static source
P.gameCue(step,env)

The steps that change game data, audio or the screen play the same wherever a sequence runs: the battle scene and a battle on the map (reactor_fight_stage.js) both hand them here.

Details

The steps that change game data, audio or the screen play the same wherever a sequence runs: the battle scene and a battle on the map (reactor_fight_stage.js) both hand them here. env: the battlers the step chose, the user, number (a step value as a number), feedback (shows a battler's result), audioSaved (kept across the run's steps). Answers null when the step is not one of them, else {ticket} with what the sequence waits on, if anything.

extendAdapter

static source
P.extendAdapter(adapter,env)

Extend adapter.

battlerScreenBox

static source
P.battlerScreenBox(battler)

Where a battler stands on the screen: its foot point and the top of its picture, in canvas pixels.

Details

Where a battler stands on the screen: its foot point and the top of its picture, in canvas pixels. A model in a room is projected through the room's camera; a flat sprite is measured from its frame.

anchorCommandWindow

static source
P.anchorCommandWindow(window)

With BattlePresentation.json's "commandWindow": "battler", the actor command window stands above the actor whose turn it is, in a flat battle or a 3D room, wherever a HUD plugin would have parked it.

Details

With BattlePresentation.json's "commandWindow": "battler", the actor command window stands above the actor whose turn it is, in a flat battle or a 3D room, wherever a HUD plugin would have parked it. Set after the window's own update, so a HUD that moves it every frame (MOG_BattleHud slides it to the actor's box) is overruled every frame.

roomScreenPosition

static source
P.roomScreenPosition(sprite)

Room screen position.

patchBattleCursors

static source
P.patchBattleCursors(spriteset)

Patch battle cursors.

slowAllowed

static source
P.slowAllowed()

Only in a room on Cinematic Cuts, with the game's battle camera not off and its slow motion on, and never in a battle shared online (each player's game would fall out of step with the others).

slowMotion

static source
P.slowMotion(scale,frames)

Slow motion.

timeScale

static source
P.timeScale()

How fast the battle runs: 1, or less in slow motion.

Details

How fast the battle runs: 1, or less in slow motion. Eased, never a step.

rampSlow

static source
P.rampSlow()

One frame of the screen: the speed moves toward what is asked, and what is asked runs out.

mirrorSpriteLook

static source
P.mirrorSpriteLook(sprite,battler,record)

Mirror sprite look.

publishRoomBounds

static source
P.publishRoomBounds(sprite,room,key)

Publish room bounds.

battlerIdentity

static source
P.battlerIdentity(battler)

Battler identity.

graphicFor

static source
P.graphicFor(battler)

Graphic for.

engineMotion

static source
P.engineMotion(sprite,name)

The engine asks an undecided side-view actor for 'walk' and a decided one for 'wait': the idle bob of a side-view sheet.

Details

The engine asks an undecided side-view actor for 'walk' and a decided one for 'wait': the idle bob of a side-view sheet. On a character sheet those are the walk cycle, so a battler drawn from one stands still on them unless a sequence or battler state is the one asking.

authoredState

static source
P.authoredState(battler,state)

Whether the project wrote a sequence for this battler's state (through its own binding, its class, or a state it is under).

battlerState

static source
P.battlerState(battler,sprite)

Battler state.

cancelStates

static source
P.cancelStates(ss)

Cancel states.

preloadBattleModels

static source
P.preloadBattleModels()

The models a battle may throw or hold, asked for before the fight so the first throw does not fly for its twenty frames while a 10 MB model is still loading and never appears.

Details

The models a battle may throw or hold, asked for before the fight so the first throw does not fly for its twenty frames while a 10 MB model is still loading and never appears. Every model a sequence names outright, every party weapon's bound model, and the bound model of every skill and item the party can use; the loader caches templates, so a model is read once for the whole game.

rebuildRoom

static source
P.rebuildRoom(scene)

The game canvas's context came back after a loss: the room is built again as at the start of the battle.

Details

The game canvas's context came back after a loss: the room is built again as at the start of the battle. A room carried over draws some of its world wrong on the new context.

fallPose

static source
P.fallPose(room,key,battler)

Fall pose.

liePose

static source
P.liePose(room,key,amount)

A room model amount of the way down (0 standing, 1 flat).

Details

A room model amount of the way down (0 standing, 1 flat). Asked after room.place, which stands it up each frame.

lieBillboard

static source
P.lieBillboard(position,frame,tall,amount)

Where a flat picture is drawn in a room when it lies amount of the way down: turned onto its side, resting on the floor it stood on.

roomSpriteRefresh

static source
P.roomSpriteRefresh()

Sprite._refresh for a sprite drawn by its battle room: the pivot its frame gives it, and no texture.

flushRoom

static source
P.flushRoom(ss)

The room's picture for the frame: rendered, its battlers' bounds published, copied onto the battle's sprite.