Namespace in reactor_battle_data.js

B

71 functions in 7 groups · hide internal

A Battle Room: a classic battle staged in 3D.

Quick Reference

Setup & Creation 1

attachmentPoint() Positions are in logical tiles in both flat battles and battle rooms.

Getting Information 5

maxBattleMembers() The maximum battle members.
resolveState() States afflicting the battler (highest priority first) may carry their own reaction sequence, which replaces…
resolvePresentation() Resolve presentation.
resolve() Resolve.
position() Position.

Checks (True / False) 3

isPhase() Whether it is phase.
isPhased() Marked steps, or an explicit list, say which phases a sequence provides.
hasPose() Whether it has the pose.

Actions 5

releasePoseRules() A motion after a pose brings the posed parts home over its own frames (0 frames snaps), the way a Move step t…
releaseMotionRules() The rules one model plays for a release step: the parts going home, and its own rules for the named motion un…
selectTargets() Selects the targets.
addStarters() Adds the starters.
moveGoal() Move goal.

Events, Commands & Input 1

commandDefaults() Runs the defaults command.

Updating & Drawing 2

stepPhase() Step phase.
step() Step.

Other 54

configuredBattleMembers() Configured battle members.
effekseerProjection() The projection matrix (as Effekseer takes it) that draws an effect that size in a viewport width x height pix…
empty() Empty.
purpose() Purpose.
phaseIds() Phase ids.
sequencePhases() Sequence phases.
phaseSteps() Phase steps.
migratePhases() An older whole-action sequence becomes an explicit one: every step in Execute, every phase provided (empty on…
builtinHit() The built-in hit: the action's animation on the targets, then Apply Action Effect.
foldEffectPhase() Effect used to be a phase of its own, called from Execute by a "Play Effect Phase" step.
migrateSequence() Migrate sequence.
migrateSettings() A per-phase pick of the old Effect phase has nothing to bind to.
autoPhases() Where each step of a plain action belongs, read from what it does: the approach is Movement, the walk home is…
graphic() Graphic.
directionFromYaw() Facing is a yaw in degrees: 0 faces +y (down the screen), 90 faces +x (right), 180 faces -y (up), -90 faces -…
graphicFrame() Graphic frame.
weaponMode() A weapon step shows the held thing, moves it (offset, rotation and scale tween over the step's frames from wh…
ease() Ease.
poseRest() Pose rest.
motionActionName() The action a motion step plays: a pose step's own, a step that releases a pose (the plan says which) its own…
spriteMotionName() What a sprite-sheet battler plays for a step: a part pose has no sheet row, so it waits.
partPose() Part pose.
aimedParts() A part entry with aim ('target' or 'user') turns to face that battler when the step plays: aimOf(entry, step)…
partPoseRules() Part pose rules.
posePlan() The plan of a sequence's poses: rules per step id, actions naming the action a step plays when it is not the…
partLabel() Part label.
hingeAxis() Which axis a hinge bends about: the limb's own direction rules it out, and the model's side axis (X) is the p…
heldPose() Held pose.
heldPlacement() Where a held 3D model stands: at the attachment point, facing where its holder faces (an authored front face…
flightPoint() Flight point.
visualIcon() Visual icon.
optionLabel() Option label.
expandCalls() Expand calls.
basic() Basic.
template() Template.
templateSteps() Template steps.
starterSequences() Starter sequences.
mostAlong() The most steps of a kind that can run together: alternatives of an If count once, by their fullest branch.
validateSequence() Validate sequence.
validateStore() Validate store.
timeline() Timeline.
duration() Duration.
choices() Choices.
defaultPhase() Default phase.
references() References.
room() Room.
facingToward() Facing toward.
directionYaw() The yaw a Face Direction step turns its battler to: a fixed way, about face, or toward the targets, the home…
transform() Transform.
roleKey() Role key.
visualPose() Model offsets are layered over travel; a motion without an override restores this layer, leaving the battler'…
evaluate() Evaluate.
previewPlan() Preview plan.
previewVisuals() Preview visuals.

Setup & Creation

attachmentPoint

static source
B.attachmentPoint(pose,step,width=1,height=2)

Positions are in logical tiles in both flat battles and battle rooms.

Getting Information

maxBattleMembers

static source
B.maxBattleMembers(system, plugins = [])

The maximum battle members.

resolveState

static source
B.resolveState(settings,sequences,kind,id,state,classId=0,actionBinding=null,stateIds=[])

States afflicting the battler (highest priority first) may carry their own reaction sequence, which replaces the idle-type motions while present.

resolvePresentation

static source
B.resolvePresentation(settings, sequences, context)

Resolve presentation.

resolve

static source
B.resolve(settings,sequences,context)

Resolve.

position

static source
B.position(room, side, index)

Position.

Checks (True / False)

isPhase

static source
B.isPhase(value)

Whether it is phase.

isPhased

static source
B.isPhased(sequence)

Marked steps, or an explicit list, say which phases a sequence provides.

Details

Marked steps, or an explicit list, say which phases a sequence provides. An action sequence with neither is the older whole action: every phase, all of its steps in Execute.

hasPose

static source
B.hasPose(step)

Whether it has the pose.

Actions

releasePoseRules

static source
B.releasePoseRules(step,previous)

A motion after a pose brings the posed parts home over its own frames (0 frames snaps), the way a Move step travels from the pose before it.

releaseMotionRules

static source
B.releaseMotionRules(plan,stepId,modelRules)

The rules one model plays for a release step: the parts going home, and its own rules for the named motion under the same action name.

selectTargets

static source
B.selectTargets(step,context)

Selects the targets.

addStarters

static source
B.addStarters(records)

Adds the starters.

moveGoal

static source
B.moveGoal(step, from, home, target, homes, direction = 1)

Move goal.

Events, Commands & Input

commandDefaults

static source
B.commandDefaults(type)

Runs the defaults command.

Updating & Drawing

stepPhase

static source
B.stepPhase(step)

Step phase.

step

static source
B.step(type, extra = {})

Step.

Other

configuredBattleMembers

static source
B.configuredBattleMembers(system)

Configured battle members.

effekseerProjection

static source
B.effekseerProjection(width, height, screenHeight = height, scale = 1, mirror = false)

The projection matrix (as Effekseer takes it) that draws an effect that size in a viewport width x height pixels centred on it.

Details

The projection matrix (as Effekseer takes it) that draws an effect that size in a viewport width x height pixels centred on it. screenHeight: the game's screen height; scale: how big a preview is drawn against that screen (its height / the screen's), 1 in the game; mirror flips it across its middle.

empty

static source
B.empty()

Empty.

purpose

static source
B.purpose(sequence)

Purpose.

phaseIds

static source
B.phaseIds()

Phase ids.

sequencePhases

static source
B.sequencePhases(sequence)

Sequence phases.

phaseSteps

static source
B.phaseSteps(sequence, phase)

Phase steps.

migratePhases

static source
B.migratePhases(sequence)

An older whole-action sequence becomes an explicit one: every step in Execute, every phase provided (empty ones too), so it still owns the whole action until its author moves steps into other phases.

builtinHit

static source
B.builtinHit(context = {}, role = 'allTargets', targetIndex)

The built-in hit: the action's animation on the targets, then Apply Action Effect.

foldEffectPhase

static source
B.foldEffectPhase(sequence)

Effect used to be a phase of its own, called from Execute by a "Play Effect Phase" step.

Details

Effect used to be a phase of its own, called from Execute by a "Play Effect Phase" step. It is part of Execute now: steps marked effect keep their place as Execute steps, a placeholder takes the sequence's effect steps at that moment (or the built-in hit when it had none), and its own frames become a wait after them.

migrateSequence

static source
B.migrateSequence(sequence)

Migrate sequence.

migrateSettings

static source
B.migrateSettings(settings)

A per-phase pick of the old Effect phase has nothing to bind to.

autoPhases

static source
B.autoPhases(steps)

Where each step of a plain action belongs, read from what it does: the approach is Movement, the walk home is Return, the idle after it is Finish, everything else (the swing, the animation, the hit) Execute.

graphic

static source
B.graphic(settings,kind,id,record,legacyModel)

Graphic.

directionFromYaw

static source
B.directionFromYaw(yaw)

Facing is a yaw in degrees: 0 faces +y (down the screen), 90 faces +x (right), 180 faces -y (up), -90 faces -x (left).

Details

Facing is a yaw in degrees: 0 faces +y (down the screen), 90 faces +x (right), 180 faces -y (up), -90 faces -x (left). Character sheets pick the matching row unless the graphic or motion names a direction.

graphicFrame

static source
B.graphicFrame(graphic,width,height,motion='idle',frame=0,facingYaw=-90)

Graphic frame.

weaponMode

static source
B.weaponMode(step)

A weapon step shows the held thing, moves it (offset, rotation and scale tween over the step's frames from where it was), or hides it.

ease

static source
B.ease(t,easing)

Ease.

poseRest

static source
B.poseRest()

Pose rest.

motionActionName

static source
B.motionActionName(step,plan)

The action a motion step plays: a pose step's own, a step that releases a pose (the plan says which) its own too, else the named motion.

spriteMotionName

static source
B.spriteMotionName(step)

What a sprite-sheet battler plays for a step: a part pose has no sheet row, so it waits.

partPose

static source
B.partPose(value)

Part pose.

aimedParts

static source
B.aimedParts(step,aimOf)

A part entry with aim ('target' or 'user') turns to face that battler when the step plays: aimOf(entry, step) answers the turn in degrees about the part's up axis from the live scene (the room knows where the part points and where the target stands).

partPoseRules

static source
B.partPoseRules(step,previous,aimOf)

Part pose rules.

posePlan

static source
B.posePlan(sequence,aimOf)

The plan of a sequence's poses: rules per step id, actions naming the action a step plays when it is not the plain motion name, and releases naming the motion a release step still plays alongside.

Details

The plan of a sequence's poses: rules per step id, actions naming the action a step plays when it is not the plain motion name, and releases naming the motion a release step still plays alongside.

partLabel

static source
B.partLabel(part)

Part label.

hingeAxis

static source
B.hingeAxis(direction)

Which axis a hinge bends about: the limb's own direction rules it out, and the model's side axis (X) is the pin unless the limb lies along it.

heldPose

static source
B.heldPose(from,to,e)

Held pose.

heldPlacement

static source
B.heldPlacement(point,facing,step,spec)

Where a held 3D model stands: at the attachment point, facing where its holder faces (an authored front face turns to it; a model without one keeps the +90 long-axis assumption), tipped by the step's Tilt, turned and rolled by Turn and Roll, held at the grip fraction of its height.

flightPoint

static source
B.flightPoint(from,to,progress,arc=0,returning=false)

Flight point.

visualIcon

static source
B.visualIcon(step,battler,item)

Visual icon.

optionLabel

static source
B.optionLabel(value)

Option label.

expandCalls

static source
B.expandCalls(sequence,sequences,stack=[])

Expand calls.

basic

static source
B.basic(name)

Basic.

template

static source
B.template(name = 'Melee Strike', id = 1)

Template.

templateSteps

static source
B.templateSteps(name = 'Melee Strike', id = 1)

Template steps.

starterSequences

static source
B.starterSequences()

Starter sequences.

mostAlong

static source
B.mostAlong(steps, match)

The most steps of a kind that can run together: alternatives of an If count once, by their fullest branch.

validateSequence

static source
B.validateSequence(sequence)

Validate sequence.

validateStore

static source
B.validateStore(sequences, settings)

Validate store.

timeline

static source
B.timeline(sequence, context)

Timeline.

duration

static source
B.duration(sequence, context)

Duration.

choices

static source
B.choices(settings, {kind,itemId,isAttack,weaponIds=[],battlerKind,battlerId,classId})

Choices.

defaultPhase

static source
B.defaultPhase(phase, context = {})

Default phase.

references

static source
B.references(settings, id, sequences=[])

References.

room

static source
B.room(map, previous = {})

Room.

facingToward

static source
B.facingToward(from,to)

Facing toward.

directionYaw

static source
B.directionYaw(step,pose,target,home)

The yaw a Face Direction step turns its battler to: a fixed way, about face, or toward the targets, the home spot or a screen position.

transform

static source
B.transform(value)

Transform.

roleKey

static source
B.roleKey(step)

Role key.

visualPose

static source
B.visualPose(pose)

Model offsets are layered over travel; a motion without an override restores this layer, leaving the battler's movement keys untouched.

evaluate

static source
B.evaluate(sequence, frame, context)

Evaluate.

previewPlan

static source
B.previewPlan(sequence,sequences)

Preview plan.

previewVisuals

static source
B.previewVisuals(sequence,frame,context)

Preview visuals.