PHPackages                             diseltoofast/ue-parser - 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. [Parsing &amp; Serialization](/categories/parsing)
4. /
5. diseltoofast/ue-parser

ActiveLibrary[Parsing &amp; Serialization](/categories/parsing)

diseltoofast/ue-parser
======================

PHP library for parsing Unreal Engine files

018PHP

Since Feb 24Pushed 2mo ago1 watchersCompare

[ Source](https://github.com/diseltoofast/ue-parser)[ Packagist](https://packagist.org/packages/diseltoofast/ue-parser)[ RSS](/packages/diseltoofast-ue-parser/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

Unreal Engine Parser
====================

[](#unreal-engine-parser)

This is a PHP library for parsing Unreal Engine files

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

[](#installation)

Requirements

- PHP 8.0 or higher
- ext-mbstring
- ext-gmp

Install via Composer:

```
composer require diseltoofast/ue-parser
```

Locres (Reading)
----------------

[](#locres-reading)

```
$filePath = '/some/dir/Game.locres';
// Initialize a LocresReader instance to parse data from a .locres file
$parser = new \Diseltoofast\UeParser\LocresReader($filePath);
// Alternatively, enable additional fields by passing `true` as the second argument
$parser = new \Diseltoofast\UeParser\LocresReader($filePath, true); // includes extra metadata
// Retrieve all information from the .locres file as an object
$data = $parser->getData();
// Retrieve all information from the .locres file in JSON format
$json = $parser->getJSON();
// Retrieve only the namespaces from the .locres file as an array
$namespaces = $parser->getNamespaces();
// Retrieve only the strings from the .locres file as an array
$strings = $parser->getStrings();
// Save all data to a JSON file
$parser->saveJSON();
// Save all data to a CSV file; line-break characters are replaced:
// "\r\n" → "", "\r" → "", "\n" → ""
$parser->saveCSV();
```

Locres (Writing)
----------------

[](#locres-writing)

```
$filePath = '/some/dir/Game.locres';
// Initialize a LocresWriter instance to save data to a .locres file
$parser = new \Diseltoofast\UeParser\LocresWriter($filePath);
// Initialize LocresString instances and add strings in bulk
$writer->setStrings([
    new \Diseltoofast\UeParser\Entities\LocresString(
        "ST_AltarStaticTexts",                       // Namespace
        3755353534,                                  // Namespace hash (CityHash64)
        "LOC_AD_Character_BodyText_LevelingHint",    // Key
        2370108482,                                  // Key hash (CityHash64)
        "You must use a bed to sleep and meditate.", // Value
        2087340891                                   // Value hash (CRC)
    ),
    new \Diseltoofast\UeParser\Entities\LocresString(
        "LOC_AD_Help_Title_Tutorials",
        3755353534,
        "LOC_AD_Help_Title_Tutorials",
        3927305278,
        "Tutorials",
        2210848957
    ),
    new \Diseltoofast\UeParser\Entities\LocresString(
        "ST_Descriptions",
        1300630429,
        "LOC_DE_ABAT",
        851339799,
        "This is the big description for Absorb Attribute.",
        2146950682
    ),
]);
// Alternatively, add strings one by one
$writer->setString(new \Diseltoofast\UeParser\Entities\LocresString(
    "ST_AltarStaticTexts",
    3755353534,
    "LOC_AD_Character_BodyText_LevelingHint",
    2370108482,
    "You must use a bed to sleep and meditate.",
    2087340891
));
$writer->setString(new \Diseltoofast\UeParser\Entities\LocresString(
    "LOC_AD_Help_Title_Tutorials",
    3755353534,
    "LOC_AD_Help_Title_Tutorials",
    3927305278,
    "Tutorials",
    2210848957
));
// If you don't know the hash values for the namespace, key, or value of the strings, you can specify 0 for these fields. The library will automatically generate the required hashes.
$writer->setString(new \Diseltoofast\UeParser\Entities\LocresString(
    "LOC_AD_Help_Title_Tutorials",
    0,                             // set to 0 for auto-generation
    "LOC_AD_Help_Title_Tutorials",
    0,                             // set to 0 for auto-generation
    "Tutorials",
    0                              // set to 0 for auto-generation
));
// Save to a .locres file
$writer->save();
```

Uasset (Reading)
----------------

[](#uasset-reading)

It is specifically for 'StringTable' type files.

```
$filePath = '/some/dir/Localization.uasset';
// Initialize a UassetReader instance to parse data from a .uasset file
$parser = new \Diseltoofast\UeParser\UassetReader($filePath);
// Retrieve all information from the .uasset file as an object
$data = $parser->getData();
// Retrieve all information from the .uasset file in JSON format
$json = $parser->getJSON();
// Retrieve only the namespace from the .uasset file as a string
$namespace = $parser->getNamespace();
// Retrieve only the strings from the .uasset file as an array
$strings = $parser->getStrings();
// Retrieve only the comments from the .uasset file as an array
$strings = $parser->getComments();
// Save all data to a JSON file
$parser->saveJSON();
```

Methods to hash strings
-----------------------

[](#methods-to-hash-strings)

Available algorithms: CityHash64, CRC.

```
echo \Diseltoofast\UeParser\Hash\Crc::hash('Hello world!');
echo \Diseltoofast\UeParser\Hash\CityHash64::hash('Hello world!'); // returns a 32-bit value
```

###  Health Score

20

—

LowBetter than 14% of packages

Maintenance56

Moderate activity, may be stable

Popularity6

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity12

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% 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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/d8ad0560ea540e02d5a4d466b958f56e138c477bd5deeb123ccb0874d7b6211b?d=identicon)[diseltoofast](/maintainers/diseltoofast)

---

Top Contributors

[![diseltoofast](https://avatars.githubusercontent.com/u/9201379?v=4)](https://github.com/diseltoofast "diseltoofast (14 commits)")

### Embed Badge

![Health badge](/badges/diseltoofast-ue-parser/health.svg)

```
[![Health](https://phpackages.com/badges/diseltoofast-ue-parser/health.svg)](https://phpackages.com/packages/diseltoofast-ue-parser)
```

###  Alternatives

[mtdowling/jmespath.php

Declaratively specify how to extract elements from a JSON document

2.0k472.8M135](/packages/mtdowling-jmespathphp)[opis/closure

A library that can be used to serialize closures (anonymous functions) and arbitrary data.

2.6k230.0M284](/packages/opis-closure)[masterminds/html5

An HTML5 parser and serializer.

1.8k242.8M229](/packages/masterminds-html5)[sabberworm/php-css-parser

Parser for CSS Files written in PHP

1.8k191.2M65](/packages/sabberworm-php-css-parser)[michelf/php-markdown

PHP Markdown

3.5k52.4M345](/packages/michelf-php-markdown)[jms/metadata

Class/method/property metadata management in PHP

1.8k152.8M88](/packages/jms-metadata)

PHPackages © 2026

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