# Avorion Script API Documentation

Home Functions Search
Search:

AIState
AlliancePrivilege
BeamShape
BlockShading
BlockStructure
BlockType
BlockType2
BoxType
BuildError
CaptainGenderId
ChatChannel
ChatMessageType
ComponentType
ControlAction
ControlActionBit
ControlStyle
CoolingType
CraftStatsOverviewStat
CrewProfessionType
CrewRank
DamageSource
DamageType
DeletionType
Difficulty
EntityArrivalType
EntityType
FighterOrders
FighterStartError
FighterType
FontType
ImpactParticles
InventoryItemType
JumpError
KeyboardKey
ListBoxEntryType
MalusReason
MaterialType
MoonType
MouseButton
PlanTypeFilter
PlanetType
PlayerStateType
ProjectileShape
RarityType
RelationStatus
SavedDesignType
ScenarioType
SectorChangeType
ShipAvailability
SoundType
StatsBonuses
TargetIndicatorVisuals
TransformationFeature
TurretAutoFireMode
TurretSlotType
WeaponAppearance
WeaponCategory

enum AIState
None
Idle
Escort
Aggressive
Passive
Guard
Jump
Fly
LinearFly
Attack
Follow
Harvest
Boarding
PassiveTurning
RepairTarget
Repair
enum AlliancePrivilege
Invite
Kick
Promote
Demote
EditRanks
EditMap
AddItems
SpendItems
TakeItems
AddResources
SpendResources
TakeResources
FoundShips
FoundStations
ManageStations
ManageShips
FlyCrafts
ModifyCrafts
ModifyEmblem
ModifyMessageOfTheDay
NegotiateRelations
enum BeamShape
None
Straight
Lightning
Swirly
enum BlockShading
WindowedHull
Hull
HullA
HullB
Engine
Stone
RiftStone
Housing
Cargo
Thruster
Armor
ArmorA
ShieldGen
Generator
EnergyContainer
IntegrityGenerator
ComputerCore
SolarPanel
Hangar
Emissive
Glass
Reflector
Framework
Dock
Hologram
WormHole
RichStone
RichRiftStone
TurretLocker
Gyro
InertiaDampener
BlackBox
Translucent
Assembly
CloningPods
ShipName
Emblem
Wreckage
TorpedoLauncher
TorpedoStorage
TurretBase
ArmoredTurretBase
Academy
SuperRichStone
SuperRichRiftStone
VividHull
WhiteStripeHull
WhiteInvStripeHull
WhiteLocalStripeHull
DarkStripeHull
DarkInvStripeHull
DarkLocalStripeHull
Scaffold
GlowStone
enum BlockStructure
Metal
Stone
Holographic
RiftStone
enum BlockType
Hull
BlankHull
EdgeHull
CornerHull
OuterCornerHull
InnerCornerHull
TwistedCorner1
TwistedCorner2
FlatCornerHull
Engine
Thruster
CargoBay
Quarters
QuartersEdge
QuartersCorner
QuartersInnerCorner
QuartersOuterCorner
QuartersTwistedCorner1
QuartersTwistedCorner2
QuartersFlatCorner
Dock
Stone
StoneEdge
StoneCorner
StoneOuterCorner
StoneInnerCorner
StoneTwistedCorner1
StoneTwistedCorner2
StoneFlatCorner
Glass
GlassEdge
GlassCorner
GlassOuterCorner
GlassInnerCorner
GlassTwistedCorner1
GlassTwistedCorner2
GlassFlatCorner
Reflector
ReflectorEdge
ReflectorCorner
ReflectorOuterCorner
ReflectorInnerCorner
ReflectorTwistedCorner1
ReflectorTwistedCorner2
ReflectorFlatCorner
Framework
ShieldGenerator
Generator
Armor
EdgeArmor
CornerArmor
OuterCornerArmor
InnerCornerArmor
TwistedCorner1Armor
TwistedCorner2Armor
FlatCornerArmor
ComputerCore
SolarPanel
Light
ColoredLight
FlashingLight1000_1000
FlashingLight500_1500
FlashingLight1000_3000
EnergyContainer
Hangar
Glow
GlowEdge
GlowCorner
GlowInnerCorner
GlowOuterCorner
GlowTwistedCorner1
GlowTwistedCorner2
GlowFlatCorner
Holo
HoloEdge
HoloCorner
HoloInnerCorner
HoloOuterCorner
HoloTwistedCorner1
HoloTwistedCorner2
HoloFlatCorner
RichStone
RichStoneEdge
RichStoneCorner
RichStoneInnerCorner
RichStoneOuterCorner
RichStoneTwistedCorner1
RichStoneTwistedCorner2
RichStoneFlatCorner
SuperRichStone
SuperRichStoneEdge
SuperRichStoneCorner
SuperRichStoneInnerCorner
SuperRichStoneOuterCorner
SuperRichStoneTwistedCorner1
SuperRichStoneTwistedCorner2
SuperRichStoneFlatCorner
RiftStone
RiftStoneEdge
RiftStoneCorner
RiftStoneOuterCorner
RiftStoneInnerCorner
RiftStoneTwistedCorner1
RiftStoneTwistedCorner2
RiftStoneFlatCorner
RichRiftStone
RichRiftStoneEdge
RichRiftStoneCorner
RichRiftStoneInnerCorner
RichRiftStoneOuterCorner
RichRiftStoneTwistedCorner1
RichRiftStoneTwistedCorner2
RichRiftStoneFlatCorner
SuperRichRiftStone
SuperRichRiftStoneEdge
SuperRichRiftStoneCorner
SuperRichRiftStoneInnerCorner
SuperRichRiftStoneOuterCorner
SuperRichRiftStoneTwistedCorner1
SuperRichRiftStoneTwistedCorner2
SuperRichRiftStoneFlatCorner
GlowStone
GlowStoneEdge
GlowStoneCorner
GlowStoneInnerCorner
GlowStoneOuterCorner
GlowStoneTwistedCorner1
GlowStoneTwistedCorner2
GlowStoneFlatCorner
Wreckage
WreckageEdge
WreckageCorner
WreckageInnerCorner
WreckageOuterCorner
WreckageTwistedCorner1
WreckageTwistedCorner2
WreckageFlatCorner
DumbHull
DumbBlankHull
DumbEdge
DumbCorner
DumbInnerCorner
DumbOuterCorner
DumbTwistedCorner1
DumbTwistedCorner2
DumbFlatCorner
Portal
TurretImmobilizer
TurretImmobilizerEdge
Assembly
TorpedoLauncher
FrontTorpedoLauncher
TorpedoStorage
TurretBase
EdgeTurretBase
ArmoredTurretBase
ArmoredEdgeTurretBase
BlackBox
DirectionalThruster
InertiaDampener
IntegrityGenerator
HyperspaceCore
Gyro
Transporter
Academy
CloningPod
ShipName
ShipNameEdge
Emblem
EmblemEdge
enum BlockType2
ArmorA
ArmorAEdge
ArmorACorner
ArmorAOuterCorner
ArmorAInnerCorner
ArmorATwistedCorner1
ArmorATwistedCorner2
ArmorAFlatCorner
VividHull
VividHullEdge
VividHullCorner
VividHullOuterCorner
VividHullInnerCorner
VividHullTwistedCorner1
VividHullTwistedCorner2
VividHullFlatCorner
ContrastedHullA
ContrastedHullAEdge
ContrastedHullACorner
ContrastedHullAOuterCorner
ContrastedHullAInnerCorner
ContrastedHullATwistedCorner1
ContrastedHullATwistedCorner2
ContrastedHullAFlatCorner
ContrastedHullB
ContrastedHullBEdge
ContrastedHullBCorner
ContrastedHullBOuterCorner
ContrastedHullBInnerCorner
ContrastedHullBTwistedCorner1
ContrastedHullBTwistedCorner2
ContrastedHullBFlatCorner
WhiteStripeHull
WhiteStripeHullEdge
WhiteStripeHullCorner
WhiteStripeHullOuterCorner
WhiteStripeHullInnerCorner
WhiteStripeHullTwistedCorner1
WhiteStripeHullTwistedCorner2
WhiteStripeHullFlatCorner
WhiteInvStripeHull
WhiteInvStripeHullEdge
WhiteInvStripeHullCorner
WhiteInvStripeHullOuterCorner
WhiteInvStripeHullInnerCorner
WhiteInvStripeHullTwistedCorner1
WhiteInvStripeHullTwistedCorner2
WhiteInvStripeHullFlatCorner
WhiteLocalStripeHull
WhiteLocalStripeHullEdge
WhiteLocalStripeHullCorner
WhiteLocalStripeHullOuterCorner
WhiteLocalStripeHullInnerCorner
WhiteLocalStripeHullTwistedCorner1
WhiteLocalStripeHullTwistedCorner2
WhiteLocalStripeHullFlatCorner
DarkStripeHull
DarkStripeHullEdge
DarkStripeHullCorner
DarkStripeHullOuterCorner
DarkStripeHullInnerCorner
DarkStripeHullTwistedCorner1
DarkStripeHullTwistedCorner2
DarkStripeHullFlatCorner
DarkInvStripeHull
DarkInvStripeHullEdge
DarkInvStripeHullCorner
DarkInvStripeHullOuterCorner
DarkInvStripeHullInnerCorner
DarkInvStripeHullTwistedCorner1
DarkInvStripeHullTwistedCorner2
DarkInvStripeHullFlatCorner
DarkLocalStripeHull
DarkLocalStripeHullEdge
DarkLocalStripeHullCorner
DarkLocalStripeHullOuterCorner
DarkLocalStripeHullInnerCorner
DarkLocalStripeHullTwistedCorner1
DarkLocalStripeHullTwistedCorner2
DarkLocalStripeHullFlatCorner
Scaffold
ScaffoldEdge
ScaffoldCorner
ScaffoldOuterCorner
ScaffoldInnerCorner
ScaffoldTwistedCorner1
ScaffoldTwistedCorner2
ScaffoldFlatCorner
enum BoxType
Default
OrientedBox
Edge
Corner
InnerCorner
TwistedCorner1
TwistedCorner2
enum BuildError
BuildingOk
EnemiesNearby
UnderAttack
RecentlyDamaged
enum CaptainGenderId
Male
Female
enum ChatChannel
All
Sector
Group
Alliance
Economy
enum ChatMessageType
Normal
Information
Error
Warning
Whisp
ServerInfo
Chatter
Economy
enum ComponentType

