Skip to content

Repository files navigation

BAR Replay Coach

BAR Replay Coach watches a Beyond All Reason replay, finds confirmed problems, and suggests one goal for the player's next practice match.

The current version follows a narrow flow:

flowchart LR
    A[Replay] --> B[Telemetry and events]
    B --> C[Detectors]
    C --> D[Confirmed episodes]
    D --> E[Main problem]
    E --> F[Next training goal]
Loading

The report shows one main problem, up to three moments that support it, a short explanation, and one practice goal. The widget does not give advice during a live match or claim to know why the player lost.

Current analysis coverage

You can install the widget regardless of the map, faction, or build order. Analysis currently works only for this replay setup:

  • replay analysis only;
  • one manually selected team;
  • Ravaged Remake v1.2;
  • Cortex where the first factory is a Cortex Bot Lab (corlab);
  • long energy shortages, a long idle period for the first factory, and a late first expansion;
  • replay speed 1x.

For other maps, factions, factories, game modes, or missing game data, the widget shows that analysis is unavailable instead of guessing. The project is experimental: tests confirm its behavior, but do not yet prove that it helps players improve.

Engineering highlights

  • Spring.IsReplay() prevents analysis during a live match.
  • The user selects the team to analyze; the widget does not guess it from the local player.
  • One module reads BAR data and rejects missing or invalid values before analysis.
  • Separate modules turn game observations into confirmed problems and a ready-to-display report.
  • Rewinding the replay or changing the selected team starts a new analysis instead of mixing two timelines.
  • The report contains at most one main problem and one matching practice goal.
  • Installation and removal use one shared list of production files.
  • Lua tests cover the analysis modules, and a separate Recoil widget checks behavior inside the game engine.

Installation and usage

  1. Follow the installation guide.
  2. Set the targetTeamID of the player to analyze.
  3. Open a replay and enable BAR Replay Coach in the Widget Selector (F11).
  4. Watch the replay at 1x, or run /luaui replaycoach report when you want the current report.
  5. Use the displayed goal in the next practice match.

Use /luaui replaycoach hide and /luaui replaycoach show to control the panel without stopping the analysis.

Runtime screenshot

The repository does not yet contain a verified screenshot of the report. After running a supported replay, capture the final panel without player names or other personal information and save it as:

docs/images/replay-report.png

Place it below the analysis flow in this README. The image must come from the running widget and show the main problem, supporting moments, and next practice goal.

Development

The autonomous test suite requires Node.js, npm, and a Lua command compatible with Lua 5.1:

npm.cmd install
npm.cmd run check

Runtime-sensitive Lua changes should also be checked inside Recoil with tests/bar_runtime_test_widget.lua.

Project status

BAR Replay Coach is an experimental tool, not an official Beyond All Reason component. It does not yet support other maps, factions, first factories, replay speeds, or a general assessment of player performance.

Contribution guidance is in CONTRIBUTING.md. Security reports follow the security policy.

The project is distributed under the GNU General Public License v2.0 or later. Beyond All Reason and Recoil Engine belong to their respective owners.

About

Replay analysis for Beyond All Reason that turns confirmed gameplay episodes into one focused training goal.

Topics

Resources

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages