A Battle Room: a classic battle staged in 3D. What This Module Does
A map starts its battle by itself, in every mode:
<battle trigger: N>in the map's Note: when the leader comes within N tiles (1 to 50, a straight line) of an enemy unit it can see.<battle trigger: open>: as soon as the party is on the map, once per visit, against every unit on it.<battle trigger: 0>: never; the map's events start its battles.- No tag: 6 tiles, unless an event of the map has a Start Battle on Map command: such a map waits for its events, as with 0.
<battle lose: continue>: a battle the map starts can be lost and the game goes on. The map's 3D sidecar (battle.trigger) is read only where the Note has no trigger tag.
Classes & Namespaces
F
17 functions →
Game_Fight
1 function →
Game_Map
2 functions →
Scene_Map
2 functions →
Scene_Boot
1 function →
Design Notes from the Source Code
A map starts its battle by itself, in every mode:
<battle trigger: N>in the map's Note: when the leader comes within N tiles (1 to 50, a straight line) of an enemy unit it can see.<battle trigger: open>: as soon as the party is on the map, once per visit, against every unit on it.<battle trigger: 0>: never; the map's events start its battles.- No tag: 6 tiles, unless an event of the map has a Start Battle on Map command: such a map waits for its events, as with 0.
<battle lose: continue>: a battle the map starts can be lost and the game goes on. The map's 3D sidecar (battle.trigger) is read only where the Note has no trigger tag.
Where the mode in force is Tactical, Action or First Person the battle is fought on the map (reactor_fight.js); where it is Classic the battle screen opens against the enemy rows taken (reactor_fight_classic.js).
One rule says who is in a battle: a unit is taken when it stands within the
map's start distance of a party member who can see it, and a unit standing
within F.GROUP tiles of one that is taken comes with it (a group is fought
whole). It is asked as a battle starts (F.takenNear) and on the beat
while one runs, of the map's units outside it (F.bringNear): whoever it
takes joins.
After a battle the enemy units that were in it start no battle until the leader has been out of their reach once (the start distance and a group's width), each for itself. An enemy that was not in it starts its battle as always, and one still held is in that battle when the rule takes it. A hold belongs to the map it was made on and is let go on any other.
Also here: the launch line of the editor's Play this battle (playat) and
of a scripted Test battle (fight), both read in a playtest only.
Sight and heights are the Tactical grid's (ReactorFight.Grid, in reactor_fight_tactical.js), asked for when a line is judged and never while this file loads: where the grid is not loaded nothing is seen. A unit's body hides no unit from the rule: not its own, not that of one standing with it. Ground, what is built and scenery do.
View reactor_fight_flow.js on GitHub · Hide internal (_) functions