OnPlayerItemStatsReport: Difference between revisions

From Wiki G1R-MP G1 Remake Multiplayer
Jump to navigation Jump to search
Document planned 0.1.9 item stats, armor, runes and experimental map-editor seats/lights; not a release
 
Release 0.1.9 / BUILD264 / Protocol42: availability and download setup; preserve experimental limits
 
Line 2: Line 2:
<div style="background:#fff5f5; border:1px solid #d13b3b; border-left:5px solid #d13b3b; color:#111111; padding:0.85rem 1rem; margin:0.75rem 0 1rem;">
<div style="background:#fff5f5; border:1px solid #d13b3b; border-left:5px solid #d13b3b; color:#111111; padding:0.85rem 1rem; margin:0.75rem 0 1rem;">
<div style="color:#111111; font-weight:bold; letter-spacing:0.04em;">AVAILABLE FROM UPDATE 0.1.9</div>
<div style="color:#111111; font-weight:bold; letter-spacing:0.04em;">AVAILABLE FROM UPDATE 0.1.9</div>
<div style="color:#111111; margin-top:0.25rem;">Planned for 0.1.9; not yet publicly released. Not included in public 0.1.8. See the scope and validation notes below.</div>
<div style="color:#111111; margin-top:0.25rem;">Available from 0.1.9. See the scope and validation notes below.</div>
</div>
</div>


Line 41: Line 41:


== Notes ==
== Notes ==
* Planned for G1R:MP 0.1.9; not yet publicly released and not included in public 0.1.8. This documents the implemented development API, not a release announcement. See [[Item type stats]] for scope and remaining in-game validation.
* Available from G1R:MP 0.1.9. This documents the implemented API and its current limits. See [[Item type stats]] for scope and remaining in-game validation.
* Register on root. Reports are batched/rate-limited; stale revisions and duplicate states can be ignored. Do not wait for exactly one callback per setter call.
* Register on root. Reports are batched/rate-limited; stale revisions and duplicate states can be ignored. Do not wait for exactly one callback per setter call.
* native-fields-applied: checked native fields were written. server-authoritative-only: no native definition write was needed.
* native-fields-applied: checked native fields were written. server-authoritative-only: no native definition write was needed.

Latest revision as of 13:28, 20 October 2026

onPlayerItemStatsReport

AVAILABLE FROM UPDATE 0.1.9
Available from 0.1.9. See the scope and validation notes below.

Reports a client's application status for an item profile revision. Diagnostic only; not gameplay or permission authority.

Availability

This event is available in server-side scripts.

Callback signature

function(playerId, item, revision, ok, reason)

Parameters

Name Type Description
playerId number Authenticated reporting connection's player ID.
item string Canonical item type key.
revision string Reported decimal revision; preserve as a string.
ok boolean Whether the client reported successful application/preflight.
reason string Machine-readable diagnostic reason; see below.

Examples

addEventHandler("onPlayerItemStatsReport", root,
    function(playerId, item, revision, ok, reason)
        outputDebugString("Item profile: " .. item .. " rev=" .. revision
            .. " player=" .. tostring(playerId) .. " ok=" .. tostring(ok)
            .. " reason=" .. reason)
    end)

Notes

  • Available from G1R:MP 0.1.9. This documents the implemented API and its current limits. See Item type stats for scope and remaining in-game validation.
  • Register on root. Reports are batched/rate-limited; stale revisions and duplicate states can be ignored. Do not wait for exactly one callback per setter call.
  • native-fields-applied: checked native fields were written. server-authoritative-only: no native definition write was needed.
  • native-rune-cost-ready: the local rune-cost adapter passed its read-only preflight. This does NOT mean that an actual paid/free spell cast succeeded.
  • item-definition-not-loaded, native-layout-unavailable and native-apply-failed indicate failure to apply the native part.
  • Never trust ok as proof of honest execution and never grant items, money, permissions or damage from it. Read the server profile and test actual gameplay.