User Tools

Site Tools


Sidebar

Current version: 0.8.4
iOS: 0.8.1+
Android: 0.8.4 (Play/Market version is obsolete!)

Github Coding has become social! Fork us!


News

Latest commit

https://github.com/gemrb/gemrb/commits/master

# ideally, but does not work on sourceforge (does elsewhere); even http proxies don't help rss>https://github.com/gemrb/gemrb/commits/master.atom 1 author 30m sidebar for frequently accessed stuff

guiscript:setplayerstat

SetPlayerStat

Prototype: GemRB.SetPlayerStat (globalID, ID, Value[, PCF])

Description: Sets a player character's base stat. The stats are listed in ie_stats.py.

Parameters:

  • globalID - party ID or global ID of the actor to use
  • ID - Stat index
  • Value - New stat value
  • PCF - Set to 0 if you don't want the stat's post-change function to be ran

Return value: N/A

Example: PickedColor = ColorTable.GetValue (ColorIndex, GemRB.GetVar('Selected'))

GemRB.SetPlayerStat (pc, IE_MAJOR_COLOR, PickedColor)

The above example sets the player's color just picked via the color customisation dialog. ColorTable holds the available colors.

See also: GetPlayerStat, SetPlayerName, ApplyEffect

Function index

guiscript/setplayerstat.txt · Last modified: 2015/09/05 11:15 (external edit)