PHPackages                             lichifeng/recanalyst2 - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. lichifeng/recanalyst2

AbandonedArchivedLibrary[Utility &amp; Helpers](/categories/utility)

lichifeng/recanalyst2
=====================

Analyzes Age of Empires 2 recorded game files.

0.1.0(8y ago)4481GPL-3.0PHPPHP &gt;= 5.6.0

Since Dec 7Pushed 7y ago3 watchersCompare

[ Source](https://github.com/lichifeng/RecAnalyst2)[ Packagist](https://packagist.org/packages/lichifeng/recanalyst2)[ Docs](https://github.com/lichifeng/RecAnalyst2)[ RSS](/packages/lichifeng-recanalyst2/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependencies (3)Versions (2)Used By (0)

RecAnalyst2
===========

[](#recanalyst2)

[![Packagist](https://camo.githubusercontent.com/d523c0436a6eaadf6b3d03c55c705dec97a4fac57952f77059f8ac785ca0bd98/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f726563616e616c7973742f726563616e616c7973742e737667)](https://packagist.org/packages/recanalyst/recanalyst)[![License](https://camo.githubusercontent.com/e7f1f41b234d8b587924606f18e25dd681107b7798488cecf8b50d9bb1f460f5/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f726563616e616c7973742f726563616e616c7973742e737667)](https://packagist.org/packages/recanalyst/recanalyst)[![Build Status](https://camo.githubusercontent.com/c3fdb55a30acdb87dbc98e4db6a5335aa96735fea32812fd0bad4f41767de476/68747470733a2f2f7472617669732d63692e6f72672f676f746f2d6275732d73746f702f726563616e616c7973742e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/goto-bus-stop/recanalyst)[![Gitter chat](https://camo.githubusercontent.com/de4b3736a3f6fd424c3466be1a69c611f77bf4f498480df1155d8e65afb1969c/68747470733a2f2f6261646765732e6769747465722e696d2f676f746f2d6275732d73746f702f726563616e616c7973742e737667)](https://gitter.im/goto-bus-stop/recanalyst)

**UNDER DEVELOPMENT, DO NOT USE!!!**

RecAnalyst2 is a PHP package for analyzing Age of Empires II recorded games. RecAnalyst2 is derived from

It supports recorded game files from: [RecAnlyst](https://github.com/goto-bus-stop/recanalyst)

- The Age of Kings
- The Conquerors
- UserPatch
- Forgotten Empires
- HD Editions (optionally with expansions)

And reads data such as:

- Game settings
- Players
- Chat messages
- Research and Age Advancing times
- Map data (terrain, elevation)
- Initial units
- Achievements (UserPatch only)
- Tributes

A small demo application is hosted at .

[License](#license) - [Credits](#credits) - [Contributing](#contributing) - [Requirements](#requirements) - [Installation](#installation) - [Configuration](#configuration) - [Usage Examples](./examples#readme) - [API Documentation](https://goto-bus-stop.github.io/recanalyst/doc/v4.2.0) - [Limitations](#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());
}
```

License
-------

[](#license)

[GPL-3](https://www.tldrlegal.com/l/gpl-3.0). See [COPYING](./COPYING).

Credits
-------

[](#credits)

Originally forked from Biegleux's work:
v2.1.0 © 2007-2010 biegleux &lt;&gt;
[Original project homepage](http://recanalyst.sourceforge.net/)
[Original project documentation](http://recanalyst.sourceforge.net/documentation/)

See also [references.md](./references.md).

Contributing
------------

[](#contributing)

RecAnalyst is looking for contributors. Please see the [Issues List](https://github.com/goto-bus-stop/recanalyst) 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](./CONTRIBUTING.md) for more.

Requirements
------------

[](#requirements)

RecAnalyst works with PHP 5.6+ and PHP 7. The Imagick or GD extensions need to be installed to generate map images.

Installation
------------

[](#installation)

With [Composer](https://getcomposer.org):

```
composer require recanalyst/recanalyst

```

Configuration
-------------

[](#configuration)

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](#laravel).

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:

CategoryURLCivilizations`'/path/to/resources/images/civs/'.$colorId.'/'.$civId.'.png'`Researches`'/path/to/resources/images/researches/'.$researchId.'.png'`### Laravel

[](#laravel)

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:

CategoryURLCivilizations`public_path('vendor/recanalyst/civs/'.$colorId.'/'.$civId.'.png')`Researches`public_path('vendor/recanalyst/researches/'.$researchId.'.png')`API Documentation
-----------------

[](#api-documentation)

To get started, the [Usage Examples](./examples#readme) might be helpful.

Full API documentation is available at .

Limitations
-----------

[](#limitations)

These are some things to take into account when writing your own applications with RecAnalyst:

- Achievements data is only available in multiplayer UserPatch 1.4 (`.mgz`) games. It isn't saved in single player recordings nor in any other game version.
- RecAnalyst cannot be used to find the state of the recorded game at any point except the very start. This is because AoC stores a list of actions, so to reconstruct the game state at a given point, the game has to be simulated exactly. See [\#1](https://github.com/goto-bus-stop/recanalyst/issues/1).
- Rarely, Age of Empires fails to save Resign actions just before the end of the game. In those cases, RecAnalyst cannot determine the `resignTime`property for players. See [\#35](https://github.com/goto-bus-stop/recanalyst/issues/35).

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity48

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 78.3% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

3075d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/136a84129aca32b2cbebd213519ce48d9c4dd31ef1e4bd614704dc8e49f4a067?d=identicon)[lichifeng](/maintainers/lichifeng)

---

Top Contributors

[![goto-bus-stop](https://avatars.githubusercontent.com/u/1006268?v=4)](https://github.com/goto-bus-stop "goto-bus-stop (216 commits)")[![lichifeng](https://avatars.githubusercontent.com/u/5389467?v=4)](https://github.com/lichifeng "lichifeng (60 commits)")

---

Tags

age-of-empiresfile-formatgame-recordsrtssavegameage-of-empiresgame-recordsmgx-analyzermgz-analyzer

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/lichifeng-recanalyst2/health.svg)

```
[![Health](https://phpackages.com/badges/lichifeng-recanalyst2/health.svg)](https://phpackages.com/packages/lichifeng-recanalyst2)
```

###  Alternatives

[laravolt/avatar

Turn name, email, and any other string into initial-based avatar or gravatar.

2.0k5.4M31](/packages/laravolt-avatar)[beyondcode/laravel-favicon

Create dynamic favicons based on your environment settings.

37345.5k](/packages/beyondcode-laravel-favicon)[yohang88/letter-avatar

Generate user avatar using name initials letter.

126529.5k2](/packages/yohang88-letter-avatar)[symfony/ux-cropperjs

Cropper.js integration for Symfony

19280.3k3](/packages/symfony-ux-cropperjs)[a6digital/laravel-default-profile-image

Laravel package to create default profile image using name of user.

41319.9k](/packages/a6digital-laravel-default-profile-image)[consoletvs/support

ConsoleTVs support library

27300.4k8](/packages/consoletvs-support)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
