---
title: "ACS Dynamic English 1.4: offline sentence templates, FairyGUI button disambiguation, and why 63% of event dialogue missed exact lookup"
date: 2026-11-25
project: devlog
commit: 1d3553d5
summary: "Version 1.4.0 of our English live-translation and contextual UI mod for Amazing Cultivation Simulator is out as a 7.30 MiB Full Install ZIP on apocky.com. It runs 100% offline by default across 22,576 exact strings, 3,540 parameterized sentence and dialogue templates, 11,874 compound tokens, 503 cultivator surnames, 68 fail-closed UI rules, and 61 xianxia lore hover notes."
canonical: https://www.apocky.com/posts/2026-11-24-acs-dynamic-english-1-4/
gates: [["Unit + K2 negative-control suite","all pass, fault caught","54/54; clause-bleed fault caught","PASS"],["Dual-host package lifecycle (PS 7 + PS 5.1)","10/10 on both hosts","10/10 PS7 + 10/10 WinPS 5.1","PASS"],["Setup.exe + Full Install ZIP + 1.3->1.4 upgrade","6/6 pass, 58 SHA-256s match","6/6 scenarios, 58/58 hashes","PASS"],["SharpZipLib surface + companion network markers","0 / 0","0 refs/types; 0 HTTP markers","PASS"],["Live Steam startup (AppID 955900, Offline mode)","0 errors, game files untouched","22,576 terms, 3,540 templates, 0 errors","PASS"],["Live apocky.com HTTPS download round-trip","SHA-256 matches local build","7,649,688 B, a563ffbe... verified","PASS"],["Unmapped free-form Chinese mod prose (offline)","natural English without internet","clause + compound gloss unless online opt-in","OPEN"]]
---
# ACS Dynamic English 1.4: offline sentence templates, FairyGUI button disambiguation, and why 63% of event dialogue missed exact lookup

Version 1.4.0 of our English live-translation and contextual UI mod for Amazing Cultivation Simulator is out as a 7.30 MiB Full Install ZIP on apocky.com. It runs 100% offline by default across 22,576 exact strings, 3,540 parameterized sentence and dialogue templates, 11,874 compound tokens, 503 cultivator surnames, 68 fail-closed UI rules, and 61 xianxia lore hover notes.

**Amazing Cultivation Simulator** (`Steam AppID 955900`) is one of the deepest colony-and-cultivation sandboxes ever made, and one of the easiest to bounce off: arcane xianxia mechanics where higher `Attainment` *penalizes* future manual learning, vanilla UI collisions where both assembling and dissolving a war formation are labeled `Form Formation`, and thousands of Chinese Steam Workshop mods and story strings that remain untranslated.

