Skip to content

Instantly share code, notes, and snippets.

@marcussacana
Created April 4, 2021 19:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save marcussacana/84948809ac6067a9bec0ff8a2b15308e to your computer and use it in GitHub Desktop.
Save marcussacana/84948809ac6067a9bec0ff8a2b15308e to your computer and use it in GitHub Desktop.
Unreal Engine 4 locres structure (010Editor Template)
//------------------------------------------------
//--- 010 Editor v11.0.1 Binary Template
//
// File: locres.bt
// Authors: marcussacana
// Version: 1.0
// Purpose: Parse the UE4 locres content
// Category: other
// File Mask: *.locres
// ID Bytes: 0E 14 74 75 67 4A 03 FC 4A 15 90 9D C3 37 7F 1B
// History:
//------------------------------------------------
typedef struct {
byte Magic[0x10] <optimize=false>;
byte Version;
uint64 LocalizationOffset;
} LocHeader;
typedef struct {
int Length;
local int Len = Length < 0 ? (Length * -1) : Length;
wchar_t Content[Len] <optimize=false>;
} Str;
typedef struct {
Str Content;
uint Hash;
uint LocInd;
} GroupKeyEntry;
typedef struct {
uint Count;
GroupKeyEntry Keys[Count] <optimize=false>;
} GroupKey;
typedef struct {
Str GroupName;
GroupKey Keys;
} GroupEntry;
typedef struct {
uint Count;
GroupEntry Entries[Count] <optimize=false>;
} Groups;
typedef struct {
uint Count;
Str Entry[Count] <optimize=false>;
} Localization;
LocHeader LocRes <optimize=false>;
Groups Keys <optimize=false>;
Localization Localizations;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment