Skip to content

testing and debugging

Jinwoo Lee edited this page May 16, 2026 · 1 revision

Testing & Debugging

The point of this plugin's design is that you don't have to restart the game between edits. This page covers the iteration loop and the most common things that go wrong.

The F8 reload loop

While in-world (not in the main menu), press F8 to fully reload the language pack. The plugin will:

  1. Re-read config.txt (language metadata, [FONTS], [POSITION_ADJUSTMENTS]).
  2. Re-load every translation file (translate.txt, translate_msc.txt, translate_mod.txt, translate_magazine.txt, translate_teletext.txt).
  3. Reload fonts.unity3d.
  4. Reapply font mappings to every TextMesh.
  5. Reapply position adjustments to every matching path.
  6. Restart the per-frame monitor used by HUD and FSM hooks.

What it does not do:

  • Reset the game's scene state (your save is untouched).
  • Re-translate text that's locked behind a one-time event you've already passed (you may need to trigger it again to see your changes — e.g., open and close the magazine).

The recommended cycle: edit a file → save → alt-tab to game → press F8 → look at the affected screen. Usually under five seconds round-trip.

Enabling console logs

The plugin logs through MSCLoader's mod console. To see what it's doing:

  1. Open MSCLoader's mod settings in the main menu.
  2. Find MWC Localization Core in the mod list.
  3. Toggle the debug-log options. There are usually a few categories (general, font loading, translation hits/misses, etc.) — turn on whatever matches the problem you're chasing.

For very deep debugging (especially "what is the GameObject path of this text?"), having a BepInEx-style F12 console or a tool like Developer Toolkit running alongside is handy. Don't ship either of those with your language pack — they're development-only.

Common issues

Text not translating

In order of likelihood:

  1. Wrong file. Magazine ads belong in translate_magazine.txt, not translate.txt. Teletext lines belong in translate_teletext.txt. See the per-file pages for the cut-off rules.
  2. Key doesn't match the source. Both sides of the lookup are uppercased and trimmed, so casing and leading/trailing whitespace don't matter — but interior whitespace, punctuation, and trailing periods do. THIRST and THIRST. are different keys.
  3. Source has placeholders. If the in-game text is something like PRICE TOTAL: 149, the key isn't PRICE TOTAL: 149 — it's PRICE TOTAL: {0}. See Translation Patterns.
  4. File didn't reload. Press F8 again; check the console for any parse error on the last reload.
  5. The line is one of the few the game overwrites. A small set of teletext lines is documented as un-translatable on translate_teletext.txt.

Wrong font / glyphs missing

  1. Check the [FONTS] mapping in config.txt — the original font name on the left must match what the game actually uses, and the right-hand name must match a font asset inside your fonts.unity3d.
  2. Confirm fonts.unity3d is in Mods/Assets/MWC_Localization_Core/ (not in Mods/ directly).
  3. Watch the console after F8 — it logs Loaded [font] for [original] on successful mappings. A missing log line means either the bundle didn't load or the name doesn't match.
  4. See Creating font assetbundle for the asset-side workflow.

Position is off

  1. Find the GameObject path of the affected TextMesh (see Text Adjustments for how).
  2. Add an entry to [POSITION_ADJUSTMENTS] in config.txt.
  3. F8 to reload, look at the result, repeat. Position tuning is iterative — expect three or four cycles per element.

"Worked in the main menu, broken in-game" (or vice versa)

Some text only exists in one scene. The plugin re-runs its initial translation pass when entering the GAME scene from MainMenu and prunes destroyed-object cache entries on scene change. If your translation appears in the menu but not in-world, F8 once you've loaded in.

If F8 doesn't fix it, the source string for that element may differ between scenes (the game sometimes reuses the same label with different wording). Check the console for any "no translation found" hints, or grep your translation files for partial matches.

The line shifts back to English after a moment

That's the "drifting sheet" problem — the game's own Update is rewriting the TextMesh. The plugin auto-pins a few known-bad sheets (parts magazine, mainly); if you've hit a new one, file an issue with the GameObject path. See Text Adjustments.

Pre-release sanity checklist

Before publishing a language pack, walk through this at least once:

  • Main menu reads cleanly in your language.
  • Start a new game — the loading-year screen, intro, and HUD all read correctly.
  • Open the inventory, pause menu, options menu — confirm no obvious overflow.
  • Drive to Peräjärvi store and back; check the store UI and the magazine.
  • Trigger the unemployment letter, a service payment receipt, and a post order.
  • Turn on the TV, flip through teletext pages (news, weather, recipes, sports).
  • Press F8 to confirm everything still reads correctly after a hot reload.

When something is wrong, fix it, F8, and re-check. That's the whole loop.

Clone this wiki locally