Vehicles from the Prop Builder.

Vehicles

Vehicles in the World

reactor_vehicles.js · 2,732 lines · 64 public functions

Vehicles from the Prop Builder.

What This Module Does

Database starting placements and legacy rrVehicle: { type } events share the event driver. Their records live in data/ReactorVehicles.json; identities are "0:<vehicleId>" for database placements and "<mapId>:<eventId>" for legacy events. This file holds:

  • the types ($dataReactorVehicles) and the words the player reads (TERMS);
  • the vehicles of the map the party is on, and the saved registry of where each stands once it has left its authored tile ($gameMap._rrVehicles);
  • what $gamePlayer answers while it rides one: _vehicleType is "reactor", isInVehicle() is true, vehicle() is the event, and the event answers every method a caller of vehicle() uses;
  • which vehicle OK would board (offered), the two hops as state (_rrMount), Confirm to interact and Cancel to get off aboard, parking and the place to stand beside it, and the rule for a battle that starts on the map;
  • the script calls and the three plugin commands.

$gameMap._vehicles stays the native three. Optional database extensions add battler data and image bindings without replacing their movement or commands.

Classes & Namespaces

Design Notes from the Source Code

Database starting placements and legacy rrVehicle: { type } events share the event driver. Their records live in data/ReactorVehicles.json; identities are "0:<vehicleId>" for database placements and "<mapId>:<eventId>" for legacy events. This file holds:

  • the types ($dataReactorVehicles) and the words the player reads (TERMS);
  • the vehicles of the map the party is on, and the saved registry of where each stands once it has left its authored tile ($gameMap._rrVehicles);
  • what $gamePlayer answers while it rides one: _vehicleType is "reactor", isInVehicle() is true, vehicle() is the event, and the event answers every method a caller of vehicle() uses;
  • which vehicle OK would board (offered), the two hops as state (_rrMount), Confirm to interact and Cancel to get off aboard, parking and the place to stand beside it, and the rule for a battle that starts on the map;
  • the script calls and the three plugin commands.

$gameMap._vehicles stays the native three. Optional database extensions add battler data and image bindings without replacing their movement or commands.

What is saved is plain data on $gamePlayer, on the event and on $gameMap; no saved object holds a character. Every cache is in this module and is rebuilt on demand, so a save made before this file existed loads and plays.

Moving the ridden vehicle is reactor_vehicles_drive.js; drawing it and its rider is reactor_3d_vehicles.js and reactor_3d_rider.js. This file meets them in saved fields only: _rrDrive.v, .air, .alt and .fade are read, _rrDrive.leave written.

View reactor_vehicles.js on GitHub · Show internal (_) functions