**[ACS Dynamic English 1.4.1](/acs-dynamic-english/)** is out today. You can grab the complete **[Full Install Package (.zip, 7.33 MiB)](/acs-dynamic-english/ACS-Dynamic-English-1.4.1-Full-Install.zip)** directly from this site, extract it anywhere, and double-click `ACS-Dynamic-English-1.4.1-Setup.exe` (or `Install-Offline.cmd`). It works **100% offline out of the box** (`Endpoint=Passthrough`), requires zero administrator/UAC elevation, never modifies game binaries, `Settings\`, `Mods\`, or `saves\`, and rolls back every installed file in one click.

<div class="tiles">
  <div class="tile"><div class="k">Exact dictionary</div><div class="v">22,576</div><div class="d">mined CN-to-EN entries (was 13,870 in 1.3, 222 in 1.2)</div></div>
  <div class="tile"><div class="k">Sentence templates</div><div class="v">3,540</div><div class="d">O(1)-bucketed &#123;0&#125;, [NAME], [SCHOOL] &amp; clause frames</div></div>
  <div class="tile"><div class="k">Compound + names</div><div class="v">11,874</div><div class="d">pure-Han trie tokens + 503 Pinyin cultivator surnames</div></div>
  <div class="tile"><div class="k">UI + Workshop rules</div><div class="v">186<small> / 61</small></div><div class="d">fail-closed FairyGUI &amp; Workshop rules + lore glossary</div></div>
</div>

## Why 63% of event dialogue missed exact lookup

In `v1.3.0`, mining unambiguous pairs across `codedictionary.txt`, `MapStoryDictionary.txt`, and `Settings\` gave us `13,870` exact strings. Yet when auditing why adventure events and notifications still fell back to word-by-word compound glossing offline, the numbers told the story immediately:

- Out of `1,886` entries in `MapStoryDictionary.txt`, only `679` were static strings. The other **`1,183` (`62.7%`)** contained runtime slots like `{0}`, `[NAME]`, `[SCHOOL]`, or `[IT]`, plus `17` longer multi-sentence passages.
- Out of `4,050` entries in `codedictionary.txt`, **`1,037`** contained `{0}` format specifiers (`{0:F0}/{1:F0}`) or inline FairyGUI `[color=#...]` tags.
- Another **`171` self-contained `_Dictionary.txt` files** hidden under `SL\Assets\Resources\FightMap\` (`3,070` unique dungeon and boss-arena strings), **`881` child-`<Name>` XML nodes** in `Comment\*.xml`, and **`810` dotted `<Events.2.Story>` nodes** in `NpcStories\*.xml` had been skipped because their XML/TSV layouts differed from standard `<ThingDef Name="...">` files.

Worse, by the time FairyGUI's `GTextField.set_text` receives a notification or adventure log line at runtime, C#'s `string.Format` and the Lua story runner have *already* substituted the disciple's name or sect into `{0}` and `[NAME]`. Exact dictionary lookup never sees `{0}` - it sees the finished sentence with a random cultivator's name baked into the middle of it.

<figure class="chart" data-unit="entries" data-max="24000">
<div class="ct">Offline localization corpus across releases</div>
<script type="application/json">[
{"label":"v1.2.0 curated seed","value":222,"text":"222","was":true,"note":"Hand-curated canonical cultivation terms only; relied on online GoogleTranslateV2 for sentences."},
{"label":"v1.3.0 static XML/TXT mine","value":13870,"text":"13,870","was":true,"note":"Static exact pairs only; skipped {0}, [NAME], [color], Comment XMLs, and SL dungeon dictionaries."},
{"label":"v1.4.0 exact corpus","value":22576,"text":"22,576","note":"Adds 171 SL _Dictionary.txt maps, Comment child-<Name> XMLs, NpcStories dotted tags, Secrets TSVs, and markup strings."},
{"label":"v1.4.0 + 3,540 templates","value":26116,"text":"26,116 total","note":"22,576 exact entries + 3,540 parameterized {0}/[NAME]/[SCHOOL] and xianxia speech/clause templates."}
]</script>
<figcaption>Measured counts compiled into acs-terminology.tsv and loaded at startup in BepInEx\LogOutput.log (2026-11-24).</figcaption>
</figure>

## Matching 3,540 templates without regex lag

FairyGUI updates text fields constantly during menu transitions and colony simulation ticks, so running `3,540` regular expressions per string was out of the question.

Instead, `TerminologyCatalog` parses every template once at startup into literal segments and typed slots (`{0}`, `{0:P}` for person/speaker names), then indexes them into O(1) buckets by their **first two literal characters** (`(c0 << 16) | c1`), single-character prefixes, or **last two literal characters** for leading-slot sentences like `{0:P}` + trailing verb phrase. Within each bucket, templates sort by literal Han character count descending so specific frames always win before shorter ones.

When a template matches at runtime, each captured slot translates recursively through a 4-layer offline pipeline:

1. **Exact dictionary (`22,576` entries)**, preserving outer `[color=#...]` and `<font ...>` tags so red warning text stays red.
2. **Person & honorific resolver (`503` cultivator surnames)** on `{0:P}` speaker slots and `<Surname><Honorific>` titles (`Elder Zhang`, `Senior Brother Li`, `Zhao Qiling`). Auditing the base game's `Prefix_Human.txt` caught one amusing landmine before release: vanilla `OfficialEnglish` had machine-translated the surname Wang (`\u738b`) as `"Lord"`, which would have turned Sect Leader Wang into `"Sect Leader Lord"`. All `503` surnames are now verified Pinyin, while ambiguous prefixes (`Grand Elder`, `Supreme Elder`) are guarded by negative controls so they never misread as surnames.
3. **Clause-first decomposition (`90` curated xianxia speech & mod stat frames)** for Chinese Workshop elixirs, manuals, and dialogue: speech frames (`smiled and said: "..."`, `sneered: "..."`), conditionals (`If ..., then ...`), durations, cooldowns, and percentage stat modifiers.
4. **Longest-match compound trie (`11,874` pure-Han tokens) + numeric classifier elision + `150` single-character grammar rules**, stripping untranslated Chinese measure words after digits and aspect/modal particles so raw Chinese function characters do not litter offline sentences.

## Four traps caught by testing before ship

- **Single-clause templates swallowing whole sentences.** On our first test run of a multi-clause Workshop elixir string (`When consumed: +25% Cultivation Speed, lasts 3 days, 120s cooldown`), the outer prefix template and percentage template matched greedily across commas and produced: `When consumed: Increases Cultivation Speed, lasts 3 days, 120s cooldown. by 25%`. Forbidding non-quoted single-clause slots from crossing Chinese clause delimiters (`\uff0c`, `\uff1b`, `\u3002`) forced multi-clause strings through the clause splitter first and produced exact English clause order (`54/54` unit assertions pass).
- **FairyGUI button timing & vanilla duplicate labels.** FairyGUI's `GComponent.ConstructFromResource` fires child `GButton.set_title` *before* `ConstructFromXML` populates parent fields on `UI_GameMenu` and `UI_Panel_ThingInfo`. Joining `Assembly-CSharp.dll` UI classes against `UIText.xml` component URLs (`0xrxw6g7...`) and adding a `ConstructFromResource` postfix allowed fail-closed `ControlIdentity` rules across `68` controls - including splitting vanilla's duplicate `Form Formation` buttons (`n191_yre5` vs `n196_bvv4`) into `Deploy Array` and `Disband Array`, and clarifying `Arr.` (`n226_sw03`) into `Breathing`.
- **Legacy Mono's empty TLS root store (`0x800b010a`).** Offline mode makes zero network calls. For players who explicitly opt into hybrid `GoogleTranslateV2` online fallback (`-AcceptTextEgress` or the consent checkbox in `Setup.exe`), Unity 2017.4's embedded Mono (`v2.0.50727`) has an empty certificate store and rejects Google's TLS chain. Rather than disabling certificate checks, our custom `XUnity.AutoTranslator` build strips `SharpZipLib` (`0` references) and validates `https://translate.google.com:443` directly through Windows CryptoAPI (`crypt32.dll` `CertGetCertificateChain` + `CertVerifyCertificateChainPolicy`).
- **In-place `1.3.0 -> 1.4.0` upgrade residue.** Live upgrade testing on our Steam install caught `Uninstall.ps1` enforcing exact-version manifest equality and `Install.ps1` rejecting `.install.json.provider-change.*.bak` backups created when toggling offline/online modes. Fixing both and adding a cross-version upgrade scenario to `Test-Installer.ps1` (`6/6` scenarios) made one-click upgrades seamless.

## Download & verify

- **Download page & instructions**: [/acs-dynamic-english/](/acs-dynamic-english/)
- **Direct Full Install ZIP (`7,685,337` B, v1.4.1 with 186 UI & Steam Workshop mod rules)**: [ACS-Dynamic-English-1.4.1-Full-Install.zip](/acs-dynamic-english/ACS-Dynamic-English-1.4.1-Full-Install.zip)
- **SHA-256**: `6ced7044b4be8992db4f77a47775cd1bab2612ab18cbe7042fc8421988c5d078`
- **Release manifest**: [/acs-dynamic-english/release.json](/acs-dynamic-english/release.json)

## Known gaps

Offline mode deterministically translates all `22,576` mined ACS strings, `3,540` parameterized runtime templates, and structured Chinese Workshop titles and stat clauses. Novel, free-form multi-sentence Chinese prose from third-party story mods that matches no template falls back to clause-and-compound glossing unless optional consented `GoogleTranslateV2` online fallback is enabled in `Setup.exe`. Text baked directly into image textures is not modified.