Devlog2026-11-25· 4 min readcommit 2b59d7f8

ACS Dynamic English 2.0: killing Frankenstein compounds with bundled offline ONNX Marian neural MT, 102,846 lexicon entries, and headless Unity verification

Version 2.0.0 replaces greedy offline compound glossing with a bundled .NET 4.8 + OnnxRuntime quantized opus-mt-zh-en neural translator over a Windows Named Pipe, expands exact dictionary coverage to 102,846 entries with a strict Zero-Frankenstein gate, fixes mid-word wrapped HUD diamonds, and drops robotic generic fallback tooltips.

In our v1.4 post yesterday, one gate at the bottom of the table stayed marked OPEN: unmapped free-form Chinese mod prose in offline mode. Everything inside our 22,576 mined ACS entries and 3,540 templates translated cleanly, while arbitrary unseen mod strings fell back to greedy compound concatenation.

Opening GSQ’s official Example Mod (SampleWindow) in Creative Mode (Land of Illusion) exposed every failure mode of that compromise in one single frame:

  1. Frankenstein mixed Han + ASCII mashups: "这也是一个[color=#FF0000]Label[/color]" rendered as This也是1Label; "输入框" (Input Box) split mid-word into 输enter框; "这是一个Label" turned the indefinite classifier yi ge into the numeral 1 (This is 1 Label); and "啊啊啊" vanished into __ELIDE__, causing XUnity in Passthrough mode to cache 啊啊啊=啊啊啊 permanently on disk.
  2. Robotic generic tooltip clutter: hovering an undocumented mod checkbox popped up a multi-paragraph card reading “What it does: Toggles ‘啊啊啊’ on or off. Context status: generic - this control exposes no specific description.”
  3. Mid-word wrapped HUD diamonds: 56px diamond buttons down the right edge (Rumors, Formation, Agencies, Minimap) wrapped mid-word across two lines (Ru-\nmors, For-\nmation, Agen-\ncies, Mini-\nmap), and Blueprint Management wrapped across four (Blu-\neprint \nMa-\nnagement).

ACS Dynamic English 2.0.0 fixes every one of those at the architectural root. You can grab the complete Full Install Package (.zip, 84.97 MiB) directly from this site (bundling ACS-Dynamic-English-2.0.0-Setup.exe, portable scripts, and the offline ONNX neural model).

Offline Neural MT
ONNX
INT8 opus-mt-zh-en over local Windows Named Pipe (0 internet)
Exact lexicon
102,846
ACS corpora + 80,223 clean CC-CEDICT headwords (was 22,576)
HUD & Mod rules
190 / 61
1-line HUD captions + Shrink-to-Fit + 61 lore notes
Generic spam
0
ShowGenericFallbackTooltips=false by default

Bridging Unity 2017 Mono (.NET 2.0) to ONNX Runtime without sockets

Amazing Cultivation Simulator runs on Unity 2017.4.22f1 with embedded Mono v2.0.50727 (.NET 3.5 profile). Modern Microsoft.ML.OnnxRuntime requires .NET Framework 4.6.2+ or .NET Core, and spinning up a localhost HTTP port invites firewall prompts and port collisions.

v2.0.0 splits the engine across two local processes connected by a current-user-ACL Windows Named Pipe (\\.\pipe\acs-offline-mt-<pid>):

  • ACSOfflineTranslate.dll (net35, inside Unity): implements XUnity’s ITranslateEndpoint (Endpoint=ACSOffline), spawns the worker with CREATE_NO_WINDOW, scrubs any previously poisoned Chinese=Chinese lines out of _AutoGeneratedTranslations.txt and in-memory caches at startup, and dispatches translations asynchronously via Win32 CreateFileW / WaitNamedPipeW on background threads so rendering never stalls.
  • ACS.OfflineTranslator.exe (net48 x64, under BepInEx\ACS-Dynamic-English\): loads INT8-quantized Xenova/opus-mt-zh-en encoder (50.45 MB) and merged decoder (57.42 MB) sessions in OnnxRuntime 1.20.1, paired with a zero-dependency C# Viterbi Unigram SentencePiece tokenizer (65,001 tokens), recursive [color=#...] / <font> / [keycode] span preservation, 219 atomic K1..K19 xianxia domain glossary locks, and a parent-PID watchdog thread that exits the instant Amazing Cultivation Simulator.exe closes (0 orphaned workers).
