Plugin API v94: renumber the web panel after upstream's v93
Upstream release 2026.11.8.1 took v93 for GetMonsterHealth. The web panel's four slots now follow GetMonsterHealthFn in the engine table and the SDK's RynthCoreApiNative, and the web panel is v94: PluginContractVersion.Current, RynthCoreSdkApiVersion, HasWebPanel (Version >= 94), the comments, docs/WEB_PANEL.md, the changelog and PluginManifestTests (HasWebPanel version cases, slot names). Still provisional: unmerged upstream branches also use 94. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
6edc196270
commit
2225b90b2c
16 changed files with 72 additions and 70 deletions
|
|
@ -1,12 +1,12 @@
|
|||
# In-game web panel (plugin API v93)
|
||||
# In-game web panel (plugin API v94)
|
||||
|
||||
A plugin can show a web page in a panel over the Asheron's Call window. The page runs in WebView2.
|
||||
The engine owns the window, the navigation allowlist, focus and the lifetime; the plugin passes a URL,
|
||||
an allowlist and a profile key, then polls for state. This file is the contract plugin authors build against.
|
||||
|
||||
The API number 93 is provisional: upstream may take 93 first, in which case it renumbers on merge
|
||||
(`PluginContractVersion.cs`). Write `HasWebPanel` checks, not `Version >= 93` checks. That keeps a plugin working
|
||||
across a renumber only for shared-SDK release builds. A NativeAOT plugin build compiles the `Version >= 93` test
|
||||
The API number 94 is provisional: unmerged upstream branches also use 94, and whichever merges second
|
||||
renumbers (`PluginContractVersion.cs`). Write `HasWebPanel` checks, not `Version >= 94` checks. That keeps a plugin working
|
||||
across a renumber only for shared-SDK release builds. A NativeAOT plugin build compiles the `Version >= 94` test
|
||||
in, so a plugin built against the provisional SDK must not be distributed, and must be rebuilt after a renumber.
|
||||
|
||||
## Calls
|
||||
|
|
@ -17,7 +17,7 @@ to call from any thread (AC's main thread, the plugin pump, an ImGui draw). Neve
|
|||
|
||||
| Call | Does |
|
||||
|---|---|
|
||||
| `bool HasWebPanel` | True only on an engine at API 93 or newer that fills all four function slots. Check it before any other call. |
|
||||
| `bool HasWebPanel` | True only on an engine at API 94 or newer that fills all four function slots. Check it before any other call. |
|
||||
| `int OpenWebPanel(WebPanelOptions)` | Opens the panel, or replaces the open one. Returns a handle > 0, or a negative `WebPanelResult`. |
|
||||
| `int NavigateWebPanel(int handle, string url)` | Points the open panel at a URL. `1` queued. |
|
||||
| `int CloseWebPanel(int handle)` | Closes the panel. `1` queued, `0` already closed. |
|
||||
|
|
@ -198,7 +198,7 @@ the plugin to keep working on a core without the web panel, with ShellExecute as
|
|||
|
||||
1. **Declare `RynthPluginMinEngineApi` at the plugin's true minimum.** In release builds
|
||||
(`-p:RynthPluginSharedSdk=true`, as `Publish-Update.ps1` and `Build-Installer.ps1` pass), a declared minimum
|
||||
*below 88* is raised to the API of the SDK the plugin was built with (93 now), and the launcher then holds the
|
||||
*below 88* is raised to the API of the SDK the plugin was built with (94 now), and the launcher then holds the
|
||||
plugin back from older cores, which kills the fallback (`RynthCore.PluginSdk.targets`: `RynthCoreManagedPluginApi`
|
||||
is 88). There is no separate opt-out property: declaring a minimum of **88 or higher** is the opt-out, and a
|
||||
declared 88 or higher is used as it is. Declare the lowest API your plugin really needs at load, and make
|
||||
|
|
@ -249,7 +249,7 @@ Poll the state from a second helper written the same way (`GetWebPanelState` and
|
|||
`RynthCoreAPI` gains four function pointers at the end of the table, in this order, all `cdecl`:
|
||||
`int WebPanelOpen(WebPanelOpenNative*)`, `int WebPanelNavigate(int handle, byte* url)`,
|
||||
`int WebPanelClose(int handle)`, `int WebPanelGetState(int handle, WebPanelStateNative*)`.
|
||||
Test `Version >= 93` before reading them: an older engine's table is shorter.
|
||||
Test `Version >= 94` before reading them: an older engine's table is shorter.
|
||||
|
||||
`WebPanelOpenNative` (pack 4, 48 bytes on x86): `uint Size`, `uint Flags`, `byte* Url`, `byte* Allowlist`
|
||||
(`\n`-separated), `byte* ProfileKey` (may be null), `byte* Title` (may be null), `int WidthPercent`, `int HeightPercent`,
|
||||
|
|
|
|||
Loading…
Reference in a new issue