vpx - ryzom/ryzomcore GitHub Wiki


title: VPX description: Set the visual properties of NPC bots published: true date: 2026-03-14T00:00:00.000Z tags: editor: markdown dateCreated: 2023-03-16T22:31:20.048Z

vpx

The vpx native AI script function sets the VisualPropertyA, VisualPropertyB, or VisualPropertyC bitfield value for all bots in the group. These 64-bit properties control the visual appearance of NPC bots, including equipment models, colors, and character customization.

When vpx is used, the bot switches from using its creature sheet's default appearance (SAltLookProp) to using the VPA/VPB/VPC visual properties directly, which is the same system used for player characters.

Syntax

()vpx(input: s)

Arguments

  • input (string): The keyword VPA, VPB, or VPC (case-insensitive) followed by a space and a 64-bit hexadecimal value prefixed with 0x.

Visual Property Bitfields

SPropVisualA (VPA) - Equipment models and weapon

Field Bits Description
Sex 1 0 = male, 1 = female
JacketModel 8 Torso armor model index
JacketColor 3 Torso armor color
TrouserModel 8 Leg armor model index
TrouserColor 3 Leg armor color
WeaponRightHand 10 Right hand weapon model index
WeaponLeftHand 8 Left hand weapon/shield model index
ArmModel 8 Arm armor model index
ArmColor 3 Arm armor color
HatModel 9 Head gear model index
HatColor 3 Head gear color

SPropVisualB (VPB) - Gloves, boots, trails

Field Bits Description
Name 16 Name string ID
HandsModel 9 Gloves model index
HandsColor 3 Gloves color
FeetModel 9 Boots model index
FeetColor 3 Boots color
RTrail 4 Right hand trail effect
LTrail 3 Left hand trail effect

SPropVisualC (VPC) - Character customization

Field Bits Description
MorphTarget1-8 3 each Face morph targets
EyesColor 3 Eye color index
Tattoo 7 Tattoo index
CharacterHeight 4 Height scale
TorsoWidth 4 Torso width scale
ArmsWidth 4 Arms width scale
LegsWidth 4 Legs width scale
BreastSize 4 Breast size (female characters)

Examples

// Set VPA to give the NPC specific equipment
()vpx("VPA 0x0000000000000001");

// Set VPB
()vpx("VPB 0x00000000000F0301");

// Set VPC for character customization
()vpx("VPC 0x0000000000000000");

Notes

  • Setting any visual property switches the bot to use direct visual properties instead of the creature sheet's default appearance (_useVisualProperties = true).
  • If the bot has not been spawned yet, the values are stored and applied when it spawns via sendVisualProperties().
  • Each call applies to all bots in the group.
  • To construct hex values, you need to pack the individual field values into the correct bit positions according to the bitfield structures defined in player_visual_properties.h.

See also

Source: ryzom/server/src/ai_service/nf_grp_npc.cpp (vpx_s_), ryzom/server/src/ai_service/ai_bot_npc.cpp (setVisualProperties, sendVisualProperties), ryzom/common/src/game_share/player_visual_properties.h (SPropVisualA/B/C)

⚠️ **GitHub.com Fallback** ⚠️