OnPlayerItemStatsReport

From Wiki G1R-MP G1 Remake Multiplayer
Revision as of 20:11, 18 October 2026 by QCherry (talk | contribs) (Document planned 0.1.9 item stats, armor, runes and experimental map-editor seats/lights; not a release)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

onPlayerItemStatsReport

AVAILABLE FROM UPDATE 0.1.9
Planned for 0.1.9; not yet publicly released. Not included in public 0.1.8. 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

  • 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.
  • 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.