P.E.L.E Wiki

Updated 2 weeks ago

This page keeps the technical details out of the Thunderstore front page.

Why Esperanto and Latin?

Ukrainian is the main practical target: it proves that P.E.L.E can support a language the base game does not handle cleanly by itself.

Esperanto and Latin are the first experimental custom languages shipped with P.E.L.E. They are useful test languages because they are not base-game languages, they force the language menu and loader to behave like a real extension system, and they give translators a repeatable way to test mod support beyond the official language list.

In this release, P.E.L.E ships the first three-language custom test set:

Ukrainian + Esperanto + Latin

The package includes every P.E.L.E translation file currently shipped in this repository, even for mods you do not have installed. Risk of Rain 2 only uses tokens when the matching game content or mod asks for them, so keeping all packs together is intentional: you can install a supported mod later and its P.E.L.E translations are already there.

Important: This Replaces R2API.Language

P.E.L.E is not a second language plugin to install next to the normal R2API.Language.dll.

This package is meant to replace the DLL from:

RiskofThunder-R2API_Language

P.E.L.E intentionally keeps the original BepInEx plugin GUID:

com.bepis.r2api.language

That is required so mods that depend on R2API.Language keep working normally. To BepInEx and to other mods, P.E.L.E is still the language API they expect; it just has extra language support built in.

The Thunderstore package version follows normal Thunderstore releases, while the internal BepInEx plugin version is 2.0.0. That is intentional: it ensures P.E.L.E wins over the upstream RiskofThunder-R2API_Language 1.1.0 if both DLLs are present during a manual r2modman test install.

Only one R2API.Language.dll must be loaded. The intended path is:

BepInEx/plugins/RiskofThunder-R2API_Language/R2API.Language/R2API.Language.dll

Do not install another copy in paths like:

BepInEx/plugins/R2API.Language.dll
BepInEx/plugins/PELE/R2API.Language.dll
BepInEx/plugins/SomeOtherFolder/R2API.Language.dll

If two DLLs with the same GUID are loaded, BepInEx may choose the wrong one, run duplicate hooks, or initialize language systems in the wrong order.

The PELE folder included with this package is data only:

BepInEx/plugins/PELE/
├─ Fonts/
└─ Language/

It must not contain an old PELE.dll, PELE.deps.json, or PELE.pdb.

How Translation Priority Works

When Risk of Rain 2 asks for a token, P.E.L.E resolves it in this order:

  1. Temporary overlay tokens.
  2. P.E.L.E custom-language tokens.
  3. The normal game or mod language system.

That means P.E.L.E wins when it has the same token. Existing mod translation packs remain useful as fallback data when P.E.L.E does not provide a token.

Manual Installation

If you install manually, place files like this:

BepInEx/plugins/
├─ RiskofThunder-R2API_Language/
│  └─ R2API.Language/
│     └─ R2API.Language.dll
└─ PELE/
   ├─ Fonts/
   └─ Language/

Then start the game and check BepInEx/LogOutput.log.

Expected log markers:

Loading [R2API.Language (Jaosnake fork) 2.0.0]
R2API.Language (Jaosnake fork) inicializado!
PELE/Language encontrado: ...
Tokens PELE por idioma: la=..., eo=..., uk=...
PELE/Fonts/cyrillicfont encontrado.
DLL R2API.Language unica detectada.
PELE JSONs carregados no startup (... tokens)
Hot-Reload habilitado! Pressione F5 para recarregar manualmente.

Configuration

BepInEx generates the config file for this plugin. The release defaults are:

[PELE]
EnableHotReload = true
EnableDebugMenu = false
EnableVerboseLogging = false
  • EnableHotReload: enables F5 reload and file watcher reload.
  • EnableDebugMenu: enables the F6 P.E.L.E debug window.
  • EnableVerboseLogging: enables extra hook and layout diagnostic logs.

Translation File Layout

P.E.L.E translations live outside the DLL:

BepInEx/plugins/PELE/Language/<language>/*.json

Supported JSON format:

{
  "strings": {
    "TOKEN_NAME": "Translated text"
  }
}

Flat JSON token objects are also supported. Metadata keys such as language, strings, and keys starting with _ are ignored as translation tokens.

Building From Source

Local build command:

dotnet build C:\Users\Jaosnake\Desktop\PELE_Project\github_repo_latest\R2API.Language-Source\R2API.Language.csproj -c Release

The project deploy target copies the generated DLL to the active r2modman profile's RiskofThunder-R2API_Language folder. This is intentional and keeps the runtime profile from loading duplicate R2API.Language.dll files.

Technical Documentation

Before changing hooks or UI behavior, read:

docs/HOOKS.md
docs/MANUAL_TESTS.md
docs/STABILIZATION_PLAN.md

These files document hook contracts, manual regression testing, and the stabilization rules for future P.E.L.E changes.

Pages