# 04 ยท Client GUI Patches & Declarative EXE Patches > **Experimental Notice**: GUI script patches and declarative `exe` patches depend on target client builds and may need updates after game or core patches. --- ## 1. Extending Client UI (Recommended Pattern) 1. Place new standalone `.nut`, `.tpl`, and `.css` files under `client/packs/gui.vromfs.bin/` (keep paths lowercase to match stock archive conventions); 2. Place minimal entry-point edits under `client/gui-patches//` using `patch.jsonc` + `find.nut` / `replace.nut` fragments. Core offline GUI patches always run first; mod GUI patches apply afterward in load order. Every `find` snippet must match uniquely once or the patch is skipped safely. `{{LOCAL_ENDPOINT}}` in replacement text expands to `127.0.0.1:`. ### Mandatory Quirrel Bytecode Check Before shipping any new or patched `.nut` script, compile the complete resulting script with `compilestring` via `sq.exe` to catch lexical scope conflicts, reserved keywords (such as `base`), and forward references that would otherwise hang login at "Loading": ```powershell & "build\quirrel-cli\bin\Release\sq.exe" -e "local f = compilestring(readfile('your_script.nut'), 'your_script.nut'); println('OK')" ``` --- ## 2. Declarative EXE Patches (`client/exe-patches/`) Mods reuse WTOffline's `@wto/exepatch` format (`patch.jsonc` with `id`, `title`, `features`, `requires`, and `variants` using `signature`, `string_ref`, or `within` locators). **Never distribute modified `aces.exe` binaries.** ### Core Isolation Lock (Hard Security Boundary) 1. Core offline and isolation patches are planned first and their byte ranges are locked; 2. Any mod `exe` patch whose write range overlaps a protected core patch is **rejected** (`overlaps protected core patch`); 3. Overlapping patches between two mods reject the later patch with the conflicting mod ID; 4. Unmatched patterns on another game build are skipped cleanly and logged without breaking the core build.