---
title: "ACS Dynamic English 2.0: killing Frankenstein compounds with bundled offline ONNX Marian neural MT, 102,846 lexicon entries, and headless Unity verification"
date: 2026-11-25
project: devlog
commit: 2b59d7f8
summary: "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."
canonical: https://www.apocky.com/posts/2026-11-25-acs-dynamic-english-2-0/
gates: [["Unit + Zero-Frankenstein negative suite","all pass, unknown-Han fault caught","73/73 assertions PASS","PASS"],["Offline ONNX Marian worker (--self-test)","0 residual Han, [color] preserved","5/5 probes, 0 Han, <font/color> intact","PASS"],["Dual-host package lifecycle (PS 7 + PS 5.1)","10/10 on both hosts (48 payload files)","10/10 PS7 + 10/10 WinPS 5.1","PASS"],["Setup.exe + deduplicated Full Install ZIP","7/7 pass, 1.4.1->2.0.0 upgrade clean","7/7 scenarios, 84.97 MiB single-weight ZIP","PASS"],["Headless -batchmode Creative + SampleWindow + HUD","0 Han, lines=1 HUD, 0 generic spam, 0 orphans","PNG + OCR + DOM verified, 0 orphans, 4/4 hashes","PASS"],["Unmapped free-form Chinese mod prose (offline)","natural English with 0 internet","ACSOffline NamedPipe + opus-mt-zh-en ONNX","PASS"]]
---
# 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**: `"&#x8fd9;&#x4e5f;&#x662f;&#x4e00;&#x4e2a;[color=#FF0000]Label[/color]"` rendered as `This&#x4e5f;&#x662f;1Label`; `"&#x8f93;&#x5165;&#x6846;"` (`Input Box`) split mid-word into `&#x8f93;enter&#x6846;`; `"&#x8fd9;&#x662f;&#x4e00;&#x4e2a;Label"` turned the indefinite classifier `yi ge` into the numeral `1` (`This is 1 Label`); and `"&#x554a;&#x554a;&#x554a;"` vanished into `__ELIDE__`, causing XUnity in `Passthrough` mode to cache `&#x554a;&#x554a;&#x554a;=&#x554a;&#x554a;&#x554a;` permanently on disk.
2. **Robotic generic tooltip clutter**: hovering an undocumented mod checkbox popped up a multi-paragraph card reading *"What it does: Toggles '&#x554a;&#x554a;&#x554a;' 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](/acs-dynamic-english/)** fixes every one of those at the architectural root. You can grab the complete **[Full Install Package (.zip, `84.97 MiB`)](/acs-dynamic-english/ACS-Dynamic-English-2.0.0-Full-Install.zip)** directly from this site (bundling `ACS-Dynamic-English-2.0.0-Setup.exe`, portable scripts, and the offline ONNX neural model).

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

## 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).

<figure class="chart" data-unit="entries" data-max="110000">
<div class="ct">Exact offline dictionary scale across ACS Dynamic English releases</div>
<script type="application/json">[
{"label":"v1.2.0 curated seed","value":222,"text":"222","was":true,"note":"Hand-curated canonical terms only."},
{"label":"v1.3.0 static XML/TXT mine","value":13870,"text":"13,870","was":true,"note":"Static exact ACS pairs."},
{"label":"v1.4.1 corpus + Workshop","value":22576,"text":"22,576","was":true,"note":"Added 171 SL dungeon dictionaries, Comment XMLs, and NpcStories."},
{"label":"v2.0.0 lexicon + ONNX NMT","value":102846,"text":"102,846 + NMT","note":"Adds 80,223 clean 2..4-char CC-CEDICT headwords + Exact-Cover DP + opus-mt-zh-en ONNX neural seq2seq."}
]</script>
<figcaption>Measured runtime catalog counts logged at startup in BepInEx\LogOutput.log (2026-11-25).</figcaption>
</figure>

## 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

- **Project page**: [/acs-dynamic-english/](/acs-dynamic-english/)
- **Full Install ZIP (`89,097,047` B, direct public download)**: [ACS-Dynamic-English-2.0.0-Full-Install.zip](/acs-dynamic-english/ACS-Dynamic-English-2.0.0-Full-Install.zip) (`sha256: eba4494baab88d14a26861daeeb9645b3a9fb17cac835549a37fb78fa97b6db5`)
- **Stable latest alias**: [/downloads/ACS-Dynamic-English-Full-Install.zip](/downloads/ACS-Dynamic-English-Full-Install.zip)
- **Release manifest**: [/acs-dynamic-english/release.json](/acs-dynamic-english/release.json)