Namespace in reactor_objects_followers.js

Game_Followers

64 functions in 4 groups · hide internal

Everything here is tracked by Game Objects: the party, the map, its events.

Familiar territory. Game_Followers keeps the RPG Maker MZ API, so existing MZ knowledge, tutorials and plugin code apply. Reactor's additions are marked with descriptions below.

Quick Reference

Checks (True / False) 2

areGathered() Whether they are gathered.
areMoving() Whether they are moving.

Actions 2

setFormation() The formation from now on, kept with the save: a name and { spacing, straggle } (what is left out is the game…
jumpAll() Jump all.

Updating & Drawing 4

update() Update.
updateMove() Updates the move each frame.
synchronize() Synchronize.
refresh() Refresh.

Other 56

normalizeFormation() A formation as stored (System.json, a command, a script), made whole.
formation() The formation the party walks in: the one a command or a script set, else the game's, else a single file.
rrIsActive() Whether the formation moves the followers now: another than the stock file (or a walk back into it), and the…
places() The places of a formation for count followers, as [row, right] pairs in units of the spacing (the leader is […
rrTrailLength() Tiles of trail a formation needs: the longest file, and room to fall behind in.
rrTrail() The trail, made from the line as it stands when there is none: the leader's tile, then each follower's that i…
rrForgetSteps() What a follower remembers of its last steps: not the place it has in the line.
rrForget() What a follower remembers of its last decisions, and its place: where it stands is its place until one is han…
rrGroundStep() One step over plain ground from (x, y) toward d and back again, for a walker standing at height: the height o…
rrSideStep() One tile sideways (ux, uy): a straight step, or a diagonal by either of its corners.
rrOpenBeside() How many tiles the ground is open from a trail tile to one side (1 its right, -1 its left), up to need.
rrHolds() Whether a member of the party is on a ladder, pulling itself up a ledge, in the water or in an event's jump:…
rrClimbs() Whether a member of the party is on a ladder or a ledge, in the water or in the air.
rrLeaderClimbs() Whether the leader is on a ladder, pulling itself up a ledge, in the water or in an event's jump (or the part…
rrSpotOf() A spot of its own for a scattered follower: rows behind the leader and tiles to its side, in tiles.
rrClaimed() Whether a tile is the place of a follower already given one this round, or under one that stays put.
rrHoldPlaces() Each follower that walks in the formation holds one of its places: its own by its order in the line until two…
rrTrades() Whether the formation lets two followers trade places: a file keeps its order.
rrMayTrade() Whether two followers may trade places: both hold one and the two places are two tiles.
rrBlocker() The follower standing in the way of a step toward a place (dx, dy) away: on the tile that way, else (the way…
rrTrade() Two followers trade places in the formation: the one in the way takes the place beyond it.
rrLineUp() The order the formation takes when it narrows to a file: by where each follower stands along the trail, the n…
rrPlaceOnTrail() Hands out the places on the trail of a formation that is not a file: the tiles the formation names there (the…
rrFilePlace() The next place of the file nobody has, from a follower's turn on: tiles back from the leader, or -1 where the…
rrAssign() Works out every follower's place from the trail as it is.
rrFindOnTrail() Looks for a follower's tile on the trail; it then knows its place on it.
rrNeedsStep() Whether a follower is to decide its next step: it follows, stands still off its place, and is not waiting.
rrTick() Rr tick.
rrDecide() A follower's next step toward its place.
rrNarrow() A follower that cannot come to its place beside the trail has a place in the file until the party has walked…
rrWalkToTrail() A follower off the trail walks to it by a path of its own: to the tile its place is counted from, or the near…
rrWalkTo() Begins a follower's own walk to a tile of the trail: the whole way or none, and never a long way round.
rrWalkHeldUp() A follower's own walk stands, with a member that follows as it does standing in the way (the walk was planned…
rrTrailStep() One step along the trail toward the tile goal back from the leader: as the leader walked it.
rrFreeStep() A step of a follower's own toward a tile (dx, dy) away: the diagonal, else along the longer way, else the oth…
rrPace() The pace of a follower's step: the leader's, a notch faster while it runs to catch up.
rrShift() The party crossed into a neighboring map with no break: the trail, each follower's place and any walk it was…
rrBring() A follower left too far behind is put on its place in the file, on the first tile of it nobody stands on, and…
rrAboard() The party goes aboard such a vehicle (on true) or is back on foot (on false): with instant, without the fade.
rrMemberAt() Whether the leader or a follower that is seen stands on a tile, at a height that meets self (which is left ou…
rrFollowerAt() The follower that is seen on a tile, other than self; null where there is none.
rrHeldAt() Whether a follower that has been told to stay, to go somewhere or to walk a route stands on a tile.
rrCountHeld() Rr count held.
rrLeaveLine() A follower leaves the line (told to stay or to go somewhere, given a route, hidden).
rrHold() Takes a follower out of the line: it keeps its own pace and look, and stands in the leader's way as a body.
rrKeepsPlace() Whether the place a follower left is still its own: the leader has not walked on, and the line stands as it d…
rrRelease() Back into the line: whatever it was doing ends, and it walks to its place.
rrEndOrders() Every order ends where the followers stand (a transfer, a gather, a battle on the map).
rrOnRoute() A follower that has just been given a route by Set Movement Route is on its own from here: it walks the route…
route() A route for the followers who names ("all", a place from 1, or { actorId }), as Set Movement Route gives one…
rrWho() The followers a command or a script names: "all", a place in the line from 1, or { actorId }.
order() An order to the followers who names: "follow", "stay", "goto" (options.x, options.y, and options.direction to…
rrKeepWithActors() An order and Hide stay with the actor.
rrAreWalking() Whether a follower sent to a tile or called back is still on its way.
rrUpdateOrder() What an order does once its walk or its route is over.
gather() Gather.

Checks (True / False)

areGathered

method source
Game_Followers.prototype.areGathered()

Whether they are gathered. (Same as the RPG Maker MZ method of this name.)

areMoving

method source
Game_Followers.prototype.areMoving()

Whether they are moving. (Same as the RPG Maker MZ method of this name.)

Actions

setFormation

method source
Game_Followers.prototype.setFormation(formation, options)

The formation from now on, kept with the save: a name and { spacing, straggle } (what is left out is the game's own), or null for the game's own formation again.

jumpAll

method source
Game_Followers.prototype.jumpAll()

Jump all. (Same as the RPG Maker MZ method of this name.)

Updating & Drawing

update

method source
Game_Followers.prototype.update()

Update. (Same as the RPG Maker MZ method of this name.)

updateMove

method source
Game_Followers.prototype.updateMove()

Updates the move each frame. (Same as the RPG Maker MZ method of this name.)

synchronize

method source
Game_Followers.prototype.synchronize(x, y, d)

Synchronize. (Same as the RPG Maker MZ method of this name.)

refresh

method source
Game_Followers.prototype.refresh()

Refresh. (Same as the RPG Maker MZ method of this name.)

Other

normalizeFormation

static source
Game_Followers.normalizeFormation(source, fallback)

A formation as stored (System.json, a command, a script), made whole.

formation

method source
Game_Followers.prototype.formation()

The formation the party walks in: the one a command or a script set, else the game's, else a single file.

rrIsActive

method source
Game_Followers.prototype.rrIsActive()

Whether the formation moves the followers now: another than the stock file (or a walk back into it), and the leader on foot on the ground.

Details

Whether the formation moves the followers now: another than the stock file (or a walk back into it), and the leader on foot on the ground. Aboard a vehicle, on a ladder or a ledge, in the water and in the air the stock file follows, as it always has; the formation takes up again from where they stand. Nor while the followers are aboard with the leader (rrAboard), whatever it rides.

places

static source
Game_Followers.places(formation, count)

The places of a formation for count followers, as [row, right] pairs in units of the spacing (the leader is [0, 0]): what the editor's pictures and the tests read.

Details

The places of a formation for count followers, as [row, right] pairs in units of the spacing (the leader is [0, 0]): what the editor's pictures and the tests read.

rrTrailLength

method source
Game_Followers.prototype.rrTrailLength()

Tiles of trail a formation needs: the longest file, and room to fall behind in.

rrTrail

method source
Game_Followers.prototype.rrTrail()

The trail, made from the line as it stands when there is none: the leader's tile, then each follower's that is a step from the one before it (a stock file is exactly that).

Details

The trail, made from the line as it stands when there is none: the leader's tile, then each follower's that is a step from the one before it (a stock file is exactly that). Followers on it know their place.

rrForgetSteps

method source
Game_Followers.prototype.rrForgetSteps(follower)

What a follower remembers of its last steps: not the place it has in the line.

rrForget

method source
Game_Followers.prototype.rrForget(follower)

What a follower remembers of its last decisions, and its place: where it stands is its place until one is handed out.

rrGroundStep

method source
Game_Followers.prototype.rrGroundStep(probe, x, y, d, height)

One step over plain ground from (x, y) toward d and back again, for a walker standing at height: the height on the next tile, or NaN.

Details

One step over plain ground from (x, y) toward d and back again, for a walker standing at height: the height on the next tile, or NaN. A wall, a ledge either way and a drop off something built all stop it; nobody standing there does.

rrSideStep

method source
Game_Followers.prototype.rrSideStep(probe, x, y, ux, uy, height)

One tile sideways (ux, uy): a straight step, or a diagonal by either of its corners.

rrOpenBeside

method source
Game_Followers.prototype.rrOpenBeside(trail, back, side, need)

How many tiles the ground is open from a trail tile to one side (1 its right, -1 its left), up to need.

Details

How many tiles the ground is open from a trail tile to one side (1 its right, -1 its left), up to need. Kept with the tile.

rrHolds

method source
Game_Followers.prototype.rrHolds(character)

Whether a member of the party is on a ladder, pulling itself up a ledge, in the water or in an event's jump: more than only in the air.

rrClimbs

method source
Game_Followers.prototype.rrClimbs(character)

Whether a member of the party is on a ladder or a ledge, in the water or in the air.

rrLeaderClimbs

method source
Game_Followers.prototype.rrLeaderClimbs()

Whether the leader is on a ladder, pulling itself up a ledge, in the water or in an event's jump (or the party has fallen to its end): there the stock file follows.

Details

Whether the leader is on a ladder, pulling itself up a ledge, in the water or in an event's jump (or the party has fallen to its end): there the stock file follows. A leader that only drops off a ledge or hops is followed along the trail as on the ground: its way down is the followers' way down, and the tiles it took are not forgotten.

rrSpotOf

method source
Game_Followers.prototype.rrSpotOf(follower, index, spacing)

A spot of its own for a scattered follower: rows behind the leader and tiles to its side, in tiles.

rrClaimed

method source
Game_Followers.prototype.rrClaimed(round, x, y)

Whether a tile is the place of a follower already given one this round, or under one that stays put.

rrHoldPlaces

method source
Game_Followers.prototype.rrHoldPlaces()

Each follower that walks in the formation holds one of its places: its own by its order in the line until two of them trade (rrTrade).

Details

Each follower that walks in the formation holds one of its places: its own by its order in the line until two of them trade (rrTrade). Returns how many places there are.

rrTrades

method source
Game_Followers.prototype.rrTrades()

Whether the formation lets two followers trade places: a file keeps its order.

rrMayTrade

method source
Game_Followers.prototype.rrMayTrade(a, b)

Whether two followers may trade places: both hold one and the two places are two tiles.

Details

Whether two followers may trade places: both hold one and the two places are two tiles. The same two trade once between two steps of the leader (two that are both parted from their places by the land would trade for ever), and not again a moment after a trade (that would be the trade undone on the walk).

rrBlocker

method source
Game_Followers.prototype.rrBlocker(follower, dx, dy)

The follower standing in the way of a step toward a place (dx, dy) away: on the tile that way, else (the way being a diagonal) on either of the two tiles beside it.

rrTrade

method source
Game_Followers.prototype.rrTrade(a, b)

Two followers trade places in the formation: the one in the way takes the place beyond it.

rrLineUp

method source
Game_Followers.prototype.rrLineUp(trail, ordered)

The order the formation takes when it narrows to a file: by where each follower stands along the trail, the nearer the leader and the nearer the trail first, so a rank closes up like a zip and nobody has to pass anybody.

Details

The order the formation takes when it narrows to a file: by where each follower stands along the trail, the nearer the leader and the nearer the trail first, so a rank closes up like a zip and nobody has to pass anybody. One that has a place in the file already keeps its turn in it (two that trade places have then traded, wherever they stand). A file keeps the order of the line.

rrPlaceOnTrail

method source
Game_Followers.prototype.rrPlaceOnTrail(trail, lineCount, spacing, round)

Hands out the places on the trail of a formation that is not a file: the tiles the formation names there (the middle of a wedge's second row), then as many places of the file as there are followers without one, the nearest the leader first; all of them go to the followers in the order of the line-up, so nobody is given a place beyond somebody else's.

Details

Hands out the places on the trail of a formation that is not a file: the tiles the formation names there (the middle of a wedge's second row), then as many places of the file as there are followers without one, the nearest the leader first; all of them go to the followers in the order of the line-up, so nobody is given a place beyond somebody else's. A tile the leader stands on, one that is somebody's place beside the trail, and one the trail crosses twice count once or not at all. A follower the trail is too short for has no place yet.

rrFilePlace

method source
Game_Followers.prototype.rrFilePlace(trail, turn, spacing, round)

The next place of the file nobody has, from a follower's turn on: tiles back from the leader, or -1 where the trail is not that long yet.

Details

The next place of the file nobody has, from a follower's turn on: tiles back from the leader, or -1 where the trail is not that long yet. Where the leader turned back the trail crosses itself: a tile the leader stands on, or one that is somebody's place already, is passed over.

rrAssign

method source
Game_Followers.prototype.rrAssign(trail)

Works out every follower's place from the trail as it is.

rrFindOnTrail

method source
Game_Followers.prototype.rrFindOnTrail(trail, follower, near)

Looks for a follower's tile on the trail; it then knows its place on it.

Details

Looks for a follower's tile on the trail; it then knows its place on it. Where the leader turned back the trail crosses itself and a tile is on it more than once: the one nearest the tile near back from the leader is taken (nearest the leader, where none is named).

rrNeedsStep

method source
Game_Followers.prototype.rrNeedsStep(follower)

Whether a follower is to decide its next step: it follows, stands still off its place, and is not waiting.

rrTick

method source
Game_Followers.prototype.rrTick()

Rr tick. (Same as the RPG Maker MZ method of this name.)

rrDecide

method source
Game_Followers.prototype.rrDecide(follower, index)

A follower's next step toward its place.

rrNarrow

method source
Game_Followers.prototype.rrNarrow(follower, trail)

A follower that cannot come to its place beside the trail has a place in the file until the party has walked on a few tiles.

rrWalkToTrail

method source
Game_Followers.prototype.rrWalkToTrail(follower, trail, goal)

A follower off the trail walks to it by a path of its own: to the tile its place is counted from, or the nearest tile behind that which nobody stands on and, on a 3D map, is on the level the follower stands on (the foot of the stairs, not the landing over its head; the top of the ledge the leader dropped off, not the ground below it).

rrWalkTo

method source
Game_Followers.prototype.rrWalkTo(follower, trail, x, y, height, frame)

Begins a follower's own walk to a tile of the trail: the whole way or none, and never a long way round.

rrWalkHeldUp

method source
Game_Followers.prototype.rrWalkHeldUp(follower)

A follower's own walk stands, with a member that follows as it does standing in the way (the walk was planned through it, as through one that moves on): the two trade places where that changes anything and the walk is over, else the rest of the walk passes the members that stand, as a file folds through itself.

rrTrailStep

method source
Game_Followers.prototype.rrTrailStep(follower, trail, back, goal)

One step along the trail toward the tile goal back from the leader: as the leader walked it.

rrFreeStep

method source
Game_Followers.prototype.rrFreeStep(follower, dx, dy)

A step of a follower's own toward a tile (dx, dy) away: the diagonal, else along the longer way, else the other.

rrPace

method source
Game_Followers.prototype.rrPace(follower)

The pace of a follower's step: the leader's, a notch faster while it runs to catch up.

rrShift

method source
Game_Followers.prototype.rrShift(dx, dy, dh, within)

The party crossed into a neighboring map with no break: the trail, each follower's place and any walk it was on move with it into the entered map's tiles, so the line keeps walking the way the leader came.

Details

The party crossed into a neighboring map with no break: the trail, each follower's place and any walk it was on move with it into the entered map's tiles, so the line keeps walking the way the leader came. A follower still past the border walks back onto the map (canPass below).

rrBring

method source
Game_Followers.prototype.rrBring(follower, trail)

A follower left too far behind is put on its place in the file, on the first tile of it nobody stands on, and fades in.

rrAboard

method source
Game_Followers.prototype.rrAboard(on, instant)

The party goes aboard such a vehicle (on true) or is back on foot (on false): with instant, without the fade.

Details

The party goes aboard such a vehicle (on true) or is back on foot (on false): with instant, without the fade. Back on foot the followers stand on the leader's tile. It reads no event and ends no order, so a transfer and a battle that starts aboard may call it.

rrMemberAt

method source
Game_Followers.prototype.rrMemberAt(x, y, self)

Whether the leader or a follower that is seen stands on a tile, at a height that meets self (which is left out).

rrFollowerAt

method source
Game_Followers.prototype.rrFollowerAt(x, y, self)

The follower that is seen on a tile, other than self; null where there is none.

rrHeldAt

method source
Game_Followers.prototype.rrHeldAt(x, y, self)

Whether a follower that has been told to stay, to go somewhere or to walk a route stands on a tile.

rrCountHeld

method source
Game_Followers.prototype.rrCountHeld()

Rr count held. (Same as the RPG Maker MZ method of this name.)

rrLeaveLine

method source
Game_Followers.prototype.rrLeaveLine()

A follower leaves the line (told to stay or to go somewhere, given a route, hidden).

Details

A follower leaves the line (told to stay or to go somewhere, given a route, hidden). The others keep the places they have until the leader walks on, then close up over the gap; told to follow before that, it walks back to the place it left and nobody else has moved. The stock file has no trail: the line as it stands is the way the party came.

rrHold

method source
Game_Followers.prototype.rrHold(follower, order)

Takes a follower out of the line: it keeps its own pace and look, and stands in the leader's way as a body.

rrKeepsPlace

method source
Game_Followers.prototype.rrKeepsPlace(follower)

Whether the place a follower left is still its own: the leader has not walked on, and the line stands as it did.

rrRelease

method source
Game_Followers.prototype.rrRelease(follower)

Back into the line: whatever it was doing ends, and it walks to its place.

rrEndOrders

method source
Game_Followers.prototype.rrEndOrders()

Every order ends where the followers stand (a transfer, a gather, a battle on the map).

rrOnRoute

method source
Game_Followers.prototype.rrOnRoute(follower)

A follower that has just been given a route by Set Movement Route is on its own from here: it walks the route at its own pace, through the rest of the party, and stays where the route ends until it is told to follow.

Details

A follower that has just been given a route by Set Movement Route is on its own from here: it walks the route at its own pace, through the rest of the party, and stays where the route ends until it is told to follow. In a battle on the map it is a unit and the route is the stock one.

route

method source
Game_Followers.prototype.route(who, moveRoute)

A route for the followers who names ("all", a place from 1, or { actorId }), as Set Movement Route gives one to a follower.

Details

A route for the followers who names ("all", a place from 1, or { actorId }), as Set Movement Route gives one to a follower. Returns the followers it reached.

rrWho

method source
Game_Followers.prototype.rrWho(who)

The followers a command or a script names: "all", a place in the line from 1, or { actorId }.

order

method source
Game_Followers.prototype.order(who, order, options)

An order to the followers who names: "follow", "stay", "goto" (options.x, options.y, and options.direction to face on arrival), "come" (back to the leader, then follow), "hide", "show".

Details

An order to the followers who names: "follow", "stay", "goto" (options.x, options.y, and options.direction to face on arrival), "come" (back to the leader, then follow), "hide", "show". Returns the followers it reached.

rrKeepWithActors

method source
Game_Followers.prototype.rrKeepWithActors()

An order and Hide stay with the actor.

Details

An order and Hide stay with the actor. When the party's order changes (the menu's Formation, Change Party Member) the body that stays, walks its route or is hidden goes on standing for that actor: the follower that shows the actor now takes that body over, and gives its own to the follower that had it. One whose actor is no follower any more (it leads now, or has left the party) falls in.

rrAreWalking

method source
Game_Followers.prototype.rrAreWalking()

Whether a follower sent to a tile or called back is still on its way.

rrUpdateOrder

method source
Game_Followers.prototype.rrUpdateOrder(follower, order)

What an order does once its walk or its route is over.

gather

method source
Game_Followers.prototype.gather()

Gather. (Same as the RPG Maker MZ method of this name.)