SetPlayerMana: 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 36: Line 36:


<!-- upcoming019:start -->
<!-- upcoming019:start -->
== Mana-state correction (planned for 0.1.9) ==
== Mana-state correction (from 0.1.9) ==
The upcoming client clears a stale out-of-mana condition after a successful, verified positive mana assignment. This addresses casting remaining blocked despite the updated mana display, without requiring a game restart. Zero/insufficient mana still blocks ordinary paid casts; rune ownership, equipment, circle and other eligibility checks remain. This improves the existing mana setter; it is not a new Lua function. Separate custom rune manaCost profiles are described in [[Item type stats]] and remain under in-game qualification. Public 0.1.8 does not include this correction.
The 0.1.9 client clears a stale out-of-mana condition after a successful, verified positive mana assignment. This addresses casting remaining blocked despite the updated mana display, without requiring a game restart. Zero/insufficient mana still blocks ordinary paid casts; rune ownership, equipment, circle and other eligibility checks remain. This improves the existing mana setter; it is not a new Lua function. Separate custom rune manaCost profiles are described in [[Item type stats]] and remain under in-game qualification.
<!-- upcoming019:end -->
<!-- upcoming019:end -->

Latest revision as of 13:29, 20 October 2026

setPlayerMana

Sets a player's authoritative current mana value.

Syntax

bool setPlayerMana(int playerId, number value)

Parameters

Name Type Required Description
playerId int yes The connected player to update.
value number yes The new current mana value.

Returns

Returns true when the value is accepted; otherwise returns false.

Examples

Set a player's current mana:

setPlayerMana(playerId, 50)

Notes

  • Available only in server-side resource scripts.
  • This is a convenience wrapper around setPlayerStat(playerId, "mana", value).

Mana-state correction (from 0.1.9)

The 0.1.9 client clears a stale out-of-mana condition after a successful, verified positive mana assignment. This addresses casting remaining blocked despite the updated mana display, without requiring a game restart. Zero/insufficient mana still blocks ordinary paid casts; rune ownership, equipment, circle and other eligibility checks remain. This improves the existing mana setter; it is not a new Lua function. Separate custom rune manaCost profiles are described in Item type stats and remain under in-game qualification.