Everything here is tracked by Game Objects: the party, the map, its events. What This Module Does
reactor_objects_followers.js v1.0.0 The party's followers: the formation they walk in, orders to one of them or to all, and the event commands for both. Part of reactor_objects.js; loads after reactor_objects_interpreter.js.
Classes & Namespaces
Game_Followers
64 functions →
Game_Follower
15 functions →
Game_Player
1 function →
Game_Interpreter
2 functions →
Design Notes from the Source Code
reactor_objects_followers.js v1.0.0 The party's followers: the formation they walk in, orders to one of them or to all, and the event commands for both. Part of reactor_objects.js; loads after reactor_objects_interpreter.js.
A formation says where each follower wants to stand, counted back along
the way the leader came and sideways from it:
file one behind the other (stock; with spacing 1 and no straggle
nothing in this file moves anybody)
loose a file whose gaps stretch and close
rank side by side behind the leader
wedge the leader at the point, the rest fanning back
column two files, the leader at the head of one
scattered each near the leader on a spot of its own
spacing (1 to 4) is the tiles between members and straggle (0 to 100)
how late and how unevenly they follow. The game's own formation is
System.json reactorParty: { formation, spacing, straggle }; Change
Follower Formation keeps another with the save.
The leader's way is kept as a trail of tiles. A follower on the trail walks it as the leader did (ladders and ledges through the physics' own follower rules); a follower beside it walks as a body of its own, by the map's passability and round the other members, and where its place cannot be stood on or come to from the trail it takes its place in the file instead.
$gamePlayer.followers().setFormation("wedge", { spacing: 2, straggle: 30 }) $gamePlayer.followers().setFormation(null) the game's own again $gamePlayer.followers().order(2, "stay") "all", a place from 1, or { actorId: 3 } $gamePlayer.followers().order(1, "goto", { x: 14, y: 9, direction: 2 }) $gamePlayer.followers().order("all", "follow") also "come", "hide", "show" $gamePlayer.followers().route(1, moveRoute) as Set Movement Route on a follower
A follower leaves the line only when it is told to: by an order, or by a
route from Set Movement Route with the editor's id for it (route). A
route given with forceMoveRoute alone, as plugins and scripts give one,
is the stock one: the follower is walked through and trails the leader
again afterwards.
View reactor_objects_followers.js on GitHub · Show internal (_) functions