Core runtime: data, input and the ReactorEvents feed. What This Module Does
The heart of the runtime: utilities, graphics setup, input and the ReactorEvents feed. ReactorEvents tells plugins when a battle starts or ends, when HP changes, when a door opens or a vehicle is boarded, so you can react without wrapping engine methods.
Example
// React to battles without patching engine code
const off = ReactorEvents.on("battleEnd", ({ result, escaped }) => {
if (result === 0) $gameVariables.setValue(10, $gameVariables.value(10) + 1); // count wins
});
// Listen once, then unsubscribe automatically
ReactorEvents.once("battleStart", ({ preemptive }) => {
if (preemptive) $gameMessage.add("You caught them off guard!");
});
Classes & Namespaces
Array
4 functions →
Math
1 function →
Number
3 functions →
String
3 functions →
Utils
The static class that defines utility methods. 33 functions →
XMLHttpRequest
1 function →
Graphics
The static class that carries out graphics processing. 76 functions →
ReactorProfiler
The in-game frame profiler (F10 to start/stop). 11 functions →
ReactorEvents
The runtime's battle event feed: a read-only, synchronous notification channel the engine emits into at fixed points of a battle — start an… 7 functions →
Graphics.FPSCounter
6 functions →
Point
The point class. 2 functions →
Rectangle
The rectangle class. 2 functions →
Bitmap
The basic object that represents an image. 78 functions →
Design Notes from the Source Code
reactor_core.js v1.7.0 Continued in these parts, which reactor_main.js loads next in this order: reactor_core_display.js reactor_core_io.js
This section contains some methods that will be added to the standard Javascript objects.
@namespace JsExtensions
Makes a shallow copy of the array.
@memberof JsExtensions @returns {array} A shallow copy of the array.
View reactor_core.js on GitHub · Hide internal (_) functions