Twórz i debuguj wtyczki Gothic 1 & 2
z pomocą AI
Build & Debug Gothic 1 & 2
Plugins with AI
Połącz Claude Code, Cursor lub VS Code bezpośrednio z nagłówkami GothicAPI dla 4 silników, linterem C++ i Daedalus (.d), budowaniem .vdf oraz mostem McpGothic.dll do uruchomionej gry.
Connect Claude Code, Cursor, or VS Code directly to 4-engine GothicAPI headers, C++ & Daedalus (.d) linters, VDFS (.vdf) packaging, and the live McpGothic.dll in-game bridge.
$ git clone https://github.com/pen996k/mcpgothic.git && cd mcpgothic $ python run_server.py install --client claude-code
$ git clone https://github.com/pen996k/mcpgothic.git && cd mcpgothic $ python run_server.py install --client cursor
$ git clone https://github.com/pen996k/mcpgothic.git && cd mcpgothic $ python run_server.py install --client antigravity
$ git clone https://github.com/pen996k/mcpgothic.git && cd mcpgothic $ python run_server.py install --client claude-desktop
{
"mcpServers": {
"mcpgothic": {
"command": "python",
"args": ["-B", "/path/to/mcpgothic/run_server.py"]
}
}
}
Jak AI rozmawia z silnikiem Gothica How AI Talks to the Gothic Engine
Kliknij scenariusz po lewej stronie, aby zobaczyć jak asystent wywołuje narzędzia mcpgothic.
Select a scenario on the left to see how your AI assistant uses mcpgothic tools.
gothic_template(name="Compass", folder="...", launcher=true) -> Created Compass\Compass.vcxproj (G1, G1A, G2, G2A | Win32 | v143 | static CRT) -> Created Compass\Plugin\plugin.cpp (Game_*, Detach, TScreenState, LoadConfig) -> Created Compass\Scripts\Compass_Union.d & Compass_Menu.d (Parser = Menu) -> Created Compass\launcher\launcher.cpp (single DLL for G1 + G2A)
Compass jest gotowy do kompilacji dla wszystkich 4 silników, z wpisem w menu Union & Plugins i automatycznym odczytem opcji z Gothic.ini.
AI: The Compass project is ready to build across all 4 engines, complete with a Union & Plugins menu entry and live Gothic.ini option reloading.
oCNpc::OnDamage_Hit(oSDamageDescriptor&) G1 0x00731410 | G1A 0x007700A0 | G2 0x0077D390 | G2A 0x00666610 oCNpc::IsDead() G1 0x00693D30 | G1A 0x006C5450 | G2 MISSING! | G2A 0x00736740
oCNpc::IsDead() nie istnieje w Gothic 2 Classic (G2). Aby wtyczka kompilowała się na wszystkich 4 silnikach, sprawdzaj npc->attribute[NPC_ATR_HITPOINTS] <= 0.
AI: Note that oCNpc::IsDead() is MISSING in Gothic 2 Classic (G2). To keep the plugin compatible with all 4 engines, check npc->attribute[NPC_ATR_HITPOINTS] <= 0 instead.
ERROR ZG001 plugin.cpp:42 delete on zCObject (use Release() instead of delete)
ERROR ZG005 plugin.cpp:19 static oCNpc* g_target not cleared in Game_LoadBegin_*
ERROR DZ016 Logic.d:28 two script calls in one expression: Cost(b) - Cost(a)
overwrites the shared return variable
delete na obiekcie zCObject, niewyczyszczony wskaźnik g_target przy wczytywaniu zapisu oraz nadpisanie zmiennej zwracanej w wyrażeniu Daedalusa. Już je poprawiam.
AI: Found 3 critical issues: calling delete on a refcounted zCObject, not clearing g_target on save load, and two script calls in one Daedalus expression overwriting the return reference. Fixing them now.
world=NEWWORLD.ZEN time=day 1 12:14 player=PC_HERO pos=(1240, 350, -890) hp=40/40 mana=10/10 level=1 npc[0]: Diego (PC_THIEF) dist=412cm hp=200/200 screenshot: captured 1280x720 PNG (returned as MCP image to AI)
screen->fontColor wokół imienia Diego jest prawidłowo przywracany.
AI: I can see the live game screenshot — the compass bar renders cleanly in the top-right corner, and screen->fontColor above Diego's name is properly restored.
CRASH: EXCEPTION_ACCESS_VIOLATION (0xC0000005) at Gothic2.exe+0x3A07CD (0x007A07CD) -> zCParser::GetParameter(int&) + 0x1D reading address 0x00000008 (null pointer + offset) CAUSE: External 'MP_IsNear' popped 3 parameters, but .d script pushed 2.
zCParser::GetParameter (0x007A07CD). Funkcja external MP_IsNear w C++ pobiera ze stosu 3 parametry, a deklaracja w skrypcie .d przekazuje tylko 2.
AI: The crash dump points to zCParser::GetParameter (0x007A07CD). Your C++ external MP_IsNear pops 3 parameters from the parser stack, while the .d declaration only pushes 2.
Jak to jest połączone How It Works
JSON-RPC
127.0.0.1:47920
Gotowe do pracy w 3 krokach Up and Running in 3 Steps
Pobierz mcpgothic
Get mcpgothic
Sklonuj repozytorium lub pobierz gotową paczkę ZIP z zakładki Releases. Wymagany jest wyłącznie Python 3.8+.
Clone the repository or download the release ZIP. Only standard Python 3.8+ is required (zero pip packages).
Podłącz do swojego AI
Register in Your AI App
Uruchom instalator dla swojego klienta AI i zrestartuj aplikację (Claude Code, Cursor, Claude Desktop).
Run the one-line installer for your AI client and restart your editor (Claude Code, Cursor, Claude Desktop).
Opcjonalnie: wrzuć most do gry
Optional: Install Game Bridge
Jeśli chcesz, aby AI robiło zrzuty ekranu i czytało stan włączonego Gothica, zainstaluj most do Data\Plugins.
To let the AI capture screenshots and inspect a running Gothic session, install the bridge into Data\Plugins.
Wszystko, czego potrzebuje twórca wtyczek Union Everything Needed for Union Plugin Development
Indeks GothicAPI dla 4 silników
4-Engine GothicAPI Index
Dokładne adresy metod, pola klas z offsetami, zmienne globalne i stałe klawiszy. Automatycznie ostrzega o różnicach rozmiarów klas między G1 i G2.
Exact method addresses, class field offsets, globals, and key constants. Automatically flags class size and layout differences between G1 and G2.
50 reguł lintera C++ i Daedalus
50 C++ & Daedalus Linter Rules
Wyłapuje błędy pamięci zCObject, brak Release(), nieprzywrócony kolor czcionki screen, błędne kodowanie cp1250 oraz nadpisywanie referencji w wyrażeniach .d.
Catches zCObject memory bugs, uncleaned world pointers, shared screen state corruption, UTF-8 vs cp1250 encoding, and Daedalus stack reference overwrites.
Pakowanie .vdf i kontrola wydania
VDFS Packaging & Release Check
Pakuje DLL i skrypty .d do SYSTEM\AUTORUN\, sprawdza kompilację pod właściwy silnik oraz skanuje binaria pod kątem prywatnych ścieżek PDB przed publikacją.
Packs DLLs and .d scripts into SYSTEM\AUTORUN\, verifies target engine addresses, and scans binaries for local PDB paths before release.
Podgląd skompilowanego GOTHIC.DAT
Compiled GOTHIC.DAT Inspector
Przeszukuje NPC, przedmioty, dialogi i funkcje bezpośrednio w skompilowanym pliku GOTHIC.DAT (także wewnątrz paczek .mod i .vdf) bez źródeł skryptów.
Searches NPCs, items, dialogs, and functions directly inside compiled GOTHIC.DAT files (including inside .mod / .vdf archives) without source scripts.
Wykrywanie kolizji między wtyczkami
Cross-Plugin Conflict Detection
Porównuje wtyczki pod kątem tych samych klawiszy, hooków (w tym funkcji podmienianych przez renderer DX11 GD3D11), sekcji Gothic.ini i prefiksów skryptowych.
Checks plugins for overlapping hotkeys, hooks (including DX11 GD3D11 hooks), Gothic.ini sections, and Daedalus symbol prefixes.
Jeden plik DLL dla Gothic 1 i Gothic 2
Single-DLL G1 + G2A Launcher
Opcja launcher=true w generatorze projektu tworzy lekki plik DLL zawierający zasoby G1 oraz G2A i automatycznie ładujący odpowiednią wersję przy starcie gry.
Passing launcher=true to the project generator creates a single DLL carrying both G1 and G2A builds and loading the matching one at runtime.
Pełna lista 25 narzędzi i 50 reguł All 25 Tools & 50 Linter Rules
Spis wszystkich 25 narzędzi MCPAll 25 MCP Tools 25 tools
| Tool | OpisDescription |
|---|---|
gothic_template | Generuje projekt wtyczki Union (4 silniki, menu, skrypty .d, opcjonalny launcher G1+G2A).Generates a 4-engine Union plugin project (vcxproj, menu, .d scripts, optional G1+G2A launcher). |
gothic_recipe | Gotowe wzorce kodu: text, key, menu_option, save_data, hook, script_replace, external, console.Ready code patterns: text, key, menu_option, save_data, hook, script_replace, external, console. |
gothic_api_search | Wyszukuje metody, pola, zmienne globalne i stałe KEY_* w GothicAPI (4 silniki).Searches methods, fields, globals, and KEY_* constants across all 4 GothicAPI engines. |
gothic_api_class | Pokazuje rozmiar, dziedziczenie, offsety pól i adresy metod klasy w 4 silnikach.Inspects class size, inheritance, field offsets, and method addresses across 4 engines. |
gothic_pitfalls | 76 zasad silnika ZenGin i Union SDK zapobiegających crashom.76 ZenGin and Union SDK rules preventing common plugin crashes. |
gothic_knowledge | Przeszukuje wbudowaną bazę wiedzy i reguł.Searches the built-in ZenGin & Union knowledge base. |
gothic_graph | Odpytuje opcjonalny graf kodu projektu (graphify).Queries an optional project code graph (graphify). |
gothic_lint | Linter C++ dla wtyczek Union (reguły ZG001–ZG027).C++ linter for Union plugins (rules ZG001–ZG027). |
gothic_lint_d | Linter skryptów Daedalus .d (reguły DZ001–DZ023 + kontrola z GOTHIC.DAT).Daedalus .d script linter (rules DZ001–DZ023 + GOTHIC.DAT verification). |
gothic_conflicts | Wykrywa kolizje klawiszy, hooków, sekcji ini i symboli między wtyczkami.Detects hotkey, hook, ini section, and script symbol conflicts between plugins. |
gothic_build | Buduje wtyczkę przez MSBuild dla G1, G1A, G2, G2A (Win32) i sprawdza pliki DLL.Builds plugins with MSBuild across G1, G1A, G2, G2A (Win32) and validates output DLLs. |
gothic_vdf_pack | Pakuje DLL i skrypty .d do archiwum .vdf (VDFS 2.00) z kopią zapasową.Packs DLL and .d scripts into a VDFS 2.00 .vdf archive with automatic backup. |
gothic_vdf_check | Sprawdza strukturę .vdf, ścieżki AUTORUN, silnik DLL i brakujące skrypty.Validates .vdf structure, AUTORUN paths, DLL target engine, and missing scripts. |
gothic_dll_check | Sprawdza 32-bit PE, eksporty Game_*, statyczny CRT i docelowy silnik DLL.Checks 32-bit PE, Game_* exports, static CRT, and target engine of a DLL. |
gothic_release_check | Audyt paczki .vdf przed publikacją (ścieżki lokalne, PDB, Debug CRT, brakujące DLL).Pre-release audit of a .vdf archive (local paths, PDB strings, Debug CRT, missing DLLs). |
gothic_package | Otwiera i wypakowuje archiwa .vdf oraz .mod.Lists, previews, checks, and extracts .vdf and .mod archives. |
gothic_github | Pobiera i sprawdza dowolną wtyczkę Union z GitHuba.Downloads and audits any Union plugin repository and release from GitHub. |
gothic_game | Wyszukuje instalacje Gothica 1/2, opisuje wtyczki i instaluje/wyłącza paczki .vdf.Finds Gothic 1/2 installations, inspects plugins, and installs/disables .vdf packages. |
gothic_diagnose | Diagnoza crashy: logi sesji, .dmp minidump oraz puste externale w GOTHIC.DAT.Crash diagnostics: session logs, .dmp minidumps, and empty externals in GOTHIC.DAT. |
gothic_log | Czyta logi gry i wtyczek oraz tłumaczy adresy błędów na funkcje silnika.Reads game and plugin logs and resolves crash addresses to engine functions. |
gothic_address | Zamienia adres hex (np. 0x007A9910) na funkcję z GothicAPI.Resolves hex addresses (e.g. 0x007A9910) to GothicAPI function names. |
gothic_scripts | Czyta skompilowany GOTHIC.DAT (NPC, przedmioty, dialogi, funkcje, referencje).Inspects compiled GOTHIC.DAT bytecode (NPCs, items, dialogs, functions, xrefs). |
gothic_bridge | Instaluje i sprawdza most McpGothic.dll (install, ping, print).Installs and manages the McpGothic.dll bridge (install, ping, print). |
gothic_game_state | Odczytuje stan działającej gry: gracz, świat, NPC, waypointy, zmienne, ekwipunek.Reads live game state: player, world, NPCs, waypoints, script variables, inventory. |
gothic_screenshot | Zrzut ekranu z działającej gry przekazywany jako obraz do AI.Captures a live game screenshot and returns it as an MCP image. |