| name | game-hacking-pcx |
| description | Mandatory doc router for all PCX scripting sessions. Triggers on any game hacking, game cheat, ESP, aimbot, triggerbot, radar, Enma, AngelScript, or Perception.cx work. Provides the full supported doc index (32,000+ lines across 123 docs) and enforces reading the relevant documentation before writing any API call. Load alongside game-cheat-script-master and game-cheat-guidelines on every PCX game-cheat session.
|
| license | MIT |
Game Hacking & Scripting — Perception.cx / Enma / AngelScript
Trigger
Game hacking, game cheats, cheat scripts, ESP, aimbot, triggerbot, radar, memory reading/writing,
pattern scanning, vtable hooking, process manipulation, Enma scripting, AngelScript scripting,
Perception.cx, PCX, render overlays, any .em or .as game script work, or any mention of the
Perception platform.
MANDATORY: Read Before Writing Code
The only authoritative sources for PCX API names are the two upstream docs:
https://docs.perception.cx/perception/enma/readme.md — Enma API surface
https://docs.perception.cx/perception/angelscript/overview.md — AngelScript API surface
Use the .md variant of any sub-page (e.g. https://docs.perception.cx/perception/enma/proc-api.md,
https://docs.perception.cx/perception/angelscript/render-api.md) for structured markdown.
The local docs/ tree is a drift-checked mirror of these upstream pages; when in doubt, trust
the live upstream version.
You MUST read the relevant upstream doc before writing ANY Enma, AngelScript,
or PCX API code. Do not write from memory. The docs are the source of truth.
Source-Grounding Gate
For MCP-aware clients, call recommend_context(task, language) first, then load
the returned skills/docs. Verify host symbols with api_lookup(symbol, language)
and validate generated code with validate_code or validate_answer. For CLI
workflows, use pcx api, pcx symbol-check, and pcx check-answer.
When writing Enma (.em) code — read these:
Language (always read docs/enma/llms-language.md first — it's the complete single-page reference):
| Doc | Path | Lines | Content |
|---|
| Complete language ref | docs/enma/llms-language.md | 2861 | Every type, operator, control flow, struct, class, template, coroutine, exception, heap, FFI, annotation, module, addon |
| Complete SDK ref | docs/enma/llms-sdk.md | 832 | Embedding API, type registration, native functions, hot reload |
Language guide (granular pages if you need detail beyond the single-page ref):
| Doc | Path | Lines |
|---|
| Basics (types, vars, operators, control flow) | docs/enma/lang-basics.md | 267 |
| Functions (params, defaults, refs, out, variadic, lambdas) | docs/enma/lang-functions.md | 247 |
| Pointers (heap, address-of, member access, null) | docs/enma/lang-pointers.md | 357 |
| Structs & Classes (value/ref types, inheritance, vtable, interfaces, mixins) | docs/enma/lang-structs-and-classes.md | 912 |
| Templates (generics, monomorphization) | docs/enma/lang-templates.md | 173 |
| Advanced (delegates, namespaces, coroutines, exceptions, smart ptrs, FFI) | docs/enma/lang-advanced.md | 562 |
| Annotations (packed, align, reflect, serialize, export, dll, custom) | docs/enma/lang-annotations.md | 209 |
| Modules (import, .emb, multi-module linking) | docs/enma/lang-modules.md | 100 |
| Preprocessor (#define, #ifdef, #include, #pragma) | docs/enma/lang-pre-processor.md | 77 |
| Semantics & Limits (guarantees, compile-time rejects, what doesn't exist) | docs/enma/lang-semantics-and-limits.md | 181 |
Addons (standard library — read the addon doc before using its types):
| Addon | Path | Lines | Key types/functions |
|---|
| Core | docs/enma/addon-core.md | 42 | println, print |
| Strings | docs/enma/addon-strings.md | 165 | format, to_int, split, replace, substr |
| Arrays | docs/enma/addon-arrays.md | 119 | push, pop, sort, contains, slice, for-each |
| Maps | docs/enma/addon-maps.md | 200 | map<K,V>, get, set, contains, imap<V> |
| Math | docs/enma/addon-math.md | 137 | sin, cos, atan2, sqrt, clamp, lerp, random |
| SIMD | docs/enma/addon-simd.md | 128 | SSE2 f32x4, i32x4 vector ops |
| Vectors | docs/enma/addon-vec.md | 135 | vec2, vec3, vec4 math types |
| 3D Math | docs/enma/addon-math3d.md | 182 | quat, mat4 rotation/transform |
| Variant | docs/enma/addon-variant.md | 130 | Type-erased value container |
| Atomic | docs/enma/addon-atomic.md | 94 | aint32, aint64 atomic ops |
| Bits | docs/enma/addon-bits.md | 117 | popcount, clz, ctz, bswap, rotl |
| Time | docs/enma/addon-time.md | 95 | time_ms(), time_us(), ISO 8601, sleep |
| Regex | docs/enma/addon-regex.md | 61 | match, find, replace, split, capture groups |
| File | docs/enma/addon-file.md | 125 | Sandboxed file I/O (permission-gated) |
| Thread | docs/enma/addon-thread.md | 120 | mutex, lock_guard, condition_variable |
| Hash Set | docs/enma/addon-hash_set.md | 89 | hash_set<T> |
| Sorted Map | docs/enma/addon-sorted_map.md | 89 | sorted_map<K,V> ordered iteration |
| List | docs/enma/addon-list.md | 192 | Double-ended O(1) push/pop |
| JSON | docs/enma/addon-json.md | 108 | json_parse, json_stringify, json_value navigation |
SDK (C++ embedding — read when building host-side or custom addons):
| Doc | Path | Lines |
|---|
| Quick Start | docs/enma/sdk-quick-start.md | 126 |
| Engine Lifecycle | docs/enma/sdk-engine-lifecycle.md | 166 |
| Compilation | docs/enma/sdk-compilation.md | 65 |
| Execution | docs/enma/sdk-execution.md | 103 |
| Calling Functions | docs/enma/sdk-calling-functions.md | 82 |
| Globals | docs/enma/sdk-globals.md | 79 |
| Type Registration | docs/enma/sdk-type-registration.md | 862 |
| Native Functions | docs/enma/sdk-native-functions.md | 446 |
| Hot Reload | docs/enma/sdk-hot-reload.md | 64 |
| Serialization & Linking | docs/enma/sdk-serialization-and-linking.md | 97 |
| Introspection | docs/enma/sdk-introspection.md | 317 |
| Lifecycle & RAII | docs/enma/sdk-lifecycle.md | 227 |
| Debug & Heap | docs/enma/sdk-debug-and-gc.md | 202 |
| Error Handling | docs/enma/sdk-error-handling.md | 116 |
| Safety | docs/enma/sdk-safety.md | 121 |
| Custom Addons | docs/enma/sdk-custom-addons.md | 576 |
| API Reference | docs/enma/sdk-api-reference.md | 411 |
When writing PCX Enma API code — read the relevant API doc:
| API | Path | Lines | Use for |
|---|
| Proc API | docs/perception/proc-api.md | 294 | Memory read/write, modules, pattern scan, VAD, pointer arrays, vec/quat/mat reads |
| Render API | docs/perception/render-api.md | 264 | 2D drawing (text, lines, circles, rects), fonts, shaders, vertex/index buffers, compute |
| GUI API | docs/perception/gui-api.md | 455 | Sidebar sections, checkboxes, sliders, buttons, text inputs, color pickers, keybinds |
| Input API | docs/perception/input-api.md | 126 | Mouse + keyboard state polling |
| CPU API | docs/perception/cpu-api.md | 92 | CPU ID, timing, datetime, bitcasts, thread priority |
| Zydis API | docs/perception/zydis-api.md | 133 | x86-64 assembler/disassembler |
| Unicorn API | docs/perception/unicorn-api.md | 151 | x86-64 CPU emulation |
| Net API | docs/perception/net-api.md | 200 | HTTP, WebSocket, raw UDP |
| Win API | docs/perception/win-api.md | 120 | Window enum, clipboard, keyboard/mouse send |
| Filesystem API | docs/perception/filesystem-api.md | 162 | Sandboxed file I/O |
| Sound API | docs/perception/sound-api.md | 90 | WAV/OGG playback |
| Lifecycle | docs/perception/lifecycle-and-routines.md | 134 | main(), routines, unload, exceptions |
| MCP API | docs/perception/mcp-api.md | 268 | AI agent JSON-RPC surface |
PCX IDE & Extensions:
| Doc | Path | Lines |
|---|
| Perception IDE | docs/perception/ide.md | 585 |
| Extensions API | docs/perception/extensions-api.md | 371 |
| Analyzer | docs/perception/analyzer.md | 370 |
How To Use These Docs
- Before starting a game-cheat script: load
skill://game-cheat-script-master and read knowledge/cheat-script-cookbook.md
- Before writing AngelScript code: start from
https://docs.perception.cx/perception/angel-script/overview.md and read the relevant .md sub-page
- Before writing Enma code: use Enma only for explicit
.em or migration/AOT work, then start from https://docs.perception.cx/perception/enma/readme.md
- If unsure about a type, function, or parameter: read the upstream doc, don't guess
- If the doc says a function is "gated": it requires a permission flag — mention this to the user
- For a starting AngelScript project scaffold: use
templates/angelscript-overlay.as or pcx create --language angelscript --kind overlay
Anti-Hallucination Rule
You must NEVER invent a PCX or Enma API name. Every function,
method, type, and import you use must come from one of:
https://docs.perception.cx/perception/enma/readme.md and its sub-pages,
knowledge/pcx-api-index.json (via pcx symbol-check or the
mcp:pcx-knowledge validate_code tool),
- a user-defined function declared in the same script.
Before delivering code, run pcx verify <file> (or pcx symbol-check <file> if verify is unavailable). If it reports an unknown_call,
unknown_type, or missing_import, fix it by reading the correct upstream
doc and using the real symbol. Do not silence the checker by renaming things.
See knowledge/pcx-doc-roots.md for the full sourcing policy.
Cheat-Script Scaffolds
- Enma skeleton:
templates/cheat-skeleton-em/ — globals, offsets, utils, ESP, aim, triggerbot, radar, menu, main
- Cookbook recipes:
knowledge/cheat-script-cookbook.md — pattern scan, pointer chain, W2S, ESP, aim smoothing, FOV, triggerbot, radar, config, unload cleanup
Critical Enma Rules (from the docs)
- Addresses are
uint64, never int64 — sign-extension breaks high addresses
float32 literals need f suffix: 0.2f not 0.2
- Implicit conversion:
int→float OK, float→int COMPILE ERROR — use cast<int32>(f)
signed↔unsigned is COMPILE ERROR — use cast<uint64>(signed_val)
color and vec2 are value types — 4-byte and 8-byte stack structs, construct every frame
- Handles from
create_*/load_* are encrypted int64 — pass back, don't inspect
main() returns > 0 to stay loaded, <= 0 to unload
- Routines registered via
register_routine(cast<int64>(fn), data)
proc_t released on scope exit (RAII) — no leak if you use stack variables
- Failed reads return 0, not exceptions — validate pointers
- Pattern sigs: hex bytes,
?? wildcard, e.g. "48 8B 05 ?? ?? ?? ?? 48 85 C0"
import "vec"; import "color"; — modules must be imported to use their types
string interpolation: f"value={x}" — use format() for hex: format("0x{x}", addr)
- No garbage collector — deterministic RAII, destructors run at scope exit
LSP Servers (built, ready to use)
- Enma LSP:
lsp/enma-lsp/server/dist/server.js
RE Tools & Knowledge
- Plugins & FLIRT sigs:
knowledge/re-plugins-and-tools.md — 6 IDA plugins, 4 Ghidra extensions, 51 FLIRT sigs, diffing, ret-sync
- Anti-cheat architecture:
knowledge/anti-cheat-architecture.md — EAC/BE/Vanguard/GG detection matrix
- Kernel RE tools:
knowledge/kernel-re-tools.md — WinDbg, HyperDbg, Volatility, PCILeech, IRPMon
- AC driver patterns:
signatures/anti-cheat/common-ac-patterns.md — driver ID, callback sigs, integrity check patterns
- Deobfuscation:
skill://deobfuscation — VM/CFF/packer reversal methodology (Themida, VMProtect, OLLVM)
- Obfuscation taxonomy:
knowledge/obfuscation-taxonomy.md — protector architecture and weaknesses
- Deobfuscation tools:
knowledge/deobfuscation-tools.md — NoVmp, Triton, Miasm, D-810, ScyllaHide, FLOSS
- Protector patterns:
signatures/obfuscation/protector-patterns.md — VMP/Themida/OLLVM section names, dispatcher patterns, anti-debug
- r5sdk:
sdks/r5sdk/ (2438 reversed headers for Apex Legends)
- IDA IDB:
idb/r5apex_dx12_dump.i64 (28936 functions, FLIRT+types)
- Ghidra:
ghidra-projects/r5apex/
- radare2, Ghidra, semgrep MCP servers all available