The attachment includes patch.dll source and the API docs for further patch development.
addon.dll source available on request.
subgame.exe IDB analysis file available on request.
The following is the included Subgame2-Addon.exe Documentation and you can contact me in-game with further questions:
cycad wrote: ===================================================================
Addon.dll is NOT a subgame dependency. In its absence subgame executes like normal.
Modified .text section characteristics to allow .text section writes (Addons can do their own patching)
Added .addon section for Addon.dll loading hook
Addon loading hook does the following:
- Tests for "addon.new"
- If this file exists, copy it to "Addon.dll" overwriting the old one
- This is necessary because *putfile does not allow .dll uploads, and with this method
- only one server restart is required (upgrading goes like *putfile addon.new / *shutdown
- instead of disabling addons.dll in the server.ini, restarting, uploading new dll,
- re-enabling addons.dll in server.ini, restarting)
- Loads Addon.dll
- Calls Addon.dll's startup function AddonInit
- AddonInit tests for the existence of file "addon.lock"
- If this file exists, Addon.dll assumes the last subgame execution resulted in a crash
and unloads itself. Subgame execution continues as if no Addon.dll were found.
- Addon.dll creates "addon.lock"
- Addon.dll injects its hooks and loads other dlls based on server.ini config
- Subgame runs
- When subgame exists gracefully, "addon.lock" is erased.
Addons:Enabled=0/1 ; 0 disables Addons.dll
Addons:AddonsList=ac ; ':' delimited list of Addons that Addon.dll should load
= patch.dll - An Addon example
PatchAddon:EnableSysmsg=0/1 ; 0 disabled *sysmsg
PatchAddon:EnableChat8=0/1 ; 1 enables chat 8 & lines beginning with 8 for mods