Analyzes Age of Empires 2 recorded game files.
GPL-3.0 License
RecAnalyst is a PHP package for analyzing Age of Empires II recorded games.
It supports recorded game files from:
And reads data such as:
License - Credits - Contributing - Requirements - Installation - Configuration - Usage Examples - API Documentation - Limitations
$rec = new \RecAnalyst\RecordedGame('recorded_game.mgx2');
$rec->mapImage()->save('minimap.png');
foreach ($rec->players() as $player) {
printf("%s (%s)", $player->name, $player->civName());
}
Originally forked from Biegleux's work: v2.1.0 © 2007-2010 biegleux <[email protected]> Original project homepage Original project documentation
See also references.md.
RecAnalyst is looking for contributors. Please see the Issues List for bugs or missing features and help implement them by opening a PR!
RecAnalyst is an OPEN Open Source Project:
Individuals making significant and valuable contributions are given commit-access to the project to contribute as they see fit. This project is more like an open wiki than a standard guarded open source project.
See the Contributing Guide for more.
RecAnalyst works with PHP 5.6+ and PHP 7. The Imagick or GD extensions need to be installed to generate map images.
With Composer:
composer require recanalyst/recanalyst
RecAnalyst ships with translations and image files for researches and civilizations.
If you're using RecAnalyst with Laravel, scroll down to learn about Laravel integration.
RecAnalyst contains a basic Translator class for standalone use. By default, RecAnalyst uses the English language files from Age of Empires II: HD Edition.
RecAnalyst contains icons for civilizations, units and researches in the
resources/images
folder. If you're using RecAnalyst standalone, and want to
use the icons, you can copy that folder into your own project. You can then
refer to the different categories of icons in the following ways:
Category | URL |
---|---|
Civilizations | '/path/to/resources/images/civs/'.$colorId.'/'.$civId.'.png' |
Researches | '/path/to/resources/images/researches/'.$researchId.'.png' |
Add the RecAnalyst service provider to your config/app.php
:
'providers' => [
RecAnalyst\Laravel\ServiceProvider::class,
],
RecAnalyst will automatically pick up the appropriate translations for your Laravel app configuration.
To copy the civilization and research icons to your public
folder:
php artisan vendor:publish --tag=public
You can then refer to the different categories of icons in the following ways:
Category | URL |
---|---|
Civilizations | public_path('vendor/recanalyst/civs/'.$colorId.'/'.$civId.'.png') |
Researches | public_path('vendor/recanalyst/researches/'.$researchId.'.png') |
To get started, the Usage Examples might be helpful.
Full API documentation is available at https://goto-bus-stop.github.io/recanalyst/doc/v4.2.0.
These are some things to take into account when writing your own applications with RecAnalyst:
.mgz
)resignTime