Avorion Script API Documentation
ScriptUI
This object is only available on the client.
function ScriptUI(var id)
Parameters
Returns
A new instance of ScriptUI
| property Entity entity | [read-only] |
| property uuid entityId | [read-only] |
function int addDialogOption(string text, string function)
Adds a new dialog option to a dialog that is currently in construction. Dialogs are only in construction during the entity or player callback "onStartDialog". Invoking this function at any other point will do nothing.
Parameters
function The function that will be called when the dialog option is selected.
function Window createWindow(Rect rect)
function var interactShowDialog(Dialog dialog, var closeable)
Shows a dialog, and forces the player to interact with the entity. This will close and override the currently displayed dialog.
Parameters
closeable A value indicating if the dialog can be closed with the Escape key. Disable only with caution! Your dialog must be able to be terminated through every possible answer-way or the player can get stuck. Can be omitted, default is 1.
Returns
nothing
function var registerInteraction(string caption, string function)
Returns
nothing
function var registerWindow(Window window, string caption)
Returns
nothing
function var restartInteraction()
Returns
nothing
function bool showDialog(Dialog dialog, var closeable)
Shows a dialog, provided that the player is currently in interaction state with the parent entity. This will close and override the currently displayed dialog.
Parameters
closeable A value indicating if the dialog can be closed with the Escape key. Disable only with caution! Your dialog must be able to be terminated through every possible answer-way or the player can get stuck. Can be omitted, default is 1.
function var startHailing(string acceptCallback, string rejectCallback)
Have the ship start hailing the player on the client. The player can then accept the hail or reject it. If there is already a hail going on, this function will replace the current hail.
Parameters
rejectCallback The callback that will be called in case the player rejects the hail (you should avoid putting dialogs in here, since the player doesn't want to communicate)
Returns
nothing
function var stopHailing()
Stop the current hailing.
Returns
nothing
function var stopInteraction()
Returns
nothing
Callbacks Alliance [Client] Callbacks Alliance [Server] Callbacks Alliance [Server] Callbacks Entity Callbacks Galaxy Callbacks Player Callbacks Player [Client] Callbacks Sector Callbacks Server Callbacks
Command Entity FactionDatabase PlanGenerator Player Sector Server UsableInventoryItem
Boarding BspTree CargoBay ControlUnit DeletionTimer DirectFlightPhysics DockingPositions Durability EnergySystem Engine FighterAI Hangar InteractionText Owner Physics Plan ReadOnlyBoarding ReadOnlyBspTree ReadOnlyCargoBay ReadOnlyControlUnit ReadOnlyDeletionTimer ReadOnlyEnergySystem ReadOnlyEngine ReadOnlyFighterAI ReadOnlyHangar ReadOnlyInteractionText ReadOnlyOwner ReadOnlyPhysics ReadOnlyPlan ReadOnlyShipAI ReadOnlyShipSystem ReadOnlyTorpedoAI [Server] [Client] [Server] [Client] ReadOnlyTorpedoAI [Server] [Client] [Server] [Client] ReadOnlyTorpedoLauncher ReadOnlyTurretBases ReadOnlyVelocity ReadOnlyWeapons ReadOnlyWormHole Shield ShipAI ShipSystem SystemUpgradeLoot Thrusters Torpedo TorpedoAI TorpedoLauncher Turret TurretAI TurretBases Velocity Weapons WormHole
AllianceMember AllianceRank BlockPlan BlockPlanBlock BlockStatistics Box Color ControlUnitSeat CraftDesign Crew CrewMan CrewProfession DebugInfo dvec2 dvec3 dvec4 Entity EntityDescriptor FighterTemplate Format GameSettings 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 SectorView Seed Sphere SystemUpgradeTemplate Timer Tooltip TooltipLine TorpedoTemplate TradingGood TurretDesign TurretDesignPart TurretTemplate UsableInventoryItem Uuid VanillaInventoryItem vec2 vec3 vec4 Version Weapon
EntityIcon EntityTooltip PlanMesh ReadOnlyIcon ReadOnlyPlanMesh ReadOnlyScriptUI ReadOnlyTooltip ScriptUI
Achievements Alliance [Client] ClientSettings CraftDesignSelectionItem Faction [Client] Galaxy [Client] GalaxyMap GameInput InputWindow InventoryReferenceSelectionItem InventorySelectionItem Keyboard LaserFX Mouse Music Planet Player [Client] PlayerWindow Sector [Client] SelectionItem SoundSource TooltipRenderer TurretDesignSelectionItem
AllianceTab ArrowLine Button [Client] [Client] Button [Client] [Client] CheckBox ComboBox CraftPortrait Frame Hud InventorySelection Label Line ListBox ListBoxEx MapArrowLine MultiLineTextBox NumbersBar Picture PlanDisplayer ProgressBar SavedDesignsSelection ScrollFrame Selection ShipWindow Slider StatisticsBar Tab TabbedWindow TextBox TextField Tree UIArbitraryHorizontalSplitter UIArbitraryVerticalSplitter UIContainer UIElement UIGridSplitter UIHorizontalLister UIHorizontalMultiSplitter UIHorizontalSplitter UIOrganizer UIRect UIRenderer UIVerticalLister UIVerticalMultiSplitter UIVerticalSplitter ValueComboBox Window
EntityTransferrer FighterController Loot ReadOnlyEntityTransferrer ReadOnlyFighterController ReadOnlyLoot ReadOnlyTurretController ReadOnlyWreckageCreator TurretController WreckageCreator
Alliance [Server] Faction [Server] Galaxy [Server] Player [Server] ReadOnlySector Sector [Server] Server
AIState AlliancePrivilege BeamShape BlockShading BlockType BoxType ChatChannel ChatMessageType ComponentType ControlAction ControlActionBit CoolingType CrewProfessionType DamageSource DamageType DeletionType Difficulty EntityArrivalType EntityType FighterOrders FighterStartError FighterType FontType ImpactParticles InventoryItemType KeyboardKey ListBoxEntryType MalusReason MaterialType MoonType MouseButton PlanetType PlayerStateType ProjectileShape RarityType RelationStatus SavedDesignType SectorChangeType SoundType StatsBonuses TransformationFeature TurretAutoFireMode 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: 1.0 r22021 59065310fc1a