Players meeting in North Haven, online. What This Module Does
reactor_online_battle.js: other players in your Tactical battle A battle runs on the game that started it, the host: that game rolls every hit and moves every enemy. Each player who joins runs the same battle screen as a mirror, which plays what the host reports and sends back the orders its own units are given. The server only carries the messages.
Classes & Namespaces
Game_RemoteActor
Someone else's actor: a battler built from what their game reported, standing where an enemy would. 15 functions →
F
1 function →
$gameMessage
1 function →
Reactor3D
1 function →
Design Notes from the Source Code
reactor_online_battle.js: other players in your Tactical battle A battle runs on the game that started it, the host: that game rolls every hit and moves every enemy. Each player who joins runs the same battle screen as a mirror, which plays what the host reports and sends back the orders its own units are given. The server only carries the messages.
host the real Game_Fight. A guest's units are event units with a
Game_RemoteActor battler, and their turn waits for a plan message
where an enemy's would think (stage "await").
mirror a Game_Fight with _mirror set. No queue, AI, pages or outcome of
its own: nextMirror starts whatever comes next from the host.
Its own units are its real party, so hurts last after the battle.
Any side is a team name, and targeting already asks only whether two names are the same, so someone fighting for themselves is simply a third name. On a mirror the teams are turned so that its own side is "ally".
Saving is off while a battle is shared: half of it is on another machine. Design: docs/DESIGN-ONLINE.md#shared-battles.
Someone else's actor: a battler built from what their game reported, standing where an enemy would.
View reactor_online_battle.js on GitHub · Hide internal (_) functions