Skip to content

Lua character data fields

ezdiy edited this page Oct 3, 2017 · 5 revisions

Character data fields accessible from lua.

The data fields are visible via m_charData subfield retrieved via GetCharacter(seatnumber) or acquired in the course of on. event.

Most values are byte (0-255). if named like bSomething, hasSomething isSomething, it's typically a bool (use byte values 0 and 1, not lua bools). Colors are integer numbers with rgba value. Arrays are indexed from 0, and accessed as function call :arrayname(index), not with [], for example:

(0 uniform, 1 sports...)

GetCharacter(10).m_charData:m_clothes(1).slot = 5

Changes sports uniform slot to 5 of character in seat 10.

In some cases we need to change an array item value instead of retrieving it - to do that, give second argument with new value to the indexing function:

(0 - front, 1 - side ...)

print("old hair is " % GetCharacter(10).m_charData.m_hair:hairs(0))
GetCharacter(10).m_charData.m_hair:hairs(0, 5)

Prints the old slot, then sets front hair slot to 5.

Exposed m_charData subfields

intelligence
intelligenceClassRank
intelligenceValue
strength
strengthClassRank
strengthValue
clubClassRanking
clubValue
sociability
fightingStyle
virtue
orientation
h_experience
a_h_experience
m_figure
 height
 figure
 headSize
 headLength
 waist
m_chest
 size
 aerolaSize
 shape
 roundness
 direction
 height
 spacing
 depth
 softness
m_bodyColor
 skinColor
 pubShape
 pubOpacity
 pubicColor
 nipType
 nipColor
 nipOpacity
 tan
 tanOpacity
 mosaic
m_eyes
 width
 height
 position
 spacing
 angle
 iris
  shape
  width
  height
  position
 textureSlot
 hightlightSlot
 bExtTextureUsed
 bExtHighlightUsed
 texture (string)
 highlight (string)
 leftColor
 rightColor
m_eyebrows
 color
 shapeSlot
 angle
 bMole1
 bMole2
 bMole3
 bMole4
m_facedetails
 eyelidSlot
 upperEyelidSlot
 lowerEyelidSlot
 glassesSlot
 lipColorSlot
 lipOpacity
 glassesColor
m_hair
 hairs[4] (front,side,back,ext)
 hairAdjustment[4] (front,side,back,ext)
 frontHairFlip[4] (front,side,back,ext)
 hairColor
m_clothes[4] (uniform,sports,swim,club)
 slot
 skirtLength
 socks
 indoorShoes
 outdoorShoes
 isOnePiece
 hasUnderwear
 hasSkirt
 unknown13
 colorTop1
 colorTop2
 colorTop3
 colorTop4
 colorBottom1
 colorBottom2
 colorUnderwear
 colorSocks
 colorIndoorShoes
 colorOutdoorShoes
 textureBottom1
 textureUnderwear
 textureBottom1Hue
 textureBottom1Lightness
 shadowBottom1Hue
 shadowBottom1Lightness
 textureUnderwearHue
 textureUnderwearLightness
 shadowUnderwearHue
 shadowUnderwearLightness

Clone this wiki locally