sc_actor_stats_write_v1.set
Move one named stat of your own player to value: read the current value and adjust by the difference, so the game’s clamping and consequences still apply. *out_after (may be NULL) is the stat read back right after the write.
Signature
Section titled “Signature”sco_result (*)(sco_plugin *, uint64_t, uint32_t, float, float *)Service and availability
Section titled “Service and availability”| Property | Value |
|---|---|
| Symbol | sc_actor_stats_write_v1.set |
| Record ID | sc-actor-stats-write-v1-set |
| Service | game.actor_stats_write |
| Table | sc_actor_stats_write_v1 |
| Version macro | SC_ACTOR_STATS_WRITE_VERSION_1_0 |
| Packed table version | 65536 |
| Since / availability | size >= 24; 1.0 |
| Complete member extent (x64 bytes) | 24 |
| Table size (x64 bytes) | 32 |
Parameters and buffers
Section titled “Parameters and buffers”sco_result (*set)(sco_plugin* self, uint64_t id, uint32_t stat, float value, float* out_after);
Move one named stat of your own player to value: read the current value and adjust by the difference, so the game’s clamping and consequences still apply. *out_after (may be NULL) is the stat read back right after the write.
Results and failures
Section titled “Results and failures”OK applied and read back; BAD_ARG null or released self, id 0 or not your player, stat not a 1.0 stat, a non-finite input or a step past SC_ACTOR_STATS_WRITE_MAX_STEP; NOT_FOUND not spawned or no record of that stat; UNAVAILABLE game.actor_stats.write off, no fresh offline admission, or mode DISCARDED (the game would ignore the change); FAILED game fault or no read-back; WRONG_THREAD off the game thread.
Absent capability
Section titled “Absent capability”Table absent: query_service NOT_FOUND. game.actor_stats.write is OFF by default (product switch or SCO_ACTOR_STATS_WRITE=1, plus its rows and game.actor_stats.read); while it is off, or (adjust, set) the session is not certified offline, the answer is UNAVAILABLE.
Ownership
Section titled “Ownership”Copied scalar inputs; one float or uint32 copied out when the out pointer is set; no allocation, no engine pointer transfer, nothing retained. No lease: a write is a one-shot game adjust.
Thread affinity
Section titled “Thread affinity”Game thread only; WRONG_THREAD elsewhere before any game access.
Callback context
Section titled “Callback context”No plugin callback.
Reentrancy
Section titled “Reentrancy”Calls the game’s own stat-adjust function at most once under a fault guard; no plugin re-entry.
Cleanup and cancellation
Section titled “Cleanup and cancellation”Nothing is restored on unload: the stats are gameplay state the game changes every tick. game.actors’ stop withdraws the table and clears the capability.
Language mappings
Section titled “Language mappings”Status labels are copied verbatim from the catalogue: direct is native access; typed-wrapper is wrapper-backed; restricted is a subset/adaptation; unsupported means no supported route is established. No status implies universal safety.
| Language | Catalogue status | Source evidence / wrapper tokens |
|---|---|---|
| c | direct | include/sc_actor_stats_write.h(*set) |
| cpp | direct | include/sc_actor_stats_write.h(*set) |
| csharp | unsupported | docs/game/actor-stats.mdThe C# and Lua game.actor_stats routes are unsupported in 1.0, for reads and writes. |
| lua | unsupported | docs/game/actor-stats.mdThe C# and Lua game.actor_stats routes are unsupported in 1.0, for reads and writes. |
Examples
Section titled “Examples”None identified in the catalogue; this is not proof none can exist.
ABI pins prove layout, not semantic behavior or a live game session.