- Revised the tagline in `docusaurus.config.js` to reflect the focus on Data Center. - Enhanced descriptions in `getting-started.md`, `intro.md`, and various mod documentation files for consistency and clarity. - Updated references to the game name, removing "Waseku" for a more streamlined presentation. - Improved the structure and readability of tables and lists throughout the documentation. This commit aims to ensure the documentation is clear, consistent, and accurately represents the project, enhancing usability for both mod developers and players.
3.6 KiB
title, sidebar_label, description
| title | sidebar_label | description |
|---|---|---|
| Greg hooks & event runtime | Greg hooks & events | greg.* hooks, GregEventDispatcher, GregNativeEventHooks, greg_hooks.json, Rust FFI event ids, and compat aliases. |
Greg hooks & event runtime
The FrikaModdingFramework.dll assembly is built from gregCore/framework/FrikaMF.csproj and combines Harmony patches, C# events (GregEventDispatcher), and the Rust/native bridge. Mod authors mainly care about three surfaces:
| Surface | Role | Typical entry |
|---|---|---|
greg.* hook strings |
Canonical names for Harmony/mod code; registry in greg_hooks.json. |
GregEventDispatcher.On("greg....", handler, modId) in gregFramework.Core |
Native pipeline (EventIds → greg.*) |
Same gameplay moments as FFI events; centralized in GregNativeEventHooks. |
Constants / Resolve(uint) on gregFramework.Core.GregNativeEventHooks |
| Legacy aliases | Old spellings → canonical greg.*. |
GregCompatBridge (+ optional legacy entries in greg_hooks.json) |
New documentation identifiers still follow FMF.<Domain>.* — see FMF hook naming. Runtime strings for the native chain are greg.* as defined by GregNativeEventHooks and greg_hooks.json.
greg_hooks.json (version 2)
| Path | Role |
|---|---|
Repo root greg_hooks.json |
Source of truth: name, patchTarget, strategy, payloadSchema, optional legacy. |
Next to FrikaModdingFramework.dll |
Copied from the monorepo root on build so GregCompatBridge can resolve legacy names. |
Regenerate: gregCore/scripts/Generate-GregHooksFromIl2CppDump.ps1 when Il2Cpp/interop inputs change.
GregEventDispatcher / SDK
Implementation: gregCore/framework/src/Sdk/GregEventDispatcher.cs (namespace gregFramework.Core). API: On / Once / Off / Emit, OnCancelable / InvokeCancelable, UnregisterAll(modId).
Build stable hook strings with GregHookName.Create(GregDomain.*, "Action") or GregNativeEventHooks.* constants.
Native events (EventIds)
EventIdsandEventDispatcher:gregCore/framework/src/ModLoader/EventDispatcher.cs(numeric ids aligned with Rust).- Mapping →
greg.*:GregNativeEventHooks(gregCore/framework/src/Sdk/GregNativeEventHooks.cs); emission viaGregHookIntegrationin the same ModLoader tree. - Wiki table: greg hooks catalog (generator:
gregCore/tools/Generate-GregHookCatalog.ps1).
Rust FFI
Rust/native mods receive numeric event ids; C# mirrors the same moments as greg.* through GregHookIntegration while the game runs (including when the FFI connection is down for the managed **greg.* surface). Bridge code: FfiBridge / FFIBridge under framework/src/ModLoader/.
MelonLoader entry points (one DLL)
Depending on the build, multiple MelonMod types may ship in the same assembly (e.g. main framework plugin vs. AssetExporter paths) — check MelonInfo / MelonGame in source.
Tooling
- MCP:
greg_hook_registry,greg_hook_search, … withdataRoot→gregCore/— MCP server. - FMF hooks catalog is now a short redirect to
GregNativeEventHooks/ greg hooks catalog (the oldHookNames.cstable is gone).