Initial commit
A modern .NET 9 NativeAOT framework for Asheron's Call client modding. Self-contained injection system that hooks D3D9 EndScene to render an ImGui overlay inside the AC client process.
This commit is contained in:
commit
80b71d295d
179 changed files with 52858 additions and 0 deletions
91
docs/ACCLIENT_HOOK_INVENTORY.md
Normal file
91
docs/ACCLIENT_HOOK_INVENTORY.md
Normal file
|
|
@ -0,0 +1,91 @@
|
|||
# ACClient Hook Inventory
|
||||
|
||||
This file tracks RynthCore hook targets against the user's real AC client binary, with the AC client decompile used for semantics and the live binary used as the source of truth for hook placement.
|
||||
|
||||
## Client Fingerprint
|
||||
|
||||
- Path: `C:\Turbine\Asheron's Call\acclient.exe`
|
||||
- File size: `4,841,472` bytes
|
||||
- SHA256: `BCA95BBEBED4B9ED1FF09D0DA83144E2FC4208F63AD7ADA5CB47C3CA207CCBA9`
|
||||
- PE machine: `0x014C` (`x86`)
|
||||
- PE image size: `0x0056D000`
|
||||
|
||||
## Rules For This Inventory
|
||||
|
||||
- Use the decompile to understand semantics, call order, and callback behavior.
|
||||
- Use the live `acclient.exe` to derive patterns, validate uniqueness, and choose the real hook address.
|
||||
- Do not ship fixed RVAs from the decompile unless they have been validated against the live binary.
|
||||
- Prefer hooking the AC client function that already implements the desired behavior over lower-level memory access.
|
||||
- Every production hook should eventually have:
|
||||
- a primary binary pattern
|
||||
- at least one fallback pattern or alternate seam when practical
|
||||
- runtime validation
|
||||
- an explicit unsupported-state log/UI message
|
||||
|
||||
## Priority Inventory
|
||||
|
||||
### Lifecycle And UI
|
||||
|
||||
| Surface | Decompiled seam | Actual-binary plan for this client | Status | Priority |
|
||||
| --- | --- | --- | --- | --- |
|
||||
| `OnLoginComplete` | `CPlayerSystem::SendLoginCompleteNotification` in `CPlayerSystem.cpp:4017-4031` | Pattern-scan the containing function using the unique `SetDisplayInventory(1)` plus `BroadcastGlobalMessage(..., 0xB, 0)` sequence, then hook the containing `thiscall` function. | Live in RynthCore | P0 |
|
||||
| `OnUIInitialized` | `ClientUISystem::OnStartup` in `ClientUISystem.cpp:48` and `APIManager::SetUIReady(1)` in `APIManager.cpp:134` | Hook the tiny `OnStartup -> SetUIReady(1)` wrapper or the `SetUIReady(1)` transition path. Prefer the wrapper if the pattern is unique in the live binary. | Not implemented | P0 |
|
||||
| `OnBusyCountIncremented` | `ClientUISystem::IncrementBusyCount` in `ClientUISystem.cpp:630` | Hook the wrapper that increments `m_cBusy` and updates cursor state when crossing `0 -> 1`. | Not implemented | P1 |
|
||||
| `OnBusyCountDecremented` | `ClientUISystem::DecrementBusyCount` in `ClientUISystem.cpp:641` | Hook the wrapper that decrements `m_cBusy` and updates cursor state when crossing `1 -> 0`. | Not implemented | P1 |
|
||||
|
||||
### Chat And Command
|
||||
|
||||
| Surface | Decompiled seam | Actual-binary plan for this client | Status | Priority |
|
||||
| --- | --- | --- | --- | --- |
|
||||
| `OnChatWindowText` | `ClientSystem.cpp:108` | Hook the function that allocates a BSTR from `i_text`, calls `GetACPlugin()->OnChatWindowText`, then checks `bEat` before continuing UI output. | Ready for binary patterning | P0 |
|
||||
| `OnChatBarEnter` | `ClientCommunicationSystem.cpp:14407` | Hook the function that allocates a BSTR from the entered line, calls `GetACPlugin()->OnChatBarEnter`, and returns early when the plugin consumes the line. | Ready for binary patterning | P0 |
|
||||
|
||||
### World, Target, And Object Flow
|
||||
|
||||
| Surface | Decompiled seam | Actual-binary plan for this client | Status | Priority |
|
||||
| --- | --- | --- | --- | --- |
|
||||
| `OnDeleteObject` | `ACCObjectMaint::DeleteObject` in `ACCObjectMaint.cpp:73-85` | Hook the clean wrapper that checks `APIIsReady`, calls `OnDeleteObject`, then calls `ACCWeenieObject::SetCorpseDeleted` and `CObjectMaint::DeleteObject`. | Ready for binary patterning | P0 |
|
||||
| `OnSelectedTargetChange` | `ACCWeenieObject.cpp:710` and `ACCWeenieObject.cpp:1997` | Hook the selected-target setter path after `CM_UI::SendNotice_SelectionChanged` and before the direct plugin callback. | Ready for binary patterning | P0 |
|
||||
| World/object dispatch | `ACSmartBox::DispatchSmartBoxEvent` in `ACSmartBox.cpp:37-171` | Hook the SmartBox dispatch seam as the high-value world/object/network filter layer. This is the likely replacement for many WorldFilter-style surfaces. | Ready for binary patterning | P0 |
|
||||
| Object creation | `ACCObjectMaint::CreateObject` in `ACCObjectMaint.cpp:196` | Hook the object creation wrapper for higher-level object lifecycle callbacks when we need richer data than a raw SmartBox event. | Ready for binary patterning | P1 |
|
||||
| Object inventory updates | `ACCObjectMaint::UpdateObjectInventory` in `ACCObjectMaint.cpp:377` | Hook the inventory update path for container/item-change compatibility events. | Ready for binary patterning | P1 |
|
||||
| Update/create/delete server dispatch | `CM_Physics::DispatchSB_CreateObject`, `DispatchSB_UpdateObject`, `DispatchSB_DeleteObject` in `CM_Physics.cpp` | Use as fallback seams if the outer SmartBox dispatcher proves too broad or unstable. | Decompile-confirmed | P1 |
|
||||
|
||||
### Combat And Trade
|
||||
|
||||
| Surface | Decompiled seam | Actual-binary plan for this client | Status | Priority |
|
||||
| --- | --- | --- | --- | --- |
|
||||
| `OnCombatModeChange` | `ClientCombatSystem.cpp:1564` | Hook the branch that invokes the plugin callback after the combat mode change resolves and auto-targeting logic runs. | Ready for binary patterning | P1 |
|
||||
| Trade window opened | `ClientTradeSystem.cpp:525` | Hook `Handle_Trade__Recv_RegisterTrade` after `CM_Trade::SendNotice_RegisterTrade` and before the internal attempt-to-trade follow-up. | Ready for binary patterning | P1 |
|
||||
| Trade item added | `ClientTradeSystem::Handle_Trade__Recv_AddToTrade` in `ClientTradeSystem.cpp:560+` | Hook the direct wrapper that calls `CM_Trade::SendNotice_AddItemToTrade` and then `OnTradeWindowItemAdded`. | Ready for binary patterning | P1 |
|
||||
| Trade completed | `ClientCommunicationSystem.cpp:3106` | Hook the message-switch case for `0x529` (`Trade Complete!`) that directly invokes `OnTradeCompleted`. | Ready for binary patterning | P1 |
|
||||
| Trade accept/decline/close/clear | `ClientTradeSystem.cpp` | Hook the direct trade-system wrappers that invoke the corresponding plugin callback. | Decompiled seam confirmed, binary anchor still needed | P1 |
|
||||
|
||||
## Host Call Surface To Expose Through RynthCore
|
||||
|
||||
These are not plugin callback hooks, but they are part of the host API surface we should expose once the callback layer is in place.
|
||||
|
||||
| API surface | Decompiled seam | Notes | Priority |
|
||||
| --- | --- | --- | --- |
|
||||
| `WriteToChat` | `APIManager__IAsheronsCallImpl.cpp` | Safe early host helper. | P0 |
|
||||
| Selection get/set | `APIManager__IAsheronsCallImpl.cpp` | Pairs naturally with target-change callbacks. | P0 |
|
||||
| `UseObject`, `UseObjectOn`, `UseEquippedItem` | `APIManager__IAsheronsCallImpl.cpp` | Good interaction helpers once lifecycle is stable. | P1 |
|
||||
| `MoveItemExternal`, `MoveItemInternal` | `APIManager__IAsheronsCallImpl.cpp` | Useful once inventory callbacks exist. | P1 |
|
||||
| `IsStandingStill`, `StopCompletely`, `TurnToHeading`, `SetAutoRun` | `APIManager__IAsheronsCallImpl.cpp` | Movement helper layer. Some of this already overlaps with existing RynthCore action hooks. | P0 |
|
||||
| `GetCurCoords`, `GetPlayerID`, `GetGroundContainerID` | `APIManager__IAsheronsCallImpl.cpp` | Good basic state helpers. | P0 |
|
||||
| `GetScreenDimensions`, `ItemIsKnown`, `GetItemName` | `APIManager__IAsheronsCallImpl.cpp` | Low-risk host helpers. | P1 |
|
||||
| `IssueChatBarCommand` | `APIManager__IAsheronsCallImpl.cpp` | Treat as stub-like until runtime behavior is validated against the live client. | Hold |
|
||||
| `GetCombatMode`, `GetBusyCount`, salvage panel APIs | `APIManager__IAsheronsCallImpl_vtbl.cpp` | Declared but not yet fully validated in the split. | Hold |
|
||||
|
||||
## Implementation Waves
|
||||
|
||||
1. Finish lifecycle/UI: `OnLoginComplete`, `OnUIInitialized`, busy count.
|
||||
2. Add chat interception: `OnChatWindowText`, `OnChatBarEnter`.
|
||||
3. Add world/object seams: SmartBox dispatch, delete/create/inventory, selected target.
|
||||
4. Add combat/trade callbacks.
|
||||
5. Expose the confirmed `IAsheronsCall` subset through RynthCore-native host APIs.
|
||||
|
||||
## Notes
|
||||
|
||||
- The split decompile is still very useful, but the login-complete work already showed that its function RVAs do not always line up with the user's live client binary.
|
||||
- For this reason, future hook work should be tracked here first against the fingerprint above, then implemented in RynthCore with pattern scanning rather than fixed addresses.
|
||||
48
docs/LEGAL_COMPATIBILITY.md
Normal file
48
docs/LEGAL_COMPATIBILITY.md
Normal file
|
|
@ -0,0 +1,48 @@
|
|||
# Legal Compatibility Guardrails
|
||||
|
||||
This project is building a new RynthCore-native plugin system first, with clean-room compatibility shims only where they are safe and useful.
|
||||
|
||||
This file is a project policy note, not legal advice.
|
||||
|
||||
## Operating Position
|
||||
|
||||
- We may build compatibility with publicly documented or behaviorally observed plugin interfaces.
|
||||
- We may use the AC client decompile and runtime behavior to locate safe host-side hook points in `acclient.exe`.
|
||||
- We do not decompile, disassemble, patch, or copy code from Decal, VTank, or any other closed plugin.
|
||||
- We do not redistribute Decal, VTank, or third-party closed plugin binaries.
|
||||
- If users want to test third-party compatibility, they provide their own binaries.
|
||||
|
||||
## Why This Direction Is Safer
|
||||
|
||||
- The historical Decal project listing publishes Decal under a `Public Domain` license.
|
||||
- Decal still exposes public developer-facing materials such as plugin templates.
|
||||
- VTank publishes a license agreement that forbids reverse engineering, decompiling, disassembling, and redistribution.
|
||||
- U.S. law includes an interoperability exception in `17 U.S.C. 1201(f)`, but RynthCore should treat that as a narrow backstop instead of the core project strategy.
|
||||
|
||||
## Project Rules
|
||||
|
||||
- Do not reverse engineer Decal binaries.
|
||||
- Do not reverse engineer VTank binaries.
|
||||
- Do not copy source, headers, resources, strings, or assets from closed plugins.
|
||||
- Do not market RynthCore as an official Decal replacement or imply endorsement.
|
||||
- Prefer source/API compatibility over binary cloning.
|
||||
- Prefer RynthCore-native plugins over legacy binary compatibility whenever possible.
|
||||
- If a compatibility task would require inspecting closed-source plugin internals, stop and reassess before proceeding.
|
||||
|
||||
## Allowed Sources For Compatibility Work
|
||||
|
||||
- Public Decal-facing templates and documentation.
|
||||
- The AC client decompile and the running AC client itself.
|
||||
- RynthCore code and user-provided test plugins.
|
||||
- Public legal/license text published by the relevant project owners.
|
||||
|
||||
## Current Safe First Step
|
||||
|
||||
The safest near-term compatibility work is implementing Decal-shaped lifecycle and callback seams inside RynthCore, starting with events such as `OnLoginComplete`, chat events, target changes, and trade events, without inspecting or copying Decal or VTank implementation details.
|
||||
|
||||
## References
|
||||
|
||||
- Decal project page: <https://sourceforge.net/projects/decaldev/>
|
||||
- Decal templates: <https://www.decaldev.com/templates>
|
||||
- Virindi Tank license agreement: <https://virindi.net/wiki/index.php/Virindi_Tank_license_agreement>
|
||||
- 17 U.S.C. 1201: <https://uscode.house.gov/view.xhtml?req=%28title:17%20section:1201%20edition:prelim%29>
|
||||
51
docs/PLUGIN_HOOK_MATRIX.md
Normal file
51
docs/PLUGIN_HOOK_MATRIX.md
Normal file
|
|
@ -0,0 +1,51 @@
|
|||
# Plugin Hook Matrix
|
||||
|
||||
This matrix tracks clean-room hook targets that can be implemented from the AC client decompile without inspecting third-party plugin binaries.
|
||||
|
||||
Use [ACCLIENT_HOOK_INVENTORY.md](./ACCLIENT_HOOK_INVENTORY.md) as the source of truth for hook planning against the user's real `acclient.exe`. The decompile is for semantics; the live binary is for final hook placement.
|
||||
|
||||
## Lifecycle And Callback Surface
|
||||
|
||||
| Surface | Source seam | Status | Notes |
|
||||
| --- | --- | --- | --- |
|
||||
| `OnLoginComplete` | `CPlayerSystem::SendLoginCompleteNotification` and `CM_Character::Event_LoginCompleteNotification` | In progress | Best first lifecycle event for plugin startup. |
|
||||
| `OnChatWindowText` | `ClientSystem.cpp` | Confirmed | Incoming chat interception with eat/suppress behavior. |
|
||||
| `OnChatBarEnter` | `ClientCommunicationSystem.cpp` | Confirmed | Outgoing chat interception before normal handling. |
|
||||
| `OnDeleteObject` | `ACCObjectMaint.cpp` | Confirmed | Clean object lifecycle seam. |
|
||||
| `OnSelectedTargetChange` | `ACCWeenieObject.cpp` | Confirmed | Target-change callback path exists. |
|
||||
| `OnCombatModeChange` | `ClientCombatSystem.cpp` | Confirmed | Combat mode callback exists. |
|
||||
| Trade window callbacks | `ClientTradeSystem.cpp` and `ClientCommunicationSystem.cpp` | Confirmed | Open/add/accept/decline/close/clear/completed all have clear fire sites. |
|
||||
| `OnUIInitialized` | `ClientUISystem::OnStartup` and `APIManager::SetUIReady(1)` | Investigating | Interface exists; fire site not yet confirmed. |
|
||||
| Busy count callbacks | `ClientUISystem.cpp` | Investigating | Interface exists; direct plugin callback bridge still needs a clean fire site. |
|
||||
|
||||
## Public Host API Surface
|
||||
|
||||
| API | Source seam | Status | Notes |
|
||||
| --- | --- | --- | --- |
|
||||
| `WriteToChat` | `APIManager__IAsheronsCallImpl.cpp` | Confirmed | Good candidate for early compatibility exposure. |
|
||||
| Selection get/set | `APIManager__IAsheronsCallImpl.cpp` | Confirmed | Useful for plugin wrappers. |
|
||||
| `UseObject` / `UseObjectOn` / `UseEquippedItem` | `APIManager__IAsheronsCallImpl.cpp` | Confirmed | Interaction helpers are implemented. |
|
||||
| `MoveItemExternal` / `MoveItemInternal` | `APIManager__IAsheronsCallImpl.cpp` | Confirmed | Inventory movement path is present. |
|
||||
| `IsStandingStill` / `StopCompletely` / `TurnToHeading` / `SetAutoRun` | `APIManager__IAsheronsCallImpl.cpp` | Confirmed | Useful movement helpers. |
|
||||
| `GetCurCoords` / `GetPlayerID` / `GetGroundContainerID` | `APIManager__IAsheronsCallImpl.cpp` | Confirmed | Straightforward compatibility candidates. |
|
||||
| `GetScreenDimensions` / `ItemIsKnown` / `GetItemName` | `APIManager__IAsheronsCallImpl.cpp` | Confirmed | Low-risk helpers. |
|
||||
| `IssueChatBarCommand` | `APIManager__IAsheronsCallImpl.cpp` | Stub-like | Do not rely on this yet. |
|
||||
| `GetCombatMode` / `GetBusyCount` / salvage panel APIs | `APIManager__IAsheronsCallImpl_vtbl.cpp` | Unconfirmed | Declared in vtable, implementation not yet verified in the split. |
|
||||
|
||||
## Lower-Level Hook Seams
|
||||
|
||||
| Seam | Source file | Status | Notes |
|
||||
| --- | --- | --- | --- |
|
||||
| `ACSmartBox::DispatchSmartBoxEvent` | `ACSmartBox.cpp` | Confirmed | Strong world/object/network event seam. |
|
||||
| `ACCObjectMaint` object lifecycle | `ACCObjectMaint.cpp` | Confirmed | Create/delete/inventory/content updates. |
|
||||
| `ClientAdminSystem` plugin queries | `ClientAdminSystem.cpp` | Confirmed | Useful for future clean-room admin/plugin info compatibility. |
|
||||
| `ClientUISystem::OnStartup` | `ClientUISystem.cpp` | Confirmed | Good host readiness seam. |
|
||||
| `CM_*` and `ECM_*` notice buses | multiple client systems | Confirmed | Good source for higher-level compatibility events. |
|
||||
|
||||
## Implementation Order
|
||||
|
||||
1. Add clean-room lifecycle callbacks beginning with `OnLoginComplete`.
|
||||
2. Expose the confirmed `IAsheronsCall` subset through RynthCore-native APIs.
|
||||
3. Bridge world/object events from `ACSmartBox` and `ACCObjectMaint`.
|
||||
4. Layer in chat, trade, target, and combat callbacks.
|
||||
5. Revisit optional binary compatibility only if it stays within the guardrails in `docs/LEGAL_COMPATIBILITY.md`.
|
||||
Loading…
Reference in a new issue