Lua API — Types
Value Classes (Opaque IDs)
These are inline value wrappers that provide type-safety for numeric IDs.
| Class |
Value Type |
Description |
CombatAnalyzerQueryID |
Int |
|
CustomGameEventListenerID |
Int |
|
EntityIndex |
Int |
|
EventListenerID |
Int |
|
ParticleID |
Int |
|
PlayerID |
Int |
|
ProjectileID |
Int |
|
SpawnGroupHandle |
Int |
|
ViewerID |
Int |
|
Type Aliases
| Alias |
Target |
Description |
Quaternion |
Any |
There is no known way to create values of this type. |
Vector2D |
Any |
There is no known way to create values of this type. |
Data Types
LocalTime
CScriptHTTPResponse
ApplyDamageOptions
| Field |
Type |
Description |
victim |
BaseNPC |
|
attacker |
BaseNPC |
|
damage |
Float |
|
ability |
BaseAbility? |
|
CreateIllusionsModifierKeys
EntityBounds
CombatAnalyzerQueryResult
ExecuteOrderOptions
| Field |
Type |
Description |
startpos |
Vector |
|
endpos |
Vector |
|
ent |
CBaseEntity |
|
mins |
Any? |
|
maxs |
Any? |
|
TraceCollideableOutputs
| Field |
Type |
Description |
hit |
Boolean |
|
pos |
Vector |
|
normal |
Vector |
|
fraction |
Float |
|
| Field |
Type |
Description |
startpos |
Vector |
|
endpos |
Vector |
|
min |
Any |
|
max |
Any |
|
mask |
Any? |
|
ignore |
Any? |
|
TraceHullOutputs
| Field |
Type |
Description |
hit |
Boolean |
|
startsolid |
Boolean |
|
pos |
Vector |
|
normal |
Vector |
|
fraction |
Float |
|
enthit |
CBaseEntity? |
|
| Field |
Type |
Description |
startpos |
Vector |
|
endpos |
Vector |
|
mask |
Any? |
|
ignore |
Any? |
|
TraceLineOutputs
| Field |
Type |
Description |
hit |
Boolean |
|
startsolid |
Boolean |
|
pos |
Vector |
|
normal |
Vector |
|
fraction |
Float |
|
enthit |
CBaseEntity? |
|
CreateBaseProjectileOptions
| Field |
Type |
Description |
bProvidesVision |
Boolean? |
|
iVisionRadius |
UInt? |
|
iVisionTeamNumber |
DOTATeam? |
|
CreateLinearProjectileOptions
| Field |
Type |
Description |
vSpawnOrigin |
Vector? |
|
vVelocity |
Vector? |
|
vAcceleration |
Vector? |
|
fMaxSpeed |
Float? |
|
fDistance |
Float? |
|
fStartRadius |
Float? |
|
fEndRadius |
Float? |
|
fExpireTime |
Float? |
|
iUnitTargetTeam |
DotaUnitTargetTeam? |
|
iUnitTargetFlags |
DotaUnitTargetFlags? |
|
iUnitTargetType |
DotaUnitTargetType? |
|
bIgnoreSource |
Boolean? |
|
bHasFrontalCone |
Boolean? |
|
bDrawsOnMinimap |
Boolean? |
|
bVisibleToEnemies |
Boolean? |
|
AbilityTuningValueFilterEvent
BountyRunePickupFilterEvent
DamageFilterEvent
ExecuteOrderFilterEvent
HealingFilterEvent
ItemAddedToInventoryFilterEvent
ModifierGainedFilterEvent
ModifyExperienceFilterEvent
ModifyGoldFilterEvent
RuneSpawnFilterEvent
TrackingProjectileFilterEvent
ModifierAttackEvent
| Field |
Type |
Description |
attacker |
BaseNPC |
|
damage |
Float |
|
inflictor |
BaseAbility? |
|
target |
BaseNPC |
|
record |
Int |
|
ModifierInstanceEvent
| Field |
Type |
Description |
attacker |
BaseNPC |
|
damage |
Float |
|
inflictor |
BaseAbility? |
|
unit |
BaseNPC |
|
record |
Int |
|
ModifierUnitEvent
| Field |
Type |
Description |
unit |
BaseNPC |
|
ModifierAbilityEvent
| Field |
Type |
Description |
ability |
BaseAbility |
|
target |
BaseNPC? |
|
ModifierOverrideAbilitySpecialEvent
| Field |
Type |
Description |
ability |
BaseAbility |
|
ModifierAddedEvent
| Field |
Type |
Description |
unit |
BaseNPC |
|
ModifierHealEvent
| Field |
Type |
Description |
gain |
Int |
|
SpawnEntityFromTableOptions
| Field |
Type |
Description |
origin |
String? |
|
angles |
String? |
|
scales |
String? |
|
targetname |
String? |
|
vscripts |
String? |
|
CreateUnitFromTableOptions
| Field |
Type |
Description |
teamnumber |
DOTATeam? |
|
modelscale |
Int? |
|
rendercolor |
String? |
|
skin |
Int? |
|
CreateTrackingProjectileOptions
Hand-maintained replacement for the generated options: the API dump omits fields the engine actually consumes — Ability is REQUIRED for routing OnProjectileHit back to the ability, plus Source, bProvidesVision and iVisionTeamNumber (pocket2 KTOX-ISSUES #19).
| Field |
Type |
Description |
vSourceLoc |
Vector? = null |
|
Target |
BaseNPC? = null |
|
iMoveSpeed |
Int? = null |
|
flExpireTime |
Float? = null |
|
bDodgeable |
Boolean? = null |
|
bIsAttack |
Boolean? = null |
|
bReplaceExisting |
Boolean? = null |
|
bIgnoreObstructions |
Boolean? = null |
|
bSuppressTargetCheck |
Boolean? = null |
|
iSourceAttachment |
DOTAProjectileAttachment? = null |
|
bDrawsOnMinimap |
Boolean? = null |
|
bVisibleToEnemies |
Boolean? = null |
|
Ability |
BaseAbility? = null |
Routes OnProjectileHit / OnProjectileThink back to this ability — required in practice. |
Source |
BaseNPC? = null |
|
bProvidesVision |
Boolean? = null |
|
iVisionRadius |
Int? = null |
|
iVisionTeamNumber |
Int? = null |
|