Exact offline dictionary scale across ACS Dynamic English releases
Measured runtime catalog counts logged at startup in BepInEx\LogOutput.log (2026-11-25).

Killing Frankenstein compounds & routing sentences to neural grammar

Alongside the neural worker, we expanded acs-terminology.tsv from 22,576 to 102,846 exact entries (92,123 compound trie entries) by merging 80,223 clean 2..4-character CC-CEDICT headwords behind ACS’s canonical cultivation terms, replaced greedy left-to-right trie matching with Max-Square-Length Exact-Cover Dynamic Programming (TrySegmentHanSpan), fixed yi ge (&#x4e00;&#x4e2a;) before nouns to emit the indefinite article "a" instead of "1", and enforced a Strict Zero-Frankenstein Invariant: any deterministic path whose candidate still contains a single Han character must return false and hand the string intact to ACSOffline neural MT.

Live headless testing immediately caught a second subtlety: if deterministic compound segmentation is allowed to run on a 26-character multi-clause sentence when ACSOffline is active, it intercepts the sentence in 0 ms with word-for-word Pidgin ("Click this Button can immediately clear up Map-Wide all Rubbish and ashes...") before the neural model ever sees it. Restricting synchronous compound DP under ACSOffline to short UI captions (<= 5 Han chars, zero clause punctuation) lets 102,846 exact terms and 3,544 ACS templates stay instant while routing novel sentences to opus-mt-zh-en:

  • Before (v1.4.1): This&#x4e5f;&#x662f;1Label / This is 1 Label / &#x8f93;enter&#x6846; / &#x554a;&#x554a;&#x554a; + giant generic fallback popup
  • After (v2.0.0, measured headlessly in -batchmode):
    • SampleWindow label_1: This is also a <font color="#FF0000">Label</font> (lines=1, han=False)
    • SampleWindow label_2: This is a Label (lines=1, han=False)
    • SampleWindow n19: Input Box (OCR-verified at rect=437,120,78x16)
    • SampleWindow n20: Ahhh (tip=<null>, zero generic spam)
    • Unseen 26-char Chinese mod sentence: Click this button to clean up all garbage and ashes in the full picture immediately, and significantly increase the frame rate. (hasHan=False)
    • HUD diamonds (56px width): Tales, Array, Work, Sect, Power, World, Guide, Help, System, Map, Plans - every single one verified at lines=1 (singleLine=true, auto=Shrink).

Deduplicating the 85 MiB installer & headless verification

Bundling 108 MB of ONNX weights naively inside Setup.exe and inside payload/ inside Full-Install.zip would have bloated Full-Install.zip to ~178 MiB. Instead, ACS.Installer.csproj supports EmbedPackageArchive=true for standalone ACS-Dynamic-English-2.0.0-Setup.exe (89,116,160 B = 84.99 MiB) and EmbedPackageArchive=false (34,816 B launcher reading the sibling archive) inside ACS-Dynamic-English-2.0.0-Full-Install.zip (89,097,047 B = 84.97 MiB).

Every runtime check for v2.0.0 was executed 100% headlessly (Amazing Cultivation Simulator.exe -batchmode -screen-width 1920 -screen-height 1080 with CreateNoWindow=true, offscreen RenderTexture -> PNG capture, Windows OCR, and FairyGUI TextField.lines inspection), leaving 0 desktop windows, 0 orphaned worker processes, and 4/4 game binary SHA-256s untouched.

Download & verify

Enjoyed this? Apoc runs on one home graphics card and a lot of late nights. If you'd like to help, Ko-fi is the way.
Support on Ko-fi