Devlog2026-11-25· 5 min readcommit 1d3553d5

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 is out today. You can grab the complete Full Install Package (.zip, 7.33 MiB) 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.

Exact dictionary
22,576
mined CN-to-EN entries (was 13,870 in 1.3, 222 in 1.2)
Sentence templates
3,540
O(1)-bucketed {0}, [NAME], [SCHOOL] & clause frames
Compound + names
11,874
pure-Han trie tokens + 503 Pinyin cultivator surnames
UI + Workshop rules
186 / 61
fail-closed FairyGUI & Workshop rules + lore glossary

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.

Offline localization corpus across releases
Measured counts compiled into acs-terminology.tsv and loaded at startup in BepInEx\LogOutput.log (2026-11-24).

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

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.

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