This enum represents all types of components that can be added to an entity. Some of these components are only available on the client, i.e. effects for explosions. Typical server components are components that manage game-related data that doesn't have to be synchronized between client and server, i.e. contribution to damage or database management.

Position
Plan
Asleep
BoundingSphere
BoundingBox
Velocity
Physics
Owner
Scripts
ScriptCallback
EntityType
Children
Intersection
BspTree
StructuralIntegrity
SimpleScriptValues
TurretBases
Transporter
CargoBay
Name
Crew
Durability
PlanMaxDurability
Title
Turrets
ControlUnit
ShipSystem
DockingPositions
DirectFlightPhysics
Mothership
ShipAI
Hangar
FighterAI
TorpedoAI
Torpedo
FighterController
StatsBonuses
InteractionText
TurretAI
TurretController
Rotator
DamageMultiplier
FighterDodge
ShotIntersection
TorpedoLauncher
EnergySystem
Shield
LifeSupport
Engine
Thrusters
HyperspaceEngine
Radar
Scanners
Gyros
FlightAssist
MineableMaterial
LootPhysics
CargoLoot
MoneyLoot
ResourceLoot
TurretLoot
SystemUpgradeLoot
CrewLoot
InventoryItemLoot
Turret
LocalPositioner
Weapons
ParentEntity
RecoilApplyer
WormHole
DeletionTimer
LootAttractor
HitFeedbackSender
Boarding
DockingClamps
PlanMesh
TurretMesh
ShieldMesh
WeaponMesh
BlockExplosions
TurretExplosions
LootCollectionSound
Rotation
LootParticles
PlanSparks
WeaponSound
EngineSound
ScriptUI
Tooltip
Icon
FlickerLights
ClientNotifier
HangarDoorMesh
WeaponFireGlow
ShieldAmbientSound
PlacementSounds
ScannerData
ShadowMap
EffectNotifier
InstancingNotifier
AmbientLightCache
RemovedBlocksMesh
InertiaDampenerBrightness
TorpedoMeshBuilder
CustomMesh
CraftDecay
ShipInfoUpdater
FactionNotifier
WreckageCreator
MoneyDropper
ResourceDropper
TurretDropper
CargoDropper
DroneDeleter
LootCollector
EntityTransferrer
DamageContributors
UnhappyCrewNotifier
DestroyedItemReturner
SystemUpgradeDropper
CrewPayday
Loot
CrewBehaviour
DeathLocationMarker
CrewEjector
TorpedoImpact
PlayerNotifier
DockingParent
DummyComponent0
DummyComponent1
DummyComponent2
DummyComponent3
DummyComponent4
DummyComponent5
enum ControlAction
None
TurnUp
TurnDown
TurnRight
TurnLeft
StrafeUp
StrafeDown
StrafeLeft
StrafeRight
RollRight
RollLeft
Accelerate
Brake
ToggleVelocity
Fire1
Fire2
FireTorpedoes
SelectAllWeapons
SelectWeapons1
SelectWeapons2
SelectWeapons3
SelectWeapons4
SelectWeapons5
SelectWeapons6
SelectWeapons7
SelectWeapons8
SelectWeapons9
NextTarget
SelectTarget
NearestEnemy
NextAlly
ReleaseMouse
ShowServerInfo
FreeLook
MoveCamera
ResetCamera
CameraForward
CameraBackward
CameraLeft
CameraRight
ToggleFreeCamera
DisplaceCamera
ToggleSmoothCamera
JumpOrBoost
BuildingMode
TransferPlayer
PauseMenu
Interact
ShowMap
ShowPlayerMenu
ShowShipMenu
ShowChatWindow
ShowMailWindow
DebugScript
ToggleStrategyMode
PauseGame
AcceptHail
RejectHail
DockObject
UndockAll
RespawnToRepairDock
RespawnToReconstructionSite
StopAutoPilot
SwapControls
ShowScriptConsole
QuickAccess0
QuickAccess1
QuickAccess2
QuickAccess3
QuickAccess4
QuickAccess5
QuickAccess6
QuickAccess7
QuickAccess8
QuickAccess9
ScaleBlock
ScaleBlockLinear
ScaleBlockX
ScaleBlockY
ScaleBlockZ
RotateBlocks
DeleteBlock
ColorMode
ShowInventory
FocusBlock
MirrorX
MirrorY
MirrorZ
BlockMode
TurretMode
SavedDesigns
TurretDesignMode
MirrorPlaneX
MirrorPlaneY
MirrorPlaneZ
CancelScaling
ToggleEngines
ToggleFlightAssist
ToggleGyros
ToggleHyperspaceEngine
ToggleLifeSupport
ToggleShield
ToggleStructuralIntegrity
ToggleThrusters
SelectSquad1
SelectSquad2
SelectSquad3
SelectSquad4
SelectSquad5
SelectSquad6
SelectSquad7
SelectSquad8
SelectSquad9
SelectSquad10
SquadAttack
SquadDefend
SquadReturn
SquadCollect
SquadHarvest
SquadBoard
SquadRepair
AttackOrder
GuardOrder
PatrolOrder
AggressiveOrder
MineOrder
SalvageOrder
StopOrder
BoardingOrder
CenterCamera
MoveView
MoveViewLeft
MoveViewRight
MoveViewUp
MoveViewDown
MovePlaneUp
MovePlaneDown
ScriptQuickAccess1
ScriptQuickAccess2
ScriptQuickAccess3
ScriptQuickAccess4
ScriptQuickAccess5
ToggleFreePhotoCamera
TakePhoto
PhotoMode
CameraSpeedup
PhotoModeCameraForward
PhotoModeCameraBackward
PhotoModeCameraLeft
PhotoModeCameraRight
PhotoModeCameraUp
PhotoModeCameraDown
PhotoModeCameraRollLeft
PhotoModeCameraRollRight
enum ControlActionBit
Up
Down
Left
Right
RollLeft
RollRight
Fire1
Fire2
Boost
StrafeLeft
StrafeRight
StrafeUp
StrafeDown
Torpedoes
Drift
enum ControlStyle
MouseSteering
KeyboardSteering
enum CoolingType
Standard
EnergyPerShot
EnergyContinuous
BatteryCharge
enum CraftStatsOverviewStat
Hull
Shield
Mass
Volume
Size
SizeX
SizeY
SizeZ
Blocks
MainThrust
BrakeThrust
MaxVelocity
YawSpeed
PitchSpeed
RollSpeed
HyperspaceEnergy
HyperspaceCooldown
HyperspaceRange
RadarReach
SubsystemSockets
ProcessingPower
CargoHold
CurrentCrew
CrewCapacities
RequiredEnergy
ProducedEnergy
StorableEnergy
FirePower
OccupiedHangarSpace
HangarSpace
SmallFighters
MediumFighters
LargeFighters
ProductionCapacity
Productions
TorpedoSpace
DockingPositions
CloningCapacity
AcademyCapacity
Gunners
Miners
Engineers
Repairers
Pilots
GunnersRequired
MinersRequired
EngineersRequired
RepairersRequired
PilotsRequired
CrewCosts
FreeArbitraryTurretSlots
OccupiedArmedSlots
OccupiedUnarmedSlots
OccupiedPointDefenseSlots
ArmedTurretSlots
UnarmedTurretSlots
PointDefenseTurretSlots
ArbitraryTurretSlots
ArmedTurretsInArbitrarySlots
UnarmedTurretsInArbitrarySlots
PointDefenseTurretsInArbitrarySlots
enum CrewProfessionType
None
Engine
Gunner
Miner
Repair
Pilot
Security
Attacker
Number
enum CrewRank
None
Sergeant
Lieutenant
Colonel
enum DamageSource
Weaponry
Collision
Decay
Arbitrary
Torpedo
Invalid
enum DamageType
Physical
Energy
AntiMatter
Electric
Plasma
Fragments
None
enum DeletionType
Default
Jumped
Destroyed
enum Difficulty
Lowest
Beginner
Easy
Normal
Veteran
Expert
Hardcore
Insane
Highest
enum EntityArrivalType
Default
GateOrWormhole
Jump
enum EntityType
None
Ship
Drone
Station
Turret
Asteroid
Wreckage
Anomaly
Loot
WormHole
Torpedo
Fighter
Container
Unknown
Other
enum FighterOrders
Attack
Defend
Return
FlyToLocation
Harvest
Board
RepairTarget
RepairNearby
CollectLoot
enum FighterStartError
NoError
NoHangar
SquadNotFound
SquadEmpty
NoStartPosition
MaximumFightersStarted
FighterNotFound
NoPilots
NoCrew
NoFighterFound
WrongFighterType
InvalidTarget
TargetDurabilityTooHigh
SquadNotSupported
Other
enum FighterType
Invalid
Fighter
CrewShuttle
enum FontType
Normal
SciFi
enum ImpactParticles
None
Physical
Energy
Explosion
DustExplosion
enum InventoryItemType
Turret
TurretTemplate
SystemUpgrade
VanillaItem
UsableItem
enum JumpError
None
HyperspaceCooldown
OutOfReach
WrongDirection
Blocked
enum KeyboardKey

