← ClaudeAtlas

bg3se-macos-ghidralisted

Develop the BG3 Script Extender macOS port using Ghidra for reverse engineering. Use this skill when: (1) Working on bg3se-macos port development or debugging (2) Using Ghidra to discover offsets, function addresses, or data structures in BG3 (3) Implementing new Lua APIs (Ext.*, Osi.*) for macOS Script Extender (4) Porting Windows BG3SE features to macOS ARM64 (5) Understanding ECS architecture, Osiris integration, or stats system (6) Analyzing ARM64 assembly or calling conventions for game hooks (7) Writing or modifying Ghidra Python scripts for BG3 analysis
tdimino/bg3se-macos · ★ 59 · Data & Documents · score 80
Install: claude install-skill tdimino/bg3se-macos
# BG3 Script Extender macOS + Ghidra Development ## Project Locations | Project | Path | |---------|------| | **bg3se-macos** | `/Users/tomdimino/Desktop/Programming/bg3se-macos` | | **bg3se** (Windows ref) | `/Users/tomdimino/Desktop/Programming/bg3se` | ## Quick Start ```bash # Build cd /Users/tomdimino/Desktop/Programming/bg3se-macos/build cmake .. && cmake --build . # Test ./scripts/launch_bg3.sh tail -f ~/Library/Application\ Support/BG3SE/bg3se.log # Ghidra (headless, optimized) ./ghidra/scripts/run_analysis.sh <script.py> ``` ## Key Constraints (macOS) 1. **Cannot hook main binary** - Hardened Runtime blocks `__TEXT` hooks 2. **CAN hook libOsiris.dylib** - 1,013 exported symbols 3. **ARM64 ABI** - x8 register for structs >16 bytes 4. **No GetRawComponent** - Must traverse ECS manually See [macos-patterns.md](references/macos-patterns.md) for detailed differences. ## Module Structure ``` src/ ├── injector/main.c # Core (~2900 lines): hooks, Osi.*, Lua state ├── entity/ # ECS: guid_lookup, component_lookup, arm64_call ├── lua/ # Ext.* APIs: stats, debug, osiris, json ├── osiris/ # Osiris types, functions, custom_functions ├── stats/ # RPGStats, GlobalStringTable ├── console/ # Socket server, file-based console └── input/ # CGEventTap keyboard capture ``` ## API Surface (v0.22.0) | Namespace | Status | Notes | |-----------|--------|-------| | `Osi.*` | 95% | Dynamic metatable, Query/Call/Event