bg3se-macos-ghidra

Discover BG3 Script Extender offsets and structures with Ghidra for macOS ARM64.

55|10|Updated Nov 27, 2025
One-click install
npx skills add https://github.com/tdimino/bg3se-macos --skill bg3se-macos-ghidra
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: bg3se-macos-ghidra
Source: https://github.com/tdimino/bg3se-macos/tree/main/tools/skills/bg3se-macos-ghidra
Command: npx skills add https://github.com/tdimino/bg3se-macos --skill bg3se-macos-ghidra

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill helps developers build and debug the Baldur's Gate 3 Script Extender port for macOS by using Ghidra to discover game offsets, function addresses, and data structures. It accelerates porting Windows BG3SE features to ARM64 macOS and improves understanding of ECS, Osiris integration, and the stat/offset landscape.

Core Features & Use Cases

  • Ghidra-based offset discovery: Identify critical pointers, structures, and function entry points for the macOS port.
  • Documentation & architecture clarity: Centralized references and offset mappings to reduce rework during porting.
  • Growth & porting support: Guidance for implementing new Lua APIs (Ext., Osi.) and porting Windows features to macOS ARM64.
  • Use Case: You’re porting a Windows feature; this skill guides offset discovery and provides a workflow to validate work with headless Ghidra scripts.

Quick Start

Build and analyze with Ghidra headless analysis using the included scripts:

  • Build commands follow the project’s usual workflow (cmake) and then run headless analysis scripts, e.g. via the provided ghidra/run scripts.
  • Use the headless wrapper to execute a script like run_analysis.sh with a target script (for example, find_modifierlist_offsets.py) and review outputs in the log.

Frequently Asked Questions about bg3se-macos-ghidra

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I discover offsets and function addresses for BG3 Script Extender on macOS ARM64?

Use Ghidra to reverse-engineer the Baldur's Gate 3 binary and identify critical pointers, structures, and function entry points. Ghidra's headless analysis scripts automate offset discovery workflows, mapping addresses needed for porting Windows BG3SE features to ARM64 macOS environments.

Can I port Baldur's Gate 3 Script Extender from Windows to macOS using Ghidra?

Yes. This Skill provides Ghidra-based workflows to discover offsets, validate ARM64 ABI rules (x8 for large structs), and navigate Hardened Runtime constraints. It guides porting Windows features, implementing Lua APIs (Ext.*, Osi.*), and ECS traversal specific to macOS.

What are the constraints for BG3SE development on macOS that affect porting?

macOS Hardened Runtime prevents hooking the main binary, requiring manual ECS access and offset-based function discovery. ARM64 ABI rules apply x8 register conventions for large structures. Ghidra analysis identifies workarounds and validates cross-platform API registration against these constraints.

How do I use Ghidra headless scripts to automate offset discovery for BG3SE?

Build the project with cmake, then execute headless analysis scripts (e.g., find_modifierlist_offsets.py) via the provided ghidra/run wrapper. Output logs contain discovered offsets, data structure mappings, and function addresses ready for integration into the macOS port.

Do I need to understand Osiris integration to port BG3SE to macOS?

Understanding Osiris helps but isn't required to start. This Skill documents Osiris integration patterns and ECS traversal specific to macOS. Ghidra analysis reveals offset dependencies, letting you implement features incrementally and integrate Lua API extensions as needed.