ResetItemStats: 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 33: Line 33:


== 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.
* Server-side only. Profiles affect every copy of the same type on this server, across dimensions; not individual item instances.
* Server-side only. Profiles affect every copy of the same type on this server, across dimensions; not individual item instances.
* Use matching supported client and server builds. Server acceptance and a client application report do not prove the native gameplay effect.
* Use matching supported client and server builds. Server acceptance and a client application report do not prove the native gameplay effect.

Latest revision as of 13:29, 20 October 2026

resetItemStats

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

Removes one property override or all overrides of one item type owned by this resource.

Syntax

accepted, error, revision = resetItemStats(item [, property])

Parameters

Name Type Required Description
item string yes Known canonical item key or recognized alias; this is not an inventory-instance ID.
property string no Exact property name to reset. Omit to reset the whole type.

Returns

Three values: accepted (boolean), error (string; empty on success), revision (decimal string). Check accepted before using the revision. Success means server acceptance, not visual/client completion. A no-op may return the unchanged revision.

Examples

local ok, why = resetItemStats("mercenary", "resistanceEdge")
assert(ok, why)
-- To reset every override of this armor instead:
-- local ok, why = resetItemStats("mercenary")

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.
  • Server-side only. Profiles affect every copy of the same type on this server, across dimensions; not individual item instances.
  • Use matching supported client and server builds. Server acceptance and a client application report do not prove the native gameplay effect.
  • Active overrides are owned per item type by the calling resource. Another resource cannot change that owned type. Resource stop removes its overrides.
  • Validation is atomic for the submitted transaction. Unsupported fields, wrong families, invalid/non-finite values, duplicate item/property aliases or ownership conflicts reject it.
  • A numeric 0 is an explicit value where allowed, not reset. Use resetItemStats to remove an override. Profiles are not automatically persisted.
  • Do not expose this setter directly to untrusted remote events. See getItemStatDefinitions and Item stat properties.
  • Restores the multiplayer baseline for server-controlled values and the captured originals for applicable native edits. It does not heal, revive or erase equipment.