XML Expression
Overview
IMPORTANT
Status: Supported
Minimum Version: 1.0
XML Expression - is a system of simple script code for UI elements. Currently supports:
- Updating progress bar values (
CUIProgressBar). - Setting text in hints (
UIHintWindow). - Setting text in
CUIStatic. - Setting text in
CUIButton.
Data Types
floatintu32(unsigned int)u16(unsigned short)string(shared_str)bool
Functions
Math
Constants
flt - float; int - int; str - string
lua
fltActorOutfitBurnProtection
fltActorOutfitShockProtection
fltActorOutfitChemicalBurnProtection
fltActorOutfitRadiationProtection
fltActorOutfitTelepaticProtection
fltActorOutfitWoundProtection
fltActorOutfitFireWoundProtection
fltActorOutfitStrikeProtection
fltActorOutfitExplosionProtection
fltActorOutfitMaxFireWoundProtection
fltActorHelmetBurnProtection
fltActorHelmetShockProtection
fltActorHelmetChemicalBurnProtection
fltActorHelmetRadiationProtection
fltActorHelmetTelepaticProtection
fltActorHelmetWoundProtection
fltActorHelmetFireWoundProtection
fltActorHelmetStrikeProtection
fltActorHelmetExplosionProtection
fltActorBoostRadiationProtection
fltActorBoostTelepaticProtection
fltActorBoostChemicalBurnProtection
fltArtefactsBurnProtection
fltArtefactsShockProtection
fltArtefactsChemicalBurnProtection
fltArtefactsRadiationProtection
fltArtefactsTelepaticProtection
fltArtefactsWoundProtection
fltArtefactsFireWoundProtection
fltArtefactsStrikeProtection
fltArtefactsExplosionProtection
fltZoneMaxPowerBurnProtection
fltZoneMaxPowerShockProtection
fltZoneMaxPowerChemicalBurnProtection
fltZoneMaxPowerRadiationProtection
fltZoneMaxPowerTelepaticProtection
fltZoneMaxPowerWoundProtection
fltZoneMaxPowerFireWoundProtection
fltZoneMaxPowerStrikeProtection
fltZoneMaxPowerExplosionProtection
fltPlayerHealth
fltPlayerRad
fltPlayerPsy
fltPlayerPower
fltPlayerSatiety
fltPlayerRestoreSpeed
fltPlayerBleedingSpeed
intPDAActiveContacts
strPlayerNameExample
Output text about current actor health
xml
<a_health_text x="143" y="680" width="20" height="66" stretch="1" expression="floor(fltPlayerHealth * 100.0)">
<text x="0" y="20" align="r" vert_align="t" font="graffiti32"/>
</a_health_text>expression="floor(fltPlayerHealth * 100.0)"
fltPlayerHealthstores a value from 0 to 1, so multiply by 100- The result has a fractional part, so we convert the result to a larger integer by calling
floor