- Introduced new strings for the mod manager feature in the English localization file. - Updated the homepage to include a dedicated section for the GregModManager, featuring a description, download link, and hints for the latest release. - Adjusted button styles for better consistency and user experience. This commit enhances the homepage by providing users with direct access to the mod manager and its functionalities.
1.6 KiB
title, sidebar_label, description
| title | sidebar_label | description |
|---|---|---|
| Greg hooks showcase (sample mod) | Greg hooks showcase | How to subscribe to greg.* hooks via GregShowcaseMod and gregFramework.Core APIs. |
Greg hooks showcase
The repository includes GregShowcaseMod (mods/GregShowcaseMod/ in gregFramework): a minimal MelonLoader mod that logs one representative event per GregDomain, using only public APIs:
GregEventDispatcher.On/UnregisterAllGregHookName.Create(GregDomain.*, "Action")GregPayload.Get/GregPayload.Dumpfor anonymous payloads
Canonical hook strings
Runtime hook names look like greg.<DOMAIN>.<Action>, e.g. greg.PLAYER.MoneyChanged. Build the string with GregHookName.Create — do not concatenate raw strings in mods.
Registry file
greg_hooks.json (shipped beside FrikaModdingFramework.dll) is generated from MergedCode.md by:
pwsh gregCore/scripts/Generate-GregHooksFromMergedCode.ps1
Options are passed through to parse_merged_code.py (e.g. --no-hot-loops to omit Update/FixedUpdate from the catalog). The dump is large; regeneration can take several minutes.
Sample subscriptions
See mods/GregShowcaseMod/Handlers/*.cs — each file registers one hook for its domain (except POWER, where GregPowerHooks is still empty until Il2Cpp types are classified).
Configuration
Copy mods/GregShowcaseMod/modconfig.example.json to {Game}/Mods/GregShowcaseMod/modconfig.json to toggle per-domain logging.
See also
- Mod developers (hub)
- System architecture principles
- Framework — runtime overview