The enum values in this enum relate to SDL Scancodes. Scancodes reference the physical key position on the US keyboard. The scancode for the Z key (bottom left in QWERTY layout) will always reference the physical key on the bottom left of the keyboard, no matter the layout. If you want a user to press the Z key that is the correct Z key on every layout (ie. top middle in QWERTZ layout, or bottom left on QWERTY) you need to use the keycode. All script functions and callbacks that get keyboard keys passed as parameters will receive scancodes. You can convert scancodes to keycodes and back with the "keycodeFromScancode" and "scancodeFromKeycode" functions. Those are just wrappers for the SDL functions SDL_GetKeyFromScancode and SDL_GetScancodeFromKey. Look into SDL2's docs for more info on all that.

Unknown
Return
Escape
Backspace
Tab
Space
Exclaim
QuoteDBL
Hash
Percent
Dollar
Apersand
Quote
LeftParen
RightParent
Asterisk
Plus
Comma
Minus
Period
Slash
_0
_1
_2
_3
_4
_5
_6
_7
_8
_9
Colon
Semicolon
Less
Equals
Greater
Question
At
LeftBracket
Backslash
RightBrackent
Caret
Underscore
BackQuote
_A
_B
_C
_D
_E
_F
_G
_H
_I
_J
_K
_L
_M
_N
_O
_P
_Q
_R
_S
_T
_U
_V
_W
_X
_Y
_Z
CapsLock
F1
F2
F3
F4
F5
F6
F7
F8
F9
F10
F11
F12
PrintScreen
ScrollLock
Pause
Insert
Home
PageUp
Delete
End
PageDown
Right
Left
Down
Up
NumlockClear
KP_Divide
KP_Multiply
KP_Minus
KP_Plus
KP_Enter
KP_1
KP_2
KP_3
KP_4
KP_5
KP_6
KP_7
KP_8
KP_9
KP_0
KP_Period
Application
Power
KP_Equals
F13
F14
F15
F16
F17
F18
F19
F20
F21
F22
F23
F24
Execute
Help
Menu
Select
Stop
Again
Undo
Cut
Copy
Paste
Find
Mute
VolumeUp
VolumeDown
KP_Comma
KP_EqualsAs400
AltErase
SysReq
Cancel
Clear
Prior
Return2
Separator
Out
Oper
ClearAgain
Crsel
Exsel
ThousandsSeparator
DecimalSeparator
CurrencyUnit
CurrencySubUnit
KP_00
KP_000
KP_LeftParen
KP_RightParen
KP_LeftBrace
KP_RightBrace
KP_Tab
KP_Backspace
KP_A
KP_B
KP_C
KP_D
KP_E
KP_F
KP_Xor
KP_Power
KP_Percent
KP_Less
KP_Greater
KP_Ampersand
KP_DblAmpersand
KP_VerticalBar
KP_DlbVerticalBar
KP_Colon
KP_Hash
KP_Space
KP_At
KP_Exclam
KP_Memstore
KP_Memrecall
KP_Memclear
KP_Memadd
KP_Memsubtract
KP_Memmultiply
KP_Memdivide
KP_PlusMinus
KP_Clear
KP_ClearEntry
KP_Binary
KP_Octal
KP_Decimal
KP_Hexadecimal
LControl
LShift
LAlt
LGui
RControl
RShift
RAlt
RGui
Mode
AudioNext
AudioPrev
AudioStop
AudioPlay
AudioMute
MediaSelect
Www
Mail
Calculator
Computer
AC_Search
AC_Home
AC_Back
AC_Forward
AC_Stop
AC_Refresh
AC_Bookmarks
BrightnessDown
BrightnessUp
DisplaySwitch
KbdIllumToggle
KbdIllumDown
KbdIllumUp
Eject
Sleep
enum ListBoxEntryType
Icon
Text
CheckBox
PixelIcon
Texture
enum MalusReason
None
Reconstruction
Boarding
RiftTeleport
enum MaterialType
Iron
Titanium
Naonite
Trinium
Xanion
Ogonite
Avorion
enum MoonType
Rocky
Smooth
Moon
Volcanic
NumMoonTypes
enum MouseButton
Left
Middle
Right
M4
M5
M6
M7
M8
M9
M10
enum PlanTypeFilter
AllTypes
Fighter
Turret
Ship
enum PlanetType
Terrestrial
Rocky
GasGiant
Smooth
Moon
Volcanic
BlackHole
NumPlanetTypes
enum PlayerStateType
Fly
BuildCraft
BuildTurret
Strategy
CameraFlight
PhotoMode
enum ProjectileShape
Default
Plasma
Rocket
enum RarityType
Petty
Common
Uncommon
Rare
Exceptional
Exotic
Legendary
enum RelationStatus
War
Ceasefire
Neutral
Allies
enum SavedDesignType
Unknown
CraftDesign
TurretDesign
Plan
enum ScenarioType
Creative
Normal
Classic
enum SectorChangeType
Gate
Wormhole
Jump
Forced
Switch
Login
Logout
enum ShipAvailability
Available
Destroyed
InBackground
enum SoundType
Weapon
UI
Other
enum StatsBonuses
RadarReach
HiddenSectorRadarReach
ScannerReach
ScannerMaterialReach
HyperspaceReach
HyperspaceCooldown
HyperspaceChargeEnergy
ShieldDurability
ShieldRecharge
ShieldTimeUntilRechargeAfterHit
ShieldTimeUntilRechargeAfterDepletion
ShieldImpenetrable
Velocity
Acceleration
GeneratedEnergy
EnergyCapacity
BatteryRecharge
ArbitraryTurrets
UnarmedTurrets
ArmedTurrets
PointDefenseTurrets
AutomaticTurrets
CargoHold
LootCollectionRange
TransporterRange
DefenseWeapons
FighterCargoPickup
ExcessProcessingPowerSteps
ProductionCapacity
MinersPerTurret
GunnersPerTurret
MechanicsPerTurret
Engineers
Mechanics
Gunners
Miners
Security
Attackers
Pilots
FighterSquads
FireRate
EnergyDamage
ElectricDamage
PlasmaDamage
AntiMatterDamage
FragmentsDamage
PhysicalDamage
enum TargetIndicatorVisuals
Default
Tilted
Small
enum TransformationFeature
SingleRotationX
SingleRotationY
SingleRotationZ
MirrorX
MirrorY
MirrorZ
DoubleRotationX
DoubleRotationY
DoubleRotationZ
enum TurretAutoFireMode
Never
Always
AttackTarget
Defensive
Idle
enum TurretSlotType
Unspecified
Armed
Unarmed
PointDefense
enum WeaponAppearance
Invisible
ChainGun
Laser
MiningLaser
PlasmaGun
RocketLauncher
Cannon
RailGun
Repair
Bolter
Tesla
PulseCannon
AntiFighter
enum WeaponCategory
Armed
Mining
Salvaging
Heal
None
Overview
Home Functions Search
Search:
Callbacks
Callbacks Alliance [Client] Callbacks Alliance [Server] Callbacks Alliance [Server] Callbacks Entity Callbacks Galaxy Callbacks Player Callbacks Player [Client] Callbacks Sector Callbacks Server Callbacks
Predefined Functions & Example Scripts
Command Entity FactionDatabase PlanGenerator Player Sector Server UsableInventoryItem
Common Components
Boarding BspTree CargoBay CargoLoot ControlUnit CrewComponent DeletionTimer DirectFlightPhysics DockingClamps DockingParent DockingPositions Durability EnergySystem Engine FighterAI Hangar HyperspaceEngine InteractionText InventoryItemLoot Owner Physics Plan ReadOnlyBoarding ReadOnlyBspTree ReadOnlyCargoBay ReadOnlyControlUnit ReadOnlyCrew ReadOnlyDeletionTimer ReadOnlyEnergySystem ReadOnlyEngine ReadOnlyFighterAI ReadOnlyHangar ReadOnlyHyperspaceEngine ReadOnlyInteractionText ReadOnlyOwner ReadOnlyPhysics ReadOnlyPlan ReadOnlyShipAI ReadOnlyShipSystem ReadOnlyTorpedoAI [Server] [Client] [Server] [Client] ReadOnlyTorpedoAI [Server] [Client] [Server] [Client] ReadOnlyTorpedoLauncher ReadOnlyTurretBases ReadOnlyVelocity ReadOnlyWeapons ReadOnlyWormHole Shield ShipAI ShipSystem StructuralIntegrity SystemUpgradeLoot Thrusters Torpedo TorpedoAI TorpedoLauncher Turret TurretAI TurretBases Velocity Weapons WormHole
Common Objects
AllianceMember AllianceRank BlockPlan BlockPlanBlock BlockStatistics Box Captain Color ControlUnitSeat CraftDesign CraftStatsOverview Crew CrewMan CrewProfession DebugInfo dvec2 dvec3 dvec4 Entity EntityDescriptor FighterTemplate Format GameSettings Group HighResolutionTimer Inventory InventoryTurret ivec2 ivec3 ivec4 Language Mail Material Matrix ModManager NamedFormat PlanBspTree PlanetSpecifics PlanGenerationStage PlanPart PlanStyle PlayerId PluralForm Profiler QuadTree Random Rarity Ray ReadOnlyEntity Rect Relation Scenario SectorView Seed Sphere Squad SystemUpgradeTemplate Timer Tooltip TooltipLine TorpedoShaft TorpedoTemplate TradingGood TurretDesign TurretDesignPart TurretTemplate UsableInventoryItem Uuid VanillaInventoryItem vec2 vec3 vec4 Version Weapon
Client Components
EntityIcon EntityTooltip PlanMesh ReadOnlyIcon ReadOnlyPlanMesh ReadOnlyScriptUI ReadOnlyTooltip ScriptUI
Client Objects
Achievements Alliance [Client] CameraKeyFrame CaptainSelectionItem Client ClientSettings ColorSelectionItem CraftDesignSelectionItem Faction [Client] Galaxy [Client] GalaxyMap GameInput GlowFX IconSelectionItem InputWindow InventoryReferenceSelectionItem InventorySelectionItem Keyboard LaserFX Mouse Music PixelIconSelectionItem Planet Player [Client] PlayerWindow RefractionFX Sector [Client] SelectionItem ShipDatabaseEntry [Client] SoundSource StrategyState TargetIndicator TooltipRenderer TurretDesignSelectionItem
Client UI Objects
AllianceEmblem AllianceTab ArrowLine Button [Client] [Client] Button [Client] [Client] CaptainIcon CaptainProfile CheckBox ComboBox ContextMenu CraftPortrait CrewBar Frame Hud InventorySelection Label Line ListBox ListBoxEx MapArrowLine MapIcon MultiLineTextBox NumbersBar Picture PlanDisplayer ProgressBar SavedDesignsSelection ScrollFrame Selection ShipWindow Slider StatisticsBar Tab TabbedWindow TextBox TextField TooltipDisplayer Tree UIArbitraryHorizontalSplitter UIArbitraryVerticalSplitter UIContainer UIElement UIGridSplitter UIHorizontalLister UIHorizontalMultiSplitter UIHorizontalSplitter UIOrganizer UIRect UIRenderer UIVerticalLister UIVerticalMultiSplitter UIVerticalSplitter ValueComboBox Window
Server Components
EntityTransferrer FighterController Loot ReadOnlyEntityTransferrer ReadOnlyFighterController ReadOnlyLoot ReadOnlyTurretController ReadOnlyWreckageCreator TurretController WreckageCreator
Server Objects
Alliance [Server] Faction [Server] Galaxy [Server] Player [Server] ReadOnlySector Sector [Server] Server ShipDatabaseEntry [Server]
Enums
AIState AlliancePrivilege BeamShape BlockShading BlockStructure BlockType BlockType2 BoxType BuildError CaptainGenderId ChatChannel ChatMessageType ComponentType ControlAction ControlActionBit ControlStyle CoolingType CraftStatsOverviewStat CrewProfessionType CrewRank DamageSource DamageType DeletionType Difficulty EntityArrivalType EntityType FighterOrders FighterStartError FighterType FontType ImpactParticles InventoryItemType JumpError KeyboardKey ListBoxEntryType MalusReason MaterialType MoonType MouseButton PlanetType PlanTypeFilter PlayerStateType ProjectileShape RarityType RelationStatus SavedDesignType ScenarioType SectorChangeType ShipAvailability SoundType StatsBonuses TargetIndicatorVisuals TransformationFeature TurretAutoFireMode TurretSlotType WeaponAppearance WeaponCategory

This is the official documentation for the scripting API of Avorion. This documentation is automatically generated and not necessarily complete. Depending on the context in which functions exist, some documentation such as descriptions, return values or variable names or types may be missing.

Work in Progress. Documentation of Avorion Version: 2.5.8 a0d3f0b5b065