From 907490d37a3a06cae70075d187fe68f937b1ee69 Mon Sep 17 00:00:00 2001 From: PhatPhuckDave Date: Sun, 20 Jul 2025 17:31:31 +0200 Subject: [PATCH] Add documentation from game --- Documentation/Achievements.html | 687 +++ .../Alliance [Client] Callbacks.html | 1312 +++++ Documentation/Alliance [Client].html | 1335 +++++ .../Alliance [Server] Callbacks.html | 406 ++ .../Alliance [Server] Callbacks.html | 1339 +++++ Documentation/Alliance [Server].html | 2573 +++++++++ Documentation/AllianceEmblem.html | 654 +++ Documentation/AllianceMember.html | 450 ++ Documentation/AllianceRank.html | 454 ++ Documentation/AllianceTab.html | 807 +++ Documentation/ArrowLine.html | 681 +++ Documentation/BlockPlan.html | 1141 ++++ Documentation/BlockPlanBlock.html | 706 +++ Documentation/BlockStatistics.html | 718 +++ Documentation/Boarding.html | 599 +++ Documentation/Box.html | 474 ++ Documentation/BspTree.html | 534 ++ Documentation/Button [Client] [Client].html | 818 +++ Documentation/Callbacks.html | 417 ++ Documentation/CameraKeyFrame.html | 468 ++ Documentation/Captain.html | 604 +++ Documentation/CaptainIcon.html | 696 +++ Documentation/CaptainProfile.html | 677 +++ Documentation/CaptainSelectionItem.html | 464 ++ Documentation/CargoBay.html | 776 +++ Documentation/CargoLoot.html | 502 ++ Documentation/CheckBox.html | 745 +++ Documentation/Client.html | 469 ++ Documentation/ClientSettings.html | 891 ++++ Documentation/Color.html | 537 ++ Documentation/ColorSelectionItem.html | 450 ++ Documentation/ComboBox.html | 797 +++ Documentation/CommandFunctions.html | 484 ++ Documentation/ContextMenu.html | 711 +++ Documentation/ControlUnit.html | 1304 +++++ Documentation/ControlUnitSeat.html | 495 ++ Documentation/CraftDesign.html | 582 +++ Documentation/CraftDesignSelectionItem.html | 531 ++ Documentation/CraftPortrait.html | 744 +++ Documentation/CraftStatsOverview.html | 563 ++ Documentation/Crew.html | 842 +++ Documentation/CrewBar.html | 711 +++ Documentation/CrewComponent.html | 844 +++ Documentation/CrewMan.html | 465 ++ Documentation/CrewProfession.html | 509 ++ Documentation/DebugInfo.html | 501 ++ Documentation/DeletionTimer.html | 480 ++ Documentation/DirectFlightPhysics.html | 470 ++ Documentation/DockingClamps.html | 572 ++ Documentation/DockingParent.html | 610 +++ Documentation/DockingPositions.html | 652 +++ Documentation/Durability.html | 756 +++ Documentation/EnergySystem.html | 544 ++ Documentation/Engine.html | 515 ++ Documentation/Entity Callbacks.html | 2433 +++++++++ Documentation/Entity.html | 4633 +++++++++++++++++ Documentation/EntityDescriptor.html | 4228 +++++++++++++++ Documentation/EntityFunctions.html | 1235 +++++ Documentation/EntityIcon.html | 527 ++ Documentation/EntityTooltip.html | 484 ++ Documentation/EntityTransferrer.html | 506 ++ Documentation/Enums.html | 1995 +++++++ Documentation/Faction [Client].html | 597 +++ Documentation/Faction [Server].html | 1273 +++++ Documentation/FactionDatabaseFunctions.html | 480 ++ Documentation/FighterAI.html | 594 +++ Documentation/FighterController.html | 557 ++ Documentation/FighterTemplate.html | 1208 +++++ Documentation/Format.html | 515 ++ Documentation/Frame.html | 663 +++ Documentation/Functions.html | 3971 ++++++++++++++ Documentation/Galaxy Callbacks.html | 558 ++ Documentation/Galaxy [Client].html | 667 +++ Documentation/Galaxy [Server].html | 1373 +++++ Documentation/GalaxyMap.html | 871 ++++ Documentation/GameInput.html | 574 ++ Documentation/GameSettings.html | 847 +++ Documentation/GlowFX.html | 504 ++ Documentation/Group.html | 482 ++ Documentation/Hangar.html | 988 ++++ Documentation/HighResolutionTimer.html | 544 ++ Documentation/Hud.html | 898 ++++ Documentation/HyperspaceEngine.html | 818 +++ Documentation/IconSelectionItem.html | 459 ++ Documentation/InputWindow.html | 1590 ++++++ Documentation/InteractionText.html | 452 ++ Documentation/Inventory.html | 684 +++ Documentation/InventoryItemLoot.html | 434 ++ .../InventoryReferenceSelectionItem.html | 522 ++ Documentation/InventorySelection.html | 1888 +++++++ Documentation/InventorySelectionItem.html | 486 ++ Documentation/InventoryTurret.html | 1324 +++++ Documentation/Keyboard.html | 501 ++ Documentation/Label.html | 951 ++++ Documentation/Language.html | 625 +++ Documentation/LaserFX.html | 693 +++ Documentation/Line.html | 681 +++ Documentation/ListBox.html | 1043 ++++ Documentation/ListBoxEx.html | 1128 ++++ Documentation/Loot.html | 465 ++ Documentation/Mail.html | 639 +++ Documentation/MapArrowLine.html | 672 +++ Documentation/MapIcon.html | 681 +++ Documentation/Material.html | 531 ++ Documentation/Matrix.html | 650 +++ Documentation/ModManager.html | 791 +++ Documentation/Mouse.html | 474 ++ Documentation/MultiLineTextBox.html | 850 +++ Documentation/Music.html | 545 ++ Documentation/NamedFormat.html | 481 ++ Documentation/NumbersBar.html | 702 +++ Documentation/Owner.html | 501 ++ Documentation/Physics.html | 591 +++ Documentation/Picture.html | 747 +++ Documentation/PixelIconSelectionItem.html | 432 ++ Documentation/Plan.html | 1174 +++++ Documentation/PlanBspTree.html | 527 ++ Documentation/PlanDisplayer.html | 755 +++ Documentation/PlanGenerationStage.html | 648 +++ Documentation/PlanGeneratorFunctions.html | 432 ++ Documentation/PlanMesh.html | 503 ++ Documentation/PlanPart.html | 917 ++++ Documentation/PlanStyle.html | 591 +++ Documentation/Planet.html | 441 ++ Documentation/PlanetSpecifics.html | 495 ++ Documentation/Player Callbacks.html | 1713 ++++++ Documentation/Player [Client] Callbacks.html | 1680 ++++++ Documentation/Player [Client].html | 1634 ++++++ Documentation/Player [Server].html | 2715 ++++++++++ Documentation/PlayerFunctions.html | 825 +++ Documentation/PlayerId.html | 441 ++ Documentation/PlayerWindow.html | 623 +++ Documentation/PluralForm.html | 465 ++ Documentation/Profiler.html | 559 ++ Documentation/ProgressBar.html | 663 +++ Documentation/QuadTree.html | 474 ++ Documentation/Random.html | 567 ++ Documentation/Rarity.html | 504 ++ Documentation/Ray.html | 505 ++ Documentation/ReadOnlyBoarding.html | 515 ++ Documentation/ReadOnlyBspTree.html | 443 ++ Documentation/ReadOnlyCargoBay.html | 653 +++ Documentation/ReadOnlyControlUnit.html | 898 ++++ Documentation/ReadOnlyCrew.html | 641 +++ Documentation/ReadOnlyDeletionTimer.html | 461 ++ Documentation/ReadOnlyEnergySystem.html | 506 ++ Documentation/ReadOnlyEngine.html | 515 ++ Documentation/ReadOnlyEntity.html | 2124 ++++++++ Documentation/ReadOnlyEntityTransferrer.html | 468 ++ Documentation/ReadOnlyFighterAI.html | 524 ++ Documentation/ReadOnlyFighterController.html | 459 ++ Documentation/ReadOnlyHangar.html | 775 +++ Documentation/ReadOnlyHyperspaceEngine.html | 626 +++ Documentation/ReadOnlyIcon.html | 527 ++ Documentation/ReadOnlyInteractionText.html | 452 ++ Documentation/ReadOnlyLoot.html | 446 ++ Documentation/ReadOnlyOwner.html | 501 ++ Documentation/ReadOnlyPhysics.html | 515 ++ Documentation/ReadOnlyPlan.html | 791 +++ Documentation/ReadOnlyPlanMesh.html | 446 ++ Documentation/ReadOnlyScriptUI.html | 446 ++ Documentation/ReadOnlySector.html | 478 ++ Documentation/ReadOnlyShipAI.html | 683 +++ Documentation/ReadOnlyShipSystem.html | 522 ++ Documentation/ReadOnlyTooltip.html | 446 ++ ...I [Server] [Client] [Server] [Client].html | 470 ++ Documentation/ReadOnlyTorpedoLauncher.html | 578 ++ Documentation/ReadOnlyTurretBases.html | 423 ++ Documentation/ReadOnlyTurretController.html | 459 ++ Documentation/ReadOnlyVelocity.html | 506 ++ Documentation/ReadOnlyWeapons.html | 965 ++++ Documentation/ReadOnlyWormHole.html | 519 ++ Documentation/ReadOnlyWreckageCreator.html | 446 ++ Documentation/Rect.html | 528 ++ Documentation/RefractionFX.html | 531 ++ Documentation/Relation.html | 499 ++ Documentation/SavedDesignsSelection.html | 1722 ++++++ Documentation/Scenario.html | 459 ++ Documentation/ScriptUI.html | 661 +++ Documentation/ScrollFrame.html | 1457 ++++++ Documentation/Search.html | 393 ++ Documentation/Sector Callbacks.html | 2104 ++++++++ Documentation/Sector [Client].html | 1424 +++++ Documentation/Sector [Server].html | 2024 +++++++ Documentation/SectorFunctions.html | 625 +++ Documentation/SectorView.html | 818 +++ Documentation/Seed.html | 556 ++ Documentation/Selection.html | 1124 ++++ Documentation/SelectionItem.html | 594 +++ Documentation/Server Callbacks.html | 456 ++ Documentation/Server.html | 1071 ++++ Documentation/ServerFunctions.html | 463 ++ Documentation/Shield.html | 782 +++ Documentation/ShipAI.html | 1601 ++++++ Documentation/ShipDatabaseEntry [Client].html | 1147 ++++ Documentation/ShipDatabaseEntry [Server].html | 1608 ++++++ Documentation/ShipSystem.html | 630 +++ Documentation/ShipWindow.html | 854 +++ Documentation/Slider.html | 930 ++++ Documentation/SoundSource.html | 549 ++ Documentation/Sphere.html | 451 ++ Documentation/Squad.html | 505 ++ Documentation/StatisticsBar.html | 710 +++ Documentation/StrategyState.html | 510 ++ Documentation/StructuralIntegrity.html | 460 ++ Documentation/SystemUpgradeLoot.html | 434 ++ Documentation/SystemUpgradeTemplate.html | 563 ++ Documentation/Tab.html | 1465 ++++++ Documentation/TabbedWindow.html | 1611 ++++++ Documentation/TargetIndicator.html | 500 ++ Documentation/TextBox.html | 904 ++++ Documentation/TextField.html | 755 +++ Documentation/Thrusters.html | 497 ++ Documentation/Timer.html | 532 ++ Documentation/Tooltip.html | 621 +++ Documentation/TooltipDisplayer.html | 664 +++ Documentation/TooltipLine.html | 600 +++ Documentation/TooltipRenderer.html | 470 ++ Documentation/Torpedo.html | 512 ++ Documentation/TorpedoAI.html | 506 ++ Documentation/TorpedoLauncher.html | 661 +++ Documentation/TorpedoShaft.html | 515 ++ Documentation/TorpedoTemplate.html | 738 +++ Documentation/TradingGood.html | 607 +++ Documentation/Tree.html | 759 +++ Documentation/Turret.html | 740 +++ Documentation/TurretAI.html | 470 ++ Documentation/TurretBases.html | 477 ++ Documentation/TurretController.html | 478 ++ Documentation/TurretDesign.html | 624 +++ Documentation/TurretDesignPart.html | 517 ++ Documentation/TurretDesignSelectionItem.html | 550 ++ Documentation/TurretTemplate.html | 1311 +++++ .../UIArbitraryHorizontalSplitter.html | 1124 ++++ .../UIArbitraryVerticalSplitter.html | 1124 ++++ Documentation/UIContainer.html | 1171 +++++ Documentation/UIElement.html | 627 +++ Documentation/UIGridSplitter.html | 1146 ++++ Documentation/UIHorizontalLister.html | 1234 +++++ Documentation/UIHorizontalMultiSplitter.html | 1142 ++++ Documentation/UIHorizontalSplitter.html | 1186 +++++ Documentation/UIOrganizer.html | 1087 ++++ Documentation/UIRect.html | 654 +++ Documentation/UIRenderer.html | 827 +++ Documentation/UIVerticalLister.html | 1234 +++++ Documentation/UIVerticalMultiSplitter.html | 1142 ++++ Documentation/UIVerticalSplitter.html | 1186 +++++ Documentation/UsableInventoryItem.html | 703 +++ .../UsableInventoryItemFunctions.html | 468 ++ Documentation/Uuid.html | 546 ++ Documentation/ValueComboBox.html | 838 +++ Documentation/VanillaInventoryItem.html | 688 +++ Documentation/Velocity.html | 563 ++ Documentation/Version.html | 513 ++ Documentation/Weapon.html | 1092 ++++ Documentation/Weapons.html | 1089 ++++ Documentation/Window.html | 1502 ++++++ Documentation/WormHole.html | 551 ++ Documentation/WreckageCreator.html | 455 ++ Documentation/dvec2.html | 549 ++ Documentation/dvec3.html | 560 ++ Documentation/dvec4.html | 571 ++ Documentation/index.html | 2221 ++++++++ Documentation/ivec2.html | 549 ++ Documentation/ivec3.html | 560 ++ Documentation/ivec4.html | 571 ++ Documentation/stylesheet.css | 260 + Documentation/vec2.html | 549 ++ Documentation/vec3.html | 560 ++ Documentation/vec4.html | 571 ++ 270 files changed, 215120 insertions(+) create mode 100644 Documentation/Achievements.html create mode 100644 Documentation/Alliance [Client] Callbacks.html create mode 100644 Documentation/Alliance [Client].html create mode 100644 Documentation/Alliance [Server] Callbacks.html create mode 100644 Documentation/Alliance [Server] Callbacks.html create mode 100644 Documentation/Alliance [Server].html create mode 100644 Documentation/AllianceEmblem.html create mode 100644 Documentation/AllianceMember.html create mode 100644 Documentation/AllianceRank.html create mode 100644 Documentation/AllianceTab.html create mode 100644 Documentation/ArrowLine.html create mode 100644 Documentation/BlockPlan.html create mode 100644 Documentation/BlockPlanBlock.html create mode 100644 Documentation/BlockStatistics.html create mode 100644 Documentation/Boarding.html create mode 100644 Documentation/Box.html create mode 100644 Documentation/BspTree.html create mode 100644 Documentation/Button [Client] [Client].html create mode 100644 Documentation/Callbacks.html create mode 100644 Documentation/CameraKeyFrame.html create mode 100644 Documentation/Captain.html create mode 100644 Documentation/CaptainIcon.html create mode 100644 Documentation/CaptainProfile.html create mode 100644 Documentation/CaptainSelectionItem.html create mode 100644 Documentation/CargoBay.html create mode 100644 Documentation/CargoLoot.html create mode 100644 Documentation/CheckBox.html create mode 100644 Documentation/Client.html create mode 100644 Documentation/ClientSettings.html create mode 100644 Documentation/Color.html create mode 100644 Documentation/ColorSelectionItem.html create mode 100644 Documentation/ComboBox.html create mode 100644 Documentation/CommandFunctions.html create mode 100644 Documentation/ContextMenu.html create mode 100644 Documentation/ControlUnit.html create mode 100644 Documentation/ControlUnitSeat.html create mode 100644 Documentation/CraftDesign.html create mode 100644 Documentation/CraftDesignSelectionItem.html create mode 100644 Documentation/CraftPortrait.html create mode 100644 Documentation/CraftStatsOverview.html create mode 100644 Documentation/Crew.html create mode 100644 Documentation/CrewBar.html create mode 100644 Documentation/CrewComponent.html create mode 100644 Documentation/CrewMan.html create mode 100644 Documentation/CrewProfession.html create mode 100644 Documentation/DebugInfo.html create mode 100644 Documentation/DeletionTimer.html create mode 100644 Documentation/DirectFlightPhysics.html create mode 100644 Documentation/DockingClamps.html create mode 100644 Documentation/DockingParent.html create mode 100644 Documentation/DockingPositions.html create mode 100644 Documentation/Durability.html create mode 100644 Documentation/EnergySystem.html create mode 100644 Documentation/Engine.html create mode 100644 Documentation/Entity Callbacks.html create mode 100644 Documentation/Entity.html create mode 100644 Documentation/EntityDescriptor.html create mode 100644 Documentation/EntityFunctions.html create mode 100644 Documentation/EntityIcon.html create mode 100644 Documentation/EntityTooltip.html create mode 100644 Documentation/EntityTransferrer.html create mode 100644 Documentation/Enums.html create mode 100644 Documentation/Faction [Client].html create mode 100644 Documentation/Faction [Server].html create mode 100644 Documentation/FactionDatabaseFunctions.html create mode 100644 Documentation/FighterAI.html create mode 100644 Documentation/FighterController.html create mode 100644 Documentation/FighterTemplate.html create mode 100644 Documentation/Format.html create mode 100644 Documentation/Frame.html create mode 100644 Documentation/Functions.html create mode 100644 Documentation/Galaxy Callbacks.html create mode 100644 Documentation/Galaxy [Client].html create mode 100644 Documentation/Galaxy [Server].html create mode 100644 Documentation/GalaxyMap.html create mode 100644 Documentation/GameInput.html create mode 100644 Documentation/GameSettings.html create mode 100644 Documentation/GlowFX.html create mode 100644 Documentation/Group.html create mode 100644 Documentation/Hangar.html create mode 100644 Documentation/HighResolutionTimer.html create mode 100644 Documentation/Hud.html create mode 100644 Documentation/HyperspaceEngine.html create mode 100644 Documentation/IconSelectionItem.html create mode 100644 Documentation/InputWindow.html create mode 100644 Documentation/InteractionText.html create mode 100644 Documentation/Inventory.html create mode 100644 Documentation/InventoryItemLoot.html create mode 100644 Documentation/InventoryReferenceSelectionItem.html create mode 100644 Documentation/InventorySelection.html create mode 100644 Documentation/InventorySelectionItem.html create mode 100644 Documentation/InventoryTurret.html create mode 100644 Documentation/Keyboard.html create mode 100644 Documentation/Label.html create mode 100644 Documentation/Language.html create mode 100644 Documentation/LaserFX.html create mode 100644 Documentation/Line.html create mode 100644 Documentation/ListBox.html create mode 100644 Documentation/ListBoxEx.html create mode 100644 Documentation/Loot.html create mode 100644 Documentation/Mail.html create mode 100644 Documentation/MapArrowLine.html create mode 100644 Documentation/MapIcon.html create mode 100644 Documentation/Material.html create mode 100644 Documentation/Matrix.html create mode 100644 Documentation/ModManager.html create mode 100644 Documentation/Mouse.html create mode 100644 Documentation/MultiLineTextBox.html create mode 100644 Documentation/Music.html create mode 100644 Documentation/NamedFormat.html create mode 100644 Documentation/NumbersBar.html create mode 100644 Documentation/Owner.html create mode 100644 Documentation/Physics.html create mode 100644 Documentation/Picture.html create mode 100644 Documentation/PixelIconSelectionItem.html create mode 100644 Documentation/Plan.html create mode 100644 Documentation/PlanBspTree.html create mode 100644 Documentation/PlanDisplayer.html create mode 100644 Documentation/PlanGenerationStage.html create mode 100644 Documentation/PlanGeneratorFunctions.html create mode 100644 Documentation/PlanMesh.html create mode 100644 Documentation/PlanPart.html create mode 100644 Documentation/PlanStyle.html create mode 100644 Documentation/Planet.html create mode 100644 Documentation/PlanetSpecifics.html create mode 100644 Documentation/Player Callbacks.html create mode 100644 Documentation/Player [Client] Callbacks.html create mode 100644 Documentation/Player [Client].html create mode 100644 Documentation/Player [Server].html create mode 100644 Documentation/PlayerFunctions.html create mode 100644 Documentation/PlayerId.html create mode 100644 Documentation/PlayerWindow.html create mode 100644 Documentation/PluralForm.html create mode 100644 Documentation/Profiler.html create mode 100644 Documentation/ProgressBar.html create mode 100644 Documentation/QuadTree.html create mode 100644 Documentation/Random.html create mode 100644 Documentation/Rarity.html create mode 100644 Documentation/Ray.html create mode 100644 Documentation/ReadOnlyBoarding.html create mode 100644 Documentation/ReadOnlyBspTree.html create mode 100644 Documentation/ReadOnlyCargoBay.html create mode 100644 Documentation/ReadOnlyControlUnit.html create mode 100644 Documentation/ReadOnlyCrew.html create mode 100644 Documentation/ReadOnlyDeletionTimer.html create mode 100644 Documentation/ReadOnlyEnergySystem.html create mode 100644 Documentation/ReadOnlyEngine.html create mode 100644 Documentation/ReadOnlyEntity.html create mode 100644 Documentation/ReadOnlyEntityTransferrer.html create mode 100644 Documentation/ReadOnlyFighterAI.html create mode 100644 Documentation/ReadOnlyFighterController.html create mode 100644 Documentation/ReadOnlyHangar.html create mode 100644 Documentation/ReadOnlyHyperspaceEngine.html create mode 100644 Documentation/ReadOnlyIcon.html create mode 100644 Documentation/ReadOnlyInteractionText.html create mode 100644 Documentation/ReadOnlyLoot.html create mode 100644 Documentation/ReadOnlyOwner.html create mode 100644 Documentation/ReadOnlyPhysics.html create mode 100644 Documentation/ReadOnlyPlan.html create mode 100644 Documentation/ReadOnlyPlanMesh.html create mode 100644 Documentation/ReadOnlyScriptUI.html create mode 100644 Documentation/ReadOnlySector.html create mode 100644 Documentation/ReadOnlyShipAI.html create mode 100644 Documentation/ReadOnlyShipSystem.html create mode 100644 Documentation/ReadOnlyTooltip.html create mode 100644 Documentation/ReadOnlyTorpedoAI [Server] [Client] [Server] [Client].html create mode 100644 Documentation/ReadOnlyTorpedoLauncher.html create mode 100644 Documentation/ReadOnlyTurretBases.html create mode 100644 Documentation/ReadOnlyTurretController.html create mode 100644 Documentation/ReadOnlyVelocity.html create mode 100644 Documentation/ReadOnlyWeapons.html create mode 100644 Documentation/ReadOnlyWormHole.html create mode 100644 Documentation/ReadOnlyWreckageCreator.html create mode 100644 Documentation/Rect.html create mode 100644 Documentation/RefractionFX.html create mode 100644 Documentation/Relation.html create mode 100644 Documentation/SavedDesignsSelection.html create mode 100644 Documentation/Scenario.html create mode 100644 Documentation/ScriptUI.html create mode 100644 Documentation/ScrollFrame.html create mode 100644 Documentation/Search.html create mode 100644 Documentation/Sector Callbacks.html create mode 100644 Documentation/Sector [Client].html create mode 100644 Documentation/Sector [Server].html create mode 100644 Documentation/SectorFunctions.html create mode 100644 Documentation/SectorView.html create mode 100644 Documentation/Seed.html create mode 100644 Documentation/Selection.html create mode 100644 Documentation/SelectionItem.html create mode 100644 Documentation/Server Callbacks.html create mode 100644 Documentation/Server.html create mode 100644 Documentation/ServerFunctions.html create mode 100644 Documentation/Shield.html create mode 100644 Documentation/ShipAI.html create mode 100644 Documentation/ShipDatabaseEntry [Client].html create mode 100644 Documentation/ShipDatabaseEntry [Server].html create mode 100644 Documentation/ShipSystem.html create mode 100644 Documentation/ShipWindow.html create mode 100644 Documentation/Slider.html create mode 100644 Documentation/SoundSource.html create mode 100644 Documentation/Sphere.html create mode 100644 Documentation/Squad.html create mode 100644 Documentation/StatisticsBar.html create mode 100644 Documentation/StrategyState.html create mode 100644 Documentation/StructuralIntegrity.html create mode 100644 Documentation/SystemUpgradeLoot.html create mode 100644 Documentation/SystemUpgradeTemplate.html create mode 100644 Documentation/Tab.html create mode 100644 Documentation/TabbedWindow.html create mode 100644 Documentation/TargetIndicator.html create mode 100644 Documentation/TextBox.html create mode 100644 Documentation/TextField.html create mode 100644 Documentation/Thrusters.html create mode 100644 Documentation/Timer.html create mode 100644 Documentation/Tooltip.html create mode 100644 Documentation/TooltipDisplayer.html create mode 100644 Documentation/TooltipLine.html create mode 100644 Documentation/TooltipRenderer.html create mode 100644 Documentation/Torpedo.html create mode 100644 Documentation/TorpedoAI.html create mode 100644 Documentation/TorpedoLauncher.html create mode 100644 Documentation/TorpedoShaft.html create mode 100644 Documentation/TorpedoTemplate.html create mode 100644 Documentation/TradingGood.html create mode 100644 Documentation/Tree.html create mode 100644 Documentation/Turret.html create mode 100644 Documentation/TurretAI.html create mode 100644 Documentation/TurretBases.html create mode 100644 Documentation/TurretController.html create mode 100644 Documentation/TurretDesign.html create mode 100644 Documentation/TurretDesignPart.html create mode 100644 Documentation/TurretDesignSelectionItem.html create mode 100644 Documentation/TurretTemplate.html create mode 100644 Documentation/UIArbitraryHorizontalSplitter.html create mode 100644 Documentation/UIArbitraryVerticalSplitter.html create mode 100644 Documentation/UIContainer.html create mode 100644 Documentation/UIElement.html create mode 100644 Documentation/UIGridSplitter.html create mode 100644 Documentation/UIHorizontalLister.html create mode 100644 Documentation/UIHorizontalMultiSplitter.html create mode 100644 Documentation/UIHorizontalSplitter.html create mode 100644 Documentation/UIOrganizer.html create mode 100644 Documentation/UIRect.html create mode 100644 Documentation/UIRenderer.html create mode 100644 Documentation/UIVerticalLister.html create mode 100644 Documentation/UIVerticalMultiSplitter.html create mode 100644 Documentation/UIVerticalSplitter.html create mode 100644 Documentation/UsableInventoryItem.html create mode 100644 Documentation/UsableInventoryItemFunctions.html create mode 100644 Documentation/Uuid.html create mode 100644 Documentation/ValueComboBox.html create mode 100644 Documentation/VanillaInventoryItem.html create mode 100644 Documentation/Velocity.html create mode 100644 Documentation/Version.html create mode 100644 Documentation/Weapon.html create mode 100644 Documentation/Weapons.html create mode 100644 Documentation/Window.html create mode 100644 Documentation/WormHole.html create mode 100644 Documentation/WreckageCreator.html create mode 100644 Documentation/dvec2.html create mode 100644 Documentation/dvec3.html create mode 100644 Documentation/dvec4.html create mode 100644 Documentation/index.html create mode 100644 Documentation/ivec2.html create mode 100644 Documentation/ivec3.html create mode 100644 Documentation/ivec4.html create mode 100644 Documentation/stylesheet.css create mode 100644 Documentation/vec2.html create mode 100644 Documentation/vec3.html create mode 100644 Documentation/vec4.html diff --git a/Documentation/Achievements.html b/Documentation/Achievements.html new file mode 100644 index 0000000..03ad0d9 --- /dev/null +++ b/Documentation/Achievements.html @@ -0,0 +1,687 @@ + + + Achievements + + + + +
+
+

Avorion Script API Documentation

+
+
+ +
+
Search:
+ +
+

Achievements

+

+This object is only available on the client. +

+
+
+

+function Achievements()
+

+
+
+

Returns

+
+

+A new instance of Achievements +

+
+

+
+
+
+
+

+function var unlockCavaliersStoryFinished()
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var unlockCommuneStoryFinished()
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var unlockContainerHacked()
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var unlockCoopRiftMission()
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var unlockFamilyStoryFinished()
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var unlockIntoTheRift()
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var unlockMeetIzzy()
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var unlockOverstayAfterTime()
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var unlockProvokedSwoks()
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var unlockRiftDepth75()
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var unlockRiftDepth75SmallShip()
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var unlockRiftMissionMultiShips()
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var unlockRiftStoryCompleted()
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var unlockSaveAllScientists()
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+
+
+ Overview +
Home + Functions + Search +
+
Search:
+Predefined Functions & Example Scripts +
Command +Entity +FactionDatabase +PlanGenerator +Player +Sector +Server +UsableInventoryItem +
+
+

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

+
+ +
+ + diff --git a/Documentation/Alliance [Client] Callbacks.html b/Documentation/Alliance [Client] Callbacks.html new file mode 100644 index 0000000..37b3b45 --- /dev/null +++ b/Documentation/Alliance [Client] Callbacks.html @@ -0,0 +1,1312 @@ + + + Avorion Script Callbacks - Alliance [Client] + + + + +
+
+

Avorion Script API Documentation

+
+
+ +
+
Search:
+ +
+

Alliance [Client] Callbacks

+

+Note: Callbacks have to be buffered in certain situations and won't happen immediately. When unregistering a callback during a callback, all callbacks that were buffered during the last frame may still be sent, even though they were unregistered. +

+
+

+callback onAutoPayCrewsChanged(autoPayCrews)
+

+
+

+Called whenever the auto-pay-crews property was changed +

+

Parameters

+
+autoPayCrews +The new setting for auto-pay-crews
+
+

+
+
+
+

+callback onEmblemChanged(emblem)
+

+
+

+Called whenever the message of the day was changed +

+

Parameters

+
+emblem +The new emblem
+
+

+
+
+
+

+callback onHomeSectorChanged(x, y)
+

+
+

+Called whenever the home sector of the alliance changes +

+

Parameters

+
+x +The x coordinate of the new home sector
+y +The y coordinate of the new home sector
+
+

+
+
+
+

+callback onItemAdded(item, index, amount, amountBefore, tagsChanged)
+

+
+

+Called whenever an item in the alliance inventory is added +

+

Parameters

+
+item +The inventory item
+index +Index of the inventory item
+amount +Amount of items in the slot
+amountBefore +Amount of items in the slot before the change
+tagsChanged +Boolean indicating if the tags of the item changed
+
+

+
+
+
+

+callback onItemChanged(item, index, amount, amountBefore)
+

+
+

+Called whenever an item in the alliance inventory changes +

+

Parameters

+
+item +The inventory item
+index +Index of the inventory item
+amount +Amount of items in the slot
+amountBefore +Amount of items in the slot before the change
+
+

+
+
+
+

+callback onItemPropertiesChanged(item, index, amount)
+

+
+

+Called whenever an item in the alliance inventory changes properties +

+

Parameters

+
+item +The inventory item
+index +Index of the inventory item
+amount +Amount of items in the slot
+
+

+
+
+
+

+callback onItemRemoved(item, index, amount, amountBefore)
+

+
+

+Called whenever an item in the alliance inventory is removed +

+

Parameters

+
+item +The inventory item
+index +Index of the inventory item
+amount +Amount of items in the slot
+amountBefore +Amount of items in the slot before the change
+
+

+
+
+
+

+callback onKnownSectorAdded(x, y)
+

+
+

+Called whenever a new tracked sector is added to the alliance database +

+

Parameters

+
+x +The x coordinate of the sector
+y +The y coordinate of the sector
+
+

+
+
+
+

+callback onKnownSectorRemoved(x, y)
+

+
+

+Called whenever a tracked sector was removed from the alliance database +

+

Parameters

+
+x +The x coordinate of the sector
+y +The y coordinate of the sector
+
+

+
+
+
+

+callback onKnownSectorUpdated(x, y)
+

+
+

+Called whenever a tracked sector is updated in the alliance database +

+

Parameters

+
+x +The x coordinate of the sector
+y +The y coordinate of the sector
+
+

+
+
+
+

+callback onLeaderChanged(index)
+

+
+

+Called whenever the leader of the alliance was changed +

+

Parameters

+
+index +The player index of the new leader
+
+

+
+
+
+

+callback onMemberChanged(index, rank)
+

+
+

+Called whenever a member is changed in the alliance +

+

Parameters

+
+index +The player index of the member
+rank +The rank of the member
+
+

+
+
+
+

+callback onMemberLeft(index)
+

+
+

+Called whenever a member leaves the alliance +

+

Parameters

+
+index +The player index of the ex-member
+
+

+
+
+
+

+callback onMessageOfTheDayChanged(motd)
+

+
+

+Called whenever the message of the day was changed +

+

Parameters

+
+motd +The new message of the day
+
+

+
+
+
+

+callback onNameChanged(newName)
+

+
+

+Called whenever the name of the alliance changes +

+

Parameters

+
+newName +The new name of the alliance
+
+

+
+
+
+

+callback onNewbieRankChanged(name)
+

+
+

+Called whenever the newbie rank was changed +

+

Parameters

+
+name +The name of the new newbie rank
+
+

+
+
+
+

+callback onNewMember(index, rank)
+

+
+

+Called whenever a new member joins the alliance +

+

Parameters

+
+index +The player index of the new member
+rank +The rank of the new member
+
+

+
+
+
+

+callback onNewRank(name, icon, level, privileges)
+

+
+

+Called whenever a new rank is added +

+

Parameters

+
+name +The name of the new rank
+icon +The icon of the rank
+level +The level of the rank
+privileges +The privileges of the rank, as a table with privileges as keys
+
+

+
+
+
+

+callback onRankChanged(name, icon, level, privileges)
+

+
+

+Called whenever a rank is changed +

+

Parameters

+
+name +The name of the changed rank
+icon +The icon of the rank
+level +The level of the rank
+privileges +The privileges of the rank, as a table with privileges as keys
+
+

+
+
+
+

+callback onRankRemoved(name)
+

+
+

+Called whenever a rank was removed +

+

Parameters

+
+name +The name of the removed rank
+
+

+
+
+
+

+callback onRelationChanged(index, level, levelBefore, notify)
+

+
+

+Called whenever relations of the alliance to another faction change +

+

Parameters

+
+index +The index of the other faction
+level +The level of the relation
+levelBefore +The level of the relation before the change
+notify +A boolean indicating whether or not the alliance should be notified about the change
+
+

+
+
+
+

+callback onRelationLevelChanged(index, level, levelBefore, notify)
+

+
+

+Called whenever relation levels of the alliance to another faction change +

+

Parameters

+
+index +The index of the other faction
+level +The level of the relation
+levelBefore +The level of the relation before the change
+notify +A boolean indicating whether or not the alliance should be notified about the change
+
+

+
+
+
+

+callback onRelationStatusChanged(index, status, statusBefore, notify)
+

+
+

+Called whenever the relation status of the alliance to another faction change (relation status is not yet implemented so this callback will most likely not fire until relation status is in) +

+

Parameters

+
+index +The index of the other faction
+status +The status of the relations
+statusBefore +The status of the relation before the change
+notify +A boolean indicating whether or not the alliance should be notified about the change
+
+

+
+
+
+

+callback onResourcesChanged(money, resources, infinite, notify)
+

+
+

+Called whenever the amount of money or resources of the alliance changes +

+

Parameters

+
+money +The amount of money the alliance owns
+resources +The amount of resources the alliance owns, as table
+infinite +True if the alliance has infinite resources, false otherwise
+notify +A boolean indicating whether or not the alliance should be visually notified in some way that the resources changed
+
+

+
+
+
+

+callback onShipAvailabilityUpdated(name, availability)
+

+
+

+Called whenever a ShipInfo changes availability status (ie. goes into background simulation) +

+

Parameters

+
+name +The name of the ship
+availability +The new availability status of the ship
+
+

+
+
+
+

+callback onShipCargoUpdated(name)
+

+
+

+Called whenever the cargo of a ShipInfo changes +

+

Parameters

+
+name +The name of the ship
+
+

+
+
+
+

+callback onShipCrewUpdated(name)
+

+
+

+Called whenever the crew of a ShipInfo changes +

+

Parameters

+
+name +The name of the ship
+
+

+
+
+
+

+callback onShipHyperspacePropertiesUpdated(name, reach, canPassRifts)
+

+
+

+Called whenever the hyperspace reach of a ShipInfo changes +

+

Parameters

+
+name +The name of the ship
+reach +The new reach of the ship
+canPassRifts +A boolean indicating whether the ship can jump across rifts
+
+

+
+
+
+

+callback onShipIconUpdated(name, icon)
+

+
+

+Called whenever the icon of a ShipInfo changes +

+

Parameters

+
+name +The name of the ship
+icon +The new icon of the ship
+
+

+
+
+
+

+callback onShipInfoAdded(name)
+

+
+

+Called whenever a ShipInfo is added to the alliance +

+

Parameters

+
+name +The name of the new ship
+
+

+
+
+
+

+callback onShipInfoRemoved(name)
+

+
+

+Called whenever a ShipInfo is removed from the alliance +

+

Parameters

+
+name +The name of the ship
+
+

+
+
+
+

+callback onShipInfoUpdated(name)
+

+
+

+Called whenever a ShipInfo is updated in some way +

+

Parameters

+
+name +The name of the ship
+
+

+
+
+
+

+callback onShipNameUpdated(name, newName)
+

+
+

+Called whenever the name of a ShipInfo changes +

+

Parameters

+
+name +The name of the ship
+newName +The new name of the ship
+
+

+
+
+
+

+callback onShipOrderInfoUpdated(name, orderInfo)
+

+
+

+Called whenever the order info of a ShipInfo changes +

+

Parameters

+
+name +The name of the ship
+orderInfo +The order info of the ship
+
+

+
+
+
+

+callback onShipPayDayUpdated(name, time)
+

+
+

+Called whenever the payday of a ShipInfo changes +

+

Parameters

+
+name +The name of the ship
+time +The payday of the ship
+
+

+
+
+
+

+callback onShipPlanUpdated(name)
+

+
+

+Called whenever the plan of a ShipInfo changes +

+

Parameters

+
+name +The name of the ship
+
+

+
+
+
+

+callback onShipPositionUpdated(name, x, y)
+

+
+

+Called whenever a ShipInfo changes sectors +

+

Parameters

+
+name +The name of the ship
+x +The new x coordinate of the ship
+y +The new y coordinate of the ship
+
+

+
+
+
+

+callback onShipReconstructionValueUpdated(name, value)
+

+
+

+Called whenever the reconstruction value of a ShipInfo changes +

+

Parameters

+
+name +The name of the ship
+value +The value of the ship
+
+

+
+
+
+

+callback onShipStatusMessageUpdated(name, status, args)
+

+
+

+Called whenever the status info of a ShipInfo changes +

+

Parameters

+
+name +The name of the ship
+status +The status info text of the ship
+args +A table holding the status info localization arguments
+
+

+
+
+
+

+callback onShipTitleUpdated(name)
+

+
+

+Called whenever the title of a ShipInfo changes +

+

Parameters

+
+name +The name of the ship
+
+

+
+
+
+

+callback onShipTypeUpdated(name, type)
+

+
+

+Called whenever the entity type of a ShipInfo changes +

+

Parameters

+
+name +The name of the ship
+type +The new entity type of the ship
+
+

+
+
+
+

+callback onStateFormChanged(newForm)
+

+
+

+Called whenever the state form of the alliance changes +

+

Parameters

+
+newForm +The new state form of the alliance
+
+

+
+
+
+

+callback onTraitChanged(trait, value)
+

+
+

+Called whenever a "personality" trait of the alliance changes +

+

Parameters

+
+trait +The name of the trait that was changed
+value +The value of the new trait, from -1 to 1
+
+

+
+
+
+
+
+
+ Overview +
Home + Functions + Search +
+
Search:
+Predefined Functions & Example Scripts +
Command +Entity +FactionDatabase +PlanGenerator +Player +Sector +Server +UsableInventoryItem +
+
+

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

+
+ +
+ + diff --git a/Documentation/Alliance [Client].html b/Documentation/Alliance [Client].html new file mode 100644 index 0000000..178def5 --- /dev/null +++ b/Documentation/Alliance [Client].html @@ -0,0 +1,1335 @@ + + + Alliance [Client] + + + + +
+
+

Avorion Script API Documentation

+
+
+ +
+
Search:
+ +
+

Alliance [Client]

+

+This object is only available on the client. +

+
+
+

+function Alliance()
+

+
+
+

Returns

+
+

+A new instance of Alliance +

+
+

+
+
+
+
+ +
property string fullLogId[read-only]
+
+
+
+
+ +
property int index[read-only]
+
+
+
+
+ +
property bool infiniteResources
+
+
+
+
+ +
property bool isAIFaction[read-only]
+
+
+
+
+ +
property bool isAlliance[read-only]
+
+
+
+
+ +
property bool isPlayer[read-only]
+
+
+
+
+ +
property int maxNumShips[read-only]
+
+
+
+
+ +
property int maxNumStations[read-only]
+
+
+
+
+ +
property int money[read-only]
+
+
+
+
+ +
property string name[read-only]
+
+
+
+
+ +
property unsigned int numShips[read-only]
+
+
+
+
+
+
+

+function var addRank(string name, string lowerName)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var addRankPrivilege(string rank, int privilege)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function int callbacksRegistered(string callbackName, var functionName)
+

+
+
+

+Check how many functions are registered to a callback from the current script VM. +

+

Parameters

+
+callbackName +The name of the callback
+functionName +The name of the function for which to check. If nil, will count all functions that are registered to this callback.
+
+

Returns

+
+

+The amount of functions registered to the callback +

+
+

+
+
+
+
+

+function bool, string, table<int, string> canPay()
+

+
+
+

+
+
+
+
+

+function bool contains(int playerIndex)
+

+
+
+

+
+
+
+
+

+function Relation... getAllRelations()
+

+
+
+

+
+
+
+
+

+function int, int getHomeSectorCoordinates()
+

+
+
+

+
+
+
+
+

+function Inventory getInventory()
+

+
+
+

+
+
+
+
+

+function SectorView getKnownSector(int x, int y)
+

+
+
+

+
+
+
+
+

+function ivec2... getKnownSectorCoordinates()
+

+
+
+

+
+
+
+
+

+function SectorView... getKnownSectors()
+

+
+
+

+
+
+
+
+

+function SectorView... getKnownSectorsOfFaction(int factionIndex)
+

+
+
+

+
+
+
+
+

+function SectorView... getKnownSectorsWithFaction(int factionIndex)
+

+
+
+

+
+
+
+
+

+function int, int getMemberLocation(int playerIndex)
+

+
+
+

+
+
+
+
+

+function AllianceRank getMemberRank(int playerIndex)
+

+
+
+

+
+
+
+
+

+function string... getNamesOfShipsInSector(int x, int y)
+

+
+
+

+
+
+
+
+

+function PlanStyle getPlanStyle(string name)
+

+
+
+

+
+
+
+
+

+function string... getPlanStyleNames()
+

+
+
+

+
+
+
+
+

+function AllianceRank getRank(string name)
+

+
+
+

+
+
+
+
+

+function Relation getRelation(int factionIndex)
+

+
+
+

+
+
+
+
+

+function int getRelations(int factionIndex)
+

+
+
+

+
+
+
+
+

+function int getRelationStatus(int factionIndex)
+

+
+
+

+
+
+
+
+

+function Resources getResources()
+

+
+
+

+
+
+
+
+

+function ShipAvailability getShipAvailability(string name)
+

+
+
+

+
+
+
+
+

+function Box getShipBoundingBox(string name)
+

+
+
+

+
+
+
+
+

+function bool getShipCanPassRifts(string name)
+

+
+
+

+
+
+
+
+

+function CargoBay getShipCargo(string name)
+

+
+
+

+
+
+
+
+

+function table<TradingGood, int> getShipCargos(string name)
+

+
+
+

+
+
+
+
+

+function bool getShipDestroyed(string name)
+

+
+
+

+
+
+
+
+

+function float getShipHyperspaceReach(string name)
+

+
+
+

+
+
+
+
+

+function string getShipIcon(string name)
+

+
+
+

+
+
+
+
+

+function string... getShipNames()
+

+
+
+

+
+
+
+
+

+function string getShipOrderInfo(string name)
+

+
+
+

+
+
+
+
+

+function float getShipPayment(string name)
+

+
+
+

+
+
+
+
+

+function float getShipPaymentTime(string name)
+

+
+
+

+
+
+
+
+

+function BlockPlan getShipPlan(string name)
+

+
+
+

+
+
+
+
+

+function Coordinates getShipPosition(string name)
+

+
+
+

+
+
+
+
+

+function double getShipReconstructionValue(string name)
+

+
+
+

+
+
+
+
+

+function string getShipStatus(string name)
+

+
+
+

+
+
+
+
+

+function ShipInfoUpgrade... getShipSystems(string name)
+

+
+
+

+
+
+
+
+

+function table<int, TurretDesign> getShipTurretDesigns(string name)
+

+
+
+

+
+
+
+
+

+function int getShipType(string name)
+

+
+
+

+
+
+
+
+

+function bool hasPrivilege(int playerIndex, int privilege)
+

+
+
+

+
+
+
+
+

+function var... invokeFunction(var scriptName, string functionName, var... arguments)
+

+
+
+

+Invokes a function in a script of the alliance. Use this function to invoke functions from one script in another script. The first return value of the function is an integer indicating whether or not the call was successful. When it was, this integer is followed by the return values of the invoked function. +

+

Parameters

+
+scriptName +The name of the script containing the function
+functionName +The name of the function that will be executed
+arguments +An arbitrary list of arguments that will be given to the invoked function. Only numbers, std::strings and nil are supported here.
+
+

Returns

+
+

+Returns at least 1 value indicating if the call succeeded:
0 The call was successful. In this case, the return values of the script are returned in addition to the call result, following the call result.
3 The call failed because the given script was not found in the alliance.
4 The call failed because the given function was not found in the script.
5 The call failed because the script's state has errors and is invalid
+

+
+

+
+
+
+
+

+function bool knowsFaction(int factionIndex)
+

+
+
+

+
+
+
+
+

+function bool knowsSector(int x, int y)
+

+
+
+

+
+
+
+
+

+function var moveRank(string name, string lowerName)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function bool ownsShip(string name)
+

+
+
+

+
+
+
+
+

+function bool rankExists(string rank)
+

+
+
+

+
+
+
+
+

+function var registerCallback(string callbackName, string functionName)
+

+
+
+

+Register a callback in the alliance. The callback will be removed when the sector is changed or the receiver, if it's an entity, is destroyed. Double registration of callbacks doesn't work. When the same callback to the same callback of the same script instance is registered twice, it will still only be called once. +

+

Parameters

+
+callbackName +The name of the callback
+functionName +The name of the function that will be executed in the script when the callback happens
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var removeRank(string name)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var removeRankPrivilege(string rankName, int privilege)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var sendCallback()
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var setMemberRank(int playerIndex, string rank)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var unregisterCallback(string , string )
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+
+
+ Overview +
Home + Functions + Search +
+
Search:
+Predefined Functions & Example Scripts +
Command +Entity +FactionDatabase +PlanGenerator +Player +Sector +Server +UsableInventoryItem +
+
+

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

+
+ +
+ + diff --git a/Documentation/Alliance [Server] Callbacks.html b/Documentation/Alliance [Server] Callbacks.html new file mode 100644 index 0000000..2589523 --- /dev/null +++ b/Documentation/Alliance [Server] Callbacks.html @@ -0,0 +1,406 @@ + + + Avorion Script Callbacks - Alliance [Server] + + + + +
+
+

Avorion Script API Documentation

+
+
+ +
+
Search:
+
+
+ + +
+onEmblemChanged +
+
+
+
+

Alliance [Server] Callbacks

+
+

+callback onEmblemChanged()
+

+
+

+Called whenever the message of the day was changed +

+

+
+
+
+
+
+
+ Overview +
Home + Functions + Search +
+
Search:
+Predefined Functions & Example Scripts +
Command +Entity +FactionDatabase +PlanGenerator +Player +Sector +Server +UsableInventoryItem +
+
+

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

+
+ +
+ + diff --git a/Documentation/Alliance [Server] Callbacks.html b/Documentation/Alliance [Server] Callbacks.html new file mode 100644 index 0000000..80508a9 --- /dev/null +++ b/Documentation/Alliance [Server] Callbacks.html @@ -0,0 +1,1339 @@ + + + Avorion Script Callbacks - Alliance [Server] + + + + +
+
+

Avorion Script API Documentation

+
+
+ +
+
Search:
+ +
+

Alliance [Server] Callbacks

+

+IMPORTANT Note: Alliances can be unloaded from RAM and saved to hard disk when no members are active and no sectors containing their ships are loaded in RAM. When an alliance is unloaded to hard disk, all its callbacks will be silently terminated. Due to technical reasons, this cannot be avoided. You should only register callbacks to Alliances when you know that they won't be unloaded.
Those situations are:
- In Player scripts when that player is a member
- Alliance entity scripts
- Alliance scripts
- Client scripts when local player is in an alliance

Note: Callbacks have to be buffered in certain situations and won't happen immediately. When unregistering a callback during a callback, all callbacks that were buffered during the last frame may still be sent, even though they were unregistered. +

+
+

+callback onAutoPayCrewsChanged(autoPayCrews)
+

+
+

+Called whenever the auto-pay-crews property was changed +

+

Parameters

+
+autoPayCrews +The new setting for auto-pay-crews
+
+

+
+
+
+

+callback onHomeSectorChanged(x, y)
+

+
+

+Called whenever the home sector of the alliance changes +

+

Parameters

+
+x +The x coordinate of the new home sector
+y +The y coordinate of the new home sector
+
+

+
+
+
+

+callback onItemAdded(item, index, amount, amountBefore, tagsChanged)
+

+
+

+Called whenever an item in the alliance inventory is added +

+

Parameters

+
+item +The inventory item
+index +Index of the inventory item
+amount +Amount of items in the slot
+amountBefore +Amount of items in the slot before the change
+tagsChanged +Boolean indicating if the tags of the item changed
+
+

+
+
+
+

+callback onItemChanged(item, index, amount, amountBefore)
+

+
+

+Called whenever an item in the alliance inventory changes +

+

Parameters

+
+item +The inventory item
+index +Index of the inventory item
+amount +Amount of items in the slot
+amountBefore +Amount of items in the slot before the change
+
+

+
+
+
+

+callback onItemPropertiesChanged(item, index, amount)
+

+
+

+Called whenever an item in the alliance inventory changes properties +

+

Parameters

+
+item +The inventory item
+index +Index of the inventory item
+amount +Amount of items in the slot
+
+

+
+
+
+

+callback onItemRemoved(item, index, amount, amountBefore)
+

+
+

+Called whenever an item in the alliance inventory is removed +

+

Parameters

+
+item +The inventory item
+index +Index of the inventory item
+amount +Amount of items in the slot
+amountBefore +Amount of items in the slot before the change
+
+

+
+
+
+

+callback onKnownSectorAdded(x, y)
+

+
+

+Called whenever a new tracked sector is added to the alliance database +

+

Parameters

+
+x +The x coordinate of the sector
+y +The y coordinate of the sector
+
+

+
+
+
+

+callback onKnownSectorRemoved(x, y)
+

+
+

+Called whenever a tracked sector was removed from the alliance database +

+

Parameters

+
+x +The x coordinate of the sector
+y +The y coordinate of the sector
+
+

+
+
+
+

+callback onKnownSectorUpdated(x, y)
+

+
+

+Called whenever a tracked sector is updated in the alliance database +

+

Parameters

+
+x +The x coordinate of the sector
+y +The y coordinate of the sector
+
+

+
+
+
+

+callback onLeaderChanged(index)
+

+
+

+Called whenever the leader of the alliance was changed +

+

Parameters

+
+index +The player index of the new leader
+
+

+
+
+
+

+callback onMemberChanged(index, rank)
+

+
+

+Called whenever a member is changed in the alliance +

+

Parameters

+
+index +The player index of the member
+rank +The rank of the member
+
+

+
+
+
+

+callback onMemberLeft(index)
+

+
+

+Called whenever a member leaves the alliance +

+

Parameters

+
+index +The player index of the ex-member
+
+

+
+
+
+

+callback onMessageOfTheDayChanged(motd)
+

+
+

+Called whenever the message of the day was changed +

+

Parameters

+
+motd +The new message of the day
+
+

+
+
+
+

+callback onNameChanged(newName)
+

+
+

+Called whenever the name of the alliance changes +

+

Parameters

+
+newName +The new name of the alliance
+
+

+
+
+
+

+callback onNewbieRankChanged(name)
+

+
+

+Called whenever the newbie rank was changed +

+

Parameters

+
+name +The name of the new newbie rank
+
+

+
+
+
+

+callback onNewMember(index, rank)
+

+
+

+Called whenever a new member joins the alliance +

+

Parameters

+
+index +The player index of the new member
+rank +The rank of the new member
+
+

+
+
+
+

+callback onNewRank(name, icon, level, privileges)
+

+
+

+Called whenever a new rank is added +

+

Parameters

+
+name +The name of the new rank
+icon +The icon of the rank
+level +The level of the rank
+privileges +The privileges of the rank, as a table with privileges as keys
+
+

+
+
+
+

+callback onRankChanged(name, icon, level, privileges)
+

+
+

+Called whenever a rank is changed +

+

Parameters

+
+name +The name of the changed rank
+icon +The icon of the rank
+level +The level of the rank
+privileges +The privileges of the rank, as a table with privileges as keys
+
+

+
+
+
+

+callback onRankRemoved(name)
+

+
+

+Called whenever a rank was removed +

+

Parameters

+
+name +The name of the removed rank
+
+

+
+
+
+

+callback onRelationChanged(index, level, levelBefore, notify)
+

+
+

+Called whenever relations of the alliance to another faction change +

+

Parameters

+
+index +The index of the other faction
+level +The level of the relation
+levelBefore +The level of the relation before the change
+notify +A boolean indicating whether or not the alliance should be notified about the change
+
+

+
+
+
+

+callback onRelationLevelChanged(index, level, levelBefore, notify)
+

+
+

+Called whenever relation levels of the alliance to another faction change +

+

Parameters

+
+index +The index of the other faction
+level +The level of the relation
+levelBefore +The level of the relation before the change
+notify +A boolean indicating whether or not the alliance should be notified about the change
+
+

+
+
+
+

+callback onRelationStatusChanged(index, status, statusBefore, notify)
+

+
+

+Called whenever the relation status of the alliance to another faction change (relation status is not yet implemented so this callback will most likely not fire until relation status is in) +

+

Parameters

+
+index +The index of the other faction
+status +The status of the relations
+statusBefore +The status of the relation before the change
+notify +A boolean indicating whether or not the alliance should be notified about the change
+
+

+
+
+
+

+callback onResourcesChanged(money, resources, infinite, notify)
+

+
+

+Called whenever the amount of money or resources of the alliance changes +

+

Parameters

+
+money +The amount of money the alliance owns
+resources +The amount of resources the alliance owns, as table
+infinite +True if the alliance has infinite resources, false otherwise
+notify +A boolean indicating whether or not the alliance should be visually notified in some way that the resources changed
+
+

+
+
+
+

+callback onScriptAdded(allianceIndex, scriptIndex, scriptPath)
+

+
+

+Executed after a script was added to the alliance +

+

Parameters

+
+allianceIndex +The index of the alliance
+scriptIndex +The index of the script that was added
+scriptPath +The path of the old script
+
+

+
+
+
+

+callback onScriptRemoved(allianceIndex, oldScriptIndex, scriptPath)
+

+
+

+Executed after a script was removed from the alliance +

+

Parameters

+
+allianceIndex +The index of the alliance
+oldScriptIndex +The old index of the script that was removed
+scriptPath +The path of the old script
+
+

+
+
+
+

+callback onShipAvailabilityUpdated(name, availability)
+

+
+

+Called whenever a ShipInfo changes availability status (ie. goes into background simulation) +

+

Parameters

+
+name +The name of the ship
+availability +The new availability status of the ship
+
+

+
+
+
+

+callback onShipCargoUpdated(name)
+

+
+

+Called whenever the cargo of a ShipInfo changes +

+

Parameters

+
+name +The name of the ship
+
+

+
+
+
+

+callback onShipCrewUpdated(name)
+

+
+

+Called whenever the crew of a ShipInfo changes +

+

Parameters

+
+name +The name of the ship
+
+

+
+
+
+

+callback onShipHyperspacePropertiesUpdated(name, reach, canPassRifts)
+

+
+

+Called whenever the hyperspace reach of a ShipInfo changes +

+

Parameters

+
+name +The name of the ship
+reach +The new reach of the ship
+canPassRifts +A boolean indicating whether the ship can jump across rifts
+
+

+
+
+
+

+callback onShipIconUpdated(name, icon)
+

+
+

+Called whenever the icon of a ShipInfo changes +

+

Parameters

+
+name +The name of the ship
+icon +The new icon of the ship
+
+

+
+
+
+

+callback onShipInfoAdded(name)
+

+
+

+Called whenever a ShipInfo is added to the alliance +

+

Parameters

+
+name +The name of the new ship
+
+

+
+
+
+

+callback onShipInfoRemoved(name)
+

+
+

+Called whenever a ShipInfo is removed from the alliance +

+

Parameters

+
+name +The name of the ship
+
+

+
+
+
+

+callback onShipInfoUpdated(name)
+

+
+

+Called whenever a ShipInfo is updated in some way +

+

Parameters

+
+name +The name of the ship
+
+

+
+
+
+

+callback onShipNameUpdated(name, newName)
+

+
+

+Called whenever the name of a ShipInfo changes +

+

Parameters

+
+name +The name of the ship
+newName +The new name of the ship
+
+

+
+
+
+

+callback onShipOrderInfoUpdated(name, orderInfo)
+

+
+

+Called whenever the order info of a ShipInfo changes +

+

Parameters

+
+name +The name of the ship
+orderInfo +The order info of the ship
+
+

+
+
+
+

+callback onShipPayDayUpdated(name, time)
+

+
+

+Called whenever the payday of a ShipInfo changes +

+

Parameters

+
+name +The name of the ship
+time +The payday of the ship
+
+

+
+
+
+

+callback onShipPlanUpdated(name)
+

+
+

+Called whenever the plan of a ShipInfo changes +

+

Parameters

+
+name +The name of the ship
+
+

+
+
+
+

+callback onShipPositionUpdated(name, x, y)
+

+
+

+Called whenever a ShipInfo changes sectors +

+

Parameters

+
+name +The name of the ship
+x +The new x coordinate of the ship
+y +The new y coordinate of the ship
+
+

+
+
+
+

+callback onShipReconstructionValueUpdated(name, value)
+

+
+

+Called whenever the reconstruction value of a ShipInfo changes +

+

Parameters

+
+name +The name of the ship
+value +The value of the ship
+
+

+
+
+
+

+callback onShipStatusMessageUpdated(name, status, args)
+

+
+

+Called whenever the status info of a ShipInfo changes +

+

Parameters

+
+name +The name of the ship
+status +The status info text of the ship
+args +A table holding the status info localization arguments
+
+

+
+
+
+

+callback onShipTitleUpdated(name)
+

+
+

+Called whenever the title of a ShipInfo changes +

+

Parameters

+
+name +The name of the ship
+
+

+
+
+
+

+callback onShipTypeUpdated(name, type)
+

+
+

+Called whenever the entity type of a ShipInfo changes +

+

Parameters

+
+name +The name of the ship
+type +The new entity type of the ship
+
+

+
+
+
+

+callback onStateFormChanged(newForm)
+

+
+

+Called whenever the state form of the alliance changes +

+

Parameters

+
+newForm +The new state form of the alliance
+
+

+
+
+
+

+callback onTraitChanged(trait, value)
+

+
+

+Called whenever a "personality" trait of the alliance changes +

+

Parameters

+
+trait +The name of the trait that was changed
+value +The value of the new trait, from -1 to 1
+
+

+
+
+
+
+
+
+ Overview +
Home + Functions + Search +
+
Search:
+Predefined Functions & Example Scripts +
Command +Entity +FactionDatabase +PlanGenerator +Player +Sector +Server +UsableInventoryItem +
+
+

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

+
+ +
+ + diff --git a/Documentation/Alliance [Server].html b/Documentation/Alliance [Server].html new file mode 100644 index 0000000..4bec9b6 --- /dev/null +++ b/Documentation/Alliance [Server].html @@ -0,0 +1,2573 @@ + + + Alliance [Server] + + + + +
+
+

Avorion Script API Documentation

+
+
+ +
+
Search:
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Alliance [Server] +Alliance +

Properties
+leader +
+maxNumShips +
+maxNumStations +
+numCrafts +
+numShips +
+numStations +
+alwaysAtWar +
+baseName +
+fullLogId +
+homeSectorUnknown +
+index +
+infiniteResources +
+initialRelations +
+initialRelationsToPlayer +
+isAIFaction +
+isAlliance +
+isPlayer +
+money +
+name +
+stateForm +
+staticRelationsToAI +
+staticRelationsToAll +
+staticRelationsToPlayers +
+unformattedName +

Member Functions
+addKnownSector +
+addRank +
+addRankPrivilege +
+addScript +
+addScriptOnce +
+callbacksRegistered +
+contains +
+createCraftFromShipInfo +
+getKnownSector +
+getKnownSectorCoordinates +
+getKnownSectors +
+getKnownSectorsOfFaction +
+getKnownSectorsWithFaction +
+getMemberLocation +
+getMemberRank +
+getMembers +
+getNamesOfShipsInSector +
+getNewMemberRank +
+getOnlineMembers +
+getRank +
+getScripts +
+getShipAvailability +
+getShipBoundingBox +
+getShipCanPassRifts +
+getShipCargo +
+getShipCargos +
+getShipCrew +
+getShipDestroyed +
+getShipHyperspaceReach +
+getShipIcon +
+getShipNames +
+getShipOrderInfo +
+getShipPayment +
+getShipPaymentTime +
+getShipPlan +
+getShipPosition +
+getShipReconstructionValue +
+getShipStatus +
+getShipSystems +
+getShipTurretDesigns +
+getShipType +
+hasPrivilege +
+hasScript +
+invokeFunction +
+knowsSector +
+moveRank +
+ownsShip +
+rankExists +
+registerCallback +
+removeDestroyedShipInfo +
+removeKnownSector +
+removeRank +
+removeRankPrivilege +
+removeScript +
+resolveScriptPath +
+restoreCraft +
+restoreTurrets +
+sendCallback +
+sendChatMessage +
+setMemberRank +
+setNewMemberRank +
+setShipAvailability +
+setShipDestroyed +
+setShipIcon +
+setShipOrderInfo +
+setShipReconstructionValue +
+unregisterCallback +
+updateKnownSector +
+updateKnownSectorPreserveNote +
+addPlanStyle +
+canPay +
+canPayMoney +
+canPayResource +
+clearValues +
+getAllRelations +
+getHomeSectorCoordinates +
+getInventory +
+getLanguage +
+getPlanStyle +
+getPlanStyleNames +
+getRelation +
+getRelations +
+getRelationStatus +
+getResources +
+getTrait +
+getTraits +
+getValue +
+getValues +
+hasStaticRelationsToFaction +
+knowsFaction +
+pay +
+payResource +
+payWithoutNotify +
+receive +
+receiveResource +
+receiveWithoutNotify +
+sendCallback +
+sendChatMessage +
+setHomeSectorCoordinates +
+setLanguage +
+setResources +
+setStaticRelationsToFaction +
+setTrait +
+setValue +
+
+
+
+

Alliance [Server] : Faction [Server]

+

+This object is only available on the server. +

+
+
+

+function Alliance(var index)
+

+
+
+

Returns

+
+

+A new instance of Alliance +

+
+

+
+
+
+
+ +
property int leader
+
+
+
+
+ +
property int maxNumShips[read-only]
+
+
+
+
+ +
property int maxNumStations[read-only]
+
+
+
+
+ +
property unsigned int numCrafts[read-only]
+
+
+
+
+ +
property int numShips[read-only]
+
+
+
+
+ +
property int numStations[read-only]
+
+
+
+
+ +
property bool alwaysAtWar
+
+
+
+
+ +
property string baseName
+
+
+
+
+ +
property string fullLogId[read-only]
+
+
+
+
+ +
property bool homeSectorUnknown
+
+
+
+
+ +
property int index[read-only]
+
+
+
+
+ +
property bool infiniteResources
+
+
+
+
+ +
property int initialRelations
+
+Note: AIFactions only +
+
+
+ +
property int initialRelationsToPlayer
+
+Note: AIFactions only +
+
+
+ +
property bool isAIFaction[read-only]
+
+
+
+
+ +
property bool isAlliance[read-only]
+
+
+
+
+ +
property bool isPlayer[read-only]
+
+
+
+
+ +
property int money
+
+
+
+
+ +
property string name[read-only]
+
+
+
+
+ +
property string stateForm
+
+
+
+
+ +
property bool staticRelationsToAI
+
+
+
+
+ +
property bool staticRelationsToAll
+
+
+
+
+ +
property bool staticRelationsToPlayers
+
+
+
+
+ +
property Format unformattedName[read-only]
+
+
+
+
+
+
+

+function var addKnownSector(SectorView view)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var addRank(string name, string lowerName)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var addRankPrivilege(string rank, int privilege)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var addScript()
+

+
+
+

+
+
+
+
+

+function var addScriptOnce()
+

+
+
+

+
+
+
+
+

+function int callbacksRegistered(string callbackName, var functionName)
+

+
+
+

+Check how many functions are registered to a callback from the current script VM. +

+

Parameters

+
+callbackName +The name of the callback
+functionName +The name of the function for which to check. If nil, will count all functions that are registered to this callback.
+
+

Returns

+
+

+The amount of functions registered to the callback +

+
+

+
+
+
+
+

+function bool contains(int playerIndex)
+

+
+
+

+
+
+
+
+

+function Entity createCraftFromShipInfo(string name, Matrix position, var faction)
+

+
+
+

+
+
+
+
+

+function SectorView getKnownSector(int x, int y)
+

+
+
+

+
+
+
+
+

+function ivec2... getKnownSectorCoordinates()
+

+
+
+

+
+
+
+
+

+function SectorView... getKnownSectors()
+

+
+
+

+
+
+
+
+

+function SectorView... getKnownSectorsOfFaction(int factionIndex)
+

+
+
+

+
+
+
+
+

+function SectorView... getKnownSectorsWithFaction(int factionIndex)
+

+
+
+

+
+
+
+
+

+function int, int getMemberLocation(int playerIndex)
+

+
+
+

+
+
+
+
+

+function AllianceRank getMemberRank(int playerIndex)
+

+
+
+

+
+
+
+
+

+function table<int, Member> getMembers()
+

+
+
+

+
+
+
+
+

+function string... getNamesOfShipsInSector(int x, int y)
+

+
+
+

+
+
+
+
+

+function string getNewMemberRank()
+

+
+
+

+
+
+
+
+

+function int... getOnlineMembers()
+

+
+
+

+
+
+
+
+

+function AllianceRank getRank(string name)
+

+
+
+

+
+
+
+
+

+function table<int, string> getScripts()
+

+
+
+

+
+
+
+
+

+function ShipAvailability getShipAvailability(string name)
+

+
+
+

+
+
+
+
+

+function Box getShipBoundingBox(string name)
+

+
+
+

+
+
+
+
+

+function bool getShipCanPassRifts(string name)
+

+
+
+

+
+
+
+
+

+function CargoBay getShipCargo(string name)
+

+
+
+

+
+
+
+
+

+function table<TradingGood, int> getShipCargos(string name)
+

+
+
+

+
+
+
+
+

+function Crew getShipCrew(string name)
+

+
+
+

+
+
+
+
+

+function bool getShipDestroyed(string name)
+

+
+
+

+
+
+
+
+

+function float getShipHyperspaceReach(string name)
+

+
+
+

+
+
+
+
+

+function string getShipIcon(string name)
+

+
+
+

+
+
+
+
+

+function string... getShipNames()
+

+
+
+

+
+
+
+
+

+function string getShipOrderInfo(string name)
+

+
+
+

+
+
+
+
+

+function float getShipPayment(string name)
+

+
+
+

+
+
+
+
+

+function float getShipPaymentTime(string name)
+

+
+
+

+
+
+
+
+

+function BlockPlan getShipPlan(string name)
+

+
+
+

+
+
+
+
+

+function Coordinates getShipPosition(string name)
+

+
+
+

+
+
+
+
+

+function double getShipReconstructionValue(string name)
+

+
+
+

+
+
+
+
+

+function string getShipStatus(string name)
+

+
+
+

+
+
+
+
+

+function ShipInfoUpgrade... getShipSystems(string name)
+

+
+
+

+
+
+
+
+

+function table<int, TurretDesign> getShipTurretDesigns(string name)
+

+
+
+

+
+
+
+
+

+function int getShipType(string name)
+

+
+
+

+
+
+
+
+

+function bool hasPrivilege(int playerIndex, int privilege)
+

+
+
+

+
+
+
+
+

+function var hasScript(string name)
+

+
+
+

+
+
+
+
+

+function var... invokeFunction()
+

+
+
+

+
+
+
+
+

+function bool knowsSector(int x, int y)
+

+
+
+

+
+
+
+
+

+function var moveRank(string name, string lowerName)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function bool ownsShip(string name)
+

+
+
+

+
+
+
+
+

+function bool rankExists(string rank)
+

+
+
+

+
+
+
+
+

+function var registerCallback(string callbackName, string functionName)
+

+
+
+

+Register a callback in the player. The callback will be removed when the sector is changed or the receiver, if it's an entity, is destroyed. Double registration of callbacks doesn't work. When the same callback to the same callback of the same script instance is registered twice, it will still only be called once. +

+

Parameters

+
+callbackName +The name of the callback
+functionName +The name of the function that will be executed in the script when the callback happens
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var removeDestroyedShipInfo(string name)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var removeKnownSector(int x, int y)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var removeRank(string name)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var removeRankPrivilege(string rankName, int privilege)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var removeScript(var script)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var resolveScriptPath(string path)
+

+
+
+

+
+
+
+
+

+function Entity restoreCraft(string name, Matrix position, bool withMalus)
+

+
+
+

+
+
+
+
+

+function var restoreTurrets(Entity scriptCraft)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var sendCallback()
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var sendChatMessage(var sender, int messageType, string message, PluralForm... args)
+

+
+
+

+Send a chat message to the player. Supports sending of format arguments so that the message can be translated on the client. +

+

Parameters

+
+sender +The sender that will be displayed for the chat message
+messageType +The type of chat message, 0 = Normal, 1 = Error, 2 = Warning, 3 = Info
+message +The message that will be sent
+args +The format arguments that will be sent
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var setMemberRank(int playerIndex, string rank)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var setNewMemberRank(string rank)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var setShipAvailability(string name, ShipAvailability availability)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var setShipDestroyed(string name, bool value)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var setShipIcon(string name, string icon)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var setShipOrderInfo(string name, var value)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var setShipReconstructionValue(string name, double value)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var unregisterCallback(string , string )
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var updateKnownSector(SectorView view)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var updateKnownSectorPreserveNote(SectorView view)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var addPlanStyle(string name, PlanStyle style)
+

+
+
+

+Inherited from Faction [Server] + +

+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function bool, string, table<int, string> canPay()
+

+
+
+

+Inherited from Faction [Server] + +

+

+
+
+
+
+

+function bool, string, table<int, string> canPayMoney(int money)
+

+
+
+

+Inherited from Faction [Server] + +

+

+
+
+
+
+

+function bool, string, table<int, string> canPayResource(Material material, int amount)
+

+
+
+

+Inherited from Faction [Server] + +

+

+
+
+
+
+

+function var clearValues()
+

+
+
+

+Removes all custom values of the object Inherited from Faction [Server] + +

+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function Relation... getAllRelations()
+

+
+
+

+Inherited from Faction [Server] + +

+

+
+
+
+
+

+function int, int getHomeSectorCoordinates()
+

+
+
+

+Inherited from Faction [Server] + +

+

+
+
+
+
+

+function Inventory getInventory()
+

+
+
+

+Inherited from Faction [Server] + +

+

+
+
+
+
+

+function Language getLanguage()
+

+
+
+

+Inherited from Faction [Server] + +

+

+
+
+
+
+

+function PlanStyle getPlanStyle(string name)
+

+
+
+

+Inherited from Faction [Server] + +

+

+
+
+
+
+

+function string... getPlanStyleNames()
+

+
+
+

+Inherited from Faction [Server] + +

+

+
+
+
+
+

+function Relation getRelation(int otherFactionIndex)
+

+
+
+

+Inherited from Faction [Server] + +

+

+
+
+
+
+

+function int getRelations(int factionIndex)
+

+
+
+

+Inherited from Faction [Server] + +

+

+
+
+
+
+

+function int getRelationStatus(int factionIndex)
+

+
+
+

+Inherited from Faction [Server] + +

+

+
+
+
+
+

+function int... getResources()
+

+
+
+

+Inherited from Faction [Server] + +

+

+
+
+
+
+

+function float getTrait(string trait)
+

+
+
+

+Retrieves a trait value associated with a key Inherited from Faction [Server] + +

+

Parameters

+
+trait +The name of the trait
+
+

Returns

+
+

+The trait value associated with the key +

+
+

+
+
+
+
+

+function table<string, float> getTraits()
+

+
+
+

+Retrieves all key-value trait pairs of the faction Inherited from Faction [Server] + +

+

Returns

+
+

+A table containing all custom key-value pairs +

+
+

+
+
+
+
+

+function var getValue(string key)
+

+
+
+

+Retrieves a custom value saved in the entity with the given key Inherited from Faction [Server] + +

+

Parameters

+
+key +A string that serves as the name of the value
+
+

Returns

+
+

+The value if the key exists, otherwise nil +

+
+

+
+
+
+
+

+function table<string, var> getValues()
+

+
+
+

+Retrieves all key-value pairs of custom values Inherited from Faction [Server] + +

+

Returns

+
+

+A table containing all custom key-value pairs +

+
+

+
+
+
+
+

+function bool hasStaticRelationsToFaction(int factionIndex)
+

+
+
+

+Inherited from Faction [Server] + +

+

+
+
+
+
+

+function bool knowsFaction(int factionIndex)
+

+
+
+

+Inherited from Faction [Server] + +

+

+
+
+
+
+

+function var pay(string or Format [optional] description, int money, int... resources)
+

+
+
+

+Makes the faction pay a certain amount of money and resources. If the faction can't pay, the respective money and resources will be set to 0. This function accepts an optional string for Format as first argument, as an economy notification describing the transaction that will be sent to the player, in case the faction is a player.
To ease handling of transaction descriptions, the format description (if set) will receive all the remaining arguments given to the pay() function as format arguments, in the same order as they are given to the function. Dots for easier reading will be inserted as well. Examples:

faction:pay("Paid %1% Credits and %2% iron.", 50000, 250)
-> "Paid 50.000 Credits and 250 iron."

faction:pay(Format("%1% paid %2% Credits and %3% iron.", "Excelsior"), 50, 25000)
-> "Excelsior paid 50 Credits and 25.000 iron."

Inherited from Faction [Server] + +

+

Parameters

+
+description +[optional] A description for the transaction. Can either be a string or a Format. If this variable is set, money and resources will be appended to the end of the list of arguments passed to the description format string.
+money +Money that will be removed from the faction
+resources +A list of resources, starting with iron, that will be removed from the faction
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var payResource(string or Format description, Material material, int amount)
+

+
+
+

+Makes the faction pay a certain amount of resources. If the faction can't pay, the respective resource will be set to 0. This function accepts a string for Format as first argument, as an economy notification describing the transaction that will be sent to the player, in case the faction is a player. Inherited from Faction [Server] + +

+

Parameters

+
+description +A description for the transaction. Can either be a string or a Format.
+material +The kind of material that will be removed from the faction
+amount +Amount that will be removed from the faction
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var payWithoutNotify(string or Format description, int money, int... args)
+

+
+
+

+Similar behavior to pay(), except there will not be a notification popping up in case the faction is a player, and the description for the transaction in this function isn't optional. Inherited from Faction [Server] + +

+

Parameters

+
+description +A description for the transaction. Can either be a string or a Format. Money and resources will be appended to the end of the list of arguments passed to the description format string.
+money +Money that will be removed from the faction
+args +A list of resources, starting with iron, that will be removed from the faction
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var receive(string or Format [optional] description, int money, int... resources)
+

+
+
+

+Makes the faction receive a certain amount of money and resources. This function accepts an optional string for Format as first argument, as an economy notification describing the transaction that will be sent to the player, in case the faction is a player.
To ease handling of transaction descriptions, the format description (if set) will receive all the remaining arguments given to the receive() function as format arguments, in the same order as they are given to the function. Dots for easier reading will be inserted as well. Examples:

faction:receive("Got %1% Credits and %2% iron.", 50000, 250)
-> "Got 50.000 Credits and 250 iron."

faction:receive(Format("%1% received %2% Credits and %3% iron.", "Excelsior"), 50, 25000)
-> "Excelsior received 50 Credits and 25.000 iron."

Inherited from Faction [Server] + +

+

Parameters

+
+description +[optional] A description for the transaction. Can either be a string or a Format. If this variable is set, money and resources will be appended to the end of the list of arguments passed to the description format string.
+money +Money that will be given to the faction
+resources +A list of resources, starting with iron, that will be given to the faction
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var receiveResource(string or Format description, Material material, int amount)
+

+
+
+

+Makes the faction receive a certain amount of resources. This function accepts a string for Format as first argument, as an economy notification describing the transaction that will be sent to the player, in case the faction is a player. Inherited from Faction [Server] + +

+

Parameters

+
+description +A description for the transaction. Can either be a string or a Format.
+material +The kind of material that will be given to the faction
+amount +Amount that will be given to the faction
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var receiveWithoutNotify(string or Format description, int money, int... args)
+

+
+
+

+Similar behavior to receive(), except there will not be a notification popping up in case the faction is a player, and the description for the transaction in this function isn't optional. Inherited from Faction [Server] + +

+

Parameters

+
+description +A description for the transaction. Can either be a string or a Format. Money and resources will be appended to the end of the list of arguments passed to the description format string.
+money +Money that will be given to the faction
+args +A list of resources, starting with iron, that will be given to the faction
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var sendCallback()
+

+
+
+

+Inherited from Faction [Server] + +

+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var sendChatMessage()
+

+
+
+

+Inherited from Faction [Server] + +

+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var setHomeSectorCoordinates(int x, int y)
+

+
+
+

+Inherited from Faction [Server] + +

+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var setLanguage(Language language)
+

+
+
+

+Inherited from Faction [Server] + +

+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var setResources()
+

+
+
+

+Inherited from Faction [Server] + +

+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var setStaticRelationsToFaction(int factionIndex, bool in)
+

+
+
+

+Inherited from Faction [Server] + +

+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var setTrait(string trait, float value)
+

+
+
+

+Sets a trait value associated with a key Inherited from Faction [Server] + +

+

Parameters

+
+trait +The name of the trait
+value +The value of the trait, should be between -1 and 1
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var setValue(string key, var value)
+

+
+
+

+Sets a custom value Inherited from Faction [Server] + +

+

Parameters

+
+key +A string that serves as the name of the value
+value +The value to save. Must be bool, number, string or nil. If nil is given, the value will be deleted.
+
+

+
+
+
+
+
+
+ Overview +
Home + Functions + Search +
+
Search:
+Predefined Functions & Example Scripts +
Command +Entity +FactionDatabase +PlanGenerator +Player +Sector +Server +UsableInventoryItem +
+
+

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

+
+ +
+ + diff --git a/Documentation/AllianceEmblem.html b/Documentation/AllianceEmblem.html new file mode 100644 index 0000000..bc7dd1d --- /dev/null +++ b/Documentation/AllianceEmblem.html @@ -0,0 +1,654 @@ + + + AllianceEmblem + + + + +
+
+

Avorion Script API Documentation

+
+
+ +
+
Search:
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+AllianceEmblem +AllianceEmblem +

Properties
+allianceIndex +
+center +
+height +
+index +
+layer +
+localCenter +
+localPosition +
+localRect +
+lower +
+mouseOver +
+position +
+rect +
+size +
+tooltip +
+tooltipWidth +
+upper +
+visible +
+width +

Member Functions
+hide +
+isMouseOverAndUnobscured +
+show +
+
+
+
+

AllianceEmblem : UIElement

+

+This object is only available on the client. +

+
+
+

+function AllianceEmblem(int index)
+

+
+
+

Returns

+
+

+A new instance of AllianceEmblem +

+
+

+
+
+
+
+ +
property int allianceIndex[write-only]
+
+
+
+
+ +
property vec2 center
+
+
+
+
+ +
property float height
+
+
+
+
+ +
property int index[read-only]
+
+
+
+
+ +
property int layer
+
+
+
+
+ +
property vec2 localCenter[read-only]
+
+
+
+
+ +
property vec2 localPosition[read-only]
+
+
+
+
+ +
property Rect localRect[read-only]
+
+
+
+
+ +
property vec2 lower
+
+
+
+
+ +
property bool mouseOver[read-only]
+
+
+
+
+ +
property vec2 position
+
+
+
+
+ +
property Rect rect
+
+
+
+
+ +
property vec2 size
+
+
+
+
+ +
property var tooltip
+
+
+
+
+ +
property int tooltipWidth[write-only]
+
+
+
+
+ +
property vec2 upper
+
+
+
+
+ +
property bool visible
+
+
+
+
+ +
property float width
+
+
+
+
+
+
+

+function var hide()
+

+
+
+

+Inherited from UIElement + +

+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function bool isMouseOverAndUnobscured()
+

+
+
+

+Inherited from UIElement + +

+

+
+
+
+
+

+function var show()
+

+
+
+

+Inherited from UIElement + +

+

Returns

+
+

+nothing +

+
+

+
+
+
+
+
+
+ Overview +
Home + Functions + Search +
+
Search:
+Predefined Functions & Example Scripts +
Command +Entity +FactionDatabase +PlanGenerator +Player +Sector +Server +UsableInventoryItem +
+
+

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

+
+ +
+ + diff --git a/Documentation/AllianceMember.html b/Documentation/AllianceMember.html new file mode 100644 index 0000000..b8ce9d8 --- /dev/null +++ b/Documentation/AllianceMember.html @@ -0,0 +1,450 @@ + + + AllianceMember + + + + +
+
+

Avorion Script API Documentation

+
+
+ +
+
Search:
+
+
+ + + + + + + + + + + +
+AllianceMember +AllianceMember +

Properties
+coordinates +
+index +
+rank +

Member Functions
+
+
+
+

AllianceMember

+
+
+

+function AllianceMember()
+

+
+
+

+This is the default constructor of AllianceMember. No further arguments are required. +

+

Returns

+
+

+A new instance of AllianceMember +

+
+

+
+
+
+
+ +
property ivec2 coordinates[read-only]
+
+
+
+
+ +
property int index[read-only]
+
+
+
+
+ +
property string rank[read-only]
+
+
+
+
+
+
+
+
+ Overview +
Home + Functions + Search +
+
Search:
+Predefined Functions & Example Scripts +
Command +Entity +FactionDatabase +PlanGenerator +Player +Sector +Server +UsableInventoryItem +
+
+

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

+
+ +
+ + diff --git a/Documentation/AllianceRank.html b/Documentation/AllianceRank.html new file mode 100644 index 0000000..5ed10f0 --- /dev/null +++ b/Documentation/AllianceRank.html @@ -0,0 +1,454 @@ + + + AllianceRank + + + + +
+
+

Avorion Script API Documentation

+
+
+ +
+
Search:
+
+
+ + + + + + + + + + + +
+AllianceRank +AllianceRank +

Properties
+level +
+name +

Member Functions
+getPrivileges +
+
+
+
+

AllianceRank

+
+
+

+function AllianceRank()
+

+
+
+

+This is the default constructor of AllianceRank. No further arguments are required. +

+

Returns

+
+

+A new instance of AllianceRank +

+
+

+
+
+
+
+ +
property int level[read-only]
+
+
+
+
+ +
property char name[read-only]
+
+
+
+
+
+
+

+function int... getPrivileges()
+

+
+
+

+
+
+
+
+
+
+ Overview +
Home + Functions + Search +
+
Search:
+Predefined Functions & Example Scripts +
Command +Entity +FactionDatabase +PlanGenerator +Player +Sector +Server +UsableInventoryItem +
+
+

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

+
+ +
+ + diff --git a/Documentation/AllianceTab.html b/Documentation/AllianceTab.html new file mode 100644 index 0000000..534fd68 --- /dev/null +++ b/Documentation/AllianceTab.html @@ -0,0 +1,807 @@ + + + AllianceTab + + + + +
+
+

Avorion Script API Documentation

+
+
+ +
+
Search:
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+AllianceTab +AllianceTab +

Properties
+onSelectedFunction +
+center +
+height +
+index +
+layer +
+localCenter +
+localPosition +
+localRect +
+lower +
+mouseOver +
+position +
+rect +
+size +
+tooltip +
+tooltipWidth +
+upper +
+visible +
+width +

Member Functions
+activateAllTabs +
+activateTab +
+createTab +
+deactivateTab +
+getActiveTab +
+getTab +
+moveTabToPosition +
+moveTabToTheRight +
+selectTab +
+hide +
+isMouseOverAndUnobscured +
+show +
+
+
+
+

AllianceTab : UIElement

+

+This object is only available on the client. +

+
+
+

+function AllianceTab()
+

+
+
+

Returns

+
+

+A new instance of AllianceTab +

+
+

+
+
+
+
+ +
property string onSelectedFunction
+
+
+
+
+ +
property vec2 center
+
+
+
+
+ +
property float height
+
+
+
+
+ +
property int index[read-only]
+
+
+
+
+ +
property int layer
+
+
+
+
+ +
property vec2 localCenter[read-only]
+
+
+
+
+ +
property vec2 localPosition[read-only]
+
+
+
+
+ +
property Rect localRect[read-only]
+
+
+
+
+ +
property vec2 lower
+
+
+
+
+ +
property bool mouseOver[read-only]
+
+
+
+
+ +
property vec2 position
+
+
+
+
+ +
property Rect rect
+
+
+
+
+ +
property vec2 size
+
+
+
+
+ +
property var tooltip
+
+
+
+
+ +
property int tooltipWidth[write-only]
+
+
+
+
+ +
property vec2 upper
+
+
+
+
+ +
property bool visible
+
+
+
+
+ +
property float width
+
+
+
+
+
+
+

+function var activateAllTabs()
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var activateTab(Tab tab)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function Tab createTab(string name, string icon, string description)
+

+
+
+

+
+
+
+
+

+function var deactivateTab(Tab tab)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function Tab getActiveTab()
+

+
+
+

+
+
+
+
+

+function Tab getTab(string name)
+

+
+
+

+
+
+
+
+

+function var moveTabToPosition(Tab tab, int pos)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var moveTabToTheRight(Tab tab)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var selectTab(var val)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var hide()
+

+
+
+

+Inherited from UIElement + +

+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function bool isMouseOverAndUnobscured()
+

+
+
+

+Inherited from UIElement + +

+

+
+
+
+
+

+function var show()
+

+
+
+

+Inherited from UIElement + +

+

Returns

+
+

+nothing +

+
+

+
+
+
+
+
+
+ Overview +
Home + Functions + Search +
+
Search:
+Predefined Functions & Example Scripts +
Command +Entity +FactionDatabase +PlanGenerator +Player +Sector +Server +UsableInventoryItem +
+
+

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

+
+ +
+ + diff --git a/Documentation/ArrowLine.html b/Documentation/ArrowLine.html new file mode 100644 index 0000000..9741e5f --- /dev/null +++ b/Documentation/ArrowLine.html @@ -0,0 +1,681 @@ + + + ArrowLine + + + + +
+
+

Avorion Script API Documentation

+
+
+ +
+
Search:
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ArrowLine +ArrowLine +

Properties
+color +
+from +
+to +
+width +
+center +
+height +
+index +
+layer +
+localCenter +
+localPosition +
+localRect +
+lower +
+mouseOver +
+position +
+rect +
+size +
+tooltip +
+tooltipWidth +
+upper +
+visible +
+width +

Member Functions
+hide +
+isMouseOverAndUnobscured +
+show +
+
+
+
+

ArrowLine : UIElement

+

+This object is only available on the client. +

+
+
+

+function ArrowLine(int index)
+

+
+
+

Returns

+
+

+A new instance of ArrowLine +

+
+

+
+
+
+
+ +
property Color color[write-only]
+
+
+
+
+ +
property vec2 from[write-only]
+
+
+
+
+ +
property vec2 to[write-only]
+
+
+
+
+ +
property float width[write-only]
+
+
+
+
+ +
property vec2 center
+
+
+
+
+ +
property float height
+
+
+
+
+ +
property int index[read-only]
+
+
+
+
+ +
property int layer
+
+
+
+
+ +
property vec2 localCenter[read-only]
+
+
+
+
+ +
property vec2 localPosition[read-only]
+
+
+
+
+ +
property Rect localRect[read-only]
+
+
+
+
+ +
property vec2 lower
+
+
+
+
+ +
property bool mouseOver[read-only]
+
+
+
+
+ +
property vec2 position
+
+
+
+
+ +
property Rect rect
+
+
+
+
+ +
property vec2 size
+
+
+
+
+ +
property var tooltip
+
+
+
+
+ +
property int tooltipWidth[write-only]
+
+
+
+
+ +
property vec2 upper
+
+
+
+
+ +
property bool visible
+
+
+
+
+ +
property float width
+
+
+
+
+
+
+

+function var hide()
+

+
+
+

+Inherited from UIElement + +

+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function bool isMouseOverAndUnobscured()
+

+
+
+

+Inherited from UIElement + +

+

+
+
+
+
+

+function var show()
+

+
+
+

+Inherited from UIElement + +

+

Returns

+
+

+nothing +

+
+

+
+
+
+
+
+
+ Overview +
Home + Functions + Search +
+
Search:
+Predefined Functions & Example Scripts +
Command +Entity +FactionDatabase +PlanGenerator +Player +Sector +Server +UsableInventoryItem +
+
+

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

+
+ +
+ + diff --git a/Documentation/BlockPlan.html b/Documentation/BlockPlan.html new file mode 100644 index 0000000..436b4f1 --- /dev/null +++ b/Documentation/BlockPlan.html @@ -0,0 +1,1141 @@ + + + BlockPlan + + + + +
+
+

Avorion Script API Documentation

+
+
+ +
+
Search:
+ +
+

BlockPlan

+
+
+

+function BlockPlan()
+

+
+
+

+This is the default constructor of BlockPlan. No further arguments are required. +

+

Returns

+
+

+A new instance of BlockPlan +

+
+

+
+
+
+
+ +
property bool accumulatingHealth
+
+
+
+
+ +
property vec3 centerOfMass[read-only]
+
+
+
+
+ +
property bool convex
+
+
+
+
+ +
property double durability[read-only]
+
+
+
+
+ +
property double mass[read-only]
+
+
+
+
+ +
property int numBlocks[read-only]
+
+
+
+
+ +
property double processingPower[read-only]
+
+
+
+
+ +
property float radius[read-only]
+
+
+
+
+ +
property BlockPlanBlock root[read-only]
+
+
+
+
+ +
property var rootIndex[read-only]
+
+
+
+
+ +
property double volume[read-only]
+
+
+
+
+
+
+

+function int addBlock(vec3 position, vec3 size, int parentIndex, int index, Color color, Material material, Matrix orientation, int blockIndex, var secondaryColor)
+

+
+
+

+Add a new block to an existing plan. +

+

Parameters

+
+position +The position of the new
+size +The size of the new block
+parentIndex +The parent index of the block the new block will be attached to. This parameter will be ignored when there are no blocks in the plan.
+index +The index of the new block. Use -1 to assign an index automatically (recommended)
+color +The color of the new block
+material +The material of the new block
+orientation +The orientation of the new block
+blockIndex +The type of the new block, must be a valid block type. See enum BlockType
+
+

Returns

+
+

+Returns the index of the new block on success, nil otherwise. +

+
+

+
+
+
+
+

+function var addPlan(int parentIndex, BlockPlan other, int otherBlock)
+

+
+
+

+
+
+
+
+

+function var addPlanDisplaced(int parentIndex, BlockPlan other, int otherBlock, vec3 delta)
+

+
+
+

+
+
+
+
+

+function var center()
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var deleteSubTree(int index)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var displace(vec3 displacement)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function BlockPlan... divide(int blockIndex)
+

+
+
+

+
+
+
+
+

+function bool empty()
+

+
+
+

+
+
+
+
+

+function bool exists(int index)
+

+
+
+

+
+
+
+
+

+function var forceMaterial(Material material)
+

+
+
+

+Changes the material of all blocks to the given material. Blocks with an invalid block type for the material get changed to blank hull. +

+

Parameters

+
+material +The new material
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function BlockPlanBlock getBlock(int index)
+

+
+
+

+
+
+
+
+

+function int... getBlockIndices()
+

+
+
+

+
+
+
+
+

+function int getBlockType(int index)
+

+
+
+

+
+
+
+
+

+function Box getBoundingBox()
+

+
+
+

+
+
+
+
+

+function Sphere getBoundingSphere()
+

+
+
+

+
+
+
+
+

+function double getMoneyValue()
+

+
+
+

+
+
+
+
+

+function BlockPlanBlock getNthBlock(int n)
+

+
+
+

+
+
+
+
+

+function var getNthIndex(int n)
+

+
+
+

+
+
+
+
+

+function double... getResourceValue()
+

+
+
+

+
+
+
+
+

+function BlockStatistics getStats()
+

+
+
+

+
+
+
+
+

+function double getUndamagedMoneyValue()
+

+
+
+

+
+
+
+
+

+function double... getUndamagedResourceValue()
+

+
+
+

+
+
+
+
+

+function var mirror(vec3 axis, vec3 mirrorCenter)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function bool propertiesEqual(BlockPlan other)
+

+
+
+

+
+
+
+
+

+function var reassignParents(var This)
+

+
+
+

+Reassigns parents of blocks depending on their overlap Use this after sloppily creating a blockplan (ie. when you attached all blocks to the root block, even though they don't overlap) +

+

Parameters

+
+This +function prints errors if it failed. You can pass an ID for the error, that will printed out so you can identify it.
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var removeBlock(int index)
+

+
+
+

+Removes a block from the plan. This function will try to reassign parents where possible to ensure that the tree doesn't break in positions where blocks still intersect with each other. +

+

Parameters

+
+index +The index of the block that is to be removed
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var resetDurability()
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var rotate(vec3 axis, int dir)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var scale(vec3 factor)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var setBlockColor(int index, Color color)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var setBlockType(int index, int blockTypeIndex)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var setColor(Color in)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var setMaterial(Material material)
+

+
+
+

+Changes the material of all blocks to the given material if the new combination of block type and material is allowed. Blocks that don't exist in the given material are left unchanged. +

+

Parameters

+
+material +The new material
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var setMaterialTier(Material material)
+

+
+
+

+Changes the material of all blocks to the given material if the new combination of block type and material is allowed. The remaining blocks get changed to either the highest allowed material below the given one or the lowest one above. +

+

Parameters

+
+material +The new material
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var setSecondaryBlockColor(int index, Color color)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+
+
+ Overview +
Home + Functions + Search +
+
Search:
+Predefined Functions & Example Scripts +
Command +Entity +FactionDatabase +PlanGenerator +Player +Sector +Server +UsableInventoryItem +
+
+

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

+
+ +
+ + diff --git a/Documentation/BlockPlanBlock.html b/Documentation/BlockPlanBlock.html new file mode 100644 index 0000000..24b27fc --- /dev/null +++ b/Documentation/BlockPlanBlock.html @@ -0,0 +1,706 @@ + + + BlockPlanBlock + + + + +
+
+

Avorion Script API Documentation

+
+
+ +
+
Search:
+ +
+

BlockPlanBlock

+
+
+

+function BlockPlanBlock()
+

+
+
+

+This is the default constructor of BlockPlanBlock. No further arguments are required. +

+

Returns

+
+

+A new instance of BlockPlanBlock +

+
+

+
+
+
+
+ +
property var blockCategoryIndex[read-only]
+
+
+
+
+ +
property int blockIndex
+
+
+
+
+ +
property Box box
+
+
+
+
+ +
property Color color
+
+
+
+
+ +
property double costFactor[read-only]
+
+
+
+
+ +
property double density[read-only]
+
+
+
+
+ +
property double durability
+
+
+
+
+ +
property double durabilityFactor[read-only]
+
+
+
+
+ +
property int harvestableResources[read-only]
+
+
+
+
+ +
property double harvestFactor[read-only]
+
+
+
+
+ +
property bool hasAO[read-only]
+
+
+
+
+ +
property int index[read-only]
+
+
+
+
+ +
property double maintenance[read-only]
+
+
+
+
+ +
property float mass[read-only]
+
+
+
+
+ +
property Material material
+
+
+
+
+ +
property double maxDurability
+
+
+
+
+ +
property double moneyCostFactor[read-only]
+
+
+
+
+ +
property int numChildren[read-only]
+
+
+
+
+ +
property Matrix orientation
+
+
+
+
+ +
property var parent[read-only]
+
+
+
+
+ +
property double processingPower[read-only]
+
+
+
+
+ +
property double resourceCostFactor[read-only]
+
+
+
+
+ +
property Color secondaryColor
+
+
+
+
+ +
property double staticMoneyCostFactor[read-only]
+
+
+
+
+ +
property int structure[read-only]
+
+
+
+
+ +
property double surfaceCostFactor[read-only]
+
+
+
+
+ +
property bool valid[read-only]
+
+
+
+
+ +
property float volume[read-only]
+
+
+
+
+ +
property double volumeCostFactor[read-only]
+
+
+
+
+ +
property double volumeFactor[read-only]
+
+
+
+
+
+
+

+function int... getChildren()
+

+
+
+

+
+
+
+
+
+
+ Overview +
Home + Functions + Search +
+
Search:
+Predefined Functions & Example Scripts +
Command +Entity +FactionDatabase +PlanGenerator +Player +Sector +Server +UsableInventoryItem +
+
+

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

+
+ +
+ + diff --git a/Documentation/BlockStatistics.html b/Documentation/BlockStatistics.html new file mode 100644 index 0000000..db8f7f2 --- /dev/null +++ b/Documentation/BlockStatistics.html @@ -0,0 +1,718 @@ + + + BlockStatistics + + + + +
+
+

Avorion Script API Documentation

+
+
+ +
+
Search:
+
+ +
+
+

BlockStatistics

+
+
+

+function BlockStatistics()
+

+
+
+

+This is the default constructor of BlockStatistics. No further arguments are required. +

+

Returns

+
+

+A new instance of BlockStatistics +

+
+

+
+
+
+
+ +
property vec3 averageSize[read-only]
+
+
+
+
+ +
property double cargoHold[read-only]
+
+
+
+
+ +
property vec3 centerOfMass[read-only]
+
+
+
+
+ +
property double durability[read-only]
+
+
+
+
+ +
property double energyYield[read-only]
+
+
+
+
+ +
property dvec3 gyroPower[read-only]
+
+
+
+
+ +
property double hangarSpace[read-only]
+
+
+
+
+ +
property double height[read-only]
+
+
+
+
+ +
property double hyperspacePower[read-only]
+
+
+
+
+ +
property double inertiaDampening[read-only]
+
+
+
+
+ +
property double length[read-only]
+
+
+
+
+ +
property double maintenance[read-only]
+
+
+
+
+ +
property double mass[read-only]
+
+
+
+
+ +
property vec3 momentOfInertia[read-only]
+
+
+
+
+ +
property double pitch[read-only]
+
+
+
+
+ +
property double processingPower[read-only]
+
+
+
+
+ +
property double productionCapacity[read-only]
+
+
+
+
+ +
property double radarRadius[read-only]
+
+
+
+
+ +
property double roll[read-only]
+
+
+
+
+ +
property double shield[read-only]
+
+
+
+
+ +
property double storableEnergy[read-only]
+
+
+
+
+ +
property double thrust[read-only]
+
+
+
+
+ +
property vec3 thrusterPower[read-only]
+
+
+
+
+ +
property double torpedoSpace[read-only]
+
+
+
+
+ +
property double volume[read-only]
+
+
+
+
+ +
property double width[read-only]
+
+
+
+
+ +
property double yaw[read-only]
+
+
+
+
+
+
+

+function double getBlockEnergyDrain(int blockIndex)
+

+
+
+

+
+
+
+
+

+function unsigned int getBlockNumber(int blockIndex)
+

+
+
+

+
+
+
+
+

+function double getBlockVolume(int blockIndex)
+

+
+
+

+
+
+
+
+

+function double getTotalEnergyDrain()
+

+
+
+

+
+
+
+
+
+
+ Overview +
Home + Functions + Search +
+
Search:
+Predefined Functions & Example Scripts +
Command +Entity +FactionDatabase +PlanGenerator +Player +Sector +Server +UsableInventoryItem +
+
+

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

+
+ +
+ + diff --git a/Documentation/Boarding.html b/Documentation/Boarding.html new file mode 100644 index 0000000..d26f6a9 --- /dev/null +++ b/Documentation/Boarding.html @@ -0,0 +1,599 @@ + + + Boarding + + + + +
+
+

Avorion Script API Documentation

+
+
+ +
+
Search:
+ +
+

Boarding

+
+
+

+function Boarding(var id)
+

+
+
+

Parameters

+
+id +The id of the entity this component belongs to, or the entity itself, must be an id of an existing entity or nil for the entity in the current script context
+
+

Returns

+
+

+A new instance of Boarding +

+
+

+
+
+
+
+ +
property bool boardable
+
+
+
+
+ +
property int boardingFaction[read-only]
+
+
+
+
+ +
property double defenseLevel
+
+
+
+
+ +
property Entity entity[read-only]
+
+
+
+
+ +
property uuid entityId[read-only]
+
+
+
+
+ +
property int foughtRounds[read-only]
+
+
+
+
+ +
property int numDefenseWeaponsCurrentAttack[read-only]
+
+
+
+
+ +
property int simultaneousFighters[read-only]
+
+
+
+
+ +
property float undealtDamageBoarders[read-only]
+
+
+
+
+ +
property float undealtDamageDefenders[read-only]
+
+
+
+
+
+
+

+function var applyBoardingSuccessful(int attackingFaction)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function float getBoarderHealth()
+

+
+
+

+
+
+
+
+

+function float getBoarderPower()
+

+
+
+

+
+
+
+
+

+function table<int, unsigned int> getBoarders()
+

+
+
+

+
+
+
+
+

+function float getDefenderHealth()
+

+
+
+

+
+
+
+
+

+function float getDefenderPower()
+

+
+
+

+
+
+
+
+
+
+ Overview +
Home + Functions + Search +
+
Search:
+Predefined Functions & Example Scripts +
Command +Entity +FactionDatabase +PlanGenerator +Player +Sector +Server +UsableInventoryItem +
+
+

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

+
+ +
+ + diff --git a/Documentation/Box.html b/Documentation/Box.html new file mode 100644 index 0000000..bbfc4cc --- /dev/null +++ b/Documentation/Box.html @@ -0,0 +1,474 @@ + + + Box + + + + +
+
+

Avorion Script API Documentation

+
+
+ +
+
Search:
+
+
+ + + + + + + + + + + + + + +
+Box +Box +

Properties
+center +
+lower +
+position +
+size +
+type +
+upper +

Member Functions
+
+
+
+

Box

+
+
+

+function Box(vec3 pos, vec3 size)
+

+
+
+

Returns

+
+

+A new instance of Box +

+
+

+
+
+
+
+ +
property vec3 center
+
+
+
+
+ +
property vec3 lower
+
+
+
+
+ +
property vec3 position
+
+
+
+
+ +
property vec3 size
+
+
+
+
+ +
property Box::Type type
+
+
+
+
+ +
property vec3 upper
+
+
+
+
+
+
+
+
+ Overview +
Home + Functions + Search +
+
Search:
+Predefined Functions & Example Scripts +
Command +Entity +FactionDatabase +PlanGenerator +Player +Sector +Server +UsableInventoryItem +
+
+

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

+
+ +
+ + diff --git a/Documentation/BspTree.html b/Documentation/BspTree.html new file mode 100644 index 0000000..dc9d220 --- /dev/null +++ b/Documentation/BspTree.html @@ -0,0 +1,534 @@ + + + BspTree + + + + +
+
+

Avorion Script API Documentation

+
+
+ +
+
Search:
+
+
+ + + + + + + + + + + + + + + + + +
+BspTree +BspTree +

Properties
+entity +
+entityId +

Member Functions
+getBlocksByBox +
+getBlocksByOrientedBox +
+getBlocksByRay +
+getBlocksBySphere +
+intersectRay +
+intersectsBox +
+intersectsSphere +
+
+
+
+

BspTree

+
+
+

+function BspTree(var id)
+

+
+
+

Parameters

+
+id +The id of the entity this component belongs to, or the entity itself, must be an id of an existing entity or nil for the entity in the current script context
+
+

Returns

+
+

+A new instance of BspTree +

+
+

+
+
+
+
+ +
property Entity entity[read-only]
+
+
+
+
+ +
property uuid entityId[read-only]
+
+
+
+
+
+
+

+function int... getBlocksByBox(Box box)
+

+
+
+

+
+
+
+
+

+function int... getBlocksByOrientedBox(Box box, Matrix boxOrientation)
+

+
+
+

+
+
+
+
+

+function int... getBlocksByRay(Ray ray, float t0, float t1)
+

+
+
+

+
+
+
+
+

+function int... getBlocksBySphere(Sphere sphere)
+

+
+
+

+
+
+
+
+

+function var, vec3 intersectRay(Ray ray, float t0, float t1)
+

+
+
+

+
+
+
+
+

+function bool intersectsBox(Box box, var exceptionIndex)
+

+
+
+

+
+
+
+
+

+function bool intersectsSphere(Sphere sphere, var exceptionIndex)
+

+
+
+

+
+
+
+
+
+
+ Overview +
Home + Functions + Search +
+
Search:
+Predefined Functions & Example Scripts +
Command +Entity +FactionDatabase +PlanGenerator +Player +Sector +Server +UsableInventoryItem +
+
+

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

+
+ +
+ + diff --git a/Documentation/Button [Client] [Client].html b/Documentation/Button [Client] [Client].html new file mode 100644 index 0000000..621443b --- /dev/null +++ b/Documentation/Button [Client] [Client].html @@ -0,0 +1,818 @@ + + + Button [Client] [Client] + + + + +
+
+

Avorion Script API Documentation

+
+
+ +
+
Search:
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Button [Client] [Client] +Button +

Properties
+active +
+alignment +
+bold +
+caption +
+captionColor +
+fontType +
+hasFrame +
+icon +
+iconColor +
+maxTextSize +
+onPressedFunction +
+overlayIcon +
+overlayIconAlignment +
+overlayIconColor +
+overlayIconPadding +
+overlayIconSizeFactor +
+textSize +
+uppercase +
+center +
+height +
+index +
+layer +
+localCenter +
+localPosition +
+localRect +
+lower +
+mouseOver +
+position +
+rect +
+size +
+tooltip +
+tooltipWidth +
+upper +
+visible +
+width +

Member Functions
+hide +
+isMouseOverAndUnobscured +
+show +
+
+
+
+

Button [Client] [Client] : UIElement

+

+This object is only available on the client. +

+
+
+

+function Button(int index)
+

+
+
+

Returns

+
+

+A new instance of Button +

+
+

+
+
+
+
+ +
property bool active
+
+Set/Get whether a button is active. Active buttons can be pressed. +
+
+
+ +
property int alignment[write-only]
+
+
+
+
+ +
property bool bold
+
+Set whether the button text is bold or not +
+
+
+ +
property string caption
+
+Set the caption of a button +
+
+
+ +
property Color captionColor[write-only]
+
+Set the caption color of a button +
+
+
+ +
property int fontType[write-only]
+
+
+
+
+ +
property bool hasFrame[write-only]
+
+Set whether the button's frame is drawn or only its caption or icon +
+
+
+ +
property string icon
+
+Set the icon of a button +
+
+
+ +
property Color iconColor[write-only]
+
+Set the icon color of a button +
+
+
+ +
property int maxTextSize
+
+Get/Set the maximum text size in pixels of the button. Setting this property enables automatic scaling of text to fit the button. Might lead to too small texts when used with large captions, especially with different translations. +
+
+
+ +
property string onPressedFunction
+
+Set the function that is invoked when pressing the button. Called function signature is 'function MyFunctionName(button)' +
+
+
+ +
property string overlayIcon[write-only]
+
+
+
+
+ +
property int overlayIconAlignment[write-only]
+
+sets where the overlay icon should be positioned on the button. Use numbers 1 - 9, where each number refers to the location of the corresponding button on a cellphone dial (1 = top left, 2 = top, 5 = center, 9 = bottom right etc) +
+
+
+ +
property Color overlayIconColor[write-only]
+
+
+
+
+ +
property int overlayIconPadding[write-only]
+
+
+
+
+ +
property float overlayIconSizeFactor[write-only]
+
+
+
+
+ +
property int textSize
+
+Get/Set the text size in pixels of the button. Setting this property will disable automatic scaling of text and may lead to clipping errors with larger texts. Especially with different translations. +
+
+
+ +
property bool uppercase
+
+
+
+
+ +
property vec2 center
+
+
+
+
+ +
property float height
+
+
+
+
+ +
property int index[read-only]
+
+
+
+
+ +
property int layer
+
+
+
+
+ +
property vec2 localCenter[read-only]
+
+
+
+
+ +
property vec2 localPosition[read-only]
+
+
+
+
+ +
property Rect localRect[read-only]
+
+
+
+
+ +
property vec2 lower
+
+
+
+
+ +
property bool mouseOver[read-only]
+
+
+
+
+ +
property vec2 position
+
+
+
+
+ +
property Rect rect
+
+
+
+
+ +
property vec2 size
+
+
+
+
+ +
property var tooltip
+
+
+
+
+ +
property int tooltipWidth[write-only]
+
+
+
+
+ +
property vec2 upper
+
+
+
+
+ +
property bool visible
+
+
+
+
+ +
property float width
+
+
+
+
+
+
+

+function var hide()
+

+
+
+

+Inherited from UIElement + +

+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function bool isMouseOverAndUnobscured()
+

+
+
+

+Inherited from UIElement + +

+

+
+
+
+
+

+function var show()
+

+
+
+

+Inherited from UIElement + +

+

Returns

+
+

+nothing +

+
+

+
+
+
+
+
+
+ Overview +
Home + Functions + Search +
+
Search:
+Predefined Functions & Example Scripts +
Command +Entity +FactionDatabase +PlanGenerator +Player +Sector +Server +UsableInventoryItem +
+
+

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

+
+ +
+ + diff --git a/Documentation/Callbacks.html b/Documentation/Callbacks.html new file mode 100644 index 0000000..a3e238a --- /dev/null +++ b/Documentation/Callbacks.html @@ -0,0 +1,417 @@ + + + Avorion Script Callbacks - + + + + +
+
+

Avorion Script API Documentation

+
+
+ +
+
Search:
+ +
+

Callbacks

+
+

+callback onDialogClosed()
+

+
+

+This callback is executed when a dialog closes. Callback is executed at the script that provided the dialog. No need to register for this callback, just declare the function "onDialogClosed". +

+

+
+
+
+

+callback onShowEncyclopediaArticle(id)
+

+
+

+
+
+
+
+
+
+ Overview +
Home + Functions + Search +
+
Search:
+Predefined Functions & Example Scripts +
Command +Entity +FactionDatabase +PlanGenerator +Player +Sector +Server +UsableInventoryItem +
+
+

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

+
+ +
+ + diff --git a/Documentation/CameraKeyFrame.html b/Documentation/CameraKeyFrame.html new file mode 100644 index 0000000..7eb98ae --- /dev/null +++ b/Documentation/CameraKeyFrame.html @@ -0,0 +1,468 @@ + + + CameraKeyFrame + + + + +
+
+

Avorion Script API Documentation

+
+
+ +
+
Search:
+
+
+ + + + + + + + + + + + + +
+CameraKeyFrame +CameraKeyFrame +

Properties
+at +
+eye +
+targetId +
+timestamp +
+up +

Member Functions
+
+
+
+

CameraKeyFrame

+

+This object is only available on the client. +

+
+
+

+function CameraKeyFrame(vec3 eye, var at, vec3 up, float timestamp)
+

+
+
+

Returns

+
+

+A new instance of CameraKeyFrame +

+
+

+
+
+
+
+ +
property vec3 at
+
+
+
+
+ +
property vec3 eye
+
+
+
+
+ +
property Uuid targetId
+
+
+
+
+ +
property float timestamp
+
+
+
+
+ +
property vec3 up
+
+
+
+
+
+
+
+
+ Overview +
Home + Functions + Search +
+
Search:
+Predefined Functions & Example Scripts +
Command +Entity +FactionDatabase +PlanGenerator +Player +Sector +Server +UsableInventoryItem +
+
+

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

+
+ +
+ + diff --git a/Documentation/Captain.html b/Documentation/Captain.html new file mode 100644 index 0000000..1574b3b --- /dev/null +++ b/Documentation/Captain.html @@ -0,0 +1,604 @@ + + + Captain + + + + +
+
+

Avorion Script API Documentation

+
+
+ +
+
Search:
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
+Captain +Captain +

Properties
+displayName +
+experience +
+experiencePercentage +
+factionIndex +
+genderId +
+hiringPrice +
+level +
+name +
+nickName +
+primaryClass +
+requiredLevelUpExperience +
+salary +
+secondaryClass +
+tier +

Member Functions
+getPerks +
+hasClass +
+hasPerk +
+setPerks +
+
+
+
+

Captain

+
+
+

+function Captain()
+

+
+
+

Returns

+
+

+A new instance of Captain +

+
+

+
+
+
+
+ +
property string displayName[read-only]
+
+
+
+
+ +
property int experience
+
+
+
+
+ +
property int experiencePercentage[read-only]
+
+
+
+
+ +
property int factionIndex
+
+
+
+
+ +
property int genderId
+
+
+
+
+ +
property int hiringPrice[read-only]
+
+
+
+
+ +
property int level
+
+
+
+
+ +
property string name
+
+
+
+
+ +
property string nickName
+
+
+
+
+ +
property int primaryClass
+
+
+
+
+ +
property int requiredLevelUpExperience
+
+
+
+
+ +
property int salary
+
+
+
+
+ +
property int secondaryClass
+
+
+
+
+ +
property int tier
+
+
+
+
+
+
+

+function int... getPerks()
+

+
+
+

+
+
+
+
+

+function bool hasClass(int captainClass)
+

+
+
+

+
+
+
+
+

+function bool hasPerk(int perk)
+

+
+
+

+
+
+
+
+

+function var setPerks()
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+
+
+ Overview +
Home + Functions + Search +
+
Search:
+Predefined Functions & Example Scripts +
Command +Entity +FactionDatabase +PlanGenerator +Player +Sector +Server +UsableInventoryItem +
+
+

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

+
+ +
+ + diff --git a/Documentation/CaptainIcon.html b/Documentation/CaptainIcon.html new file mode 100644 index 0000000..00e42db --- /dev/null +++ b/Documentation/CaptainIcon.html @@ -0,0 +1,696 @@ + + + CaptainIcon + + + + +
+
+

Avorion Script API Documentation

+
+
+ +
+
Search:
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+CaptainIcon +CaptainIcon +

Properties
+center +
+height +
+index +
+layer +
+localCenter +
+localPosition +
+localRect +
+lower +
+mouseOver +
+position +
+rect +
+size +
+tooltip +
+tooltipWidth +
+upper +
+visible +
+width +

Member Functions
+getCaptain +
+setCaptain +
+setCustomTooltip +
+hide +
+isMouseOverAndUnobscured +
+show +
+
+
+
+

CaptainIcon : UIElement

+

+This object is only available on the client. +

+
+
+

+function CaptainIcon(int index)
+

+
+
+

Returns

+
+

+A new instance of CaptainIcon +

+
+

+
+
+
+
+ +
property vec2 center
+
+
+
+
+ +
property float height
+
+
+
+
+ +
property int index[read-only]
+
+
+
+
+ +
property int layer
+
+
+
+
+ +
property vec2 localCenter[read-only]
+
+
+
+
+ +
property vec2 localPosition[read-only]
+
+
+
+
+ +
property Rect localRect[read-only]
+
+
+
+
+ +
property vec2 lower
+
+
+
+
+ +
property bool mouseOver[read-only]
+
+
+
+
+ +
property vec2 position
+
+
+
+
+ +
property Rect rect
+
+
+
+
+ +
property vec2 size
+
+
+
+
+ +
property var tooltip
+
+
+
+
+ +
property int tooltipWidth[write-only]
+
+
+
+
+ +
property vec2 upper
+
+
+
+
+ +
property bool visible
+
+
+
+
+ +
property float width
+
+
+
+
+
+
+

+function Captain getCaptain()
+

+
+
+

+
+
+
+
+

+function var setCaptain(Captain [or nil] captain)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var setCustomTooltip(Tooltip tooltip)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var hide()
+

+
+
+

+Inherited from UIElement + +

+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function bool isMouseOverAndUnobscured()
+

+
+
+

+Inherited from UIElement + +

+

+
+
+
+
+

+function var show()
+

+
+
+

+Inherited from UIElement + +

+

Returns

+
+

+nothing +

+
+

+
+
+
+
+
+
+ Overview +
Home + Functions + Search +
+
Search:
+Predefined Functions & Example Scripts +
Command +Entity +FactionDatabase +PlanGenerator +Player +Sector +Server +UsableInventoryItem +
+
+

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

+
+ +
+ + diff --git a/Documentation/CaptainProfile.html b/Documentation/CaptainProfile.html new file mode 100644 index 0000000..ed3859b --- /dev/null +++ b/Documentation/CaptainProfile.html @@ -0,0 +1,677 @@ + + + CaptainProfile + + + + +
+
+

Avorion Script API Documentation

+
+
+ +
+
Search:
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+CaptainProfile +CaptainProfile +

Properties
+center +
+height +
+index +
+layer +
+localCenter +
+localPosition +
+localRect +
+lower +
+mouseOver +
+position +
+rect +
+size +
+tooltip +
+tooltipWidth +
+upper +
+visible +
+width +

Member Functions
+getCaptain +
+setCaptain +
+hide +
+isMouseOverAndUnobscured +
+show +
+
+
+
+

CaptainProfile : UIElement

+

+This object is only available on the client. +

+
+
+

+function CaptainProfile(int index)
+

+
+
+

Returns

+
+

+A new instance of CaptainProfile +

+
+

+
+
+
+
+ +
property vec2 center
+
+
+
+
+ +
property float height
+
+
+
+
+ +
property int index[read-only]
+
+
+
+
+ +
property int layer
+
+
+
+
+ +
property vec2 localCenter[read-only]
+
+
+
+
+ +
property vec2 localPosition[read-only]
+
+
+
+
+ +
property Rect localRect[read-only]
+
+
+
+
+ +
property vec2 lower
+
+
+
+
+ +
property bool mouseOver[read-only]
+
+
+
+
+ +
property vec2 position
+
+
+
+
+ +
property Rect rect
+
+
+
+
+ +
property vec2 size
+
+
+
+
+ +
property var tooltip
+
+
+
+
+ +
property int tooltipWidth[write-only]
+
+
+
+
+ +
property vec2 upper
+
+
+
+
+ +
property bool visible
+
+
+
+
+ +
property float width
+
+
+
+
+
+
+

+function Captain getCaptain()
+

+
+
+

+
+
+
+
+

+function var setCaptain(Captain [or nil] captain)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var hide()
+

+
+
+

+Inherited from UIElement + +

+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function bool isMouseOverAndUnobscured()
+

+
+
+

+Inherited from UIElement + +

+

+
+
+
+
+

+function var show()
+

+
+
+

+Inherited from UIElement + +

+

Returns

+
+

+nothing +

+
+

+
+
+
+
+
+
+ Overview +
Home + Functions + Search +
+
Search:
+Predefined Functions & Example Scripts +
Command +Entity +FactionDatabase +PlanGenerator +Player +Sector +Server +UsableInventoryItem +
+
+

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

+
+ +
+ + diff --git a/Documentation/CaptainSelectionItem.html b/Documentation/CaptainSelectionItem.html new file mode 100644 index 0000000..bcc1399 --- /dev/null +++ b/Documentation/CaptainSelectionItem.html @@ -0,0 +1,464 @@ + + + CaptainSelectionItem + + + + +
+
+

Avorion Script API Documentation

+
+
+ +
+
Search:
+
+
+ + + + + + + + + + + +
+CaptainSelectionItem +CaptainSelectionItem +

Properties
+passengerIndex +

Member Functions
+getCaptain +
+setCaptain +
+
+
+
+

CaptainSelectionItem

+

+This object is only available on the client. +

+
+
+

+function CaptainSelectionItem(Captain other)
+

+
+
+

Returns

+
+

+A new instance of CaptainSelectionItem +

+
+

+
+
+
+
+ +
property int passengerIndex
+
+
+
+
+
+
+

+function Captain getCaptain()
+

+
+
+

+
+
+
+
+

+function var setCaptain(Captain captain)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+
+
+ Overview +
Home + Functions + Search +
+
Search:
+Predefined Functions & Example Scripts +
Command +Entity +FactionDatabase +PlanGenerator +Player +Sector +Server +UsableInventoryItem +
+
+

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

+
+ +
+ + diff --git a/Documentation/CargoBay.html b/Documentation/CargoBay.html new file mode 100644 index 0000000..a5631aa --- /dev/null +++ b/Documentation/CargoBay.html @@ -0,0 +1,776 @@ + + + CargoBay + + + + +
+
+

Avorion Script API Documentation

+
+
+ +
+
Search:
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+CargoBay +CargoBay +

Properties
+alwaysStoreAtLeastOne +
+cargoHold +
+cargoVolume +
+empty +
+entity +
+entityId +
+fixedSize +
+freeSpace +
+numCargos +
+pickUpDangerous +
+pickUpDefaults +
+pickUpIllegal +
+pickUpOres +
+pickUpScrap +
+pickUpStolen +

Member Functions
+add +
+addCargo +
+clear +
+destroyCargo +
+findCargos +
+getCargo +
+getCargos +
+getNumCargos +
+getSummary +
+removeCargo +
+
+
+
+

CargoBay

+
+
+

+function CargoBay(var id)
+

+
+
+

Parameters

+
+id +The id of the entity this component belongs to, or the entity itself, must be an id of an existing entity or nil for the entity in the current script context
+
+

Returns

+
+

+A new instance of CargoBay +

+
+

+
+
+
+
+ +
property bool alwaysStoreAtLeastOne
+
+
+
+
+ +
property float cargoHold
+
+
+
+
+ +
property float cargoVolume[read-only]
+
+
+
+
+ +
property bool empty[read-only]
+
+
+
+
+ +
property Entity entity[read-only]
+
+
+
+
+ +
property uuid entityId[read-only]
+
+
+
+
+ +
property bool fixedSize
+
+
+
+
+ +
property float freeSpace[read-only]
+
+
+
+
+ +
property int numCargos[read-only]
+
+
+
+
+ +
property bool pickUpDangerous
+
+
+
+
+ +
property bool pickUpDefaults
+
+
+
+
+ +
property bool pickUpIllegal
+
+
+
+
+ +
property bool pickUpOres
+
+
+
+
+ +
property bool pickUpScrap
+
+
+
+
+ +
property bool pickUpStolen
+
+
+
+
+
+
+

+function var add(CargoBay other)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function unsigned int addCargo(TradingGood good, int amount)
+

+
+
+

+Adds cargo to the entity. If the amount specified exceeds the maximum capacity of the cargo bay, as much cargo as still fits in will be added. +

+

Parameters

+
+good +TradingGood that is to be added.
+amount +The amount of cargo that should be added.
+
+

Returns

+
+

+How much was actually added (can be less than amount when cargo bay is full) +

+
+

+
+
+
+
+

+function var clear()
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var destroyCargo(float volume)
+

+
+
+

+Destroys cargo. The destruction distribution is generally equal over all goods. +

+

Parameters

+
+volume +The amount of volume that should be destroyed.
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function table<TradingGood, int> findCargos(string name)
+

+
+
+

+Finds all cargos with the given name. +

+

Parameters

+
+name +A string that will be matched with the 'name' property of the cargos.
+
+

Returns

+
+

+A map containing all matching goods, with the good as key and amount as value. +

+
+

+
+
+
+
+

+function TradingGood, int... getCargo(unsigned int n)
+

+
+
+

+
+
+
+
+

+function table<TradingGood, int> getCargos()
+

+
+
+

+
+
+
+
+

+function int getNumCargos(var name)
+

+
+
+

+Counts all goods of the given type. When given a string, it will match the 'name' property of the goods. When given a TradingGood it will match the exact good. +

+

Parameters

+
+name +Either a TradingGood or a string containing the name of a trading good.
+
+

Returns

+
+

+The number of goods +

+
+

+
+
+
+
+

+function string getSummary(var goods)
+

+
+
+

+
+
+
+
+

+function var removeCargo(var good, int amount)
+

+
+
+

+Removes cargo from the entity. When given a TradingGood, an exact check for that good will be performed. When given a string, only a name check will be performed, and which cargo will be removed first is undefined if there are multiple goods with the same name. An example would be Energy Cells vs. Stolen Energy Cells. The 'name' property is the same, but the 'stolen' property is different. +

+

Parameters

+
+good +Either a TradingGood or a string with the name of a good.
+amount +The amount of cargo that should be removed. If this is more than there is on the ship, all specified cargo will be removed.
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+
+
+ Overview +
Home + Functions + Search +
+
Search:
+Predefined Functions & Example Scripts +
Command +Entity +FactionDatabase +PlanGenerator +Player +Sector +Server +UsableInventoryItem +
+
+

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

+
+ +
+ + diff --git a/Documentation/CargoLoot.html b/Documentation/CargoLoot.html new file mode 100644 index 0000000..82a60bb --- /dev/null +++ b/Documentation/CargoLoot.html @@ -0,0 +1,502 @@ + + + CargoLoot + + + + +
+
+

Avorion Script API Documentation

+
+
+ +
+
Search:
+
+
+ + + + + + + + + + + + + + + +
+CargoLoot +CargoLoot +

Properties
+amount +
+good +
+hasOwner +
+mined +
+owner +

Member Functions
+matches +
+setCargo +
+
+
+
+

CargoLoot

+
+
+

+function CargoLoot(var id)
+

+
+
+

Parameters

+
+id +The id of the entity this component belongs to, or the entity itself, must be an id of an existing entity or nil for the entity in the current script context
+
+

Returns

+
+

+A new instance of CargoLoot +

+
+

+
+
+
+
+ +
property int amount
+
+
+
+
+ +
property TradingGood good
+
+
+
+
+ +
property var hasOwner[read-only]
+
+
+
+
+ +
property bool mined
+
+
+
+
+ +
property int owner
+
+
+
+
+
+
+

+function bool matches(string name)
+

+
+
+

+
+
+
+
+

+function var setCargo(TradingGood good, var amount)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+
+
+ Overview +
Home + Functions + Search +
+
Search:
+Predefined Functions & Example Scripts +
Command +Entity +FactionDatabase +PlanGenerator +Player +Sector +Server +UsableInventoryItem +
+
+

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

+
+ +
+ + diff --git a/Documentation/CheckBox.html b/Documentation/CheckBox.html new file mode 100644 index 0000000..206fcff --- /dev/null +++ b/Documentation/CheckBox.html @@ -0,0 +1,745 @@ + + + CheckBox + + + + +
+
+

Avorion Script API Documentation

+
+
+ +
+
Search:
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+CheckBox +CheckBox +

Properties
+active +
+bold +
+caption +
+captionLeft +
+checked +
+fontSize +
+icon +
+italic +
+onCheckedFunction +
+center +
+height +
+index +
+layer +
+localCenter +
+localPosition +
+localRect +
+lower +
+mouseOver +
+position +
+rect +
+size +
+tooltip +
+tooltipWidth +
+upper +
+visible +
+width +

Member Functions
+setCheckedNoCallback +
+hide +
+isMouseOverAndUnobscured +
+show +
+
+
+
+

CheckBox : UIElement

+

+This object is only available on the client. +

+
+
+

+function CheckBox(int index)
+

+
+
+

Returns

+
+

+A new instance of CheckBox +

+
+

+
+
+
+
+ +
property bool active[write-only]
+
+
+
+
+ +
property bool bold[write-only]
+
+
+
+
+ +
property string caption[write-only]
+
+
+
+
+ +
property bool captionLeft[write-only]
+
+
+
+
+ +
property bool checked
+
+
+
+
+ +
property int fontSize[write-only]
+
+
+
+
+ +
property bool icon[write-only]
+
+
+
+
+ +
property bool italic[write-only]
+
+
+
+
+ +
property string onCheckedFunction[write-only]
+
+
+
+
+ +
property vec2 center
+
+
+
+
+ +
property float height
+
+
+
+
+ +
property int index[read-only]
+
+
+
+
+ +
property int layer
+
+
+
+
+ +
property vec2 localCenter[read-only]
+
+
+
+
+ +
property vec2 localPosition[read-only]
+
+
+
+
+ +
property Rect localRect[read-only]
+
+
+
+
+ +
property vec2 lower
+
+
+
+
+ +
property bool mouseOver[read-only]
+
+
+
+
+ +
property vec2 position
+
+
+
+
+ +
property Rect rect
+
+
+
+
+ +
property vec2 size
+
+
+
+
+ +
property var tooltip
+
+
+
+
+ +
property int tooltipWidth[write-only]
+
+
+
+
+ +
property vec2 upper
+
+
+
+
+ +
property bool visible
+
+
+
+
+ +
property float width
+
+
+
+
+
+
+

+function var setCheckedNoCallback(bool in)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var hide()
+

+
+
+

+Inherited from UIElement + +

+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function bool isMouseOverAndUnobscured()
+

+
+
+

+Inherited from UIElement + +

+

+
+
+
+
+

+function var show()
+

+
+
+

+Inherited from UIElement + +

+

Returns

+
+

+nothing +

+
+

+
+
+
+
+
+
+ Overview +
Home + Functions + Search +
+
Search:
+Predefined Functions & Example Scripts +
Command +Entity +FactionDatabase +PlanGenerator +Player +Sector +Server +UsableInventoryItem +
+
+

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

+
+ +
+ + diff --git a/Documentation/Client.html b/Documentation/Client.html new file mode 100644 index 0000000..e69672b --- /dev/null +++ b/Documentation/Client.html @@ -0,0 +1,469 @@ + + + Client + + + + +
+
+

Avorion Script API Documentation

+
+
+ +
+
Search:
+
+
+ + + + + + + + + + + + +
+Client +Client +

Properties
+runtime +
+sessionId +
+unpausedRuntime +

Member Functions
+sendAnalytics +
+
+
+
+

Client

+

+This object is only available on the client. +

+
+
+

+function Client()
+

+
+
+

Returns

+
+

+A new instance of Client +

+
+

+
+
+
+
+ +
property double runtime[read-only]
+
+
+
+
+ +
property uuid sessionId[read-only]
+
+
+
+
+ +
property double unpausedRuntime[read-only]
+
+
+
+
+
+
+

+function var sendAnalytics(string identifier, var scriptData)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+
+
+ Overview +
Home + Functions + Search +
+
Search:
+Predefined Functions & Example Scripts +
Command +Entity +FactionDatabase +PlanGenerator +Player +Sector +Server +UsableInventoryItem +
+
+

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

+
+ +
+ + diff --git a/Documentation/ClientSettings.html b/Documentation/ClientSettings.html new file mode 100644 index 0000000..371f1f1 --- /dev/null +++ b/Documentation/ClientSettings.html @@ -0,0 +1,891 @@ + + + ClientSettings + + + + +
+
+

Avorion Script API Documentation

+
+
+ +
+
Search:
+ +
+

ClientSettings

+

+This object is only available on the client. +

+
+
+

+function ClientSettings()
+

+
+
+

Returns

+
+

+A new instance of ClientSettings +

+
+

+
+
+
+
+ +
property bool ambientOcclusion[read-only]
+
+
+
+
+ +
property bool autoPayCrews[read-only]
+
+
+
+
+ +
property bool autosaveInBuildMode[read-only]
+
+
+
+
+ +
property float backgroundResolutionFactor[read-only]
+
+
+
+
+ +
property bool bloom[read-only]
+
+
+
+
+ +
property bool complexSelfShadows[read-only]
+
+
+
+
+ +
property int consoleFontSize[read-only]
+
+
+
+
+ +
property float consoleHeight[read-only]
+
+
+
+
+ +
property float damageParticleSize[read-only]
+
+
+
+
+ +
property bool detailedTurretTooltips[read-only]
+
+
+
+
+ +
property int display[read-only]
+
+
+
+
+ +
property bool drawFps[read-only]
+
+
+
+
+ +
property bool drawFrameGraphs[read-only]
+
+
+
+
+ +
property float effectVolume[read-only]
+
+
+
+
+ +
property bool encyclopediaPopUp[read-only]
+
+
+
+
+ +
property float fogIntensity[read-only]
+
+
+
+
+ +
property float fogQuality[read-only]
+
+
+
+
+ +
property int fpsLimit[read-only]
+
+
+
+
+ +
property float gamma[read-only]
+
+
+
+
+ +
property int globalShadowMapSize[read-only]
+
+
+
+
+ +
property bool instancedShadows[read-only]
+
+
+
+
+ +
property bool invertY[read-only]
+
+
+
+
+ +
property string language[read-only]
+
+
+
+
+ +
property bool largeObjectShadows[read-only]
+
+
+
+
+ +
property bool mapEdgeScrollingEnabled[read-only]
+
+
+
+
+ +
property float masterVolume[read-only]
+
+
+
+
+ +
property float mouseSensitivity[read-only]
+
+
+
+
+ +
property float musicVolume[read-only]
+
+
+
+
+ +
property int ownShadowMapSize[read-only]
+
+
+
+
+ +
property int particlesQuality[read-only]
+
+
+
+
+ +
property bool pauseInBuildMode[read-only]
+
+
+
+
+ +
property float planetResolutionFactor[read-only]
+
+
+
+
+ +
property bool playedTutorial[read-only]
+
+
+
+
+ +
property string playerName[read-only]
+
+
+
+
+ +
property bool playerShadows[read-only]
+
+
+
+
+ +
property bool pressSpaceInLoadingScreen[read-only]
+
+
+
+
+ +
property ivec2 resolution[read-only]
+
+
+
+
+ +
property bool retinaMode[read-only]
+
+
+
+
+ +
property float shadowRange[read-only]
+
+
+
+
+ +
property bool showDriverWarning[read-only]
+
+
+
+
+ +
property bool showProgradeMarker[read-only]
+
+
+
+
+ +
property bool showRetrogradeMarker[read-only]
+
+
+
+
+ +
property double silenceDuration[read-only]
+
+
+
+
+ +
property bool softShadows[read-only]
+
+
+
+
+ +
property bool strategyStateEdgeScrollingEnabled[read-only]
+
+
+
+
+ +
property bool streamerMode[read-only]
+
+
+
+
+ +
property float superSampling[read-only]
+
+
+
+
+ +
property Color uiColor[read-only]
+
+
+
+
+ +
property float uiScale[read-only]
+
+
+
+
+ +
property float uiVolume[read-only]
+
+
+
+
+ +
property int vsync[read-only]
+
+
+
+
+ +
property float weaponVolume[read-only]
+
+
+
+
+
+
+
+
+ Overview +
Home + Functions + Search +
+
Search:
+Predefined Functions & Example Scripts +
Command +Entity +FactionDatabase +PlanGenerator +Player +Sector +Server +UsableInventoryItem +
+
+

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

+
+ +
+ + diff --git a/Documentation/Color.html b/Documentation/Color.html new file mode 100644 index 0000000..6985a2b --- /dev/null +++ b/Documentation/Color.html @@ -0,0 +1,537 @@ + + + Color + + + + +
+
+

Avorion Script API Documentation

+
+
+ +
+
Search:
+
+
+ + + + + + + + + + + + + + + + + + + +
+Color +Color +

Properties
+a +
+b +
+g +
+html +
+hue +
+r +
+saturation +
+value +

Member Functions
+__tostring +
+setHSV +
+toInt +
+
+
+
+

Color

+
+
+

+function Color(var c)
+

+
+
+

Returns

+
+

+A new instance of Color +

+
+

+
+
+
+
+ +
property float a
+
+
+
+
+ +
property float b
+
+
+
+
+ +
property float g
+
+
+
+
+ +
property string html[read-only]
+
+
+
+
+ +
property float hue
+
+
+
+
+ +
property float r
+
+
+
+
+ +
property float saturation
+
+
+
+
+ +
property float value
+
+
+
+
+
+
+

+function string __tostring()
+

+
+
+

+
+
+
+
+

+function var setHSV(float h, float s, float v)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function int toInt()
+

+
+
+

+
+
+
+
+
+
+ Overview +
Home + Functions + Search +
+
Search:
+Predefined Functions & Example Scripts +
Command +Entity +FactionDatabase +PlanGenerator +Player +Sector +Server +UsableInventoryItem +
+
+

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

+
+ +
+ + diff --git a/Documentation/ColorSelectionItem.html b/Documentation/ColorSelectionItem.html new file mode 100644 index 0000000..32c776c --- /dev/null +++ b/Documentation/ColorSelectionItem.html @@ -0,0 +1,450 @@ + + + ColorSelectionItem + + + + +
+
+

Avorion Script API Documentation

+
+
+ +
+
Search:
+
+
+ + + + + + + + + + + +
+ColorSelectionItem +ColorSelectionItem +

Properties
+color +
+hasTooltip +
+selected +

Member Functions
+
+
+
+

ColorSelectionItem

+

+This object is only available on the client. +

+
+
+

+function ColorSelectionItem(Color color)
+

+
+
+

Returns

+
+

+A new instance of ColorSelectionItem +

+
+

+
+
+
+
+ +
property Color color[read-only]
+
+
+
+
+ +
property bool hasTooltip
+
+
+
+
+ +
property bool selected
+
+
+
+
+
+
+
+
+ Overview +
Home + Functions + Search +
+
Search:
+Predefined Functions & Example Scripts +
Command +Entity +FactionDatabase +PlanGenerator +Player +Sector +Server +UsableInventoryItem +
+
+

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

+
+ +
+ + diff --git a/Documentation/ComboBox.html b/Documentation/ComboBox.html new file mode 100644 index 0000000..d60db47 --- /dev/null +++ b/Documentation/ComboBox.html @@ -0,0 +1,797 @@ + + + ComboBox + + + + +
+
+

Avorion Script API Documentation

+
+
+ +
+
Search:
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ComboBox +ComboBox +

Properties
+active +
+clampTextAtArrow +
+entriesPerPage +
+onSelectedFunction +
+scrollPosition +
+selectedEntry +
+selectedIndex +
+center +
+height +
+index +
+layer +
+localCenter +
+localPosition +
+localRect +
+lower +
+mouseOver +
+position +
+rect +
+size +
+tooltip +
+tooltipWidth +
+upper +
+visible +
+width +

Member Functions
+addEntry +
+clear +
+getEntry +
+setEntryTooltip +
+setSelectedIndexNoCallback +
+hide +
+isMouseOverAndUnobscured +
+show +
+
+
+
+

ComboBox : UIElement

+

+This object is only available on the client. +

+
+
+

+function ComboBox(int index)
+

+
+
+

Returns

+
+

+A new instance of ComboBox +

+
+

+
+
+
+
+ +
property bool active
+
+
+
+
+ +
property bool clampTextAtArrow[write-only]
+
+
+
+
+ +
property int entriesPerPage[write-only]
+
+
+
+
+ +
property string onSelectedFunction[write-only]
+
+
+
+
+ +
property int scrollPosition
+
+
+
+
+ +
property string selectedEntry[read-only]
+
+
+
+
+ +
property int selectedIndex
+
+
+
+
+ +
property vec2 center
+
+
+
+
+ +
property float height
+
+
+
+
+ +
property int index[read-only]
+
+
+
+
+ +
property int layer
+
+
+
+
+ +
property vec2 localCenter[read-only]
+
+
+
+
+ +
property vec2 localPosition[read-only]
+
+
+
+
+ +
property Rect localRect[read-only]
+
+
+
+
+ +
property vec2 lower
+
+
+
+
+ +
property bool mouseOver[read-only]
+
+
+
+
+ +
property vec2 position
+
+
+
+
+ +
property Rect rect
+
+
+
+
+ +
property vec2 size
+
+
+
+
+ +
property var tooltip
+
+
+
+
+ +
property int tooltipWidth[write-only]
+
+
+
+
+ +
property vec2 upper
+
+
+
+
+ +
property bool visible
+
+
+
+
+ +
property float width
+
+
+
+
+
+
+

+function var addEntry(string entry, var color)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var clear()
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function string getEntry(int index)
+

+
+
+

+
+
+
+
+

+function var setEntryTooltip(int index, string in)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var setSelectedIndexNoCallback(int in)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var hide()
+

+
+
+

+Inherited from UIElement + +

+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function bool isMouseOverAndUnobscured()
+

+
+
+

+Inherited from UIElement + +

+

+
+
+
+
+

+function var show()
+

+
+
+

+Inherited from UIElement + +

+

Returns

+
+

+nothing +

+
+

+
+
+
+
+
+
+ Overview +
Home + Functions + Search +
+
Search:
+Predefined Functions & Example Scripts +
Command +Entity +FactionDatabase +PlanGenerator +Player +Sector +Server +UsableInventoryItem +
+
+

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

+
+ +
+ + diff --git a/Documentation/CommandFunctions.html b/Documentation/CommandFunctions.html new file mode 100644 index 0000000..f33fd5b --- /dev/null +++ b/Documentation/CommandFunctions.html @@ -0,0 +1,484 @@ + + + Avorion Predefined Functions - Command + + + + +
+
+

Avorion Script API Documentation

+
+
+ +
+
Search:
+
+
+ + + + +
+execute +
+getDescription +
+getHelp +
+
+
+
+

Command Script Predefined Functions

+
+

Tip: Scroll down for an example script!

+
+
+

+function execute(playerIndex, ...)
+

+
+

+Called when the command is being executed. If not exactly 3 values are returned, the command is interpreted as a failed command.

Server Function: This function is only called on the server. +

+

Parameters

+
+playerIndex +The index of the player executing the command. nil if the command was issued over RCON interface or console.
+... +The list of string arguments given
+
+

Expected return values

+
+

+3 values: An int indicating whether or not the command was successfully executed (0: no success, otherwise: success), a response message, an error message +

+
+

+
+
+
+

+function getDescription()
+

+
+

+Gathers the description text of a script command.

Server Function: This function is only called on the server. +

+

Expected return values

+
+

+A string containing the short description text for the command +

+
+

+
+
+
+

+function getHelp()
+

+
+

+Gathers the help text of a script command.

Server Function: This function is only called on the server. +

+

Expected return values

+
+

+A string containing the help text for the command +

+
+

+
+
+


Command Example Script

+
+ +-- Called when the command is being executed. If not exactly 3 values are returned, the command
+-- is interpreted as a failed command.
+-- Server Function: This function is only called on the server.
+function execute(playerIndex, ...)
+
+end
+
-- Gathers the description text of a script command.
+-- Server Function: This function is only called on the server.
+function getDescription()
+
+end
+
-- Gathers the help text of a script command.
+-- Server Function: This function is only called on the server.
+function getHelp()
+
+end
+ +
+
+
+
+
+
+ Overview +
Home + Functions + Search +
+
Search:
+Predefined Functions & Example Scripts +
Command +Entity +FactionDatabase +PlanGenerator +Player +Sector +Server +UsableInventoryItem +
+
+

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

+
+ +
+ + diff --git a/Documentation/ContextMenu.html b/Documentation/ContextMenu.html new file mode 100644 index 0000000..cc689af --- /dev/null +++ b/Documentation/ContextMenu.html @@ -0,0 +1,711 @@ + + + ContextMenu + + + + +
+
+

Avorion Script API Documentation

+
+
+ +
+
Search:
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ContextMenu +ContextMenu +

Properties
+onEntryClickedFunction +
+center +
+height +
+index +
+layer +
+localCenter +
+localPosition +
+localRect +
+lower +
+mouseOver +
+position +
+rect +
+size +
+tooltip +
+tooltipWidth +
+upper +
+visible +
+width +

Member Functions
+addEntry +
+clear +
+show +
+hide +
+isMouseOverAndUnobscured +
+show +
+
+
+
+

ContextMenu : UIElement

+

+This object is only available on the client. +

+
+
+

+function ContextMenu(int index)
+

+
+
+

Returns

+
+

+A new instance of ContextMenu +

+
+

+
+
+
+
+ +
property string onEntryClickedFunction
+
+
+
+
+ +
property vec2 center
+
+
+
+
+ +
property float height
+
+
+
+
+ +
property int index[read-only]
+
+
+
+
+ +
property int layer
+
+
+
+
+ +
property vec2 localCenter[read-only]
+
+
+
+
+ +
property vec2 localPosition[read-only]
+
+
+
+
+ +
property Rect localRect[read-only]
+
+
+
+
+ +
property vec2 lower
+
+
+
+
+ +
property bool mouseOver[read-only]
+
+
+
+
+ +
property vec2 position
+
+
+
+
+ +
property Rect rect
+
+
+
+
+ +
property vec2 size
+
+
+
+
+ +
property var tooltip
+
+
+
+
+ +
property int tooltipWidth[write-only]
+
+
+
+
+ +
property vec2 upper
+
+
+
+
+ +
property bool visible
+
+
+
+
+ +
property float width
+
+
+
+
+
+
+

+function var addEntry(string caption, int id, string onClickedFunction)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var clear()
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var show(vec2 position, bool ignoreNextMouseUp)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var hide()
+

+
+
+

+Inherited from UIElement + +

+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function bool isMouseOverAndUnobscured()
+

+
+
+

+Inherited from UIElement + +

+

+
+
+
+
+

+function var show()
+

+
+
+

+Inherited from UIElement + +

+

Returns

+
+

+nothing +

+
+

+
+
+
+
+
+
+ Overview +
Home + Functions + Search +
+
Search:
+Predefined Functions & Example Scripts +
Command +Entity +FactionDatabase +PlanGenerator +Player +Sector +Server +UsableInventoryItem +
+
+

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

+
+ +
+ + diff --git a/Documentation/ControlUnit.html b/Documentation/ControlUnit.html new file mode 100644 index 0000000..71cf918 --- /dev/null +++ b/Documentation/ControlUnit.html @@ -0,0 +1,1304 @@ + + + ControlUnit + + + + +
+
+

Avorion Script API Documentation

+
+
+ +
+
Search:
+ +
+

ControlUnit

+
+
+

+function ControlUnit(var id)
+

+
+
+

Parameters

+
+id +The id of the entity this component belongs to, or the entity itself, must be an id of an existing entity or nil for the entity in the current script context
+
+

Returns

+
+

+A new instance of ControlUnit +

+
+

+
+
+
+
+ +
property bool autoPilotEnabled
+
+
+
+
+ +
property float desiredVelocity[read-only]
+
+The current velocity the ship is trying to fly from 0 to 1, where 0 means standstill and 1 means the maximum speed the ship can fly without boosting. +
+
+
+ +
property Entity entity[read-only]
+
+
+
+
+ +
property uuid entityId[read-only]
+
+
+
+
+ +
property bool hasPilot[read-only]
+
+
+
+
+ +
property bool isBoosting[read-only]
+
+
+
+
+ +
property bool isDrifting[read-only]
+
+
+
+
+ +
property bool isStrafing[read-only]
+
+
+
+
+ +
property bool isTurning[read-only]
+
+
+
+
+ +
property int numFreeSeats[read-only]
+
+
+
+
+ +
property int numOccupiedSeats[read-only]
+
+
+
+
+ +
property vec3 turningSpeedFactor[read-only]
+
+A vec3 containing the turning speed multipliers for axis x, y, z. The turning speed factor is a multiplier for the turning speed of a ship, and is set in flyToLocation(), to smoothen turning once the ship looks towards its target (to avoid jittering). +
+
+
+
+
+

+function var addSeat()
+

+
+
+

+Adds a new seat. +

+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var addSeatSquad(int seatIndex, int fighterSquadIndex)
+

+
+
+

+Adds a new fighter squad for a given seat. +

+

Parameters

+
+seatIndex +The index of the seat (0-9)
+fighterSquadIndex +The index of the fighter squad (0-9)
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var addSeatWeaponGroup(int seatIndex, int weaponGroupIndex)
+

+
+
+

+Adds a new weapon group for a given seat. +

+

Parameters

+
+seatIndex +The index of the seat (0-9)
+weaponGroupIndex +The index of the weapon group (0-9)
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var driftToLocation(vec3 location)
+

+
+
+

+Executes the button presses necessary to have the ship drift to the target location. Drifting to a location means using only thrusters and not the main engine. This function must be called every tick in order to work correctly. +

+

Parameters

+
+location +The target location to drift towards.
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var flyToLocation(vec3 location, float velocityAtTarget)
+

+
+
+

+Executes the button presses necessary to have the ship turn and fly to the target location. This function must be called every tick in order to work correctly. +

+

Parameters

+
+location +The target location to fly towards
+velocityAtTarget +The physical velocity that the ship should have when arriving at its destination. Use real velocity (m/s) here, not desired velocity (0% - 100%)
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function bitset<10> getActiveWeapons()
+

+
+
+

+Returns a list of bools representing the currently active weapon groups. +

+

+
+
+
+
+

+function vec3 getAimedPositionBySeat(int seatIndex)
+

+
+
+

+Returns the aimed position of a given seat. +

+

Parameters

+
+seatIndex +The index of the seat
+
+

+
+
+
+
+

+function vec3 getAimedPositionByWeaponGroup(int groupIndex)
+

+
+
+

+Returns the aimed position of the seat that controls the given weapon group. +

+

Parameters

+
+groupIndex +The weapon group of the seat
+
+

+
+
+
+
+

+function vec3... getAimedPositions()
+

+
+
+

+Returns a list of aimed positions of all seats +

+

+
+
+
+
+

+function int... getAllControlActions()
+

+
+
+

+Returns a list of bitsets (represented as ints) of control actions of all seats. +

+

+
+
+
+
+

+function int getControlActions(int seatIndex)
+

+
+
+

+Returns the bitset of control actions of a given seat. +

+

Parameters

+
+seatIndex +The index of the seat
+
+

+
+
+
+
+

+function int getControlActionsByWeaponGroup(int groupIndex)
+

+
+
+

+Returns the bitset of control actions of the seat that controls the given weapon group. +

+

Parameters

+
+groupIndex +The weapon group of the seat
+
+

+
+
+
+
+

+function vec3 getFlownToLocation()
+

+
+
+

+Returns the currently flown to location, which is set by calls to flyToLocation. Note: When the AI flies towards a location, it also sets this. +

+

+
+
+
+
+

+function int getSeatByWeaponGroup(int groupIndex)
+

+
+
+

+Returns the seat that controls a particular weapon group. +

+

Parameters

+
+groupIndex +The weapon group of the seat
+
+

+
+
+
+
+

+function ControlUnitSeat... getSeats()
+

+
+
+

+Returns a list of seats of the control unit. +

+

+
+
+
+
+

+function Entity getSelectedObject(int seatIndex)
+

+
+
+

+Returns the selected object of a given seat. +

+

Parameters

+
+seatIndex +The index of the seat
+
+

+
+
+
+
+

+function uuid getSelectedObjectId(int seatIndex)
+

+
+
+

+Returns the id of the selected object of a given seat. +

+

Parameters

+
+seatIndex +The index of the seat
+
+

+
+
+
+
+

+function uuid... getSelectedObjectIds()
+

+
+
+

+Returns a list of selected target ids of all seats +

+

+
+
+
+
+

+function bool isFiring(int seat)
+

+
+
+

+Checks if the given seat is currently pushing "Fire" (see ControlActionBit.Fire1) +

+

+
+
+
+
+

+function bool isFiringTorpedoes(int seat)
+

+
+
+

+Checks if the given seat is currently pushing "Fire Torpedoes" (see ControlActionBit.Fire2) +

+

+
+
+
+
+

+function bool isPlayerAPilot(int playerIndex)
+

+
+
+

+Checks if the given player is setting in any seat of the control unit. +

+

Parameters

+
+playerIndex +The index of the player
+
+

+
+
+
+
+

+function bool mayControlSquad(int playerIndex, int squadIndex)
+

+
+
+

+Checks if the given player has the right to control the given fighter squad. +

+

Parameters

+
+playerIndex +The index of the player
+squadIndex +The index of the squad
+
+

+
+
+
+
+

+function bool mayControlWeaponGroup(int playerIndex, int groupIndex)
+

+
+
+

+Checks if the given player has the right to control the given weapon group. +

+

Parameters

+
+playerIndex +The index of the player
+groupIndex +The index of the weapon group
+
+

+
+
+
+
+

+function bool maySteer(int playerIndex)
+

+
+
+

+Checks if the given player has the right to pilot (steer) the ship. The player must be sitting in the pilot seat. +

+

Parameters

+
+playerIndex +The index of the player
+
+

+
+
+
+
+

+function var removeSeat(int seatIndex)
+

+
+
+

+Removes the given seat. Seat 0 can't be removed. +

+

Parameters

+
+seatIndex +The seat index between 1 and the amount of seats minus 1
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var setAimedPosition(vec3 location, int seatIndex)
+

+
+
+

+Sets the current position that the non-independent turrets of the ship should aim at. This is, for example, what is set when the player aims. +

+

Parameters

+
+location +The location that the turrets should aim at
+seatIndex +The seat that the position should be set for
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var setControlActions(int mask, int seatIndex)
+

+
+
+

+Sets the current control actions of the ship. A control action is basically a virtual button that is pressed on the control unit. +

+

Parameters

+
+mask +A bitset of buttons that are pressed (see ControlActionBit)
+seatIndex +The seat that the control actions should be set for
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var setDesiredVelocity(float desiredVelocity)
+

+
+
+

+Sets the desired velocity of the ship. Desired velocity is measured from 0 (standstill) to 1 (maximum speed the ship can fly). The engine of the ship will accelerate normally until the desired velocity is reached. This will not influence boosting. +

+

Parameters

+
+desiredVelocity +The desired velocity to use (0 to 1)
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var setKeyDownMask(int mask, int seatIndex)
+

+
+
+

+Enables control actions of the ship. A control action is basically a virtual button that is pressed on the control unit. This function presses them (as in: pushes them down). +

+

Parameters

+
+mask +A bitset of buttons that are pressed (see ControlActionBit)
+seatIndex +The seat that the control actions should be set for
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var setKeyUpMask(int mask, int seatIndex)
+

+
+
+

+Disables control actions of the ship. A control action is basically a virtual button that is pressed on the control unit. This function releases them. +

+

Parameters

+
+mask +A bitset of buttons that are released (see ControlActionBit)
+seatIndex +The seat that the control actions should be set for
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var setSelectedObjectId(Uuid location, int seatIndex)
+

+
+
+

+Sets the current position that the non-independent turrets of the ship should aim at. This is, for example, what is set when the player aims. +

+

Parameters

+
+location +The location that the turrets should aim at
+seatIndex +The seat that the position should be set for
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var setTurningSpeedFactor(vec3 factor)
+

+
+
+

+Sets the current turning speed factor. The turning speed factor is a multiplier for the turning speed of a ship, used in flyToLocation(), to smoothen turning once the ship looks towards its target (to avoid jittering). It is set during flyToLocation(), so make sure to set it to (1, 1, 1) if you want to control the ship yourself. +

+

Parameters

+
+factor +A vec3 containing the turning speed multipliers for axis x, y, z
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var stopShip()
+

+
+
+

+Releases all buttons and sets the ship's desired velocity to 0. +

+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var stopSteering()
+

+
+
+

+Releases all buttons but keeps the ship's desired velocity. +

+

Returns

+
+

+nothing +

+
+

+
+
+
+
+
+
+ Overview +
Home + Functions + Search +
+
Search:
+Predefined Functions & Example Scripts +
Command +Entity +FactionDatabase +PlanGenerator +Player +Sector +Server +UsableInventoryItem +
+
+

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

+
+ +
+ + diff --git a/Documentation/ControlUnitSeat.html b/Documentation/ControlUnitSeat.html new file mode 100644 index 0000000..9614214 --- /dev/null +++ b/Documentation/ControlUnitSeat.html @@ -0,0 +1,495 @@ + + + ControlUnitSeat + + + + +
+
+

Avorion Script API Documentation

+
+
+ +
+
Search:
+
+
+ + + + + + + + + + + + + + + + +
+ControlUnitSeat +ControlUnitSeat +

Properties
+aimedPosition +
+controlActions +
+controllableSquadrons +
+controllableWeapons +
+occupied +
+playerIndex +
+selectedObjectId +
+steering +

Member Functions
+
+
+
+

ControlUnitSeat

+
+
+

+function ControlUnitSeat()
+

+
+
+

+This is the default constructor of ControlUnitSeat. No further arguments are required. +

+

Returns

+
+

+A new instance of ControlUnitSeat +

+
+

+
+
+
+
+ +
property vec3 aimedPosition[read-only]
+
+
+
+
+ +
property int controlActions[read-only]
+
+
+
+
+ +
property bitset<10> controllableSquadrons[read-only]
+
+
+
+
+ +
property bitset<10> controllableWeapons[read-only]
+
+
+
+
+ +
property bool occupied[read-only]
+
+
+
+
+ +
property int playerIndex[read-only]
+
+
+
+
+ +
property uuid selectedObjectId[read-only]
+
+
+
+
+ +
property bool steering[read-only]
+
+
+
+
+
+
+
+
+ Overview +
Home + Functions + Search +
+
Search:
+Predefined Functions & Example Scripts +
Command +Entity +FactionDatabase +PlanGenerator +Player +Sector +Server +UsableInventoryItem +
+
+

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

+
+ +
+ + diff --git a/Documentation/CraftDesign.html b/Documentation/CraftDesign.html new file mode 100644 index 0000000..2db6c9f --- /dev/null +++ b/Documentation/CraftDesign.html @@ -0,0 +1,582 @@ + + + CraftDesign + + + + +
+
+

Avorion Script API Documentation

+
+
+ +
+
Search:
+
+
+ + + + + + + + + + + + + + + + + + + +
+CraftDesign +CraftDesign +

Properties
+empty +
+numTurrets +

Member Functions
+getMovePlan +
+getMoveTurret +
+getPlan +
+getTurret +
+getTurrets +
+setMovePlan +
+setMoveTurret +
+setPlan +
+setTurret +
+
+
+
+

CraftDesign

+
+
+

+function CraftDesign()
+

+
+
+

+This is the default constructor of CraftDesign. No further arguments are required. +

+

Returns

+
+

+A new instance of CraftDesign +

+
+

+
+
+
+
+ +
property bool empty[read-only]
+
+
+
+
+ +
property static Box getCoaxialTurretDesignBoundingBox(float numTurrets[read-only]
+
+
+
+
+
+
+

+function BlockPlan getMovePlan()
+

+
+
+

+
+
+
+
+

+function TurretDesign getMoveTurret(int i)
+

+
+
+

+
+
+
+
+

+function BlockPlan getPlan()
+

+
+
+

+
+
+
+
+

+function TurretDesign getTurret(int i)
+

+
+
+

+
+
+
+
+

+function int... getTurrets()
+

+
+
+

+
+
+
+
+

+function var setMovePlan(BlockPlan plan)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var setMoveTurret(int i, TurretDesign turret)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var setPlan(BlockPlan plan)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var setTurret(int i, TurretDesign [or nil] turret)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+
+
+ Overview +
Home + Functions + Search +
+
Search:
+Predefined Functions & Example Scripts +
Command +Entity +FactionDatabase +PlanGenerator +Player +Sector +Server +UsableInventoryItem +
+
+

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

+
+ +
+ + diff --git a/Documentation/CraftDesignSelectionItem.html b/Documentation/CraftDesignSelectionItem.html new file mode 100644 index 0000000..9a98c72 --- /dev/null +++ b/Documentation/CraftDesignSelectionItem.html @@ -0,0 +1,531 @@ + + + CraftDesignSelectionItem + + + + +
+
+

Avorion Script API Documentation

+
+
+ +
+
Search:
+
+
+ + + + + + + + + + + + + + + + + + + + +
+CraftDesignSelectionItem +CraftDesignSelectionItem +

Properties
+deleteable +
+design +
+hasWorkshopIcon +
+highlighted +
+isLocalProject +
+isOwnSubmission +
+isSubscribedDesign +
+path +
+plan +
+readyForDeletion +
+type +
+workshopUrl +

Member Functions
+
+
+
+

CraftDesignSelectionItem

+

+This object is only available on the client. +

+
+
+

+function CraftDesignSelectionItem(string path)
+

+
+
+

Returns

+
+

+A new instance of CraftDesignSelectionItem +

+
+

+
+
+
+
+ +
property bool deleteable
+
+
+
+
+ +
property CraftDesign design[read-only]
+
+
+
+
+ +
property bool hasWorkshopIcon[read-only]
+
+
+
+
+ +
property bool highlighted
+
+
+
+
+ +
property bool isLocalProject
+
+
+
+
+ +
property bool isOwnSubmission
+
+
+
+
+ +
property bool isSubscribedDesign
+
+
+
+
+ +
property string path
+
+
+
+
+ +
property BlockPlan plan[read-only]
+
+
+
+
+ +
property bool readyForDeletion
+
+
+
+
+ +
property SavedDesignType type[read-only]
+
+
+
+
+ +
property string workshopUrl[read-only]
+
+
+
+
+
+
+
+
+ Overview +
Home + Functions + Search +
+
Search:
+Predefined Functions & Example Scripts +
Command +Entity +FactionDatabase +PlanGenerator +Player +Sector +Server +UsableInventoryItem +
+
+

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

+
+ +
+ + diff --git a/Documentation/CraftPortrait.html b/Documentation/CraftPortrait.html new file mode 100644 index 0000000..3c36709 --- /dev/null +++ b/Documentation/CraftPortrait.html @@ -0,0 +1,744 @@ + + + CraftPortrait + + + + +
+
+

Avorion Script API Documentation

+
+
+ +
+
Search:
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+CraftPortrait +CraftPortrait +

Properties
+alliance +
+available +
+craftName +
+fontColor +
+fontSize +
+frameColor +
+inSector +
+onPressedFunction +
+onRightClickedFunction +
+selectable +
+selected +
+center +
+height +
+index +
+layer +
+localCenter +
+localPosition +
+localRect +
+lower +
+mouseOver +
+position +
+rect +
+size +
+tooltip +
+tooltipWidth +
+upper +
+visible +
+width +

Member Functions
+hide +
+isMouseOverAndUnobscured +
+show +
+
+
+
+

CraftPortrait : UIElement

+

+This object is only available on the client. +

+
+
+

+function CraftPortrait(int index)
+

+
+
+

Returns

+
+

+A new instance of CraftPortrait +

+
+

+
+
+
+
+ +
property bool alliance
+
+
+
+
+ +
property bool available
+
+
+
+
+ +
property string craftName[write-only]
+
+
+
+
+ +
property Color fontColor
+
+
+
+
+ +
property int fontSize
+
+
+
+
+ +
property Color frameColor
+
+
+
+
+ +
property bool inSector
+
+
+
+
+ +
property string onPressedFunction
+
+
+
+
+ +
property string onRightClickedFunction
+
+
+
+
+ +
property bool selectable
+
+
+
+
+ +
property bool selected
+
+
+
+
+ +
property vec2 center
+
+
+
+
+ +
property float height
+
+
+
+
+ +
property int index[read-only]
+
+
+
+
+ +
property int layer
+
+
+
+
+ +
property vec2 localCenter[read-only]
+
+
+
+
+ +
property vec2 localPosition[read-only]
+
+
+
+
+ +
property Rect localRect[read-only]
+
+
+
+
+ +
property vec2 lower
+
+
+
+
+ +
property bool mouseOver[read-only]
+
+
+
+
+ +
property vec2 position
+
+
+
+
+ +
property Rect rect
+
+
+
+
+ +
property vec2 size
+
+
+
+
+ +
property var tooltip
+
+
+
+
+ +
property int tooltipWidth[write-only]
+
+
+
+
+ +
property vec2 upper
+
+
+
+
+ +
property bool visible
+
+
+
+
+ +
property float width
+
+
+
+
+
+
+

+function var hide()
+

+
+
+

+Inherited from UIElement + +

+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function bool isMouseOverAndUnobscured()
+

+
+
+

+Inherited from UIElement + +

+

+
+
+
+
+

+function var show()
+

+
+
+

+Inherited from UIElement + +

+

Returns

+
+

+nothing +

+
+

+
+
+
+
+
+
+ Overview +
Home + Functions + Search +
+
Search:
+Predefined Functions & Example Scripts +
Command +Entity +FactionDatabase +PlanGenerator +Player +Sector +Server +UsableInventoryItem +
+
+

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

+
+ +
+ + diff --git a/Documentation/CraftStatsOverview.html b/Documentation/CraftStatsOverview.html new file mode 100644 index 0000000..1765ee9 --- /dev/null +++ b/Documentation/CraftStatsOverview.html @@ -0,0 +1,563 @@ + + + CraftStatsOverview + + + + +
+
+

Avorion Script API Documentation

+
+
+ +
+
Search:
+
+
+ + + + + + + + + + + + + + + + + + + +
+CraftStatsOverview +CraftStatsOverview +

Properties
+includeCrew +
+includeEnergy +
+includeUpgrades +

Member Functions
+getEfficiency +
+getUnit +
+getValue +
+isBadValue +
+isDangerousValue +
+isRelevant +
+setIncludeImpact +
+update +
+
+
+
+

CraftStatsOverview

+
+
+

+function CraftStatsOverview(Entity [or nil] entity)
+

+
+
+

Returns

+
+

+A new instance of CraftStatsOverview +

+
+

+
+
+
+
+ +
property bool includeCrew
+
+
+
+
+ +
property bool includeEnergy
+
+
+
+
+ +
property bool includeUpgrades
+
+
+
+
+
+
+

+function float getEfficiency(CraftStatsOverview::Stat stat)
+

+
+
+

+
+
+
+
+

+function string getUnit(CraftStatsOverview::Stat stat)
+

+
+
+

+
+
+
+
+

+function var getValue(CraftStatsOverview::Stat key)
+

+
+
+

+
+
+
+
+

+function bool isBadValue(CraftStatsOverview::Stat stat)
+

+
+
+

+
+
+
+
+

+function bool isDangerousValue(CraftStatsOverview::Stat stat)
+

+
+
+

+
+
+
+
+

+function bool isRelevant(CraftStatsOverview::Stat stat)
+

+
+
+

+
+
+
+
+

+function var setIncludeImpact(bool crew, bool energy, bool upgrades)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var update(Entity entity)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+
+
+ Overview +
Home + Functions + Search +
+
Search:
+Predefined Functions & Example Scripts +
Command +Entity +FactionDatabase +PlanGenerator +Player +Sector +Server +UsableInventoryItem +
+
+

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

+
+ +
+ + diff --git a/Documentation/Crew.html b/Documentation/Crew.html new file mode 100644 index 0000000..eab206f --- /dev/null +++ b/Documentation/Crew.html @@ -0,0 +1,842 @@ + + + Crew + + + + +
+
+

Avorion Script API Documentation

+
+
+ +
+
Search:
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Crew +Crew +

Properties
+attackers +
+autoAssignCrew +
+engineers +
+gunners +
+maxSize +
+mechanics +
+miners +
+pilots +
+security +
+size +
+unemployed +

Member Functions
+add +
+addPassenger +
+buildIdealCrew +
+buildMinimumCrew +
+changeEmployment +
+clear +
+clearPassengers +
+getCaptain +
+getMembers +
+getMembersByProfession +
+getNumMembers +
+getNumMembersByProfession +
+getPassengers +
+getWorkforce +
+hasCaptain +
+kill +
+remove +
+removeByProfession +
+removePassenger +
+setCaptain +
+
+
+
+

Crew

+
+
+

+function Crew()
+

+
+
+

+This is the default constructor of Crew. No further arguments are required. +

+

Returns

+
+

+A new instance of Crew +

+
+

+
+
+
+
+ +
property int attackers[read-only]
+
+
+
+
+ +
property int autoAssignCrew[read-only]
+
+
+
+
+ +
property int engineers[read-only]
+
+
+
+
+ +
property int gunners[read-only]
+
+
+
+
+ +
property unsigned int maxSize
+
+
+
+
+ +
property int mechanics[read-only]
+
+
+
+
+ +
property int miners[read-only]
+
+
+
+
+ +
property int pilots[read-only]
+
+
+
+
+ +
property int security[read-only]
+
+
+
+
+ +
property unsigned int size[read-only]
+
+
+
+
+ +
property int unemployed[read-only]
+
+
+
+
+
+
+

+function var add(int amount, CrewMan crewman)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var addPassenger(Captain captain)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function Crew buildIdealCrew(BlockPlan [or nil] plan)
+

+
+
+

+
+
+
+
+

+function Crew buildMinimumCrew(BlockPlan [or nil] plan)
+

+
+
+

+
+
+
+
+

+function var changeEmployment(int amount, int profession)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var clear()
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var clearPassengers()
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function Captain getCaptain()
+

+
+
+

+
+
+
+
+

+function table<CrewMan, unsigned int> getMembers()
+

+
+
+

+
+
+
+
+

+function int getMembersByProfession(int profession)
+

+
+
+

+
+
+
+
+

+function int getNumMembers(CrewMan crewman)
+

+
+
+

+
+
+
+
+

+function table<CrewProfession, unsigned int> getNumMembersByProfession()
+

+
+
+

+
+
+
+
+

+function Captain... getPassengers()
+

+
+
+

+
+
+
+
+

+function table<CrewProfession, float> getWorkforce()
+

+
+
+

+
+
+
+
+

+function bool hasCaptain()
+

+
+
+

+
+
+
+
+

+function var kill(int num)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var remove(int amount, CrewMan crewman)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var removeByProfession(int amount, int crewProfessionType)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var removePassenger(unsigned int index)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var setCaptain(Captain [or nil] captain)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+
+
+ Overview +
Home + Functions + Search +
+
Search:
+Predefined Functions & Example Scripts +
Command +Entity +FactionDatabase +PlanGenerator +Player +Sector +Server +UsableInventoryItem +
+
+

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

+
+ +
+ + diff --git a/Documentation/CrewBar.html b/Documentation/CrewBar.html new file mode 100644 index 0000000..ecee627 --- /dev/null +++ b/Documentation/CrewBar.html @@ -0,0 +1,711 @@ + + + CrewBar + + + + +
+
+

Avorion Script API Documentation

+
+
+ +
+
Search:
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+CrewBar +CrewBar +

Properties
+visiblePerCategory +
+center +
+height +
+index +
+layer +
+localCenter +
+localPosition +
+localRect +
+lower +
+mouseOver +
+position +
+rect +
+size +
+tooltip +
+tooltipWidth +
+upper +
+visible +
+width +

Member Functions
+clear +
+setCrewmen +
+setDisplayedCrew +
+hide +
+isMouseOverAndUnobscured +
+show +
+
+
+
+

CrewBar : UIElement

+

+This object is only available on the client. +

+
+
+

+function CrewBar(int index)
+

+
+
+

Returns

+
+

+A new instance of CrewBar +

+
+

+
+
+
+
+ +
property int visiblePerCategory[write-only]
+
+
+
+
+ +
property vec2 center
+
+
+
+
+ +
property float height
+
+
+
+
+ +
property int index[read-only]
+
+
+
+
+ +
property int layer
+
+
+
+
+ +
property vec2 localCenter[read-only]
+
+
+
+
+ +
property vec2 localPosition[read-only]
+
+
+
+
+ +
property Rect localRect[read-only]
+
+
+
+
+ +
property vec2 lower
+
+
+
+
+ +
property bool mouseOver[read-only]
+
+
+
+
+ +
property vec2 position
+
+
+
+
+ +
property Rect rect
+
+
+
+
+ +
property vec2 size
+
+
+
+
+ +
property var tooltip
+
+
+
+
+ +
property int tooltipWidth[write-only]
+
+
+
+
+ +
property vec2 upper
+
+
+
+
+ +
property bool visible
+
+
+
+
+ +
property float width
+
+
+
+
+
+
+

+function var clear()
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var setCrewmen(CrewMan crewman, int amount)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var setDisplayedCrew(Crew crew, CrewProfession profession, var level)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var hide()
+

+
+
+

+Inherited from UIElement + +

+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function bool isMouseOverAndUnobscured()
+

+
+
+

+Inherited from UIElement + +

+

+
+
+
+
+

+function var show()
+

+
+
+

+Inherited from UIElement + +

+

Returns

+
+

+nothing +

+
+

+
+
+
+
+
+
+ Overview +
Home + Functions + Search +
+
Search:
+Predefined Functions & Example Scripts +
Command +Entity +FactionDatabase +PlanGenerator +Player +Sector +Server +UsableInventoryItem +
+
+

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

+
+ +
+ + diff --git a/Documentation/CrewComponent.html b/Documentation/CrewComponent.html new file mode 100644 index 0000000..2c8e7ec --- /dev/null +++ b/Documentation/CrewComponent.html @@ -0,0 +1,844 @@ + + + CrewComponent + + + + +
+
+

Avorion Script API Documentation

+
+
+ +
+
Search:
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+CrewComponent +CrewComponent +

Properties
+attackers +
+autoAssignCrew +
+engineers +
+gunners +
+maxSize +
+mechanics +
+miners +
+pilots +
+security +
+size +
+unemployed +

Member Functions
+add +
+addPassenger +
+buildIdealCrew +
+canAddCrew +
+canAddPassenger +
+changeEmployment +
+clear +
+clearPassengers +
+getCaptain +
+getMembers +
+getMembersByProfession +
+getNumMembers +
+getPassengers +
+getWorkforce +
+hasCaptain +
+kill +
+remove +
+removeByProfession +
+removePassenger +
+setCaptain +
+
+
+
+

CrewComponent

+
+
+

+function CrewComponent(var id)
+

+
+
+

Parameters

+
+id +The id of the entity this component belongs to, or the entity itself, must be an id of an existing entity or nil for the entity in the current script context
+
+

Returns

+
+

+A new instance of CrewComponent +

+
+

+
+
+
+
+ +
property int attackers[read-only]
+
+
+
+
+ +
property int autoAssignCrew[read-only]
+
+
+
+
+ +
property int engineers[read-only]
+
+
+
+
+ +
property int gunners[read-only]
+
+
+
+
+ +
property int maxSize[read-only]
+
+
+
+
+ +
property int mechanics[read-only]
+
+
+
+
+ +
property int miners[read-only]
+
+
+
+
+ +
property int pilots[read-only]
+
+
+
+
+ +
property int security[read-only]
+
+
+
+
+ +
property int size[read-only]
+
+
+
+
+ +
property int unemployed[read-only]
+
+
+
+
+
+
+

+function var add(int amount, CrewMan crewman)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var addPassenger(Captain captain)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function Crew buildIdealCrew(BlockPlan [or nil] plan)
+

+
+
+

+
+
+
+
+

+function var, var, table<int, string> canAddCrew(int number, int profession, int change)
+

+
+
+

+
+
+
+
+

+function var, var, table<int, string> canAddPassenger(var passenger)
+

+
+
+

+
+
+
+
+

+function var changeEmployment(int amount, int profession)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var clear()
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var clearPassengers()
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function Captain getCaptain()
+

+
+
+

+
+
+
+
+

+function table<CrewMan, unsigned int> getMembers()
+

+
+
+

+
+
+
+
+

+function int getMembersByProfession(int profession)
+

+
+
+

+
+
+
+
+

+function int getNumMembers(CrewMan crewman)
+

+
+
+

+
+
+
+
+

+function Captain... getPassengers()
+

+
+
+

+
+
+
+
+

+function table<CrewProfession, float> getWorkforce()
+

+
+
+

+
+
+
+
+

+function bool hasCaptain(var captainClass)
+

+
+
+

+
+
+
+
+

+function var kill(int num)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var remove(int amount, CrewMan crewman)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var removeByProfession(int amount, int crewProfessionType)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var removePassenger(unsigned int index)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var setCaptain(Captain [or nil] captain)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+
+
+ Overview +
Home + Functions + Search +
+
Search:
+Predefined Functions & Example Scripts +
Command +Entity +FactionDatabase +PlanGenerator +Player +Sector +Server +UsableInventoryItem +
+
+

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

+
+ +
+ + diff --git a/Documentation/CrewMan.html b/Documentation/CrewMan.html new file mode 100644 index 0000000..e3562e3 --- /dev/null +++ b/Documentation/CrewMan.html @@ -0,0 +1,465 @@ + + + CrewMan + + + + +
+
+

Avorion Script API Documentation

+
+
+ +
+
Search:
+
+
+ + + + + + + + + + + + + +
+CrewMan +CrewMan +

Properties
+level +
+profession +
+rank +
+specialist +
+workforce +

Member Functions
+
+
+
+

CrewMan

+
+
+

+function CrewMan(var profession, var specialist, var level)
+

+
+
+

Returns

+
+

+A new instance of CrewMan +

+
+

+
+
+
+
+ +
property int level
+
+
+
+
+ +
property CrewProfession profession
+
+
+
+
+ +
property CrewRank rank
+
+
+
+
+ +
property int specialist
+
+
+
+
+ +
property table<CrewProfession, float> workforce[read-only]
+
+
+
+
+
+
+
+
+ Overview +
Home + Functions + Search +
+
Search:
+Predefined Functions & Example Scripts +
Command +Entity +FactionDatabase +PlanGenerator +Player +Sector +Server +UsableInventoryItem +
+
+

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

+
+ +
+ + diff --git a/Documentation/CrewProfession.html b/Documentation/CrewProfession.html new file mode 100644 index 0000000..cf8f60f --- /dev/null +++ b/Documentation/CrewProfession.html @@ -0,0 +1,509 @@ + + + CrewProfession + + + + +
+
+

Avorion Script API Documentation

+
+
+ +
+
Search:
+
+
+ + + + + + + + + + + + + + + + + +
+CrewProfession +CrewProfession +

Properties
+assignable +
+color +
+description +
+icon +
+price +
+salary +
+value +

Member Functions
+__eq +
+name +
+
+
+
+

CrewProfession

+
+
+

+function CrewProfession(int value)
+

+
+
+

Returns

+
+

+A new instance of CrewProfession +

+
+

+
+
+
+
+ +
property bool assignable[read-only]
+
+
+
+
+ +
property Color color[read-only]
+
+
+
+
+ +
property string description[read-only]
+
+
+
+
+ +
property string icon[read-only]
+
+
+
+
+ +
property unsigned int price[read-only]
+
+
+
+
+ +
property unsigned int salary[read-only]
+
+
+
+
+ +
property int value
+
+
+
+
+
+
+

+function bool __eq(CrewProfession other)
+

+
+
+

+
+
+
+
+

+function string name(var amount)
+

+
+
+

+
+
+
+
+
+
+ Overview +
Home + Functions + Search +
+
Search:
+Predefined Functions & Example Scripts +
Command +Entity +FactionDatabase +PlanGenerator +Player +Sector +Server +UsableInventoryItem +
+
+

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

+
+ +
+ + diff --git a/Documentation/DebugInfo.html b/Documentation/DebugInfo.html new file mode 100644 index 0000000..2557985 --- /dev/null +++ b/Documentation/DebugInfo.html @@ -0,0 +1,501 @@ + + + DebugInfo + + + + +
+
+

Avorion Script API Documentation

+
+
+ +
+
Search:
+
+
+ + + + + + + + + + + + + +
+DebugInfo +DebugInfo +

Properties

Member Functions
+getEndingLog +
+getStartingLog +
+log +
+set +
+threadSet +
+
+
+
+

DebugInfo

+
+
+

+function DebugInfo()
+

+
+
+

Returns

+
+

+A new instance of DebugInfo +

+
+

+
+
+
+
+

+function string getEndingLog()
+

+
+
+

+
+
+
+
+

+function string getStartingLog()
+

+
+
+

+
+
+
+
+

+function var log()
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var set(string key, string value)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var threadSet(string key, string value)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+
+
+ Overview +
Home + Functions + Search +
+
Search:
+Predefined Functions & Example Scripts +
Command +Entity +FactionDatabase +PlanGenerator +Player +Sector +Server +UsableInventoryItem +
+
+

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

+
+ +
+ + diff --git a/Documentation/DeletionTimer.html b/Documentation/DeletionTimer.html new file mode 100644 index 0000000..b5b05d3 --- /dev/null +++ b/Documentation/DeletionTimer.html @@ -0,0 +1,480 @@ + + + DeletionTimer + + + + +
+
+

Avorion Script API Documentation

+
+
+ +
+
Search:
+
+
+ + + + + + + + + + + + + +
+DeletionTimer +DeletionTimer +

Properties
+enabled +
+entity +
+entityId +
+timeLeft +

Member Functions
+disable +
+
+
+
+

DeletionTimer

+
+
+

+function DeletionTimer(var id)
+

+
+
+

Parameters

+
+id +The id of the entity this component belongs to, or the entity itself, must be an id of an existing entity or nil for the entity in the current script context
+
+

Returns

+
+

+A new instance of DeletionTimer +

+
+

+
+
+
+
+ +
property bool enabled[read-only]
+
+
+
+
+ +
property Entity entity[read-only]
+
+
+
+
+ +
property uuid entityId[read-only]
+
+
+
+
+ +
property float timeLeft
+
+
+
+
+
+
+

+function var disable()
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+
+
+ Overview +
Home + Functions + Search +
+
Search:
+Predefined Functions & Example Scripts +
Command +Entity +FactionDatabase +PlanGenerator +Player +Sector +Server +UsableInventoryItem +
+
+

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

+
+ +
+ + diff --git a/Documentation/DirectFlightPhysics.html b/Documentation/DirectFlightPhysics.html new file mode 100644 index 0000000..ca589dc --- /dev/null +++ b/Documentation/DirectFlightPhysics.html @@ -0,0 +1,470 @@ + + + DirectFlightPhysics + + + + +
+
+

Avorion Script API Documentation

+
+
+ +
+
Search:
+
+
+ + + + + + + + + + + + + +
+DirectFlightPhysics +DirectFlightPhysics +

Properties
+drifting +
+entity +
+entityId +
+maxVelocity +
+turningSpeed +

Member Functions
+
+
+
+

DirectFlightPhysics

+
+
+

+function DirectFlightPhysics(var id)
+

+
+
+

Parameters

+
+id +The id of the entity this component belongs to, or the entity itself, must be an id of an existing entity or nil for the entity in the current script context
+
+

Returns

+
+

+A new instance of DirectFlightPhysics +

+
+

+
+
+
+
+ +
property bool drifting
+
+
+
+
+ +
property Entity entity[read-only]
+
+
+
+
+ +
property uuid entityId[read-only]
+
+
+
+
+ +
property float maxVelocity
+
+
+
+
+ +
property float turningSpeed
+
+
+
+
+
+
+
+
+ Overview +
Home + Functions + Search +
+
Search:
+Predefined Functions & Example Scripts +
Command +Entity +FactionDatabase +PlanGenerator +Player +Sector +Server +UsableInventoryItem +
+
+

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

+
+ +
+ + diff --git a/Documentation/DockingClamps.html b/Documentation/DockingClamps.html new file mode 100644 index 0000000..dc6be38 --- /dev/null +++ b/Documentation/DockingClamps.html @@ -0,0 +1,572 @@ + + + DockingClamps + + + + +
+
+

Avorion Script API Documentation

+
+
+ +
+
Search:
+
+
+ + + + + + + + + + + + + + + +
+DockingClamps +DockingClamps +

Properties
+numDocks +

Member Functions
+dock +
+forceDock +
+getDockedEntities +
+getDocks +
+isDocked +
+undock +
+
+
+
+

DockingClamps

+
+
+

+function DockingClamps(var id)
+

+
+
+

Parameters

+
+id +The id of the entity this component belongs to, or the entity itself, must be an id of an existing entity or nil for the entity in the current script context
+
+

Returns

+
+

+A new instance of DockingClamps +

+
+

+
+
+
+
+ +
property int numDocks[read-only]
+
+
+
+
+
+
+

+function bool dock(Entity dockee, var dockIndex)
+

+
+
+

+Docks an Entity (dockee) to this Entity (parent), if the given dock is free. Note: This function doesn't dock the entity immediately, but during the upcoming update tick. If during the same tick another parent wants to dock the same dockee, the result which of the parents will actually dock the dockee is random. The dockee must be in position to be docked, otherwise this won't work. +

+

Parameters

+
+dockee +The entity that is to be docked
+dockIndex +The index of the dock that is to be used. Use nil to use the first free dock.
+
+

Returns

+
+

+true if the given dock is free (or a free dock was found), false otherwise. +

+
+

+
+
+
+
+

+function bool forceDock(Entity dockee, var dockIndex, var blockIndex, var look, var up)
+

+
+
+

+Docks an Entity (dockee) to this Entity (parent), if the given dock is free. Note: This function doesn't dock the entity immediately, but during the upcoming update tick. If during the same tick another parent wants to dock the same dockee, the result which of the parents will actually dock the dockee is random. +

+

Parameters

+
+dockee +The entity that is to be docked
+dockIndex +The index of the dock that is to be used. Use nil to use the first free dock.
+blockIndex +The index of the block on the other ship that is to be docked. If nil, uses the outermost block on the side that will be docked.
+look +The look direction of the object to dock. If nil, will use the parent's direction. This direction must be in local space of the parent object. You can either use a vec3, an ivec3, or a string indicating the direction, such as "x" or "-y".
+up +The up direction of the object to dock. If nil, will use the parent's direction. This direction must be in local space of the parent object. You can either use a vec3, an ivec3, or a string indicating the direction, such as "x" or "-y".
+
+

Returns

+
+

+true if the given dock is free (or a free dock was found), false otherwise. +

+
+

+
+
+
+
+

+function Uuid... getDockedEntities()
+

+
+
+

+
+
+
+
+

+function table_t getDocks()
+

+
+
+

+
+
+
+
+

+function bool isDocked(var entity)
+

+
+
+

+Checks if another entity is physically docked. +

+

Parameters

+
+entity +The entity to check. Can be a Uuid, (uuid-)string or Entity.
+
+

Returns

+
+

+true if physically docked, false otherwise. +

+
+

+
+
+
+
+

+function bool undock(Entity dockee)
+

+
+
+

+Undocks an Entity (dockee) from this Entity (parent), if docked. Note: This function doesn't undock the entity immediately, but during the upcoming update tick. +

+

Parameters

+
+dockee +The entity that is to be undocked
+
+

+
+
+
+
+
+
+ Overview +
Home + Functions + Search +
+
Search:
+Predefined Functions & Example Scripts +
Command +Entity +FactionDatabase +PlanGenerator +Player +Sector +Server +UsableInventoryItem +
+
+

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

+
+ +
+ + diff --git a/Documentation/DockingParent.html b/Documentation/DockingParent.html new file mode 100644 index 0000000..7bdbd42 --- /dev/null +++ b/Documentation/DockingParent.html @@ -0,0 +1,610 @@ + + + DockingParent + + + + +
+
+

Avorion Script API Documentation

+
+
+ +
+
Search:
+ +
+

DockingParent

+
+
+

+function DockingParent(var id)
+

+
+
+

Parameters

+
+id +The id of the entity this component belongs to, or the entity itself, must be an id of an existing entity or nil for the entity in the current script context
+
+

Returns

+
+

+A new instance of DockingParent +

+
+

+
+
+
+
+ +
property bool dockable
+
+
+
+
+ +
property bool hasLastDockingInfo[read-only]
+
+
+
+
+ +
property Uuid id[read-only]
+
+
+
+
+ +
property var lastDockingByAIFaction[read-only]
+
+
+
+
+ +
property var lastDockingByAlliance[read-only]
+
+
+
+
+ +
property var lastDockingByPlayer[read-only]
+
+
+
+
+ +
property var lastDockingFaction[read-only]
+
+
+
+
+ +
property Uuid lastDockingParent[read-only]
+
+
+
+
+ +
property Matrix localOrientation[read-only]
+
+
+
+
+ +
property vec3 localPosition[read-only]
+
+
+
+
+ +
property Matrix localWorld[read-only]
+
+
+
+
+
+
+

+function var addAutoUndockException(int entityType)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function int... getAutoUndockExceptions()
+

+
+
+

+
+
+
+
+

+function bool hasAutoUndockException(int entityType)
+

+
+
+

+
+
+
+
+

+function var removeAutoUndockException(int entityType)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function bool undock()
+

+
+
+

+Undocks the Entity (dockee) from its parent. +

+

Returns

+
+

+true if it was docked, false otherwise +

+
+

+
+
+
+
+
+
+ Overview +
Home + Functions + Search +
+
Search:
+Predefined Functions & Example Scripts +
Command +Entity +FactionDatabase +PlanGenerator +Player +Sector +Server +UsableInventoryItem +
+
+

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

+
+ +
+ + diff --git a/Documentation/DockingPositions.html b/Documentation/DockingPositions.html new file mode 100644 index 0000000..3276046 --- /dev/null +++ b/Documentation/DockingPositions.html @@ -0,0 +1,652 @@ + + + DockingPositions + + + + +
+
+

Avorion Script API Documentation

+
+
+ +
+
Search:
+ +
+

DockingPositions

+
+
+

+function DockingPositions(var id)
+

+
+
+

Parameters

+
+id +The id of the entity this component belongs to, or the entity itself, must be an id of an existing entity or nil for the entity in the current script context
+
+

Returns

+
+

+A new instance of DockingPositions +

+
+

+
+
+
+
+ +
property bool alwaysDocked
+
+
+
+
+ +
property bool docksEnabled
+
+
+
+
+ +
property int numDockingPositions[read-only]
+
+
+
+
+
+
+

+function var deleteRemovableObstacles()
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var getDockingPosition(int i)
+

+
+
+

+
+
+
+
+

+function table_t getDockingPositions()
+

+
+
+

+
+
+
+
+

+function var getFreeDock(Entity [or nil] exception)
+

+
+
+

+
+
+
+
+

+function bool inLightArea(Entity other, var dockIndex)
+

+
+
+

+
+
+
+
+

+function bool isInDockingArea(Entity other)
+

+
+
+

+
+
+
+
+

+function bool isLightLineFree(int i, Entity [or nil] exception)
+

+
+
+

+
+
+
+
+

+function bool isPulling(Entity other)
+

+
+
+

+
+
+
+
+

+function bool isPushing(Entity other)
+

+
+
+

+
+
+
+
+

+function bool isTractoring(Entity other)
+

+
+
+

+
+
+
+
+

+function bool startPulling(Entity other, var dockIndex)
+

+
+
+

+
+
+
+
+

+function bool startPushing(Entity other, var dockIndex)
+

+
+
+

+
+
+
+
+

+function var stopPulling(Entity other)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var stopPushing(Entity other)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+
+
+ Overview +
Home + Functions + Search +
+
Search:
+Predefined Functions & Example Scripts +
Command +Entity +FactionDatabase +PlanGenerator +Player +Sector +Server +UsableInventoryItem +
+
+

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

+
+ +
+ + diff --git a/Documentation/Durability.html b/Documentation/Durability.html new file mode 100644 index 0000000..307ac95 --- /dev/null +++ b/Documentation/Durability.html @@ -0,0 +1,756 @@ + + + Durability + + + + +
+
+

Avorion Script API Documentation

+
+
+ +
+
Search:
+ +
+

Durability

+
+
+

+function Durability(var id)
+

+
+
+

Parameters

+
+id +The id of the entity this component belongs to, or the entity itself, must be an id of an existing entity or nil for the entity in the current script context
+
+

Returns

+
+

+A new instance of Durability +

+
+

+
+
+
+
+ +
property double damageFactor
+
+
+
+
+ +
property double durability
+
+
+
+
+ +
property Entity entity[read-only]
+
+
+
+
+ +
property uuid entityId[read-only]
+
+
+
+
+ +
property float filledPercentage[read-only]
+
+
+
+
+ +
property float invincibility
+
+
+
+
+ +
property bool invincible
+
+
+
+
+ +
property bool logoutInvincible[read-only]
+
+
+
+
+ +
property float maxDurabilityFactor
+
+
+
+
+ +
property double maximum
+
+
+
+
+ +
property float respawnInvincibilityTime
+
+
+
+
+ +
property bool respawnInvincible[read-only]
+
+
+
+
+
+
+

+function var addFactionImmunity(int index)
+

+
+
+

+Adds a temporary immunity to a faction. This immunity will be not be saved to database for security reasons. When an entity is immune to a faction, it can't be healed or damaged by shots or damage that can be traced back to that faction. +

+

Parameters

+
+index +Index of the faction the immunity should apply to
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var, var getWeakness()
+

+
+
+

+
+
+
+
+

+function var healDamage(double amount, Uuid inflictorId)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var inflictDamage(double amount, DamageSource damageSource, DamageType damageType, Uuid inflictorId)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function bool isImmuneToEntity(Uuid index)
+

+
+
+

+Checks if the Entity is immune to another entity. This is true if the other entity belongs to a faction that the When an entity is immune to a faction, it can't be healed or damaged by shots or damage that can be traced back to that faction. +

+

Parameters

+
+index +Index of the faction the immunity should apply to
+
+

+
+
+
+
+

+function bool isImmuneToFaction(int index)
+

+
+
+

+Checks if the Entity is immune to a faction. +

+

Parameters

+
+index +Index of the faction
+
+

+
+
+
+
+

+function var removeFactionImmunity(int index)
+

+
+
+

+Removes a temporary immunity to a faction. When an entity is immune to a faction, it can't be healed or damaged by shots or damage that can be traced back to that faction. +

+

Parameters

+
+index +Index of the faction the immunity should apply to
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var resetMalus()
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var resetWeakness()
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var setMalusFactor(float in, DurabilityMalusReason reason)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var setWeakness(DamageType damageType, float factor)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+
+
+ Overview +
Home + Functions + Search +
+
Search:
+Predefined Functions & Example Scripts +
Command +Entity +FactionDatabase +PlanGenerator +Player +Sector +Server +UsableInventoryItem +
+
+

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

+
+ +
+ + diff --git a/Documentation/EnergySystem.html b/Documentation/EnergySystem.html new file mode 100644 index 0000000..41f8eff --- /dev/null +++ b/Documentation/EnergySystem.html @@ -0,0 +1,544 @@ + + + EnergySystem + + + + +
+
+

Avorion Script API Documentation

+
+
+ +
+
Search:
+
+
+ + + + + + + + + + + + + + + + + + + +
+EnergySystem +EnergySystem +

Properties
+capacity +
+consumableEnergy +
+energy +
+entity +
+entityId +
+productionRate +
+rechargeRate +
+requiredEnergy +
+superflousEnergy +

Member Functions
+addEnergy +
+removeEnergy +
+
+
+
+

EnergySystem

+
+
+

+function EnergySystem(var id)
+

+
+
+

Parameters

+
+id +The id of the entity this component belongs to, or the entity itself, must be an id of an existing entity or nil for the entity in the current script context
+
+

Returns

+
+

+A new instance of EnergySystem +

+
+

+
+
+
+
+ +
property double capacity
+
+
+
+
+ +
property double consumableEnergy[read-only]
+
+
+
+
+ +
property double energy
+
+
+
+
+ +
property Entity entity[read-only]
+
+
+
+
+ +
property uuid entityId[read-only]
+
+
+
+
+ +
property double productionRate
+
+
+
+
+ +
property double rechargeRate[read-only]
+
+
+
+
+ +
property double requiredEnergy[read-only]
+
+
+
+
+ +
property double superflousEnergy[read-only]
+
+
+
+
+
+
+

+function var addEnergy(double amount)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var removeEnergy(double amount)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+
+
+ Overview +
Home + Functions + Search +
+
Search:
+Predefined Functions & Example Scripts +
Command +Entity +FactionDatabase +PlanGenerator +Player +Sector +Server +UsableInventoryItem +
+
+

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

+
+ +
+ + diff --git a/Documentation/Engine.html b/Documentation/Engine.html new file mode 100644 index 0000000..aa20a6d --- /dev/null +++ b/Documentation/Engine.html @@ -0,0 +1,515 @@ + + + Engine + + + + +
+
+

Avorion Script API Documentation

+
+
+ +
+
Search:
+
+
+ + + + + + + + + + + + + + + + + + +
+Engine +Engine +

Properties
+acceleration +
+boost +
+consumerIcon +
+consumerName +
+defaultPriority +
+entity +
+entityId +
+maxVelocity +
+requiredEnergy +
+reverseThrust +

Member Functions
+
+
+
+

Engine

+
+
+

+function Engine(var id)
+

+
+
+

Parameters

+
+id +The id of the entity this component belongs to, or the entity itself, must be an id of an existing entity or nil for the entity in the current script context
+
+

Returns

+
+

+A new instance of Engine +

+
+

+
+
+
+
+ +
property double acceleration
+
+
+
+
+ +
property bool boost
+
+
+
+
+ +
property string consumerIcon[read-only]
+
+
+
+
+ +
property string consumerName[read-only]
+
+
+
+
+ +
property int defaultPriority[read-only]
+
+
+
+
+ +
property Entity entity[read-only]
+
+
+
+
+ +
property uuid entityId[read-only]
+
+
+
+
+ +
property double maxVelocity
+
+
+
+
+ +
property double requiredEnergy[read-only]
+
+
+
+
+ +
property double reverseThrust[read-only]
+
+
+
+
+
+
+
+
+ Overview +
Home + Functions + Search +
+
Search:
+Predefined Functions & Example Scripts +
Command +Entity +FactionDatabase +PlanGenerator +Player +Sector +Server +UsableInventoryItem +
+
+

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

+
+ +
+ + diff --git a/Documentation/Entity Callbacks.html b/Documentation/Entity Callbacks.html new file mode 100644 index 0000000..8d6633d --- /dev/null +++ b/Documentation/Entity Callbacks.html @@ -0,0 +1,2433 @@ + + + Avorion Script Callbacks - Entity + + + + +
+
+

Avorion Script API Documentation

+
+
+ +
+
Search:
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+destinationSectorReady +
+onAIStateChanged +
+onAllScriptValuesChanged +
+onAutoSelected +
+onBlockChanged +
+onBlockDamaged +
+onBlockDestroyed +
+onBlockHealed +
+onBlockPlanChanged +
+onBlocksAdded +
+onBlocksRemove +
+onBlocksRemoved +
+onBoardersDefeated +
+onBoardersLand +
+onBoardingFight +
+onBoardingSuccessful +
+onBreak +
+onCaptainChanged +
+onCaptainChanged +
+onCargoChanged +
+onCargoLootCollected +
+onCollision +
+onCraftSeatEntered +
+onCraftSeatLeft +
+onCrewChanged +
+onCrewChanged +
+onCrewLootCollected +
+onDamaged +
+onDestroyed +
+onDockedByEntity +
+onEntityDocked +
+onEntityUndocked +
+onFighterAdded +
+onFighterLanded +
+onFighterRemove +
+onFighterRemoved +
+onFighterStarted +
+onHealed +
+onHullHit +
+onHyperspaceEntered +
+onHyperspaceEntered +
+onInventoryItemLootCollected +
+onJump +
+onJumpRouteCalculationStarted +
+onLootCollected +
+onMaterialLootCollected +
+onMoneyLootCollected +
+onPassengerAdded +
+onPassengerAdded +
+onPassengerRemoved +
+onPassengerRemoved +
+onPassengersRemoved +
+onPassengersRemoved +
+onPlanModifiedByBuilding +
+onScriptAdded +
+onScriptRemoved +
+onScriptValueChanged +
+onSectorEntered +
+onSelected +
+onSetForDeletion +
+onShaftAutomaticLoadingTypeAssign +
+onShaftWeaponIndexAssign +
+onShieldActivate +
+onShieldDamaged +
+onShieldDeactivate +
+onShieldHealed +
+onShieldHit +
+onShotFired +
+onShotHit +
+onSquadAdded +
+onSquadOrdersChanged +
+onSquadRemove +
+onSquadRemoved +
+onStartDialog +
+onStartFiring +
+onStopFiring +
+onSystemsChanged +
+onSystemUpgradeLootCollected +
+onTorpedoAdded +
+onTorpedoHit +
+onTorpedoHullHit +
+onTorpedoLaunched +
+onTorpedoRemove +
+onTorpedoRemoved +
+onTorpedoShieldHit +
+onTorpedoStorageChanged +
+onTurretAdded +
+onTurretDestroyed +
+onTurretLootCollected +
+onTurretRemoved +
+onTurretRemovedByPlayer +
+onUndockedFromEntity +
+
+
+
+

Entity Callbacks

+

+Note: Callbacks have to be buffered in certain situations and won't happen immediately. When unregistering a callback during a callback, all callbacks that were buffered during the last frame may still be sent, even though they were unregistered. +

+
+

+callback destinationSectorReady(sectorReady)
+

+
+

+Executed when the availability state of the destination sector changes. When the sector is loaded into memory, it's set to true. When the sector is unloaded from memory, because there's no player near it, it's set to false. +

+

Parameters

+
+sectorReady +Boolean indicating whether the destination sector is in memory
+
+

+
+
+
+

+callback onAIStateChanged(entityId, state)
+

+
+

+Executed whenever the AI state of the entity changes +

+

Parameters

+
+entityId +The id of the entity
+state +The id of the new state
+
+

+
+
+
+

+callback onAllScriptValuesChanged(entityId)
+

+
+

+Executed whenever all scripts values of the entity have been changed at once +

+

Parameters

+
+entityId +The id of the entity
+
+

+
+
+
+

+callback onAutoSelected()
+

+
+

+Executed when the entity gets selected by the player on the client. +

+

+
+
+
+

+callback onBlockChanged(objectIndex, blockIndex, changeFlags)
+

+
+

+Executed whenever the plan of the entity is changed. +

+

Parameters

+
+objectIndex +The id of the entity
+blockIndex +The index of the block
+changeFlags +The flags of the block changes
+
+

+
+
+
+

+callback onBlockDamaged(objectIndex, blockIndex, inflictorId, damage, damageType)
+

+
+

+Executed whenever a block object is damaged in the sector. This callback is executed after the damage is dealt to the block. Don't remove the block in this callback, this will lead to a crash. +

+

Parameters

+
+objectIndex +The index of the damaged object
+blockIndex +The index of the damaged block
+inflictorId +The id of the entity that inflicted the damage
+damage +The damage that was inflicted to the entity
+damageType +The type of damage
+
+

+
+
+
+

+callback onBlockDestroyed(objectIndex, index, block, lastDamageInflictor, damageSource)
+

+
+

+Executed whenever a block of the block object got destroyed This callback is executed *after* the block was destroyed +

+

Parameters

+
+objectIndex +The id of the entity
+index +Index of the block
+block +The block (as removed from the plan)
+lastDamageInflictor +The index of the last entity that inflicted damage to the destroyed block
+damageSource +The source of damage
+
+

+
+
+
+

+callback onBlockHealed(objectIndex, blockIndex, damage)
+

+
+

+Executed whenever a block of the entity is healed. Don't remove the block in this callback, this will lead to a crash. +

+

Parameters

+
+objectIndex +The index of the healed object
+blockIndex +The index of the healed block
+damage +The damage the entity was healed for
+
+

+
+
+
+

+callback onBlockPlanChanged(objectIndex, allBlocksChanged)
+

+
+

+Executed whenever the plan of the entity is changed. +

+

Parameters

+
+objectIndex +The id of the entity
+allBlocksChanged +A boolean that indicates whether all the blocks in the block plan have potentially changed
+
+

+
+
+
+

+callback onBlocksAdded(objectIndex, wasRepaired, blockIndices)
+

+
+

+Executed whenever new block are added to the entity. This callback is executed after the blocks were added. +

+

Parameters

+
+objectIndex +The id of the entity
+wasRepaired +true if the callback was fired because of a repair operation, false otherwise
+blockIndices +The indices of the added blocks, as variable arguments list
+
+

+
+
+
+

+callback onBlocksRemove(objectIndex, blockIndices)
+

+
+

+Executed whenever a block will be removed from the plan by building (instead of combat). This callback is executed before the block is removed. IMPORTANT! This only fires on blocks that the player directly chose to be removed. Blocks that get removed because they don't have a connection to the root block any more get signalled after removal by 'onBlocksRemoved'. +

+

Parameters

+
+objectIndex +The id of the entity
+blockIndices +The indices of the removed blocks, as variable arguments list
+
+

+
+
+
+

+callback onBlocksRemoved(objectIndex, blockIndices)
+

+
+

+Executed whenever a block is removed from the plan by building (instead of combat). This callback is executed after the block is removed. +

+

Parameters

+
+objectIndex +The id of the entity
+blockIndices +The indices of the removed blocks, as variable arguments list
+
+

+
+
+
+

+callback onBoardersDefeated(entityId, attackingFaction)
+

+
+

+Executed whenever all boarders were defeated +

+

Parameters

+
+entityId +The id of the entity
+attackingFaction +The index of the attacking faction
+
+

+
+
+
+

+callback onBoardersLand(entityId, attackingFaction, firstLanding)
+

+
+

+Executed when boarders land on an entity +

+

Parameters

+
+entityId +The id of the entity
+attackingFaction +The index of the attacking faction
+firstLanding +True if these are the first boarders, false otherwise
+
+

+
+
+
+

+callback onBoardingFight(entityId, attackingFaction)
+

+
+

+Executed on every round of fighting with boarders +

+

Parameters

+
+entityId +The id of the entity
+attackingFaction +The index of the attacking faction
+
+

+
+
+
+

+callback onBoardingSuccessful(entityId, oldFactionIndex, newFactionIndex)
+

+
+

+Executed whenever an entity was boarded successfully +

+

Parameters

+
+entityId +The id of the entity
+oldFactionIndex +The index of the faction that owned the entity before boarding
+newFactionIndex +The index of the attacking faction that now owns the entity
+
+

+
+
+
+

+callback onBreak(objectIndex, plan...)
+

+
+

+Executed when the plan of the entity breaks. This callback is executed after the block broke. This callback is expensive, don't register for it if you don't absolutely need it. +

+

Parameters

+
+objectIndex +The id of the entity
+plan... +The plans of the broken off parts
+
+

+
+
+
+

+callback onCaptainChanged(index, captain)
+

+
+

+Executed whenever the captain of an entity in the sector changes. This callback is executed *after* the captain changed on the entity. +

+

Parameters

+
+index +The id of the entity
+captain +The new captain (nil if none) of the entity
+
+

+
+
+
+

+callback onCaptainChanged(index, captain)
+

+
+

+Executed whenever the captain of the entity changes. This callback is executed *after* the captain changed on the entity. +

+

Parameters

+
+index +The id of the entity
+captain +The new captain (nil if none) of the entity
+
+

+
+
+
+

+callback onCargoChanged(objectIndex, delta, good)
+

+
+

+Executed whenever the cargo of an entity in the sector changes. This callback is executed *after* the cargo was changed on the entity. +

+

Parameters

+
+objectIndex +The id of the entity
+delta +The amount of cargo that changed
+good +The good that changed
+
+

+
+
+
+

+callback onCargoLootCollected(collector, lootIndex, amount, good, owner)
+

+
+

+Executed whenever trading good loot gets collected by a player +

+

Parameters

+
+collector +The id of the entity that collected loot
+lootIndex +The index of the collected loot
+amount +The amount of goods that were collected
+good +The good that was inside the loot entity
+owner +The original owner of the cargo
+
+

+
+
+
+

+callback onCollision(objectIndexA, objectIndexB, damageA, damageB, steererA, steererB)
+

+
+

+Executed whenever two block objects collided in the sector +

+

Parameters

+
+objectIndexA +The index of the one colliding object
+objectIndexB +The index of the other colliding object
+damageA +The damage that is inflicted to object A
+damageB +The damage that is inflicted to object B
+steererA +The steerer ID of objectA. When an object is docked, not the object itself but the steerer is the one responsible for collisions
+steererB +The steerer ID of objectB. When an object is docked, not the object itself but the steerer is the one responsible for collisions
+
+

+
+
+
+

+callback onCraftSeatEntered(entityId, seat, playerIndex, firstPlayer)
+

+
+

+Executed whenever a player enters an empty craft or the last player exits it +

+

Parameters

+
+entityId +The id of the entity
+seat +The seat index
+playerIndex +The index of the player that entered the seat
+firstPlayer +A bool indicating whether the craft's seats were empty before
+
+

+
+
+
+

+callback onCraftSeatLeft(entityId, seat, playerIndex, playersRemaining)
+

+
+

+Executed whenever a player enters an empty craft or the last player exits it +

+

Parameters

+
+entityId +The id of the entity
+seat +The seat index that was previously occupied
+playerIndex +The index of the player that left the seat
+playersRemaining +A bool indicating whether there are still players on the craft
+
+

+
+
+
+

+callback onCrewChanged(index, delta, profession)
+

+
+

+Executed whenever the crew of an entity in the sector changes. This callback is executed *after* the crew was changed on the entity. +

+

Parameters

+
+index +The id of the entity
+delta +The amount of crewmen that changed
+profession +The profession of the crew that changed
+
+

+
+
+
+

+callback onCrewChanged(index)
+

+
+

+Executed whenever the crew of the entity changes. This callback is executed *after* the crew was changed on the entity. +

+

Parameters

+
+index +The id of the entity
+
+

+
+
+
+

+callback onCrewLootCollected(collector, lootIndex)
+

+
+

+Executed whenever trading good loot gets collected by a player +

+

Parameters

+
+collector +The id of the entity that collected loot
+lootIndex +The index of the collected loot
+
+

+
+
+
+

+callback onDamaged(objectIndex, amount, inflictor, damageSource, damageType)
+

+
+

+Executed whenever an entity is damaged in the sector. +

+

Parameters

+
+objectIndex +The index of the damaged object
+amount +The amount of damage that was dealt
+inflictor +The id of the entity that dealt the damage
+damageSource +The source of damage
+damageType +The type of damage
+
+

+
+
+
+

+callback onDestroyed(index, lastDamageInflictor)
+

+
+

+Executed when the entity was destroyed +

+

Parameters

+
+index +The id of the entity that was destroyed
+lastDamageInflictor +The index of the last entity that inflicted damage to the destroyed entity
+
+

+
+
+
+

+callback onDockedByEntity(dockeeId, dockerId)
+

+
+

+Executed whenever this entity was docked to another entity +

+

Parameters

+
+dockeeId +The id of the entity that was docked (child)
+dockerId +The id of the docking entity (parent)
+
+

+
+
+
+

+callback onEntityDocked(dockerId, dockeeId)
+

+
+

+Executed whenever an entity docks to another entity +

+

Parameters

+
+dockerId +The id of the docking entity (parent)
+dockeeId +The id of the entity that was docked (child)
+
+

+
+
+
+

+callback onEntityUndocked(dockerId, dockeeId)
+

+
+

+Executed whenever an entity undocks from another entity +

+

Parameters

+
+dockerId +The id of the docking entity (parent)
+dockeeId +The id of the entity that was docked (child)
+
+

+
+
+
+

+callback onFighterAdded(entityId, squadIndex, fighterIndex, landed)
+

+
+

+Executed whenever a fighter is added to the entity +

+

Parameters

+
+entityId +The id of the entity
+squadIndex +The index of the squad
+fighterIndex +The index of the fighter in the squad
+landed +A boolean whether the fighter landed or got added otherwise
+
+

+
+
+
+

+callback onFighterLanded(entityId, squadIndex, fighterId)
+

+
+

+Executed whenever a fighter starts from a hangar of the entity +

+

Parameters

+
+entityId +The id of the entity the fighter landed on
+squadIndex +The index of the squad
+fighterId +The id of the fighter that landed
+
+

+
+
+
+

+callback onFighterRemove(entityId, squadIndex, fighterIndex, started)
+

+
+

+Executed whenever a fighter is removed from the entity, before it gets removed +

+

Parameters

+
+entityId +The id of the entity
+squadIndex +The index of the squad
+fighterIndex +The index of the fighter in the squad
+started +A boolean whether the fighter started or got removed otherwise
+
+

+
+
+
+

+callback onFighterRemoved(entityId, squadIndex, fighterIndex, started)
+

+
+

+Executed whenever a fighter is removed from the entity, after it got removed +

+

Parameters

+
+entityId +The id of the entity
+squadIndex +The index of the squad
+fighterIndex +The index of the fighter in the squad
+started +A boolean whether the fighter started or got removed otherwise
+
+

+
+
+
+

+callback onFighterStarted(entityId, squadIndex, fighterId)
+

+
+

+Executed whenever a fighter starts from a hangar of the entity +

+

Parameters

+
+entityId +The id of the entity the fighter started from
+squadIndex +The index of the squad
+fighterId +The id of the fighter that started
+
+

+
+
+
+

+callback onHealed(objectIndex, amount, inflictor)
+

+
+

+Executed whenever an entity is healed in the sector. +

+

Parameters

+
+objectIndex +The index of the damaged entity
+amount +The amount of damage that was healed
+inflictor +The id of the entity that dealt the damage
+
+

+
+
+
+

+callback onHullHit(objectIndex, blockIndex, shooterIndex, damage, location)
+

+
+

+Executed whenever a block object is hit by a shot in the sector. Don't delete the block that is hit by the shot, this will lead to a crash. +

+

Parameters

+
+objectIndex +The index of the object that got shot at
+blockIndex +The index of the block that was hit by the shot
+shooterIndex +The index of the craft that fired the shot
+damage +The damage the shot dealt to the object
+location +The impact location
+
+

+
+
+
+

+callback onHyperspaceEntered(entityId, dx, dy)
+

+
+

+Executed whenever an entity in the sector jumps into hyperspace. Won't be triggered when changing sector through background simulation, death, or gate/wormholes. +

+

Parameters

+
+entityId +The id of the entity that was entered hyperspace
+dx +X coordinate of the destination
+dy +Y coordinate of the destination
+
+

+
+
+
+

+callback onHyperspaceEntered(entityId, dx, dy)
+

+
+

+Executed whenever the entity jumps into hyperspace. Won't be triggered when changing sector through background simulation, death, or gate/wormholes. +

+

Parameters

+
+entityId +The id of the entity that was entered hyperspace
+dx +X coordinate of the destination
+dy +Y coordinate of the destination
+
+

+
+
+
+

+callback onInventoryItemLootCollected(collector, lootIndex)
+

+
+

+Executed whenever inventory item loot gets collected by +

+

Parameters

+
+collector +The id of the entity which collected the loot
+lootIndex +The index of the loot that was collected
+
+

+
+
+
+

+callback onJump(shipId, x, y, sectorChangeType)
+

+
+

+Executed whenever the entity jumps into another sector. +

+

Parameters

+
+shipId +The id of the entity that will jump
+x +The x coordinate of the target sector
+y +The y coordinate of the target sector
+sectorChangeType +SectorChangeType enum what kind of sector change it is
+
+

+
+
+
+

+callback onJumpRouteCalculationStarted(playerIndex, destinationX, destinationY)
+

+
+

+Executed whenever a player starts a new hyperspace jump route calculation +

+

Parameters

+
+playerIndex +The index of the player starting the calculation
+destinationX +The x-coordinate of the destination sector
+destinationY +The y-coordinate of the destination sector
+
+

+
+
+
+

+callback onLootCollected(collector, lootIndex)
+

+
+

+Executed whenever loot gets collected by anyone, be it player or AI faction +

+

Parameters

+
+collector +The id of the entity which collected the loot
+lootIndex +The index of the collected loot
+
+

+
+
+
+

+callback onMaterialLootCollected(collector, lootIndex, materialType, value)
+

+
+

+Executed whenever material loot gets collected by +

+

Parameters

+
+collector +The id of the entity which collected the loot
+lootIndex +The index of the loot that was collected
+materialType +The type of material contained in the loot
+value +The amount of material the loot contained
+
+

+
+
+
+

+callback onMoneyLootCollected(collector, lootIndex, value)
+

+
+

+Executed whenever money loot gets collected by the entity +

+

Parameters

+
+collector +The id of the entity which collected the loot
+lootIndex +The index of the collected loot
+value +The amount of credits the loot contained
+
+

+
+
+
+

+callback onPassengerAdded(index, passenger)
+

+
+

+Executed whenever a passenger is added to an entity in the sector. This callback is executed *after* the passenger was added. +

+

Parameters

+
+index +The id of the entity
+passenger +The passenger
+
+

+
+
+
+

+callback onPassengerAdded(index, passenger)
+

+
+

+Executed whenever a passenger is added to the entity. This callback is executed *after* the passenger was added. +

+

Parameters

+
+index +The id of the entity
+passenger +The passenger
+
+

+
+
+
+

+callback onPassengerRemoved(index, passenger)
+

+
+

+Executed whenever a passenger is removed from an entity in the sector. This callback is executed *after* the passenger was removed. +

+

Parameters

+
+index +The id of the entity
+passenger +The passenger
+
+

+
+
+
+

+callback onPassengerRemoved(index, passenger)
+

+
+

+Executed whenever a passenger is removed to the entity. This callback is executed *after* the passenger was removed. +

+

Parameters

+
+index +The id of the entity
+passenger +The passenger
+
+

+
+
+
+

+callback onPassengersRemoved(index, amount)
+

+
+

+Executed whenever passengers are removed from the entity. This callback is executed *after* the passengers were removed. +

+

Parameters

+
+index +The id of the entity
+amount +Amount of removed passengers
+
+

+
+
+
+

+callback onPassengersRemoved(index, amount)
+

+
+

+Executed whenever passengers from an entity in the sector are removed. This callback is executed *after* the passengers were removed. +

+

Parameters

+
+index +The id of the entity
+amount +Amount of removed passengers
+
+

+
+
+
+

+callback onPlanModifiedByBuilding(shipIndex)
+

+
+

+Executed whenever the plan of an entity was modified by building, meaning adding or removing blocks. +

+

Parameters

+
+shipIndex +The index of the ship
+
+

+
+
+
+

+callback onScriptAdded(entityId, scriptIndex, scriptPath)
+

+
+

+Executed whenever a script was added to the entity +

+

Parameters

+
+entityId +The id of the entity
+scriptIndex +The index of the new script
+scriptPath +The path of the new script
+
+

+
+
+
+

+callback onScriptRemoved(entityId, oldScriptIndex, scriptPath)
+

+
+

+Executed after a script was removed from the entity +

+

Parameters

+
+entityId +The id of the entity
+oldScriptIndex +The old index of the script that was removed
+scriptPath +The path of the old script
+
+

+
+
+
+

+callback onScriptValueChanged(entityId, name, value)
+

+
+

+Executed whenever a script value of the entity was changed +

+

Parameters

+
+entityId +The id of the entity
+name +The name of the value
+value +The new value
+
+

+
+
+
+

+callback onSectorEntered(entityId, x, y)
+

+
+

+Executed whenever the entity enters a sector. +

+

Parameters

+
+entityId +The index of the entity that entered the sector
+x +Sector X coordinates of the entered sector
+y +Sector Y coordinates of the entered sector
+
+

+
+
+
+

+callback onSelected()
+

+
+

+Executed when the entity gets selected by the player on the client. +

+

+
+
+
+

+callback onSetForDeletion(entityId, deletionType)
+

+
+

+Executed whenever the entity is to be deleted. +

+

Parameters

+
+entityId +The index of the entity that is to be deleted
+deletionType +The deletion type
+
+

+
+
+
+

+callback onShaftAutomaticLoadingTypeAssign(entityId, shaftIndex, type)
+

+
+

+Executed whenever the torpedo type that is automatically loaded into a shaft was assigned +

+

Parameters

+
+entityId +The id of the entity
+shaftIndex +The index of the torpedo shaft
+type +The type of torpedo that now gets automatically loaded
+
+

+
+
+
+

+callback onShaftWeaponIndexAssign(entityId, shaftIndex, weaponIndex)
+

+
+

+Executed whenever a torpedo shaft was assigned a new weapon index +

+

Parameters

+
+entityId +The id of the entity
+shaftIndex +The index of the new torpedo shaft
+weaponIndex +The new weapon index of the shaft
+
+

+
+
+
+

+callback onShieldActivate(entityId)
+

+
+

+Executed whenever the entities shield activates +

+

Parameters

+
+entityId +The id of the entity
+
+

+
+
+
+

+callback onShieldDamaged(entityId, amount, damageType, inflictorId)
+

+
+

+Executed whenever the entities shield is damaged +

+

Parameters

+
+entityId +The id of the entity
+amount +The amount of damage inflicted
+damageType +The type of damage dealt
+inflictorId +The id of the entity that inflicted the damage
+
+

+
+
+
+

+callback onShieldDeactivate(entityId)
+

+
+

+Executed whenever the entities shield deactivates +

+

Parameters

+
+entityId +The id of the entity
+
+

+
+
+
+

+callback onShieldHealed(entityId, amount)
+

+
+

+Executed whenever the entities shield is healed +

+

Parameters

+
+entityId +The id of the entity
+amount +The amount of damage healed
+
+

+
+
+
+

+callback onShieldHit(objectIndex, shooterIndex, damage, location)
+

+
+

+Executed whenever an object's shield is hit by a shot in the sector. +

+

Parameters

+
+objectIndex +The index of the object that got shot at
+shooterIndex +The index of the craft that fired the shot
+damage +The damage the shot dealt to the object
+location +The impact location
+
+

+
+
+
+

+callback onShotFired(entityId)
+

+
+

+Executed whenever the entity fires a shot +

+

Parameters

+
+entityId +The id of the entity (weapon)
+
+

+
+
+
+

+callback onShotHit(objectIndex, shooterIndex, location)
+

+
+

+Executed whenever a block object is hit by a shot in the sector. +

+

Parameters

+
+objectIndex +The index of the object that got shot at
+shooterIndex +The index of the craft that fired the shot
+location +The impact location
+
+

+
+
+
+

+callback onSquadAdded(entityId, index)
+

+
+

+Executed whenever a squad is removed from the entity +

+

Parameters

+
+entityId +The id of the entity
+index +The index of the squad
+
+

+
+
+
+

+callback onSquadOrdersChanged(entityId, squadIndex, orders, targetId)
+

+
+

+Executed whenever the orders of a squad of the entity change +

+

Parameters

+
+entityId +The id of the entity
+squadIndex +The index of the squad
+orders +The orders of the squad
+targetId +The target assigned to the fighters
+
+

+
+
+
+

+callback onSquadRemove(entityId, index)
+

+
+

+Executed whenever a squad is removed from the entity, before the squad gets removed +

+

Parameters

+
+entityId +The id of the entity
+index +The index of the squad
+
+

+
+
+
+

+callback onSquadRemoved(entityId, index)
+

+
+

+Executed whenever a squad is removed from the entity, after the squad got removed +

+

Parameters

+
+entityId +The id of the entity
+index +The index of the squad
+
+

+
+
+
+

+callback onStartDialog(objectIndex)
+

+
+

+Executed when a dialog is started. +

+

Parameters

+
+objectIndex +The index of the entity the dialog is started with
+
+

+
+
+
+

+callback onStartFiring(entityId)
+

+
+

+Executed whenever the entity starts firing +

+

Parameters

+
+entityId +The id of the entity (weapon)
+
+

+
+
+
+

+callback onStopFiring(entityId)
+

+
+

+Executed whenever the entity stops firing +

+

Parameters

+
+entityId +The id of the entity (weapon)
+
+

+
+
+
+

+callback onSystemsChanged(shipIndex)
+

+
+

+Executed whenever the systems of a ship in the sector changed. This callback is executed *after* the system was changed on the entity. +

+

Parameters

+
+shipIndex +The index of the ship
+
+

+
+
+
+

+callback onSystemUpgradeLootCollected(collector, lootIndex)
+

+
+

+Executed whenever system upgrade loot gets collected by +

+

Parameters

+
+collector +The id of the entity which collected the loot
+lootIndex +The index of the loot that was collected
+
+

+
+
+
+

+callback onTorpedoAdded(entityId, shaftIndex, torpedoIndex, torpedo)
+

+
+

+Executed whenever a torpedo added to the entity +

+

Parameters

+
+entityId +The id of the entity
+shaftIndex +The index of the new torpedo shaft (-1 if storage)
+torpedoIndex +The index of the torpedo
+torpedo +The torpedo that's added
+
+

+
+
+
+

+callback onTorpedoHit(objectIndex, shooterIndex, torpedoIndex)
+

+
+

+Executed whenever a block object is hit by a torpedo in the sector. +

+

Parameters

+
+objectIndex +The index of the object that got shot at
+shooterIndex +The index of the craft that fired the torpedo
+torpedoIndex +The index of the torpedo that hit the object
+
+

+
+
+
+

+callback onTorpedoHullHit(objectIndex, blockIndex, shooterIndex, damage, torpedoIndex)
+

+
+

+Executed whenever a block object is hit by a torpedo in the sector. Don't delete the block that is hit by the torpedo, this will lead to a crash. +

+

Parameters

+
+objectIndex +The index of the object that got shot at
+blockIndex +The index of the block that was hit by the torpedo
+shooterIndex +The index of the craft that fired the torpedo
+damage +The damage the torpedo dealt to the object
+torpedoIndex +The index of the torpedo that hit the object
+
+

+
+
+
+

+callback onTorpedoLaunched(entityId, torpedoId)
+

+
+

+Executed whenever a torpedo was launched from the entity +

+

Parameters

+
+entityId +The id of the entity
+torpedoId +The id of the launched torpedo
+
+

+
+
+
+

+callback onTorpedoRemove(entityId, shaftIndex, torpedoIndex)
+

+
+

+Executed whenever a torpedo is about to be removed from the entity +

+

Parameters

+
+entityId +The id of the entity
+shaftIndex +The index of the new torpedo shaft (-1 if storage)
+torpedoIndex +The index of the torpedo
+
+

+
+
+
+

+callback onTorpedoRemoved(entityId, shaftIndex, torpedoIndex)
+

+
+

+Executed whenever a torpedo was removed from the entity +

+

Parameters

+
+entityId +The id of the entity
+shaftIndex +The index of the new torpedo shaft (-1 if storage)
+torpedoIndex +The index of the torpedo
+
+

+
+
+
+

+callback onTorpedoShieldHit(objectIndex, shooterIndex, damage, torpedoIndex)
+

+
+

+Executed whenever an object's shield is hit by a torpedo in the sector. +

+

Parameters

+
+objectIndex +The index of the object that got shot at
+shooterIndex +The index of the craft that fired the torpedo
+damage +The damage the torpedo dealt to the object
+torpedoIndex +The index of the torpedo that hit the object
+
+

+
+
+
+

+callback onTorpedoStorageChanged(entityId, storage)
+

+
+

+Executed whenever the torpedo storage of the entity changed +

+

Parameters

+
+entityId +The id of the entity
+storage +The new amount of storage available
+
+

+
+
+
+

+callback onTurretAdded(shipIndex, turretIndex)
+

+
+

+Executed whenever a turret of the entity was added +

+

Parameters

+
+shipIndex +The id of the entity that turret was attached to
+turretIndex +The index of the turret
+
+

+
+
+
+

+callback onTurretDestroyed(turretIndex, shipIndex, lastDamageInflictor)
+

+
+

+Executed whenever a turret of the entity was destroyed +

+

Parameters

+
+turretIndex +The index of the turret that was destroyed
+shipIndex +The id of the entity that turret was attached to
+lastDamageInflictor +The index of the last entity that inflicted damage to the destroyed entity
+
+

+
+
+
+

+callback onTurretLootCollected(collector, lootIndex)
+

+
+

+Executed whenever turret loot gets collected by the entity +

+

Parameters

+
+collector +The id of the entity which collected the loot
+lootIndex +The index of the collected loot
+
+

+
+
+
+

+callback onTurretRemoved(shipIndex, turretIndex)
+

+
+

+Executed whenever a turret of the entity was removed +

+

Parameters

+
+shipIndex +The id of the entity that turret was attached to
+turretIndex +The index of the turret
+
+

+
+
+
+

+callback onTurretRemovedByPlayer(shipIndex, turretIndex)
+

+
+

+Executed whenever a turret of the entity was removed by the player +

+

Parameters

+
+shipIndex +The id of the entity that turret was attached to
+turretIndex +The index of the turret
+
+

+
+
+
+

+callback onUndockedFromEntity(dockeeId, dockerId)
+

+
+

+Executed whenever this entity was undocked from another entity +

+

Parameters

+
+dockeeId +The id of the entity that was docked (child)
+dockerId +The id of the docking entity (parent)
+
+

+
+
+
+
+
+
+ Overview +
Home + Functions + Search +
+
Search:
+Predefined Functions & Example Scripts +
Command +Entity +FactionDatabase +PlanGenerator +Player +Sector +Server +UsableInventoryItem +
+
+

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

+
+ +
+ + diff --git a/Documentation/Entity.html b/Documentation/Entity.html new file mode 100644 index 0000000..2592353 --- /dev/null +++ b/Documentation/Entity.html @@ -0,0 +1,4633 @@ + + + + Entity + + + + + +
+
+

Avorion Script API Documentation

+
+
+ +
+
Search:
+
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Entity + Entity +

Properties
+ aiOwned +
+ allianceOwned +
+ canPassRifts +
+ controlActions +
+ crew +
+ crewSize +
+ damageMultiplier +
+ desiredVelocity +
+ dockable +
+ dockingParent +
+ durability +
+ excludedPlayer +
+ exclusionTime +
+ factionIndex +
+ fighterCargoPickup +
+ firePower +
+ freeCargoSpace +
+ hasPilot +
+ hyperspaceCooldown +
+ hyperspaceJumpReach +
+ id +
+ idealCrew +
+ index +
+ invincible +
+ isAnomaly +
+ isArmedTurret +
+ isAsteroid +
+ isContainer +
+ isDrone +
+ isFighter +
+ isFlyable +
+ isLoot +
+ isObviouslyMineable +
+ isOther +
+ isShieldActive +
+ isShip +
+ isStation +
+ isTurning +
+ isTurret +
+ isUnarmedTurret +
+ isUnknown +
+ isWormHole +
+ isWreckage +
+ look +
+ mass +
+ maxCargoSpace +
+ maxCrewSize +
+ maxDurability +
+ minCrew +
+ mothership +
+ name +
+ numCargos +
+ numDefenseWeapons +
+ numDefenseWeaponsCurrentAttack +
+ numDockingPositions +
+ numTurrets +
+ occupiedCargoSpace +
+ orientation +
+ playerOrAllianceOwned +
+ playerOwned +
+ position +
+ radius +
+ reservationTime +
+ reservedPlayer +
+ right +
+ selectedObject +
+ shieldDurability +
+ shieldMaxDurability +
+ shieldMeshIntensity +
+ size +
+ timeAlive +
+ title +
+ translatedTitle +
+ translation +
+ translationf +
+ transporterRange +
+ type +
+ typename +
+ up +
+ volume +

Member Functions
+ addAbsoluteBias +
+ addBaseMultiplier +
+ addCargo +
+ addCrew +
+ addKeyedAbsoluteBias +
+ addKeyedBaseMultiplier +
+ addKeyedMultiplier +
+ addKeyedMultiplyableBias +
+ addMultiplier +
+ addMultiplyableBias +
+ addScript +
+ addScriptOnce +
+ addTurret +
+ blockHyperspace +
+ callbacksRegistered +
+ canAddCrew +
+ changeCrew +
+ changeShield +
+ clearCargoBay +
+ clearValues +
+ damageShield +
+ destroy +
+ destroyBlock +
+ destroyCargo +
+ disableFlightAssistFor +
+ distortHyperspace +
+ findCargos +
+ getAimedPositionBySeat +
+ getAimedPositions +
+ getAllowedArbitraryTurrets +
+ getAllowedArmedTurrets +
+ getAllowedUnarmedTurrets +
+ getAttachedBlockIndex +
+ getBoostedValue +
+ getBoundingBox +
+ getBoundingSphere +
+ getCaptain +
+ getCargo +
+ getCargoAmount +
+ getCargos +
+ getCrewMembers +
+ getDamageContributorPlayerFactions +
+ getDamageContributorPlayers +
+ getDamageContributors +
+ getDockedGroupBoundingBox +
+ getDockedGroupBoundingSphere +
+ getDockingPositions +
+ getFreeArbitraryTurrets +
+ getFreeArmedTurrets +
+ getFreeUnarmedTurrets +
+ getFullPlanCopy +
+ getLowestMineableMaterial +
+ getMalusFactor +
+ getMineableMaterial +
+ getMineableResources +
+ getMoneyLootAmount +
+ getMovePlan +
+ getNearestDistance +
+ getNumArmedTurrets +
+ getNumMiningTurrets +
+ getNumSalvagingTurrets +
+ getNumUnarmedTurrets +
+ getPilotIndices +
+ getPlanMoneyValue +
+ getPlanResourceValue +
+ getResourceLootAmount +
+ getScripts +
+ getTitleArguments +
+ getTitleFormat +
+ getTurret +
+ getTurretPositions +
+ getTurretPositionsLineOfSight +
+ getTurrets +
+ getTurretSize +
+ getTurretTemplateSize +
+ getTurretTurningSpeed +
+ getUndamagedPlanMoneyValue +
+ getUndamagedPlanResourceValue +
+ getValue +
+ getValues +
+ hasComponent +
+ hasScript +
+ heal +
+ healShield +
+ hyperspaceBlocked +
+ inflictDamage +
+ invokeFunction +
+ isCollectable +
+ isInDockingArea +
+ isInsideShield +
+ isJumpRouteValid +
+ isManned +
+ isTurretAllowed +
+ jumpPossible +
+ moveBy +
+ registerCallback +
+ registerDamage +
+ removeBonus +
+ removeCargo +
+ removeCrew +
+ removeScript +
+ removeScriptBonuses +
+ resolveScriptPath +
+ sendCallback +
+ setAccumulatingBlockHealth +
+ setAimedPosition +
+ setAttachedBlockIndex +
+ setCaptain +
+ setDamageTypeMultiplier +
+ setDropsAttachedTurrets +
+ setDropsLoot +
+ setMalusFactor +
+ setManned +
+ setMovePlan +
+ setPlan +
+ setTitle +
+ setTitleArguments +
+ setTurretSize +
+ setTurretTurningSpeed +
+ setValue +
+ singleFlyToLocationTick +
+ unregisterCallback +
+ updateProductionCatchingUp +
+ waitUntilAsyncWorkFinished +
+
+
+
+

Entity

+

+ This represents an interface to an entity in the scene. Creating an object of this type will not create a + new entity in the scene, but will rather enable access to an existing entity. Use the Sector class to + create new entities.
Avorion uses an entity component system (See entity component system on + Wikipedia). Thus, some properties and functions are only available if the entity has the + corresponding component. The list of components can be found here: Enum ComponentType

Note: + The id property of an Entity can be changed, but won't change the actual id of the underlying + entity. Instead, the entity interface will be pointing to another entity with the new id. Use this for + performance tuning to avoid creating lots of entity interfaces.
Note 2: This class is considered + to have too many members and functions. Over time these will be phased out into their respective + component classes. Only a few frequently used properties and functions will remain for coding comfort. +

+
+
+

+ function Entity(var id)
+

+
+
+

Parameters

+
+ id + The id of the entity, must be an id of an existing entity
+
+

Returns

+
+

+ A new instance of Entity +

+
+

+
+
+
+
+ + + + + +
property bool aiOwned[read-only]
+
+
+
+
+ + + + + +
property bool allianceOwned[read-only]
+
+
+
+
+ + + + + +
property bool canPassRifts[read-only]
+
+
+
+
+ + + + + +
property int controlActions
+
+
+
+
+ + + + + +
property Crew crew
+
+
+
+
+ + + + + +
property var crewSize[read-only]
+
+
+
+
+ + + + + +
property float damageMultiplier
+
+
+
+
+ + + + + +
property float desiredVelocity
+
+
+
+
+ + + + + +
property bool dockable
+
+
+
+
+ + + + + +
property Uuid dockingParent[read-only]
+
+
+
+
+ + + + + +
property double durability
+
+
+
+
+ + + + + +
property int excludedPlayer
+
+
+
+
+ + + + + +
property int exclusionTime
+
+
+
+
+ + + + + +
property int factionIndex
+
+
+
+
+ + + + + +
property bool fighterCargoPickup[read-only]
+
+
+
+
+ + + + + +
property double firePower[read-only]
+
+
+
+
+ + + + + +
property var freeCargoSpace[read-only]
+
+
+
+
+ + + + + +
property bool hasPilot[read-only]
+
+
+
+
+ + + + + +
property float hyperspaceCooldown
+
+
+
+
+ + + + + +
property float hyperspaceJumpReach
+
+
+
+
+ + + + + +
property Uuid id[read-only]
+
+
+
+
+ + + + + +
property Crew idealCrew[read-only]
+
+
+
+
+ + + + + +
property Uuid index[read-only]
+
+
+
+
+ + + + + +
property bool invincible
+
+
+
+
+ + + + + +
property bool isAnomaly[read-only]
+
+
+
+
+ + + + + +
property var isArmedTurret[read-only]
+
+
+
+
+ + + + + +
property bool isAsteroid[read-only]
+
+
+
+
+ + + + + +
property bool isContainer[read-only]
+
+
+
+
+ + + + + +
property bool isDrone[read-only]
+
+
+
+
+ + + + + +
property bool isFighter[read-only]
+
+
+
+
+ + + + + +
property bool isFlyable[read-only]
+
+
+
+
+ + + + + +
property bool isLoot[read-only]
+
+
+
+
+ + + + + +
property bool isObviouslyMineable
+
+
+
+
+ + + + + +
property bool isOther[read-only]
+
+
+
+
+ + + + + +
property var isShieldActive[read-only]
+
+
+
+
+ + + + + +
property bool isShip[read-only]
+
+
+
+
+ + + + + +
property bool isStation[read-only]
+
+
+
+
+ + + + + +
property var isTurning[read-only]
+
+
+
+
+ + + + + +
property bool isTurret[read-only]
+
+
+
+
+ + + + + +
property var isUnarmedTurret[read-only]
+
+
+
+
+ + + + + +
property bool isUnknown[read-only]
+
+
+
+
+ + + + + +
property bool isWormHole[read-only]
+
+
+
+
+ + + + + +
property bool isWreckage[read-only]
+
+
+
+
+ + + + + +
property vec3 look[read-only]
+
+
+
+
+ + + + + +
property var mass[read-only]
+
+
+
+
+ + + + + +
property var maxCargoSpace[read-only]
+
+
+
+
+ + + + + +
property var maxCrewSize[read-only]
+
+
+
+
+ + + + + +
property var maxDurability[read-only]
+
+
+
+
+ + + + + +
property Crew minCrew[read-only]
+
+
+
+
+ + + + + +
property Entity mothership
+
+
+
+
+ + + + + +
property string name
+
+
+
+
+ + + + + +
property int numCargos[read-only]
+
+
+
+
+ + + + + +
property int numDefenseWeapons[read-only]
+
+
+
+
+ + + + + +
property int numDefenseWeaponsCurrentAttack[read-only]
+
+
+
+
+ + + + + +
property var numDockingPositions[read-only]
+
+
+
+
+ + + + + +
property var numTurrets[read-only]
+
+
+
+
+ + + + + +
property var occupiedCargoSpace[read-only]
+
+
+
+
+ + + + + +
property Matrix orientation
+
+
+
+
+ + + + + +
property bool playerOrAllianceOwned[read-only]
+
+
+
+
+ + + + + +
property bool playerOwned[read-only]
+
+
+
+
+ + + + + +
property Matrix position
+
+
+
+
+ + + + + +
property var radius[read-only]
+
+
+
+
+ + + + + +
property float reservationTime
+
+
+
+
+ + + + + +
property int reservedPlayer
+
+
+
+ +
+ + + + + +
property var selectedObject
+
+
+
+
+ + + + + +
property double shieldDurability
+
+
+
+
+ + + + + +
property double shieldMaxDurability
+
+
+
+
+ + + + + +
property float shieldMeshIntensity[read-only]
+
+
+
+
+ + + + + +
property vec3 size[read-only]
+
+
+
+
+ + + + + +
property var timeAlive[read-only]
+
+
+
+
+ + + + + +
property string title
+
+
+
+
+ + + + + +
property var translatedTitle[read-only]
+
+
+
+
+ + + + + +
property dvec3 translation
+
+
+
+
+ + + + + +
property vec3 translationf[read-only]
+
+
+
+
+ + + + + +
property double transporterRange[read-only]
+
+
+
+
+ + + + + +
property int type
+
+
+
+
+ + + + + +
property string typename[read-only]
+
+
+
+
+ + + + + +
property vec3 up[read-only]
+
+
+
+
+ + + + + +
property var volume[read-only]
+
+
+
+
+
+
+

+ function var addAbsoluteBias(int type, float value)
+

+
+
+

+ Adds a flat bias for stat of type type. This bias will be added to stat after multipliers + are considered. +

+

Parameters

+
+ type + Type of Bonus, e.g. acceleration, higher level crew
+ value + Bias added to base stats.
+
+

Returns

+
+

+ key that can be used to access the multiplier +

+
+

+
+
+
+
+

+ function var addBaseMultiplier(int type, float factor)
+

+
+
+

+ Adds a multiplyer for stat of type type. This is to increase a stat, so a factor of 0.3 will + become 1.3. +

+

Parameters

+
+ type + Type of Bonus, e.g. acceleration, higher level crew
+ factor + Factor that is used as Multiplier
+
+

Returns

+
+

+ key that can be used to access the multiplier +

+
+

+
+
+
+
+

+ function unsigned int addCargo(TradingGood + good, int amount)
+

+
+
+

+ Adds cargo to the entity. If the amount specified exceeds the maximum capacity of the cargo bay, as + much cargo as still fits in will be added. +

+

Parameters

+
+ good + TradingGood that is to be added.
+ amount + The amount of cargo that should be added.
+
+

Returns

+
+

+ How much was actually added (can be less than amount when cargo bay is full) +

+
+

+
+
+
+
+

+ function var addCrew(int number, CrewMan crewman)
+

+
+
+

Returns

+
+

+ nothing +

+
+

+
+
+
+
+

+ function var addKeyedAbsoluteBias(int type, int key, + float value)
+

+
+
+

+ Exchanges flat bias at key with new value +

+

Parameters

+
+ type + Bonus type
+ key + Location of the bonus that will be changed
+ value + New value
+
+

Returns

+
+

+ key that can be used to access the multiplier +

+
+

+
+
+
+
+

+ function var addKeyedBaseMultiplier(int + type, int key, float value)
+

+
+
+

+ Exchanges multiplier at key with new value +

+

Parameters

+
+ type + Bonus type
+ key + Location of the bonus that will be changed
+ value + New value
+
+

Returns

+
+

+ key that can be used to access the multiplier +

+
+

+
+
+
+
+

+ function var addKeyedMultiplier(int type, int key, + float value)
+

+
+
+

+ Exchanges multiplier at key with new value +

+

Parameters

+
+ type + Bonus type
+ key + Location of the bonus that will be changed
+ value + New value
+
+

Returns

+
+

+ key that can be used to access the multiplier +

+
+

+
+
+
+
+

+ function var addKeyedMultiplyableBias(int + type, int key, float value)
+

+
+
+

+ Exchanges bias at key with new value +

+

Parameters

+
+ type + Bonus type
+ key + Location of the bonus that will be changed
+ value + New value
+
+

Returns

+
+

+ key that can be used to access the multiplier +

+
+

+
+
+
+
+

+ function var addMultiplier(int type, float factor)
+

+
+
+

+ Adds a multiplyer for stat of type type. The factor will be used unchanged. +

+

Parameters

+
+ type + Type of Bonus, e.g. acceleration, higher level crew
+ factor + Factor that is used as Multiplier
+
+

Returns

+
+

+ key that can be used to access the multiplier +

+
+

+
+
+
+
+

+ function var addMultiplyableBias(int type, float value)
+

+
+
+

+ Adds a bias for stat of type type. This bias will be added to stat before multipliers are + considered. +

+

Parameters

+
+ type + Type of Bonus, e.g. acceleration, higher level crew
+ value + Bias added to base stats.
+
+

Returns

+
+

+ key that can be used to access the multiplier +

+
+

+
+
+
+
+

+ function var addScript(string scriptPath, var... arguments)
+

+
+
+

+ Adds a new script to an entity +

+

Parameters

+
+ scriptPath + The path of the script that should be added
+ arguments + An arbitrary number of arguments that will be given to the 'initialize' function of the added + script
+
+

Returns

+
+

+ 0 on success, 1 if the entity could not be found +

+
+

+
+
+
+
+

+ function var addScriptOnce()
+

+
+
+

+
+
+
+
+

+ function Uuid addTurret(TurretTemplate turret, Matrix position, int part)
+

+
+
+

+
+
+
+
+

+ function var blockHyperspace(float time)
+

+
+
+

Returns

+
+

+ nothing +

+
+

+
+
+
+
+

+ function int callbacksRegistered(string + callbackName, var functionName)
+

+
+
+

+ Check how many functions are registered to a callback from the current script VM. +

+

Parameters

+
+ callbackName + The name of the callback
+ functionName + The name of the function for which to check. If nil, will count all functions that are registered + to this callback.
+
+

Returns

+
+

+ The amount of functions registered to the callback +

+
+

+
+
+
+
+

+ function var, var, table<int, string> canAddCrew(int number, int + profession, bool change)
+

+
+
+

+
+
+
+
+

+ function var changeCrew(int number, int profession)
+

+
+
+

Returns

+
+

+ nothing +

+
+

+
+
+
+
+

+ function var changeShield(double delta)
+

+
+
+

+ Adds delta to shield durability +

+

Parameters

+
+ delta +
+
+

Returns

+
+

+ nothing +

+
+

+
+
+
+
+

+ function var clearCargoBay()
+

+
+
+

Returns

+
+

+ nothing +

+
+

+
+
+
+
+

+ function var clearValues()
+

+
+
+

+ Removes all custom values of the object +

+

Returns

+
+

+ nothing +

+
+

+
+
+
+
+

+ function var damageShield(double amount, vec3 location, Uuid inflictorId, var damageSource, var damageType)
+

+
+
+

+ Damages shield by delta amount, location and inflictorId are not necessary, but can be added if it + is needed, e.g. you want to do effects on hitpoint. +

+

Parameters

+
+ delta +
+ location +
+ inflictorId +
+
+

Returns

+
+

+ nothing +

+
+

+
+
+
+
+

+ function var destroy(Uuid inflictorId, var damageSource, var damageType)
+

+
+
+

+ Destroy entity by inflicting more damage than durability of entity +

+

Parameters

+
+ inflictorId + Index of the entity that destroys the block
+ damageSource + Source of damage. Can be Weaponry, Collision, Decay, Torpedo or Arbitrary. *
+ damageType + Type of damage received. Damage can be of type Physical, Energy, Electric, Plasma, AntiMatter or + Fragments.
+
+

Returns

+
+

+ nothing +

+
+

+
+
+
+
+

+ function var destroyBlock(int index, Uuid inflictorId, var damageSource)
+

+
+
+

+ Destroy one block +

+

Parameters

+
+ index + Index of the block that is destroyed
+ inflictorId + Index of the entity that destroys the block
+ damageSource + Source of damage. Can be Weaponry, Collision, Decay, Torpedo or Arbitrary.
+
+

Returns

+
+

+ nothing +

+
+

+
+
+
+
+

+ function var destroyCargo(float volume)
+

+
+
+

+ Destroys cargo. The destruction distribution is generally equal over all goods. +

+

Parameters

+
+ volume + The amount of volume that should be destroyed.
+
+

Returns

+
+

+ nothing +

+
+

+
+
+
+
+

+ function var disableFlightAssistFor(float + time)
+

+
+
+

Returns

+
+

+ nothing +

+
+

+
+
+
+
+

+ function var distortHyperspace(float time)
+

+
+
+

Returns

+
+

+ nothing +

+
+

+
+
+
+
+

+ function table<TradingGood, int> findCargos(string name)
+

+
+
+

+ Finds all cargos with the given name. +

+

Parameters

+
+ name + A string that will be matched with the 'name' property of the cargos.
+
+

Returns

+
+

+ A map containing all matching goods, with the good as key and amount as value. +

+
+

+
+
+
+
+

+ function vec3 getAimedPositionBySeat(int + seat)
+

+
+
+

+
+
+
+
+

+ function vec3... getAimedPositions()
+

+
+
+

+
+
+
+
+

+ function var getAllowedArbitraryTurrets()
+

+
+
+

+
+
+
+
+

+ function var getAllowedArmedTurrets()
+

+
+
+

+
+
+
+
+

+ function var getAllowedUnarmedTurrets()
+

+
+
+

+
+
+
+
+

+ function var getAttachedBlockIndex()
+

+
+
+

+ Returns the Index of the block that the turret is build on +

+

+
+
+
+
+

+ function var getBoostedValue(int type, float value)
+

+
+
+

+ Returns value with included bonus, in case a bonus exists. Returns Nil if no bonuses at all, + returns value if no bonuses for this stat exist. +

+

Parameters

+
+ type + type of bonus stat, e.g. acceleration, higher level crew
+ value + the value, that might be changed by bonuses
+
+

+
+
+
+
+

+ function Box getBoundingBox()
+

+
+
+

+ Returns Bounding Box for entity, use this if you need exact Bounding Box, e.g. for collision + detection when entities are close to each other. +

+

+
+
+
+
+

+ function Sphere getBoundingSphere()
+

+
+
+

+ Returns Bounding Sphere for entity. Much faster than Bounding Box, but not as accurate. Use this if + you need to check often. +

+

+
+
+
+
+

+ function Captain getCaptain()
+

+
+
+

+
+
+
+
+

+ function TradingGood, int... getCargo(unsigned + int n)
+

+
+
+

+
+
+
+
+

+ function int getCargoAmount(var name)
+

+
+
+

+ Counts all goods of the given type. When given a string, it will match the 'name' property of the + goods. When given a TradingGood it will match the exact good. +

+

Parameters

+
+ name + Either a TradingGood or a string containing the name of a trading good.
+
+

Returns

+
+

+ The number of goods +

+
+

+
+
+
+
+

+ function table<TradingGood, int> getCargos()
+

+
+
+

+
+
+
+
+

+ function var getCrewMembers(int profession)
+

+
+
+

+
+
+
+
+

+ function int... getDamageContributorPlayerFactions()
+

+
+
+

+ Lists all players and alliances that contributed damage to the entity +

+

Returns

+
+

+ Indices of all players and alliances that contributed damage to the entity +

+
+

+
+
+
+
+

+ function int... getDamageContributorPlayers()
+

+
+
+

+ Lists all players that contributed damage to the entity +

+

Returns

+
+

+ Indices of all players that contributed damage to the entity +

+
+

+
+
+
+
+

+ function int... getDamageContributors()
+

+
+
+

+ Lists all factions that contributed damage to the entity +

+

Returns

+
+

+ Indices of all factions that contributed damage to the entity +

+
+

+
+
+
+
+

+ function Box getDockedGroupBoundingBox()
+

+
+
+

+ Returns Bounding Box for entity, but enlarged to also fit around all docked objects. Use this if + you need exact Bounding Box, e.g. for collision detection when entities are close to each other. +

+

+
+
+
+
+

+ function Sphere getDockedGroupBoundingSphere()
+

+
+
+

+ Returns Bounding Box for entity, but enlarged to also fit around all docked objects. Use this if + you need exact Bounding Box, e.g. for collision detection when entities are close to each other. +

+

+
+
+
+
+

+ function var getDockingPositions()
+

+
+
+

+ Lists all docking positions that the entity has +

+

Returns

+
+

+ A table that contains a key-value pair (id, table) for each dock: +

+
+

+
+
+
+
+

+ function var getFreeArbitraryTurrets()
+

+
+
+

+
+
+
+
+

+ function var getFreeArmedTurrets()
+

+
+
+

+
+
+
+
+

+ function var getFreeUnarmedTurrets()
+

+
+
+

+
+
+
+
+

+ function BlockPlan getFullPlanCopy()
+

+
+
+

+ Returns the plan of the entity. This copies the entire plan, keep that in mind when using plans + with large block counts. +

+

Returns

+
+

+ A copy of the plan of the entity +

+
+

+
+
+
+
+

+ function Material getLowestMineableMaterial()
+

+
+
+

+
+
+
+
+

+ function var, var getMalusFactor()
+

+
+
+

+
+
+
+
+

+ function Material getMineableMaterial()
+

+
+
+

+
+
+
+
+

+ function int... getMineableResources()
+

+
+
+

+
+
+
+
+

+ function int getMoneyLootAmount()
+

+
+
+

+
+
+
+
+

+ function BlockPlan getMovePlan()
+

+
+
+

+ Returns the plan of the entity. This function will move the plan out of the entity, and replace the + entity's plan with a single block. This operation is independent of the size of the plan, use it + when you have to get large plans with lots of blocks. +

+

Returns

+
+

+ The plan of the entity +

+
+

+
+
+
+
+

+ function var getNearestDistance(Entity other)
+

+
+
+

+
+
+
+
+

+ function var getNumArmedTurrets()
+

+
+
+

+
+
+
+
+

+ function var getNumMiningTurrets()
+

+
+
+

+
+
+
+
+

+ function var getNumSalvagingTurrets()
+

+
+
+

+
+
+
+
+

+ function var getNumUnarmedTurrets()
+

+
+
+

+
+
+
+
+

+ function int... getPilotIndices()
+

+
+
+

+ Returns Indices of piloting players +

+

Returns

+
+

+ multiple return values: indices of players +

+
+

+
+
+
+
+

+ function var getPlanMoneyValue()
+

+
+
+

+
+
+
+
+

+ function double... getPlanResourceValue()
+

+
+
+

+
+
+
+
+

+ function int getResourceLootAmount()
+

+
+
+

+
+
+
+
+

+ function table<int, string> getScripts()
+

+
+
+

+
+
+
+
+

+ function table<string, string> getTitleArguments()
+

+
+
+

+ Retrieves the arguments to a title +

+

+
+
+
+
+

+ function NamedFormat getTitleFormat()
+

+
+
+

+ Retrieves the title as NamedFormat +

+

+
+
+
+
+

+ function Entity getTurret(int index)
+

+
+
+

+
+
+
+
+

+ function Matrix, int... getTurretPositions(TurretTemplate turret, int number)
+

+
+
+

+
+
+
+
+

+ function Matrix, int... getTurretPositionsLineOfSight(TurretTemplate turret, int number)
+

+
+
+

+
+
+
+
+

+ function Entity... getTurrets()
+

+
+
+

+
+
+
+
+

+ function var getTurretSize()
+

+
+
+

+
+
+
+
+

+ function var getTurretTemplateSize()
+

+
+
+

+
+
+
+
+

+ function var getTurretTurningSpeed()
+

+
+
+

+
+
+
+
+

+ function var getUndamagedPlanMoneyValue()
+

+
+
+

+
+
+
+
+

+ function double... getUndamagedPlanResourceValue()
+

+
+
+

+
+
+
+
+

+ function var getValue(string key)
+

+
+
+

+ Retrieves a custom value saved in the entity with the given key +

+

Parameters

+
+ key + A string that serves as the name of the value
+
+

Returns

+
+

+ The value if the key exists, otherwise nil +

+
+

+
+
+
+
+

+ function table<string, var> getValues()
+

+
+
+

+ Retrieves all key-value pairs of custom values of the entity +

+

Returns

+
+

+ A table containing all custom key-value pairs +

+
+

+
+
+
+
+

+ function bool hasComponent(int type)
+

+
+
+

+
+
+
+
+

+ function var hasScript(string name)
+

+
+
+

+
+
+
+
+

+ function var heal(float damage, int index, vec3 location, Uuid inflictorID)
+

+
+
+

+ Increases durability of the plan of the Entity +

+

Parameters

+
+ damage + The amount of durability that will be restored
+ index + Index of the block that will be restored
+ location + vector containing the hit point, if unknown/unnecessary use empty vector
+ inflictorID + Index of the entity that heals
+
+

Returns

+
+

+ nothing +

+
+

+
+
+
+
+

+ function var healShield(double delta)
+

+
+
+

+ Increases shield durability by delta +

+

Parameters

+
+ delta +
+
+

Returns

+
+

+ nothing +

+
+

+
+
+
+
+

+ function var hyperspaceBlocked()
+

+
+
+

+
+
+
+
+

+ function var inflictDamage(float damage, var damageSource, var damageType, int index, vec3 location, Uuid inflictorId)
+

+
+
+

+ Inflicts damage to the plan of the Entity +

+

Parameters

+
+ damage + The amount of damage that will be dealt
+ damageSource + The source of the damage. Can be Weaponry, Collision, Decay, Torpedo or Arbitrary.
+ damageType + Type of damage received. Damage can be of type Physical, Energy, Electric, Plasma, AntiMatter or + Fragments
+ index + Index of the block that will receive the damage
+ location + vector containing the hit point, if unknown / unnecessary use empty vector
+ inflictorId + Index of the entity that caused the damage
+
+

Returns

+
+

+ nothing +

+
+

+
+
+
+
+

+ function var... invokeFunction(var scriptName, string functionName, var... arguments)
+

+
+
+

+ Invokes a function in a script of the entity. Use this function to invoke functions from one script + in another script. The first return value of the function is an integer indicating whether or not + the call was successful. When it was, this integer is followed by the return values of the invoked + function. +

+

Parameters

+
+ scriptName + The name or index of the script containing the function
+ functionName + The name of the function that will be executed
+ arguments + An arbitrary list of arguments that will be given to the invoked function
+
+

Returns

+
+

+ Returns at least 1 value indicating if the call succeeded:
0 The call was successful. In + this case, the return values of the script are returned in addition to the call result, + following the call result
1 The call failed because the entity with the specified index + does not exist or has no Scripts component
2 The call failed because it came from another + sector than the entity is in
3 The call failed because the given script was not found in + the entity
4 The call failed because the given function was not found in the script
+ 5 The call failed because the script's state has errors and is invalid
+

+
+

+
+
+
+
+

+ function var isCollectable(Entity entity)
+

+
+
+

+
+
+
+
+

+ function bool isInDockingArea(Entity other)
+

+
+
+

+
+
+
+
+

+ function var isInsideShield(vec3 point)
+

+
+
+

+
+
+
+
+

+ function bool, var isJumpRouteValid(int + fromX, int fromY, int toX, int toY) +
+

+
+
+

+
+
+
+
+

+ function var isManned()
+

+
+
+

+
+
+
+
+

+ function var isTurretAllowed(TurretTemplate + ScriptTurretTemplate)
+

+
+
+

+ Tests if the maximum number of turrets of this kind is not reached +

+

Parameters

+
+ ScriptTurretTemplate + the template of the turret to be placed
+
+

+
+
+
+
+

+ function int jumpPossible(int x, int y) +
+

+
+
+

+ Tests if the entity can jump to the specified coordinates +

+

Parameters

+
+ x + The x-coordinates of the target sector
+ y + The y-coordinates of the target sector
+
+

Returns

+
+

+ Returns an error code:
-1 The entity doesn't have a hyperspace drive.
0 The entity + can jump.
1 The hyperspace drive needs to recharge.
2 The target sector is too far + away.
3 The entity is facing the wrong direction.
4 The hyperspace drive is being + jammed.
+

+
+

+
+
+
+
+

+ function var moveBy(vec3 delta)
+

+
+
+

+ Teleports entity by vector +

+

Returns

+
+

+ nothing +

+
+

+
+
+
+
+

+ function int registerCallback(string callbackName, string functionName)
+

+
+
+

+ Register a callback in the entity. The callback receiver has to be inside the same sector for the + registration to succeed. The callback will be removed if either the entity or the receiver leaves + the sector or gets destroyed. Double registration of callbacks doesn't work. When the same callback + to the same callback of the same script instance is registered twice, it will still only be called + once. +

+

Parameters

+
+ callbackName + The name of the callback
+ functionName + The name of the function that will be executed in the script when the callback happens
+
+

Returns

+
+

+ 0 on success, 1 if the registration failed +

+
+

+
+
+
+
+

+ function var registerDamage(Uuid shooterId, double damage, DamageSource DamageSource)
+

+
+
+

+ Registers artificial damage as if the entity was damaged by the shooter +

+

Parameters

+
+ shooterId + The id of the entity that inflicted the damage
+ damage + The amount of damage inflicted
+ DamageSource + The kind of source for the damage
+
+

Returns

+
+

+ nothing +

+
+

+
+
+
+
+

+ function var removeBonus(int key)
+

+
+
+

+ Deletes bonus +

+

Parameters

+
+ key + Location of the bonus
+
+

Returns

+
+

+ nothing +

+
+

+
+
+
+
+

+ function var removeCargo(var good, int amount)
+

+
+
+

+ Removes cargo from the entity. When given a TradingGood, an exact check for that good will be + performed. When given a string, only a name check will be performed, and which cargo will be + removed first is undefined if there are multiple goods with the same name. An example would be + Energy Cells vs. Stolen Energy Cells. The 'name' property is the same, but the 'stolen' property is + different. +

+

Parameters

+
+ good + Either a TradingGood or a string with the name of a good.
+ amount + The amount of cargo that should be removed. If this is more than there is on the ship, all + specified cargo will be removed.
+
+

Returns

+
+

+ nothing +

+
+

+
+
+
+
+

+ function var removeCrew(int number, CrewMan crewman)
+

+
+
+

+
+
+
+
+

+ function var removeScript(var script)
+

+
+
+

Returns

+
+

+ nothing +

+
+

+
+
+
+
+

+ function var removeScriptBonuses()
+

+
+
+

+ Deletes all bonuses added by the current script +

+

Returns

+
+

+ nothing +

+
+

+
+
+
+
+

+ function var resolveScriptPath(string path)
+

+
+
+

+
+
+
+
+

+ function bool sendCallback()
+

+
+
+

+
+
+
+
+

+ function var setAccumulatingBlockHealth(bool + bool)
+

+
+
+

+ If AccumulatingBlockHealth is true, a block needs to take as much damage as would be necessary to + destroy all its children before it itself is destroyed. If it is set to false, the entity's blocks + will have only their own durability. Set it to false if you want your entity to easily break apart, + e.g. for wreckages. +

+

Parameters

+
+ bool +
+
+

Returns

+
+

+ nothing +

+
+

+
+
+
+
+

+ function var setAimedPosition(int seat, vec3 in) +
+

+
+
+

Returns

+
+

+ nothing +

+
+

+
+
+
+
+

+ function var setAttachedBlockIndex(int in)
+

+
+
+

Returns

+
+

+ nothing +

+
+

+
+
+
+
+

+ function var setCaptain(Captain [or nil] + captain)
+

+
+
+

Returns

+
+

+ nothing +

+
+

+
+
+
+
+

+ function var setDamageTypeMultiplier(DamageType type, float factor)
+

+
+
+

Returns

+
+

+ nothing +

+
+

+
+
+
+
+

+ function var setDropsAttachedTurrets(bool + bool)
+

+
+
+

+ Sets the entities' ability to drop its attached turrets. If set to true (default) the ship has a + chance to drop a turret that's attached to it when it's destroyed. This is only enabled for NPC + entities. +

+

Parameters

+
+ bool + value if the dropping is enabled
+
+

Returns

+
+

+ nothing +

+
+

+
+
+
+
+

+ function var setDropsLoot(bool bool)
+

+
+
+

+ Sets the entities' ability to drop normal loot. Affects dropping of money, resources, cargo, + turrets and upgrades. 'Loot' component is not affected by this. +

+

Parameters

+
+ bool + value if the entity should drop loot or not
+
+

Returns

+
+

+ nothing +

+
+

+
+
+
+
+

+ function var setMalusFactor(float in, int reason)
+

+
+
+

Returns

+
+

+ nothing +

+
+

+
+
+
+
+

+ function var setManned(bool in)
+

+
+
+

Returns

+
+

+ nothing +

+
+

+
+
+
+
+

+ function var setMovePlan(BlockPlan plan)
+

+
+
+

+ Set the new plan of the entity. The entity will get deleted if the plan is empty. This moves all + the data out of the plan that is used as the first argument. The content of the plan given as + argument is then undefined, but still valid. It might be empty, it might contain the previous plan. + This operation is independent of the size of the plan, use it when you have to set large plans with + lots of blocks. +

+

Parameters

+
+ plan + The new BlockPlan of the entity
+
+

Returns

+
+

+ nothing +

+
+

+
+
+
+
+

+ function var setPlan(BlockPlan plan)
+

+
+
+

+ Set the new plan of the entity. The entity will get deleted if the plan is empty. This copies the + entire plan that is given as argument, keep that in mind when setting plans with large block + counts. +

+

Parameters

+
+ plan + The new BlockPlan of the entity
+
+

Returns

+
+

+ nothing +

+
+

+
+
+
+
+

+ function var setTitle(string title, string_pair... arguments)
+

+
+
+

+ Sets the title that can be used as title in menus +

+

Parameters

+
+ title + a string that will be used as title, can be a format string for easier translation.

+ arguments + Set the string arguments (if format string is used) as vector of string_pair.
+
+

Returns

+
+

+ nothing +

+
+

+
+
+
+
+

+ function var setTitleArguments(string_pair... arguments)
+

+
+
+

+ Sets the arguments to a title +

+

Parameters

+
+ arguments + Set the string arguments as vector of string_pair.
+
+

Returns

+
+

+ nothing +

+
+

+
+
+
+
+

+ function var setTurretSize(float in)
+

+
+
+

Returns

+
+

+ nothing +

+
+

+
+
+
+
+

+ function var setTurretTurningSpeed(float + in)
+

+
+
+

Returns

+
+

+ nothing +

+
+

+
+
+
+
+

+ function var setValue(string key, var value)
+

+
+
+

+ Sets a custom value +

+

Parameters

+
+ key + A string that serves as the name of the value
+ value + The value to save. Must be bool, number, string or nil. If nil is given, the value will be deleted. +
+
+

+
+
+
+
+

+ function var singleFlyToLocationTick(vec3 + location)
+

+
+
+

+ Tells the ship to fly to given location, directly and without pathfinding. +

+

Parameters

+
+ location + the location to fly to (in global coordinates) Paired with setting desiredVelocity to 0, this can + be used to rotate the ship to a given direction.
+
+

Returns

+
+

+ nothing +

+
+

+
+
+
+
+

+ function int unregisterCallback(string callbackName, string functionName)
+

+
+
+

+
+
+
+
+

+ function var updateProductionCatchingUp(float float)
+

+
+
+

+ Simulates production catching up. This is used when ships return from the background simulation. + Updates fighter production, academy and cloning. +

+

Parameters

+
+ float + timePassed The amount of time that should be simulated
+
+

Returns

+
+

+ nothing +

+
+

+
+
+
+
+

+ function var waitUntilAsyncWorkFinished(var + time)
+

+
+
+

Returns

+
+

+ nothing +

+
+

+
+
+
+
+
+
+
+ Overview +
Home + Functions + Search +
+
+
Search:
+
+ +
+ Predefined Functions & Example Scripts +
Command + Entity + FactionDatabase + PlanGenerator + Player + Sector + Server + UsableInventoryItem +
+ + + + + + + + +
+
+

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

+
+ +
+ + + \ No newline at end of file diff --git a/Documentation/EntityDescriptor.html b/Documentation/EntityDescriptor.html new file mode 100644 index 0000000..15257a5 --- /dev/null +++ b/Documentation/EntityDescriptor.html @@ -0,0 +1,4228 @@ + + + EntityDescriptor + + + + +
+
+

Avorion Script API Documentation

+
+
+ +
+
Search:
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+EntityDescriptor +EntityDescriptor +

Properties
+aiOwned +
+allianceOwned +
+canPassRifts +
+controlActions +
+crew +
+crewSize +
+damageMultiplier +
+desiredVelocity +
+dockable +
+dockingParent +
+durability +
+excludedPlayer +
+exclusionTime +
+factionIndex +
+fighterCargoPickup +
+firePower +
+freeCargoSpace +
+hasPilot +
+hyperspaceCooldown +
+hyperspaceJumpReach +
+id +
+idealCrew +
+index +
+invincible +
+isAnomaly +
+isArmedTurret +
+isAsteroid +
+isContainer +
+isDrone +
+isFighter +
+isFlyable +
+isLoot +
+isObviouslyMineable +
+isOther +
+isShieldActive +
+isShip +
+isStation +
+isTurning +
+isTurret +
+isUnarmedTurret +
+isUnknown +
+isWormHole +
+isWreckage +
+look +
+mass +
+maxCargoSpace +
+maxCrewSize +
+maxDurability +
+minCrew +
+mothership +
+name +
+numCargos +
+numDefenseWeapons +
+numDefenseWeaponsCurrentAttack +
+numDockingPositions +
+numTurrets +
+occupiedCargoSpace +
+orientation +
+playerOrAllianceOwned +
+playerOwned +
+position +
+radius +
+reservationTime +
+reservedPlayer +
+right +
+selectedObject +
+shieldDurability +
+shieldMaxDurability +
+shieldMeshIntensity +
+size +
+timeAlive +
+title +
+translatedTitle +
+translation +
+translationf +
+transporterRange +
+type +
+typename +
+up +
+volume +

Member Functions
+addComponent +
+addComponents +
+getComponent +
+removeComponent +
+addAbsoluteBias +
+addBaseMultiplier +
+addCargo +
+addCrew +
+addKeyedAbsoluteBias +
+addKeyedBaseMultiplier +
+addKeyedMultiplier +
+addKeyedMultiplyableBias +
+addMultiplier +
+addMultiplyableBias +
+addScript +
+addScriptOnce +
+addTurret +
+blockHyperspace +
+callbacksRegistered +
+canAddCrew +
+changeCrew +
+changeShield +
+clearCargoBay +
+clearValues +
+damageShield +
+destroy +
+destroyBlock +
+destroyCargo +
+disableFlightAssistFor +
+distortHyperspace +
+findCargos +
+getAimedPositionBySeat +
+getAimedPositions +
+getAllowedArbitraryTurrets +
+getAllowedArmedTurrets +
+getAllowedUnarmedTurrets +
+getAttachedBlockIndex +
+getBoostedValue +
+getBoundingBox +
+getBoundingSphere +
+getCaptain +
+getCargo +
+getCargoAmount +
+getCargos +
+getCrewMembers +
+getDamageContributorPlayerFactions +
+getDamageContributorPlayers +
+getDamageContributors +
+getDockedGroupBoundingBox +
+getDockedGroupBoundingSphere +
+getDockingPositions +
+getFreeArbitraryTurrets +
+getFreeArmedTurrets +
+getFreeUnarmedTurrets +
+getFullPlanCopy +
+getLowestMineableMaterial +
+getMalusFactor +
+getMineableMaterial +
+getMineableResources +
+getMoneyLootAmount +
+getMovePlan +
+getNearestDistance +
+getNumArmedTurrets +
+getNumMiningTurrets +
+getNumSalvagingTurrets +
+getNumUnarmedTurrets +
+getPilotIndices +
+getPlanMoneyValue +
+getPlanResourceValue +
+getResourceLootAmount +
+getScripts +
+getTitleArguments +
+getTitleFormat +
+getTurret +
+getTurretPositions +
+getTurretPositionsLineOfSight +
+getTurrets +
+getTurretSize +
+getTurretTemplateSize +
+getTurretTurningSpeed +
+getUndamagedPlanMoneyValue +
+getUndamagedPlanResourceValue +
+getValue +
+getValues +
+hasComponent +
+hasScript +
+heal +
+healShield +
+hyperspaceBlocked +
+inflictDamage +
+invokeFunction +
+isCollectable +
+isInDockingArea +
+isInsideShield +
+isJumpRouteValid +
+isManned +
+isTurretAllowed +
+jumpPossible +
+moveBy +
+registerCallback +
+registerDamage +
+removeBonus +
+removeCargo +
+removeCrew +
+removeScript +
+removeScriptBonuses +
+resolveScriptPath +
+sendCallback +
+setAccumulatingBlockHealth +
+setAimedPosition +
+setAttachedBlockIndex +
+setCaptain +
+setDamageTypeMultiplier +
+setDropsAttachedTurrets +
+setDropsLoot +
+setMalusFactor +
+setManned +
+setMovePlan +
+setPlan +
+setTitle +
+setTitleArguments +
+setTurretSize +
+setTurretTurningSpeed +
+setValue +
+singleFlyToLocationTick +
+unregisterCallback +
+updateProductionCatchingUp +
+waitUntilAsyncWorkFinished +
+
+
+
+

EntityDescriptor : Entity

+
+
+

+function EntityDescriptor()
+

+
+
+

Returns

+
+

+A new instance of EntityDescriptor +

+
+

+
+
+
+
+ +
property bool aiOwned[read-only]
+
+
+
+
+ +
property bool allianceOwned[read-only]
+
+
+
+
+ +
property bool canPassRifts[read-only]
+
+
+
+
+ +
property int controlActions
+
+
+
+
+ +
property Crew crew
+
+
+
+
+ +
property var crewSize[read-only]
+
+
+
+
+ +
property float damageMultiplier
+
+
+
+
+ +
property float desiredVelocity
+
+
+
+
+ +
property bool dockable
+
+
+
+
+ +
property Uuid dockingParent[read-only]
+
+
+
+
+ +
property double durability
+
+
+
+
+ +
property int excludedPlayer
+
+
+
+
+ +
property int exclusionTime
+
+
+
+
+ +
property int factionIndex
+
+
+
+
+ +
property bool fighterCargoPickup[read-only]
+
+
+
+
+ +
property double firePower[read-only]
+
+
+
+
+ +
property var freeCargoSpace[read-only]
+
+
+
+
+ +
property bool hasPilot[read-only]
+
+
+
+
+ +
property float hyperspaceCooldown
+
+
+
+
+ +
property float hyperspaceJumpReach
+
+
+
+
+ +
property Uuid id[read-only]
+
+
+
+
+ +
property Crew idealCrew[read-only]
+
+
+
+
+ +
property Uuid index[read-only]
+
+
+
+
+ +
property bool invincible
+
+
+
+
+ +
property bool isAnomaly[read-only]
+
+
+
+
+ +
property var isArmedTurret[read-only]
+
+
+
+
+ +
property bool isAsteroid[read-only]
+
+
+
+
+ +
property bool isContainer[read-only]
+
+
+
+
+ +
property bool isDrone[read-only]
+
+
+
+
+ +
property bool isFighter[read-only]
+
+
+
+
+ +
property bool isFlyable[read-only]
+
+
+
+
+ +
property bool isLoot[read-only]
+
+
+
+
+ +
property bool isObviouslyMineable
+
+
+
+
+ +
property bool isOther[read-only]
+
+
+
+
+ +
property var isShieldActive[read-only]
+
+
+
+
+ +
property bool isShip[read-only]
+
+
+
+
+ +
property bool isStation[read-only]
+
+
+
+
+ +
property var isTurning[read-only]
+
+
+
+
+ +
property bool isTurret[read-only]
+
+
+
+
+ +
property var isUnarmedTurret[read-only]
+
+
+
+
+ +
property bool isUnknown[read-only]
+
+
+
+
+ +
property bool isWormHole[read-only]
+
+
+
+
+ +
property bool isWreckage[read-only]
+
+
+
+
+ +
property vec3 look[read-only]
+
+
+
+
+ +
property var mass[read-only]
+
+
+
+
+ +
property var maxCargoSpace[read-only]
+
+
+
+
+ +
property var maxCrewSize[read-only]
+
+
+
+
+ +
property var maxDurability[read-only]
+
+
+
+
+ +
property Crew minCrew[read-only]
+
+
+
+
+ +
property Entity mothership
+
+
+
+
+ +
property string name
+
+
+
+
+ +
property int numCargos[read-only]
+
+
+
+
+ +
property int numDefenseWeapons[read-only]
+
+
+
+
+ +
property int numDefenseWeaponsCurrentAttack[read-only]
+
+
+
+
+ +
property var numDockingPositions[read-only]
+
+
+
+
+ +
property var numTurrets[read-only]
+
+
+
+
+ +
property var occupiedCargoSpace[read-only]
+
+
+
+
+ +
property Matrix orientation
+
+
+
+
+ +
property bool playerOrAllianceOwned[read-only]
+
+
+
+
+ +
property bool playerOwned[read-only]
+
+
+
+
+ +
property Matrix position
+
+
+
+
+ +
property var radius[read-only]
+
+
+
+
+ +
property float reservationTime
+
+
+
+
+ +
property int reservedPlayer
+
+
+
+ +
+ +
property var selectedObject
+
+
+
+
+ +
property double shieldDurability
+
+
+
+
+ +
property double shieldMaxDurability
+
+
+
+
+ +
property float shieldMeshIntensity[read-only]
+
+
+
+
+ +
property vec3 size[read-only]
+
+
+
+
+ +
property var timeAlive[read-only]
+
+
+
+
+ +
property string title
+
+
+
+
+ +
property var translatedTitle[read-only]
+
+
+
+
+ +
property dvec3 translation
+
+
+
+
+ +
property vec3 translationf[read-only]
+
+
+
+
+ +
property double transporterRange[read-only]
+
+
+
+
+ +
property int type
+
+
+
+
+ +
property string typename[read-only]
+
+
+
+
+ +
property vec3 up[read-only]
+
+
+
+
+ +
property var volume[read-only]
+
+
+
+
+
+
+

+function var addComponent(Type type)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var addComponents()
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function UserObject getComponent(Type type)
+

+
+
+

+
+
+
+
+

+function var removeComponent(Type type)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var addAbsoluteBias(int type, float value)
+

+
+
+

+Adds a flat bias for stat of type type. This bias will be added to stat after multipliers are considered. Inherited from Entity + +

+

Parameters

+
+type +Type of Bonus, e.g. acceleration, higher level crew
+value +Bias added to base stats.
+
+

Returns

+
+

+key that can be used to access the multiplier +

+
+

+
+
+
+
+

+function var addBaseMultiplier(int type, float factor)
+

+
+
+

+Adds a multiplyer for stat of type type. This is to increase a stat, so a factor of 0.3 will become 1.3. Inherited from Entity + +

+

Parameters

+
+type +Type of Bonus, e.g. acceleration, higher level crew
+factor +Factor that is used as Multiplier
+
+

Returns

+
+

+key that can be used to access the multiplier +

+
+

+
+
+
+
+

+function unsigned int addCargo(TradingGood good, int amount)
+

+
+
+

+Adds cargo to the entity. If the amount specified exceeds the maximum capacity of the cargo bay, as much cargo as still fits in will be added. Inherited from Entity + +

+

Parameters

+
+good +TradingGood that is to be added.
+amount +The amount of cargo that should be added.
+
+

Returns

+
+

+How much was actually added (can be less than amount when cargo bay is full) +

+
+

+
+
+
+
+

+function var addCrew(int number, CrewMan crewman)
+

+
+
+

+Inherited from Entity + +

+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var addKeyedAbsoluteBias(int type, int key, float value)
+

+
+
+

+Exchanges flat bias at key with new value Inherited from Entity + +

+

Parameters

+
+type +Bonus type
+key +Location of the bonus that will be changed
+value +New value
+
+

Returns

+
+

+key that can be used to access the multiplier +

+
+

+
+
+
+
+

+function var addKeyedBaseMultiplier(int type, int key, float value)
+

+
+
+

+Exchanges multiplier at key with new value Inherited from Entity + +

+

Parameters

+
+type +Bonus type
+key +Location of the bonus that will be changed
+value +New value
+
+

Returns

+
+

+key that can be used to access the multiplier +

+
+

+
+
+
+
+

+function var addKeyedMultiplier(int type, int key, float value)
+

+
+
+

+Exchanges multiplier at key with new value Inherited from Entity + +

+

Parameters

+
+type +Bonus type
+key +Location of the bonus that will be changed
+value +New value
+
+

Returns

+
+

+key that can be used to access the multiplier +

+
+

+
+
+
+
+

+function var addKeyedMultiplyableBias(int type, int key, float value)
+

+
+
+

+Exchanges bias at key with new value Inherited from Entity + +

+

Parameters

+
+type +Bonus type
+key +Location of the bonus that will be changed
+value +New value
+
+

Returns

+
+

+key that can be used to access the multiplier +

+
+

+
+
+
+
+

+function var addMultiplier(int type, float factor)
+

+
+
+

+Adds a multiplyer for stat of type type. The factor will be used unchanged. Inherited from Entity + +

+

Parameters

+
+type +Type of Bonus, e.g. acceleration, higher level crew
+factor +Factor that is used as Multiplier
+
+

Returns

+
+

+key that can be used to access the multiplier +

+
+

+
+
+
+
+

+function var addMultiplyableBias(int type, float value)
+

+
+
+

+Adds a bias for stat of type type. This bias will be added to stat before multipliers are considered. Inherited from Entity + +

+

Parameters

+
+type +Type of Bonus, e.g. acceleration, higher level crew
+value +Bias added to base stats.
+
+

Returns

+
+

+key that can be used to access the multiplier +

+
+

+
+
+
+
+

+function var addScript(string scriptPath, var... arguments)
+

+
+
+

+ Adds a new script to an entity Inherited from Entity + +

+

Parameters

+
+scriptPath +The path of the script that should be added
+arguments +An arbitrary number of arguments that will be given to the 'initialize' function of the added script
+
+

Returns

+
+

+0 on success, 1 if the entity could not be found +

+
+

+
+
+
+
+

+function var addScriptOnce()
+

+
+
+

+Inherited from Entity + +

+

+
+
+
+
+

+function Uuid addTurret(TurretTemplate turret, Matrix position, int part)
+

+
+
+

+Inherited from Entity + +

+

+
+
+
+
+

+function var blockHyperspace(float time)
+

+
+
+

+Inherited from Entity + +

+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function int callbacksRegistered(string callbackName, var functionName)
+

+
+
+

+Check how many functions are registered to a callback from the current script VM. Inherited from Entity + +

+

Parameters

+
+callbackName +The name of the callback
+functionName +The name of the function for which to check. If nil, will count all functions that are registered to this callback.
+
+

Returns

+
+

+The amount of functions registered to the callback +

+
+

+
+
+
+
+

+function var, var, table<int, string> canAddCrew(int number, int profession, bool change)
+

+
+
+

+Inherited from Entity + +

+

+
+
+
+
+

+function var changeCrew(int number, int profession)
+

+
+
+

+Inherited from Entity + +

+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var changeShield(double delta)
+

+
+
+

+Adds delta to shield durability Inherited from Entity + +

+

Parameters

+
+delta +
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var clearCargoBay()
+

+
+
+

+Inherited from Entity + +

+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var clearValues()
+

+
+
+

+Removes all custom values of the object Inherited from Entity + +

+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var damageShield(double amount, vec3 location, Uuid inflictorId, var damageSource, var damageType)
+

+
+
+

+Damages shield by delta amount, location and inflictorId are not necessary, but can be added if it is needed, e.g. you want to do effects on hitpoint. Inherited from Entity + +

+

Parameters

+
+delta +
+location +
+inflictorId +
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var destroy(Uuid inflictorId, var damageSource, var damageType)
+

+
+
+

+Destroy entity by inflicting more damage than durability of entity Inherited from Entity + +

+

Parameters

+
+inflictorId +Index of the entity that destroys the block
+damageSource +Source of damage. Can be Weaponry, Collision, Decay, Torpedo or Arbitrary. *
+damageType +Type of damage received. Damage can be of type Physical, Energy, Electric, Plasma, AntiMatter or Fragments.
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var destroyBlock(int index, Uuid inflictorId, var damageSource)
+

+
+
+

+Destroy one block Inherited from Entity + +

+

Parameters

+
+index +Index of the block that is destroyed
+inflictorId +Index of the entity that destroys the block
+damageSource +Source of damage. Can be Weaponry, Collision, Decay, Torpedo or Arbitrary.
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var destroyCargo(float volume)
+

+
+
+

+Destroys cargo. The destruction distribution is generally equal over all goods. Inherited from Entity + +

+

Parameters

+
+volume +The amount of volume that should be destroyed.
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var disableFlightAssistFor(float time)
+

+
+
+

+Inherited from Entity + +

+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var distortHyperspace(float time)
+

+
+
+

+Inherited from Entity + +

+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function table<TradingGood, int> findCargos(string name)
+

+
+
+

+Finds all cargos with the given name. Inherited from Entity + +

+

Parameters

+
+name +A string that will be matched with the 'name' property of the cargos.
+
+

Returns

+
+

+A map containing all matching goods, with the good as key and amount as value. +

+
+

+
+
+
+
+

+function vec3 getAimedPositionBySeat(int seat)
+

+
+
+

+Inherited from Entity + +

+

+
+
+
+
+

+function vec3... getAimedPositions()
+

+
+
+

+Inherited from Entity + +

+

+
+
+
+
+

+function var getAllowedArbitraryTurrets()
+

+
+
+

+Inherited from Entity + +

+

+
+
+
+
+

+function var getAllowedArmedTurrets()
+

+
+
+

+Inherited from Entity + +

+

+
+
+
+
+

+function var getAllowedUnarmedTurrets()
+

+
+
+

+Inherited from Entity + +

+

+
+
+
+
+

+function var getAttachedBlockIndex()
+

+
+
+

+Returns the Index of the block that the turret is build on Inherited from Entity + +

+

+
+
+
+
+

+function var getBoostedValue(int type, float value)
+

+
+
+

+Returns value with included bonus, in case a bonus exists. Returns Nil if no bonuses at all, returns value if no bonuses for this stat exist. Inherited from Entity + +

+

Parameters

+
+type +type of bonus stat, e.g. acceleration, higher level crew
+value +the value, that might be changed by bonuses
+
+

+
+
+
+
+

+function Box getBoundingBox()
+

+
+
+

+Returns Bounding Box for entity, use this if you need exact Bounding Box, e.g. for collision detection when entities are close to each other. Inherited from Entity + +

+

+
+
+
+
+

+function Sphere getBoundingSphere()
+

+
+
+

+Returns Bounding Sphere for entity. Much faster than Bounding Box, but not as accurate. Use this if you need to check often. Inherited from Entity + +

+

+
+
+
+
+

+function Captain getCaptain()
+

+
+
+

+Inherited from Entity + +

+

+
+
+
+
+

+function TradingGood, int... getCargo(unsigned int n)
+

+
+
+

+Inherited from Entity + +

+

+
+
+
+
+

+function int getCargoAmount(var name)
+

+
+
+

+Counts all goods of the given type. When given a string, it will match the 'name' property of the goods. When given a TradingGood it will match the exact good. Inherited from Entity + +

+

Parameters

+
+name +Either a TradingGood or a string containing the name of a trading good.
+
+

Returns

+
+

+The number of goods +

+
+

+
+
+
+
+

+function table<TradingGood, int> getCargos()
+

+
+
+

+Inherited from Entity + +

+

+
+
+
+
+

+function var getCrewMembers(int profession)
+

+
+
+

+Inherited from Entity + +

+

+
+
+
+
+

+function int... getDamageContributorPlayerFactions()
+

+
+
+

+Lists all players and alliances that contributed damage to the entity Inherited from Entity + +

+

Returns

+
+

+Indices of all players and alliances that contributed damage to the entity +

+
+

+
+
+
+
+

+function int... getDamageContributorPlayers()
+

+
+
+

+Lists all players that contributed damage to the entity Inherited from Entity + +

+

Returns

+
+

+Indices of all players that contributed damage to the entity +

+
+

+
+
+
+
+

+function int... getDamageContributors()
+

+
+
+

+Lists all factions that contributed damage to the entity Inherited from Entity + +

+

Returns

+
+

+Indices of all factions that contributed damage to the entity +

+
+

+
+
+
+
+

+function Box getDockedGroupBoundingBox()
+

+
+
+

+Returns Bounding Box for entity, but enlarged to also fit around all docked objects. Use this if you need exact Bounding Box, e.g. for collision detection when entities are close to each other. Inherited from Entity + +

+

+
+
+
+
+

+function Sphere getDockedGroupBoundingSphere()
+

+
+
+

+Returns Bounding Box for entity, but enlarged to also fit around all docked objects. Use this if you need exact Bounding Box, e.g. for collision detection when entities are close to each other. Inherited from Entity + +

+

+
+
+
+
+

+function var getDockingPositions()
+

+
+
+

+Lists all docking positions that the entity has Inherited from Entity + +

+

Returns

+
+

+A table that contains a key-value pair (id, table) for each dock: +

+
+

+
+
+
+
+

+function var getFreeArbitraryTurrets()
+

+
+
+

+Inherited from Entity + +

+

+
+
+
+
+

+function var getFreeArmedTurrets()
+

+
+
+

+Inherited from Entity + +

+

+
+
+
+
+

+function var getFreeUnarmedTurrets()
+

+
+
+

+Inherited from Entity + +

+

+
+
+
+
+

+function BlockPlan getFullPlanCopy()
+

+
+
+

+Returns the plan of the entity. This copies the entire plan, keep that in mind when using plans with large block counts. Inherited from Entity + +

+

Returns

+
+

+A copy of the plan of the entity +

+
+

+
+
+
+
+

+function Material getLowestMineableMaterial()
+

+
+
+

+Inherited from Entity + +

+

+
+
+
+
+

+function var, var getMalusFactor()
+

+
+
+

+Inherited from Entity + +

+

+
+
+
+
+

+function Material getMineableMaterial()
+

+
+
+

+Inherited from Entity + +

+

+
+
+
+
+

+function int... getMineableResources()
+

+
+
+

+Inherited from Entity + +

+

+
+
+
+
+

+function int getMoneyLootAmount()
+

+
+
+

+Inherited from Entity + +

+

+
+
+
+
+

+function BlockPlan getMovePlan()
+

+
+
+

+Returns the plan of the entity. This function will move the plan out of the entity, and replace the entity's plan with a single block. This operation is independent of the size of the plan, use it when you have to get large plans with lots of blocks. Inherited from Entity + +

+

Returns

+
+

+The plan of the entity +

+
+

+
+
+
+
+

+function var getNearestDistance(Entity other)
+

+
+
+

+Inherited from Entity + +

+

+
+
+
+
+

+function var getNumArmedTurrets()
+

+
+
+

+Inherited from Entity + +

+

+
+
+
+
+

+function var getNumMiningTurrets()
+

+
+
+

+Inherited from Entity + +

+

+
+
+
+
+

+function var getNumSalvagingTurrets()
+

+
+
+

+Inherited from Entity + +

+

+
+
+
+
+

+function var getNumUnarmedTurrets()
+

+
+
+

+Inherited from Entity + +

+

+
+
+
+
+

+function int... getPilotIndices()
+

+
+
+

+Returns Indices of piloting players Inherited from Entity + +

+

Returns

+
+

+multiple return values: indices of players +

+
+

+
+
+
+
+

+function var getPlanMoneyValue()
+

+
+
+

+Inherited from Entity + +

+

+
+
+
+
+

+function double... getPlanResourceValue()
+

+
+
+

+Inherited from Entity + +

+

+
+
+
+
+

+function int getResourceLootAmount()
+

+
+
+

+Inherited from Entity + +

+

+
+
+
+
+

+function table<int, string> getScripts()
+

+
+
+

+Inherited from Entity + +

+

+
+
+
+
+

+function table<string, string> getTitleArguments()
+

+
+
+

+Retrieves the arguments to a title Inherited from Entity + +

+

+
+
+
+
+

+function NamedFormat getTitleFormat()
+

+
+
+

+Retrieves the title as NamedFormat Inherited from Entity + +

+

+
+
+
+
+

+function Entity getTurret(int index)
+

+
+
+

+Inherited from Entity + +

+

+
+
+
+
+

+function Matrix, int... getTurretPositions(TurretTemplate turret, int number)
+

+
+
+

+Inherited from Entity + +

+

+
+
+
+
+

+function Matrix, int... getTurretPositionsLineOfSight(TurretTemplate turret, int number)
+

+
+
+

+Inherited from Entity + +

+

+
+
+
+
+

+function Entity... getTurrets()
+

+
+
+

+Inherited from Entity + +

+

+
+
+
+
+

+function var getTurretSize()
+

+
+
+

+Inherited from Entity + +

+

+
+
+
+
+

+function var getTurretTemplateSize()
+

+
+
+

+Inherited from Entity + +

+

+
+
+
+
+

+function var getTurretTurningSpeed()
+

+
+
+

+Inherited from Entity + +

+

+
+
+
+
+

+function var getUndamagedPlanMoneyValue()
+

+
+
+

+Inherited from Entity + +

+

+
+
+
+
+

+function double... getUndamagedPlanResourceValue()
+

+
+
+

+Inherited from Entity + +

+

+
+
+
+
+

+function var getValue(string key)
+

+
+
+

+Retrieves a custom value saved in the entity with the given key Inherited from Entity + +

+

Parameters

+
+key +A string that serves as the name of the value
+
+

Returns

+
+

+The value if the key exists, otherwise nil +

+
+

+
+
+
+
+

+function table<string, var> getValues()
+

+
+
+

+Retrieves all key-value pairs of custom values of the entity Inherited from Entity + +

+

Returns

+
+

+A table containing all custom key-value pairs +

+
+

+
+
+
+
+

+function bool hasComponent(int type)
+

+
+
+

+Inherited from Entity + +

+

+
+
+
+
+

+function var hasScript(string name)
+

+
+
+

+Inherited from Entity + +

+

+
+
+
+
+

+function var heal(float damage, int index, vec3 location, Uuid inflictorID)
+

+
+
+

+Increases durability of the plan of the Entity Inherited from Entity + +

+

Parameters

+
+damage +The amount of durability that will be restored
+index +Index of the block that will be restored
+location +vector containing the hit point, if unknown/unnecessary use empty vector
+inflictorID +Index of the entity that heals
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var healShield(double delta)
+

+
+
+

+Increases shield durability by delta Inherited from Entity + +

+

Parameters

+
+delta +
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var hyperspaceBlocked()
+

+
+
+

+Inherited from Entity + +

+

+
+
+
+
+

+function var inflictDamage(float damage, var damageSource, var damageType, int index, vec3 location, Uuid inflictorId)
+

+
+
+

+Inflicts damage to the plan of the Entity Inherited from Entity + +

+

Parameters

+
+damage +The amount of damage that will be dealt
+damageSource +The source of the damage. Can be Weaponry, Collision, Decay, Torpedo or Arbitrary.
+damageType +Type of damage received. Damage can be of type Physical, Energy, Electric, Plasma, AntiMatter or Fragments
+index +Index of the block that will receive the damage
+location +vector containing the hit point, if unknown / unnecessary use empty vector
+inflictorId +Index of the entity that caused the damage
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var... invokeFunction(var scriptName, string functionName, var... arguments)
+

+
+
+

+Invokes a function in a script of the entity. Use this function to invoke functions from one script in another script. The first return value of the function is an integer indicating whether or not the call was successful. When it was, this integer is followed by the return values of the invoked function. Inherited from Entity + +

+

Parameters

+
+scriptName +The name or index of the script containing the function
+functionName +The name of the function that will be executed
+arguments +An arbitrary list of arguments that will be given to the invoked function
+
+

Returns

+
+

+Returns at least 1 value indicating if the call succeeded:
0 The call was successful. In this case, the return values of the script are returned in addition to the call result, following the call result
1 The call failed because the entity with the specified index does not exist or has no Scripts component
2 The call failed because it came from another sector than the entity is in
3 The call failed because the given script was not found in the entity
4 The call failed because the given function was not found in the script
5 The call failed because the script's state has errors and is invalid
+

+
+

+
+
+
+
+

+function var isCollectable(Entity entity)
+

+
+
+

+Inherited from Entity + +

+

+
+
+
+
+

+function bool isInDockingArea(Entity other)
+

+
+
+

+Inherited from Entity + +

+

+
+
+
+
+

+function var isInsideShield(vec3 point)
+

+
+
+

+Inherited from Entity + +

+

+
+
+
+
+

+function bool, var isJumpRouteValid(int fromX, int fromY, int toX, int toY)
+

+
+
+

+Inherited from Entity + +

+

+
+
+
+
+

+function var isManned()
+

+
+
+

+Inherited from Entity + +

+

+
+
+
+
+

+function var isTurretAllowed(TurretTemplate ScriptTurretTemplate)
+

+
+
+

+Tests if the maximum number of turrets of this kind is not reached Inherited from Entity + +

+

Parameters

+
+ScriptTurretTemplate +the template of the turret to be placed
+
+

+
+
+
+
+

+function int jumpPossible(int x, int y)
+

+
+
+

+Tests if the entity can jump to the specified coordinates Inherited from Entity + +

+

Parameters

+
+x +The x-coordinates of the target sector
+y +The y-coordinates of the target sector
+
+

Returns

+
+

+Returns an error code:
-1 The entity doesn't have a hyperspace drive.
0 The entity can jump.
1 The hyperspace drive needs to recharge.
2 The target sector is too far away.
3 The entity is facing the wrong direction.
4 The hyperspace drive is being jammed.
+

+
+

+
+
+
+
+

+function var moveBy(vec3 delta)
+

+
+
+

+Teleports entity by vector Inherited from Entity + +

+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function int registerCallback(string callbackName, string functionName)
+

+
+
+

+Register a callback in the entity. The callback receiver has to be inside the same sector for the registration to succeed. The callback will be removed if either the entity or the receiver leaves the sector or gets destroyed. Double registration of callbacks doesn't work. When the same callback to the same callback of the same script instance is registered twice, it will still only be called once. Inherited from Entity + +

+

Parameters

+
+callbackName +The name of the callback
+functionName +The name of the function that will be executed in the script when the callback happens
+
+

Returns

+
+

+0 on success, 1 if the registration failed +

+
+

+
+
+
+
+

+function var registerDamage(Uuid shooterId, double damage, DamageSource DamageSource)
+

+
+
+

+Registers artificial damage as if the entity was damaged by the shooter Inherited from Entity + +

+

Parameters

+
+shooterId +The id of the entity that inflicted the damage
+damage +The amount of damage inflicted
+DamageSource +The kind of source for the damage
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var removeBonus(int key)
+

+
+
+

+Deletes bonus Inherited from Entity + +

+

Parameters

+
+key +Location of the bonus
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var removeCargo(var good, int amount)
+

+
+
+

+Removes cargo from the entity. When given a TradingGood, an exact check for that good will be performed. When given a string, only a name check will be performed, and which cargo will be removed first is undefined if there are multiple goods with the same name. An example would be Energy Cells vs. Stolen Energy Cells. The 'name' property is the same, but the 'stolen' property is different. Inherited from Entity + +

+

Parameters

+
+good +Either a TradingGood or a string with the name of a good.
+amount +The amount of cargo that should be removed. If this is more than there is on the ship, all specified cargo will be removed.
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var removeCrew(int number, CrewMan crewman)
+

+
+
+

+Inherited from Entity + +

+

+
+
+
+
+

+function var removeScript(var script)
+

+
+
+

+Inherited from Entity + +

+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var removeScriptBonuses()
+

+
+
+

+Deletes all bonuses added by the current script Inherited from Entity + +

+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var resolveScriptPath(string path)
+

+
+
+

+Inherited from Entity + +

+

+
+
+
+
+

+function bool sendCallback()
+

+
+
+

+Inherited from Entity + +

+

+
+
+
+
+

+function var setAccumulatingBlockHealth(bool bool)
+

+
+
+

+If AccumulatingBlockHealth is true, a block needs to take as much damage as would be necessary to destroy all its children before it itself is destroyed. If it is set to false, the entity's blocks will have only their own durability. Set it to false if you want your entity to easily break apart, e.g. for wreckages. Inherited from Entity + +

+

Parameters

+
+bool +
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var setAimedPosition(int seat, vec3 in)
+

+
+
+

+Inherited from Entity + +

+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var setAttachedBlockIndex(int in)
+

+
+
+

+Inherited from Entity + +

+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var setCaptain(Captain [or nil] captain)
+

+
+
+

+Inherited from Entity + +

+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var setDamageTypeMultiplier(DamageType type, float factor)
+

+
+
+

+Inherited from Entity + +

+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var setDropsAttachedTurrets(bool bool)
+

+
+
+

+Sets the entities' ability to drop its attached turrets. If set to true (default) the ship has a chance to drop a turret that's attached to it when it's destroyed. This is only enabled for NPC entities. Inherited from Entity + +

+

Parameters

+
+bool +value if the dropping is enabled
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var setDropsLoot(bool bool)
+

+
+
+

+Sets the entities' ability to drop normal loot. Affects dropping of money, resources, cargo, turrets and upgrades. 'Loot' component is not affected by this. Inherited from Entity + +

+

Parameters

+
+bool +value if the entity should drop loot or not
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var setMalusFactor(float in, int reason)
+

+
+
+

+Inherited from Entity + +

+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var setManned(bool in)
+

+
+
+

+Inherited from Entity + +

+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var setMovePlan(BlockPlan plan)
+

+
+
+

+Set the new plan of the entity. The entity will get deleted if the plan is empty. This moves all the data out of the plan that is used as the first argument. The content of the plan given as argument is then undefined, but still valid. It might be empty, it might contain the previous plan. This operation is independent of the size of the plan, use it when you have to set large plans with lots of blocks. Inherited from Entity + +

+

Parameters

+
+plan +The new BlockPlan of the entity
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var setPlan(BlockPlan plan)
+

+
+
+

+Set the new plan of the entity. The entity will get deleted if the plan is empty. This copies the entire plan that is given as argument, keep that in mind when setting plans with large block counts. Inherited from Entity + +

+

Parameters

+
+plan +The new BlockPlan of the entity
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var setTitle(string title, string_pair... arguments)
+

+
+
+

+Sets the title that can be used as title in menus Inherited from Entity + +

+

Parameters

+
+title +a string that will be used as title, can be a format string for easier translation.

+arguments +Set the string arguments (if format string is used) as vector of string_pair.
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var setTitleArguments(string_pair... arguments)
+

+
+
+

+Sets the arguments to a title Inherited from Entity + +

+

Parameters

+
+arguments +Set the string arguments as vector of string_pair.
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var setTurretSize(float in)
+

+
+
+

+Inherited from Entity + +

+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var setTurretTurningSpeed(float in)
+

+
+
+

+Inherited from Entity + +

+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var setValue(string key, var value)
+

+
+
+

+Sets a custom value Inherited from Entity + +

+

Parameters

+
+key +A string that serves as the name of the value
+value +The value to save. Must be bool, number, string or nil. If nil is given, the value will be deleted.
+
+

+
+
+
+
+

+function var singleFlyToLocationTick(vec3 location)
+

+
+
+

+Tells the ship to fly to given location, directly and without pathfinding. Inherited from Entity + +

+

Parameters

+
+location +the location to fly to (in global coordinates) Paired with setting desiredVelocity to 0, this can be used to rotate the ship to a given direction.
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function int unregisterCallback(string callbackName, string functionName)
+

+
+
+

+Inherited from Entity + +

+

+
+
+
+
+

+function var updateProductionCatchingUp(float float)
+

+
+
+

+Simulates production catching up. This is used when ships return from the background simulation. Updates fighter production, academy and cloning. Inherited from Entity + +

+

Parameters

+
+float +timePassed The amount of time that should be simulated
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var waitUntilAsyncWorkFinished(var time)
+

+
+
+

+Inherited from Entity + +

+

Returns

+
+

+nothing +

+
+

+
+
+
+
+
+
+ Overview +
Home + Functions + Search +
+
Search:
+Predefined Functions & Example Scripts +
Command +Entity +FactionDatabase +PlanGenerator +Player +Sector +Server +UsableInventoryItem +
+
+

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

+
+ +
+ + diff --git a/Documentation/EntityFunctions.html b/Documentation/EntityFunctions.html new file mode 100644 index 0000000..f63411b --- /dev/null +++ b/Documentation/EntityFunctions.html @@ -0,0 +1,1235 @@ + + + Avorion Predefined Functions - Entity + + + + +
+
+

Avorion Script API Documentation

+
+
+ +
+
Search:
+ +
+

Entity Script Predefined Functions

+
+

Tip: Scroll down for an example script!

+
+
+

+function initialize(...)
+

+
+

+This function is always the very first function that is called in a script, and only once during the lifetime of the script. The function is always called on the server first, before client instances are available, so invoking client functions will never work. This function is both called when a script gets newly attached to an object, and when the object is loaded from the database during a load from disk operation. During a load from disk operation, no parameters are passed to the function, and a global variable '_restoring' is set to true. +

+

Parameters

+
+... +Parameters that are passed through from the adding of the script. nil if the script was loaded from the database while loading a sector or player or similar.
+
+

+
+
+
+

+function update(timeStep)
+

+
+

+Called every tick, both on client and server. See the documentation for getUpdateInterval() for details on the frequency of these calls. +

+

Parameters

+
+timeStep +The amount of time passed since the last update tick
+
+

+
+
+
+

+function getUpdateInterval()
+

+
+

+Defines the update tick interval of the script. This interval can not be less than the update tick interval of the server or client, depending on where the script is running. The update(), updateParallelRead(), updateParallelSelf(), updateClient() and updateServer() functions will only be called after at least this much time has passed. The minimum update interval for the client varies with the framerate of the client. The minimum update interval for the server is 50 ms. This function is called after initialize() or after the update functions were called. If this function is not defined, the update functions will be called every tick. +

+

Expected return values

+
+

+The desired update tick interval in seconds +

+
+

+
+
+
+

+function onRemove()
+

+
+

+Called when the script is about to be removed from the object, before the removal. +

+

+
+
+
+

+function onDelete()
+

+
+

+Called when the script is about to be deleted from the object, before the deletion. This is the last call that will be done to an object script. This function is also called when the object it is attached to is deleted. +

+

+
+
+
+

+function secure()
+

+
+

+Called to secure values from the script. This function is called when the object is unloaded from the server. It's called at other times as well to refresh data, or when objects are copied or during regular saves. The table returned by this function will be passed to the restore() function when the object is loaded and read from disk. All values that are in the table must be numbers, strings or other tables. Values that aren't of the above types will be converted to nil and an error message will be printed. +

+

Expected return values

+
+

+A table containing values that should be saved +

+
+

+
+
+
+

+function restore(values)
+

+
+

+Called to restore previously secured values for the script. This is called after initialize(). Receives the values that were gathered from the last called to the secure() function. This function is called when the object is read from disk and restored, after initialize() was called. +

+

Parameters

+
+values +The table previously returned by the secure() function
+
+

+
+
+
+

+function initUI()
+

+
+

+This function is called when the game initializes the UI of the script. This function is only called once per script. You should initialize all your UI elements in this function and register all interactions for the entity here as well, so that they will be visible when the player interacts with the entity.

Client Function: This function is only called on the client. +

+

+
+
+
+

+function onInteract(optionIndex)
+

+
+

+Executed whenever the player starts interacting with the script, before the registered interaction callback function is executed.

Client Function: This function is only called on the client. +

+

Parameters

+
+optionIndex +Index of the option the player chose for interaction
+
+

+
+
+
+

+function onShowWindow(optionIndex)
+

+
+

+Executed when the player starts interacting with the script and the registered window is shown.

Client Function: This function is only called on the client. +

+

Parameters

+
+optionIndex +Index of the option the player chose for interaction
+
+

+
+
+
+

+function onCloseWindow(optionIndex)
+

+
+

+Executed when the player stops interacting with the script or closes the main window for the specific interaction.

Client Function: This function is only called on the client. +

+

Parameters

+
+optionIndex +Index of the option the player chose for interaction
+
+

+
+
+
+

+function updateUI()
+

+
+

+Executed every tick while the player is interacting with the script. This function is expensive, so only define it if you need your script to be updated every tick.

Client Function: This function is only called on the client. +

+

+
+
+
+

+function renderUI()
+

+
+

+Executed every tick while the player is interacting with the script. During this function, render calls are valid and can be done. All render calls from this function will be drawn over the current window. This function is expensive, so only define it if you need it.

Client Function: This function is only called on the client. +

+

+
+
+
+

+function renderUIIndicator(x, y, size)
+

+
+

+Executed every tick if the entity is selected by the player. During this function, render calls are valid and can be done. All render calls from this function will be drawn on the same 2D plane as other UI indicators. This function is expensive, so only define it if you need it.

Client Function: This function is only called on the client. +

+

Parameters

+
+x +The x position of the target indicator
+y +The y position of the target indicator
+size +The size of the target indicator
+
+

+
+
+
+

+function renderUIPreHud()
+

+
+

+Executed every tick. During this function, render calls are valid and can be done. All render calls from this function will be drawn below the main HUD. This function is expensive, so only define it if you need it.

Client Function: This function is only called on the client. +

+

+
+
+
+

+function renderUIPostHud()
+

+
+

+Executed every tick. During this function, render calls are valid and can be done. All render calls from this function will be drawn over the main HUD. This function is expensive, so only define it if you need it.

Client Function: This function is only called on the client. +

+

+
+
+
+

+function onKeyboardEvent(key, pressed)
+

+
+

+Executed whenever a keyboard event is sent to the script. Keyboard events might be caught by other active menus first. If this function returns true then the event will be interpreted as used and won't be sent to any other menus.

Client Function: This function is only called on the client. +

+

Parameters

+
+key +The key that was pressed or released
+pressed +A boolean indicating whether the key was pushed down or not
+
+

Expected return values

+
+

+Return true to indicate that the event was used by this script +

+
+

+
+
+
+

+function onMouseEvent(key, pressed, x, y)
+

+
+

+Executed whenever a mouse event is sent to the script. Mouse events might be caught by other active menus first. If this function returns true then the event will be interpreted as used and won't be sent to any other menus.

Client Function: This function is only called on the client. +

+

Parameters

+
+key +The key that was pressed or released
+pressed +A boolean indicating whether the key was pushed down or not
+x +The x position of the mouse cursor
+y +The y position of the mouse cursor
+
+

Expected return values

+
+

+Return true to indicate that the event was used by this script +

+
+

+
+
+
+

+function interactionPossible(playerIndex, optionIndex)
+

+
+

+Determines whether or not the entity can be interacted with. If no values are returned or the function isn't defined, interaction will be deemed not possible. The game checks for general interaction possibilities sometimes, for example when a player selects a station, to show the "Press F to interact" text. If a non-empty error message is returned, the result will be interpreted as "failed", even if the first value was true.

Client Function: This function is only called on the client. +

+

Parameters

+
+playerIndex +The index of the player that is trying to interact
+optionIndex +The index of the specific registered interaction option that is being chosen. nil if only a general query for interaction is done.
+
+

Expected return values

+
+

+A boolean indicating whether the interaction is possible and if not, an optional error message as string that says why the interaction failed +

+
+

+
+
+
+

+function updateClient(timeStep)
+

+
+

+Update tick that is only executed on the client. See the documentation for getUpdateInterval() for details on the frequency of these calls. Execution order of the updateXXX() functions is: updateParallelRead(), updateParallelSelf(), update(), update[Server/Client]().

Client Function: This function is only called on the client. +

+

Parameters

+
+timeStep +The amount of time that passed since the last update tick
+
+

+
+
+
+

+function getIcon()
+

+
+

+A function that is used by the UI to get the icon that will be used for the script interaction button on the top right of the screen. This function should return a string containing the path to the icon (example: "data/textures/icons/jigsaw-piece.png"). If this function isn't defined, or if nothing or empty string is returned, the displayed icon will be a placeholder icon. This function will only be called if the interactionPossible(...) test didn't fail.

Client Function: This function is only called on the client. +

+

Expected return values

+
+

+A string containing the path to the icon +

+
+

+
+
+
+

+function updateServer(timeStep)
+

+
+

+Update tick that is only executed on the server. See the documentation for getUpdateInterval() for details on the frequency of these calls. Execution order of the updateXXX() functions is: updateParallelRead(), updateParallelSelf(), update(), update[Server/Client]().

Server Function: This function is only called on the server. +

+

Parameters

+
+timeStep +The amount of time that passed since the last update tick
+
+

+
+
+
+

+function isTransferrable(id, x, y)
+

+
+

+Executed when the entity enters an area that triggers a sector transfer (ie. gate, wormhole). This should return a boolean value that indicates whether the entity can be transferred to the other sector or not. If any script that is attached to the entity and that implements this function returns false, the transfer fails and the entity won't be transferred. If a script doesn't implement this function, the value is interpreted as true.

Server Function: This function is only called on the server. +

+

Parameters

+
+id +The id of the entity responsible for the transfer (ie. the gate or wormhole)
+x +The x coordinate of the target sector
+y +The y coordinate of the target sector
+
+

Expected return values

+
+

+A boolean whether or not the entity is allowed to transfer +

+
+

+
+
+
+

+function canTransfer(id)
+

+
+

+Executed if the entity has an EntityTransferrer component and when an entity enters the area that triggers a sector transfer. This should return a boolean value that indicates whether the entity can be transferred to the other sector or not. If any script that is attached to the entity and that implements this function returns false, the transfer fails and the entity won't be transferred. If a script doesn't implement this function, the value is interpreted as true.

Server Function: This function is only called on the server. +

+

Parameters

+
+id +The id of the entity that entered the transfer area
+
+

Expected return values

+
+

+A boolean whether or not the entity is allowed to transfer +

+
+

+
+
+
+

+function getEnergy(seed, rarity, permanent)
+

+
+

+Used to gather the energy requirements of a system upgrade. The returned value must be in Watts. +

+

Parameters

+
+seed +The seed of the upgrade
+rarity +The rarity of the upgrade
+permanent +A bool indicating whether or not the upgrade was installed permanently
+
+

Expected return values

+
+

+The amount of currently required energy, in Watts. +

+
+

+
+
+
+

+function getEnergy(seed, rarity, permanent)
+

+
+

+Used to gather the energy requirements of a system upgrade. The returned value must be in Watts. +

+

Parameters

+
+seed +The seed of the upgrade
+rarity +The rarity of the upgrade
+permanent +A bool indicating whether or not the upgrade was installed permanently
+
+

Expected return values

+
+

+The amount of currently required energy, in Watts. +

+
+

+
+
+
+

+function updateParallelRead(timeStep)
+

+
+

+Called every tick, both on client and server. See the documentation for getUpdateInterval() for details on the frequency of these calls. This function is executed in parallel with other entities, but not other scripts of the same entity. During this function, only reading values from the sector and its entities is allowed. Execution order of the updateXXX() functions is: updateParallelRead(), updateParallelSelf(), update(), update[Server/Client]() +

+

Parameters

+
+timeStep +The amount of time passed since the last update tick
+
+

+
+
+
+

+function updateParallelSelf(timeStep)
+

+
+

+Called every tick, both on client and server. See the documentation for getUpdateInterval() for details on the frequency of these calls. This function is executed in parallel with other entities, but not other scripts of the same entity. During this function, only modifying the own entity is allowed, access to other entities in the sector is prohibited. Execution order of the updateXXX() functions is: updateParallelRead(), updateParallelSelf(), update(), update[Server/Client]() +

+

Parameters

+
+timeStep +The amount of time passed since the last update tick
+
+

+
+
+
+

+function onSectorChanged()
+

+
+

+Executed whenever the entity changes sectors or when first inserted into a sector, for example while loading a sector or when the entity is first created. +

+

+
+
+
+

+function onIndexChanged(old, id)
+

+
+

+Executed whenever the entity id changes, after the change took place. This happens *very* rarely and only when a database corruption was detected. +

+

Parameters

+
+old +The old id of the entity
+id +The new id of the entity
+
+

+
+
+
+

+function initializationFinished()
+

+
+

+Executed when a sector was loaded entirely and is ready. This function is called on the client after a new sector was received and once it has been completely created and initialized. On the server, this function is called after a sector was generated or loaded from disk and once it has been completely initialized. The function is also called on every Entity that is added to an existing, initialized sector, once it can access all other entities. Use this function if you need to access other Entity objects or the Sector object during initialization, since they may not be available in the initialize() call. +

+

+
+
+


Entity Example Script

+
+ +-- This function is always the very first function that is called in a script, and only once during
+-- the lifetime of the script. The function is always called on the server first, before client
+-- instances are available, so invoking client functions will never work. This function is both
+-- called when a script gets newly attached to an object, and when the object is loaded from the
+-- database during a load from disk operation. During a load from disk operation, no parameters
+-- are passed to the function, and a global variable '_restoring' is set to true.
+function initialize(...)
+
+end
+
-- Called every tick, both on client and server. See the documentation for getUpdateInterval()
+-- for details on the frequency of these calls.
+function update(timeStep)
+
+end
+
-- Defines the update tick interval of the script. This interval can not be less than the update
+-- tick interval of the server or client, depending on where the script is running. The update(),
+-- updateParallelRead(), updateParallelSelf(), updateClient() and updateServer() functions will
+-- only be called after at least this much time has passed. The minimum update interval for the
+-- client varies with the framerate of the client. The minimum update interval for the server
+-- is 50 ms. This function is called after initialize() or after the update functions were called.
+-- If this function is not defined, the update functions will be called every tick.
+function getUpdateInterval()
+
+end
+
-- Called when the script is about to be removed from the object, before the removal.
+function onRemove()
+
+end
+
-- Called when the script is about to be deleted from the object, before the deletion. This is
+-- the last call that will be done to an object script. This function is also called when the
+-- object it is attached to is deleted.
+function onDelete()
+
+end
+
-- Called to secure values from the script. This function is called when the object is unloaded
+-- from the server. It's called at other times as well to refresh data, or when objects are copied
+-- or during regular saves. The table returned by this function will be passed to the restore()
+-- function when the object is loaded and read from disk. All values that are in the table must
+-- be numbers, strings or other tables. Values that aren't of the above types will be converted
+-- to nil and an error message will be printed.
+function secure()
+
+end
+
-- Called to restore previously secured values for the script. This is called after initialize().
+-- Receives the values that were gathered from the last called to the secure() function. This
+-- function is called when the object is read from disk and restored, after initialize() was called.
+function restore(values)
+
+end
+
-- This function is called when the game initializes the UI of the script. This function is only
+-- called once per script. You should initialize all your UI elements in this function and register
+-- all interactions for the entity here as well, so that they will be visible when the player
+-- interacts with the entity.
+-- Client Function: This function is only called on the client.
+function initUI()
+
+end
+
-- Executed whenever the player starts interacting with the script, before the registered interaction
+-- callback function is executed.
+-- Client Function: This function is only called on the client.
+function onInteract(optionIndex)
+
+end
+
-- Executed when the player starts interacting with the script and the registered window is shown.
+-- Client Function: This function is only called on the client.
+function onShowWindow(optionIndex)
+
+end
+
-- Executed when the player stops interacting with the script or closes the main window for the
+-- specific interaction.
+-- Client Function: This function is only called on the client.
+function onCloseWindow(optionIndex)
+
+end
+
-- Executed every tick while the player is interacting with the script. This function is expensive,
+-- so only define it if you need your script to be updated every tick.
+-- Client Function: This function is only called on the client.
+function updateUI()
+
+end
+
-- Executed every tick while the player is interacting with the script. During this function,
+-- render calls are valid and can be done. All render calls from this function will be drawn over
+-- the current window. This function is expensive, so only define it if you need it.
+-- Client Function: This function is only called on the client.
+function renderUI()
+
+end
+
-- Executed every tick if the entity is selected by the player. During this function, render calls
+-- are valid and can be done. All render calls from this function will be drawn on the same 2D
+-- plane as other UI indicators. This function is expensive, so only define it if you need it.
+-- Client Function: This function is only called on the client.
+function renderUIIndicator(x, y, size)
+
+end
+
-- Executed every tick. During this function, render calls are valid and can be done. All render
+-- calls from this function will be drawn below the main HUD. This function is expensive, so only
+-- define it if you need it.
+-- Client Function: This function is only called on the client.
+function renderUIPreHud()
+
+end
+
-- Executed every tick. During this function, render calls are valid and can be done. All render
+-- calls from this function will be drawn over the main HUD. This function is expensive, so only
+-- define it if you need it.
+-- Client Function: This function is only called on the client.
+function renderUIPostHud()
+
+end
+
-- Executed whenever a keyboard event is sent to the script. Keyboard events might be caught by
+-- other active menus first. If this function returns true then the event will be interpreted
+-- as used and won't be sent to any other menus.
+-- Client Function: This function is only called on the client.
+function onKeyboardEvent(key, pressed)
+
+end
+
-- Executed whenever a mouse event is sent to the script. Mouse events might be caught by other
+-- active menus first. If this function returns true then the event will be interpreted as used
+-- and won't be sent to any other menus.
+-- Client Function: This function is only called on the client.
+function onMouseEvent(key, pressed, x, y)
+
+end
+
-- Determines whether or not the entity can be interacted with. If no values are returned or the
+-- function isn't defined, interaction will be deemed not possible. The game checks for general
+-- interaction possibilities sometimes, for example when a player selects a station, to show the
+-- "Press F to interact" text. If a non-empty error message is returned, the result will be interpreted
+-- as "failed", even if the first value was true.
+-- Client Function: This function is only called on the client.
+function interactionPossible(playerIndex, optionIndex)
+
+end
+
-- Update tick that is only executed on the client. See the documentation for getUpdateInterval()
+-- for details on the frequency of these calls. Execution order of the updateXXX() functions is:
+-- updateParallelRead(), updateParallelSelf(), update(), update[Server/Client]().
+-- Client Function: This function is only called on the client.
+function updateClient(timeStep)
+
+end
+
-- A function that is used by the UI to get the icon that will be used for the script interaction
+-- button on the top right of the screen. This function should return a string containing the
+-- path to the icon (example: "data/textures/icons/jigsaw-piece.png"). If this function isn't
+-- defined, or if nothing or empty string is returned, the displayed icon will be a placeholder
+-- icon. This function will only be called if the interactionPossible(...) test didn't fail.
+-- Client Function: This function is only called on the client.
+function getIcon()
+
+end
+
-- Update tick that is only executed on the server. See the documentation for getUpdateInterval()
+-- for details on the frequency of these calls. Execution order of the updateXXX() functions is:
+-- updateParallelRead(), updateParallelSelf(), update(), update[Server/Client]().
+-- Server Function: This function is only called on the server.
+function updateServer(timeStep)
+
+end
+
-- Executed when the entity enters an area that triggers a sector transfer (ie. gate, wormhole).
+-- This should return a boolean value that indicates whether the entity can be transferred to
+-- the other sector or not. If any script that is attached to the entity and that implements this
+-- function returns false, the transfer fails and the entity won't be transferred. If a script
+-- doesn't implement this function, the value is interpreted as true.
+-- Server Function: This function is only called on the server.
+function isTransferrable(id, x, y)
+
+end
+
-- Executed if the entity has an EntityTransferrer component and when an entity enters the area
+-- that triggers a sector transfer. This should return a boolean value that indicates whether
+-- the entity can be transferred to the other sector or not. If any script that is attached to
+-- the entity and that implements this function returns false, the transfer fails and the entity
+-- won't be transferred. If a script doesn't implement this function, the value is interpreted
+-- as true.
+-- Server Function: This function is only called on the server.
+function canTransfer(id)
+
+end
+
-- Used to gather the energy requirements of a system upgrade. The returned value must be in Watts.
+function getEnergy(seed, rarity, permanent)
+
+end
+
-- Used to gather the energy requirements of a system upgrade. The returned value must be in Watts.
+function getEnergy(seed, rarity, permanent)
+
+end
+
-- Called every tick, both on client and server. See the documentation for getUpdateInterval()
+-- for details on the frequency of these calls. This function is executed in parallel with other
+-- entities, but not other scripts of the same entity. During this function, only reading values
+-- from the sector and its entities is allowed. Execution order of the updateXXX() functions is:
+-- updateParallelRead(), updateParallelSelf(), update(), update[Server/Client]()
+function updateParallelRead(timeStep)
+
+end
+
-- Called every tick, both on client and server. See the documentation for getUpdateInterval()
+-- for details on the frequency of these calls. This function is executed in parallel with other
+-- entities, but not other scripts of the same entity. During this function, only modifying the
+-- own entity is allowed, access to other entities in the sector is prohibited. Execution order
+-- of the updateXXX() functions is: updateParallelRead(), updateParallelSelf(), update(), update[Server/Client]()
+function updateParallelSelf(timeStep)
+
+end
+
-- Executed whenever the entity changes sectors or when first inserted into a sector, for example
+-- while loading a sector or when the entity is first created.
+function onSectorChanged()
+
+end
+
-- Executed whenever the entity id changes, after the change took place. This happens *very* rarely
+-- and only when a database corruption was detected.
+function onIndexChanged(old, id)
+
+end
+
-- Executed when a sector was loaded entirely and is ready. This function is called on the client
+-- after a new sector was received and once it has been completely created and initialized. On
+-- the server, this function is called after a sector was generated or loaded from disk and once
+-- it has been completely initialized. The function is also called on every Entity that is added
+-- to an existing, initialized sector, once it can access all other entities. Use this function
+-- if you need to access other Entity objects or the Sector object during initialization, since
+-- they may not be available in the initialize() call.
+function initializationFinished()
+
+end
+ +
+
+
+
+
+
+ Overview +
Home + Functions + Search +
+
Search:
+Predefined Functions & Example Scripts +
Command +Entity +FactionDatabase +PlanGenerator +Player +Sector +Server +UsableInventoryItem +
+
+

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

+
+ +
+ + diff --git a/Documentation/EntityIcon.html b/Documentation/EntityIcon.html new file mode 100644 index 0000000..8eff83d --- /dev/null +++ b/Documentation/EntityIcon.html @@ -0,0 +1,527 @@ + + + EntityIcon + + + + +
+
+

Avorion Script API Documentation

+
+
+ +
+
Search:
+
+
+ + + + + + + + + + + + + + + + + + + +
+EntityIcon +EntityIcon +

Properties
+dangerIcon +
+dangerIconColor +
+dangerIconVisible +
+entity +
+entityId +
+icon +
+iconColor +
+secondaryIcon +
+secondaryIconColor +
+tertiaryIcon +
+tertiaryIconColor +

Member Functions
+
+
+
+

EntityIcon

+

+This object is only available on the client. +

+
+
+

+function EntityIcon(var id)
+

+
+
+

Parameters

+
+id +The id of the entity this component belongs to, or the entity itself, must be an id of an existing entity or nil for the entity in the current script context
+
+

Returns

+
+

+A new instance of EntityIcon +

+
+

+
+
+
+
+ +
property string dangerIcon
+
+
+
+
+ +
property Color dangerIconColor
+
+
+
+
+ +
property bool dangerIconVisible
+
+
+
+
+ +
property Entity entity[read-only]
+
+
+
+
+ +
property uuid entityId[read-only]
+
+
+
+
+ +
property string icon
+
+
+
+
+ +
property Color iconColor
+
+
+
+
+ +
property string secondaryIcon
+
+
+
+
+ +
property Color secondaryIconColor
+
+
+
+
+ +
property string tertiaryIcon
+
+
+
+
+ +
property Color tertiaryIconColor
+
+
+
+
+
+
+
+
+ Overview +
Home + Functions + Search +
+
Search:
+Predefined Functions & Example Scripts +
Command +Entity +FactionDatabase +PlanGenerator +Player +Sector +Server +UsableInventoryItem +
+
+

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

+
+ +
+ + diff --git a/Documentation/EntityTooltip.html b/Documentation/EntityTooltip.html new file mode 100644 index 0000000..f9003b7 --- /dev/null +++ b/Documentation/EntityTooltip.html @@ -0,0 +1,484 @@ + + + EntityTooltip + + + + +
+
+

Avorion Script API Documentation

+
+
+ +
+
Search:
+
+
+ + + + + + + + + + + + +
+EntityTooltip +EntityTooltip +

Properties
+entity +
+entityId +

Member Functions
+setDisplayTooltip +
+setTargeterTooltip +
+
+
+
+

EntityTooltip

+

+This object is only available on the client. +

+
+
+

+function EntityTooltip(var id)
+

+
+
+

Parameters

+
+id +The id of the entity this component belongs to, or the entity itself, must be an id of an existing entity or nil for the entity in the current script context
+
+

Returns

+
+

+A new instance of EntityTooltip +

+
+

+
+
+
+
+ +
property Entity entity[read-only]
+
+
+
+
+ +
property uuid entityId[read-only]
+
+
+
+
+
+
+

+function var setDisplayTooltip(int i, string description, string str)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var setTargeterTooltip(int i, string str)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+
+
+ Overview +
Home + Functions + Search +
+
Search:
+Predefined Functions & Example Scripts +
Command +Entity +FactionDatabase +PlanGenerator +Player +Sector +Server +UsableInventoryItem +
+
+

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

+
+ +
+ + diff --git a/Documentation/EntityTransferrer.html b/Documentation/EntityTransferrer.html new file mode 100644 index 0000000..4029bc6 --- /dev/null +++ b/Documentation/EntityTransferrer.html @@ -0,0 +1,506 @@ + + + EntityTransferrer + + + + +
+
+

Avorion Script API Documentation

+
+
+ +
+
Search:
+
+
+ + + + + + + + + + + + + + +
+EntityTransferrer +EntityTransferrer +

Properties
+entity +
+entityId +
+sectorReady +

Member Functions
+addWhitelistedFaction +
+isFactionOnWhitelist +
+removeWhitelistedFaction +
+
+
+
+

EntityTransferrer

+

+This object is only available on the server. +

+
+
+

+function EntityTransferrer(var id)
+

+
+
+

Parameters

+
+id +The id of the entity this component belongs to, or the entity itself, must be an id of an existing entity or nil for the entity in the current script context
+
+

Returns

+
+

+A new instance of EntityTransferrer +

+
+

+
+
+
+
+ +
property Entity entity[read-only]
+
+
+
+
+ +
property uuid entityId[read-only]
+
+
+
+
+ +
property bool sectorReady[read-only]
+
+
+
+
+
+
+

+function var addWhitelistedFaction(int faction)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function bool isFactionOnWhitelist(int faction)
+

+
+
+

+
+
+
+
+

+function var removeWhitelistedFaction(int faction)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+
+
+ Overview +
Home + Functions + Search +
+
Search:
+Predefined Functions & Example Scripts +
Command +Entity +FactionDatabase +PlanGenerator +Player +Sector +Server +UsableInventoryItem +
+
+

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

+
+ +
+ + diff --git a/Documentation/Enums.html b/Documentation/Enums.html new file mode 100644 index 0000000..772d3a5 --- /dev/null +++ b/Documentation/Enums.html @@ -0,0 +1,1995 @@ + + + Avorion Documentation - Enums + + + + +
+
+

Avorion Script API Documentation

+
+
+ +
+
Search:
+ +
+
+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:
+Predefined Functions & Example Scripts +
Command +Entity +FactionDatabase +PlanGenerator +Player +Sector +Server +UsableInventoryItem +
+
+

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

+
+ +
+ + diff --git a/Documentation/Faction [Client].html b/Documentation/Faction [Client].html new file mode 100644 index 0000000..58c6958 --- /dev/null +++ b/Documentation/Faction [Client].html @@ -0,0 +1,597 @@ + + + Faction [Client] + + + + +
+
+

Avorion Script API Documentation

+
+
+ +
+
Search:
+
+
+ + + + + + + + + + + + + + + + + + + + + + +
+Faction [Client] +Faction +

Properties
+alwaysAtWar +
+homeSectorUnknown +
+index +
+isAIFaction +
+isAlliance +
+isPlayer +
+name +
+translatedName +
+unformattedName +

Member Functions
+getHomeSectorCoordinates +
+getRelations +
+getRelationStatus +
+getTrait +
+getTraits +
+
+
+
+

Faction [Client]

+

+This object is only available on the client. +

+
+
+

+function Faction(var index)
+

+
+
+

Parameters

+
+index +The index of the faction
+
+

Returns

+
+

+A new instance of Faction +

+
+

+
+
+
+
+ +
property bool alwaysAtWar[read-only]
+
+
+
+
+ +
property bool homeSectorUnknown[read-only]
+
+
+
+
+ +
property int index[read-only]
+
+
+
+
+ +
property bool isAIFaction[read-only]
+
+
+
+
+ +
property bool isAlliance[read-only]
+
+
+
+
+ +
property bool isPlayer[read-only]
+
+
+
+
+ +
property string name[read-only]
+
+
+
+
+ +
property string translatedName[read-only]
+
+
+
+
+ +
property Format unformattedName[read-only]
+
+
+
+
+
+
+

+function int, int getHomeSectorCoordinates()
+

+
+
+

+
+
+
+
+

+function var getRelations(int other)
+

+
+
+

+
+
+
+
+

+function var getRelationStatus(int other)
+

+
+
+

+
+
+
+
+

+function float getTrait(string trait)
+

+
+
+

+Retrieves a trait value associated with a key +

+

Parameters

+
+trait +The name of the trait
+
+

Returns

+
+

+The trait value associated with the key +

+
+

+
+
+
+
+

+function table<string, float> getTraits()
+

+
+
+

+Retrieves all key-value trait pairs of the faction +

+

Returns

+
+

+A table containing all custom key-value pairs +

+
+

+
+
+
+
+
+
+ Overview +
Home + Functions + Search +
+
Search:
+Predefined Functions & Example Scripts +
Command +Entity +FactionDatabase +PlanGenerator +Player +Sector +Server +UsableInventoryItem +
+
+

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

+
+ +
+ + diff --git a/Documentation/Faction [Server].html b/Documentation/Faction [Server].html new file mode 100644 index 0000000..f231618 --- /dev/null +++ b/Documentation/Faction [Server].html @@ -0,0 +1,1273 @@ + + + Faction [Server] + + + + +
+
+

Avorion Script API Documentation

+
+
+ +
+
Search:
+ +
+

Faction [Server]

+

+This object is only available on the server. +

+
+
+

+function Faction(var index)
+

+
+
+

Returns

+
+

+A new instance of Faction +

+
+

+
+
+
+
+ +
property bool alwaysAtWar
+
+
+
+
+ +
property string baseName
+
+
+
+
+ +
property string fullLogId[read-only]
+
+
+
+
+ +
property bool homeSectorUnknown
+
+
+
+
+ +
property int index[read-only]
+
+
+
+
+ +
property bool infiniteResources
+
+
+
+
+ +
property int initialRelations
+
+Note: AIFactions only +
+
+
+ +
property int initialRelationsToPlayer
+
+Note: AIFactions only +
+
+
+ +
property bool isAIFaction[read-only]
+
+
+
+
+ +
property bool isAlliance[read-only]
+
+
+
+
+ +
property bool isPlayer[read-only]
+
+
+
+
+ +
property int money
+
+
+
+
+ +
property string name[read-only]
+
+
+
+
+ +
property string stateForm
+
+
+
+
+ +
property bool staticRelationsToAI
+
+
+
+
+ +
property bool staticRelationsToAll
+
+
+
+
+ +
property bool staticRelationsToPlayers
+
+
+
+
+ +
property Format unformattedName[read-only]
+
+
+
+
+
+
+

+function var addPlanStyle(string name, PlanStyle style)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function bool, string, table<int, string> canPay()
+

+
+
+

+
+
+
+
+

+function bool, string, table<int, string> canPayMoney(int money)
+

+
+
+

+
+
+
+
+

+function bool, string, table<int, string> canPayResource(Material material, int amount)
+

+
+
+

+
+
+
+
+

+function var clearValues()
+

+
+
+

+Removes all custom values of the object +

+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function Relation... getAllRelations()
+

+
+
+

+
+
+
+
+

+function int, int getHomeSectorCoordinates()
+

+
+
+

+
+
+
+
+

+function Inventory getInventory()
+

+
+
+

+
+
+
+
+

+function Language getLanguage()
+

+
+
+

+
+
+
+
+

+function PlanStyle getPlanStyle(string name)
+

+
+
+

+
+
+
+
+

+function string... getPlanStyleNames()
+

+
+
+

+
+
+
+
+

+function Relation getRelation(int otherFactionIndex)
+

+
+
+

+
+
+
+
+

+function int getRelations(int factionIndex)
+

+
+
+

+
+
+
+
+

+function int getRelationStatus(int factionIndex)
+

+
+
+

+
+
+
+
+

+function int... getResources()
+

+
+
+

+
+
+
+
+

+function float getTrait(string trait)
+

+
+
+

+Retrieves a trait value associated with a key +

+

Parameters

+
+trait +The name of the trait
+
+

Returns

+
+

+The trait value associated with the key +

+
+

+
+
+
+
+

+function table<string, float> getTraits()
+

+
+
+

+Retrieves all key-value trait pairs of the faction +

+

Returns

+
+

+A table containing all custom key-value pairs +

+
+

+
+
+
+
+

+function var getValue(string key)
+

+
+
+

+Retrieves a custom value saved in the entity with the given key +

+

Parameters

+
+key +A string that serves as the name of the value
+
+

Returns

+
+

+The value if the key exists, otherwise nil +

+
+

+
+
+
+
+

+function table<string, var> getValues()
+

+
+
+

+Retrieves all key-value pairs of custom values +

+

Returns

+
+

+A table containing all custom key-value pairs +

+
+

+
+
+
+
+

+function bool hasStaticRelationsToFaction(int factionIndex)
+

+
+
+

+
+
+
+
+

+function bool knowsFaction(int factionIndex)
+

+
+
+

+
+
+
+
+

+function var pay(string or Format [optional] description, int money, int... resources)
+

+
+
+

+Makes the faction pay a certain amount of money and resources. If the faction can't pay, the respective money and resources will be set to 0. This function accepts an optional string for Format as first argument, as an economy notification describing the transaction that will be sent to the player, in case the faction is a player.
To ease handling of transaction descriptions, the format description (if set) will receive all the remaining arguments given to the pay() function as format arguments, in the same order as they are given to the function. Dots for easier reading will be inserted as well. Examples:

faction:pay("Paid %1% Credits and %2% iron.", 50000, 250)
-> "Paid 50.000 Credits and 250 iron."

faction:pay(Format("%1% paid %2% Credits and %3% iron.", "Excelsior"), 50, 25000)
-> "Excelsior paid 50 Credits and 25.000 iron."

+

+

Parameters

+
+description +[optional] A description for the transaction. Can either be a string or a Format. If this variable is set, money and resources will be appended to the end of the list of arguments passed to the description format string.
+money +Money that will be removed from the faction
+resources +A list of resources, starting with iron, that will be removed from the faction
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var payResource(string or Format description, Material material, int amount)
+

+
+
+

+Makes the faction pay a certain amount of resources. If the faction can't pay, the respective resource will be set to 0. This function accepts a string for Format as first argument, as an economy notification describing the transaction that will be sent to the player, in case the faction is a player. +

+

Parameters

+
+description +A description for the transaction. Can either be a string or a Format.
+material +The kind of material that will be removed from the faction
+amount +Amount that will be removed from the faction
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var payWithoutNotify(string or Format description, int money, int... args)
+

+
+
+

+Similar behavior to pay(), except there will not be a notification popping up in case the faction is a player, and the description for the transaction in this function isn't optional. +

+

Parameters

+
+description +A description for the transaction. Can either be a string or a Format. Money and resources will be appended to the end of the list of arguments passed to the description format string.
+money +Money that will be removed from the faction
+args +A list of resources, starting with iron, that will be removed from the faction
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var receive(string or Format [optional] description, int money, int... resources)
+

+
+
+

+Makes the faction receive a certain amount of money and resources. This function accepts an optional string for Format as first argument, as an economy notification describing the transaction that will be sent to the player, in case the faction is a player.
To ease handling of transaction descriptions, the format description (if set) will receive all the remaining arguments given to the receive() function as format arguments, in the same order as they are given to the function. Dots for easier reading will be inserted as well. Examples:

faction:receive("Got %1% Credits and %2% iron.", 50000, 250)
-> "Got 50.000 Credits and 250 iron."

faction:receive(Format("%1% received %2% Credits and %3% iron.", "Excelsior"), 50, 25000)
-> "Excelsior received 50 Credits and 25.000 iron."

+

+

Parameters

+
+description +[optional] A description for the transaction. Can either be a string or a Format. If this variable is set, money and resources will be appended to the end of the list of arguments passed to the description format string.
+money +Money that will be given to the faction
+resources +A list of resources, starting with iron, that will be given to the faction
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var receiveResource(string or Format description, Material material, int amount)
+

+
+
+

+Makes the faction receive a certain amount of resources. This function accepts a string for Format as first argument, as an economy notification describing the transaction that will be sent to the player, in case the faction is a player. +

+

Parameters

+
+description +A description for the transaction. Can either be a string or a Format.
+material +The kind of material that will be given to the faction
+amount +Amount that will be given to the faction
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var receiveWithoutNotify(string or Format description, int money, int... args)
+

+
+
+

+Similar behavior to receive(), except there will not be a notification popping up in case the faction is a player, and the description for the transaction in this function isn't optional. +

+

Parameters

+
+description +A description for the transaction. Can either be a string or a Format. Money and resources will be appended to the end of the list of arguments passed to the description format string.
+money +Money that will be given to the faction
+args +A list of resources, starting with iron, that will be given to the faction
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var sendCallback()
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var sendChatMessage()
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var setHomeSectorCoordinates(int x, int y)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var setLanguage(Language language)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var setResources()
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var setStaticRelationsToFaction(int factionIndex, bool in)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var setTrait(string trait, float value)
+

+
+
+

+Sets a trait value associated with a key +

+

Parameters

+
+trait +The name of the trait
+value +The value of the trait, should be between -1 and 1
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var setValue(string key, var value)
+

+
+
+

+Sets a custom value +

+

Parameters

+
+key +A string that serves as the name of the value
+value +The value to save. Must be bool, number, string or nil. If nil is given, the value will be deleted.
+
+

+
+
+
+
+
+
+ Overview +
Home + Functions + Search +
+
Search:
+Predefined Functions & Example Scripts +
Command +Entity +FactionDatabase +PlanGenerator +Player +Sector +Server +UsableInventoryItem +
+
+

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

+
+ +
+ + diff --git a/Documentation/FactionDatabaseFunctions.html b/Documentation/FactionDatabaseFunctions.html new file mode 100644 index 0000000..94e8808 --- /dev/null +++ b/Documentation/FactionDatabaseFunctions.html @@ -0,0 +1,480 @@ + + + Avorion Predefined Functions - FactionDatabase + + + + +
+
+

Avorion Script API Documentation

+
+
+ +
+
Search:
+ +
+

FactionDatabase Script Predefined Functions

+
+

Tip: Scroll down for an example script!

+
+
+

+function initializePlayer(player, player->getIndex()))
+

+
+

+Called when a new player was created. Use this function to initialize the players and give them their first equipment or money.

Server Function: This function is only called on the server. +

+

Parameters

+
+player +The newly created player
+
+

+
+
+
+

+function initializeAIFaction(faction, baseName, stateForm)
+

+
+

+Called when a new AI faction was created. Use this function to initialize the factions and give them their first equipment or money.

Server Function: This function is only called on the server. +

+

Parameters

+
+faction +The newly created faction
+baseName +The new base name of the faction (nil if it should be generated)
+stateForm +The new state form of the faction (nil if it should be generated)
+
+

+
+
+
+

+function initializeAlliance(alliance, alliance->getIndex()))
+

+
+

+Called when a new alliance was created. Use this function to initialize the alliances and give them their first equipment or money.

Server Function: This function is only called on the server. +

+

Parameters

+
+alliance +The newly created alliance
+
+

+
+
+


FactionDatabase Example Script

+
+ +-- Called when a new player was created. Use this function to initialize the players and give
+-- them their first equipment or money.
+-- Server Function: This function is only called on the server.
+function initializePlayer(player, player->getIndex()))
+
+end
+
-- Called when a new AI faction was created. Use this function to initialize the factions and
+-- give them their first equipment or money.
+-- Server Function: This function is only called on the server.
+function initializeAIFaction(ScriptFaction(galaxy, faction->getIndex()), baseNameParameter, stateFormParameter)
+
+end
+
-- Called when a new alliance was created. Use this function to initialize the alliances and give
+-- them their first equipment or money.
+-- Server Function: This function is only called on the server.
+function initializeAlliance(alliance, alliance->getIndex()))
+
+end
+ +
+
+
+
+
+
+ Overview +
Home + Functions + Search +
+
Search:
+Predefined Functions & Example Scripts +
Command +Entity +FactionDatabase +PlanGenerator +Player +Sector +Server +UsableInventoryItem +
+
+

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

+
+ +
+ + diff --git a/Documentation/FighterAI.html b/Documentation/FighterAI.html new file mode 100644 index 0000000..8f3c13d --- /dev/null +++ b/Documentation/FighterAI.html @@ -0,0 +1,594 @@ + + + FighterAI + + + + +
+
+

Avorion Script API Documentation

+
+
+ +
+
Search:
+
+
+ + + + + + + + + + + + + + + + + + + + + + + +
+FighterAI +FighterAI +

Properties
+circling +
+clearFeedbackEachTick +
+entity +
+entityId +
+evading +
+ignoreMothershipOrders +
+mothershipId +
+orders +
+reachedTarget +
+squad +
+target +

Member Functions
+clearFeedback +
+getMothership +
+setOrders +
+setSquad +
+
+
+
+

FighterAI

+
+
+

+function FighterAI(var id)
+

+
+
+

Parameters

+
+id +The id of the entity this component belongs to, or the entity itself, must be an id of an existing entity or nil for the entity in the current script context
+
+

Returns

+
+

+A new instance of FighterAI +

+
+

+
+
+
+
+ +
property bool circling[read-only]
+
+
+
+
+ +
property bool clearFeedbackEachTick
+
+
+
+
+ +
property Entity entity[read-only]
+
+
+
+
+ +
property uuid entityId[read-only]
+
+
+
+
+ +
property bool evading[read-only]
+
+
+
+
+ +
property bool ignoreMothershipOrders
+
+
+
+
+ +
property Uuid mothershipId[read-only]
+
+
+
+
+ +
property FighterOrders orders[read-only]
+
+
+
+
+ +
property bool reachedTarget[read-only]
+
+
+
+
+ +
property unsigned int squad[read-only]
+
+
+
+
+ +
property uuid target[read-only]
+
+
+
+
+
+
+

+function var clearFeedback()
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function Entity getMothership()
+

+
+
+

+
+
+
+
+

+function var setOrders(FighterOrders orders, Uuid target)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var setSquad(int squadIndex, Uuid squadId)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+
+
+ Overview +
Home + Functions + Search +
+
Search:
+Predefined Functions & Example Scripts +
Command +Entity +FactionDatabase +PlanGenerator +Player +Sector +Server +UsableInventoryItem +
+
+

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

+
+ +
+ + diff --git a/Documentation/FighterController.html b/Documentation/FighterController.html new file mode 100644 index 0000000..eae4900 --- /dev/null +++ b/Documentation/FighterController.html @@ -0,0 +1,557 @@ + + + FighterController + + + + +
+
+

Avorion Script API Documentation

+
+
+ +
+
Search:
+ +
+

FighterController

+

+This object is only available on the server. +

+
+
+

+function FighterController(var id)
+

+
+
+

Parameters

+
+id +The id of the entity this component belongs to, or the entity itself, must be an id of an existing entity or nil for the entity in the current script context
+
+

Returns

+
+

+A new instance of FighterController +

+
+

+
+
+
+
+ +
property Entity entity[read-only]
+
+
+
+
+ +
property uuid entityId[read-only]
+
+
+
+
+
+
+

+function Entity... getDeployedFighters(var squad)
+

+
+
+

+
+
+
+
+

+function var getFighterStartError(unsigned int squadIndex, var fighterIndex)
+

+
+
+

+
+
+
+
+

+function FighterTemplate getFighterStatsOfType(FighterType type)
+

+
+
+

+Returns a lightweight copy of the first fighter found of the type (ie. the next fighter that would be started when startFighterOfType() would be called). Lightweight copy means the FighterTemplate without the plan. +

+

Parameters

+
+type +The type of fighter
+
+

Returns

+
+

+A copy of the first fighter found to match the type, without plan +

+
+

+
+
+
+
+

+function var getFighterTypeStartError(FighterType type)
+

+
+
+

+
+
+
+
+

+function var setSquadOrders(unsigned int squad, FighterOrders orders, Uuid targetId)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function Entity, int startFighter(unsigned int squadIndex, var fighterIndex)
+

+
+
+

+
+
+
+
+

+function Entity, int startFighterOfType(FighterType type)
+

+
+
+

+
+
+
+
+
+
+ Overview +
Home + Functions + Search +
+
Search:
+Predefined Functions & Example Scripts +
Command +Entity +FactionDatabase +PlanGenerator +Player +Sector +Server +UsableInventoryItem +
+
+

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

+
+ +
+ + diff --git a/Documentation/FighterTemplate.html b/Documentation/FighterTemplate.html new file mode 100644 index 0000000..104cee6 --- /dev/null +++ b/Documentation/FighterTemplate.html @@ -0,0 +1,1208 @@ + + + FighterTemplate + + + + +
+
+

Avorion Script API Documentation

+
+
+ +
+
Search:
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+FighterTemplate +FighterTemplate +

Properties
+accuracy +
+armed +
+averageTech +
+baseEnergyPerSecond +
+bestEfficiency +
+category +
+categoryIcon +
+categoryName +
+civil +
+continuousBeam +
+coolingRate +
+coolingTime +
+coolingType +
+damage +
+damageType +
+deathExplosion +
+diameter +
+dps +
+durability +
+energyIncreasePerSecond +
+fireRate +
+firing +
+firingsPerSecond +
+flavorText +
+heat +
+heatPerShot +
+holdingForce +
+hullDamageMultiplicator +
+hullDamageMultiplier +
+hullRepairRate +
+material +
+maxFighterDiameter +
+maxHeat +
+maxTech +
+maxVelocity +
+metalBestEfficiency +
+metalRawEfficiency +
+metalRefinedEfficiency +
+minFighterDiameter +
+numVisibleWeapons +
+numWeapons +
+otherForce +
+overheated +
+plan +
+rarity +
+reach +
+requiredShootingEnergy +
+seeker +
+selfForce +
+shield +
+shieldDamageMultiplicator +
+shieldDamageMultiplier +
+shieldPenetration +
+shieldRepairRate +
+shootingTime +
+shotSpeed +
+shotsPerFiring +
+shotsPerSecond +
+shotsUntilOverheated +
+simultaneousShooting +
+slots +
+stoneBestEfficiency +
+stoneDamageMultiplicator +
+stoneDamageMultiplier +
+stoneRawEfficiency +
+stoneRefinedEfficiency +
+turningSpeed +
+type +
+volume +
+weaponIcon +
+weaponName +
+weaponPrefix +

Member Functions
+addDescription +
+addWeapon +
+clearDescriptions +
+clearWeapons +
+getDescriptions +
+getWeapons +
+makeDescriptor +
+updateStaticStats +
+
+
+
+

FighterTemplate

+
+
+

+function FighterTemplate()
+

+
+
+

+This is the default constructor of FighterTemplate. No further arguments are required. +

+

Returns

+
+

+A new instance of FighterTemplate +

+
+

+
+
+
+
+ +
property float accuracy[read-only]
+
+
+
+
+ +
property bool armed[read-only]
+
+
+
+
+ +
property int averageTech[read-only]
+
+
+
+
+ +
property float baseEnergyPerSecond
+
+
+
+
+ +
property float bestEfficiency[read-only]
+
+
+
+
+ +
property WeaponCategory category[read-only]
+
+
+
+
+ +
property static std::string categoryIcon[read-only]
+
+
+
+
+ +
property static std::string categoryName[read-only]
+
+
+
+
+ +
property bool civil[read-only]
+
+
+
+
+ +
property bool continuousBeam[read-only]
+
+
+
+
+ +
property float coolingRate
+
+
+
+
+ +
property float coolingTime[read-only]
+
+
+
+
+ +
property int coolingType
+
+
+
+
+ +
property float damage[read-only]
+
+
+
+
+ +
property int damageType[read-only]
+
+
+
+
+ +
property bool deathExplosion[read-only]
+
+
+
+
+ +
property float diameter
+
+
+
+
+ +
property float dps[read-only]
+
+
+
+
+ +
property float durability
+
+
+
+
+ +
property float energyIncreasePerSecond
+
+
+
+
+ +
property float fireRate[read-only]
+
+
+
+
+ +
property bool firing
+
+
+
+
+ +
property float firingsPerSecond[read-only]
+
+
+
+
+ +
property var flavorText[read-only]
+
+
+
+
+ +
property float heat[read-only]
+
+
+
+
+ +
property float heatPerShot
+
+
+
+
+ +
property float holdingForce[read-only]
+
+
+
+
+ +
property float hullDamageMultiplicator[read-only]
+
+
+
+
+ +
property float hullDamageMultiplier[read-only]
+
+
+
+
+ +
property float hullRepairRate[read-only]
+
+
+
+
+ +
property Material material[read-only]
+
+
+
+
+ +
property static float maxFighterDiameter[read-only]
+
+
+
+
+ +
property float maxHeat
+
+
+
+
+ +
property int maxTech[read-only]
+
+
+
+
+ +
property float maxVelocity
+
+
+
+
+ +
property float metalBestEfficiency[read-only]
+
+
+
+
+ +
property float metalRawEfficiency[read-only]
+
+
+
+
+ +
property float metalRefinedEfficiency[read-only]
+
+
+
+
+ +
property static float minFighterDiameter[read-only]
+
+
+
+
+ +
property int numVisibleWeapons[read-only]
+
+
+
+
+ +
property int numWeapons[read-only]
+
+
+
+
+ +
property float otherForce[read-only]
+
+
+
+
+ +
property bool overheated[read-only]
+
+
+
+
+ +
property BlockPlan plan
+
+
+
+
+ +
property Rarity rarity[read-only]
+
+
+
+
+ +
property float reach[read-only]
+
+
+
+
+ +
property double requiredShootingEnergy[read-only]
+
+
+
+
+ +
property bool seeker[read-only]
+
+
+
+
+ +
property float selfForce[read-only]
+
+
+
+
+ +
property float shield
+
+
+
+
+ +
property float shieldDamageMultiplicator[read-only]
+
+
+
+
+ +
property float shieldDamageMultiplier[read-only]
+
+
+
+
+ +
property float shieldPenetration[read-only]
+
+
+
+
+ +
property float shieldRepairRate[read-only]
+
+
+
+
+ +
property float shootingTime[read-only]
+
+
+
+
+ +
property float shotSpeed[read-only]
+
+
+
+
+ +
property int shotsPerFiring[read-only]
+
+
+
+
+ +
property float shotsPerSecond[read-only]
+
+
+
+
+ +
property int shotsUntilOverheated[read-only]
+
+
+
+
+ +
property bool simultaneousShooting
+
+
+
+
+ +
property int slots[read-only]
+
+
+
+
+ +
property float stoneBestEfficiency[read-only]
+
+
+
+
+ +
property float stoneDamageMultiplicator[read-only]
+
+
+
+
+ +
property float stoneDamageMultiplier[read-only]
+
+
+
+
+ +
property float stoneRawEfficiency[read-only]
+
+
+
+
+ +
property float stoneRefinedEfficiency[read-only]
+
+
+
+
+ +
property float turningSpeed
+
+
+
+
+ +
property FighterType type
+
+
+
+
+ +
property float volume[read-only]
+
+
+
+
+ +
property string weaponIcon[read-only]
+
+
+
+
+ +
property string weaponName[read-only]
+
+
+
+
+ +
property string weaponPrefix[read-only]
+
+
+
+
+
+
+

+function var addDescription(string str, string value)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var addWeapon(var weapon)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var clearDescriptions()
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var clearWeapons()
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function table<string, string> getDescriptions()
+

+
+
+

+
+
+
+
+

+function Weapon... getWeapons()
+

+
+
+

+Returns all weapons of the object +

+

+
+
+
+
+

+function EntityDescriptor makeDescriptor()
+

+
+
+

+
+
+
+
+

+function var updateStaticStats()
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+
+
+ Overview +
Home + Functions + Search +
+
Search:
+Predefined Functions & Example Scripts +
Command +Entity +FactionDatabase +PlanGenerator +Player +Sector +Server +UsableInventoryItem +
+
+

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

+
+ +
+ + diff --git a/Documentation/Format.html b/Documentation/Format.html new file mode 100644 index 0000000..3d0890c --- /dev/null +++ b/Documentation/Format.html @@ -0,0 +1,515 @@ + + + Format + + + + +
+
+

Avorion Script API Documentation

+
+
+ +
+
Search:
+
+
+ + + + + + + + + + + + + + + +
+Format +Format +

Properties
+empty +
+text +

Member Functions
+add +
+clear +
+evaluate +
+getArguments +
+translated +
+
+
+
+

Format

+
+
+

+function Format(string text, PluralForm... args)
+

+
+
+

Returns

+
+

+A new instance of Format +

+
+

+
+
+
+
+ +
property bool empty[read-only]
+
+
+
+
+ +
property string text[read-only]
+
+
+
+
+
+
+

+function var add()
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var clear()
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function string evaluate()
+

+
+
+

+
+
+
+
+

+function PluralForm... getArguments()
+

+
+
+

+
+
+
+
+

+function string translated()
+

+
+
+

+
+
+
+
+
+
+ Overview +
Home + Functions + Search +
+
Search:
+Predefined Functions & Example Scripts +
Command +Entity +FactionDatabase +PlanGenerator +Player +Sector +Server +UsableInventoryItem +
+
+

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

+
+ +
+ + diff --git a/Documentation/Frame.html b/Documentation/Frame.html new file mode 100644 index 0000000..1573de7 --- /dev/null +++ b/Documentation/Frame.html @@ -0,0 +1,663 @@ + + + Frame + + + + +
+
+

Avorion Script API Documentation

+
+
+ +
+
Search:
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Frame +Frame +

Properties
+backgroundColor +
+catchAllMouseInput +
+center +
+height +
+index +
+layer +
+localCenter +
+localPosition +
+localRect +
+lower +
+mouseOver +
+position +
+rect +
+size +
+tooltip +
+tooltipWidth +
+upper +
+visible +
+width +

Member Functions
+hide +
+isMouseOverAndUnobscured +
+show +
+
+
+
+

Frame : UIElement

+

+This object is only available on the client. +

+
+
+

+function Frame(int index)
+

+
+
+

Returns

+
+

+A new instance of Frame +

+
+

+
+
+
+
+ +
property Color backgroundColor[write-only]
+
+
+
+
+ +
property bool catchAllMouseInput
+
+
+
+
+ +
property vec2 center
+
+
+
+
+ +
property float height
+
+
+
+
+ +
property int index[read-only]
+
+
+
+
+ +
property int layer
+
+
+
+
+ +
property vec2 localCenter[read-only]
+
+
+
+
+ +
property vec2 localPosition[read-only]
+
+
+
+
+ +
property Rect localRect[read-only]
+
+
+
+
+ +
property vec2 lower
+
+
+
+
+ +
property bool mouseOver[read-only]
+
+
+
+
+ +
property vec2 position
+
+
+
+
+ +
property Rect rect
+
+
+
+
+ +
property vec2 size
+
+
+
+
+ +
property var tooltip
+
+
+
+
+ +
property int tooltipWidth[write-only]
+
+
+
+
+ +
property vec2 upper
+
+
+
+
+ +
property bool visible
+
+
+
+
+ +
property float width
+
+
+
+
+
+
+

+function var hide()
+

+
+
+

+Inherited from UIElement + +

+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function bool isMouseOverAndUnobscured()
+

+
+
+

+Inherited from UIElement + +

+

+
+
+
+
+

+function var show()
+

+
+
+

+Inherited from UIElement + +

+

Returns

+
+

+nothing +

+
+

+
+
+
+
+
+
+ Overview +
Home + Functions + Search +
+
Search:
+Predefined Functions & Example Scripts +
Command +Entity +FactionDatabase +PlanGenerator +Player +Sector +Server +UsableInventoryItem +
+
+

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

+
+ +
+ + diff --git a/Documentation/Functions.html b/Documentation/Functions.html new file mode 100644 index 0000000..e745f75 --- /dev/null +++ b/Documentation/Functions.html @@ -0,0 +1,3971 @@ + + + Functions + + + + +
+
+

Avorion Script API Documentation

+
+
+ +
+
Search:
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Functions

+addCountdownBar +
+addSectorProblem +
+addShipProblem +
+appTime +
+appTimeMs +
+AsteroidDescriptor +
+async +
+async +
+async +
+asyncf +
+asyncf +
+asyncf +
+broadcastInvokeClientFunction +
+calculateJumpPath +
+canBoard +
+canBuildAdvancedBlocksInCurrentEnvironment +
+canBuildInCurrentEnvironment +
+canRepairInCurrentEnvironment +
+CargoLootDescriptor +
+checkReadSecureFilename +
+checkWriteSecureFilename +
+ColorARGB +
+ColorHSV +
+ColorInt +
+ColorNone +
+ColorPalette +
+ColorRGB +
+copy +
+createDirectory +
+createMonetaryString +
+CreateTemplateFromTurret +
+credits +
+CrewLootDescriptor +
+cross +
+deferredCallback +
+deleteFile +
+displayChatMessage +
+displayMissionAccomplishedText +
+displaySpeechBubble +
+distance +
+distance2 +
+dot +
+drawBorder +
+drawDebugBox +
+drawDebugLine +
+drawDebugSphere +
+drawFighterTooltip +
+drawRect +
+drawText +
+drawTextRect +
+drawTurretTooltip +
+DroneDescriptor +
+eprint +
+FighterDescriptor +
+GameSeed +
+GameVersion +
+GeneratePlanFromStyle +
+getColorPalette +
+getCurrentLanguage +
+getGlobal +
+getLanguage +
+GetLocalizedString +
+getParentEntity +
+getParentFaction +
+getParentFaction +
+getPlayerCraft +
+getReadableValue +
+getResolution +
+getSavedShips +
+getScriptPath +
+getSessionId +
+getTrackedMissionScriptIndex +
+getWorkshopShips +
+HighestRarity +
+InventoryItemLootDescriptor +
+invokeAllianceFunction +
+invokeClientFunction +
+invokeEntityFunction +
+invokeEntityFunction +
+invokeFactionFunction +
+invokeSectorFunction +
+invokeSectorFunction +
+invokeServerFunction +
+isAllianceScript +
+isBehemothDLCInstalled +
+isBlackMarketDLCInstalled +
+isEntityScript +
+isGalaxyScript +
+isIntoTheRiftDLCInstalled +
+isPlayerScript +
+isSectorScript +
+IsValidMaterial +
+keycodeFromScancode +
+length +
+length2 +
+listFilesOfDirectory +
+loadInternalData +
+LoadPlanFromFile +
+LoadPlanFromString +
+LoadTurretDesignFromFile +
+lookAt +
+LowestRarity +
+makeFastHash +
+makeHash +
+makeHash64 +
+MatrixLookUp +
+MatrixLookUpPosition +
+MatrixLookUpRight +
+MatrixYawPitchRoll +
+Mods +
+MoneyLootDescriptor +
+normalize +
+normalize_ip +
+NumMaterials +
+onClient +
+onClient +
+onClient +
+onServer +
+onServer +
+onServer +
+ownsBehemothDLC +
+ownsBlackMarketDLC +
+ownsIntoTheRiftDLC +
+perspective +
+play3DSound +
+playSound +
+plural_t +
+plural_with_context_t +
+print +
+printlog +
+projectPoint +
+registerBoss +
+removeCountdownBar +
+removeDirectory +
+removeSectorProblem +
+removeShipProblem +
+reportError +
+ResourceLootDescriptor +
+rotate +
+run +
+run +
+runEntityCode +
+runFactionCode +
+runSectorCode +
+scale +
+scancodeFromKeycode +
+scriptPath +
+SectorSeed +
+SeedStr +
+serializable +
+setBossBarTitle +
+setBossHealth +
+setBossHealthColor +
+setCountdownPriority +
+setGlobal +
+setTrackedMission +
+setTrackThisMission +
+ShipDescriptor +
+sleep +
+StationDescriptor +
+SystemUpgradeLootDescriptor +
+terminate +
+TorpedoDescriptor +
+translate +
+trim +
+TurretDescriptor +
+TurretLootDescriptor +
+unregisterBoss +
+valid +
+WormholeDescriptor +
+WreckageDescriptor +
+wreckify +
+writeTrace +
+
+
+
+

Global Functions

+
+
+

+function Uuid addCountdownBar(float countdownTime, string text, var priority)
+

+
+
+

+This function is only available on the client. +

+

+
+
+
+
+

+function var addSectorProblem(string type, string text, string icon, var color, var withHighlight)
+

+
+
+

+This function is only available on the client. +

+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var addShipProblem(string type, Uuid uuid, string text, string icon, var color, var withHighlight)
+

+
+
+

+This function is only available on the client. +

+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function double appTime()
+

+
+
+

+Returns the system time in seconds. Since lua doesn't support clocks that are accurate down to milliseconds. +

+

Returns

+
+

+The system time in seconds +

+
+

+
+
+
+
+

+function double appTimeMs()
+

+
+
+

+Returns the system time in milliseconds. Since lua doesn't support clocks that are accurate down to milliseconds. +

+

Returns

+
+

+The system time in milliseconds +

+
+

+
+
+
+
+

+function EntityDescriptor AsteroidDescriptor()
+

+
+
+

+
+
+
+
+

+function var async(string callbackFunction, string code, var... arguments)
+

+
+
+

+Starts an asynchronous call that will be executed in a separate thread. Once finished, the given callback function will be called with the values returned by the run() function, which is required to be in the code to run. During the running of this function, only server, galaxy, players and factions can be accessed, other objects like sector and entities can't be accessed. The amount of threads in the thread pool responsible for running these async calls can be configured in the server.ini file.

This function is only available on the server. +

+

Parameters

+
+callbackFunction +The function in the current script that will be called once the asynchronous execution is finished
+code +The code that will be executed. Has to contain a function run(...). The run() function will be given the arguments that are passed after this parameter.
+arguments +The arguments that will be passed to the run() function
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var async(string callbackFunction, string code, var... arguments)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var async(string callbackFunction, string code, var... arguments)
+

+
+
+

+Starts an async call that will be executed in a separate thread. Once finished, the given callback function will be called with the values returned by the run() function, which is required to be in the code to run. During the running of this function, only players and factions can be accessed, other objects like sector and entities can't be accessed.

This function is only available on the client. +

+

Parameters

+
+callbackFunction +The function in the current script that will be called once the asynchronous execution is finished
+code +The code that will be executed. Has to contain a function run(...). The run() function will be given the arguments that are passed after this parameter.
+arguments +The arguments that will be passed to the run() function.
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var asyncf(string callbackFunction, string fileName, var... arguments)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var asyncf(string callbackFunction, string file, var... arguments)
+

+
+
+

+Starts an asynchronous call that will be executed in a separate thread. Once finished, the given callback function will be called with the values returned by the run() function, which is required to be in the code to run. During the running of this function, only server, galaxy, players and factions can be accessed, other objects like sector and entities can't be accessed. The amount of threads in the thread pool responsible for running these async calls can be configured in the server.ini file.

This function is only available on the server. +

+

Parameters

+
+callbackFunction +The function in the current script that will be called once the asynchronous execution is finished
+file +The file that will be executed. Path must be in format "data/scripts/path/to/file.lua". Will also files added or extended by mods. The file must contain a function run(...). The run() function will be given the arguments that are passed after this parameter.
+arguments +The arguments that will be passed to the run() function
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var asyncf(string callbackFunction, string file, var... arguments)
+

+
+
+

+Starts an async call that will be executed in a separate thread. Once finished, the given callback function will be called with the values returned by the run() function, which is required to be in the code to run. During the running of this function, only players and factions can be accessed, other objects like sector and entities can't be accessed.

This function is only available on the client. +

+

Parameters

+
+callbackFunction +The function in the current script that will be called once the asynchronous execution is finished
+file +The file that will be executed. Path must be in format "data/scripts/path/to/file.lua". Will also files added or extended by mods. The file must contain a function run(...). The run() function will be given the arguments that are passed after this parameter.
+arguments +The arguments that will be passed to the run() function.
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var broadcastInvokeClientFunction(string functionName, var... arguments)
+

+
+
+

+Invokes a function on *all* remote clients, in the client instances of the caller script. Return values of the remotely executed functions cannot be retrieved.

This function is only available on the server. +

+

Parameters

+
+functionName +The name of the scripting function that is to be executed
+arguments +An arbitrary number of arguments that will be given to the remote function
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function table_t calculateJumpPath(Player [or nil] player, Alliance [or nil] alliance, vec2 origin, vec2 destination, float jumpRange, bool canPassRifts)
+

+
+
+

+Calculates a jump path on the galaxy map. ATTENTION: this might take a while, depending on the distance and rifts

This function is only available on the server. +

+

Parameters

+
+player +The player whose knowledge of gates is used (or nil)
+alliance +The alliance whose knowledge of gates is used (or nil)
+origin +The origin of the calculation
+destination +The desired target (may lie in a rift)
+jumpRange +How far the ship can jump
+canPassRifts +true if the ship can jump across rifts, false otherwise
+
+

+
+
+
+
+

+function bool, var canBoard(Entity ship)
+

+
+
+

+
+
+
+
+

+function bool canBuildAdvancedBlocksInCurrentEnvironment(Entity ship)
+

+
+
+

+Checks if, everything considered, advanced blocks can be built on a ship in its current situation. +

+

Parameters

+
+ship +The ship that should be modified
+
+

Returns

+
+

+A bool holding the result +

+
+

+
+
+
+
+

+function gut::BuildError canBuildInCurrentEnvironment(Entity ship)
+

+
+
+

+Checks if, everything considered, a ship can be modified by building in its current situation. +

+

Parameters

+
+ship +The ship that should be modified
+
+

Returns

+
+

+a BuildError enum value holding the result +

+
+

+
+
+
+
+

+function gut::BuildError canRepairInCurrentEnvironment(Entity ship)
+

+
+
+

+Checks if, everything considered, a ship can be repaired in its current situation. +

+

Parameters

+
+ship +The ship that should be repaired
+
+

Returns

+
+

+a BuildError enum value holding the result +

+
+

+
+
+
+
+

+function EntityDescriptor CargoLootDescriptor()
+

+
+
+

+
+
+
+
+

+function bool checkReadSecureFilename(string )
+

+
+
+

+
+
+
+
+

+function bool checkWriteSecureFilename(string )
+

+
+
+

+
+
+
+
+

+function Color ColorARGB(float a, float r, float g, float b)
+

+
+
+

+
+
+
+
+

+function Color ColorHSV(float h, float s, float v)
+

+
+
+

+
+
+
+
+

+function Color ColorInt(int i)
+

+
+
+

+
+
+
+
+

+function Color ColorNone()
+

+
+
+

+
+
+
+
+

+function Color... ColorPalette()
+

+
+
+

+
+
+
+
+

+function Color ColorRGB(float r, float g, float b)
+

+
+
+

+
+
+
+
+

+function UserObject copy(var value)
+

+
+
+

+Copies the given Object +

+

Parameters

+
+value +A non-POD, non-table object
+
+

Returns

+
+

+A true copy of the given object +

+
+

+
+
+
+
+

+function var createDirectory(string directory)
+

+
+
+

+Creates a new directory, including all required parent directories. Security-specific behavior: Creating directories is only possible in the moddata/ subdirectory of the Avorion settings folder. +

+

Parameters

+
+directory +Path to the directory to create
+
+

Returns

+
+

+A system error code indicating if the operation was successful +

+
+

+
+
+
+
+

+function string createMonetaryString(double number)
+

+
+
+

+Inserts dots into a large number to create an easily human readable money string. Example: 10000000 will become 10.000.000 +

+

Parameters

+
+number +The large number
+
+

Returns

+
+

+A string containing the readable number +

+
+

+
+
+
+
+

+function TurretTemplate CreateTemplateFromTurret(Entity turret)
+

+
+
+

+
+
+
+
+

+function string credits()
+

+
+
+

+
+
+
+
+

+function EntityDescriptor CrewLootDescriptor()
+

+
+
+

+
+
+
+
+

+function var cross(var a, var b)
+

+
+
+

+Calculates the dot product between two vec3s. The vectors must have the same underlying type (double or float). +

+

Parameters

+
+a +vector a
+b +vector b
+
+

Returns

+
+

+The cross product of the vectors +

+
+

+
+
+
+
+

+function bool deferredCallback(double time, string function, var... args)
+

+
+
+

+Registers a deferred callback in the script. The given function will be executed after the given time. Depending on the tick rate of the simulation, the callback might get called slightly later than the given time. The callback will never happen before the given time hasn't passed. +

+

Parameters

+
+time +The time in seconds to wait until the callback will be executed
+function +The function that is to be executed once the time has passed as a string
+args... +Arguments that will be passed to the callback function. Only non-user objects are supported. vec234 objects and uuids will be converted to tables/strings
+
+

Returns

+
+

+true if the callback was registered, false otherwise +

+
+

+
+
+
+
+

+function var deleteFile(string file)
+

+
+
+

+Deletes a file. Error codes behave the same way as rmdir(). Security-specific behavior: Removing files is only possible in the moddata/ subdirectory of the Avorion settings folder. +

+

Parameters

+
+file +Path to the file to delete
+
+

Returns

+
+

+A system error code indicating if the operation was successful +

+
+

+
+
+
+
+

+function var displayChatMessage(string message, string sender, int type)
+

+
+
+

+This function displays a chat message on the Chat window of the client.

This function is only available on the client. +

+

Parameters

+
+message +The message that will be displayed in the chat window
+sender +The sender that will be displayed for the chat message
+type +The type of chat message, 0 = Normal, 1 = Error, 2 = Warning, 3 = Info
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var displayMissionAccomplishedText(string bigText, string smallText)
+

+
+
+

+This function is only available on the client. +

+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var displaySpeechBubble(Entity entity, string text)
+

+
+
+

+This function displays a speech bubble next to the given entity. If text is too long then it will be shortened and a "..." will be added.

This function is only available on the client. +

+

Parameters

+
+entity +The entity next to which the speech bubble should appear
+text +The text that will be displayed in the speech bubble
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var distance(var a, var b)
+

+
+
+

+Calculates the linear distance between two vectors. The vectors must have the same type. +

+

Parameters

+
+a +vector a
+b +vector b
+
+

Returns

+
+

+The linear distance between the vectors +

+
+

+
+
+
+
+

+function var distance2(var a, var b)
+

+
+
+

+Calculates the squared linear distance between two vectors. The vectors must have the same type. +

+

Parameters

+
+a +vector a
+b +vector b
+
+

Returns

+
+

+The squared linear distance between the vectors +

+
+

+
+
+
+
+

+function var dot(var a, var b)
+

+
+
+

+Calculates the dot product between 2 vectors. The vectors must have the same type. +

+

Parameters

+
+a +vector a
+b +vector b
+
+

Returns

+
+

+The dot product between the two vectors +

+
+

+
+
+
+
+

+function var drawBorder(Rect rect, Color color)
+

+
+
+

+Draw a border. This function should only be called in valid rendering steps. This function is expensive, don't overuse it.

This function is only available on the client. +

+

Parameters

+
+rect +The rect that is to be drawn
+color +The color of the rect
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var drawDebugBox(Box box, Matrix matrix, Color color)
+

+
+
+

+This function is only available on the client. +

+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var drawDebugLine(vec3 a, vec3 b, Color color)
+

+
+
+

+This function is only available on the client. +

+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var drawDebugSphere(Sphere sphere, Color color)
+

+
+
+

+This function is only available on the client. +

+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var drawFighterTooltip(FighterTemplate fighter)
+

+
+
+

+This function is only available on the client. +

+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var drawRect(Rect rect, Color color)
+

+
+
+

+Draw a rect. This function should only be called in valid rendering steps. This function is expensive, don't overuse it.

This function is only available on the client. +

+

Parameters

+
+rect +The rect that is to be drawn
+color +The color of the rect
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var drawText(string text, int px, int py, Color color, int size, int bold, int italic, int style)
+

+
+
+

+Draw text. This function should only be called in valid rendering steps. This function is expensive, don't overuse it.

This function is only available on the client. +

+

Parameters

+
+text +The text that is to be rendered
+px +The x value in pixels of the position, ie. upper left
+py +The y value in pixels of the position, ie. upper left
+color +The color of the text
+size +The font size of the rendered text
+bold +Use 1 if the text should be bold, 0 otherwise
+italic +Use 1 if the text should be italic, 0 otherwise
+style +The style of the text, 0 is default style, 1 is shadowed, 2 is outlined
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var drawTextRect(string text, Rect rect, int horizontalAlignment, int verticalAlignment, Color color, int size, int bold, int italic, int style)
+

+
+
+

+Draw text inside a rect. This function should only be called in valid rendering steps. This function is expensive, don't overuse it.

This function is only available on the client. +

+

Parameters

+
+text +The text that is to be rendered
+rect +The rect that functions as boundaries for the text
+horizontalAlignment +-1 to position the text at the left, 0 to center it horizontally, +1 to position the text at the right
+verticalAlignment +-1 to position the text at the top, 0 to center it vertically, +1 to position the text at the bottom
+color +The color of the text, as an int
+size +The font size of the rendered text
+bold +Use 1 if the text should be bold, 0 otherwise
+italic +Use 1 if the text should be italic, 0 otherwise
+style +The style of the text, 0 is default style, 1 is shadowed, 2 is outlined
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var drawTurretTooltip(TurretTemplate turret)
+

+
+
+

+This function is only available on the client. +

+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function EntityDescriptor DroneDescriptor()
+

+
+
+

+
+
+
+
+

+function var eprint(var... args)
+

+
+
+

+Prints errors to the console. In the ingame console, server output will be printed in magenta, client output will be printed in darkish red. +

+

Parameters

+
+args +Any number of arguments. The first value can be a format string. If no formatting can be done then the function falls back to printing all given values.
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function EntityDescriptor FighterDescriptor()
+

+
+
+

+
+
+
+
+

+function Seed GameSeed()
+

+
+
+

+
+
+
+
+

+function Version GameVersion()
+

+
+
+

+
+
+
+
+

+function BlockPlan GeneratePlanFromStyle(PlanStyle style, Seed seed, float volume, int maxBlocks, var scaleToFit, Material material)
+

+
+
+

+
+
+
+
+

+function static std::map getColorPalette()
+

+
+
+

+
+
+
+
+

+function string getCurrentLanguage()
+

+
+
+

+Returns the current language code.

This function is only available on the client. +

+

Returns

+
+

+The language code, e.g. "en", "de", "ru", etc. +

+
+

+
+
+
+
+

+function var getGlobal(string name)
+

+
+
+

+Retrieves a global variable. These variables are shared over the entire process. +

+

Parameters

+
+name +The name of the global variable
+
+

Returns

+
+

+The queried variable, or nil if non-existant +

+
+

+
+
+
+
+

+function string getLanguage()
+

+
+
+

+
+
+
+
+

+function string GetLocalizedString(string singular)
+

+
+
+

Parameters

+
+singular +The english string
+
+

Returns

+
+

+The translated string, or, if no translation exists, the english string, with comment removed +

+
+

+
+
+
+
+

+function Entity getParentEntity()
+

+
+
+

+
+
+
+
+

+function UserObject getParentFaction()
+

+
+
+

+This function is only available on the server. +

+

+
+
+
+
+

+function UserObject getParentFaction()
+

+
+
+

+This function is only available on the client. +

+

+
+
+
+
+

+function Entity getPlayerCraft()
+

+
+
+

+This function is only available on the client. +

+

+
+
+
+
+

+function double, string getReadableValue(double number)
+

+
+
+

+Rounds a large number and adds a suffix such as k or M. For example, 10.000 will become 10k. +

+

Parameters

+
+number +The number to make readable
+
+

Returns

+
+

+A string containing the rounded number and the suffix +

+
+

+
+
+
+
+

+function vec2 getResolution()
+

+
+
+

+This function is only available on the client. +

+

+
+
+
+
+

+function string... getSavedShips()
+

+
+
+

+This function is only available on the client. +

+

+
+
+
+
+

+function string getScriptPath()
+

+
+
+

+Returns the exact path of the top-level script file that this function is called from. If the script has been required by other scripts, it will return the path that was given to, for example, the function Entity():addScript(path, args...). This function can be used to determine the script path that has to be used by, for example, calls to Entity():invokeFunction(script, args...) +

+

Returns

+
+

+A string containing the path to the top-level script file +

+
+

+
+
+
+
+

+function uuid getSessionId()
+

+
+
+

+This function is only available on the client. +

+

+
+
+
+
+

+function var getTrackedMissionScriptIndex()
+

+
+
+

+Get the script index of the currently tracked mission

This function is only available on the client. +

+

Returns

+
+

+The int index of the tracked mission script or nil +

+
+

+
+
+
+
+

+function string... getWorkshopShips()
+

+
+
+

+This function is only available on the client. +

+

+
+
+
+
+

+function Rarity HighestRarity()
+

+
+
+

+
+
+
+
+

+function EntityDescriptor InventoryItemLootDescriptor()
+

+
+
+

+
+
+
+
+

+function var invokeAllianceFunction(string scriptName, string functionName, var... arguments)
+

+
+
+

+Invokes a function on the server on the alliance of the player, during its update step. Return values of the remotely executed function cannot be retrieved. The player must be in an alliance for this call to succeed. Due to technical, multithreading-related restrictions, there is no way to check at the time of the call, if the target script or function exists in the sector. If it doesn't this call will silently fail.

This function is only available on the client. +

+

Parameters

+
+scriptName +The name of the called script
+functionName +The name of the called function
+arguments +The arguments that will be passed to the function.
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var invokeClientFunction(Player player, string functionName, var... arguments)
+

+
+
+

+Invokes a function on a remote client, in the client instance of the caller script. Example usage would be a server Resource Trader calling the setData() function of its client instance. Return values of the remotely executed functions cannot be retrieved.

This function is only available on the server. +

+

Parameters

+
+player +The player of the client the function should be invoked on
+functionName +The name of the scripting function that is to be executed
+arguments +An arbitrary number of arguments that will be given to the remote function
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var invokeEntityFunction(int x, int y, string errorMessage, var entityId, string scriptName, string functionName, var... arguments)
+

+
+
+

+Invokes a function on the server of a script on an entity in an arbitrary sector, during its update step. Return values of the remotely executed function cannot be retrieved. The sector must be loaded in memory in order for this call to succeed. It will not be loaded from disk or generated. Due to technical, multithreading-related restrictions, there is no way to check at the time of the call, if the target entity or the script or the script function exists in the sector. If it doesn't this call will silently fail.

Example invocations:
invokeEntityFunction(x, y, error, {faction = player.index, name = "The Executor"}, "myscript.lua", "myfunction", arg1, arg2, arg3)
invokeEntityFunction(x, y, error, craftId, "myscript.lua", "myfunction", arg1, arg2, arg3)
invokeEntityFunction(x, y, error, "3d477214-4b7d-4fd0-9114-18b8cafa5a91", "myscript.lua", "myfunction", arg1, arg2, arg3)

This function is only available on the client. +

+

Parameters

+
+x +The x-coordinate of the target sector
+y +The y-coordinate of the target sector
+errorMessage +If not nil, the error message that is sent back in case the target sector isn't loaded
+entityId +The Uuid of the entity whose script will be called. Can also be a uuid string. A table containing a faction index and craft name can also be passed, such as {faction = 1338, name = "MyAwesomeShip"}
+scriptName +The name of the called script
+functionName +The name of the called function
+arguments +The arguments that will be passed to the function.
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function int invokeEntityFunction(int x, int y, bool printErrors, var entityId, string scriptName, string functionName, var... arguments)
+

+
+
+

+Invokes a function of a script on an entity in an arbitrary sector, during its update step. Use this function to call functions on entities that are in other sectors than the current script. The sector must be loaded in memory in order for this call to succeed. It will not be loaded from disk or generated. The function will not be run immediately, but it might take up to one update tick until it is run. Therefore, return values of the executed functions will not be retrieved. Due to technical, multithreading-related restrictions, there is no way to check at the time of the call, if the target entity or the script or the script function exists in the sector. If it doesn't this call will silently fail. To get an error message printed out on failure as to why it failed, pass 'true' to the 'printErrors' parameter.

Example invocations:
invokeEntityFunction(x, y, dbgBool, {faction = player.index, name = "The Executor"}, "myscript.lua", "myfunction", arg1, arg2, arg3)
invokeEntityFunction(x, y, dbgBool, craftId, "myscript.lua", "myfunction", arg1, arg2, arg3)
invokeEntityFunction(x, y, dbgBool, "3d477214-4b7d-4fd0-9114-18b8cafa5a91", "myscript.lua", "myfunction", arg1, arg2, arg3)

This function is only available on the server. +

+

Parameters

+
+x +The x-coordinate of the target sector
+y +The y-coordinate of the target sector
+printErrors +A bool indicating whether or not an error message should be printed on failure
+entityId +The Uuid of the entity whose script will be called. Can also be a uuid string. A table containing a faction index and craft name can also be passed, such as {faction = 1338, name = "MyAwesomeShip"}
+scriptName +The name of the called script
+functionName +The name of the called function
+arguments +The arguments that will be passed to the function
+
+

Returns

+
+

+1 if the sector wasn't loaded into memory, 0 otherwise. +

+
+

+
+
+
+
+

+function int invokeFactionFunction(int factionIndex, bool printErrors, string scriptName, string functionName, var... arguments)
+

+
+
+

+Invokes a function on a script of a player, during its sector's update step. Use this function to execute functions of scripts of a player that is in another sector than the one of the current script. The function will not be run immediately, but it might take up to one update tick until it is run. Therefore, return values of the executed functions will not be retrieved. Currently only invocations for logged-in players are supported. Due to technical, multithreading-related restrictions, there is no way to check at the time of the call, if the target script or function exists in the faction. If it doesn't this call will silently fail. To get an error message printed out on failure as to why it failed, pass 'true' to the 'printErrors' parameter.



This function is only available on the server. +

+

Parameters

+
+factionIndex +The index of the targeted faction
+printErrors +A bool indicating whether or not an error message should be printed on failure
+scriptName +The name of the called script
+functionName +The name of the called function
+arguments +The arguments that will be passed to the function
+
+

Returns

+
+

+1 if the player wasn't logged in, 0 otherwise. +

+
+

+
+
+
+
+

+function var invokeSectorFunction(int x, int y, var errorMessage, string scriptName, string functionName, var... arguments)
+

+
+
+

+Invokes a function on the server on a script of a sector, during its update step. Return values of the remotely executed function cannot be retrieved. The sector must be loaded in memory in order for this call to succeed. It will not be loaded from disk or generated. Due to technical, multithreading-related restrictions, there is no way to check at the time of the call, if the target script or function exists in the sector. If it doesn't this call will silently fail.

This function is only available on the client. +

+

Parameters

+
+x +The x-coordinate of the target sector
+y +The y-coordinate of the target sector
+errorMessage +If not nil, the error message that is sent back in case the target sector isn't loaded
+scriptName +The name of the called script
+functionName +The name of the called function
+arguments +The arguments that will be passed to the function.
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function int invokeSectorFunction(int x, int y, bool printErrors, string scriptName, string functionName, var... arguments)
+

+
+
+

+Invokes a function on a script of a sector, during its update step. Use this function to call functions on sectors other than the sector of the current script. The sector must be loaded in memory in order for this call to succeed. It will not be loaded from disk or generated. The function will not be run immediately, but it might take up to one update tick until it is run. Therefore, return values of the executed functions will not be retrieved. Due to technical, multithreading-related restrictions, there is no way to check at the time of the call, if the target script or function exists in the sector. If it doesn't this call will silently fail. To get an error message printed out on failure as to why it failed, pass 'true' to the 'printErrors' parameter.



This function is only available on the server. +

+

Parameters

+
+x +The x-coordinate of the target sector
+y +The y-coordinate of the target sector
+printErrors +A bool indicating whether or not an error message should be printed on failure
+scriptName +The name of the called script
+functionName +The name of the called function
+arguments +The arguments that will be passed to the function
+
+

Returns

+
+

+1 if the sector wasn't loaded into memory, 0 otherwise. +

+
+

+
+
+
+
+

+function var invokeServerFunction(string functionName, var... arguments)
+

+
+
+

+Invokes a function on the remote server, in the server instance of the caller script. Example usage would be a server Resource Trader calling the getData() function of its server instance. Return values of the remotely executed functions are not retrieved. On the server side, a variable called "callingPlayer" will be created or set before executing the called function. callingPlayer contains the index of the calling player. Use this variable to verify that the calling player is actually the player you'd expect. After the call finishes on the server, callingPlayer is set to nil.

This function is only available on the client. +

+

Parameters

+
+functionName +The name of the scripting function that is to be executed
+arguments +An arbitrary number of arguments that will be given to the remote function
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function bool isAllianceScript()
+

+
+
+

+
+
+
+
+

+function bool isBehemothDLCInstalled()
+

+
+
+

+returns true if the Behemoth DLC is owned and installed according to local Steam

This function is only available on the client. +

+

+
+
+
+
+

+function bool isBlackMarketDLCInstalled()
+

+
+
+

+returns true if the Black Market DLC is owned and installed according to local Steam

This function is only available on the client. +

+

+
+
+
+
+

+function bool isEntityScript()
+

+
+
+

+
+
+
+
+

+function bool isGalaxyScript()
+

+
+
+

+This function is only available on the server. +

+

+
+
+
+
+

+function bool isIntoTheRiftDLCInstalled()
+

+
+
+

+returns true if the Into The Rift DLC is owned and installed according to local Steam

This function is only available on the client. +

+

+
+
+
+
+

+function bool isPlayerScript()
+

+
+
+

+
+
+
+
+

+function bool isSectorScript()
+

+
+
+

+
+
+
+
+

+function bool IsValidMaterial(int i)
+

+
+
+

+
+
+
+
+

+function int keycodeFromScancode(int scancode)
+

+
+
+

+This function is only available on the client. +

+

+
+
+
+
+

+function var length(var vec)
+

+
+
+

+Calculates the length of a vector +

+

Parameters

+
+vec +the vector
+
+

Returns

+
+

+The length of the vector +

+
+

+
+
+
+
+

+function var length2(var vec)
+

+
+
+

+Calculates the squared length of a vector +

+

Parameters

+
+vec +the vector
+
+

Returns

+
+

+The squared length of the vector +

+
+

+
+
+
+
+

+function string... listFilesOfDirectory(string directory)
+

+
+
+

+Lists all files in a directory. Security-specific behavior: Listing files of directories is only possible in the moddata/ subdirectory of the Avorion settings folder. +

+

Parameters

+
+directory +Path to the directory to remove
+
+

Returns

+
+

+A list of files +

+
+

+
+
+
+
+

+function string loadInternalData(string path)
+

+
+
+

+
+
+
+
+

+function BlockPlan LoadPlanFromFile(string file)
+

+
+
+

+
+
+
+
+

+function BlockPlan LoadPlanFromString(string content)
+

+
+
+

+
+
+
+
+

+function TurretDesign LoadTurretDesignFromFile(string path)
+

+
+
+

+
+
+
+
+

+function Matrix lookAt(vec3 eye, vec3 at, vec3 up)
+

+
+
+

+
+
+
+
+

+function Rarity LowestRarity()
+

+
+
+

+
+
+
+
+

+function int makeFastHash(int x, int y, int seed)
+

+
+
+

+
+
+
+
+

+function int makeHash(var... values)
+

+
+
+

+
+
+
+
+

+function double makeHash64(var... values)
+

+
+
+

+
+
+
+
+

+function Matrix MatrixLookUp(vec3 look, vec3 up)
+

+
+
+

+
+
+
+
+

+function Matrix MatrixLookUpPosition(vec3 look, vec3 up, vec3 pos)
+

+
+
+

+
+
+
+
+

+function Matrix MatrixLookUpRight(vec3 look, vec3 up, vec3 right)
+

+
+
+

+
+
+
+
+

+function Matrix MatrixYawPitchRoll(float yaw, float pitch, float roll)
+

+
+
+

+
+
+
+
+

+function table_t... Mods()
+

+
+
+

+Returns a table containing all mods that are currently active. Order is the load order of the mods. +

+

Returns

+
+

+table containing all mods +

+
+

+
+
+
+
+

+function EntityDescriptor MoneyLootDescriptor()
+

+
+
+

+
+
+
+
+

+function var normalize(var vec)
+

+
+
+

+Normalizes a given vector. This function creates a new normalized vector, the given vector is not changed. +

+

Parameters

+
+vec +the vector to normalize
+
+

Returns

+
+

+The normalized result of the given vector +

+
+

+
+
+
+
+

+function var normalize_ip(var vec)
+

+
+
+

+Normalizes a given vector. This function normalizes the vector in place. +

+

Parameters

+
+vec +the vector to normalize
+
+

+
+
+
+
+

+function int NumMaterials()
+

+
+
+

+
+
+
+
+

+function bool onClient()
+

+
+
+

+A function to find out in a script, whether it's currently executed on the client.

This function is only available on the client. +

+

Returns

+
+

+true when called on the client, false otherwise +

+
+

+
+
+
+
+

+function bool onClient()
+

+
+
+

+This function is only available on the server. +

+

+
+
+
+
+

+function var onClient()
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function bool onServer()
+

+
+
+

+This function is only available on the server. +

+

+
+
+
+
+

+function var onServer()
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function bool onServer()
+

+
+
+

+A function to find out in a script, whether it's currently executed on the server.

This function is only available on the client. +

+

Returns

+
+

+true when called on the server, false otherwise +

+
+

+
+
+
+
+

+function bool ownsBehemothDLC()
+

+
+
+

+returns true if the player owns the Behemoth DLC according to server

This function is only available on the client. +

+

+
+
+
+
+

+function bool ownsBlackMarketDLC()
+

+
+
+

+returns true if the player owns the Black Market DLC according to server

This function is only available on the client. +

+

+
+
+
+
+

+function bool ownsIntoTheRiftDLC()
+

+
+
+

+returns true if the player owns the Into The Rift DLC according to server

This function is only available on the client. +

+

+
+
+
+
+

+function Matrix perspective(float fov, float aspect, float nearClip, float farClip)
+

+
+
+

+
+
+
+
+

+function var play3DSound(string soundName, int type, vec3 position, float radius, float volume, Entity [or nil] entity)
+

+
+
+

+This function is only available on the client. +

+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var playSound(string soundName, int type, float volume)
+

+
+
+

+This function is only available on the client. +

+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function string plural_t(string singular, string plural, int number)
+

+
+
+

Parameters

+
+singular +The english singular string, will be used directly and no numbers will be formatted into it
+plural +The english plural string, may contain a ${i} variable that will be replaced by the number
+number +The number that is to be displayed
+
+

+
+
+
+
+

+function string plural_with_context_t(string singular, string plural, string context, int number)
+

+
+
+

Parameters

+
+singular +The english singular string, will be used directly and no numbers will be formatted into it
+plural +The english plural string, may contain a ${i} variable that will be replaced by the number
+context +The context that is to be shown in the .po file
+number +The number that is to be displayed
+
+

+
+
+
+
+

+function var print(var... args)
+

+
+
+

+Prints to the console. In the ingame console, server output will be printed in cyan, client output will be printed in grey. +

+

Parameters

+
+args +Any number of arguments. The first value can be a format string. If no formatting can be done then the function falls back to printing all given values.
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var printlog(var... args)
+

+
+
+

+Similar to print, but prints to the log file. +

+

Parameters

+
+args +Any number of arguments. The first value can be a format string. If no formatting can be done then the function falls back to printing all given values.
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function vec3 projectPoint(vec3 p)
+

+
+
+

+This function is only available on the client. +

+

+
+
+
+
+

+function var registerBoss(Uuid entityId, var healthColor, var shieldColor, var track, var name, var miniBoss)
+

+
+
+

+This function is only available on the client. +

+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var removeCountdownBar(Uuid countdownId)
+

+
+
+

+This function is only available on the client. +

+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var removeDirectory(string directory)
+

+
+
+

+Removes an empty directory. Error codes behave the same way as rmdir(). Security-specific behavior: Removing directories is only possible in the moddata/ subdirectory of the Avorion settings folder. +

+

Parameters

+
+directory +Path to the directory to remove
+
+

Returns

+
+

+A system error code indicating if the operation was successful +

+
+

+
+
+
+
+

+function var removeSectorProblem(string type)
+

+
+
+

+This function is only available on the client. +

+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var removeShipProblem(string type, Uuid uuid)
+

+
+
+

+This function is only available on the client. +

+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var reportError(string string)
+

+
+
+

+Sends an error report to avorion.net, including DebugInfo and StackTrace +

+

Parameters

+
+string +containing the error that happened
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function EntityDescriptor ResourceLootDescriptor()
+

+
+
+

+
+
+
+
+

+function Matrix rotate(Matrix in, float angle, vec3 axis)
+

+
+
+

+
+
+
+
+

+function var... run(string script, string func, var... params)
+

+
+
+

+Loads a script into a separate, temporary VM and runs a single function in it. The script will be run in the same context as the script calling this function. When the script has a namespace defined, only functions within that namespace can be called. The first return value is an int indicating if the call succeeded, followed by any return values of the invoked function. 0 = success, 1 = invalid script path, 2 = error during script loading, 3 = error during execution

This function is only available on the client. +

+

Parameters

+
+script +Name of the script to load
+func +Name of the function to call
+params +Parameters that will be passed to the function
+
+

Returns

+
+

+An int indicating if the call succeeded, followed by the return values of the called function +

+
+

+
+
+
+
+

+function var... run(string script, string func, var... params)
+

+
+
+

+Loads a script into a separate, temporary VM and runs a single function in it. The script will be run in the same context as the script calling this function. When the script has a namespace defined, only functions within that namespace can be called. The first return value is an int indicating if the call succeeded, followed by any return values of the invoked function. 0 = success, 1 = invalid script path, 2 = error during script loading, 3 = error during execution

This function is only available on the server. +

+

Parameters

+
+script +Name of the script to load
+func +Name of the function to call
+params +Parameters that will be passed to the function
+
+

Returns

+
+

+An int indicating if the call succeeded, followed by the return values of the called function +

+
+

+
+
+
+
+

+function int runEntityCode(int x, int y, bool printErrors, var entityId, string code, string functionName, var... arguments)
+

+
+
+

+Runs code in the context of an entity in a sector, during its update step. Use this function to execute arbitrary code in the context of entities that are in other sectors than the current script. The sector must be loaded in memory in order for this call to succeed. It will not be loaded from disk or generated. The code will not be run immediately, but it might take up to one update tick until it is run. Therefore, return values of the executed functions will not be retrieved. Due to technical, multithreading-related restrictions, there is no way to check at the time of the call, if the target entity exists in the sector. If it doesn't this call will silently fail. To get an error message printed out on failure as to why it failed, pass 'true' to the 'printErrors' parameter.



This function is only available on the server. +

+

Parameters

+
+x +The x-coordinate of the target sector
+y +The y-coordinate of the target sector
+printErrors +A bool indicating whether or not an error message should be printed on failure
+entityId +The Uuid of the entity whose script will be called. Can also be a uuid string. A table containing a faction index and craft name can also be passed, such as {faction = 1338, name = "MyAwesomeShip"}
+code +The code that will be run, must have at least one function defined that will be run
+functionName +The name of the called function
+arguments +The arguments that will be passed to the function
+
+

Returns

+
+

+1 if the sector wasn't loaded into memory, 0 otherwise. +

+
+

+
+
+
+
+

+function int runFactionCode(int factionIndex, bool printErrors, string code, string functionName, var... arguments)
+

+
+
+

+Runs code in the context of a player, during its sector's update step. Use this function to execute code in the context of a player that is in another sector than the one of the current script. The code will not be run immediately, but it might take up to one update tick until it is run. Therefore, return values of the remotely executed functions will not be retrieved. Currently only invocations for logged-in players are supported.

This function is only available on the server. +

+

Parameters

+
+factionIndex +The index of the targeted faction
+printErrors +A bool indicating whether or not an error message should be printed on failure
+code +The code that will be run, must have at least one function defined that will be run
+functionName +The name of the called function
+arguments +The arguments that will be passed to the function
+
+

Returns

+
+

+1 if the player wasn't logged in, 0 otherwise. +

+
+

+
+
+
+
+

+function int runSectorCode(int x, int y, bool printErrors, string code, string functionName, var... arguments)
+

+
+
+

+Runs code in the context of a sector, during its update step. Use this function to execute code in the context of sectors other than the sector of the current script. The sector must be loaded in memory in order for this call to succeed. It will not be loaded from disk or generated. The code will not be run immediately, but it might take up to one update tick until it is run. Therefore, no return values of any executed functions will be retrieved.

This function is only available on the server. +

+

Parameters

+
+x +The x-coordinate of the target sector
+y +The y-coordinate of the target sector
+printErrors +A bool indicating whether or not an error message should be printed on failure
+code +The code that will be run, must have at least one function defined that will be run
+functionName +The name of the called function
+arguments +The arguments that will be passed to the function
+
+

Returns

+
+

+1 if the sector wasn't loaded into memory, 0 otherwise. +

+
+

+
+
+
+
+

+function Matrix scale(Matrix in, vec3 size)
+

+
+
+

+
+
+
+
+

+function int scancodeFromKeycode(int key)
+

+
+
+

+This function is only available on the client. +

+

+
+
+
+
+

+function string scriptPath()
+

+
+
+

+Returns the path of the script that is currently being executed +

+

Returns

+
+

+string containing the path +

+
+

+
+
+
+
+

+function Seed SectorSeed(int x, int y, var seed)
+

+
+
+

+
+
+
+
+

+function Seed SeedStr(string str)
+

+
+
+

+
+
+
+
+

+function bool serializable(var value)
+

+
+
+

+Checks if the given object is serializable (sendable via network). +

+

Parameters

+
+value +
+
+

Returns

+
+

+A boolean indicating whether the object is serializable. Returns false when given nil. +

+
+

+
+
+
+
+

+function var setBossBarTitle(Uuid id, string name)
+

+
+
+

+This function is only available on the client. +

+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var setBossHealth(Uuid id, var health, var maxHealth, var shield, var maxShield)
+

+
+
+

+This function is only available on the client. +

+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var setBossHealthColor(Uuid id, var health, var shield)
+

+
+
+

+This function is only available on the client. +

+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var setCountdownPriority(Uuid countdownId, int newPriority)
+

+
+
+

+This function is only available on the client. +

+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var setGlobal(string name, var value)
+

+
+
+

+Sets a global variable. These variables are shared over the entire process. +

+

Parameters

+
+name +The name of the global variable
+value +The value of the global variable. POD datatypes only. Nil deletes the variable.
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var setTrackedMission(int )
+

+
+
+

+This function is only available on the client. +

+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var setTrackThisMission()
+

+
+
+

+This function is only available on the client. +

+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function EntityDescriptor ShipDescriptor()
+

+
+
+

+
+
+
+
+

+function var sleep(float seconds)
+

+
+
+

+sleeps for the given time +

+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function EntityDescriptor StationDescriptor()
+

+
+
+

+
+
+
+
+

+function EntityDescriptor SystemUpgradeLootDescriptor()
+

+
+
+

+
+
+
+
+

+function var terminate()
+

+
+
+

+Terminates the script. This function returns normally and the current function will run until finished, but no more following calls will be made to the script. The script will be removed from the entity on the next occasion. +

+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function EntityDescriptor TorpedoDescriptor()
+

+
+
+

+
+
+
+
+

+function Matrix translate(Matrix in, vec3 pos)
+

+
+
+

+
+
+
+
+

+function string trim(string in)
+

+
+
+

+
+
+
+
+

+function EntityDescriptor TurretDescriptor()
+

+
+
+

+
+
+
+
+

+function EntityDescriptor TurretLootDescriptor()
+

+
+
+

+
+
+
+
+

+function var unregisterBoss(Uuid entityId)
+

+
+
+

+This function is only available on the client. +

+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function bool valid(var value)
+

+
+
+

+Checks if the given object is valid. Some objects can become invalid, for example when an entity is deleted the instances of the Entity in the scripts will become invalid. +

+

Parameters

+
+value +A non-POD, non-table object
+
+

Returns

+
+

+A boolean indicating whether the object is valid. Returns false when given nil. +

+
+

+
+
+
+
+

+function EntityDescriptor WormholeDescriptor()
+

+
+
+

+
+
+
+
+

+function EntityDescriptor WreckageDescriptor()
+

+
+
+

+
+
+
+
+

+function var wreckify(BlockPlan plan)
+

+
+
+

+Removes holo blocks, darkens light blocks and replaces some blocks with wreckage blocks +

+

Parameters

+
+plan +The plan that will be modified
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var writeTrace(var... args)
+

+
+
+

+Similar to print, but prints to the user trace stream. This trace stream can be enabled by passing "-t user" to the command line arguments of client or server. +

+

Parameters

+
+args +Any number of arguments. The first value can be a format string. If no formatting can be done then the function falls back to printing all given values.
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+
+
+ Overview +
Home + Functions + Search +
+
Search:
+Predefined Functions & Example Scripts +
Command +Entity +FactionDatabase +PlanGenerator +Player +Sector +Server +UsableInventoryItem +
+
+

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

+
+ +
+ + diff --git a/Documentation/Galaxy Callbacks.html b/Documentation/Galaxy Callbacks.html new file mode 100644 index 0000000..b960346 --- /dev/null +++ b/Documentation/Galaxy Callbacks.html @@ -0,0 +1,558 @@ + + + Avorion Script Callbacks - Galaxy + + + + +
+
+

Avorion Script API Documentation

+
+
+ +
+
Search:
+ +
+

Galaxy Callbacks

+

+Note: Callbacks have to be buffered in certain situations and won't happen immediately. When unregistering a callback during a callback, all callbacks that were buffered during the last frame may still be sent, even though they were unregistered. +

+
+

+callback onAllianceCreated(index)
+

+
+

+Executed whenever a new alliance is created on the server +

+

Parameters

+
+index +Index of the alliance that was created
+
+

+
+
+
+

+callback onAllScriptValuesChanged()
+

+
+

+Executed whenever all scripts values of the galaxy have been changed at once +

+

+
+
+
+

+callback onFactionCreated(index)
+

+
+

+Executed whenever a new faction is created on the server +

+

Parameters

+
+index +Index of the faction that was created
+
+

+
+
+
+

+callback onPlayerCreated(index)
+

+
+

+Executed whenever a new player is created on the server +

+

Parameters

+
+index +Index of the player that was created
+
+

+
+
+
+

+callback onRelationsChanged(indexA, indexB, relations, status, relationsBefore, statusBefore)
+

+
+

+Executed whenever a the relations between two factions change +

+

Parameters

+
+indexA +Index of the one faction
+indexB +Index of the other faction
+relations +The new relations between the factions
+status +The new relation status between the factions
+relationsBefore +The relations between the factions before the change, nil if none
+statusBefore +The relation status between the factions before the change, nil if none
+
+

+
+
+
+

+callback onScriptAdded(scriptIndex, scriptPath)
+

+
+

+Executed after a script was added to the galaxy +

+

Parameters

+
+scriptIndex +The index of the script that was added
+scriptPath +The path of the old script
+
+

+
+
+
+

+callback onScriptRemoved(oldScriptIndex, scriptPath)
+

+
+

+Executed after a script was removed from the galaxy +

+

Parameters

+
+oldScriptIndex +The old index of the script that was removed
+scriptPath +The path of the old script
+
+

+
+
+
+

+callback onScriptValueChanged(name, value)
+

+
+

+Executed whenever a script value of the galaxy was changed +

+

Parameters

+
+name +The name of the value
+value +The new value
+
+

+
+
+
+
+
+
+ Overview +
Home + Functions + Search +
+
Search:
+Predefined Functions & Example Scripts +
Command +Entity +FactionDatabase +PlanGenerator +Player +Sector +Server +UsableInventoryItem +
+
+

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

+
+ +
+ + diff --git a/Documentation/Galaxy [Client].html b/Documentation/Galaxy [Client].html new file mode 100644 index 0000000..c31a3f1 --- /dev/null +++ b/Documentation/Galaxy [Client].html @@ -0,0 +1,667 @@ + + + Galaxy [Client] + + + + +
+
+

Avorion Script API Documentation

+
+
+ +
+
Search:
+ +
+

Galaxy [Client]

+

+This object is only available on the client. +

+
+
+

+function Galaxy()
+

+
+
+

Returns

+
+

+A new instance of Galaxy +

+
+

+
+
+
+
+

+function bool factionExists(int index)
+

+
+
+

+
+
+
+
+

+function UserObject findFaction(int omdex)
+

+
+
+

+Looks for a faction with the given index. This function returns the correct concrete type of the faction, ie. Faction, Player or Alliance. Note: With this client function, it can only return the local player or their alliance. +

+

Parameters

+
+omdex +An int, index of the faction
+
+

Returns

+
+

+The faction if found, or nil +

+
+

+
+
+
+
+

+function var getControllingFaction(int x, int y)
+

+
+
+

+Does a lookup on the faction map and retrieves the faction CURRENTLY controlling the sector. The faction is determined by the influence of sectors around the sector to check. As sectors are generated while players are exploring, influence over sectors is also only generated while players are exploring. It's very possible that as long as not all sectors near the tested sector have been discovered, the influence is not yet determined nor final. Keep in mind that if the player hasn't explored enough on the client yet, this faction might not yet be known or exist on the client. +

+

Parameters

+
+x +The x coordinate of the sector
+y +The y coordinate of the sector
+
+

Returns

+
+

+The faction index, or nil if the sector's controller is unknown +

+
+

+
+
+
+
+

+function var getLocalFaction(int x, int y)
+

+
+
+

+Does a lookup on the faction map and retrieves the faction controlling the given sector by default. +

+

Parameters

+
+x +The x coordinate of the sector
+y +The y coordinate of the sector
+
+

Returns

+
+

+The faction's index, or nil if the sector is in no man's land +

+
+

+
+
+
+
+

+function var getNearestFaction(int x, int y)
+

+
+
+

+Does a lookup on the faction map and retrieves the nearest faction to the given sector. Distance is calculated from the factions' home sector. Keep in mind that if the player hasn't explored enough on the client yet, this faction might not yet exist on the client. +

+

Parameters

+
+x +The x coordinate of the sector
+y +The y coordinate of the sector
+
+

Returns

+
+

+The faction index +

+
+

+
+
+
+
+

+function UserObject getPlayerCraftFaction()
+

+
+
+

+Getter for the player's current craft's faction. Returns the player if the craft is owned by himself, or the alliance if the player is flying an alliance ship. +

+

Returns

+
+

+The faction that the player's craft belongs to +

+
+

+
+
+
+
+

+function int... getPlayerIndices()
+

+
+
+

+
+
+
+
+

+function table<int, string> getPlayerNames()
+

+
+
+

+
+
+
+
+

+function bool isCentralFactionArea(int x, int y, var factionIndex)
+

+
+
+

+Returns whether the given sector is in the central part of the faction area of the given faction +

+

Parameters

+
+x +The x coordinate of the sector
+y +The y coordinate of the sector
+factionIndex +The faction to check or nil to use the nearest faction
+
+

Returns

+
+

+A bool indicating whether the given sector is in the central faction area +

+
+

+
+
+
+
+

+function bool jumpRouteUnobstructed(int fromX, int fromY, int toX, int toY)
+

+
+
+

+Checks if the jump between two sectors is unobstructed by rifts +

+

Parameters

+
+fromX +The x coordinate of the first sector
+fromY +The y coordinate of the first sector
+toX +The x coordinate of the second sector
+toY +The y coordinate of the second sector
+
+

+
+
+
+
+

+function bool sectorInRift(int x, int y)
+

+
+
+

+
+
+
+
+
+
+ Overview +
Home + Functions + Search +
+
Search:
+Predefined Functions & Example Scripts +
Command +Entity +FactionDatabase +PlanGenerator +Player +Sector +Server +UsableInventoryItem +
+
+

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

+
+ +
+ + diff --git a/Documentation/Galaxy [Server].html b/Documentation/Galaxy [Server].html new file mode 100644 index 0000000..3d0cfea --- /dev/null +++ b/Documentation/Galaxy [Server].html @@ -0,0 +1,1373 @@ + + + Galaxy [Server] + + + + +
+
+

Avorion Script API Documentation

+
+
+ +
+
Search:
+ +
+

Galaxy [Server]

+

+This object is only available on the server. +

+
+
+

+function Galaxy()
+

+
+
+

Returns

+
+

+A new instance of Galaxy +

+
+

+
+
+
+
+

+function var addScript()
+

+
+
+

+
+
+
+
+

+function var addScriptOnce()
+

+
+
+

+
+
+
+
+

+function bool aiFactionExists(int index)
+

+
+
+

+
+
+
+
+

+function bool allianceFactionExists(int index)
+

+
+
+

+
+
+
+
+

+function bool areAllies(int factionA, int factionB)
+

+
+
+

+
+
+
+
+

+function bool areEnemies(int factionA, int factionB)
+

+
+
+

+
+
+
+
+

+function int callbacksRegistered(string callbackName, var functionName)
+

+
+
+

+Check how many functions are registered to a callback from the current script VM. +

+

Parameters

+
+callbackName +The name of the callback
+functionName +The name of the function for which to check. If nil, will count all functions that are registered to this callback.
+
+

Returns

+
+

+The amount of functions registered to the callback +

+
+

+
+
+
+
+

+function var changeFactionRelations(Faction a, Faction b, int delta, var notifyA, var notifyB)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function Faction createFaction(string name, int x, int y)
+

+
+
+

+Creates a new faction with a specified name and home sector at the given coordinates. Turrets and styles will be generated automatically. If the faction name is already taken, returns the faction with the specified name. +

+

Parameters

+
+name +The name of the new faction. Must be unique.
+x +The x coordinate of the faction's home sector
+y +The y coordinate of the faction's home sector
+
+

Returns

+
+

+The new faction, or, if already existing, the existing faction +

+
+

+
+
+
+
+

+function Faction createRandomFaction(int x, int y)
+

+
+
+

+Creates a new faction with home sector at the given coordinates. Name, turrets and styles will be generated automatically. +

+

Parameters

+
+x +The x coordinate of the faction's home sector
+y +The y coordinate of the faction's home sector
+
+

Returns

+
+

+The new faction +

+
+

+
+
+
+
+

+function UserObject findFaction(var identifier)
+

+
+
+

+Looks for a faction with the given name or index. This will not trigger the creation of a new faction. Finding players by name with this method is not possible, since player names can change via Steam. This function returns the correct concrete type of the faction, ie. Faction, Player or Alliance. +

+

Parameters

+
+identifier +A string or int, describing the name or index of the faction, respectively
+
+

Returns

+
+

+The faction if found, or nil +

+
+

+
+
+
+
+

+function Player findPlayer(string identifier)
+

+
+
+

+Looks for a player with the given name, index or steam ID. Finding players by name with this method is potentially problematic, since player names can change via Steam. It's also possible that 2 players have the same Steam name. Logged in players are preferred when searching by name. +

+

Parameters

+
+identifier +A string or int, describing the name, index or Steam ID of the player, respectively. You can pass an int here, even though it says string.
+
+

Returns

+
+

+The player if found, or nil +

+
+

+
+
+
+
+

+function Faction getControllingFaction(int x, int y)
+

+
+
+

+Does a lookup on the faction map and retrieves the faction controlling the sector. The faction is determined by the influence of sectors around the sector to check. As sectors are generated while players are exploring, influence over sectors is also only generated while players are exploring. It's very possible that as long as not all sectors near the tested sector have been discovered, the influence is not yet determined nor final. +

+

Parameters

+
+x +The x coordinate of the sector
+y +The y coordinate of the sector
+
+

Returns

+
+

+The faction, or nil if the sector's controller is unknown +

+
+

+
+
+
+
+

+function int getFactionRelations(Faction a, Faction b)
+

+
+
+

+
+
+
+
+

+function RelationStatus getFactionRelationStatus(Faction a, Faction b)
+

+
+
+

+
+
+
+
+

+function table_t getLoadedSectors()
+

+
+
+

+Returns a table containing all loaded sectors. Returned table has format {{x = 12, y = 3}, {x = 4, y = 56}, {x = 78, y = 9}, ...} +

+

Returns

+
+

+1 if the sector exists, 0 otherwise +

+
+

+
+
+
+
+

+function Faction getLocalFaction(int x, int y)
+

+
+
+

+Does a lookup on the faction map and retrieves the faction controlling the given sector. This may trigger a creation of a faction that does not yet exist. +

+

Parameters

+
+x +The x coordinate of the sector
+y +The y coordinate of the sector
+
+

Returns

+
+

+The (new) faction, or nil if the sector is in no man's land +

+
+

+
+
+
+
+

+function table<int, vec2> getMapHomeSectors(int x, int y, float radius)
+

+
+
+

+Does a lookup on the faction map and retrieves all factions whose home sectors are inside the radius. Note that only faction-map factions will be returned, factions that are not on the map by default won't be returned, as this is essentially a faction map look up. +

+

Parameters

+
+x +The x coordinate of the circle center
+y +The y coordinate of the circle center
+radius +The radius of the circle
+
+

Returns

+
+

+A table containing faction indices and corresponding home sector +

+
+

+
+
+
+
+

+function Faction getNearestFaction(int x, int y)
+

+
+
+

+Does a lookup on the faction map and retrieves the nearest faction to the given sector. Distance is calculated by the factions' home sector. This may trigger a creation of a faction that does not yet exist. +

+

Parameters

+
+x +The x coordinate of the sector
+y +The y coordinate of the sector
+
+

Returns

+
+

+The (new) faction, or nil if the sector is in no man's land +

+
+

+
+
+
+
+

+function string... getOnlinePlayerNames()
+

+
+
+

+
+
+
+
+

+function Faction getPirateFaction(int level)
+

+
+
+

+
+
+
+
+

+function string... getPlayerNames()
+

+
+
+

+
+
+
+
+

+function table<int, string> getScripts()
+

+
+
+

+
+
+
+
+

+function SectorView getSectorView(int x, int y)
+

+
+
+

+
+
+
+
+

+function var hasScript(string name)
+

+
+
+

+
+
+
+
+

+function var... invokeFunction(var scriptName, string functionName, var... arguments)
+

+
+
+

+Invokes a function in a script of the galaxy. Use this function to invoke functions from one script in another script. The first return value of the function is an integer indicating whether or not the call was successful. When it was, this integer is followed by the return values of the invoked function. Access to Galaxy scripts is synchronized, so only one thread can invoke functions at a time. +

+

Parameters

+
+scriptName +The name or index of the script containing the function
+functionName +The name of the function that will be executed
+arguments +An arbitrary list of arguments that will be given to the invoked function
+
+

Returns

+
+

+Returns at least 1 value indicating if the call succeeded:
0 The call was successful. In this case, the return values of the script are returned in addition to the call result, following the call result.
3 The call failed because the given script was not found
4 The call failed because the given function was not found in the script
5 The call failed because the script's state has errors and is invalid
+

+
+

+
+
+
+
+

+function bool isCentralFactionArea(int x, int y, var factionIndex)
+

+
+
+

+Returns whether the given sector is in the central part of the faction area of the given faction +

+

Parameters

+
+x +The x coordinate of the sector
+y +The y coordinate of the sector
+factionIndex +The faction to check or nil to use the nearest faction
+
+

Returns

+
+

+A bool indicating whether the given sector is in the central faction area +

+
+

+
+
+
+
+

+function bool isFactionLoaded(var identifier)
+

+
+
+

+Checks if a faction is already loaded into memory. +

+

Parameters

+
+identifier +A string or int, describing the name or index of the faction, respectively
+
+

Returns

+
+

+A bool indicating the faction being in memory +

+
+

+
+
+
+
+

+function bool isMapFaction(int index)
+

+
+
+

+
+
+
+
+

+function bool jumpRouteUnobstructed(int fromX, int fromY, int toX, int toY)
+

+
+
+

+Checks if the jump between two sectors is unobstructed by rifts +

+

Parameters

+
+fromX +The x coordinate of the first sector
+fromY +The y coordinate of the first sector
+toX +The x coordinate of the second sector
+toY +The y coordinate of the second sector
+
+

+
+
+
+
+

+function bool keepOrGetSector(int x, int y, float time, var code, var... arguments)
+

+
+
+

+Tells the galaxy load a sector or to keep an already loaded sector in memory for the next X seconds, where X is the value configured as [sectorUpdateTimeLimit] in the server.ini. The sector will stay loaded for at least the next 3 frames. Sectors that are loaded are simulated. Use this function with caution, sectors take a lot of memory and CPU performance while loaded. It is not possible to keep all sectors of a galaxy loaded at the same time. +

+

Parameters

+
+x +The x coordinate of the sector
+y +The y coordinate of the sector
+time +The amount of time the sector is to be kept in memory. If 0, sector will be kept for at least 3 frames.
+code +Code that will be run immediately on creation of the sector, must have at least one 'init()' function defined that will be run
+arguments +The arguments that will be passed to the function
+
+

Returns

+
+

+true if the sector is in memory, false otherwise +

+
+

+
+
+
+
+

+function bool keepSector(int x, int y, float time)
+

+
+
+

+Tells the galaxy to keep an already loaded sector in memory for the next X seconds, where X is the value configured as [sectorUpdateTimeLimit] in the server.ini. The sector will stay loaded for at least the next 3 frames. This has no effect if the sector is not currently in memory. Sectors that are loaded are simulated. Use this function with caution, sectors take a lot of memory and CPU performance while loaded. It is not possible to keep all sectors of a galaxy loaded at the same time. +

+

Parameters

+
+x +The x coordinate of the sector
+y +The y coordinate of the sector
+time +The amount of time the sector is to be kept in memory. If 0, sector will be kept for at least 3 frames.
+
+

Returns

+
+

+true if the sector is in memory, false otherwise +

+
+

+
+
+
+
+

+function var loadSector(int x, int y)
+

+
+
+

+Tells the galaxy to load an unloaded sector from disk to memory. If the sector is not existant on disk, the sector will be generated. The sector will also be written to disk when it is unloaded, and won't be affected by patches that change the procedural generation of sectors. The sector may not be loaded immediately (sectorLoaded() may not return true immediately), as it can take a few seconds to load or generate. The sector will be kept in memory for 15 seconds or at least 3 frames. Sectors that are loaded are simulated. Use this function with caution, sectors take a lot of memory and CPU performance while loaded. It is not possible to keep all sectors of a galaxy loaded at the same time. +

+

Parameters

+
+x +The x coordinate of the sector
+y +The y coordinate of the sector
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function bool playerFactionExists(int index)
+

+
+
+

+
+
+
+
+

+function int registerCallback(string callbackName, string functionName)
+

+
+
+

+Register a callback in the galaxy. The callback may arrive with a delay. Double registration of callbacks doesn't work. When the same callback to the same callback of the same script instance is registered twice, it will still only be called once.s +

+

Parameters

+
+callbackName +The name of the callback
+functionName +The name of the function that will be executed in the script when the callback happens
+
+

Returns

+
+

+0 on success, 1 if the registration failed +

+
+

+
+
+
+
+

+function var removeScript(var script)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var resolveScriptPath(string path)
+

+
+
+

+
+
+
+
+

+function bool sectorExists(int x, int y)
+

+
+
+

+Checks if a sector exists. This function checks if the sector exists in the database. The loaded state will not affect the result of this function. +

+

Parameters

+
+x +The x coordinate of the sector
+y +The y coordinate of the sector
+
+

Returns

+
+

+1 if the sector exists, 0 otherwise +

+
+

+
+
+
+
+

+function bool sectorInRift(int x, int y)
+

+
+
+

+
+
+
+
+

+function bool sectorLoaded(int x, int y)
+

+
+
+

+Checks if a sector is currently loaded in memory. Sectors that are loaded are simulated. +

+

Parameters

+
+x +The x coordinate of the sector
+y +The y coordinate of the sector
+
+

Returns

+
+

+1 if the sector exists, 0 otherwise +

+
+

+
+
+
+
+

+function var sendCallback()
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var setFactionRelations(Faction a, Faction b, int level, var notifyA, var notifyB)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var setFactionRelationStatus(Faction a, Faction b, RelationStatus status, var notifyA, var notifyB)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function bool tryUnloadSector(int x, int y)
+

+
+
+

+Tells the galaxy to unload a loaded sector from memory as soon as possible. The sector will only be unloaded if it's not accessed or kept alive from somewhere else in the next 5 ticks. Sectors that are loaded are simulated. +

+

Parameters

+
+x +The x coordinate of the sector
+y +The y coordinate of the sector
+
+

Returns

+
+

+true if the sector is in memory, false otherwise +

+
+

+
+
+
+
+

+function int unregisterCallback(string callbackName, string functionName)
+

+
+
+

+
+
+
+
+
+
+ Overview +
Home + Functions + Search +
+
Search:
+Predefined Functions & Example Scripts +
Command +Entity +FactionDatabase +PlanGenerator +Player +Sector +Server +UsableInventoryItem +
+
+

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

+
+ +
+ + diff --git a/Documentation/GalaxyMap.html b/Documentation/GalaxyMap.html new file mode 100644 index 0000000..dc71f38 --- /dev/null +++ b/Documentation/GalaxyMap.html @@ -0,0 +1,871 @@ + + + GalaxyMap + + + + +
+
+

Avorion Script API Documentation

+
+
+ +
+
Search:
+ +
+

GalaxyMap

+

+This is the galaxy map UI. Whenever input events are passed to the Galaxy Map, they are first passed to the "onGalaxyMapKeyboardEvent" and "onGalaxyMapMouseButtonEvent" etc. callbacks. If they aren't consumed by those, they are passed through the UI. If they aren't consumed by the UI, they are passed to the "onGalaxyMapKeyboardDown", "onGalaxyMapMouseDown", "onGalaxyMapMouseMove", etc. callbacks.

This object is only available on the client. +

+
+
+

+function GalaxyMap()
+

+
+
+

Returns

+
+

+A new instance of GalaxyMap +

+
+

+
+
+
+
+ +
property bool showAllianceInfo
+
+
+
+
+ +
property bool showBackgroundShipAreas
+
+
+
+
+ +
property bool showCustomColorLayer
+
+
+
+
+ +
property bool showFactionLayer
+
+
+
+
+ +
property bool showGates
+
+
+
+
+ +
property bool showNotes
+
+
+
+
+ +
property bool showWormholes
+
+
+
+
+ +
property bool visible[read-only]
+
+
+
+
+
+
+

+function var clearCustomColors()
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function UIContainer createContainer()
+

+
+
+

+
+
+
+
+

+function Window createWindow(Rect rect)
+

+
+
+

+
+
+
+
+

+function int, int getCoordinatesAtScreenPosition(vec2 coordinates)
+

+
+
+

+
+
+
+
+

+function float, float getCoordinatesScreenPosition(ivec2 coordinates)
+

+
+
+

+
+
+
+
+

+function int, int getHoveredCoordinates()
+

+
+
+

+
+
+
+
+

+function int, int getSelectedCoordinates()
+

+
+
+

+
+
+
+
+

+function float, float getSelectedCoordinatesScreenPosition()
+

+
+
+

+
+
+
+
+

+function var hide()
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var lookAt(int x, int y)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var lookAtSmooth(int x, int y)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var removeHighlightedArea(var key)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var resetHighlightedAreas()
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var resetJumpRangeArea(string name)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var setCustomColors()
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var setHighlightedArea(vec2 lower, vec2 upper, var color, var key)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var setHighlightedSectors(table_t areaIn, var key)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var setJumpRangeArea(string name, ivec2 center, float radius, bool canPassBlocked, var includeGateConnections, var color, bool dotted)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var setSelectedCoordinates(int x, int y)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var show(int x, int y)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var switchToCraft(int x, int y, int factionIndex, string shipName)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var switchToSector(int x, int y)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+
+
+ Overview +
Home + Functions + Search +
+
Search:
+Predefined Functions & Example Scripts +
Command +Entity +FactionDatabase +PlanGenerator +Player +Sector +Server +UsableInventoryItem +
+
+

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

+
+ +
+ + diff --git a/Documentation/GameInput.html b/Documentation/GameInput.html new file mode 100644 index 0000000..e84ee67 --- /dev/null +++ b/Documentation/GameInput.html @@ -0,0 +1,574 @@ + + + GameInput + + + + +
+
+

Avorion Script API Documentation

+
+
+ +
+
Search:
+
+
+ + + + + + + + + + + + + + + + + + + + +
+GameInput +GameInput +

Properties
+isMouseSteeringEnabled +
+isSteeringEnabled +

Member Functions
+getActionName +
+getKeyName +
+getMouseSteeringEnabled +
+getShowMouse +
+keyDown +
+keyHeld +
+keyPressed +
+keyUp +
+keyUpHeld +
+keyUpNotHeld +
+
+
+
+

GameInput

+

+This object is only available on the client. +

+
+
+

+function GameInput()
+

+
+
+

+This is the default constructor of GameInput. No further arguments are required. +

+

Returns

+
+

+A new instance of GameInput +

+
+

+
+
+
+
+ +
property bool isMouseSteeringEnabled[read-only]
+
+
+
+
+ +
property bool isSteeringEnabled[read-only]
+
+
+
+
+
+
+

+function string getActionName(GameInput::Action action)
+

+
+
+

+
+
+
+
+

+function string getKeyName(GameInput::Action action, var primary, var controlStyle)
+

+
+
+

+
+
+
+
+

+function bool getMouseSteeringEnabled()
+

+
+
+

+
+
+
+
+

+function bool getShowMouse()
+

+
+
+

+
+
+
+
+

+function bool keyDown(GameInput::Action action)
+

+
+
+

+
+
+
+
+

+function bool keyHeld(GameInput::Action action)
+

+
+
+

+
+
+
+
+

+function bool keyPressed(GameInput::Action action)
+

+
+
+

+
+
+
+
+

+function bool keyUp(GameInput::Action action)
+

+
+
+

+
+
+
+
+

+function bool keyUpHeld(GameInput::Action action)
+

+
+
+

+
+
+
+
+

+function bool keyUpNotHeld(GameInput::Action action)
+

+
+
+

+
+
+
+
+
+
+ Overview +
Home + Functions + Search +
+
Search:
+Predefined Functions & Example Scripts +
Command +Entity +FactionDatabase +PlanGenerator +Player +Sector +Server +UsableInventoryItem +
+
+

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

+
+ +
+ + diff --git a/Documentation/GameSettings.html b/Documentation/GameSettings.html new file mode 100644 index 0000000..584050a --- /dev/null +++ b/Documentation/GameSettings.html @@ -0,0 +1,847 @@ + + + GameSettings + + + + +
+
+

Avorion Script API Documentation

+
+
+ +
+
Search:
+ +
+

GameSettings

+
+
+

+function GameSettings()
+

+
+
+

+This is the default constructor of GameSettings. No further arguments are required. +

+

Returns

+
+

+A new instance of GameSettings +

+
+

+
+
+
+
+ +
property bool barrier[read-only]
+
+
+
+
+ +
property bool behemothEvents
+
+
+
+
+ +
property float bigWreckageDespawnTime
+
+
+
+
+ +
property float collisionDamage
+
+
+
+
+ +
property float damageMultiplier
+
+
+
+
+ +
property bool devMode
+
+
+
+
+ +
property Difficulty difficulty
+
+
+
+
+ +
property bool dockingRestrictions
+
+
+
+
+ +
property float eventsFactor
+
+
+
+
+ +
property bool fullBuildingUnlocked
+
+
+
+
+ +
property bool infiniteResources
+
+
+
+
+ +
property int initialRelations
+
+
+
+
+ +
property int mapFactions[read-only]
+
+
+
+
+ +
property int maximumAllianceShips
+
+
+
+
+ +
property int maximumAllianceShipsPerMember
+
+
+
+
+ +
property int maximumAllianceStations
+
+
+
+
+ +
property int maximumAllianceStationsPerMember
+
+
+
+
+ +
property int maximumBlocksPerCraft
+
+
+
+
+ +
property int maximumFightersPerSectorAndPlayer
+
+
+
+
+ +
property int maximumPlayerShips
+
+
+
+
+ +
property int maximumPlayerStations
+
+
+
+
+ +
property int maximumStationsPerSector
+
+
+
+
+ +
property double maximumVolumePerShip
+
+
+
+
+ +
property double maximumVolumePerStation
+
+
+
+
+ +
property bool permaDestruction
+
+
+
+
+ +
property bool playTutorial
+
+
+
+
+ +
property bool preciseAIAim
+
+
+
+
+ +
property bool pvpDamage
+
+
+
+
+ +
property bool reconstructionAllowed[read-only]
+
+
+
+
+ +
property float relationGainFactor
+
+
+
+
+ +
property float relationLossFactor
+
+
+
+
+ +
property bool repairingAlwaysAllowed
+
+
+
+
+ +
property float resourceAsteroidFactor
+
+
+
+
+ +
property float resourceWreckageFactor
+
+
+
+
+ +
property float riftDamageFactor
+
+
+
+
+ +
property float riftMassFactor
+
+
+
+
+ +
property int rifts[read-only]
+
+
+
+
+ +
property bool safePlayerInput
+
+
+
+
+ +
property string seed
+
+
+
+
+ +
property bool shipyardBoundBuilding
+
+
+
+
+ +
property float smallWreckageDespawnTime
+
+
+
+
+ +
property int startingResources
+
+
+
+
+ +
property bool storyline
+
+
+
+
+ +
property bool unlimitedProcessingPower
+
+
+
+
+ +
property bool unlimitedShipSize
+
+
+
+
+
+
+

+function var activate()
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+
+
+ Overview +
Home + Functions + Search +
+
Search:
+Predefined Functions & Example Scripts +
Command +Entity +FactionDatabase +PlanGenerator +Player +Sector +Server +UsableInventoryItem +
+
+

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

+
+ +
+ + diff --git a/Documentation/GlowFX.html b/Documentation/GlowFX.html new file mode 100644 index 0000000..fe224fd --- /dev/null +++ b/Documentation/GlowFX.html @@ -0,0 +1,504 @@ + + + GlowFX + + + + +
+
+

Avorion Script API Documentation

+
+
+ +
+
Search:
+
+
+ + + + + + + + + + + + + + + + + +
+GlowFX +GlowFX +

Properties
+aliveTime +
+color +
+entityId +
+maxAliveTime +
+position +
+uvOffset +
+uvScale +
+visibilityCenter +
+visibilityRadius +

Member Functions
+
+
+
+

GlowFX

+

+This object is only available on the client. +

+
+
+

+function GlowFX()
+

+
+
+

Returns

+
+

+A new instance of GlowFX +

+
+

+
+
+
+
+ +
property float aliveTime
+
+
+
+
+ +
property vec4 color
+
+
+
+
+ +
property Uuid entityId
+
+
+
+
+ +
property float maxAliveTime
+
+
+
+
+ +
property Matrix position
+
+
+
+
+ +
property vec2 uvOffset
+
+
+
+
+ +
property vec2 uvScale
+
+
+
+
+ +
property vec3 visibilityCenter
+
+
+
+
+ +
property float visibilityRadius
+
+
+
+
+
+
+
+
+ Overview +
Home + Functions + Search +
+
Search:
+Predefined Functions & Example Scripts +
Command +Entity +FactionDatabase +PlanGenerator +Player +Sector +Server +UsableInventoryItem +
+
+

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

+
+ +
+ + diff --git a/Documentation/Group.html b/Documentation/Group.html new file mode 100644 index 0000000..d1c236f --- /dev/null +++ b/Documentation/Group.html @@ -0,0 +1,482 @@ + + + Group + + + + +
+
+

Avorion Script API Documentation

+
+
+ +
+
Search:
+
+
+ + + + + + + + + + + + + + +
+Group +Group +

Properties
+empty +
+id +
+leader +
+size +

Member Functions
+contains +
+getPlayers +
+
+
+
+

Group

+
+
+

+function Group()
+

+
+
+

Returns

+
+

+A new instance of Group +

+
+

+
+
+
+
+ +
property bool empty[read-only]
+
+
+
+
+ +
property int id[read-only]
+
+
+
+
+ +
property int leader[read-only]
+
+
+
+
+ +
property unsigned int size[read-only]
+
+
+
+
+
+
+

+function bool contains(int player)
+

+
+
+

+
+
+
+
+

+function int... getPlayers()
+

+
+
+

+
+
+
+
+
+
+ Overview +
Home + Functions + Search +
+
Search:
+Predefined Functions & Example Scripts +
Command +Entity +FactionDatabase +PlanGenerator +Player +Sector +Server +UsableInventoryItem +
+
+

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

+
+ +
+ + diff --git a/Documentation/Hangar.html b/Documentation/Hangar.html new file mode 100644 index 0000000..9460aa9 --- /dev/null +++ b/Documentation/Hangar.html @@ -0,0 +1,988 @@ + + + Hangar + + + + +
+
+

Avorion Script API Documentation

+
+
+ +
+
Search:
+ +
+

Hangar

+
+
+

+function Hangar(var id)
+

+
+
+

Parameters

+
+id +The id of the entity this component belongs to, or the entity itself, must be an id of an existing entity or nil for the entity in the current script context
+
+

Returns

+
+

+A new instance of Hangar +

+
+

+
+
+
+
+ +
property Entity entity[read-only]
+
+
+
+
+ +
property uuid entityId[read-only]
+
+
+
+
+ +
property float freeSpace[read-only]
+
+
+
+
+ +
property static int maxFighters[read-only]
+
+
+
+
+ +
property int maxSquads[read-only]
+
+
+
+
+ +
property static int minFighters[read-only]
+
+
+
+
+ +
property unsigned int numFighters[read-only]
+
+
+
+
+ +
property unsigned int numSquads[read-only]
+
+
+
+
+ +
property unsigned int numSupportedSquads[read-only]
+
+
+
+
+ +
property float occupiedSpace[read-only]
+
+
+
+
+ +
property static float space[read-only]
+
+
+
+
+
+
+

+function var addFighter(unsigned int squad, FighterTemplate fighter)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function unsigned int addSquad(string name)
+

+
+
+

+
+
+
+
+

+function bool canLand(Entity entity)
+

+
+
+

+
+
+
+
+

+function var clear()
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var collectAllFighters()
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function bool fighterTypeMatchesSquad(FighterTemplate fighter, unsigned int squadIndex)
+

+
+
+

+
+
+
+
+

+function FighterTemplate getBlueprint(unsigned int squadIndex)
+

+
+
+

+
+
+
+
+

+function FighterTemplate getFighter(unsigned int squadIndex, unsigned int fighterIndex)
+

+
+
+

+
+
+
+
+

+function double getFighterDPS()
+

+
+
+

+
+
+
+
+

+function Material getHighestMaterialInSquadMainCategory(unsigned int squadIndex)
+

+
+
+

+
+
+
+
+

+function Matrix getRandomStartPosition()
+

+
+
+

+
+
+
+
+

+function Squad getSquad(unsigned int index)
+

+
+
+

+Returns a full squad. Caution: This function has to do a lot of copy operations and is slow. +

+

Parameters

+
+index +The index of the squad to get
+
+

Returns

+
+

+A Squad object containing the squad, or nil if no squad with the given index exists +

+
+

+
+
+
+
+

+function double getSquadDPS(unsigned int squadIndex)
+

+
+
+

+
+
+
+
+

+function unsigned int getSquadFighters(unsigned int squadIndex)
+

+
+
+

+
+
+
+
+

+function var getSquadFighterType(unsigned int squadIndex)
+

+
+
+

+
+
+
+
+

+function unsigned int getSquadFreeSlots(unsigned int squadIndex)
+

+
+
+

+
+
+
+
+

+function bool getSquadHasRawMinersOrSalvagers(unsigned int squadIndex)
+

+
+
+

+
+
+
+
+

+function Uuid getSquadId(unsigned int squadIndex)
+

+
+
+

+
+
+
+
+

+function var getSquadMainWeaponCategory(unsigned int squadIndex)
+

+
+
+

+Returns the weapon type that most fighters of this squad are equipped with. Use this to determine if an AI controlled ship can use this squad to mine or salvage. In case mulitple weapon types are equally present a random one is returned. +

+

+
+
+
+
+

+function unsigned int getSquadMaxFighters(unsigned int squadIndex)
+

+
+
+

+
+
+
+
+

+function var getSquadName(unsigned int squadIndex)
+

+
+
+

+
+
+
+
+

+function unsigned int... getSquads()
+

+
+
+

+
+
+
+
+

+function var moveFighterToSquad(unsigned int squadIndex, unsigned int fighterIndex, unsigned int newSquadIndex)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var moveSquad(unsigned int squadIndex, unsigned int newSquadIndex)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var removeFighter(unsigned int index, unsigned int squad)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var removeSquad(unsigned int index)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var setBlueprint(unsigned int squad, FighterTemplate [or nil] fighter)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var setSquad(unsigned int index, Squad squad)
+

+
+
+

+Sets a full squad. Caution: This function has to do a lot of copy operations and is slow. +

+

Parameters

+
+index +The index of the squad to set
+squad +A Squad object that should be set as the given squad
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var setSquadName(unsigned int index, string newName)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+
+
+ Overview +
Home + Functions + Search +
+
Search:
+Predefined Functions & Example Scripts +
Command +Entity +FactionDatabase +PlanGenerator +Player +Sector +Server +UsableInventoryItem +
+
+

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

+
+ +
+ + diff --git a/Documentation/HighResolutionTimer.html b/Documentation/HighResolutionTimer.html new file mode 100644 index 0000000..bf13f44 --- /dev/null +++ b/Documentation/HighResolutionTimer.html @@ -0,0 +1,544 @@ + + + HighResolutionTimer + + + + +
+
+

Avorion Script API Documentation

+
+
+ +
+
Search:
+
+
+ + + + + + + + + + + + + + + + + +
+HighResolutionTimer +HighResolutionTimer +

Properties
+microseconds +
+milliseconds +
+running +
+seconds +
+secondsStr +

Member Functions
+reset +
+restart +
+start +
+stop +
+
+
+
+

HighResolutionTimer

+

+This timer has a higher resolution than the 'Timer' object, but can only be used for performance optimizations.
It is NOT synchronized with the system time. +

+
+
+

+function HighResolutionTimer()
+

+
+
+

Returns

+
+

+A new instance of HighResolutionTimer +

+
+

+
+
+
+
+ +
property int microseconds[read-only]
+
+
+
+
+ +
property int milliseconds[read-only]
+
+
+
+
+ +
property bool running[read-only]
+
+
+
+
+ +
property double seconds[read-only]
+
+
+
+
+ +
property string secondsStr[read-only]
+
+
+
+
+
+
+

+function var reset()
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var restart()
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var start()
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var stop()
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+
+
+ Overview +
Home + Functions + Search +
+
Search:
+Predefined Functions & Example Scripts +
Command +Entity +FactionDatabase +PlanGenerator +Player +Sector +Server +UsableInventoryItem +
+
+

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

+
+ +
+ + diff --git a/Documentation/Hud.html b/Documentation/Hud.html new file mode 100644 index 0000000..010c403 --- /dev/null +++ b/Documentation/Hud.html @@ -0,0 +1,898 @@ + + + Hud + + + + +
+
+

Avorion Script API Documentation

+
+
+ +
+
Search:
+ +
+

Hud : UIElement

+

+This object is only available on the client. +

+
+
+

+function Hud()
+

+
+
+

Returns

+
+

+A new instance of Hud +

+
+

+
+
+
+
+ +
property bool buildingUIVisible[read-only]
+
+
+
+
+ +
property bool mailWindowVisible[read-only]
+
+
+
+
+ +
property bool mouseOverSecondaryWindow[read-only]
+
+
+
+
+ +
property bool notificationsVisible
+
+
+
+
+ +
property bool playerTradeWindowVisible[read-only]
+
+
+
+
+ +
property bool playerWindowVisible[read-only]
+
+
+
+
+ +
property bool resourcesVisible[read-only]
+
+
+
+
+ +
property float shieldBarSaturation[write-only]
+
+
+
+
+ +
property bool shipWindowVisible[read-only]
+
+
+
+
+ +
property bool tutorialActive[read-only]
+
+
+
+
+ +
property vec2 center
+
+
+
+
+ +
property float height
+
+
+
+
+ +
property int index[read-only]
+
+
+
+
+ +
property int layer
+
+
+
+
+ +
property vec2 localCenter[read-only]
+
+
+
+
+ +
property vec2 localPosition[read-only]
+
+
+
+
+ +
property Rect localRect[read-only]
+
+
+
+
+ +
property vec2 lower
+
+
+
+
+ +
property bool mouseOver[read-only]
+
+
+
+
+ +
property vec2 position
+
+
+
+
+ +
property Rect rect
+
+
+
+
+ +
property vec2 size
+
+
+
+
+ +
property var tooltip
+
+
+
+
+ +
property int tooltipWidth[write-only]
+
+
+
+
+ +
property vec2 upper
+
+
+
+
+ +
property bool visible
+
+
+
+
+ +
property float width
+
+
+
+
+
+
+

+function var addMouseShowingWindow(Window window)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function UIContainer createContainer(Rect rect)
+

+
+
+

+
+
+
+
+

+function Window createWindow(Rect rect)
+

+
+
+

+
+
+
+
+

+function var displayHint(string text, var... highlights)
+

+
+
+

+Displays a prioritized hint with the given text. The hint won't have a 'Don't show again' field, and it will override all other hints while its active. Hint will be removed when no more objects can be highlighted (which will only happen in case of passing ids of entities that then are deleted or destroyed), or when it's overridden by another call to 'displayHint', or when the player clicks on the 'X', or when the script that did the call was deleted. +

+

Parameters

+
+text +Text that will be shown in the hint. Passing "" will disable the hint.
+highlights +Objects that should be highlighted. Can be any number of vec3, Rect, ids (string, Uuid) or Entity. Passing 0 objects will disable the hint.
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var displayNotification(string text, Color textColor, string icon, Color [or nil] iconColor, var alliance, var size, var iconPadding)
+

+
+
+

+Displays a notification on the right hand side, similar to warnings or error messages. +

+

Parameters

+
+text +The text of the notifiction
+textColor +Color of the text
+icon +Path to the icon that should be shown
+iconColor +Color of the icon
+alliance +If the notification is meant for the alliance (will show a small alliance banner next to the icon)
+size +Height of the notification in pixels
+iconPadding +Padding around the icon image (in percent from 0 to 1)
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var highlightScriptButton(string script)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var setCursor(var icon, var x, var y)
+

+
+
+

+Changes the cursor to another cursor. You should be very careful using this function and make sure that the cursor is always returned to what it was before once you don't need a special one any more. Passing nil as icon path will reset the cursor to default. +

+

Parameters

+
+icon +path to the icon that should be used as the cursor
+x +X coordinate in pixels of the center of the cursor in the icon
+y +Y coordinate in pixels of the center of the cursor in the icon
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var hide()
+

+
+
+

+Inherited from UIElement + +

+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function bool isMouseOverAndUnobscured()
+

+
+
+

+Inherited from UIElement + +

+

+
+
+
+
+

+function var show()
+

+
+
+

+Inherited from UIElement + +

+

Returns

+
+

+nothing +

+
+

+
+
+
+
+
+
+ Overview +
Home + Functions + Search +
+
Search:
+Predefined Functions & Example Scripts +
Command +Entity +FactionDatabase +PlanGenerator +Player +Sector +Server +UsableInventoryItem +
+
+

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

+
+ +
+ + diff --git a/Documentation/HyperspaceEngine.html b/Documentation/HyperspaceEngine.html new file mode 100644 index 0000000..faaf144 --- /dev/null +++ b/Documentation/HyperspaceEngine.html @@ -0,0 +1,818 @@ + + + HyperspaceEngine + + + + +
+
+

Avorion Script API Documentation

+
+
+ +
+
Search:
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+HyperspaceEngine +HyperspaceEngine +

Properties
+blocked +
+clearSpace +
+consumerIcon +
+consumerName +
+cooldown +
+cooldownSpeed +
+currentCooldown +
+defaultPriority +
+displayedCooldown +
+distorted +
+entity +
+entityId +
+isSceneEmpty +
+passBlocked +
+range +
+requiredEnergy +
+requiredEnergyForJump +

Member Functions
+block +
+distort +
+exhaust +
+getJumpErrors +
+isJumpRouteValid +
+jump +
+jumpPossible +
+tryJump +
+
+
+
+

HyperspaceEngine

+
+
+

+function HyperspaceEngine(var id)
+

+
+
+

Parameters

+
+id +The id of the entity this component belongs to, or the entity itself, must be an id of an existing entity or nil for the entity in the current script context
+
+

Returns

+
+

+A new instance of HyperspaceEngine +

+
+

+
+
+
+
+ +
property bool blocked[read-only]
+
+True if the hyperspace engine is being blocked. +
+
+
+ +
property bool clearSpace
+
+Sets the hyperspace engine to "clear space", which speeds up the cooldown to avoid annoying wait times in empty sectors. This value is overridden if the engine is or gets blocked or distorted. +
+
+
+ +
property string consumerIcon[read-only]
+
+Energy consumer icon of the engine as shown in the energy tab. +
+
+
+ +
property string consumerName[read-only]
+
+Energy consumer name of the engine as shown in the energy tab. +
+
+
+ +
property float cooldown
+
+Cooldown in seconds of the engine. Current cooldown is set to this on exhaustion of the hyperspace engine. When this value is changed, it will be overridden once the player builds, reloads or installs upgrades. +
+
+
+ +
property float cooldownSpeed[read-only]
+
+Cooldown speed factor. Default is 1, can be 0.25 (distorted), 0 (blocked) or up to 3 (clear space). If hyperspace energy efficiency is below 1, this value is adjusted accordingly. +
+
+
+ +
property float currentCooldown
+
+Current cooldown in seconds of the engine. this is the number that ticks down over time. +
+
+
+ +
property int defaultPriority[read-only]
+
+Energy consumer default priority of the engine as shown in the energy tab. +
+
+
+ +
property bool displayedCooldown[read-only]
+
+Cooldown in seconds as it would be displayed to the player. This result varies, depending on distorts, clear space or blockage. +
+
+
+ +
property bool distorted[read-only]
+
+True if the hyperspace engine is being distorted. This is the case when a ship is under attack or when distort() was called. +
+
+
+ +
property Entity entity[read-only]
+
+
+
+
+ +
property uuid entityId[read-only]
+
+
+
+
+ +
property bool isSceneEmpty[read-only]
+
+Checks if the scene is considered "empty enough" to set "clear space" to true, and thus recharge the engine quicker. This is the case when there are only group, own faction or alliance member ships present +
+
+
+ +
property bool passBlocked
+
+Whether or not the hyperspace engine is capable of jumping over rifts. When this value is changed, it will be overridden once the player builds or installs upgrades. +
+
+
+ +
property float range
+
+Range in sectors of the engine. When this value is changed, it will be overridden once the player builds or installs upgrades. +
+
+
+ +
property double requiredEnergy[read-only]
+
+Currently required energy of the engine as shown in the energy tab. +
+
+
+ +
property float requiredEnergyForJump[read-only]
+
+Amount of energy in W required to do a hyperspace jump (or rather: recharge the engine) +
+
+
+
+
+

+function var block(float time)
+

+
+
+

+Blocks the hyperspace engine for a certain time. While the hyperspace engine is blocked, it can't jump. For safety reasons, the hyperspace engine can only be blocked for a limited amount of time. You should only block it for a few seconds and then reblock it. Also sets the "clear space" property to false. +

+

Parameters

+
+time +The amount of time the engine will be blocked. Doesn't accumulate, overrides previous blocks
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var distort(float time)
+

+
+
+

+Distorts the hyperspace engine for a certain time. While the hyperspace engine is distorted, it takes 4x as long to recharge. For safety reasons, the hyperspace engine can only be distorted for a limited amount of time. You should only distort it for a few seconds and then redistort it. Also sets the "clear space" property to false. +

+

Parameters

+
+time +The amount of time the engine will be distorted. Doesn't accumulate, overrides previous distorts
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var exhaust()
+

+
+
+

+Exhausts the hyperspace engine as if when a jump happens. +

+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function int... getJumpErrors(int x, int y)
+

+
+
+

+Checks if a jump to a sector would be possible and returns all errors. +

+

Parameters

+
+x +X coordinate of the destination
+y +Y coordinate of the destination
+
+

Returns

+
+

+a set of JumpError codes containing the reasons why the jump is not possible +

+
+

+
+
+
+
+

+function bool, var isJumpRouteValid(int fromX, int fromY, int toX, int toY)
+

+
+
+

+Checks if a hyperspace route would be valid. +

+

Parameters

+
+fromX +X coordinate of the origin
+fromY +Y coordinate of the origin
+toX +X coordinate of the destination
+toY +Y coordinate of the destination
+
+

Returns

+
+

+Returns a bool (true, false), and, if false, a string containing the reason why it's invalid +

+
+

+
+
+
+
+

+function var jump(int x, int y)
+

+
+
+

+Initiates a hyperspace jump. This is what happens when the player presses space. This will always do the jump, no matter what. +

+

Parameters

+
+x +X coordinate of the destination
+y +Y coordinate of the destination
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function int jumpPossible(int x, int y)
+

+
+
+

+Checks if a jump to a sector would be possible. +

+

Parameters

+
+x +X coordinate of the destination
+y +Y coordinate of the destination
+
+

Returns

+
+

+a JumpError code containing the reason why the jump is not possible +

+
+

+
+
+
+
+

+function int tryJump(int x, int y)
+

+
+
+

+Tries to initiate a hyperspace jump. This is what happens when the player presses space. On failure, this will return a JumpError code with the reason. +

+

Parameters

+
+x +X coordinate of the destination
+y +Y coordinate of the destination
+
+

Returns

+
+

+a JumpError code containing the reason why the jump failed +

+
+

+
+
+
+
+
+
+ Overview +
Home + Functions + Search +
+
Search:
+Predefined Functions & Example Scripts +
Command +Entity +FactionDatabase +PlanGenerator +Player +Sector +Server +UsableInventoryItem +
+
+

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

+
+ +
+ + diff --git a/Documentation/IconSelectionItem.html b/Documentation/IconSelectionItem.html new file mode 100644 index 0000000..206dff9 --- /dev/null +++ b/Documentation/IconSelectionItem.html @@ -0,0 +1,459 @@ + + + IconSelectionItem + + + + +
+
+

Avorion Script API Documentation

+
+
+ +
+
Search:
+
+
+ + + + + + + + + + + + +
+IconSelectionItem +IconSelectionItem +

Properties
+borderColor +
+color +
+icon +
+vignette +

Member Functions
+
+
+
+

IconSelectionItem

+

+This object is only available on the client. +

+
+
+

+function IconSelectionItem(string other)
+

+
+
+

Returns

+
+

+A new instance of IconSelectionItem +

+
+

+
+
+
+
+ +
property Color borderColor
+
+
+
+
+ +
property Color color
+
+
+
+
+ +
property string icon
+
+
+
+
+ +
property bool vignette
+
+
+
+
+
+
+
+
+ Overview +
Home + Functions + Search +
+
Search:
+Predefined Functions & Example Scripts +
Command +Entity +FactionDatabase +PlanGenerator +Player +Sector +Server +UsableInventoryItem +
+
+

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

+
+ +
+ + diff --git a/Documentation/InputWindow.html b/Documentation/InputWindow.html new file mode 100644 index 0000000..a78d59b --- /dev/null +++ b/Documentation/InputWindow.html @@ -0,0 +1,1590 @@ + + + InputWindow + + + + +
+
+

Avorion Script API Documentation

+
+
+ +
+
Search:
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+InputWindow +InputWindow +

Properties
+cancelButton +
+label +
+okButton +
+onCancelFunction +
+onOKFunction +
+text +
+textBox +
+caption +
+clickThrough +
+closeableWithEscape +
+consumeAllEvents +
+moveable +
+shadeBackground +
+showCloseButton +
+transparency +
+center +
+height +
+index +
+layer +
+localCenter +
+localPosition +
+localRect +
+lower +
+mouseOver +
+position +
+rect +
+size +
+tooltip +
+tooltipWidth +
+upper +
+visible +
+width +

Member Functions
+show +
+center +
+clear +
+createAllianceEmblem +
+createArrowLine +
+createButton +
+createCaptainIcon +
+createCaptainProfile +
+createCheckBox +
+createComboBox +
+createContainer +
+createContextMenu +
+createCraftPortrait +
+createCrewBar +
+createFrame +
+createInputWindow +
+createInventorySelection +
+createLabel +
+createLine +
+createListBox +
+createListBoxEx +
+createMapArrowLine +
+createMapIcon +
+createMultiLineTextBox +
+createNumbersBar +
+createPicture +
+createPlanDisplayer +
+createProgressBar +
+createRect +
+createRoundButton +
+createSavedDesignsSelection +
+createScrollFrame +
+createSelection +
+createSlider +
+createStatisticsBar +
+createTabbedWindow +
+createTextBox +
+createTextField +
+createTooltipDisplayer +
+createTree +
+createValueComboBox +
+createWindow +
+hide +
+isMouseOverAndUnobscured +
+show +
+
+
+
+

InputWindow : Window

+

+This object is only available on the client. +

+
+
+

+function InputWindow(int index)
+

+
+
+

Returns

+
+

+A new instance of InputWindow +

+
+

+
+
+
+
+ +
property Button cancelButton[read-only]
+
+
+
+
+ +
property Label label[read-only]
+
+
+
+
+ +
property Button okButton[read-only]
+
+
+
+
+ +
property string onCancelFunction
+
+
+
+
+ +
property string onOKFunction
+
+
+
+
+ +
property string text[read-only]
+
+
+
+
+ +
property TextBox textBox[read-only]
+
+
+
+
+ +
property string caption
+
+
+
+
+ +
property bool clickThrough
+
+
+
+
+ +
property bool closeableWithEscape
+
+
+
+
+ +
property bool consumeAllEvents
+
+
+
+
+ +
property bool moveable
+
+
+
+
+ +
property bool shadeBackground
+
+
+
+
+ +
property bool showCloseButton
+
+
+
+
+ +
property float transparency
+
+
+
+
+ +
property vec2 center
+
+
+
+
+ +
property float height
+
+
+
+
+ +
property int index[read-only]
+
+
+
+
+ +
property int layer
+
+
+
+
+ +
property vec2 localCenter[read-only]
+
+
+
+
+ +
property vec2 localPosition[read-only]
+
+
+
+
+ +
property Rect localRect[read-only]
+
+
+
+
+ +
property vec2 lower
+
+
+
+
+ +
property bool mouseOver[read-only]
+
+
+
+
+ +
property vec2 position
+
+
+
+
+ +
property Rect rect
+
+
+
+
+ +
property vec2 size
+
+
+
+
+ +
property var tooltip
+
+
+
+
+ +
property int tooltipWidth[write-only]
+
+
+
+
+ +
property vec2 upper
+
+
+
+
+ +
property bool visible
+
+
+
+
+ +
property float width
+
+
+
+
+
+
+

+function var show(string caption)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var center()
+

+
+
+

+Inherited from Window + +

+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var clear()
+

+
+
+

+Inherited from UIContainer + +

+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function AllianceEmblem createAllianceEmblem(Rect rect, int allianceIndex)
+

+
+
+

+Inherited from UIContainer + +

+

+
+
+
+
+

+function ArrowLine createArrowLine()
+

+
+
+

+Inherited from UIContainer + +

+

+
+
+
+
+

+function Button createButton(Rect rect, string caption, string function)
+

+
+
+

+Inherited from UIContainer + +

+

+
+
+
+
+

+function CaptainIcon createCaptainIcon(Rect rect)
+

+
+
+

+Inherited from UIContainer + +

+

+
+
+
+
+

+function CaptainProfile createCaptainProfile(Rect rect)
+

+
+
+

+Inherited from UIContainer + +

+

+
+
+
+
+

+function CheckBox createCheckBox(Rect rect, string caption, string onCheckedFunction)
+

+
+
+

+Inherited from UIContainer + +

+

+
+
+
+
+

+function ComboBox createComboBox(Rect rect, string onSelectedFunction)
+

+
+
+

+Inherited from UIContainer + +

+

+
+
+
+
+

+function UIContainer createContainer(Rect rect)
+

+
+
+

+Inherited from UIContainer + +

+

+
+
+
+
+

+function ContextMenu createContextMenu()
+

+
+
+

+Inherited from UIContainer + +

+

+
+
+
+
+

+function CraftPortrait createCraftPortrait(Rect rect, string function)
+

+
+
+

+Inherited from UIContainer + +

+

+
+
+
+
+

+function CrewBar createCrewBar(Rect rect)
+

+
+
+

+Inherited from UIContainer + +

+

+
+
+
+
+

+function Frame createFrame(Rect rect)
+

+
+
+

+Inherited from UIContainer + +

+

+
+
+
+
+

+function InputWindow createInputWindow()
+

+
+
+

+Inherited from UIContainer + +

+

+
+
+
+
+

+function InventorySelection createInventorySelection(Rect rect, int width)
+

+
+
+

+Inherited from UIContainer + +

+

+
+
+
+
+

+function Label createLabel(var position, string caption, int fontSize)
+

+
+
+

+Inherited from UIContainer + +

+

+
+
+
+
+

+function Line createLine(vec2 a, vec2 b)
+

+
+
+

+Inherited from UIContainer + +

+

+
+
+
+
+

+function ListBox createListBox(Rect rect)
+

+
+
+

+Inherited from UIContainer + +

+

+
+
+
+
+

+function ListBoxEx createListBoxEx(Rect rect)
+

+
+
+

+Inherited from UIContainer + +

+

+
+
+
+
+

+function MapArrowLine createMapArrowLine()
+

+
+
+

+Inherited from UIContainer + +

+

+
+
+
+
+

+function MapIcon createMapIcon(string texture, ivec2 coordinates, Color [or nil] color)
+

+
+
+

+Inherited from UIContainer + +

+

+
+
+
+
+

+function MultiLineTextBox createMultiLineTextBox(Rect rect)
+

+
+
+

+Inherited from UIContainer + +

+

+
+
+
+
+

+function NumbersBar createNumbersBar(Rect rect)
+

+
+
+

+Inherited from UIContainer + +

+

+
+
+
+
+

+function Picture createPicture(Rect rect, string path)
+

+
+
+

+Inherited from UIContainer + +

+

+
+
+
+
+

+function PlanDisplayer createPlanDisplayer(Rect rect)
+

+
+
+

+Inherited from UIContainer + +

+

+
+
+
+
+

+function ProgressBar createProgressBar(Rect rect, Color color)
+

+
+
+

+Inherited from UIContainer + +

+

+
+
+
+
+

+function UIRect createRect(Rect rect, Color color)
+

+
+
+

+Inherited from UIContainer + +

+

+
+
+
+
+

+function Button createRoundButton(Rect rect, string icon, string function)
+

+
+
+

+Inherited from UIContainer + +

+

+
+
+
+
+

+function SavedDesignsSelection createSavedDesignsSelection(Rect rect, int width)
+

+
+
+

+Inherited from UIContainer + +

+

+
+
+
+
+

+function ScrollFrame createScrollFrame(Rect rect)
+

+
+
+

+Inherited from UIContainer + +

+

+
+
+
+
+

+function Selection createSelection(Rect rect, int width)
+

+
+
+

+Inherited from UIContainer + +

+

+
+
+
+
+

+function Slider createSlider(Rect rect, int min, int max, int steps, string caption, string onValueChangedFunction)
+

+
+
+

+Inherited from UIContainer + +

+

+
+
+
+
+

+function StatisticsBar createStatisticsBar(Rect rect, Color color)
+

+
+
+

+Inherited from UIContainer + +

+

+
+
+
+
+

+function TabbedWindow createTabbedWindow(Rect rect)
+

+
+
+

+Inherited from UIContainer + +

+

+
+
+
+
+

+function TextBox createTextBox(Rect rect, string onTextChangedFunction)
+

+
+
+

+Inherited from UIContainer + +

+

+
+
+
+
+

+function TextField createTextField(Rect rect, string text)
+

+
+
+

+Inherited from UIContainer + +

+

+
+
+
+
+

+function TooltipDisplayer createTooltipDisplayer(Rect rect)
+

+
+
+

+Inherited from UIContainer + +

+

+
+
+
+
+

+function Tree createTree(Rect rect)
+

+
+
+

+Inherited from UIContainer + +

+

+
+
+
+
+

+function ValueComboBox createValueComboBox(Rect rect, string onSelectedFunction)
+

+
+
+

+Inherited from UIContainer + +

+

+
+
+
+
+

+function Window createWindow(Rect rect)
+

+
+
+

+Inherited from UIContainer + +

+

+
+
+
+
+

+function var hide()
+

+
+
+

+Inherited from UIElement + +

+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function bool isMouseOverAndUnobscured()
+

+
+
+

+Inherited from UIElement + +

+

+
+
+
+
+

+function var show()
+

+
+
+

+Inherited from UIElement + +

+

Returns

+
+

+nothing +

+
+

+
+
+
+
+
+
+ Overview +
Home + Functions + Search +
+
Search:
+Predefined Functions & Example Scripts +
Command +Entity +FactionDatabase +PlanGenerator +Player +Sector +Server +UsableInventoryItem +
+
+

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

+
+ +
+ + diff --git a/Documentation/InteractionText.html b/Documentation/InteractionText.html new file mode 100644 index 0000000..b65f5fe --- /dev/null +++ b/Documentation/InteractionText.html @@ -0,0 +1,452 @@ + + + InteractionText + + + + +
+
+

Avorion Script API Documentation

+
+
+ +
+
Search:
+
+
+ + + + + + + + + + + +
+InteractionText +InteractionText +

Properties
+entity +
+entityId +
+text +

Member Functions
+
+
+
+

InteractionText

+
+
+

+function InteractionText(var id)
+

+
+
+

Parameters

+
+id +The id of the entity this component belongs to, or the entity itself, must be an id of an existing entity or nil for the entity in the current script context
+
+

Returns

+
+

+A new instance of InteractionText +

+
+

+
+
+
+
+ +
property Entity entity[read-only]
+
+
+
+
+ +
property uuid entityId[read-only]
+
+
+
+
+ +
property string text
+
+
+
+
+
+
+
+
+ Overview +
Home + Functions + Search +
+
Search:
+Predefined Functions & Example Scripts +
Command +Entity +FactionDatabase +PlanGenerator +Player +Sector +Server +UsableInventoryItem +
+
+

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

+
+ +
+ + diff --git a/Documentation/Inventory.html b/Documentation/Inventory.html new file mode 100644 index 0000000..637618c --- /dev/null +++ b/Documentation/Inventory.html @@ -0,0 +1,684 @@ + + + Inventory + + + + +
+
+

Avorion Script API Documentation

+
+
+ +
+
Search:
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Inventory +Inventory +

Properties
+empty +
+items +
+maxSlots +
+occupiedSlots +

Member Functions
+add +
+addAt +
+addOrDrop +
+amount +
+clear +
+find +
+getItems +
+getItemsByType +
+hasSlot +
+remove +
+removeAll +
+setAmount +
+setItemTags +
+slotEmpty +
+take +
+
+
+
+

Inventory

+
+
+

+function Inventory()
+

+
+
+

+This is the default constructor of Inventory. No further arguments are required. +

+

Returns

+
+

+A new instance of Inventory +

+
+

+
+
+
+
+ +
property bool empty[read-only]
+
+
+
+
+ +
property unsigned int items[read-only]
+
+
+
+
+ +
property unsigned int maxSlots[read-only]
+
+
+
+
+ +
property unsigned int occupiedSlots[read-only]
+
+
+
+
+
+
+

+function unsigned int add(InventoryItem item, var recent)
+

+
+
+

+
+
+
+
+

+function unsigned int addAt(InventoryItem item, unsigned int index, unsigned int amount, var recent)
+

+
+
+

+
+
+
+
+

+function var addOrDrop(InventoryItem item, var recent)
+

+
+
+

+
+
+
+
+

+function unsigned int amount(unsigned int index)
+

+
+
+

+
+
+
+
+

+function var clear()
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function InventoryItem find(unsigned int index)
+

+
+
+

+
+
+
+
+

+function table<int, table<unsigned int, InventoryItem>> getItems()
+

+
+
+

+
+
+
+
+

+function table<int, table<unsigned int, InventoryItem>> getItemsByType(InventoryItemType type)
+

+
+
+

+
+
+
+
+

+function bool hasSlot(InventoryItem item)
+

+
+
+

+
+
+
+
+

+function var remove(unsigned int index)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var removeAll(unsigned int index)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var setAmount(unsigned int index, unsigned int amount)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var setItemTags(unsigned int index, bool favorite, bool trash)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function bool slotEmpty(unsigned int index)
+

+
+
+

+
+
+
+
+

+function InventoryItem take(unsigned int index)
+

+
+
+

+
+
+
+
+
+
+ Overview +
Home + Functions + Search +
+
Search:
+Predefined Functions & Example Scripts +
Command +Entity +FactionDatabase +PlanGenerator +Player +Sector +Server +UsableInventoryItem +
+
+

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

+
+ +
+ + diff --git a/Documentation/InventoryItemLoot.html b/Documentation/InventoryItemLoot.html new file mode 100644 index 0000000..7477af6 --- /dev/null +++ b/Documentation/InventoryItemLoot.html @@ -0,0 +1,434 @@ + + + InventoryItemLoot + + + + +
+
+

Avorion Script API Documentation

+
+
+ +
+
Search:
+
+
+ + + + + + + + + +
+InventoryItemLoot +InventoryItemLoot +

Properties
+item +

Member Functions
+
+
+
+

InventoryItemLoot

+
+
+

+function InventoryItemLoot(var id)
+

+
+
+

Parameters

+
+id +The id of the entity this component belongs to, or the entity itself, must be an id of an existing entity or nil for the entity in the current script context
+
+

Returns

+
+

+A new instance of InventoryItemLoot +

+
+

+
+
+
+
+ +
property InventoryItem item
+
+
+
+
+
+
+
+
+ Overview +
Home + Functions + Search +
+
Search:
+Predefined Functions & Example Scripts +
Command +Entity +FactionDatabase +PlanGenerator +Player +Sector +Server +UsableInventoryItem +
+
+

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

+
+ +
+ + diff --git a/Documentation/InventoryReferenceSelectionItem.html b/Documentation/InventoryReferenceSelectionItem.html new file mode 100644 index 0000000..d2e62ee --- /dev/null +++ b/Documentation/InventoryReferenceSelectionItem.html @@ -0,0 +1,522 @@ + + + InventoryReferenceSelectionItem + + + + +
+
+

Avorion Script API Documentation

+
+
+ +
+
Search:
+
+
+ + + + + + + + + + + + + + + + + + + +
+InventoryReferenceSelectionItem +InventoryReferenceSelectionItem +

Properties
+amount +
+border +
+deleteable +
+favorite +
+highlighted +
+index +
+item +
+readyForDeletion +
+recent +
+trash +
+uvalue +

Member Functions
+
+
+
+

InventoryReferenceSelectionItem

+

+This object is only available on the client. +

+
+
+

+function InventoryReferenceSelectionItem()
+

+
+
+

Returns

+
+

+A new instance of InventoryReferenceSelectionItem +

+
+

+
+
+
+
+ +
property var amount
+
+
+
+
+ +
property IconBorderMode border[read-only]
+
+
+
+
+ +
property bool deleteable
+
+
+
+
+ +
property bool favorite[read-only]
+
+
+
+
+ +
property bool highlighted
+
+
+
+
+ +
property int index
+
+
+
+
+ +
property InventoryItem item[read-only]
+
+
+
+
+ +
property bool readyForDeletion
+
+
+
+
+ +
property bool recent[read-only]
+
+
+
+
+ +
property bool trash[read-only]
+
+
+
+
+ +
property var uvalue
+
+
+
+
+
+
+
+
+ Overview +
Home + Functions + Search +
+
Search:
+Predefined Functions & Example Scripts +
Command +Entity +FactionDatabase +PlanGenerator +Player +Sector +Server +UsableInventoryItem +
+
+

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

+
+ +
+ + diff --git a/Documentation/InventorySelection.html b/Documentation/InventorySelection.html new file mode 100644 index 0000000..329d432 --- /dev/null +++ b/Documentation/InventorySelection.html @@ -0,0 +1,1888 @@ + + + InventorySelection + + + + +
+
+

Avorion Script API Documentation

+
+
+ +
+
Search:
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+InventorySelection +InventorySelection +

Properties
+contextMenuAllowed +
+dragFromEnabled +
+dropIntoEnabled +
+dropIntoSelfEnabled +
+entriesHighlightable +
+entriesSelectable +
+filterTextBox +
+isRenderingDraggedItem +
+label +
+maxHorizontalEntries +
+numEntries +
+onClickedFunction +
+onDeselectedFunction +
+onDroppedFunction +
+onEntriesSortedFunction +
+onInsertedFunction +
+onReceivedFunction +
+onSelectedFunction +
+padding +
+selected +
+selectedKey +
+selection +
+sortCombo +
+sortMode +
+center +
+height +
+index +
+layer +
+localCenter +
+localPosition +
+localRect +
+lower +
+mouseOver +
+position +
+rect +
+size +
+tooltip +
+tooltipWidth +
+upper +
+visible +
+width +

Member Functions
+add +
+addEmpty +
+clear +
+fill +
+getItem +
+getItems +
+getMouseOveredKey +
+getRect +
+remove +
+select +
+selectNoCallback +
+setAdditionalHints +
+setShowScrollArrows +
+unselect +
+update +
+clear +
+createAllianceEmblem +
+createArrowLine +
+createButton +
+createCaptainIcon +
+createCaptainProfile +
+createCheckBox +
+createComboBox +
+createContainer +
+createContextMenu +
+createCraftPortrait +
+createCrewBar +
+createFrame +
+createInputWindow +
+createInventorySelection +
+createLabel +
+createLine +
+createListBox +
+createListBoxEx +
+createMapArrowLine +
+createMapIcon +
+createMultiLineTextBox +
+createNumbersBar +
+createPicture +
+createPlanDisplayer +
+createProgressBar +
+createRect +
+createRoundButton +
+createSavedDesignsSelection +
+createScrollFrame +
+createSelection +
+createSlider +
+createStatisticsBar +
+createTabbedWindow +
+createTextBox +
+createTextField +
+createTooltipDisplayer +
+createTree +
+createValueComboBox +
+createWindow +
+hide +
+isMouseOverAndUnobscured +
+show +
+
+
+
+

InventorySelection : UIContainer

+

+This object is only available on the client. +

+
+
+

+function InventorySelection(int index)
+

+
+
+

Returns

+
+

+A new instance of InventorySelection +

+
+

+
+
+
+
+ +
property bool contextMenuAllowed
+
+
+
+
+ +
property bool dragFromEnabled[write-only]
+
+
+
+
+ +
property bool dropIntoEnabled[write-only]
+
+
+
+
+ +
property bool dropIntoSelfEnabled[write-only]
+
+
+
+
+ +
property bool entriesHighlightable[write-only]
+
+
+
+
+ +
property bool entriesSelectable[write-only]
+
+
+
+
+ +
property TextBox filterTextBox[read-only]
+
+
+
+
+ +
property bool isRenderingDraggedItem[read-only]
+
+
+
+
+ +
property Label label[read-only]
+
+
+
+
+ +
property unsigned int maxHorizontalEntries[read-only]
+
+
+
+
+ +
property int numEntries[read-only]
+
+
+
+
+ +
property string onClickedFunction
+
+
+
+
+ +
property string onDeselectedFunction
+
+
+
+
+ +
property string onDroppedFunction
+
+
+
+
+ +
property string onEntriesSortedFunction
+
+
+
+
+ +
property string onInsertedFunction
+
+
+
+
+ +
property string onReceivedFunction
+
+
+
+
+ +
property string onSelectedFunction
+
+
+
+
+ +
property float padding[write-only]
+
+
+
+
+ +
property UserObject selected[read-only]
+
+
+
+
+ +
property ivec2 selectedKey[read-only]
+
+
+
+
+ +
property Selection selection[read-only]
+
+
+
+
+ +
property ComboBox sortCombo[read-only]
+
+
+
+
+ +
property int sortMode
+
+
+
+
+ +
property vec2 center
+
+
+
+
+ +
property float height
+
+
+
+
+ +
property int index[read-only]
+
+
+
+
+ +
property int layer
+
+
+
+
+ +
property vec2 localCenter[read-only]
+
+
+
+
+ +
property vec2 localPosition[read-only]
+
+
+
+
+ +
property Rect localRect[read-only]
+
+
+
+
+ +
property vec2 lower
+
+
+
+
+ +
property bool mouseOver[read-only]
+
+
+
+
+ +
property vec2 position
+
+
+
+
+ +
property Rect rect
+
+
+
+
+ +
property vec2 size
+
+
+
+
+ +
property var tooltip
+
+
+
+
+ +
property int tooltipWidth[write-only]
+
+
+
+
+ +
property vec2 upper
+
+
+
+
+ +
property bool visible
+
+
+
+
+ +
property float width
+
+
+
+
+
+
+

+function var add(var item, var pos)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var addEmpty(var pos)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var clear()
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var fill()
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function UserObject getItem(ivec2 key)
+

+
+
+

+
+
+
+
+

+function table<ivec2, UserObject> getItems()
+

+
+
+

+
+
+
+
+

+function ivec2 getMouseOveredKey()
+

+
+
+

+
+
+
+
+

+function int, Rect getRect(int x, int y)
+

+
+
+

+
+
+
+
+

+function var remove(ivec2 key)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var select(ivec2 pos)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var selectNoCallback(ivec2 pos)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var setAdditionalHints()
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var setShowScrollArrows(bool showTop, bool showBottom, float width)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var unselect()
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var update(int factionIndex, unsigned int index)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var clear()
+

+
+
+

+Inherited from UIContainer + +

+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function AllianceEmblem createAllianceEmblem(Rect rect, int allianceIndex)
+

+
+
+

+Inherited from UIContainer + +

+

+
+
+
+
+

+function ArrowLine createArrowLine()
+

+
+
+

+Inherited from UIContainer + +

+

+
+
+
+
+

+function Button createButton(Rect rect, string caption, string function)
+

+
+
+

+Inherited from UIContainer + +

+

+
+
+
+
+

+function CaptainIcon createCaptainIcon(Rect rect)
+

+
+
+

+Inherited from UIContainer + +

+

+
+
+
+
+

+function CaptainProfile createCaptainProfile(Rect rect)
+

+
+
+

+Inherited from UIContainer + +

+

+
+
+
+
+

+function CheckBox createCheckBox(Rect rect, string caption, string onCheckedFunction)
+

+
+
+

+Inherited from UIContainer + +

+

+
+
+
+
+

+function ComboBox createComboBox(Rect rect, string onSelectedFunction)
+

+
+
+

+Inherited from UIContainer + +

+

+
+
+
+
+

+function UIContainer createContainer(Rect rect)
+

+
+
+

+Inherited from UIContainer + +

+

+
+
+
+
+

+function ContextMenu createContextMenu()
+

+
+
+

+Inherited from UIContainer + +

+

+
+
+
+
+

+function CraftPortrait createCraftPortrait(Rect rect, string function)
+

+
+
+

+Inherited from UIContainer + +

+

+
+
+
+
+

+function CrewBar createCrewBar(Rect rect)
+

+
+
+

+Inherited from UIContainer + +

+

+
+
+
+
+

+function Frame createFrame(Rect rect)
+

+
+
+

+Inherited from UIContainer + +

+

+
+
+
+
+

+function InputWindow createInputWindow()
+

+
+
+

+Inherited from UIContainer + +

+

+
+
+
+
+

+function InventorySelection createInventorySelection(Rect rect, int width)
+

+
+
+

+Inherited from UIContainer + +

+

+
+
+
+
+

+function Label createLabel(var position, string caption, int fontSize)
+

+
+
+

+Inherited from UIContainer + +

+

+
+
+
+
+

+function Line createLine(vec2 a, vec2 b)
+

+
+
+

+Inherited from UIContainer + +

+

+
+
+
+
+

+function ListBox createListBox(Rect rect)
+

+
+
+

+Inherited from UIContainer + +

+

+
+
+
+
+

+function ListBoxEx createListBoxEx(Rect rect)
+

+
+
+

+Inherited from UIContainer + +

+

+
+
+
+
+

+function MapArrowLine createMapArrowLine()
+

+
+
+

+Inherited from UIContainer + +

+

+
+
+
+
+

+function MapIcon createMapIcon(string texture, ivec2 coordinates, Color [or nil] color)
+

+
+
+

+Inherited from UIContainer + +

+

+
+
+
+
+

+function MultiLineTextBox createMultiLineTextBox(Rect rect)
+

+
+
+

+Inherited from UIContainer + +

+

+
+
+
+
+

+function NumbersBar createNumbersBar(Rect rect)
+

+
+
+

+Inherited from UIContainer + +

+

+
+
+
+
+

+function Picture createPicture(Rect rect, string path)
+

+
+
+

+Inherited from UIContainer + +

+

+
+
+
+
+

+function PlanDisplayer createPlanDisplayer(Rect rect)
+

+
+
+

+Inherited from UIContainer + +

+

+
+
+
+
+

+function ProgressBar createProgressBar(Rect rect, Color color)
+

+
+
+

+Inherited from UIContainer + +

+

+
+
+
+
+

+function UIRect createRect(Rect rect, Color color)
+

+
+
+

+Inherited from UIContainer + +

+

+
+
+
+
+

+function Button createRoundButton(Rect rect, string icon, string function)
+

+
+
+

+Inherited from UIContainer + +

+

+
+
+
+
+

+function SavedDesignsSelection createSavedDesignsSelection(Rect rect, int width)
+

+
+
+

+Inherited from UIContainer + +

+

+
+
+
+
+

+function ScrollFrame createScrollFrame(Rect rect)
+

+
+
+

+Inherited from UIContainer + +

+

+
+
+
+
+

+function Selection createSelection(Rect rect, int width)
+

+
+
+

+Inherited from UIContainer + +

+

+
+
+
+
+

+function Slider createSlider(Rect rect, int min, int max, int steps, string caption, string onValueChangedFunction)
+

+
+
+

+Inherited from UIContainer + +

+

+
+
+
+
+

+function StatisticsBar createStatisticsBar(Rect rect, Color color)
+

+
+
+

+Inherited from UIContainer + +

+

+
+
+
+
+

+function TabbedWindow createTabbedWindow(Rect rect)
+

+
+
+

+Inherited from UIContainer + +

+

+
+
+
+
+

+function TextBox createTextBox(Rect rect, string onTextChangedFunction)
+

+
+
+

+Inherited from UIContainer + +

+

+
+
+
+
+

+function TextField createTextField(Rect rect, string text)
+

+
+
+

+Inherited from UIContainer + +

+

+
+
+
+
+

+function TooltipDisplayer createTooltipDisplayer(Rect rect)
+

+
+
+

+Inherited from UIContainer + +

+

+
+
+
+
+

+function Tree createTree(Rect rect)
+

+
+
+

+Inherited from UIContainer + +

+

+
+
+
+
+

+function ValueComboBox createValueComboBox(Rect rect, string onSelectedFunction)
+

+
+
+

+Inherited from UIContainer + +

+

+
+
+
+
+

+function Window createWindow(Rect rect)
+

+
+
+

+Inherited from UIContainer + +

+

+
+
+
+
+

+function var hide()
+

+
+
+

+Inherited from UIElement + +

+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function bool isMouseOverAndUnobscured()
+

+
+
+

+Inherited from UIElement + +

+

+
+
+
+
+

+function var show()
+

+
+
+

+Inherited from UIElement + +

+

Returns

+
+

+nothing +

+
+

+
+
+
+
+
+
+ Overview +
Home + Functions + Search +
+
Search:
+Predefined Functions & Example Scripts +
Command +Entity +FactionDatabase +PlanGenerator +Player +Sector +Server +UsableInventoryItem +
+
+

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

+
+ +
+ + diff --git a/Documentation/InventorySelectionItem.html b/Documentation/InventorySelectionItem.html new file mode 100644 index 0000000..fa833a1 --- /dev/null +++ b/Documentation/InventorySelectionItem.html @@ -0,0 +1,486 @@ + + + InventorySelectionItem + + + + +
+
+

Avorion Script API Documentation

+
+
+ +
+
Search:
+
+
+ + + + + + + + + + + + + + + +
+InventorySelectionItem +InventorySelectionItem +

Properties
+amount +
+border +
+deleteable +
+highlighted +
+item +
+readyForDeletion +
+uvalue +

Member Functions
+
+
+
+

InventorySelectionItem

+

+This object is only available on the client. +

+
+
+

+function InventorySelectionItem()
+

+
+
+

Returns

+
+

+A new instance of InventorySelectionItem +

+
+

+
+
+
+
+ +
property var amount
+
+
+
+
+ +
property IconBorderMode border
+
+
+
+
+ +
property bool deleteable
+
+
+
+
+ +
property bool highlighted
+
+
+
+
+ +
property InventoryItem item
+
+
+
+
+ +
property bool readyForDeletion
+
+
+
+
+ +
property var uvalue
+
+
+
+
+
+
+
+
+ Overview +
Home + Functions + Search +
+
Search:
+Predefined Functions & Example Scripts +
Command +Entity +FactionDatabase +PlanGenerator +Player +Sector +Server +UsableInventoryItem +
+
+

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

+
+ +
+ + diff --git a/Documentation/InventoryTurret.html b/Documentation/InventoryTurret.html new file mode 100644 index 0000000..7811cc5 --- /dev/null +++ b/Documentation/InventoryTurret.html @@ -0,0 +1,1324 @@ + + + InventoryTurret + + + + +
+
+

Avorion Script API Documentation

+
+
+ +
+
Search:
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+InventoryTurret +InventoryTurret +

Properties
+accuracy +
+ancient +
+armed +
+averageTech +
+baseEnergyPerSecond +
+bestEfficiency +
+blackMarketDLCOnly +
+category +
+civil +
+coaxial +
+continuousBeam +
+coolingRate +
+coolingTime +
+coolingType +
+crew +
+damage +
+damageType +
+deathExplosion +
+dps +
+energyIncreasePerSecond +
+favorite +
+fireRate +
+firing +
+firingsPerSecond +
+flavorText +
+heat +
+heatPerShot +
+holdingForce +
+hullDamageMultiplicator +
+hullDamageMultiplier +
+hullRepairRate +
+intoTheRiftDLCOnly +
+itemType +
+material +
+maxHeat +
+maxTech +
+metalBestEfficiency +
+metalRawEfficiency +
+metalRefinedEfficiency +
+missionRelevant +
+name +
+numVisibleWeapons +
+numWeapons +
+otherForce +
+overheated +
+rarity +
+reach +
+recent +
+requiredShootingEnergy +
+seeker +
+selfForce +
+shieldDamageMultiplicator +
+shieldDamageMultiplier +
+shieldPenetration +
+shieldRepairRate +
+shootingTime +
+shotSpeed +
+shotsPerFiring +
+shotsPerSecond +
+shotsUntilOverheated +
+simultaneousShooting +
+size +
+slots +
+slotType +
+stackable +
+stoneBestEfficiency +
+stoneDamageMultiplicator +
+stoneDamageMultiplier +
+stoneRawEfficiency +
+stoneRefinedEfficiency +
+title +
+trash +
+turningSpeed +
+weaponIcon +
+weaponName +
+weaponPrefix +

Member Functions
+__eq +
+addDescription +
+addWeapon +
+clearDescriptions +
+clearWeapons +
+getCrew +
+getDescriptions +
+getWeapons +
+setBlackMarketDLCOnly +
+setIntoTheRiftDLCOnly +
+setRange +
+template +
+updateStaticStats +
+
+
+
+

InventoryTurret

+
+
+

+function InventoryTurret(TurretTemplate [or nil] other)
+

+
+
+

Returns

+
+

+A new instance of InventoryTurret +

+
+

+
+
+
+
+ +
property float accuracy[read-only]
+
+
+
+
+ +
property bool ancient
+
+
+
+
+ +
property bool armed[read-only]
+
+
+
+
+ +
property int averageTech[read-only]
+
+
+
+
+ +
property float baseEnergyPerSecond
+
+
+
+
+ +
property float bestEfficiency[read-only]
+
+
+
+
+ +
property bool blackMarketDLCOnly[read-only]
+
+
+
+
+ +
property WeaponCategory category[read-only]
+
+
+
+
+ +
property bool civil[read-only]
+
+
+
+
+ +
property bool coaxial
+
+
+
+
+ +
property bool continuousBeam[read-only]
+
+
+
+
+ +
property float coolingRate
+
+
+
+
+ +
property float coolingTime[read-only]
+
+
+
+
+ +
property int coolingType
+
+
+
+
+ +
property Crew crew
+
+
+
+
+ +
property float damage[read-only]
+
+
+
+
+ +
property int damageType[read-only]
+
+
+
+
+ +
property bool deathExplosion[read-only]
+
+
+
+
+ +
property float dps[read-only]
+
+
+
+
+ +
property float energyIncreasePerSecond
+
+
+
+
+ +
property bool favorite
+
+
+
+
+ +
property float fireRate[read-only]
+
+
+
+
+ +
property bool firing
+
+
+
+
+ +
property float firingsPerSecond[read-only]
+
+
+
+
+ +
property var flavorText
+
+
+
+
+ +
property float heat[read-only]
+
+
+
+
+ +
property float heatPerShot
+
+
+
+
+ +
property float holdingForce[read-only]
+
+
+
+
+ +
property float hullDamageMultiplicator[read-only]
+
+
+
+
+ +
property float hullDamageMultiplier[read-only]
+
+
+
+
+ +
property float hullRepairRate[read-only]
+
+
+
+
+ +
property bool intoTheRiftDLCOnly[read-only]
+
+
+
+
+ +
property int itemType[read-only]
+
+
+
+
+ +
property Material material[read-only]
+
+
+
+
+ +
property float maxHeat
+
+
+
+
+ +
property int maxTech[read-only]
+
+
+
+
+ +
property float metalBestEfficiency[read-only]
+
+
+
+
+ +
property float metalRawEfficiency[read-only]
+
+
+
+
+ +
property float metalRefinedEfficiency[read-only]
+
+
+
+
+ +
property bool missionRelevant
+
+
+
+
+ +
property var name[read-only]
+
+
+
+
+ +
property int numVisibleWeapons[read-only]
+
+
+
+
+ +
property int numWeapons[read-only]
+
+
+
+
+ +
property float otherForce[read-only]
+
+
+
+
+ +
property bool overheated[read-only]
+
+
+
+
+ +
property Rarity rarity[read-only]
+
+
+
+
+ +
property float reach[read-only]
+
+
+
+
+ +
property bool recent
+
+
+
+
+ +
property double requiredShootingEnergy[read-only]
+
+
+
+
+ +
property bool seeker[read-only]
+
+
+
+
+ +
property float selfForce[read-only]
+
+
+
+
+ +
property float shieldDamageMultiplicator[read-only]
+
+
+
+
+ +
property float shieldDamageMultiplier[read-only]
+
+
+
+
+ +
property float shieldPenetration[read-only]
+
+
+
+
+ +
property float shieldRepairRate[read-only]
+
+
+
+
+ +
property float shootingTime[read-only]
+
+
+
+
+ +
property float shotSpeed[read-only]
+
+
+
+
+ +
property int shotsPerFiring[read-only]
+
+
+
+
+ +
property float shotsPerSecond[read-only]
+
+
+
+
+ +
property int shotsUntilOverheated[read-only]
+
+
+
+
+ +
property bool simultaneousShooting
+
+
+
+
+ +
property float size
+
+
+
+
+ +
property int slots
+
+
+
+
+ +
property TurretSlotType slotType
+
+
+
+
+ +
property bool stackable[read-only]
+
+
+
+
+ +
property float stoneBestEfficiency[read-only]
+
+
+
+
+ +
property float stoneDamageMultiplicator[read-only]
+
+
+
+
+ +
property float stoneDamageMultiplier[read-only]
+
+
+
+
+ +
property float stoneRawEfficiency[read-only]
+
+
+
+
+ +
property float stoneRefinedEfficiency[read-only]
+
+
+
+
+ +
property var title
+
+
+
+
+ +
property bool trash
+
+
+
+
+ +
property float turningSpeed
+
+
+
+
+ +
property string weaponIcon[read-only]
+
+
+
+
+ +
property string weaponName[read-only]
+
+
+
+
+ +
property string weaponPrefix[read-only]
+
+
+
+
+
+
+

+function bool __eq(var other)
+

+
+
+

+
+
+
+
+

+function var addDescription(string str, string value)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var addWeapon(var weapon)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var clearDescriptions()
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var clearWeapons()
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function Crew getCrew()
+

+
+
+

+
+
+
+
+

+function table<string, string> getDescriptions()
+

+
+
+

+
+
+
+
+

+function Weapon... getWeapons()
+

+
+
+

+Returns all weapons of the object +

+

+
+
+
+
+

+function var setBlackMarketDLCOnly()
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var setIntoTheRiftDLCOnly()
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var setRange(float range)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function TurretTemplate template()
+

+
+
+

+
+
+
+
+

+function var updateStaticStats()
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+
+
+ Overview +
Home + Functions + Search +
+
Search:
+Predefined Functions & Example Scripts +
Command +Entity +FactionDatabase +PlanGenerator +Player +Sector +Server +UsableInventoryItem +
+
+

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

+
+ +
+ + diff --git a/Documentation/Keyboard.html b/Documentation/Keyboard.html new file mode 100644 index 0000000..ad4e407 --- /dev/null +++ b/Documentation/Keyboard.html @@ -0,0 +1,501 @@ + + + Keyboard + + + + +
+
+

Avorion Script API Documentation

+
+
+ +
+
Search:
+
+
+ + + + + + + + + + + + + + + +
+Keyboard +Keyboard +

Properties
+altPressed +
+controlPressed +
+modifierKeyPressed +
+shiftPressed +

Member Functions
+keyDown +
+keyPressed +
+keyUp +
+
+
+
+

Keyboard

+

+This object is only available on the client. +

+
+
+

+function Keyboard()
+

+
+
+

+This is the default constructor of Keyboard. No further arguments are required. +

+

Returns

+
+

+A new instance of Keyboard +

+
+

+
+
+
+
+ +
property bool altPressed[read-only]
+
+
+
+
+ +
property bool controlPressed[read-only]
+
+
+
+
+ +
property bool modifierKeyPressed[read-only]
+
+
+
+
+ +
property bool shiftPressed[read-only]
+
+
+
+
+
+
+

+function bool keyDown(var value)
+

+
+
+

+
+
+
+
+

+function bool keyPressed(var value)
+

+
+
+

+
+
+
+
+

+function bool keyUp(var value)
+

+
+
+

+
+
+
+
+
+
+ Overview +
Home + Functions + Search +
+
Search:
+Predefined Functions & Example Scripts +
Command +Entity +FactionDatabase +PlanGenerator +Player +Sector +Server +UsableInventoryItem +
+
+

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

+
+ +
+ + diff --git a/Documentation/Label.html b/Documentation/Label.html new file mode 100644 index 0000000..ff369b1 --- /dev/null +++ b/Documentation/Label.html @@ -0,0 +1,951 @@ + + + Label + + + + +
+
+

Avorion Script API Documentation

+
+
+ +
+
Search:
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Label +Label +

Properties
+active +
+bold +
+caption +
+centered +
+color +
+font +
+fontSize +
+italic +
+mouseDownFunction +
+outline +
+shortenText +
+strikethrough +
+textWidth +
+underlined +
+wordBreak +
+center +
+height +
+index +
+layer +
+localCenter +
+localPosition +
+localRect +
+lower +
+mouseOver +
+position +
+rect +
+size +
+tooltip +
+tooltipWidth +
+upper +
+visible +
+width +

Member Functions
+setBottomAligned +
+setBottomLeftAligned +
+setBottomRightAligned +
+setCenterAligned +
+setLeftAligned +
+setRightAligned +
+setTopAligned +
+setTopLeftAligned +
+setTopRightAligned +
+hide +
+isMouseOverAndUnobscured +
+show +
+
+
+
+

Label : UIElement

+

+This object is only available on the client. +

+
+
+

+function Label(int index)
+

+
+
+

Returns

+
+

+A new instance of Label +

+
+

+
+
+
+
+ +
property bool active[write-only]
+
+
+
+
+ +
property bool bold[write-only]
+
+
+
+
+ +
property string caption
+
+
+
+
+ +
property bool centered[write-only]
+
+
+
+
+ +
property Color color[write-only]
+
+
+
+
+ +
property int font[write-only]
+
+
+
+
+ +
property int fontSize[write-only]
+
+
+
+
+ +
property bool italic[write-only]
+
+
+
+
+ +
property string mouseDownFunction[write-only]
+
+
+
+
+ +
property bool outline[write-only]
+
+
+
+
+ +
property bool shortenText[write-only]
+
+
+
+
+ +
property bool strikethrough[write-only]
+
+
+
+
+ +
property int textWidth[read-only]
+
+
+
+
+ +
property bool underlined[write-only]
+
+
+
+
+ +
property bool wordBreak[write-only]
+
+
+
+
+ +
property vec2 center
+
+
+
+
+ +
property float height
+
+
+
+
+ +
property int index[read-only]
+
+
+
+
+ +
property int layer
+
+
+
+
+ +
property vec2 localCenter[read-only]
+
+
+
+
+ +
property vec2 localPosition[read-only]
+
+
+
+
+ +
property Rect localRect[read-only]
+
+
+
+
+ +
property vec2 lower
+
+
+
+
+ +
property bool mouseOver[read-only]
+
+
+
+
+ +
property vec2 position
+
+
+
+
+ +
property Rect rect
+
+
+
+
+ +
property vec2 size
+
+
+
+
+ +
property var tooltip
+
+
+
+
+ +
property int tooltipWidth[write-only]
+
+
+
+
+ +
property vec2 upper
+
+
+
+
+ +
property bool visible
+
+
+
+
+ +
property float width
+
+
+
+
+
+
+

+function var setBottomAligned()
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var setBottomLeftAligned()
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var setBottomRightAligned()
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var setCenterAligned()
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var setLeftAligned()
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var setRightAligned()
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var setTopAligned()
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var setTopLeftAligned()
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var setTopRightAligned()
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var hide()
+

+
+
+

+Inherited from UIElement + +

+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function bool isMouseOverAndUnobscured()
+

+
+
+

+Inherited from UIElement + +

+

+
+
+
+
+

+function var show()
+

+
+
+

+Inherited from UIElement + +

+

Returns

+
+

+nothing +

+
+

+
+
+
+
+
+
+ Overview +
Home + Functions + Search +
+
Search:
+Predefined Functions & Example Scripts +
Command +Entity +FactionDatabase +PlanGenerator +Player +Sector +Server +UsableInventoryItem +
+
+

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

+
+ +
+ + diff --git a/Documentation/Language.html b/Documentation/Language.html new file mode 100644 index 0000000..d7d4116 --- /dev/null +++ b/Documentation/Language.html @@ -0,0 +1,625 @@ + + + Language + + + + +
+
+

Avorion Script API Documentation

+
+
+ +
+
Search:
+ +
+

Language

+
+
+

+function Language(Seed seed)
+

+
+
+

Returns

+
+

+A new instance of Language +

+
+

+
+
+
+
+ +
property bool apostrophes
+
+
+
+
+ +
property Seed seed[write-only]
+
+
+
+
+
+
+

+function string getConsonantSound()
+

+
+
+

+
+
+
+
+

+function string... getConsonantSounds(bool end)
+

+
+
+

+
+
+
+
+

+function string... getGeneratedWords()
+

+
+
+

+
+
+
+
+

+function string getName()
+

+
+
+

+
+
+
+
+

+function string getSyllable(bool startingWithVowel, bool first, bool last)
+

+
+
+

+
+
+
+
+

+function string getSyllableCombination(int numSyllables)
+

+
+
+

+
+
+
+
+

+function string getTypicalSyllable(bool startingWithVowel, bool first, bool last)
+

+
+
+

+
+
+
+
+

+function string getVowelSound()
+

+
+
+

+
+
+
+
+

+function string... getVowelSounds()
+

+
+
+

+
+
+
+
+

+function string getWord()
+

+
+
+

+
+
+
+
+

+function var setConsonantSounds()
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var setGeneratedWords()
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var setVowelSounds()
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+
+
+ Overview +
Home + Functions + Search +
+
Search:
+Predefined Functions & Example Scripts +
Command +Entity +FactionDatabase +PlanGenerator +Player +Sector +Server +UsableInventoryItem +
+
+

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

+
+ +
+ + diff --git a/Documentation/LaserFX.html b/Documentation/LaserFX.html new file mode 100644 index 0000000..4cb7fac --- /dev/null +++ b/Documentation/LaserFX.html @@ -0,0 +1,693 @@ + + + LaserFX + + + + +
+
+

Avorion Script API Documentation

+
+
+ +
+
Search:
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+LaserFX +LaserFX +

Properties
+aliveTime +
+animation +
+animationAcceleration +
+animationSpeed +
+auraWidth +
+collision +
+collisionException +
+direction +
+ending +
+fadeOutTime +
+flicker +
+from +
+innerColor +
+length +
+maxAliveTime +
+offset +
+origin +
+outerColor +
+randomNumber +
+shape +
+shapeSize +
+shieldCollisionException +
+sound +
+soundMaxRadius +
+soundMinRadius +
+soundVolume +
+to +
+weaknessFactor +
+width +
+withGlow +

Member Functions
+
+
+
+

LaserFX

+

+This object is only available on the client. +

+
+
+

+function LaserFX()
+

+
+
+

Returns

+
+

+A new instance of LaserFX +

+
+

+
+
+
+
+ +
property float aliveTime
+
+
+
+
+ +
property float animation
+
+
+
+
+ +
property float animationAcceleration
+
+
+
+
+ +
property float animationSpeed
+
+
+
+
+ +
property float auraWidth
+
+
+
+
+ +
property bool collision
+
+
+
+
+ +
property Uuid collisionException
+
+
+
+
+ +
property vec3 direction
+
+
+
+
+ +
property vec3 ending
+
+
+
+
+ +
property float fadeOutTime
+
+
+
+
+ +
property bool flicker
+
+
+
+
+ +
property vec3 from
+
+
+
+
+ +
property Color innerColor
+
+
+
+
+ +
property float length
+
+
+
+
+ +
property float maxAliveTime
+
+
+
+
+ +
property int offset
+
+
+
+
+ +
property vec3 origin
+
+
+
+
+ +
property Color outerColor
+
+
+
+
+ +
property int randomNumber
+
+
+
+
+ +
property int shape
+
+
+
+
+ +
property float shapeSize
+
+
+
+
+ +
property Uuid shieldCollisionException
+
+
+
+
+ +
property string sound
+
+
+
+
+ +
property float soundMaxRadius
+
+
+
+
+ +
property float soundMinRadius
+
+
+
+
+ +
property float soundVolume
+
+
+
+
+ +
property vec3 to
+
+
+
+
+ +
property float weaknessFactor
+
+
+
+
+ +
property float width
+
+
+
+
+ +
property bool withGlow
+
+
+
+
+
+
+
+
+ Overview +
Home + Functions + Search +
+
Search:
+Predefined Functions & Example Scripts +
Command +Entity +FactionDatabase +PlanGenerator +Player +Sector +Server +UsableInventoryItem +
+
+

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

+
+ +
+ + diff --git a/Documentation/Line.html b/Documentation/Line.html new file mode 100644 index 0000000..ea29c0d --- /dev/null +++ b/Documentation/Line.html @@ -0,0 +1,681 @@ + + + Line + + + + +
+
+

Avorion Script API Documentation

+
+
+ +
+
Search:
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Line +Line +

Properties
+color +
+dynamic +
+from +
+to +
+center +
+height +
+index +
+layer +
+localCenter +
+localPosition +
+localRect +
+lower +
+mouseOver +
+position +
+rect +
+size +
+tooltip +
+tooltipWidth +
+upper +
+visible +
+width +

Member Functions
+hide +
+isMouseOverAndUnobscured +
+show +
+
+
+
+

Line : UIElement

+

+This object is only available on the client. +

+
+
+

+function Line(int index)
+

+
+
+

Returns

+
+

+A new instance of Line +

+
+

+
+
+
+
+ +
property Color color[write-only]
+
+
+
+
+ +
property bool dynamic
+
+
+
+
+ +
property vec2 from
+
+
+
+
+ +
property vec2 to
+
+
+
+
+ +
property vec2 center
+
+
+
+
+ +
property float height
+
+
+
+
+ +
property int index[read-only]
+
+
+
+
+ +
property int layer
+
+
+
+
+ +
property vec2 localCenter[read-only]
+
+
+
+
+ +
property vec2 localPosition[read-only]
+
+
+
+
+ +
property Rect localRect[read-only]
+
+
+
+
+ +
property vec2 lower
+
+
+
+
+ +
property bool mouseOver[read-only]
+
+
+
+
+ +
property vec2 position
+
+
+
+
+ +
property Rect rect
+
+
+
+
+ +
property vec2 size
+
+
+
+
+ +
property var tooltip
+
+
+
+
+ +
property int tooltipWidth[write-only]
+
+
+
+
+ +
property vec2 upper
+
+
+
+
+ +
property bool visible
+
+
+
+
+ +
property float width
+
+
+
+
+
+
+

+function var hide()
+

+
+
+

+Inherited from UIElement + +

+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function bool isMouseOverAndUnobscured()
+

+
+
+

+Inherited from UIElement + +

+

+
+
+
+
+

+function var show()
+

+
+
+

+Inherited from UIElement + +

+

Returns

+
+

+nothing +

+
+

+
+
+
+
+
+
+ Overview +
Home + Functions + Search +
+
Search:
+Predefined Functions & Example Scripts +
Command +Entity +FactionDatabase +PlanGenerator +Player +Sector +Server +UsableInventoryItem +
+
+

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

+
+ +
+ + diff --git a/Documentation/ListBox.html b/Documentation/ListBox.html new file mode 100644 index 0000000..b2c74c8 --- /dev/null +++ b/Documentation/ListBox.html @@ -0,0 +1,1043 @@ + + + ListBox + + + + +
+
+

Avorion Script API Documentation

+
+
+ +
+
Search:
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ListBox +ListBox +

Properties
+empty +
+entriesSelectable +
+font +
+fontSize +
+headline +
+onAddedFunction +
+onChangedFunction +
+onClearFunction +
+onRemoveFunction +
+onSelectFunction +
+rowHeight +
+rows +
+scrollPosition +
+selected +
+selectedValue +
+size +
+center +
+height +
+index +
+layer +
+localCenter +
+localPosition +
+localRect +
+lower +
+mouseOver +
+position +
+rect +
+size +
+tooltip +
+tooltipWidth +
+upper +
+visible +
+width +

Member Functions
+addEntry +
+clampScrollPosition +
+clear +
+deselect +
+getEntry +
+getSelectedEntry +
+removeEntry +
+select +
+selectNoCallback +
+selectValue +
+selectValueNoCallback +
+setEntry +
+setEntryType +
+setEntryValue +
+hide +
+isMouseOverAndUnobscured +
+show +
+
+
+
+

ListBox : UIElement

+

+This object is only available on the client. +

+
+
+

+function ListBox(int index)
+

+
+
+

Returns

+
+

+A new instance of ListBox +

+
+

+
+
+
+
+ +
property bool empty[read-only]
+
+
+
+
+ +
property bool entriesSelectable
+
+
+
+
+ +
property int font[write-only]
+
+
+
+
+ +
property int fontSize
+
+
+
+
+ +
property bool headline[write-only]
+
+
+
+
+ +
property string onAddedFunction
+
+
+
+
+ +
property string onChangedFunction
+
+
+
+
+ +
property string onClearFunction
+
+
+
+
+ +
property string onRemoveFunction
+
+
+
+
+ +
property string onSelectFunction
+
+
+
+
+ +
property int rowHeight
+
+
+
+
+ +
property int rows[read-only]
+
+
+
+
+ +
property int scrollPosition
+
+
+
+
+ +
property int selected[read-only]
+
+
+
+
+ +
property var selectedValue[read-only]
+
+
+
+
+ +
property int size[read-only]
+
+
+
+
+ +
property vec2 center
+
+
+
+
+ +
property float height
+
+
+
+
+ +
property int index[read-only]
+
+
+
+
+ +
property int layer
+
+
+
+
+ +
property vec2 localCenter[read-only]
+
+
+
+
+ +
property vec2 localPosition[read-only]
+
+
+
+
+ +
property Rect localRect[read-only]
+
+
+
+
+ +
property vec2 lower
+
+
+
+
+ +
property bool mouseOver[read-only]
+
+
+
+
+ +
property vec2 position
+
+
+
+
+ +
property Rect rect
+
+
+
+
+ +
property vec2 size
+
+
+
+
+ +
property var tooltip
+
+
+
+
+ +
property int tooltipWidth[write-only]
+
+
+
+
+ +
property vec2 upper
+
+
+
+
+ +
property bool visible
+
+
+
+
+ +
property float width
+
+
+
+
+
+
+

+function var addEntry(string str, var value)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var clampScrollPosition()
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var clear()
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var deselect()
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function string, bool, bool, Color getEntry(unsigned int row)
+

+
+
+

+
+
+
+
+

+function string, bool, bool, Color... getSelectedEntry()
+

+
+
+

+
+
+
+
+

+function var removeEntry(int index)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var select(int index)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var selectNoCallback(int index)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var selectValue(var value)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var selectValueNoCallback(var value)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var setEntry(unsigned int row, string text, bool bold, bool italic, Color color, var entryWidth)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var setEntryType(unsigned int row, int type)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var setEntryValue(unsigned int row, var value)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var hide()
+

+
+
+

+Inherited from UIElement + +

+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function bool isMouseOverAndUnobscured()
+

+
+
+

+Inherited from UIElement + +

+

+
+
+
+
+

+function var show()
+

+
+
+

+Inherited from UIElement + +

+

Returns

+
+

+nothing +

+
+

+
+
+
+
+
+
+ Overview +
Home + Functions + Search +
+
Search:
+Predefined Functions & Example Scripts +
Command +Entity +FactionDatabase +PlanGenerator +Player +Sector +Server +UsableInventoryItem +
+
+

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

+
+ +
+ + diff --git a/Documentation/ListBoxEx.html b/Documentation/ListBoxEx.html new file mode 100644 index 0000000..87a662c --- /dev/null +++ b/Documentation/ListBoxEx.html @@ -0,0 +1,1128 @@ + + + ListBoxEx + + + + +
+
+

Avorion Script API Documentation

+
+
+ +
+
Search:
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ListBoxEx +ListBoxEx +

Properties
+columns +
+empty +
+entriesSelectable +
+font +
+fontSize +
+headline +
+onAddedFunction +
+onChangedFunction +
+onClearFunction +
+onRemoveFunction +
+onSelectFunction +
+rowHeight +
+rows +
+scrollPosition +
+selected +
+selectedValue +
+size +
+center +
+height +
+index +
+layer +
+localCenter +
+localPosition +
+localRect +
+lower +
+mouseOver +
+position +
+rect +
+size +
+tooltip +
+tooltipWidth +
+upper +
+visible +
+width +

Member Functions
+addRow +
+clampScrollPosition +
+clear +
+deselect +
+getColumnWidth +
+getEntry +
+removeRow +
+select +
+selectNoCallback +
+selectValue +
+selectValueNoCallback +
+setColumnWidth +
+setEntry +
+setEntryNoCallback +
+setEntryTooltip +
+setEntryType +
+setEntryValue +
+setTooltip +
+hide +
+isMouseOverAndUnobscured +
+show +
+
+
+
+

ListBoxEx : UIElement

+

+This object is only available on the client. +

+
+
+

+function ListBoxEx(int index)
+

+
+
+

Returns

+
+

+A new instance of ListBoxEx +

+
+

+
+
+
+
+ +
property unsigned int columns
+
+
+
+
+ +
property bool empty[read-only]
+
+
+
+
+ +
property bool entriesSelectable
+
+
+
+
+ +
property int font[write-only]
+
+
+
+
+ +
property int fontSize
+
+
+
+
+ +
property bool headline[write-only]
+
+
+
+
+ +
property string onAddedFunction
+
+
+
+
+ +
property string onChangedFunction
+
+
+
+
+ +
property string onClearFunction
+
+
+
+
+ +
property string onRemoveFunction
+
+
+
+
+ +
property string onSelectFunction
+
+
+
+
+ +
property int rowHeight
+
+
+
+
+ +
property int rows[read-only]
+
+
+
+
+ +
property int scrollPosition
+
+
+
+
+ +
property int selected[read-only]
+
+
+
+
+ +
property var selectedValue[read-only]
+
+
+
+
+ +
property int size[read-only]
+
+
+
+
+ +
property vec2 center
+
+
+
+
+ +
property float height
+
+
+
+
+ +
property int index[read-only]
+
+
+
+
+ +
property int layer
+
+
+
+
+ +
property vec2 localCenter[read-only]
+
+
+
+
+ +
property vec2 localPosition[read-only]
+
+
+
+
+ +
property Rect localRect[read-only]
+
+
+
+
+ +
property vec2 lower
+
+
+
+
+ +
property bool mouseOver[read-only]
+
+
+
+
+ +
property vec2 position
+
+
+
+
+ +
property Rect rect
+
+
+
+
+ +
property vec2 size
+
+
+
+
+ +
property var tooltip
+
+
+
+
+ +
property int tooltipWidth[write-only]
+
+
+
+
+ +
property vec2 upper
+
+
+
+
+ +
property bool visible
+
+
+
+
+ +
property float width
+
+
+
+
+
+
+

+function var addRow()
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var clampScrollPosition()
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var clear()
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var deselect()
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function int getColumnWidth(unsigned int index)
+

+
+
+

+
+
+
+
+

+function string, bool, bool, Color, var getEntry(unsigned int column, unsigned int row)
+

+
+
+

+
+
+
+
+

+function var removeRow(int index)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var select(int index)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var selectNoCallback(int index)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var selectValue(var value)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var selectValueNoCallback(var value)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var setColumnWidth(unsigned int index, int width)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var setEntry(unsigned int column, unsigned int row, string text, bool bold, bool italic, Color color, var entryWidth, var align)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var setEntryNoCallback(unsigned int column, unsigned int row, string text, bool bold, bool italic, Color color, var entryWidth, var align)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var setEntryTooltip(unsigned int column, unsigned int row, string text)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var setEntryType(unsigned int column, unsigned int row, int type)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var setEntryValue(unsigned int column, unsigned int row, var value)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var setTooltip(unsigned int row, string text)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var hide()
+

+
+
+

+Inherited from UIElement + +

+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function bool isMouseOverAndUnobscured()
+

+
+
+

+Inherited from UIElement + +

+

+
+
+
+
+

+function var show()
+

+
+
+

+Inherited from UIElement + +

+

Returns

+
+

+nothing +

+
+

+
+
+
+
+
+
+ Overview +
Home + Functions + Search +
+
Search:
+Predefined Functions & Example Scripts +
Command +Entity +FactionDatabase +PlanGenerator +Player +Sector +Server +UsableInventoryItem +
+
+

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

+
+ +
+ + diff --git a/Documentation/Loot.html b/Documentation/Loot.html new file mode 100644 index 0000000..0ec2275 --- /dev/null +++ b/Documentation/Loot.html @@ -0,0 +1,465 @@ + + + Loot + + + + +
+
+

Avorion Script API Documentation

+
+
+ +
+
Search:
+
+
+ + + + + + + + + + + +
+Loot +Loot +

Properties
+entity +
+entityId +

Member Functions
+insert +
+
+
+
+

Loot

+

+This object is only available on the server. +

+
+
+

+function Loot(var id)
+

+
+
+

Parameters

+
+id +The id of the entity this component belongs to, or the entity itself, must be an id of an existing entity or nil for the entity in the current script context
+
+

Returns

+
+

+A new instance of Loot +

+
+

+
+
+
+
+ +
property Entity entity[read-only]
+
+
+
+
+ +
property uuid entityId[read-only]
+
+
+
+
+
+
+

+function var insert(InventoryItem item)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+
+
+ Overview +
Home + Functions + Search +
+
Search:
+Predefined Functions & Example Scripts +
Command +Entity +FactionDatabase +PlanGenerator +Player +Sector +Server +UsableInventoryItem +
+
+

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

+
+ +
+ + diff --git a/Documentation/Mail.html b/Documentation/Mail.html new file mode 100644 index 0000000..0967f34 --- /dev/null +++ b/Documentation/Mail.html @@ -0,0 +1,639 @@ + + + Mail + + + + +
+
+

Avorion Script API Documentation

+
+
+ +
+
Search:
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
+Mail +Mail +

Properties
+empty +
+header +
+id +
+money +
+numItems +
+read +
+receiver +
+sender +
+text +

Member Functions
+addItem +
+addTurret +
+addTurretBlueprint +
+getItem +
+getResources +
+hasAttachments +
+removeItem +
+setResources +
+
+
+
+

Mail

+
+
+

+function Mail()
+

+
+
+

+This is the default constructor of Mail. No further arguments are required. +

+

Returns

+
+

+A new instance of Mail +

+
+

+
+
+
+
+ +
property bool empty[read-only]
+
+
+
+ +
+ +
property string id
+
+A simple string that can be used by scripts or missions to identify mails. Isn't checked for uniqueness, it's only a small helper property. +
+
+
+ +
property int money
+
+
+
+
+ +
property unsigned int numItems[read-only]
+
+
+
+
+ +
property bool read
+
+
+
+
+ +
property PlayerId receiver[write-only]
+
+
+
+
+ +
property Format sender
+
+
+
+
+ +
property Format text
+
+
+
+
+
+
+

+function var addItem(InventoryItem item)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var addTurret(TurretTemplate turret)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var addTurretBlueprint(TurretTemplate turret)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function InventoryItem getItem(unsigned int index)
+

+
+
+

+
+
+
+
+

+function unsigned int... getResources()
+

+
+
+

+
+
+
+
+

+function bool hasAttachments()
+

+
+
+

+
+
+
+
+

+function var removeItem(unsigned int index)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var setResources()
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+
+
+ Overview +
Home + Functions + Search +
+
Search:
+Predefined Functions & Example Scripts +
Command +Entity +FactionDatabase +PlanGenerator +Player +Sector +Server +UsableInventoryItem +
+
+

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

+
+ +
+ + diff --git a/Documentation/MapArrowLine.html b/Documentation/MapArrowLine.html new file mode 100644 index 0000000..22a5fe8 --- /dev/null +++ b/Documentation/MapArrowLine.html @@ -0,0 +1,672 @@ + + + MapArrowLine + + + + +
+
+

Avorion Script API Documentation

+
+
+ +
+
Search:
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+MapArrowLine +MapArrowLine +

Properties
+color +
+from +
+to +
+center +
+height +
+index +
+layer +
+localCenter +
+localPosition +
+localRect +
+lower +
+mouseOver +
+position +
+rect +
+size +
+tooltip +
+tooltipWidth +
+upper +
+visible +
+width +

Member Functions
+hide +
+isMouseOverAndUnobscured +
+show +
+
+
+
+

MapArrowLine : UIElement

+

+This object is only available on the client. +

+
+
+

+function MapArrowLine(int index)
+

+
+
+

Returns

+
+

+A new instance of MapArrowLine +

+
+

+
+
+
+
+ +
property Color color[write-only]
+
+
+
+
+ +
property ivec2 from[write-only]
+
+
+
+
+ +
property ivec2 to[write-only]
+
+
+
+
+ +
property vec2 center
+
+
+
+
+ +
property float height
+
+
+
+
+ +
property int index[read-only]
+
+
+
+
+ +
property int layer
+
+
+
+
+ +
property vec2 localCenter[read-only]
+
+
+
+
+ +
property vec2 localPosition[read-only]
+
+
+
+
+ +
property Rect localRect[read-only]
+
+
+
+
+ +
property vec2 lower
+
+
+
+
+ +
property bool mouseOver[read-only]
+
+
+
+
+ +
property vec2 position
+
+
+
+
+ +
property Rect rect
+
+
+
+
+ +
property vec2 size
+
+
+
+
+ +
property var tooltip
+
+
+
+
+ +
property int tooltipWidth[write-only]
+
+
+
+
+ +
property vec2 upper
+
+
+
+
+ +
property bool visible
+
+
+
+
+ +
property float width
+
+
+
+
+
+
+

+function var hide()
+

+
+
+

+Inherited from UIElement + +

+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function bool isMouseOverAndUnobscured()
+

+
+
+

+Inherited from UIElement + +

+

+
+
+
+
+

+function var show()
+

+
+
+

+Inherited from UIElement + +

+

Returns

+
+

+nothing +

+
+

+
+
+
+
+
+
+ Overview +
Home + Functions + Search +
+
Search:
+Predefined Functions & Example Scripts +
Command +Entity +FactionDatabase +PlanGenerator +Player +Sector +Server +UsableInventoryItem +
+
+

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

+
+ +
+ + diff --git a/Documentation/MapIcon.html b/Documentation/MapIcon.html new file mode 100644 index 0000000..3e0d05e --- /dev/null +++ b/Documentation/MapIcon.html @@ -0,0 +1,681 @@ + + + MapIcon + + + + +
+
+

Avorion Script API Documentation

+
+
+ +
+
Search:
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+MapIcon +MapIcon +

Properties
+color +
+coordinates +
+icon +
+offset +
+center +
+height +
+index +
+layer +
+localCenter +
+localPosition +
+localRect +
+lower +
+mouseOver +
+position +
+rect +
+size +
+tooltip +
+tooltipWidth +
+upper +
+visible +
+width +

Member Functions
+hide +
+isMouseOverAndUnobscured +
+show +
+
+
+
+

MapIcon : UIElement

+

+This object is only available on the client. +

+
+
+

+function MapIcon(int index)
+

+
+
+

Returns

+
+

+A new instance of MapIcon +

+
+

+
+
+
+
+ +
property Color color[write-only]
+
+
+
+
+ +
property ivec2 coordinates[write-only]
+
+
+
+
+ +
property string icon[write-only]
+
+
+
+
+ +
property vec2 offset[write-only]
+
+
+
+
+ +
property vec2 center
+
+
+
+
+ +
property float height
+
+
+
+
+ +
property int index[read-only]
+
+
+
+
+ +
property int layer
+
+
+
+
+ +
property vec2 localCenter[read-only]
+
+
+
+
+ +
property vec2 localPosition[read-only]
+
+
+
+
+ +
property Rect localRect[read-only]
+
+
+
+
+ +
property vec2 lower
+
+
+
+
+ +
property bool mouseOver[read-only]
+
+
+
+
+ +
property vec2 position
+
+
+
+
+ +
property Rect rect
+
+
+
+
+ +
property vec2 size
+
+
+
+
+ +
property var tooltip
+
+
+
+
+ +
property int tooltipWidth[write-only]
+
+
+
+
+ +
property vec2 upper
+
+
+
+
+ +
property bool visible
+
+
+
+
+ +
property float width
+
+
+
+
+
+
+

+function var hide()
+

+
+
+

+Inherited from UIElement + +

+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function bool isMouseOverAndUnobscured()
+

+
+
+

+Inherited from UIElement + +

+

+
+
+
+
+

+function var show()
+

+
+
+

+Inherited from UIElement + +

+

Returns

+
+

+nothing +

+
+

+
+
+
+
+
+
+ Overview +
Home + Functions + Search +
+
Search:
+Predefined Functions & Example Scripts +
Command +Entity +FactionDatabase +PlanGenerator +Player +Sector +Server +UsableInventoryItem +
+
+

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

+
+ +
+ + diff --git a/Documentation/Material.html b/Documentation/Material.html new file mode 100644 index 0000000..c6b47a6 --- /dev/null +++ b/Documentation/Material.html @@ -0,0 +1,531 @@ + + + Material + + + + +
+
+

Avorion Script API Documentation

+
+
+ +
+
Search:
+
+
+ + + + + + + + + + + + + + + + + + + +
+Material +Material +

Properties
+blockColor +
+color +
+costFactor +
+density +
+name +
+strengthFactor +
+tag +
+value +

Member Functions
+__eq +
+__lt +
+__tostring +
+
+
+
+

Material

+
+
+

+function Material(int type)
+

+
+
+

Returns

+
+

+A new instance of Material +

+
+

+
+
+
+
+ +
property Color blockColor[read-only]
+
+
+
+
+ +
property Color color[read-only]
+
+
+
+
+ +
property double costFactor[read-only]
+
+
+
+
+ +
property double density[read-only]
+
+
+
+
+ +
property string name[read-only]
+
+
+
+
+ +
property double strengthFactor[read-only]
+
+
+
+
+ +
property string tag[read-only]
+
+
+
+
+ +
property int value
+
+
+
+
+
+
+

+function bool __eq(Material other)
+

+
+
+

+
+
+
+
+

+function bool __lt(Material other)
+

+
+
+

+
+
+
+
+

+function string __tostring()
+

+
+
+

+
+
+
+
+
+
+ Overview +
Home + Functions + Search +
+
Search:
+Predefined Functions & Example Scripts +
Command +Entity +FactionDatabase +PlanGenerator +Player +Sector +Server +UsableInventoryItem +
+
+

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

+
+ +
+ + diff --git a/Documentation/Matrix.html b/Documentation/Matrix.html new file mode 100644 index 0000000..6143e4d --- /dev/null +++ b/Documentation/Matrix.html @@ -0,0 +1,650 @@ + + + Matrix + + + + +
+
+

Avorion Script API Documentation

+
+
+ +
+
Search:
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
+Matrix +Matrix +

Properties
+look +
+pos +
+position +
+right +
+translation +
+up +

Member Functions
+__mul +
+getInverse +
+getValue +
+invert +
+setValue +
+transform +
+transform_ip +
+transformCoord +
+transformCoord_ip +
+transformNormal +
+transformNormal_ip +
+
+
+
+

Matrix

+
+
+

+function Matrix()
+

+
+
+

+This is the default constructor of Matrix. No further arguments are required. +

+

Returns

+
+

+A new instance of Matrix +

+
+

+
+
+
+
+ +
property vec3 look
+
+
+
+
+ +
property vec3 pos
+
+
+
+
+ +
property vec3 position
+
+
+
+ +
+ +
property vec3 translation
+
+
+
+
+ +
property vec3 up
+
+
+
+
+
+
+

+function Matrix __mul(Matrix m)
+

+
+
+

+
+
+
+
+

+function Matrix getInverse()
+

+
+
+

+
+
+
+
+

+function float getValue(int row, int col)
+

+
+
+

+
+
+
+
+

+function var invert()
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var setValue(int row, int col, float value)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function vec4 transform(vec3 in)
+

+
+
+

+
+
+
+
+

+function var transform_ip(vec4 v)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function vec3 transformCoord(vec3 in)
+

+
+
+

+
+
+
+
+

+function var transformCoord_ip(vec3 v)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function vec3 transformNormal(vec3 in)
+

+
+
+

+
+
+
+
+

+function var transformNormal_ip(vec3 v)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+
+
+ Overview +
Home + Functions + Search +
+
Search:
+Predefined Functions & Example Scripts +
Command +Entity +FactionDatabase +PlanGenerator +Player +Sector +Server +UsableInventoryItem +
+
+

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

+
+ +
+ + diff --git a/Documentation/ModManager.html b/Documentation/ModManager.html new file mode 100644 index 0000000..a8914d0 --- /dev/null +++ b/Documentation/ModManager.html @@ -0,0 +1,791 @@ + + + ModManager + + + + +
+
+

Avorion Script API Documentation

+
+
+ +
+
Search:
+ +
+

ModManager

+
+
+

+function ModManager()
+

+
+
+

Returns

+
+

+A new instance of ModManager +

+
+

+
+
+
+
+ +
property bool forceEnabledMods[read-only]
+
+
+
+
+
+
+

+function var addMod(string folder)
+

+
+
+

+
+
+
+
+

+function var disableAll()
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var disableMod(string id)
+

+
+
+

+
+
+
+
+

+function string... enableAll()
+

+
+
+

+
+
+
+
+

+function var enableMod(string id)
+

+
+
+

+
+
+
+
+

+function var find(string id)
+

+
+
+

+
+
+
+
+

+function var findEnabled(string id)
+

+
+
+

+
+
+
+
+

+function var forceDisable(string id)
+

+
+
+

+
+
+
+
+

+function var forceEnable(string id)
+

+
+
+

+
+
+
+
+

+function string... forceEnableAll()
+

+
+
+

+
+
+
+
+

+function table_t... getDetectedMods()
+

+
+
+

+
+
+
+
+

+function string... getEnabledLoadOrder()
+

+
+
+

+
+
+
+
+

+function string... getEnabledMods()
+

+
+
+

+
+
+
+
+

+function string... getFullLoadOrder()
+

+
+
+

+
+
+
+
+

+function string... getIncompatibleMods(string id)
+

+
+
+

+
+
+
+
+

+function string... getLoadOrder()
+

+
+
+

+
+
+
+
+

+function table<string, int> getLoadPriorities()
+

+
+
+

+
+
+
+
+

+function string... getModsModifyingFile(string file)
+

+
+
+

+
+
+
+
+

+function var getModTitle(string id)
+

+
+
+

+
+
+
+
+

+function string... getOutdatedMods()
+

+
+
+

+
+
+
+
+

+function table<string, string> getProblematicMods()
+

+
+
+

+
+
+
+
+

+function string... getRequiredMods(string id, bool optionalToo)
+

+
+
+

+
+
+
+
+

+function string... getRequiringMods(string id, bool optionalToo)
+

+
+
+

+
+
+
+
+

+function var refreshEnabledLoadOrder()
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var refreshLoadOrder()
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var refreshProblematicMods()
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+
+
+ Overview +
Home + Functions + Search +
+
Search:
+Predefined Functions & Example Scripts +
Command +Entity +FactionDatabase +PlanGenerator +Player +Sector +Server +UsableInventoryItem +
+
+

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

+
+ +
+ + diff --git a/Documentation/Mouse.html b/Documentation/Mouse.html new file mode 100644 index 0000000..38a24c3 --- /dev/null +++ b/Documentation/Mouse.html @@ -0,0 +1,474 @@ + + + Mouse + + + + +
+
+

Avorion Script API Documentation

+
+
+ +
+
Search:
+
+
+ + + + + + + + + + + + +
+Mouse +Mouse +

Properties
+position +

Member Functions
+mouseDown +
+mousePressed +
+mouseUp +
+
+
+
+

Mouse

+

+This object is only available on the client. +

+
+
+

+function Mouse()
+

+
+
+

+This is the default constructor of Mouse. No further arguments are required. +

+

Returns

+
+

+A new instance of Mouse +

+
+

+
+
+
+
+ +
property vec2 position
+
+
+
+
+
+
+

+function bool mouseDown(int button)
+

+
+
+

+
+
+
+
+

+function bool mousePressed(int button)
+

+
+
+

+
+
+
+
+

+function bool mouseUp(int button)
+

+
+
+

+
+
+
+
+
+
+ Overview +
Home + Functions + Search +
+
Search:
+Predefined Functions & Example Scripts +
Command +Entity +FactionDatabase +PlanGenerator +Player +Sector +Server +UsableInventoryItem +
+
+

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

+
+ +
+ + diff --git a/Documentation/MultiLineTextBox.html b/Documentation/MultiLineTextBox.html new file mode 100644 index 0000000..2d6d904 --- /dev/null +++ b/Documentation/MultiLineTextBox.html @@ -0,0 +1,850 @@ + + + MultiLineTextBox + + + + +
+
+

Avorion Script API Documentation

+
+
+ +
+
Search:
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+MultiLineTextBox +MultiLineTextBox +

Properties
+active +
+clearOnClick +
+editable +
+getNumberCharacters +
+isTypingActive +
+maxCharacters +
+setFontSize +
+text +
+center +
+height +
+index +
+layer +
+localCenter +
+localPosition +
+localRect +
+lower +
+mouseOver +
+position +
+rect +
+size +
+tooltip +
+tooltipWidth +
+upper +
+visible +
+width +

Member Functions
+clear +
+moveCursorDown +
+moveCursorLeft +
+moveCursorLeftCtrl +
+moveCursorRight +
+moveCursorRightCtrl +
+moveCursorUp +
+hide +
+isMouseOverAndUnobscured +
+show +
+
+
+
+

MultiLineTextBox : UIElement

+

+This object is only available on the client. +

+
+
+

+function MultiLineTextBox(int index)
+

+
+
+

Returns

+
+

+A new instance of MultiLineTextBox +

+
+

+
+
+
+
+ +
property bool active[write-only]
+
+
+
+
+ +
property bool clearOnClick[write-only]
+
+
+
+
+ +
property bool editable[write-only]
+
+
+
+
+ +
property unsigned int getNumberCharacters[read-only]
+
+
+
+
+ +
property bool isTypingActive[read-only]
+
+
+
+
+ +
property unsigned int maxCharacters[write-only]
+
+
+
+
+ +
property int setFontSize[write-only]
+
+
+
+
+ +
property string text
+
+
+
+
+ +
property vec2 center
+
+
+
+
+ +
property float height
+
+
+
+
+ +
property int index[read-only]
+
+
+
+
+ +
property int layer
+
+
+
+
+ +
property vec2 localCenter[read-only]
+
+
+
+
+ +
property vec2 localPosition[read-only]
+
+
+
+
+ +
property Rect localRect[read-only]
+
+
+
+
+ +
property vec2 lower
+
+
+
+
+ +
property bool mouseOver[read-only]
+
+
+
+
+ +
property vec2 position
+
+
+
+
+ +
property Rect rect
+
+
+
+
+ +
property vec2 size
+
+
+
+
+ +
property var tooltip
+
+
+
+
+ +
property int tooltipWidth[write-only]
+
+
+
+
+ +
property vec2 upper
+
+
+
+
+ +
property bool visible
+
+
+
+
+ +
property float width
+
+
+
+
+
+
+

+function var clear()
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var moveCursorDown()
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var moveCursorLeft()
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var moveCursorLeftCtrl()
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var moveCursorRight()
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var moveCursorRightCtrl()
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var moveCursorUp()
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var hide()
+

+
+
+

+Inherited from UIElement + +

+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function bool isMouseOverAndUnobscured()
+

+
+
+

+Inherited from UIElement + +

+

+
+
+
+
+

+function var show()
+

+
+
+

+Inherited from UIElement + +

+

Returns

+
+

+nothing +

+
+

+
+
+
+
+
+
+ Overview +
Home + Functions + Search +
+
Search:
+Predefined Functions & Example Scripts +
Command +Entity +FactionDatabase +PlanGenerator +Player +Sector +Server +UsableInventoryItem +
+
+

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

+
+ +
+ + diff --git a/Documentation/Music.html b/Documentation/Music.html new file mode 100644 index 0000000..867468d --- /dev/null +++ b/Documentation/Music.html @@ -0,0 +1,545 @@ + + + Music + + + + +
+
+

Avorion Script API Documentation

+
+
+ +
+
Search:
+
+
+ + + + + + + + + + + + + + + + +
+Music +Music +

Properties
+autoPlay +
+currentTrack +
+isPlaying +

Member Functions
+fadeOut +
+playSilence +
+playTrack +
+setAmbientTrackLists +
+stop +
+
+
+
+

Music

+

+This object is only available on the client. +

+
+
+

+function Music()
+

+
+
+

Returns

+
+

+A new instance of Music +

+
+

+
+
+
+
+ +
property bool autoPlay
+
+
+
+
+ +
property var currentTrack[read-only]
+
+
+
+
+ +
property bool isPlaying[read-only]
+
+
+
+
+
+
+

+function var fadeOut(float time)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var playSilence(float time)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var playTrack(string path, bool loop, var volume)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var setAmbientTrackLists()
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var stop()
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+
+
+ Overview +
Home + Functions + Search +
+
Search:
+Predefined Functions & Example Scripts +
Command +Entity +FactionDatabase +PlanGenerator +Player +Sector +Server +UsableInventoryItem +
+
+

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

+
+ +
+ + diff --git a/Documentation/NamedFormat.html b/Documentation/NamedFormat.html new file mode 100644 index 0000000..b763f51 --- /dev/null +++ b/Documentation/NamedFormat.html @@ -0,0 +1,481 @@ + + + NamedFormat + + + + +
+
+

Avorion Script API Documentation

+
+
+ +
+
Search:
+
+
+ + + + + + + + + + + + + +
+NamedFormat +NamedFormat +

Properties
+text +

Member Functions
+arguments +
+empty +
+evaluate +
+translated +
+
+
+
+

NamedFormat

+
+
+

+function NamedFormat(string , MapType )
+

+
+
+

Returns

+
+

+A new instance of NamedFormat +

+
+

+
+
+
+
+ +
property string text[read-only]
+
+
+
+
+
+
+

+function table<string, PluralForm> arguments()
+

+
+
+

+
+
+
+
+

+function bool empty()
+

+
+
+

+
+
+
+
+

+function string evaluate()
+

+
+
+

+
+
+
+
+

+function string translated()
+

+
+
+

+
+
+
+
+
+
+ Overview +
Home + Functions + Search +
+
Search:
+Predefined Functions & Example Scripts +
Command +Entity +FactionDatabase +PlanGenerator +Player +Sector +Server +UsableInventoryItem +
+
+

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

+
+ +
+ + diff --git a/Documentation/NumbersBar.html b/Documentation/NumbersBar.html new file mode 100644 index 0000000..3cedfc1 --- /dev/null +++ b/Documentation/NumbersBar.html @@ -0,0 +1,702 @@ + + + NumbersBar + + + + +
+
+

Avorion Script API Documentation

+
+
+ +
+
Search:
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+NumbersBar +NumbersBar +

Properties
+center +
+height +
+index +
+layer +
+localCenter +
+localPosition +
+localRect +
+lower +
+mouseOver +
+position +
+rect +
+size +
+tooltip +
+tooltipWidth +
+upper +
+visible +
+width +

Member Functions
+addEntry +
+clear +
+setRange +
+hide +
+isMouseOverAndUnobscured +
+show +
+
+
+
+

NumbersBar : UIElement

+

+This object is only available on the client. +

+
+
+

+function NumbersBar(int index)
+

+
+
+

Returns

+
+

+A new instance of NumbersBar +

+
+

+
+
+
+
+ +
property vec2 center
+
+
+
+
+ +
property float height
+
+
+
+
+ +
property int index[read-only]
+
+
+
+
+ +
property int layer
+
+
+
+
+ +
property vec2 localCenter[read-only]
+
+
+
+
+ +
property vec2 localPosition[read-only]
+
+
+
+
+ +
property Rect localRect[read-only]
+
+
+
+
+ +
property vec2 lower
+
+
+
+
+ +
property bool mouseOver[read-only]
+
+
+
+
+ +
property vec2 position
+
+
+
+
+ +
property Rect rect
+
+
+
+
+ +
property vec2 size
+
+
+
+
+ +
property var tooltip
+
+
+
+
+ +
property int tooltipWidth[write-only]
+
+
+
+
+ +
property vec2 upper
+
+
+
+
+ +
property bool visible
+
+
+
+
+ +
property float width
+
+
+
+
+
+
+

+function var addEntry(float num, string name, Color color)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var clear()
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var setRange(float minRange, float maxRange)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var hide()
+

+
+
+

+Inherited from UIElement + +

+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function bool isMouseOverAndUnobscured()
+

+
+
+

+Inherited from UIElement + +

+

+
+
+
+
+

+function var show()
+

+
+
+

+Inherited from UIElement + +

+

Returns

+
+

+nothing +

+
+

+
+
+
+
+
+
+ Overview +
Home + Functions + Search +
+
Search:
+Predefined Functions & Example Scripts +
Command +Entity +FactionDatabase +PlanGenerator +Player +Sector +Server +UsableInventoryItem +
+
+

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

+
+ +
+ + diff --git a/Documentation/Owner.html b/Documentation/Owner.html new file mode 100644 index 0000000..4d315c9 --- /dev/null +++ b/Documentation/Owner.html @@ -0,0 +1,501 @@ + + + Owner + + + + +
+
+

Avorion Script API Documentation

+
+
+ +
+
Search:
+
+
+ + + + + + + + + + + + + + + + +
+Owner +Owner +

Properties
+entity +
+entityId +
+factionIndex +
+isAIFaction +
+isAlliance +
+isPlayer +
+name +

Member Functions
+getRelationValue +
+
+
+
+

Owner

+
+
+

+function Owner(var id)
+

+
+
+

Parameters

+
+id +The id of the entity this component belongs to, or the entity itself, must be an id of an existing entity or nil for the entity in the current script context
+
+

Returns

+
+

+A new instance of Owner +

+
+

+
+
+
+
+ +
property Entity entity[read-only]
+
+
+
+
+ +
property uuid entityId[read-only]
+
+
+
+
+ +
property int factionIndex
+
+
+
+
+ +
property bool isAIFaction[read-only]
+
+
+
+
+ +
property bool isAlliance[read-only]
+
+
+
+
+ +
property bool isPlayer[read-only]
+
+
+
+
+ +
property string name[read-only]
+
+
+
+
+
+
+

+function int getRelationValue(int otherFactionIndex)
+

+
+
+

+
+
+
+
+
+
+ Overview +
Home + Functions + Search +
+
Search:
+Predefined Functions & Example Scripts +
Command +Entity +FactionDatabase +PlanGenerator +Player +Sector +Server +UsableInventoryItem +
+
+

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

+
+ +
+ + diff --git a/Documentation/Physics.html b/Documentation/Physics.html new file mode 100644 index 0000000..ad791c6 --- /dev/null +++ b/Documentation/Physics.html @@ -0,0 +1,591 @@ + + + Physics + + + + +
+
+

Avorion Script API Documentation

+
+
+ +
+
Search:
+
+
+ + + + + + + + + + + + + + + + + + + + + + +
+Physics +Physics +

Properties
+centerOfMass +
+centerOfRotation +
+driftDecrease +
+entity +
+entityId +
+invMass +
+kineticEnergy +
+mass +
+rotationalEnergy +
+rotationDecrease +

Member Functions
+applyGlobalForce +
+applyImpulse +
+applyLocalForce +
+lerpPositions +
+
+
+
+

Physics

+
+
+

+function Physics(var id)
+

+
+
+

Parameters

+
+id +The id of the entity this component belongs to, or the entity itself, must be an id of an existing entity or nil for the entity in the current script context
+
+

Returns

+
+

+A new instance of Physics +

+
+

+
+
+
+
+ +
property vec3 centerOfMass[read-only]
+
+
+
+
+ +
property vec3 centerOfRotation[read-only]
+
+
+
+
+ +
property double driftDecrease
+
+
+
+
+ +
property Entity entity[read-only]
+
+
+
+
+ +
property uuid entityId[read-only]
+
+
+
+
+ +
property double invMass[read-only]
+
+
+
+
+ +
property double kineticEnergy[read-only]
+
+
+
+
+ +
property double mass[read-only]
+
+
+
+
+ +
property double rotationalEnergy[read-only]
+
+
+
+
+ +
property double rotationDecrease
+
+
+
+
+
+
+

+function var applyGlobalForce(vec3 position, vec3 direction, float size, float time)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var applyImpulse(dvec3 position, vec3 direction, float size)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var applyLocalForce(vec3 position, vec3 force, float size, float time)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var lerpPositions(double timeStep)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+
+
+ Overview +
Home + Functions + Search +
+
Search:
+Predefined Functions & Example Scripts +
Command +Entity +FactionDatabase +PlanGenerator +Player +Sector +Server +UsableInventoryItem +
+
+

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

+
+ +
+ + diff --git a/Documentation/Picture.html b/Documentation/Picture.html new file mode 100644 index 0000000..4a51c9b --- /dev/null +++ b/Documentation/Picture.html @@ -0,0 +1,747 @@ + + + Picture + + + + +
+
+

Avorion Script API Documentation

+
+
+ +
+
Search:
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Picture +Picture +

Properties
+color +
+flipped +
+flippedX +
+isIcon +
+picture +
+center +
+height +
+index +
+layer +
+localCenter +
+localPosition +
+localRect +
+lower +
+mouseOver +
+position +
+rect +
+size +
+tooltip +
+tooltipWidth +
+upper +
+visible +
+width +

Member Functions
+clear +
+fadeTo +
+fitIntoRect +
+hide +
+isMouseOverAndUnobscured +
+show +
+
+
+
+

Picture : UIElement

+

+This object is only available on the client. +

+
+
+

+function Picture(int index)
+

+
+
+

Returns

+
+

+A new instance of Picture +

+
+

+
+
+
+
+ +
property Color color[write-only]
+
+
+
+
+ +
property bool flipped[write-only]
+
+
+
+
+ +
property bool flippedX[write-only]
+
+
+
+
+ +
property bool isIcon[write-only]
+
+
+
+
+ +
property string picture[write-only]
+
+
+
+
+ +
property vec2 center
+
+
+
+
+ +
property float height
+
+
+
+
+ +
property int index[read-only]
+
+
+
+
+ +
property int layer
+
+
+
+
+ +
property vec2 localCenter[read-only]
+
+
+
+
+ +
property vec2 localPosition[read-only]
+
+
+
+
+ +
property Rect localRect[read-only]
+
+
+
+
+ +
property vec2 lower
+
+
+
+
+ +
property bool mouseOver[read-only]
+
+
+
+
+ +
property vec2 position
+
+
+
+
+ +
property Rect rect
+
+
+
+
+ +
property vec2 size
+
+
+
+
+ +
property var tooltip
+
+
+
+
+ +
property int tooltipWidth[write-only]
+
+
+
+
+ +
property vec2 upper
+
+
+
+
+ +
property bool visible
+
+
+
+
+ +
property float width
+
+
+
+
+
+
+

+function var clear(Color color)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var fadeTo(string str, var time)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var fitIntoRect()
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var hide()
+

+
+
+

+Inherited from UIElement + +

+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function bool isMouseOverAndUnobscured()
+

+
+
+

+Inherited from UIElement + +

+

+
+
+
+
+

+function var show()
+

+
+
+

+Inherited from UIElement + +

+

Returns

+
+

+nothing +

+
+

+
+
+
+
+
+
+ Overview +
Home + Functions + Search +
+
Search:
+Predefined Functions & Example Scripts +
Command +Entity +FactionDatabase +PlanGenerator +Player +Sector +Server +UsableInventoryItem +
+
+

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

+
+ +
+ + diff --git a/Documentation/PixelIconSelectionItem.html b/Documentation/PixelIconSelectionItem.html new file mode 100644 index 0000000..ad2bf22 --- /dev/null +++ b/Documentation/PixelIconSelectionItem.html @@ -0,0 +1,432 @@ + + + PixelIconSelectionItem + + + + +
+
+

Avorion Script API Documentation

+
+
+ +
+
Search:
+
+
+ + + + + + + + + +
+PixelIconSelectionItem +PixelIconSelectionItem +

Properties
+icon +

Member Functions
+
+
+
+

PixelIconSelectionItem

+

+This object is only available on the client. +

+
+
+

+function PixelIconSelectionItem(string other)
+

+
+
+

Returns

+
+

+A new instance of PixelIconSelectionItem +

+
+

+
+
+
+
+ +
property string icon
+
+
+
+
+
+
+
+
+ Overview +
Home + Functions + Search +
+
Search:
+Predefined Functions & Example Scripts +
Command +Entity +FactionDatabase +PlanGenerator +Player +Sector +Server +UsableInventoryItem +
+
+

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

+
+ +
+ + diff --git a/Documentation/Plan.html b/Documentation/Plan.html new file mode 100644 index 0000000..e74f379 --- /dev/null +++ b/Documentation/Plan.html @@ -0,0 +1,1174 @@ + + + Plan + + + + +
+
+

Avorion Script API Documentation

+
+
+ +
+
Search:
+ +
+

Plan

+
+
+

+function Plan(var id)
+

+
+
+

Parameters

+
+id +The id of the entity this component belongs to, or the entity itself, must be an id of an existing entity or nil for the entity in the current script context
+
+

Returns

+
+

+A new instance of Plan +

+
+

+
+
+
+
+ +
property bool accumulatingHealth
+
+
+
+
+ +
property Box boundingBox[read-only]
+
+
+
+
+ +
property Sphere boundingSphere[read-only]
+
+
+
+
+ +
property vec3 centerOfMass[read-only]
+
+
+
+
+ +
property bool collisionDamage
+
+
+
+
+ +
property bool convex
+
+
+
+
+ +
property double durability[read-only]
+
+
+
+
+ +
property Entity entity[read-only]
+
+
+
+
+ +
property uuid entityId[read-only]
+
+
+
+
+ +
property double mass[read-only]
+
+
+
+
+ +
property int numBlocks[read-only]
+
+
+
+
+ +
property double processingPower[read-only]
+
+
+
+
+ +
property float radius[read-only]
+
+
+
+
+ +
property BlockPlanBlock root[read-only]
+
+
+
+
+ +
property var rootIndex[read-only]
+
+
+
+
+ +
property bool singleBlockDestructionEnabled
+
+
+
+
+ +
property int size[read-only]
+
+
+
+
+ +
property float volume[read-only]
+
+
+
+
+
+
+

+function int addBlock(vec3 position, vec3 size, int parentIndex, int index, Color color, Material material, Matrix orientation, int blockIndex, var secondaryColor)
+

+
+
+

+Add a new block to an existing plan. +

+

Parameters

+
+position +The position of the new
+size +The size of the new block
+parentIndex +The parent index of the block the new block will be attached to. This parameter will be ignored when there are no blocks in the plan.
+index +The index of the new block. Use -1 to assign an index automatically (recommended)
+color +The color of the new block
+material +The material of the new block
+orientation +The orientation of the new block
+blockIndex +The type of the new block, must be a valid block type. See enum BlockType
+secondaryColor +The secondaryColor of the new block. If nil, ColorNone() will be used
+
+

Returns

+
+

+Returns the index of the new block on success, nil otherwise. +

+
+

+
+
+
+
+

+function int addPlan(int parentIndex, BlockPlan other, int otherBlock)
+

+
+
+

+
+
+
+
+

+function int addPlanDisplaced(int parentIndex, BlockPlan other, int otherBlock, vec3 delta)
+

+
+
+

+
+
+
+
+

+function var damage(float damage, int block, vec3 location, Uuid inflictingEntity, var damageSource, var damageType)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var deleteSubTree(int index)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var destroy()
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function bool empty()
+

+
+
+

+
+
+
+
+

+function bool exists(int index)
+

+
+
+

+
+
+
+
+

+function BlockPlan get()
+

+
+
+

+Returns the plan of the entity. This copies the entire plan, keep that in mind when using plans with large block counts. +

+

Returns

+
+

+A copy of the plan of the entity +

+
+

+
+
+
+
+

+function BlockPlanBlock getBlock(int index)
+

+
+
+

+
+
+
+
+

+function int... getBlockIndices()
+

+
+
+

+
+
+
+
+

+function int... getBlocksByType(int index)
+

+
+
+

+
+
+
+
+

+function double getMoneyValue()
+

+
+
+

+
+
+
+
+

+function BlockPlan getMove()
+

+
+
+

+Returns the plan of the entity. This function will move the plan out of the entity, and replace the entity's plan with a single block. This operation is independent of the size of the plan, use it when you have to get large plans with lots of blocks. +

+

Returns

+
+

+The plan of the entity +

+
+

+
+
+
+
+

+function BlockPlanBlock getNthBlock(int n)
+

+
+
+

+
+
+
+
+

+function var getNthIndex(int n)
+

+
+
+

+
+
+
+
+

+function int getNumBlocks(int blockIndex)
+

+
+
+

+
+
+
+
+

+function int... getRemoved(int index)
+

+
+
+

+
+
+
+
+

+function double... getResourceValue()
+

+
+
+

+
+
+
+
+

+function BlockStatistics getStats()
+

+
+
+

+
+
+
+
+

+function double getUndamagedMoneyValue()
+

+
+
+

+
+
+
+
+

+function double... getUndamagedResourceValue()
+

+
+
+

+
+
+
+
+

+function var heal(float damage, int block, vec3 location, Uuid inflictingEntity)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var move(BlockPlan plan)
+

+
+
+

+Set the new plan of the entity. The entity will get deleted if the plan is empty. This moves all the data out of the plan that is used as the first argument. The content of the plan given as argument is then undefined, but still valid. It might be empty, it might contain the previous plan. This operation is independent of the size of the plan, use it when you have to set large plans with lots of blocks. +

+

Parameters

+
+plan +The new BlockPlan of the entity
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var removeBlock(int index)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var set(BlockPlan plan)
+

+
+
+

+Set the new plan of the entity. The entity will get deleted if the plan is empty. This copies the entire plan that is given as argument, keep that in mind when setting plans with large block counts. +

+

Parameters

+
+plan +The new BlockPlan of the entity
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var setBlockColor(int index, Color color)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var setBlockDamageFactor(int blockIndex, float factor)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var setBlockType(int index, int type)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var setBlockTypeDamageFactor(int blockType, float factor)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var setColor(Color color, var secondaryColor)
+

+
+
+

+Set all blocks of plan to the same color (and secondary color) +

+

Parameters

+
+color +The new primary color
+secondaryColor +The new secondary color. If nil, ColorNone() will be used
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var setMaterial(Material material)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var setSecondaryBlockColor(int index, Color color)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+
+
+ Overview +
Home + Functions + Search +
+
Search:
+Predefined Functions & Example Scripts +
Command +Entity +FactionDatabase +PlanGenerator +Player +Sector +Server +UsableInventoryItem +
+
+

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

+
+ +
+ + diff --git a/Documentation/PlanBspTree.html b/Documentation/PlanBspTree.html new file mode 100644 index 0000000..d109aef --- /dev/null +++ b/Documentation/PlanBspTree.html @@ -0,0 +1,527 @@ + + + PlanBspTree + + + + +
+
+

Avorion Script API Documentation

+
+
+ +
+
Search:
+
+
+ + + + + + + + + + + + + + + +
+PlanBspTree +PlanBspTree +

Properties

Member Functions
+getBlocksByBox +
+getBlocksByOrientedBox +
+getBlocksByRay +
+getBlocksBySphere +
+intersectRay +
+intersectsBox +
+intersectsSphere +
+
+
+
+

PlanBspTree

+
+
+

+function PlanBspTree(BlockPlan plan)
+

+
+
+

Returns

+
+

+A new instance of PlanBspTree +

+
+

+
+
+
+
+

+function int... getBlocksByBox(Box box)
+

+
+
+

+
+
+
+
+

+function int... getBlocksByOrientedBox(Box box, Matrix boxOrientation)
+

+
+
+

+
+
+
+
+

+function int... getBlocksByRay(Ray ray, float t0, float t1)
+

+
+
+

+
+
+
+
+

+function int... getBlocksBySphere(Sphere sphere)
+

+
+
+

+
+
+
+
+

+function int, vec3 intersectRay(Ray ray, float t0, float t1)
+

+
+
+

+Intersects the given ray with the plan. This happens in the space of the plan. +

+

Parameters

+
+ray +The ray used to intersect.
+t0 +
+t1 +
+
+

Returns

+
+

+nil if no intersection happened, or block index as first and intersection location as second return value +

+
+

+
+
+
+
+

+function bool intersectsBox(Box box, var exceptionIndex)
+

+
+
+

+
+
+
+
+

+function bool intersectsSphere(Sphere sphere, var exceptionIndex)
+

+
+
+

+
+
+
+
+
+
+ Overview +
Home + Functions + Search +
+
Search:
+Predefined Functions & Example Scripts +
Command +Entity +FactionDatabase +PlanGenerator +Player +Sector +Server +UsableInventoryItem +
+
+

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

+
+ +
+ + diff --git a/Documentation/PlanDisplayer.html b/Documentation/PlanDisplayer.html new file mode 100644 index 0000000..14fe66e --- /dev/null +++ b/Documentation/PlanDisplayer.html @@ -0,0 +1,755 @@ + + + PlanDisplayer + + + + +
+
+

Avorion Script API Documentation

+
+
+ +
+
Search:
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+PlanDisplayer +PlanDisplayer +

Properties
+autoCenter +
+autoRotationSpeed +
+center +
+plan +
+showStats +
+viewDir +
+zoom +
+zoomable +
+center +
+height +
+index +
+layer +
+localCenter +
+localPosition +
+localRect +
+lower +
+mouseOver +
+position +
+rect +
+size +
+tooltip +
+tooltipWidth +
+upper +
+visible +
+width +

Member Functions
+clear +
+setPlans +
+hide +
+isMouseOverAndUnobscured +
+show +
+
+
+
+

PlanDisplayer : UIElement

+

+This object is only available on the client. +

+
+
+

+function PlanDisplayer(int index)
+

+
+
+

Returns

+
+

+A new instance of PlanDisplayer +

+
+

+
+
+
+
+ +
property bool autoCenter[write-only]
+
+
+
+
+ +
property float autoRotationSpeed[write-only]
+
+
+
+
+ +
property vec3 center[write-only]
+
+
+
+
+ +
property BlockPlan plan[write-only]
+
+
+
+
+ +
property bool showStats[write-only]
+
+
+
+
+ +
property vec3 viewDir[write-only]
+
+
+
+
+ +
property float zoom[write-only]
+
+
+
+
+ +
property bool zoomable[write-only]
+
+
+
+
+ +
property vec2 center
+
+
+
+
+ +
property float height
+
+
+
+
+ +
property int index[read-only]
+
+
+
+
+ +
property int layer
+
+
+
+
+ +
property vec2 localCenter[read-only]
+
+
+
+
+ +
property vec2 localPosition[read-only]
+
+
+
+
+ +
property Rect localRect[read-only]
+
+
+
+
+ +
property vec2 lower
+
+
+
+
+ +
property bool mouseOver[read-only]
+
+
+
+
+ +
property vec2 position
+
+
+
+
+ +
property Rect rect
+
+
+
+
+ +
property vec2 size
+
+
+
+
+ +
property var tooltip
+
+
+
+
+ +
property int tooltipWidth[write-only]
+
+
+
+
+ +
property vec2 upper
+
+
+
+
+ +
property bool visible
+
+
+
+
+ +
property float width
+
+
+
+
+
+
+

+function var clear()
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var setPlans(BlockPlan broken, BlockPlan intact)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var hide()
+

+
+
+

+Inherited from UIElement + +

+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function bool isMouseOverAndUnobscured()
+

+
+
+

+Inherited from UIElement + +

+

+
+
+
+
+

+function var show()
+

+
+
+

+Inherited from UIElement + +

+

Returns

+
+

+nothing +

+
+

+
+
+
+
+
+
+ Overview +
Home + Functions + Search +
+
Search:
+Predefined Functions & Example Scripts +
Command +Entity +FactionDatabase +PlanGenerator +Player +Sector +Server +UsableInventoryItem +
+
+

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

+
+ +
+ + diff --git a/Documentation/PlanGenerationStage.html b/Documentation/PlanGenerationStage.html new file mode 100644 index 0000000..67916ad --- /dev/null +++ b/Documentation/PlanGenerationStage.html @@ -0,0 +1,648 @@ + + + PlanGenerationStage + + + + +
+
+

Avorion Script API Documentation

+
+
+ +
+
Search:
+ +
+

PlanGenerationStage

+

+This is a single generation stage of a PlanStyle.
Volume weight: A stage has a certain volume weight, which is based on the total volume available for the generation of the plan.
Repeating: A stage can define repetition counters (decided randomly for each part: from, to), which is, say, X. Parts with VisualFeature.Repeating enabled will then have a higher chance (repetitionFavorChance) of being chosen over other parts and placed X times in a row, if possible.
Upscaling: A stage can decide to scale parts up instead of placing many parts. +

+
+
+

+function PlanGenerationStage()
+

+
+
+

Returns

+
+

+A new instance of PlanGenerationStage +

+
+

+
+
+
+
+ +
property int... additionalFeatures
+
+Features that are optionally enabled by this stage, if possible +
+
+
+ +
property var allrounderBlockIndex
+
+Block type that is used for allrounder blocks +
+
+
+ +
property string arrangementSeed
+
+
+
+
+ +
property float fixedParts
+
+Amount of parts that are always fixed, based on a seed +
+
+
+ +
property string fixedPartSeed
+
+
+
+
+ +
property int... forbiddenFeatures
+
+Features forbidden by this stage +
+
+
+ +
property bool ignoreSelfSymmetry
+
+Allow placed parts to ignore the self-symmetry rule, that they can only be placed on connectors where they would be mirrored onto themselves, when they have a symmetry feature +
+
+
+ +
property int maxAmount
+
+Maximum amount of parts to be used from this stage. +
+
+
+ +
property int maxRepetitions
+
+Maximum times a part can repeat. Default: 4 +
+
+
+ +
property int minAmount
+
+Minimum amount of parts to be used from this stage. May lead to Volume limit bein exceeded, which may result in a scale-down of the finished plan. +
+
+
+ +
property int minRepetitions
+
+Minimum times a part can repeat. Default: 2 +
+
+
+ +
property float mirrorBreakChance
+
+Chance per connector, that when this stage is started, its mirroring feature is removed. Default: 0 +
+
+
+ +
property int... onlyFeatures
+
+Only features of this stage, overrides all other settings +
+
+
+ +
property float repetitionFavorChance
+
+Chance that when repeating, a part from an open repetition is chosen over another part. Default: 0.5 +
+
+
+ +
property int... requiredFeatures
+
+Features required by this stage +
+
+
+ +
property var settings
+
+Settings table of the stage that is integrated into style settings and then passed to generated parts +
+
+
+ +
property float subdivideChance
+
+Chance that when this stage is started, a part's connectors are subdivided. Default: 0 +
+
+
+ +
property var upscaleThreshold
+
+Amount of parts that would have to be placed before an upscale takes place. Default: nil +
+
+
+ +
property int variations
+
+Amount of different parts there should be in this stage. Default: 1 +
+
+
+ +
property float volumeWeight
+
+weight of volume from the total volume pool that is available for this stage. Default: 1 +
+
+
+
+
+

+function var setAttachmentWeights(table[dir -> value] weights)
+

+
+
+

+Sets the weights for directions that should be used in this stage to attach new parts. When the weights in a certain direction are large, then the ship will be mostly developed in those direction during the stage. +

+

Parameters

+
+weights +A table containing the weights that are to be used. Example: { px = 0.1, nx = 0.1, py = 1, ny = 1, pz = 0.1, nz = 0.1, }). Note: 0 is a valid option, values greater than 1 are, too, negative values aren't.
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+
+
+ Overview +
Home + Functions + Search +
+
Search:
+Predefined Functions & Example Scripts +
Command +Entity +FactionDatabase +PlanGenerator +Player +Sector +Server +UsableInventoryItem +
+
+

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

+
+ +
+ + diff --git a/Documentation/PlanGeneratorFunctions.html b/Documentation/PlanGeneratorFunctions.html new file mode 100644 index 0000000..3720822 --- /dev/null +++ b/Documentation/PlanGeneratorFunctions.html @@ -0,0 +1,432 @@ + + + Avorion Predefined Functions - PlanGenerator + + + + +
+
+

Avorion Script API Documentation

+
+
+ +
+
Search:
+
+
+ + +
+topLevelGenerate +
+
+
+
+

PlanGenerator Script Predefined Functions

+
+

Tip: Scroll down for an example script!

+
+
+

+function topLevelGenerate(seed, settings)
+

+
+

+Generates a part from a plan part template. +

+

Parameters

+
+seed +The seed that is to be used
+settings +The settings for the generation
+
+

Expected return values

+
+

+The new generated part +

+
+

+
+
+


PlanGenerator Example Script

+
+ +-- Generates a part from a plan part template.
+function topLevelGenerate(seed, settings)
+
+end
+ +
+
+
+
+
+
+ Overview +
Home + Functions + Search +
+
Search:
+Predefined Functions & Example Scripts +
Command +Entity +FactionDatabase +PlanGenerator +Player +Sector +Server +UsableInventoryItem +
+
+

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

+
+ +
+ + diff --git a/Documentation/PlanMesh.html b/Documentation/PlanMesh.html new file mode 100644 index 0000000..864312b --- /dev/null +++ b/Documentation/PlanMesh.html @@ -0,0 +1,503 @@ + + + PlanMesh + + + + +
+
+

Avorion Script API Documentation

+
+
+ +
+
Search:
+
+
+ + + + + + + + + + + + + +
+PlanMesh +PlanMesh +

Properties
+entity +
+entityId +

Member Functions
+disableMesh +
+enableAll +
+enableMesh +
+
+
+
+

PlanMesh

+

+This object is only available on the client. +

+
+
+

+function PlanMesh(var id)
+

+
+
+

Parameters

+
+id +The id of the entity this component belongs to, or the entity itself, must be an id of an existing entity or nil for the entity in the current script context
+
+

Returns

+
+

+A new instance of PlanMesh +

+
+

+
+
+
+
+ +
property Entity entity[read-only]
+
+
+
+
+ +
property uuid entityId[read-only]
+
+
+
+
+
+
+

+function var disableMesh(int shading, int material)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var enableAll()
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var enableMesh(int shading, int material)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+
+
+ Overview +
Home + Functions + Search +
+
Search:
+Predefined Functions & Example Scripts +
Command +Entity +FactionDatabase +PlanGenerator +Player +Sector +Server +UsableInventoryItem +
+
+

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

+
+ +
+ + diff --git a/Documentation/PlanPart.html b/Documentation/PlanPart.html new file mode 100644 index 0000000..8e2ea99 --- /dev/null +++ b/Documentation/PlanPart.html @@ -0,0 +1,917 @@ + + + PlanPart + + + + +
+
+

Avorion Script API Documentation

+
+
+ +
+
Search:
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+PlanPart +PlanPart +

Properties
+allrounders +
+features +
+numBlocks +
+othersPaddingBox +
+paddingBox +
+selfPaddingBox +
+symmetries +
+transformationFeatures +

Member Functions
+block +
+connector +
+erase +
+getBlock +
+getBlocks +
+getConnectors +
+getPlan +
+merge +
+mirror +
+resize +
+rotate +
+scale +
+setConnectorFlags +
+setPlan +
+transform +
+
+
+
+

PlanPart

+
+
+

+function PlanPart()
+

+
+
+

Returns

+
+

+A new instance of PlanPart +

+
+

+
+
+
+
+ +
property int... allrounders
+
+Indices of all blocks that can be used as allrounders by the generator. Allrounder blocks can be changed to other types by the generator to ensure that a ship has enough energy or can fly +
+
+
+ +
property int... features
+
+All features that this particular part supports. Note: Will be set (and possibly overridden) by generator.lua +
+
+
+ +
property int numBlocks[read-only]
+
+
+
+
+ +
property Box othersPaddingBox
+
+A padding box around the part that, after placement of the part, will remain mostly unoccupied by other parts +
+
+
+ +
property Box paddingBox[write-only]
+
+A padding box around the part that is to remain free. Internally sets othersPaddingBox and selfPaddingBox +
+
+
+ +
property Box selfPaddingBox
+
+A padding box around the part that, during placement of the part, must not be occupied too much by other parts +
+
+
+ +
property var... symmetries
+
+All symmetry axes of the part. These will not get verified in any way, so make sure they're correct! Note: Will be set (and possibly overridden) by generator.lua +
+
+
+ +
property TransformationFeature... transformationFeatures
+
+All transformation features that this particular part supports. Note: Will be set (and possibly overridden) by generator.lua +
+
+
+
+
+

+function int block(int parentIndex, var directionOrPosition, int blockType, vec3 [or nil] size, var color, Matrix [or nil] orientation, var secondaryColor)
+

+
+
+

+Adds a new block to the part. +

+

Parameters

+
+parentIndex +The index of the block this one is attached to
+directionOrPosition +Direction the block is attached in. Can be a vec3 or a direction. A position must be passed as a vec3 and will be clamped so the new block and parent block touch each other. A direction can be passed as a string ("x", "-x", "px", "nx", "+x" etc.), an ivec3, or an int (-x = 0, +x = 1, -y = 2, +y = 3, -z = 4, +z = 5)
+blockType +The BlockType of the new block
+size +The size of the new block. If nil, the size of the parent will be used
+color +The color of the new block. Can be passed as a Color type, a table with HSV values {h=1, s=1, v=1}, a table with RGB values {r=1, g=1, b=1}, a vec4 (will be interpreted as RGBA), a vec3 (will be interpreted as RGB), or as a number (will be interpreted as a hex int). If nil, color of the parent block will be used.
+orientation +A matrix containing the orientation of the block. If nil, the identity matrix will be used.
+secondaryColor +The color of the new block. Similar to color. If nil, ColorNone() will be used.
+
+

Returns

+
+

+The index of the new block +

+
+

+
+
+
+
+

+function var connector(int blockIndex, var direction, table_t flags)
+

+
+
+

+Adds a new connector to the part. Connectors are used to attach parts during the generation process. Connectors are always in the middle of a block. No 2 connectors in the same direction can exist on the same block. +

+

Parameters

+
+blockIndex +The index of the block the connector is attached to
+direction +Direction of the connector. A direction can be passed as a string ("x", "-x", "px", "nx", "+x" etc.), an ivec3, or an int (-x = 0, +x = 1, -y = 2, +y = 3, -z = 4, +z = 5)
+flags +Optional table with flags: {mirror = "x", repeatable = true, featureWhitelist = {...}, featureBlacklist = {...}, out = true, in = true}

flags.mirror: Direction that connector should mirror in. All subsequent parts added to this connector will have the same mirror direction.
flags.out: Counterpart to "inOnly". Mutually exclusive. Connector is only used when the part was already attached to the plan. It cannot be used to attach the part itself to the plan.
flags.inOnly: Counterpart to "out". Mutually exclusive. Connector is only used to attach the part to the plan. It cannot be used to other, subsequent parts to this part.
flags.repeatable: Allows the part to repeat itself at this connector. See PlanGenerationStage docs for more details.
flags.featureWhitelist: An array-style table containing features. Only parts with the herein defined features can be added to this connector.
flags.featureBlacklist: An array-style table containing features. Only parts without the herein defined features can be added to this connector.

+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var erase(int blockIndex, var direction)
+

+
+
+

+Erases a block or connector +

+

Parameters

+
+blockIndex +The index of the block
+direction +Optional. If set, tries to erase a connector from the block into the direction. If nil, the block is erased.
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function BlockPlanBlock getBlock(int index)
+

+
+
+

+Finds a block. +

+

Parameters

+
+index +The index of the block
+
+

Returns

+
+

+BlockPlanBlock The block, or nil if not found +

+
+

+
+
+
+
+

+function int... getBlocks(int... types)
+

+
+
+

+Gathers all blocks of certain types. +

+

Parameters

+
+types +The types of the blocks
+
+

Returns

+
+

+A table containing the found blocks. +

+
+

+
+
+
+
+

+function table_t... getConnectors()
+

+
+
+

Returns

+
+

+Returns a table with all connectors of the part +

+
+

+
+
+
+
+

+function BlockPlan getPlan()
+

+
+
+

+returns the internal plan of the part +

+

+
+
+
+
+

+function int... merge(int... blocks)
+

+
+
+

+Merges blocks, similar to the building mode command. +

+

Parameters

+
+blocks +An array-style table containing all block indices that are to be merged
+
+

Returns

+
+

+multiple return values: All block indices that remain of the blocks passed into the function +

+
+

+
+
+
+
+

+function var mirror(var axis)
+

+
+
+

+Mirrors the entire part along an axis. +

+

Parameters

+
+axis +Direction around which axis the part should be rotated. A direction can be passed as a string ("x", "-x", "px", "nx", "+x" etc.), an ivec3, or an int (-x = 0, +x = 1, -y = 2, +y = 3, -z = 4, +z = 5)
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var resize(int blockIndex, var x, var y, var z)
+

+
+
+

+Resizes a block +

+

Parameters

+
+blockIndex +The index of the modified block
+x +The x scale factor
+y +The y scale factor
+z +The z scale factor
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var rotate(var axis, int times)
+

+
+
+

+Rotates the entire part around an axis X times by 90 degrees. +

+

Parameters

+
+axis +Direction around which axis the part should be rotated. A direction can be passed as a string ("x", "-x", "px", "nx", "+x" etc.), an ivec3, or an int (-x = 0, +x = 1, -y = 2, +y = 3, -z = 4, +z = 5)
+times +The amount of times the part should be rotated. Can be -2, -1, 1, 2
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var scale(vec3 factor)
+

+
+
+

+Scales the entire part. +

+

Parameters

+
+factor +vec3 containing the scale factors
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var setConnectorFlags(int blockIndex, var direction, table_t flags)
+

+
+
+

+Sets the flags of a connector. Note: internally calls erase() and then connector() +

+

Parameters

+
+blockIndex +The index of the block the connector is coming from
+direction +The direction of the connector
+flags +The new flags of the connector. See connector() function for details on those
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var setPlan(BlockPlan plan)
+

+
+
+

+Sets the entire plan of the part. +

+

Parameters

+
+plan +The used plan
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var transform(int blockIndex, table_t flags)
+

+
+
+

+Changes some properties of the given block. +

+

Parameters

+
+blockIndex +The index of the block
+flags +Flags table containing the changes of the block. If nil, this property of the part isn't changed: {type = BlockType.Hull, lower = vec3(...), upper = vec3(...), position = vec3(...), size = vec3(...), color = ..., orientation = Matrix()}

flags.type: The new type of the part
flags.lower, flags.upper: vec3s containing the new lower, upper dimensions of the block. Do not use together with position, size
flags.position, flags.size: vec3s containing the new position, size dimensions of the block. Do not use together with lower, upper
flags.color: The new color of the block. See block() for details on how to pass colors
flags.orientation: Matrix containing the new orientation of the block

+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+
+
+ Overview +
Home + Functions + Search +
+
Search:
+Predefined Functions & Example Scripts +
Command +Entity +FactionDatabase +PlanGenerator +Player +Sector +Server +UsableInventoryItem +
+
+

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

+
+ +
+ + diff --git a/Documentation/PlanStyle.html b/Documentation/PlanStyle.html new file mode 100644 index 0000000..3127005 --- /dev/null +++ b/Documentation/PlanStyle.html @@ -0,0 +1,591 @@ + + + PlanStyle + + + + +
+
+

Avorion Script API Documentation

+
+
+ +
+
Search:
+
+
+ + + + + + + + + + + + + + + + + + + + +
+PlanStyle +PlanStyle +

Properties
+additionalFeatures +
+balanceForShip +
+forbiddenFeatures +
+name +
+requiredFeatures +
+scaleRecommendation +
+seed +
+settings +

Member Functions
+addStage +
+clearStages +
+initialize +
+setStage +
+
+
+
+

PlanStyle

+

+Based on a style, a craft plan can be generated. Generation happens in several stages, one after another, which all have their own amount of volume and blocks available (configured in PlanGeneratorStage). In each stage, several parts are selected and then added to the plan, depending on the rules set in the parts and the style. Usually not the entire volume is used up, and the plan will be scaled so that it fits the given volume. +

+
+
+

+function PlanStyle()
+

+
+
+

Returns

+
+

+A new instance of PlanStyle +

+
+

+
+
+
+
+ +
property int... additionalFeatures
+
+Array-style table: Collection of features that are additionally added for all stages of the style. Can be overridden by forbidden features of stages. +
+
+
+ +
property bool balanceForShip
+
+If set, the generator will try to balance for flight aspects (use for ships, but not for stations). +
+
+
+ +
property int... forbiddenFeatures
+
+Array-style table: Collection of features that are forbidden for all stages of the style. Can be overridden by required features of stages. +
+
+
+ +
property string name
+
+The name of the style. Mainly for aesthetic or debugging purposes. +
+
+
+ +
property int... requiredFeatures
+
+Array-style table: Collection of features that are required for all stages of the style. Can be overridden by forbidden features of stages. +
+
+
+ +
property bool scaleRecommendation
+
+This is a recommendation whether or not plans generated from this style should be scaled to the desired volume. This is only a recommendation, when generating plans, this setting can be overridden. +
+
+
+ +
property string seed
+
+The seed of the style. Will be used when initializing the style, to make it deterministic. +
+
+
+ +
property var settings
+
+A table of settings that will be passed to parts generated from this style. See partexample.lua for more info on this. Settings of stages will be integrated into this table, while trying to override as little as possible (ie. sub-tables will be integrated into subtables). Example settings: {size = vec3(2, 2, 2), scale = 0.8, factionSeed = "abc", colors = {base = {r = 0.75, g = 0.75, b = 0.75}, dark = {r = 0.25, g = 0.25, b = 0.25}}} +
+
+
+
+
+

+function var addStage(PlanGenerationStage stage)
+

+
+
+

+Adds a new stage to the style. +

+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var clearStages()
+

+
+
+

+Removes all stages from the style. +

+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var initialize()
+

+
+
+

+Initializes the style. This selects which parts will be used, based on the seed, making the style deterministic. This should be the last operation on a style. Style should not be modified after this. Doing so results in undefined behavior. +

+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var setStage(int index, PlanGenerationStage stage)
+

+
+
+

+Replaces a stage in the style. +

+

Returns

+
+

+nothing +

+
+

+
+
+
+
+
+
+ Overview +
Home + Functions + Search +
+
Search:
+Predefined Functions & Example Scripts +
Command +Entity +FactionDatabase +PlanGenerator +Player +Sector +Server +UsableInventoryItem +
+
+

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

+
+ +
+ + diff --git a/Documentation/Planet.html b/Documentation/Planet.html new file mode 100644 index 0000000..b2fdd68 --- /dev/null +++ b/Documentation/Planet.html @@ -0,0 +1,441 @@ + + + Planet + + + + +
+
+

Avorion Script API Documentation

+
+
+ +
+
Search:
+
+
+ + + + + + + + + + +
+Planet +Planet +

Properties
+position +
+size +

Member Functions
+
+
+
+

Planet

+

+This object is only available on the client. +

+
+
+

+function Planet(int index)
+

+
+
+

Returns

+
+

+A new instance of Planet +

+
+

+
+
+
+
+ +
property Matrix position[read-only]
+
+
+
+
+ +
property float size[read-only]
+
+
+
+
+
+
+
+
+ Overview +
Home + Functions + Search +
+
Search:
+Predefined Functions & Example Scripts +
Command +Entity +FactionDatabase +PlanGenerator +Player +Sector +Server +UsableInventoryItem +
+
+

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

+
+ +
+ + diff --git a/Documentation/PlanetSpecifics.html b/Documentation/PlanetSpecifics.html new file mode 100644 index 0000000..850d525 --- /dev/null +++ b/Documentation/PlanetSpecifics.html @@ -0,0 +1,495 @@ + + + PlanetSpecifics + + + + +
+
+

Avorion Script API Documentation

+
+
+ +
+
Search:
+
+
+ + + + + + + + + + + + + + + + +
+PlanetSpecifics +PlanetSpecifics +

Properties
+atmosphere +
+clouds +
+habitated +
+isPrimary +
+position +
+ring +
+size +
+type +

Member Functions
+
+
+
+

PlanetSpecifics

+
+
+

+function PlanetSpecifics()
+

+
+
+

+This is the default constructor of PlanetSpecifics. No further arguments are required. +

+

Returns

+
+

+A new instance of PlanetSpecifics +

+
+

+
+
+
+
+ +
property bool atmosphere
+
+
+
+
+ +
property bool clouds
+
+
+
+
+ +
property bool habitated
+
+
+
+
+ +
property bool isPrimary
+
+
+
+
+ +
property vec3 position
+
+
+
+
+ +
property bool ring
+
+
+
+
+ +
property float size
+
+
+
+
+ +
property int type
+
+
+
+
+
+
+
+
+ Overview +
Home + Functions + Search +
+
Search:
+Predefined Functions & Example Scripts +
Command +Entity +FactionDatabase +PlanGenerator +Player +Sector +Server +UsableInventoryItem +
+
+

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

+
+ +
+ + diff --git a/Documentation/Player Callbacks.html b/Documentation/Player Callbacks.html new file mode 100644 index 0000000..91e6959 --- /dev/null +++ b/Documentation/Player Callbacks.html @@ -0,0 +1,1713 @@ + + + Avorion Script Callbacks - Player + + + + +
+
+

Avorion Script API Documentation

+
+
+ +
+
Search:
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+onAllianceChanged +
+onAllianceInvitationReceived +
+onAllScriptValuesChanged +
+onChatMessage +
+onChatRestrictionTimeChanged +
+onCraftChanged +
+onGalaxyMapKeyboardUp +
+onGalaxyMapMouseUp +
+onGroupChanged +
+onGroupLeaderChanged +
+onGroupPlayerCraftChanged +
+onGroupPlayerSectorChanged +
+onHomeSectorChanged +
+onHyperspaceRestrictionTimeChanged +
+onItemAdded +
+onItemChanged +
+onItemPropertiesChanged +
+onItemRemoved +
+onJumpRouteCalculationStarted +
+onKnownSectorAdded +
+onKnownSectorRemoved +
+onKnownSectorUpdated +
+onMailAdded +
+onMailCleared +
+onMailDeleted +
+onMailRead +
+onMaxBuildableMaterialChanged +
+onMaxBuildableSocketsChanged +
+onMoveToReconstructionSite +
+onPlayerArrivalConfirmed +
+onPlayerEnteredGroup +
+onPlayerLeftGroup +
+onReconstructionSectorChanged +
+onRelationChanged +
+onRelationLevelChanged +
+onRelationStatusChanged +
+onResourcesChanged +
+onScriptAdded +
+onScriptRemoved +
+onScriptValueChanged +
+onSectorArrivalConfirmed +
+onSectorChanged +
+onSectorEntered +
+onSectorLeft +
+onShipAvailabilityUpdated +
+onShipCargoUpdated +
+onShipChanged +
+onShipCrewUpdated +
+onShipHyperspacePropertiesUpdated +
+onShipIconUpdated +
+onShipInfoAdded +
+onShipInfoRemoved +
+onShipInfoUpdated +
+onShipNameUpdated +
+onShipOrderInfoUpdated +
+onShipPayDayUpdated +
+onShipPlanUpdated +
+onShipPositionUpdated +
+onShipReconstructionValueUpdated +
+onShipStatusMessageUpdated +
+onShipTitleUpdated +
+onShipTypeUpdated +
+
+
+
+

Player Callbacks

+

+Note: Callbacks have to be buffered in certain situations and won't happen immediately. When unregistering a callback during a callback, all callbacks that were buffered during the last frame may still be sent, even though they were unregistered. +

+
+

+callback onAllianceChanged(allianceIndex)
+

+
+

+Executed whenever the player's alliance changes +

+

Parameters

+
+allianceIndex +The faction index of the alliance
+
+

+
+
+
+

+callback onAllianceInvitationReceived(allianceIndex)
+

+
+

+Executed whenever the player receives an invitation from an alliance +

+

Parameters

+
+allianceIndex +The faction index of the alliance
+
+

+
+
+
+

+callback onAllScriptValuesChanged(playerIndex)
+

+
+

+Executed whenever all scripts values of the player have been changed at once +

+

Parameters

+
+playerIndex +The index of the player
+
+

+
+
+
+

+callback onChatMessage(playerIndex, text, channel)
+

+
+

+Executed whenever the player sent a chat message to the server. Only called if the chat message is valid and the player doesn't have a chat ban. +

+

Parameters

+
+playerIndex +Index of the player
+text +The text content of the chat message
+channel +The channel the message was sent to. 0 = All, 1 = Sector, 2 = Group, 3 = Alliance
+
+

+
+
+
+

+callback onChatRestrictionTimeChanged(time)
+

+
+

+Executed whenever a player's chat restriction time is changed. This usually only happens when administrators need to stop a player from using chat. +

+

Parameters

+
+time +The time that player is muted
+
+

+
+
+
+

+callback onCraftChanged(id, previousId)
+

+
+

+Called whenever the player changes their flown craft +

+

Parameters

+
+id +The id of the new craft
+previousId +The id of the previous craft
+
+

+
+
+
+

+callback onGalaxyMapKeyboardUp(button)
+

+
+

+Executed whenever a keyboard-up event occurs on the galaxy map. Keyboad-Up events are transferred to all UI elements and can't be consumed. +

+

Parameters

+
+button +The scancode of the button that was pressed
+
+

+
+
+
+

+callback onGalaxyMapMouseUp(button, mx, my, cx, cy, mapMoved)
+

+
+

+Executed whenever a mouse-up event occurs on the galaxy map. Mouse-Up events are transferred to all UI elements and can't be consumed. +

+

Parameters

+
+button +The button that was released
+mx +The mouse X position
+my +The mouse Y position
+cx +The coordinates X position
+cy +The coordinates Y position
+mapMoved +True if the map was moved during the mouse pressing
+
+

+
+
+
+

+callback onGroupChanged(groupIndex)
+

+
+

+Executed whenever the player's group index changes +

+

Parameters

+
+groupIndex +The index of the group the player is in
+
+

+
+
+
+

+callback onGroupLeaderChanged(playerIndex)
+

+
+

+Executed whenever the leader of the player's group changes +

+

Parameters

+
+playerIndex +The index of the new leader player
+
+

+
+
+
+

+callback onGroupPlayerCraftChanged(playerIndex, id)
+

+
+

+Executed whenever another player of the player's group changes crafts +

+

Parameters

+
+playerIndex +The index of the other player
+id +The id of the new craft
+
+

+
+
+
+

+callback onGroupPlayerSectorChanged(playerIndex, x, y)
+

+
+

+Executed whenever another player of the player's group changes sectors +

+

Parameters

+
+playerIndex +The index of the other player
+x +The x coordinate of the new sector
+y +The y coordinate of the new sector
+
+

+
+
+
+

+callback onHomeSectorChanged(x, y)
+

+
+

+Called whenever the home sector of the player changes +

+

Parameters

+
+x +The x coordinate of the new home sector
+y +The y coordinate of the new home sector
+
+

+
+
+
+

+callback onHyperspaceRestrictionTimeChanged(time)
+

+
+

+Executed whenever a player's hyperspace restriction time is changed. This usually only happens when administrators need to trap a player in a specific sector. +

+

Parameters

+
+time +The time that player is trapped
+
+

+
+
+
+

+callback onItemAdded(itemIndex, amount, amountBefore)
+

+
+

+Executed whenever the number of items in a particular item slot in the player's inventory increases or a new item was added. +

+

Parameters

+
+itemIndex +Index of the item
+amount +The new amount of this item
+amountBefore +The amount of this item before the change
+
+

+
+
+
+

+callback onItemChanged(itemIndex, amount, amountBefore)
+

+
+

+Executed whenever the number of items in a particular item slot in the player's inventory changes. +

+

Parameters

+
+itemIndex +Index of the item
+amount +The new amount of this item
+amountBefore +The amount of this item before the change
+
+

+
+
+
+

+callback onItemPropertiesChanged(item, index, amount)
+

+
+

+Called whenever an item in the player inventory changes properties +

+

Parameters

+
+item +The inventory item
+index +Index of the inventory item
+amount +Amount of items in the slot
+
+

+
+
+
+

+callback onItemRemoved(itemIndex, amount, amountBefore)
+

+
+

+Executed whenever the number of items in a particular item slot in the player's inventory decreases or the item was removed. +

+

Parameters

+
+itemIndex +Index of the item
+amount +The new amount of this item
+amountBefore +The amount of this item before the change
+
+

+
+
+
+

+callback onJumpRouteCalculationStarted(playerIndex, craftIndex, destinationX, destinationY)
+

+
+

+Executed whenever a player starts a new hyperspace jump route calculation +

+

Parameters

+
+playerIndex +The index of the player starting the calculation
+craftIndex +The id of the entity that does the calculation
+destinationX +The x-coordinate of the destination sector
+destinationY +The y-coordinate of the destination sector
+
+

+
+
+
+

+callback onKnownSectorAdded(x, y)
+

+
+

+Called whenever a new tracked sector is added to the player database +

+

Parameters

+
+x +The x coordinate of the sector
+y +The y coordinate of the sector
+
+

+
+
+
+

+callback onKnownSectorRemoved(x, y)
+

+
+

+Called whenever a tracked sector was removed from the player database +

+

Parameters

+
+x +The x coordinate of the sector
+y +The y coordinate of the sector
+
+

+
+
+
+

+callback onKnownSectorUpdated(x, y)
+

+
+

+Called whenever a tracked sector is updated in the player database +

+

Parameters

+
+x +The x coordinate of the sector
+y +The y coordinate of the sector
+
+

+
+
+
+

+callback onMailAdded(playerIndex, mail, mailIndex)
+

+
+

+Executed whenever the player receives a new mail +

+

Parameters

+
+playerIndex +Index of the player
+mail +The received mail
+mailIndex +Index of the received mail
+
+

+
+
+
+

+callback onMailCleared(playerIndex, mailIndex)
+

+
+

+Executed whenever the player takes the contents of a mail +

+

Parameters

+
+playerIndex +Index of the player
+mailIndex +Index of the cleared mail
+
+

+
+
+
+

+callback onMailDeleted(playerIndex, mailIndex)
+

+
+

+Executed whenever the player deletes a mail +

+

Parameters

+
+playerIndex +Index of the player
+mailIndex +Index of the deleted mail
+
+

+
+
+
+

+callback onMailRead(playerIndex, mailIndex)
+

+
+

+Executed whenever the player reads a mail +

+

Parameters

+
+playerIndex +Index of the player
+mailIndex +Index of the read mail
+
+

+
+
+
+

+callback onMaxBuildableMaterialChanged(material)
+

+
+

+Executed whenever a player's ship building knowledge changes. +

+

Parameters

+
+material +The material up to which the player can now build blocks
+
+

+
+
+
+

+callback onMaxBuildableSocketsChanged(slots)
+

+
+

+Executed whenever a player's ship building knowledge changes. +

+

Parameters

+
+slots +The maximum amount of slots the player can now build
+
+

+
+
+
+

+callback onMoveToReconstructionSite(x, y, playerIndex)
+

+
+

+Executed whenever a move to reconstruction or respawn site is triggered because the player was destroyed. Called even if the player is already at their reconstruction/respawn site. Coordinates can be either reconstruction site or respawn site. +

+

Parameters

+
+x +X coordinate of destination the player is moved to
+y +Y coordinate of destination the player is moved to
+playerIndex +Index of the player
+
+

+
+
+
+

+callback onPlayerArrivalConfirmed(playerIndex)
+

+
+

+Executed when the client reports that it entered the target sector. Clients send a message to the server once the loading screen ended. Once you receive this callback, the client has successfully loaded the sector it went into. +

+

Parameters

+
+playerIndex +Index of the player
+
+

+
+
+
+

+callback onPlayerEnteredGroup(playerIndex)
+

+
+

+Executed whenever another player enters the player's group +

+

Parameters

+
+playerIndex +The index of the player who entered
+
+

+
+
+
+

+callback onPlayerLeftGroup(playerIndex)
+

+
+

+Executed whenever another player from the player's group leaves the group +

+

Parameters

+
+playerIndex +The index of the player who left
+
+

+
+
+
+

+callback onReconstructionSectorChanged(x, y)
+

+
+

+Executed whenever the player's respawn sector changes +

+

Parameters

+
+x +The x coordinate of the new sector
+y +The y coordinate of the new sector
+
+

+
+
+
+

+callback onRelationChanged(index, level, levelBefore, notify)
+

+
+

+Called whenever relations of the player to another faction change +

+

Parameters

+
+index +The index of the other faction
+level +The level of the relation
+levelBefore +The level of the relation before the change
+notify +A boolean indicating whether or not the player should be notified about the change
+
+

+
+
+
+

+callback onRelationLevelChanged(playerIndex, factionIndex, relations)
+

+
+

+Executed whenever the relations of the player to another faction changes. +

+

Parameters

+
+playerIndex +Index of the player
+factionIndex +Index of the other faction
+relations +The new relations of the player to the other faction
+
+

+
+
+
+

+callback onRelationStatusChanged(playerIndex, factionIndex, status)
+

+
+

+Executed whenever the relation status of the player to another faction changes. +

+

Parameters

+
+playerIndex +Index of the player
+factionIndex +Index of the other faction
+status +The new relation status of the player to the other faction
+
+

+
+
+
+

+callback onResourcesChanged(playerIndex)
+

+
+

+Executed whenever the money or resources of the player change +

+

Parameters

+
+playerIndex +Index of the player
+
+

+
+
+
+

+callback onScriptAdded(playerIndex, scriptIndex, scriptPath)
+

+
+

+Executed after a script was added to the player +

+

Parameters

+
+playerIndex +The index of the player
+scriptIndex +The index of the script that was added
+scriptPath +The path of the old script
+
+

+
+
+
+

+callback onScriptRemoved(playerIndex, oldScriptIndex, scriptPath)
+

+
+

+Executed after a script was removed from the player +

+

Parameters

+
+playerIndex +The index of the player
+oldScriptIndex +The old index of the script that was removed
+scriptPath +The path of the old script
+
+

+
+
+
+

+callback onScriptValueChanged(playerIndex, name, value)
+

+
+

+Executed whenever a script value of the player was changed +

+

Parameters

+
+playerIndex +The index of the player
+name +The name of the value
+value +The new value
+
+

+
+
+
+

+callback onSectorArrivalConfirmed(playerIndex, x, y)
+

+
+

+Executed when the client reports that it entered the target sector. Clients send a message to the server once the loading screen ended. Once you receive this callback, the client has successfully loaded the sector it went into. +

+

Parameters

+
+playerIndex +Index of the player
+x +X-Coordinate of the entered sector
+y +Y-Coordinate of the entered sector
+
+

+
+
+
+

+callback onSectorChanged(x, y)
+

+
+

+Executed whenever the player changes the sector. Specifically, this callback is sent whenever the player's sector coordinates change in the database, even when they're not online. +

+

Parameters

+
+x +The x coordinate of the new sector
+y +The y coordinate of the new sector
+
+

+
+
+
+

+callback onSectorEntered(playerIndex, x, y, sectorChangeType)
+

+
+

+Executed whenever the player is logged in and physically enters a new sector. +

+

Parameters

+
+playerIndex +Index of the player
+x +The x coordinates of the sector entered
+y +The y coordinates of the sector entered
+sectorChangeType +The kind of sector change that is happening
+
+

+
+
+
+

+callback onSectorLeft(playerIndex, x, y, sectorChangeType)
+

+
+

+Executed whenever the player leaves their current sector, before entities are removed +

+

Parameters

+
+playerIndex +Index of the player
+x +The x coordinates of the sector left
+y +The y coordinates of the sector left
+sectorChangeType +The kind of sector change that is happening
+
+

+
+
+
+

+callback onShipAvailabilityUpdated(name, availability)
+

+
+

+Called whenever a ShipInfo changes availability status (ie. goes into background simulation) +

+

Parameters

+
+name +The name of the ship
+availability +The new availability status of the ship
+
+

+
+
+
+

+callback onShipCargoUpdated(name)
+

+
+

+Called whenever the cargo of a ShipInfo changes +

+

Parameters

+
+name +The name of the ship
+
+

+
+
+
+

+callback onShipChanged(playerIndex, craftId)
+

+
+

+Executed whenever the player changes the ship he is currently flying +

+

Parameters

+
+playerIndex +Index of the player
+craftId +The id of the new craft he is flying
+
+

+
+
+
+

+callback onShipCrewUpdated(name)
+

+
+

+Called whenever the crew of a ShipInfo changes +

+

Parameters

+
+name +The name of the ship
+
+

+
+
+
+

+callback onShipHyperspacePropertiesUpdated(name, reach, canPassRifts)
+

+
+

+Called whenever the hyperspace reach of a ShipInfo changes +

+

Parameters

+
+name +The name of the ship
+reach +The new reach of the ship
+canPassRifts +A boolean indicating whether the ship can jump across rifts
+
+

+
+
+
+

+callback onShipIconUpdated(name, icon)
+

+
+

+Called whenever the icon of a ShipInfo changes +

+

Parameters

+
+name +The name of the ship
+icon +The new icon of the ship
+
+

+
+
+
+

+callback onShipInfoAdded(name)
+

+
+

+Called whenever a ShipInfo is added to the player +

+

Parameters

+
+name +The name of the new ship
+
+

+
+
+
+

+callback onShipInfoRemoved(name)
+

+
+

+Called whenever a ShipInfo is removed from the player +

+

Parameters

+
+name +The name of the ship
+
+

+
+
+
+

+callback onShipInfoUpdated(name)
+

+
+

+Called whenever a ShipInfo is updated in some way +

+

Parameters

+
+name +The name of the ship
+
+

+
+
+
+

+callback onShipNameUpdated(name, newName)
+

+
+

+Called whenever the name of a ShipInfo changes +

+

Parameters

+
+name +The name of the ship
+newName +The new name of the ship
+
+

+
+
+
+

+callback onShipOrderInfoUpdated(name, orderInfo)
+

+
+

+Called whenever the order info of a ShipInfo changes +

+

Parameters

+
+name +The name of the ship
+orderInfo +The order info of the ship
+
+

+
+
+
+

+callback onShipPayDayUpdated(name, time)
+

+
+

+Called whenever the payday of a ShipInfo changes +

+

Parameters

+
+name +The name of the ship
+time +The payday of the ship
+
+

+
+
+
+

+callback onShipPlanUpdated(name)
+

+
+

+Called whenever the plan of a ShipInfo changes +

+

Parameters

+
+name +The name of the ship
+
+

+
+
+
+

+callback onShipPositionUpdated(name, x, y)
+

+
+

+Called whenever a ShipInfo changes sectors +

+

Parameters

+
+name +The name of the ship
+x +The new x coordinate of the ship
+y +The new y coordinate of the ship
+
+

+
+
+
+

+callback onShipReconstructionValueUpdated(name, value)
+

+
+

+Called whenever the reconstruction value of a ShipInfo changes +

+

Parameters

+
+name +The name of the ship
+value +The value of the ship
+
+

+
+
+
+

+callback onShipStatusMessageUpdated(name, status, args)
+

+
+

+Called whenever the status info of a ShipInfo changes +

+

Parameters

+
+name +The name of the ship
+status +The status info text of the ship
+args +A table holding the status info localization arguments
+
+

+
+
+
+

+callback onShipTitleUpdated(name)
+

+
+

+Called whenever the title of a ShipInfo changes +

+

Parameters

+
+name +The name of the ship
+
+

+
+
+
+

+callback onShipTypeUpdated(name, type)
+

+
+

+Called whenever the entity type of a ShipInfo changes +

+

Parameters

+
+name +The name of the ship
+type +The new entity type of the ship
+
+

+
+
+
+
+
+
+ Overview +
Home + Functions + Search +
+
Search:
+Predefined Functions & Example Scripts +
Command +Entity +FactionDatabase +PlanGenerator +Player +Sector +Server +UsableInventoryItem +
+
+

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

+
+ +
+ + diff --git a/Documentation/Player [Client] Callbacks.html b/Documentation/Player [Client] Callbacks.html new file mode 100644 index 0000000..6d033d9 --- /dev/null +++ b/Documentation/Player [Client] Callbacks.html @@ -0,0 +1,1680 @@ + + + Avorion Script Callbacks - Player [Client] + + + + +
+
+

Avorion Script API Documentation

+
+
+ +
+
Search:
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+onAllianceChanged +
+onAllianceInvitationReceived +
+onChatRestrictionTimeChanged +
+onConfirmSectorArrival +
+onGalaxyMapUpdate +
+onGroupChanged +
+onGroupLeaderChanged +
+onGroupPlayerCraftChanged +
+onGroupPlayerSectorChanged +
+onHideGalaxyMap +
+onHomeSectorChanged +
+onHyperspaceRestrictionTimeChanged +
+onItemAdded +
+onItemChanged +
+onItemPropertiesChanged +
+onItemRemoved +
+onKnownSectorAdded +
+onKnownSectorRemoved +
+onKnownSectorUpdated +
+onMailAdded +
+onMailCleared +
+onMailRead +
+onMailRemoved +
+onMailUpdated +
+onMapRenderAfterLayers +
+onMapRenderAfterTooltips +
+onMapRenderAfterUI +
+onMapRenderBeforeLayers +
+onNameChanged +
+onPlayerEnteredGroup +
+onPlayerLeftGroup +
+onPostRenderHud +
+onPostRenderIndicators +
+onPreRenderHud +
+onReconstructionSectorChanged +
+onRelationChanged +
+onRelationLevelChanged +
+onRelationStatusChanged +
+onResourcesChanged +
+onSectorChanged +
+onSelectMapCoordinates +
+onShipAvailabilityUpdated +
+onShipCargoUpdated +
+onShipChanged +
+onShipCrewUpdated +
+onShipHyperspacePropertiesUpdated +
+onShipIconUpdated +
+onShipInfoAdded +
+onShipInfoRemoved +
+onShipInfoUpdated +
+onShipNameUpdated +
+onShipOrderInfoUpdated +
+onShipPayDayUpdated +
+onShipPlanUpdated +
+onShipPositionUpdated +
+onShipReconstructionValueUpdated +
+onShipStatusMessageUpdated +
+onShipTitleUpdated +
+onShipTypeUpdated +
+onShowGalaxyMap +
+onStartDialog +
+onStateChanged +
+onStateFormChanged +
+onTraitChanged +
+
+
+
+

Player [Client] Callbacks

+

+Note: Callbacks have to be buffered in certain situations and won't happen immediately. When unregistering a callback during a callback, all callbacks that were buffered during the last frame may still be sent, even though they were unregistered. +

+
+

+callback onAllianceChanged(allianceIndex)
+

+
+

+Executed whenever the player's alliance changes +

+

Parameters

+
+allianceIndex +The faction index of the alliance
+
+

+
+
+
+

+callback onAllianceInvitationReceived(allianceIndex)
+

+
+

+Executed whenever the player receives an invitation from an alliance +

+

Parameters

+
+allianceIndex +The faction index of the alliance
+
+

+
+
+
+

+callback onChatRestrictionTimeChanged(time)
+

+
+

+Executed whenever a player's chat restriction time is changed. This usually only happens when administrators need to stop a player from using chat. +

+

Parameters

+
+time +The time that player is muted
+
+

+
+
+
+

+callback onConfirmSectorArrival(x, y)
+

+
+

+Called whenever a loading screen is no longer visible and the player now sees the new sector +

+

Parameters

+
+x +X coordinate of the new sector
+y +Y coordinate of the new sector
+
+

+
+
+
+

+callback onGalaxyMapUpdate(timeStep)
+

+
+

+Executed whenever the map is visible and updated by a game tick. +

+

Parameters

+
+timeStep +The time step since the last update
+
+

+
+
+
+

+callback onGroupChanged(groupIndex)
+

+
+

+Executed whenever the player's group index changes +

+

Parameters

+
+groupIndex +The index of the group the player is in
+
+

+
+
+
+

+callback onGroupLeaderChanged(playerIndex)
+

+
+

+Executed whenever the leader of the player's group changes +

+

Parameters

+
+playerIndex +The index of the new leader player
+
+

+
+
+
+

+callback onGroupPlayerCraftChanged(playerIndex, id)
+

+
+

+Executed whenever another player of the player's group changes crafts +

+

Parameters

+
+playerIndex +The index of the other player
+id +The id of the new craft
+
+

+
+
+
+

+callback onGroupPlayerSectorChanged(playerIndex, x, y)
+

+
+

+Executed whenever another player of the player's group changes sectors +

+

Parameters

+
+playerIndex +The index of the other player
+x +The x coordinate of the new sector
+y +The y coordinate of the new sector
+
+

+
+
+
+

+callback onHideGalaxyMap()
+

+
+

+Executed whenever the player closes the map. +

+

+
+
+
+

+callback onHomeSectorChanged(x, y)
+

+
+

+Called whenever the home sector of the player changes +

+

Parameters

+
+x +The x coordinate of the new home sector
+y +The y coordinate of the new home sector
+
+

+
+
+
+

+callback onHyperspaceRestrictionTimeChanged(time)
+

+
+

+Executed whenever a player's hyperspace restriction time is changed. This usually only happens when administrators need to trap a player in a specific sector. +

+

Parameters

+
+time +The time that player is trapped
+
+

+
+
+
+

+callback onItemAdded(item, index, amount, amountBefore, tagsChanged)
+

+
+

+Called whenever an item in the player inventory is added +

+

Parameters

+
+item +The inventory item
+index +Index of the inventory item
+amount +Amount of items in the slot
+amountBefore +Amount of items in the slot before the change
+tagsChanged +Boolean indicating if the tags of the item changed
+
+

+
+
+
+

+callback onItemChanged(item, index, amount, amountBefore)
+

+
+

+Called whenever an item in the player inventory changes +

+

Parameters

+
+item +The inventory item
+index +Index of the inventory item
+amount +Amount of items in the slot
+amountBefore +Amount of items in the slot before the change
+
+

+
+
+
+

+callback onItemPropertiesChanged(item, index, amount)
+

+
+

+Called whenever an item in the player inventory changes properties +

+

Parameters

+
+item +The inventory item
+index +Index of the inventory item
+amount +Amount of items in the slot
+
+

+
+
+
+

+callback onItemRemoved(item, index, amount, amountBefore)
+

+
+

+Called whenever an item in the player inventory is removed +

+

Parameters

+
+item +The inventory item
+index +Index of the inventory item
+amount +Amount of items in the slot
+amountBefore +Amount of items in the slot before the change
+
+

+
+
+
+

+callback onKnownSectorAdded(x, y)
+

+
+

+Called whenever a new tracked sector is added to the player database +

+

Parameters

+
+x +The x coordinate of the sector
+y +The y coordinate of the sector
+
+

+
+
+
+

+callback onKnownSectorRemoved(x, y)
+

+
+

+Called whenever a tracked sector was removed from the player database +

+

Parameters

+
+x +The x coordinate of the sector
+y +The y coordinate of the sector
+
+

+
+
+
+

+callback onKnownSectorUpdated(x, y)
+

+
+

+Called whenever a tracked sector is updated in the player database +

+

Parameters

+
+x +The x coordinate of the sector
+y +The y coordinate of the sector
+
+

+
+
+
+

+callback onMailAdded(mail, id)
+

+
+

+Executed whenever the player receives a mail +

+

Parameters

+
+mail +The mail the player received
+
+

+
+
+
+

+callback onMailCleared(mailIndex, id)
+

+
+

+Executed whenever a mail was cleared +

+

Parameters

+
+mailIndex +The index of the cleared mail
+
+

+
+
+
+

+callback onMailRead(mailIndex, id)
+

+
+

+Executed whenever a mail was read +

+

Parameters

+
+mailIndex +The index of the read mail
+
+

+
+
+
+

+callback onMailRemoved(mailIndex, id)
+

+
+

+Executed whenever a mail was removed from the player's mailbox +

+

Parameters

+
+mailIndex +The index of the removed mail
+
+

+
+
+
+

+callback onMailUpdated(mail, mailIndex)
+

+
+

+Executed whenever a mail was updated +

+

Parameters

+
+mail +The mail
+mailIndex +The index of the read mail
+
+

+
+
+
+

+callback onMapRenderAfterLayers()
+

+
+

+Executed whenever the map is rendered, after its layers were rendered +

+

+
+
+
+

+callback onMapRenderAfterTooltips()
+

+
+

+Executed whenever the map is rendered, after its tooltips were rendered +

+

+
+
+
+

+callback onMapRenderAfterUI()
+

+
+

+Executed whenever the map is rendered, after its UI was rendered +

+

+
+
+
+

+callback onMapRenderBeforeLayers()
+

+
+

+Executed whenever the map is rendered, before its layers are rendered +

+

+
+
+
+

+callback onNameChanged(newName)
+

+
+

+Called whenever the name of the player changes +

+

Parameters

+
+newName +The new name of the player
+
+

+
+
+
+

+callback onPlayerEnteredGroup(playerIndex)
+

+
+

+Executed whenever another player enters the player's group +

+

Parameters

+
+playerIndex +The index of the player who entered
+
+

+
+
+
+

+callback onPlayerLeftGroup(playerIndex)
+

+
+

+Executed whenever another player from the player's group leaves the group +

+

Parameters

+
+playerIndex +The index of the player who left
+
+

+
+
+
+

+callback onPostRenderHud(state)
+

+
+

+Executed every frame during rendering after rendering the HUD. All render calls that should overlay the HUD should be done here. +

+

Parameters

+
+state +The PlayerStateType of the client player (ie. flying, building, etc.)
+
+

+
+
+
+

+callback onPostRenderIndicators(state)
+

+
+

+Executed every frame during rendering after rendering the targeters. All render calls that draw target indicators should be done here. +

+

Parameters

+
+state +The PlayerStateType of the client player (ie. flying, building, etc.)
+
+

+
+
+
+

+callback onPreRenderHud(state)
+

+
+

+Executed every frame during rendering before rendering the HUD. All render calls that are not supposed to overlay the HUD should be done here. +

+

Parameters

+
+state +The PlayerStateType of the client player (ie. flying, building, etc.)
+
+

+
+
+
+

+callback onReconstructionSectorChanged(x, y)
+

+
+

+Executed whenever the player's respawn sector changes +

+

Parameters

+
+x +The x coordinate of the new sector
+y +The y coordinate of the new sector
+
+

+
+
+
+

+callback onRelationChanged(index, level, levelBefore, notify)
+

+
+

+Called whenever relations of the player to another faction change +

+

Parameters

+
+index +The index of the other faction
+level +The level of the relation
+levelBefore +The level of the relation before the change
+notify +A boolean indicating whether or not the player should be notified about the change
+
+

+
+
+
+

+callback onRelationLevelChanged(index, level, levelBefore, notify)
+

+
+

+Called whenever relation levels of the player to another faction change +

+

Parameters

+
+index +The index of the other faction
+level +The level of the relation
+levelBefore +The level of the relation before the change
+notify +A boolean indicating whether or not the player should be notified about the change
+
+

+
+
+
+

+callback onRelationStatusChanged(index, status, statusBefore, notify)
+

+
+

+Called whenever the relation status of the player to another faction change (relation status is not yet implemented so this callback will most likely not fire until relation status is in) +

+

Parameters

+
+index +The index of the other faction
+status +The status of the relations
+statusBefore +The status of the relation before the change
+notify +A boolean indicating whether or not the player should be notified about the change
+
+

+
+
+
+

+callback onResourcesChanged(money, resources, infinite, notify)
+

+
+

+Called whenever the amount of money or resources of the player changes +

+

Parameters

+
+money +The amount of money the player owns
+resources +The amount of resources the player owns, as table
+infinite +True if the player has infinite resources, false otherwise
+notify +A boolean indicating whether or not the player should be visually notified in some way that the resources changed
+
+

+
+
+
+

+callback onSectorChanged(x, y)
+

+
+

+Executed whenever the player changes the sector +

+

Parameters

+
+x +The x coordinate of the new sector
+y +The y coordinate of the new sector
+
+

+
+
+
+

+callback onSelectMapCoordinates(x, y)
+

+
+

+Executed whenever a coordinate on the map is selected. +

+

+
+
+
+

+callback onShipAvailabilityUpdated(name, availability)
+

+
+

+Called whenever a ShipInfo changes availability status (ie. goes into background simulation) +

+

Parameters

+
+name +The name of the ship
+availability +The new availability status of the ship
+
+

+
+
+
+

+callback onShipCargoUpdated(name)
+

+
+

+Called whenever the cargo of a ShipInfo changes +

+

Parameters

+
+name +The name of the ship
+
+

+
+
+
+

+callback onShipChanged(playerIndex, craftId, previousId)
+

+
+

+Executed whenever the player changes the ship they're currently flying +

+

Parameters

+
+playerIndex +Index of the player
+craftId +The id of the new craft
+previousId +The id of the previous craft
+
+

+
+
+
+

+callback onShipCrewUpdated(name)
+

+
+

+Called whenever the crew of a ShipInfo changes +

+

Parameters

+
+name +The name of the ship
+
+

+
+
+
+

+callback onShipHyperspacePropertiesUpdated(name, reach, canPassRifts)
+

+
+

+Called whenever the hyperspace reach of a ShipInfo changes +

+

Parameters

+
+name +The name of the ship
+reach +The new reach of the ship
+canPassRifts +A boolean indicating whether the ship can jump across rifts
+
+

+
+
+
+

+callback onShipIconUpdated(name, icon)
+

+
+

+Called whenever the icon of a ShipInfo changes +

+

Parameters

+
+name +The name of the ship
+icon +The new icon of the ship
+
+

+
+
+
+

+callback onShipInfoAdded(name)
+

+
+

+Called whenever a ShipInfo is added to the player +

+

Parameters

+
+name +The name of the new ship
+
+

+
+
+
+

+callback onShipInfoRemoved(name)
+

+
+

+Called whenever a ShipInfo is removed from the player +

+

Parameters

+
+name +The name of the ship
+
+

+
+
+
+

+callback onShipInfoUpdated(name)
+

+
+

+Called whenever a ShipInfo is updated in some way +

+

Parameters

+
+name +The name of the ship
+
+

+
+
+
+

+callback onShipNameUpdated(name, newName)
+

+
+

+Called whenever the name of a ShipInfo changes +

+

Parameters

+
+name +The name of the ship
+newName +The new name of the ship
+
+

+
+
+
+

+callback onShipOrderInfoUpdated(name, orderInfo)
+

+
+

+Called whenever the order info of a ShipInfo changes +

+

Parameters

+
+name +The name of the ship
+orderInfo +The order info of the ship
+
+

+
+
+
+

+callback onShipPayDayUpdated(name, time)
+

+
+

+Called whenever the payday of a ShipInfo changes +

+

Parameters

+
+name +The name of the ship
+time +The payday of the ship
+
+

+
+
+
+

+callback onShipPlanUpdated(name)
+

+
+

+Called whenever the plan of a ShipInfo changes +

+

Parameters

+
+name +The name of the ship
+
+

+
+
+
+

+callback onShipPositionUpdated(name, x, y)
+

+
+

+Called whenever a ShipInfo changes sectors +

+

Parameters

+
+name +The name of the ship
+x +The new x coordinate of the ship
+y +The new y coordinate of the ship
+
+

+
+
+
+

+callback onShipReconstructionValueUpdated(name, value)
+

+
+

+Called whenever the reconstruction value of a ShipInfo changes +

+

Parameters

+
+name +The name of the ship
+value +The value of the ship
+
+

+
+
+
+

+callback onShipStatusMessageUpdated(name, status, arguments)
+

+
+

+Called whenever the status info of a ShipInfo changes +

+

Parameters

+
+name +The name of the ship
+status +The status info text of the ship
+arguments +A table holding the arguments of the status
+
+

+
+
+
+

+callback onShipTitleUpdated(name)
+

+
+

+Called whenever the title of a ShipInfo changes +

+

Parameters

+
+name +The name of the ship
+
+

+
+
+
+

+callback onShipTypeUpdated(name, type)
+

+
+

+Called whenever the entity type of a ShipInfo changes +

+

Parameters

+
+name +The name of the ship
+type +The new entity type of the ship
+
+

+
+
+
+

+callback onShowGalaxyMap()
+

+
+

+Executed whenever the player opens the map. +

+

+
+
+
+

+callback onStartDialog(objectIndex)
+

+
+

+Executed when a dialog is started. +

+

Parameters

+
+objectIndex +The index of the entity the dialog is started with
+
+

+
+
+
+

+callback onStateChanged(newState, oldState)
+

+
+

+Executed when the state of the player changes +

+

Parameters

+
+newState +The new state of the player
+oldState +The old state of the player
+
+

+
+
+
+

+callback onStateFormChanged(newForm)
+

+
+

+Called whenever the state form of the player changes +

+

Parameters

+
+newForm +The new state form of the player
+
+

+
+
+
+

+callback onTraitChanged(trait, value)
+

+
+

+Called whenever a "personality" trait of the player changes +

+

Parameters

+
+trait +The name of the trait that was changed
+value +The value of the new trait, from -1 to 1
+
+

+
+
+
+
+
+
+ Overview +
Home + Functions + Search +
+
Search:
+Predefined Functions & Example Scripts +
Command +Entity +FactionDatabase +PlanGenerator +Player +Sector +Server +UsableInventoryItem +
+
+

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

+
+ +
+ + diff --git a/Documentation/Player [Client].html b/Documentation/Player [Client].html new file mode 100644 index 0000000..6ab3508 --- /dev/null +++ b/Documentation/Player [Client].html @@ -0,0 +1,1634 @@ + + + Player [Client] + + + + +
+
+

Avorion Script API Documentation

+
+
+ +
+
Search:
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Player [Client] +Player +

Properties
+alliance +
+allianceIndex +
+cameraAt +
+cameraEye +
+cameraPosition +
+cameraUp +
+craft +
+craftFaction +
+craftId +
+craftIndex +
+fullLogId +
+group +
+index +
+infiniteResources +
+isAIFaction +
+isAlliance +
+isBehemothDLCInstalled +
+isBlackMarketDLCInstalled +
+isInteracting +
+isIntoTheRiftDLCInstalled +
+isPlayer +
+maxBuildableMaterial +
+maxBuildableSockets +
+maxNumMails +
+maxNumShips +
+maxNumStations +
+money +
+name +
+numMails +
+numShips +
+ownsBehemothDLC +
+ownsBlackMarketDLC +
+ownsIntoTheRiftDLC +
+selectedObject +
+state +

Member Functions
+addComparisonItem +
+buildingAllowed +
+callbacksRegistered +
+canPay +
+getAllRelations +
+getHomeSectorCoordinates +
+getInteractedEntity +
+getInventory +
+getKnownSector +
+getKnownSectorCoordinates +
+getKnownSectors +
+getKnownSectorsOfFaction +
+getKnownSectorsWithFaction +
+getMail +
+getNamesOfShipsInSector +
+getPlanStyle +
+getPlanStyleNames +
+getReconstructionSiteCoordinates +
+getRelation +
+getRelations +
+getRelationStatus +
+getResources +
+getScripts +
+getSelectionGroup +
+getSelectionGroups +
+getShipAvailability +
+getShipBoundingBox +
+getShipCanPassRifts +
+getShipCargo +
+getShipCargos +
+getShipDestroyed +
+getShipHyperspaceReach +
+getShipIcon +
+getShipNames +
+getShipOrderInfo +
+getShipPayment +
+getShipPaymentTime +
+getShipPlan +
+getShipPosition +
+getShipReconstructionValue +
+getShipStatus +
+getShipSystems +
+getShipTurretDesigns +
+getShipType +
+getValue +
+hasScript +
+invokeFunction +
+knowsFaction +
+knowsSector +
+ownsShip +
+registerCallback +
+sendCallback +
+sendChatMessage +
+setCameraKeyFrames +
+setFollowCamera +
+setSelectionGroup +
+startBuilding +
+startInteracting +
+stopInteracting +
+unregisterCallback +
+
+
+
+

Player [Client]

+

+This object is only available on the client. +

+
+
+

+function Player()
+

+
+
+

Returns

+
+

+A new instance of Player +

+
+

+
+
+
+
+ +
property Alliance alliance[read-only]
+
+
+
+
+ +
property var allianceIndex[read-only]
+
+
+
+
+ +
property vec3 cameraAt[read-only]
+
+
+
+
+ +
property vec3 cameraEye[read-only]
+
+
+
+
+ +
property Matrix cameraPosition[read-only]
+
+
+
+
+ +
property vec3 cameraUp[read-only]
+
+
+
+
+ +
property Entity craft
+
+
+
+
+ +
property UserObject craftFaction[read-only]
+
+
+
+
+ +
property Uuid craftId
+
+
+
+
+ +
property Uuid craftIndex
+
+
+
+
+ +
property string fullLogId[read-only]
+
+
+
+
+ +
property Group group[read-only]
+
+
+
+
+ +
property int index[read-only]
+
+
+
+
+ +
property bool infiniteResources
+
+
+
+
+ +
property bool isAIFaction[read-only]
+
+
+
+
+ +
property bool isAlliance[read-only]
+
+
+
+
+ +
property bool isBehemothDLCInstalled[read-only]
+
+returns true if the Behemoth DLC is owned and installed according to local Steam +
+
+
+ +
property bool isBlackMarketDLCInstalled[read-only]
+
+returns true if the Black Market DLC is owned and installed according to local Steam +
+
+
+ +
property bool isInteracting[read-only]
+
+
+
+
+ +
property bool isIntoTheRiftDLCInstalled[read-only]
+
+returns true if the Into The Rift DLC is owned and installed according to local Steam +
+
+
+ +
property bool isPlayer[read-only]
+
+
+
+
+ +
property Material maxBuildableMaterial
+
+
+
+
+ +
property int maxBuildableSockets
+
+
+
+
+ +
property unsigned int maxNumMails[read-only]
+
+
+
+
+ +
property var maxNumShips[read-only]
+
+
+
+
+ +
property var maxNumStations[read-only]
+
+
+
+
+ +
property int money[read-only]
+
+
+
+
+ +
property var name[read-only]
+
+
+
+
+ +
property unsigned int numMails[read-only]
+
+
+
+
+ +
property unsigned int numShips[read-only]
+
+
+
+
+ +
property bool ownsBehemothDLC[read-only]
+
+returns true if the player owns the Behemoth DLC according to server +
+
+
+ +
property bool ownsBlackMarketDLC[read-only]
+
+returns true if the player owns the Black Market DLC according to server +
+
+
+ +
property bool ownsIntoTheRiftDLC[read-only]
+
+returns true if the player owns the Into The Rift DLC according to server +
+
+
+ +
property Entity selectedObject
+
+
+
+
+ +
property PlayerStateType state[read-only]
+
+
+
+
+
+
+

+function var addComparisonItem(var item)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function bool, string buildingAllowed(Entity entity)
+

+
+
+

+
+
+
+
+

+function int callbacksRegistered(string callbackName, var functionName)
+

+
+
+

+Check how many functions are registered to a callback from the current script VM. +

+

Parameters

+
+callbackName +The name of the callback
+functionName +The name of the function for which to check. If nil, will count all functions that are registered to this callback.
+
+

Returns

+
+

+The amount of functions registered to the callback +

+
+

+
+
+
+
+

+function bool, string, table<int, string> canPay()
+

+
+
+

+
+
+
+
+

+function Relation... getAllRelations()
+

+
+
+

+
+
+
+
+

+function int, int getHomeSectorCoordinates()
+

+
+
+

+
+
+
+
+

+function Entity getInteractedEntity()
+

+
+
+

+
+
+
+
+

+function Inventory getInventory()
+

+
+
+

+
+
+
+
+

+function SectorView getKnownSector(int x, int y)
+

+
+
+

+
+
+
+
+

+function ivec2... getKnownSectorCoordinates()
+

+
+
+

+
+
+
+
+

+function SectorView... getKnownSectors()
+

+
+
+

+
+
+
+
+

+function SectorView... getKnownSectorsOfFaction(int factionIndex)
+

+
+
+

+
+
+
+
+

+function SectorView... getKnownSectorsWithFaction(int factionIndex)
+

+
+
+

+
+
+
+
+

+function Mail getMail(unsigned int index)
+

+
+
+

+
+
+
+
+

+function string... getNamesOfShipsInSector(int x, int y)
+

+
+
+

+
+
+
+
+

+function PlanStyle getPlanStyle(string name)
+

+
+
+

+
+
+
+
+

+function string... getPlanStyleNames()
+

+
+
+

+
+
+
+
+

+function int, int getReconstructionSiteCoordinates()
+

+
+
+

+
+
+
+
+

+function Relation getRelation(int factionIndex)
+

+
+
+

+
+
+
+
+

+function int getRelations(int factionIndex)
+

+
+
+

+
+
+
+
+

+function int getRelationStatus(int factionIndex)
+

+
+
+

+
+
+
+
+

+function unsigned int... getResources()
+

+
+
+

+
+
+
+
+

+function table<int, string> getScripts()
+

+
+
+

+
+
+
+
+

+function var getSelectionGroup(int index)
+

+
+
+

+
+
+
+
+

+function var getSelectionGroups()
+

+
+
+

+
+
+
+
+

+function var getShipAvailability(string name)
+

+
+
+

+
+
+
+
+

+function Box getShipBoundingBox(string name)
+

+
+
+

+
+
+
+
+

+function bool getShipCanPassRifts(string name)
+

+
+
+

+
+
+
+
+

+function string getShipCargo(string name)
+

+
+
+

+
+
+
+
+

+function table<TradingGood, int> getShipCargos(string name)
+

+
+
+

+
+
+
+
+

+function var getShipDestroyed(string name)
+

+
+
+

+
+
+
+
+

+function float getShipHyperspaceReach(string name)
+

+
+
+

+
+
+
+
+

+function string getShipIcon(string name)
+

+
+
+

+
+
+
+
+

+function string... getShipNames()
+

+
+
+

+
+
+
+
+

+function var getShipOrderInfo(string name)
+

+
+
+

+
+
+
+
+

+function float getShipPayment(string name)
+

+
+
+

+
+
+
+
+

+function float getShipPaymentTime(string name)
+

+
+
+

+
+
+
+
+

+function BlockPlan getShipPlan(string name)
+

+
+
+

+
+
+
+
+

+function var... getShipPosition(string name)
+

+
+
+

+
+
+
+
+

+function double getShipReconstructionValue(string name)
+

+
+
+

+
+
+
+
+

+function string getShipStatus(string name)
+

+
+
+

+
+
+
+
+

+function pair... getShipSystems(string name)
+

+
+
+

+
+
+
+
+

+function table<int, TurretDesign> getShipTurretDesigns(string name)
+

+
+
+

+
+
+
+
+

+function int getShipType(string name)
+

+
+
+

+
+
+
+
+

+function var getValue(string name)
+

+
+
+

+
+
+
+
+

+function bool hasScript(string name)
+

+
+
+

+
+
+
+
+

+function var... invokeFunction(var scriptName, string functionName, var... arguments)
+

+
+
+

+Invokes a function in a script of the player. Use this function to invoke functions from one script in another script. The first return value of the function is an integer indicating whether or not the call was successful. When it was, this integer is followed by the return values of the invoked function. +

+

Parameters

+
+scriptName +The name of the script containing the function
+functionName +The name of the function that will be executed
+arguments +An arbitrary list of arguments that will be given to the invoked function. Only numbers, std::strings and nil are supported here.
+
+

Returns

+
+

+Returns at least 1 value indicating if the call succeeded:
0 The call was successful. In this case, the return values of the script are returned in addition to the call result, following the call result.
3 The call failed because the given script was not found in the player.
4 The call failed because the given function was not found in the script.
5 The call failed because the script's state has errors and is invalid
+

+
+

+
+
+
+
+

+function bool knowsFaction(int factionIndex)
+

+
+
+

+
+
+
+
+

+function bool knowsSector(int x, int y)
+

+
+
+

+
+
+
+
+

+function bool ownsShip(string name)
+

+
+
+

+
+
+
+
+

+function var registerCallback(string callbackName, string functionName)
+

+
+
+

+Register a callback in the player. The callback will be removed when the sector is changed or the receiver, if it's an entity, is destroyed. Double registration of callbacks doesn't work. When the same callback to the same callback of the same script instance is registered twice, it will still only be called once. +

+

Parameters

+
+callbackName +The name of the callback
+functionName +The name of the function that will be executed in the script when the callback happens
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var sendCallback()
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var sendChatMessage(var content, var channel)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var setCameraKeyFrames()
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var setFollowCamera(var entity)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var setSelectionGroup(int index, var group_in)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var startBuilding(Entity entity)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var startInteracting(Entity entity, string scriptName, int optionIndex)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var stopInteracting()
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var unregisterCallback(string callbackName, string functionName)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+
+
+ Overview +
Home + Functions + Search +
+
Search:
+Predefined Functions & Example Scripts +
Command +Entity +FactionDatabase +PlanGenerator +Player +Sector +Server +UsableInventoryItem +
+
+

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

+
+ +
+ + diff --git a/Documentation/Player [Server].html b/Documentation/Player [Server].html new file mode 100644 index 0000000..af82996 --- /dev/null +++ b/Documentation/Player [Server].html @@ -0,0 +1,2715 @@ + + + Player [Server] + + + + +
+
+

Avorion Script API Documentation

+
+
+ +
+
Search:
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Player [Server] +Player +

Properties
+alliance +
+allianceIndex +
+craft +
+craftFaction +
+craftIndex +
+group +
+id +
+loggingOut +
+maxBuildableMaterial +
+maxBuildableSockets +
+maxNumMails +
+maxNumShips +
+maxNumStations +
+numCrafts +
+numMails +
+numShips +
+numStations +
+ownsBehemothDLC +
+ownsBlackMarketDLC +
+ownsIntoTheRiftDLC +
+playtime +
+alwaysAtWar +
+baseName +
+fullLogId +
+homeSectorUnknown +
+index +
+infiniteResources +
+initialRelations +
+initialRelationsToPlayer +
+isAIFaction +
+isAlliance +
+isPlayer +
+money +
+name +
+stateForm +
+staticRelationsToAI +
+staticRelationsToAll +
+staticRelationsToPlayers +
+unformattedName +

Member Functions
+activateUsableItem +
+addKnownSector +
+addMail +
+addScript +
+addScriptOnce +
+callbacksRegistered +
+clearMail +
+createCraftFromShipInfo +
+getKnownSector +
+getKnownSectorCoordinates +
+getKnownSectors +
+getKnownSectorsOfFaction +
+getMail +
+getMailsById +
+getNamesOfShipsInSector +
+getReconstructionSiteCoordinates +
+getRespawnSiteCoordinates +
+getScripts +
+getSectorCoordinates +
+getShipAvailability +
+getShipBoundingBox +
+getShipCanPassRifts +
+getShipCargo +
+getShipCargos +
+getShipCrew +
+getShipDestroyed +
+getShipHyperspaceReach +
+getShipIcon +
+getShipNames +
+getShipOrderInfo +
+getShipPayment +
+getShipPaymentTime +
+getShipPlan +
+getShipPosition +
+getShipReconstructionValue +
+getShipStatus +
+getShipSystems +
+getShipTurretDesigns +
+getShipType +
+hasScript +
+invokeFunction +
+knowsSector +
+ownsShip +
+readMail +
+registerCallback +
+removeDestroyedShipInfo +
+removeKnownSector +
+removeMail +
+removeScript +
+resetHyperspaceCalculation +
+resolveScriptPath +
+restoreCraft +
+restoreTurrets +
+sendCallback +
+sendChatMessage +
+setReconstructionSiteCoordinates +
+setRespawnSiteCoordinates +
+setSectorCoordinates +
+setShipAvailability +
+setShipDestroyed +
+setShipIcon +
+setShipOrderInfo +
+setShipReconstructionValue +
+unregisterCallback +
+updateKnownSector +
+updateKnownSectorPreserveNote +
+updateMail +
+addPlanStyle +
+canPay +
+canPayMoney +
+canPayResource +
+clearValues +
+getAllRelations +
+getHomeSectorCoordinates +
+getInventory +
+getLanguage +
+getPlanStyle +
+getPlanStyleNames +
+getRelation +
+getRelations +
+getRelationStatus +
+getResources +
+getTrait +
+getTraits +
+getValue +
+getValues +
+hasStaticRelationsToFaction +
+knowsFaction +
+pay +
+payResource +
+payWithoutNotify +
+receive +
+receiveResource +
+receiveWithoutNotify +
+sendCallback +
+sendChatMessage +
+setHomeSectorCoordinates +
+setLanguage +
+setResources +
+setStaticRelationsToFaction +
+setTrait +
+setValue +
+
+
+
+

Player [Server] : Faction [Server]

+

+This object is only available on the server. +

+
+
+

+function Player(var index)
+

+
+
+

Returns

+
+

+A new instance of Player +

+
+

+
+
+
+
+ +
property Alliance alliance[read-only]
+
+
+
+
+ +
property var allianceIndex[read-only]
+
+
+
+
+ +
property Entity craft
+
+
+
+
+ +
property UserObject craftFaction
+
+returns the player's ship's faction (ie. their alliance or themselves). If the player is not in a craft, returns the player. +
+
+
+ +
property Uuid craftIndex
+
+
+
+
+ +
property Group group[read-only]
+
+
+
+
+ +
property Uuid id[read-only]
+
+
+
+
+ +
property bool loggingOut[read-only]
+
+
+
+
+ +
property Material maxBuildableMaterial
+
+
+
+
+ +
property int maxBuildableSockets
+
+
+
+
+ +
property unsigned int maxNumMails[read-only]
+
+
+
+
+ +
property var maxNumShips[read-only]
+
+
+
+
+ +
property var maxNumStations[read-only]
+
+
+
+
+ +
property unsigned int numCrafts[read-only]
+
+
+
+
+ +
property unsigned int numMails[read-only]
+
+
+
+
+ +
property int numShips[read-only]
+
+
+
+
+ +
property int numStations[read-only]
+
+
+
+
+ +
property bool ownsBehemothDLC[read-only]
+
+
+
+
+ +
property bool ownsBlackMarketDLC[read-only]
+
+
+
+
+ +
property bool ownsIntoTheRiftDLC[read-only]
+
+
+
+
+ +
property unsigned int playtime[read-only]
+
+
+
+
+ +
property bool alwaysAtWar
+
+
+
+
+ +
property string baseName
+
+
+
+
+ +
property string fullLogId[read-only]
+
+
+
+
+ +
property bool homeSectorUnknown
+
+
+
+
+ +
property int index[read-only]
+
+
+
+
+ +
property bool infiniteResources
+
+
+
+
+ +
property int initialRelations
+
+Note: AIFactions only +
+
+
+ +
property int initialRelationsToPlayer
+
+Note: AIFactions only +
+
+
+ +
property bool isAIFaction[read-only]
+
+
+
+
+ +
property bool isAlliance[read-only]
+
+
+
+
+ +
property bool isPlayer[read-only]
+
+
+
+
+ +
property int money
+
+
+
+
+ +
property string name[read-only]
+
+
+
+
+ +
property string stateForm
+
+
+
+
+ +
property bool staticRelationsToAI
+
+
+
+
+ +
property bool staticRelationsToAll
+
+
+
+
+ +
property bool staticRelationsToPlayers
+
+
+
+
+ +
property Format unformattedName[read-only]
+
+
+
+
+
+
+

+function int activateUsableItem(int index)
+

+
+
+

+Activates a UsableItem from the player's inventory. +

+

Parameters

+
+index +The index of the item in the inventory
+
+

Returns

+
+

+Returns a number indicating if the call succeeded:
0 The item was successfully activated.
1 The item responded that it can't be activated right now.
2 The item wasn't found or it is no UsableInventoryItem. +

+
+

+
+
+
+
+

+function var addKnownSector(SectorView view)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function unsigned int addMail(Mail mail)
+

+
+
+

+
+
+
+
+

+function var addScript()
+

+
+
+

+
+
+
+
+

+function var addScriptOnce()
+

+
+
+

+
+
+
+
+

+function int callbacksRegistered(string callbackName, var functionName)
+

+
+
+

+Check how many functions are registered to a callback from the current script VM. +

+

Parameters

+
+callbackName +The name of the callback
+functionName +The name of the function for which to check. If nil, will count all functions that are registered to this callback.
+
+

Returns

+
+

+The amount of functions registered to the callback. -1 if an error occurred +

+
+

+
+
+
+
+

+function var clearMail(unsigned int index)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function Entity createCraftFromShipInfo(string name, Matrix position, var faction)
+

+
+
+

+
+
+
+
+

+function SectorView getKnownSector(int x, int y)
+

+
+
+

+
+
+
+
+

+function ivec2... getKnownSectorCoordinates()
+

+
+
+

+
+
+
+
+

+function SectorView... getKnownSectors()
+

+
+
+

+
+
+
+
+

+function SectorView... getKnownSectorsOfFaction(int factionIndex)
+

+
+
+

+
+
+
+
+

+function Mail getMail(unsigned int index)
+

+
+
+

+
+
+
+
+

+function Mail... getMailsById(string id)
+

+
+
+

+
+
+
+
+

+function string... getNamesOfShipsInSector(int x, int y)
+

+
+
+

+
+
+
+
+

+function int, int getReconstructionSiteCoordinates()
+

+
+
+

+
+
+
+
+

+function int, int getRespawnSiteCoordinates()
+

+
+
+

+
+
+
+
+

+function table<int, string> getScripts()
+

+
+
+

+
+
+
+
+

+function Coordinates getSectorCoordinates()
+

+
+
+

+
+
+
+
+

+function var getShipAvailability(string name)
+

+
+
+

+
+
+
+
+

+function Box getShipBoundingBox(string name)
+

+
+
+

+
+
+
+
+

+function bool getShipCanPassRifts(string name)
+

+
+
+

+
+
+
+
+

+function string getShipCargo(string name)
+

+
+
+

+
+
+
+
+

+function table<TradingGood, int> getShipCargos(string name)
+

+
+
+

+
+
+
+
+

+function Crew getShipCrew(string name)
+

+
+
+

+
+
+
+
+

+function var getShipDestroyed(string name)
+

+
+
+

+
+
+
+
+

+function float getShipHyperspaceReach(string name)
+

+
+
+

+
+
+
+
+

+function string getShipIcon(string name)
+

+
+
+

+
+
+
+
+

+function string... getShipNames()
+

+
+
+

+
+
+
+
+

+function var getShipOrderInfo(string name)
+

+
+
+

+
+
+
+
+

+function float getShipPayment(string name)
+

+
+
+

+
+
+
+
+

+function float getShipPaymentTime(string name)
+

+
+
+

+
+
+
+
+

+function BlockPlan getShipPlan(string name)
+

+
+
+

+
+
+
+
+

+function var... getShipPosition(string name)
+

+
+
+

+
+
+
+
+

+function double getShipReconstructionValue(string name)
+

+
+
+

+
+
+
+
+

+function string getShipStatus(string name)
+

+
+
+

+
+
+
+
+

+function pair... getShipSystems(string name)
+

+
+
+

+
+
+
+
+

+function table<int, TurretDesign> getShipTurretDesigns(string name)
+

+
+
+

+
+
+
+
+

+function int getShipType(string name)
+

+
+
+

+
+
+
+
+

+function var hasScript(string name)
+

+
+
+

+
+
+
+
+

+function var... invokeFunction(var scriptName, string functionName, var... arguments)
+

+
+
+

+Invokes a function in a script of the player. Use this function to invoke functions from one script in another script. The first return value of the function is an integer indicating whether or not the call was successful. When it was, this integer is followed by the return values of the invoked function. +

+

Parameters

+
+scriptName +The name or index of the script containing the function
+functionName +The name of the function that will be executed
+arguments +An arbitrary list of arguments that will be given to the invoked function
+
+

Returns

+
+

+Returns at least 1 value indicating if the call succeeded:
0 The call was successful. In this case, the return values of the script are returned in addition to the call result, following the call result.
3 The call failed because the given script was not found
4 The call failed because the given function was not found in the script
5 The call failed because the script's state has errors and is invalid
+

+
+

+
+
+
+
+

+function bool knowsSector(int x, int y)
+

+
+
+

+
+
+
+
+

+function bool ownsShip(string name)
+

+
+
+

+
+
+
+
+

+function var readMail(unsigned int index)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function int registerCallback(string callbackName, string functionName)
+

+
+
+

+Register a callback in a player. The callback may arrive with a delay. Double registration of callbacks doesn't work. When the same callback to the same callback of the same script instance is registered twice, it will still only be called once. +

+

Parameters

+
+callbackName +The name of the callback
+functionName +The name of the function that will be executed in the script when the callback happens
+
+

Returns

+
+

+0 on success, 1 if the registration failed +

+
+

+
+
+
+
+

+function var removeDestroyedShipInfo(string name)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var removeKnownSector(int x, int y)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var removeMail(unsigned int index)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var removeScript(var script)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var resetHyperspaceCalculation()
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var resolveScriptPath(string path)
+

+
+
+

+
+
+
+
+

+function Entity restoreCraft(string name, Matrix position, bool withMalus)
+

+
+
+

+
+
+
+
+

+function var restoreTurrets(Entity scriptCraft)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var sendCallback()
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var sendChatMessage(var sender, int messageType, string message, PluralForm... args)
+

+
+
+

+Send a chat message to the player. Supports sending of format arguments so that the message can be translated on the client. +

+

Parameters

+
+sender +The sender that will be displayed for the chat message
+messageType +The type of chat message, 0 = Normal, 1 = Error, 2 = Warning, 3 = Info
+message +The message that will be sent
+args +The format arguments that will be sent
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var setReconstructionSiteCoordinates(int x, int y)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var setRespawnSiteCoordinates(int x, int y)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var setSectorCoordinates(int x, int y)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var setShipAvailability(string name, ShipAvailability availability)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var setShipDestroyed(string name, bool destroyed)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var setShipIcon(string name, string icon)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var setShipOrderInfo(string name, var value)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var setShipReconstructionValue(string name, double value)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function int unregisterCallback(string callbackName, string functionName)
+

+
+
+

+
+
+
+
+

+function var updateKnownSector(SectorView view)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var updateKnownSectorPreserveNote(SectorView newView)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var updateMail(Mail mail, unsigned int index)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var addPlanStyle(string name, PlanStyle style)
+

+
+
+

+Inherited from Faction [Server] + +

+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function bool, string, table<int, string> canPay()
+

+
+
+

+Inherited from Faction [Server] + +

+

+
+
+
+
+

+function bool, string, table<int, string> canPayMoney(int money)
+

+
+
+

+Inherited from Faction [Server] + +

+

+
+
+
+
+

+function bool, string, table<int, string> canPayResource(Material material, int amount)
+

+
+
+

+Inherited from Faction [Server] + +

+

+
+
+
+
+

+function var clearValues()
+

+
+
+

+Removes all custom values of the object Inherited from Faction [Server] + +

+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function Relation... getAllRelations()
+

+
+
+

+Inherited from Faction [Server] + +

+

+
+
+
+
+

+function int, int getHomeSectorCoordinates()
+

+
+
+

+Inherited from Faction [Server] + +

+

+
+
+
+
+

+function Inventory getInventory()
+

+
+
+

+Inherited from Faction [Server] + +

+

+
+
+
+
+

+function Language getLanguage()
+

+
+
+

+Inherited from Faction [Server] + +

+

+
+
+
+
+

+function PlanStyle getPlanStyle(string name)
+

+
+
+

+Inherited from Faction [Server] + +

+

+
+
+
+
+

+function string... getPlanStyleNames()
+

+
+
+

+Inherited from Faction [Server] + +

+

+
+
+
+
+

+function Relation getRelation(int otherFactionIndex)
+

+
+
+

+Inherited from Faction [Server] + +

+

+
+
+
+
+

+function int getRelations(int factionIndex)
+

+
+
+

+Inherited from Faction [Server] + +

+

+
+
+
+
+

+function int getRelationStatus(int factionIndex)
+

+
+
+

+Inherited from Faction [Server] + +

+

+
+
+
+
+

+function int... getResources()
+

+
+
+

+Inherited from Faction [Server] + +

+

+
+
+
+
+

+function float getTrait(string trait)
+

+
+
+

+Retrieves a trait value associated with a key Inherited from Faction [Server] + +

+

Parameters

+
+trait +The name of the trait
+
+

Returns

+
+

+The trait value associated with the key +

+
+

+
+
+
+
+

+function table<string, float> getTraits()
+

+
+
+

+Retrieves all key-value trait pairs of the faction Inherited from Faction [Server] + +

+

Returns

+
+

+A table containing all custom key-value pairs +

+
+

+
+
+
+
+

+function var getValue(string key)
+

+
+
+

+Retrieves a custom value saved in the entity with the given key Inherited from Faction [Server] + +

+

Parameters

+
+key +A string that serves as the name of the value
+
+

Returns

+
+

+The value if the key exists, otherwise nil +

+
+

+
+
+
+
+

+function table<string, var> getValues()
+

+
+
+

+Retrieves all key-value pairs of custom values Inherited from Faction [Server] + +

+

Returns

+
+

+A table containing all custom key-value pairs +

+
+

+
+
+
+
+

+function bool hasStaticRelationsToFaction(int factionIndex)
+

+
+
+

+Inherited from Faction [Server] + +

+

+
+
+
+
+

+function bool knowsFaction(int factionIndex)
+

+
+
+

+Inherited from Faction [Server] + +

+

+
+
+
+
+

+function var pay(string or Format [optional] description, int money, int... resources)
+

+
+
+

+Makes the faction pay a certain amount of money and resources. If the faction can't pay, the respective money and resources will be set to 0. This function accepts an optional string for Format as first argument, as an economy notification describing the transaction that will be sent to the player, in case the faction is a player.
To ease handling of transaction descriptions, the format description (if set) will receive all the remaining arguments given to the pay() function as format arguments, in the same order as they are given to the function. Dots for easier reading will be inserted as well. Examples:

faction:pay("Paid %1% Credits and %2% iron.", 50000, 250)
-> "Paid 50.000 Credits and 250 iron."

faction:pay(Format("%1% paid %2% Credits and %3% iron.", "Excelsior"), 50, 25000)
-> "Excelsior paid 50 Credits and 25.000 iron."

Inherited from Faction [Server] + +

+

Parameters

+
+description +[optional] A description for the transaction. Can either be a string or a Format. If this variable is set, money and resources will be appended to the end of the list of arguments passed to the description format string.
+money +Money that will be removed from the faction
+resources +A list of resources, starting with iron, that will be removed from the faction
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var payResource(string or Format description, Material material, int amount)
+

+
+
+

+Makes the faction pay a certain amount of resources. If the faction can't pay, the respective resource will be set to 0. This function accepts a string for Format as first argument, as an economy notification describing the transaction that will be sent to the player, in case the faction is a player. Inherited from Faction [Server] + +

+

Parameters

+
+description +A description for the transaction. Can either be a string or a Format.
+material +The kind of material that will be removed from the faction
+amount +Amount that will be removed from the faction
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var payWithoutNotify(string or Format description, int money, int... args)
+

+
+
+

+Similar behavior to pay(), except there will not be a notification popping up in case the faction is a player, and the description for the transaction in this function isn't optional. Inherited from Faction [Server] + +

+

Parameters

+
+description +A description for the transaction. Can either be a string or a Format. Money and resources will be appended to the end of the list of arguments passed to the description format string.
+money +Money that will be removed from the faction
+args +A list of resources, starting with iron, that will be removed from the faction
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var receive(string or Format [optional] description, int money, int... resources)
+

+
+
+

+Makes the faction receive a certain amount of money and resources. This function accepts an optional string for Format as first argument, as an economy notification describing the transaction that will be sent to the player, in case the faction is a player.
To ease handling of transaction descriptions, the format description (if set) will receive all the remaining arguments given to the receive() function as format arguments, in the same order as they are given to the function. Dots for easier reading will be inserted as well. Examples:

faction:receive("Got %1% Credits and %2% iron.", 50000, 250)
-> "Got 50.000 Credits and 250 iron."

faction:receive(Format("%1% received %2% Credits and %3% iron.", "Excelsior"), 50, 25000)
-> "Excelsior received 50 Credits and 25.000 iron."

Inherited from Faction [Server] + +

+

Parameters

+
+description +[optional] A description for the transaction. Can either be a string or a Format. If this variable is set, money and resources will be appended to the end of the list of arguments passed to the description format string.
+money +Money that will be given to the faction
+resources +A list of resources, starting with iron, that will be given to the faction
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var receiveResource(string or Format description, Material material, int amount)
+

+
+
+

+Makes the faction receive a certain amount of resources. This function accepts a string for Format as first argument, as an economy notification describing the transaction that will be sent to the player, in case the faction is a player. Inherited from Faction [Server] + +

+

Parameters

+
+description +A description for the transaction. Can either be a string or a Format.
+material +The kind of material that will be given to the faction
+amount +Amount that will be given to the faction
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var receiveWithoutNotify(string or Format description, int money, int... args)
+

+
+
+

+Similar behavior to receive(), except there will not be a notification popping up in case the faction is a player, and the description for the transaction in this function isn't optional. Inherited from Faction [Server] + +

+

Parameters

+
+description +A description for the transaction. Can either be a string or a Format. Money and resources will be appended to the end of the list of arguments passed to the description format string.
+money +Money that will be given to the faction
+args +A list of resources, starting with iron, that will be given to the faction
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var sendCallback()
+

+
+
+

+Inherited from Faction [Server] + +

+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var sendChatMessage()
+

+
+
+

+Inherited from Faction [Server] + +

+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var setHomeSectorCoordinates(int x, int y)
+

+
+
+

+Inherited from Faction [Server] + +

+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var setLanguage(Language language)
+

+
+
+

+Inherited from Faction [Server] + +

+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var setResources()
+

+
+
+

+Inherited from Faction [Server] + +

+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var setStaticRelationsToFaction(int factionIndex, bool in)
+

+
+
+

+Inherited from Faction [Server] + +

+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var setTrait(string trait, float value)
+

+
+
+

+Sets a trait value associated with a key Inherited from Faction [Server] + +

+

Parameters

+
+trait +The name of the trait
+value +The value of the trait, should be between -1 and 1
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var setValue(string key, var value)
+

+
+
+

+Sets a custom value Inherited from Faction [Server] + +

+

Parameters

+
+key +A string that serves as the name of the value
+value +The value to save. Must be bool, number, string or nil. If nil is given, the value will be deleted.
+
+

+
+
+
+
+
+
+ Overview +
Home + Functions + Search +
+
Search:
+Predefined Functions & Example Scripts +
Command +Entity +FactionDatabase +PlanGenerator +Player +Sector +Server +UsableInventoryItem +
+
+

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

+
+ +
+ + diff --git a/Documentation/PlayerFunctions.html b/Documentation/PlayerFunctions.html new file mode 100644 index 0000000..660348e --- /dev/null +++ b/Documentation/PlayerFunctions.html @@ -0,0 +1,825 @@ + + + Avorion Predefined Functions - Player + + + + +
+
+

Avorion Script API Documentation

+
+
+ +
+
Search:
+ +
+

Player Script Predefined Functions

+
+

Tip: Scroll down for an example script!

+
+
+

+function updateServer(timeStep)
+

+
+

+Update tick that is only executed on the server. See the documentation for getUpdateInterval() for details on the frequency of these calls.

Server Function: This function is only called on the server. +

+

Parameters

+
+timeStep +The amount of time that passed since the last update tick
+
+

+
+
+
+

+function updateServer(timeStep)
+

+
+

+Update tick that is only executed on the server. See the documentation for getUpdateInterval() for details on the frequency of these calls.

Server Function: This function is only called on the server. +

+

Parameters

+
+timeStep +The amount of time that passed since the last update tick
+
+

+
+
+
+

+function initialize(...)
+

+
+

+This function is always the very first function that is called in a script, and only once during the lifetime of the script. The function is always called on the server first, before client instances are available, so invoking client functions will never work. This function is both called when a script gets newly attached to an object, and when the object is loaded from the database during a load from disk operation. During a load from disk operation, no parameters are passed to the function, and a global variable '_restoring' is set to true. +

+

Parameters

+
+... +Parameters that are passed through from the adding of the script. nil if the script was loaded from the database while loading a sector or player or similar.
+
+

+
+
+
+

+function update(timeStep)
+

+
+

+Called every tick, both on client and server. See the documentation for getUpdateInterval() for details on the frequency of these calls. +

+

Parameters

+
+timeStep +The amount of time passed since the last update tick
+
+

+
+
+
+

+function getUpdateInterval()
+

+
+

+Defines the update tick interval of the script. This interval can not be less than the update tick interval of the server or client, depending on where the script is running. The update(), updateParallelRead(), updateParallelSelf(), updateClient() and updateServer() functions will only be called after at least this much time has passed. The minimum update interval for the client varies with the framerate of the client. The minimum update interval for the server is 50 ms. This function is called after initialize() or after the update functions were called. If this function is not defined, the update functions will be called every tick. +

+

Expected return values

+
+

+The desired update tick interval in seconds +

+
+

+
+
+
+

+function onRemove()
+

+
+

+Called when the script is about to be removed from the object, before the removal. +

+

+
+
+
+

+function onDelete()
+

+
+

+Called when the script is about to be deleted from the object, before the deletion. This is the last call that will be done to an object script. This function is also called when the object it is attached to is deleted. +

+

+
+
+
+

+function secure()
+

+
+

+Called to secure values from the script. This function is called when the object is unloaded from the server. It's called at other times as well to refresh data, or when objects are copied or during regular saves. The table returned by this function will be passed to the restore() function when the object is loaded and read from disk. All values that are in the table must be numbers, strings or other tables. Values that aren't of the above types will be converted to nil and an error message will be printed. +

+

Expected return values

+
+

+A table containing values that should be saved +

+
+

+
+
+
+

+function restore(values)
+

+
+

+Called to restore previously secured values for the script. This is called after initialize(). Receives the values that were gathered from the last called to the secure() function. This function is called when the object is read from disk and restored, after initialize() was called. +

+

Parameters

+
+values +The table previously returned by the secure() function
+
+

+
+
+
+

+function getMissionBrief()
+

+
+

+A function that is used by the mission board to get the brief description of a mission. This function should return a string containing the brief description. If this function isn't defined, or if nothing or empty string is returned, the mission won't be displayed in the "Missions" tab.

Client Function: This function is only called on the client. +

+

+
+
+
+

+function getMissionDescription()
+

+
+

+A function that is used by the mission board to get the long description of a mission. This function should return a string containing the description.

Client Function: This function is only called on the client. +

+

+
+
+
+

+function getMissionIcon()
+

+
+

+A function that is used by the mission board to get the icon of a mission. This function should return a string containing the icon. Empty string means no icon.

Client Function: This function is only called on the client. +

+

+
+
+
+

+function getMissionPriority()
+

+
+

+A function that is used by the mission board to get the priority (ie. rank on the mission board) of a mission. This function should return a number. The higher the number, the higher the rank on the mission board. Default: 0

Client Function: This function is only called on the client. +

+

+
+
+
+

+function getMissionLocation()
+

+
+

+A function that is used by the mission board to get the sector location of a mission. This function should return 2 integer values containing the x and y location of the mission, or an arbitrary amount of ivec2's showing multiple locations for the mission. If this function isn't defined, or if not exactly 2 values are returned, the "Show Location" button in the "Missions" tab won't be active.

Client Function: This function is only called on the client. +

+

+
+
+
+

+function updateClient(timeStep)
+

+
+

+Update tick that is only executed on the client. See the documentation for getUpdateInterval() for details on the frequency of these calls.

Client Function: This function is only called on the client. +

+

Parameters

+
+timeStep +The amount of time that passed since the last update tick
+
+

+
+
+
+

+function updateClient(timeStep)
+

+
+

+Update tick that is only executed on the Client. See the documentation for getUpdateInterval() for details on the frequency of these calls.

Client Function: This function is only called on the client. +

+

Parameters

+
+timeStep +The amount of time that passed since the last update tick
+
+

+
+
+
+

+function abandon()
+

+
+

+A function that is used by the mission board to abandon a mission. This function should do a remote function invocation to call terminate() on the server side, so that the mission script is removed from the player. If this function isn't defined then the mission won't be abandonable, and the "Abandon" button on the mission tab won't be active.

Client Function: This function is only called on the client. +

+

+
+
+
+

+function showMissionDetails()
+

+
+

+A function that is used by the mission board to show more details of a mission. This function can be used as the mission script pleases. It could show a window, text message, or whatever fits the mission. If this function isn't defined then the "Details" button won't be shown in the UI.

Client Function: This function is only called on the client. +

+

+
+
+


Player Example Script

+
+ +-- Update tick that is only executed on the server. See the documentation for getUpdateInterval()
+-- for details on the frequency of these calls.
+-- Server Function: This function is only called on the server.
+function updateServer(timeStep)
+
+end
+
-- Update tick that is only executed on the server. See the documentation for getUpdateInterval()
+-- for details on the frequency of these calls.
+-- Server Function: This function is only called on the server.
+function updateServer(timeStep)
+
+end
+
-- This function is always the very first function that is called in a script, and only once during
+-- the lifetime of the script. The function is always called on the server first, before client
+-- instances are available, so invoking client functions will never work. This function is both
+-- called when a script gets newly attached to an object, and when the object is loaded from the
+-- database during a load from disk operation. During a load from disk operation, no parameters
+-- are passed to the function, and a global variable '_restoring' is set to true.
+function initialize(...)
+
+end
+
-- Called every tick, both on client and server. See the documentation for getUpdateInterval()
+-- for details on the frequency of these calls.
+function update(timeStep)
+
+end
+
-- Defines the update tick interval of the script. This interval can not be less than the update
+-- tick interval of the server or client, depending on where the script is running. The update(),
+-- updateParallelRead(), updateParallelSelf(), updateClient() and updateServer() functions will
+-- only be called after at least this much time has passed. The minimum update interval for the
+-- client varies with the framerate of the client. The minimum update interval for the server
+-- is 50 ms. This function is called after initialize() or after the update functions were called.
+-- If this function is not defined, the update functions will be called every tick.
+function getUpdateInterval()
+
+end
+
-- Called when the script is about to be removed from the object, before the removal.
+function onRemove()
+
+end
+
-- Called when the script is about to be deleted from the object, before the deletion. This is
+-- the last call that will be done to an object script. This function is also called when the
+-- object it is attached to is deleted.
+function onDelete()
+
+end
+
-- Called to secure values from the script. This function is called when the object is unloaded
+-- from the server. It's called at other times as well to refresh data, or when objects are copied
+-- or during regular saves. The table returned by this function will be passed to the restore()
+-- function when the object is loaded and read from disk. All values that are in the table must
+-- be numbers, strings or other tables. Values that aren't of the above types will be converted
+-- to nil and an error message will be printed.
+function secure()
+
+end
+
-- Called to restore previously secured values for the script. This is called after initialize().
+-- Receives the values that were gathered from the last called to the secure() function. This
+-- function is called when the object is read from disk and restored, after initialize() was called.
+function restore(values)
+
+end
+
-- A function that is used by the mission board to get the brief description of a mission. This
+-- function should return a string containing the brief description. If this function isn't defined,
+-- or if nothing or empty string is returned, the mission won't be displayed in the "Missions"
+-- tab.
+-- Client Function: This function is only called on the client.
+function getMissionBrief()
+
+end
+
-- A function that is used by the mission board to get the long description of a mission. This
+-- function should return a string containing the description.
+-- Client Function: This function is only called on the client.
+function getMissionDescription()
+
+end
+
-- A function that is used by the mission board to get the icon of a mission. This function should
+-- return a string containing the icon. Empty string means no icon.
+-- Client Function: This function is only called on the client.
+function getMissionIcon()
+
+end
+
-- A function that is used by the mission board to get the priority (ie. rank on the mission board)
+-- of a mission. This function should return a number. The higher the number, the higher the rank
+-- on the mission board. Default: 0
+-- Client Function: This function is only called on the client.
+function getMissionPriority()
+
+end
+
-- A function that is used by the mission board to get the sector location of a mission. This
+-- function should return 2 integer values containing the x and y location of the mission, or
+-- an arbitrary amount of ivec2's showing multiple locations for the mission. If this function
+-- isn't defined, or if not exactly 2 values are returned, the "Show Location" button in the "Missions"
+-- tab won't be active.
+-- Client Function: This function is only called on the client.
+function getMissionLocation()
+
+end
+
-- Update tick that is only executed on the client. See the documentation for getUpdateInterval()
+-- for details on the frequency of these calls.
+-- Client Function: This function is only called on the client.
+function updateClient(timeStep)
+
+end
+
-- Update tick that is only executed on the Client. See the documentation for getUpdateInterval()
+-- for details on the frequency of these calls.
+-- Client Function: This function is only called on the client.
+function updateClient(timeStep)
+
+end
+
-- A function that is used by the mission board to abandon a mission. This function should do
+-- a remote function invocation to call terminate() on the server side, so that the mission script
+-- is removed from the player. If this function isn't defined then the mission won't be abandonable,
+-- and the "Abandon" button on the mission tab won't be active.
+-- Client Function: This function is only called on the client.
+function abandon()
+
+end
+
-- A function that is used by the mission board to show more details of a mission. This function
+-- can be used as the mission script pleases. It could show a window, text message, or whatever
+-- fits the mission. If this function isn't defined then the "Details" button won't be shown in
+-- the UI.
+-- Client Function: This function is only called on the client.
+function showMissionDetails()
+
+end
+ +
+
+
+
+
+
+ Overview +
Home + Functions + Search +
+
Search:
+Predefined Functions & Example Scripts +
Command +Entity +FactionDatabase +PlanGenerator +Player +Sector +Server +UsableInventoryItem +
+
+

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

+
+ +
+ + diff --git a/Documentation/PlayerId.html b/Documentation/PlayerId.html new file mode 100644 index 0000000..9a34785 --- /dev/null +++ b/Documentation/PlayerId.html @@ -0,0 +1,441 @@ + + + PlayerId + + + + +
+
+

Avorion Script API Documentation

+
+
+ +
+
Search:
+
+
+ + + + + + + + + + +
+PlayerId +PlayerId +

Properties
+id +
+name +

Member Functions
+
+
+
+

PlayerId

+
+
+

+function PlayerId()
+

+
+
+

+This is the default constructor of PlayerId. No further arguments are required. +

+

Returns

+
+

+A new instance of PlayerId +

+
+

+
+
+
+
+ +
property string id[read-only]
+
+
+
+
+ +
property string name[read-only]
+
+
+
+
+
+
+
+
+ Overview +
Home + Functions + Search +
+
Search:
+Predefined Functions & Example Scripts +
Command +Entity +FactionDatabase +PlanGenerator +Player +Sector +Server +UsableInventoryItem +
+
+

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

+
+ +
+ + diff --git a/Documentation/PlayerWindow.html b/Documentation/PlayerWindow.html new file mode 100644 index 0000000..42e1eb9 --- /dev/null +++ b/Documentation/PlayerWindow.html @@ -0,0 +1,623 @@ + + + PlayerWindow + + + + +
+
+

Avorion Script API Documentation

+
+
+ +
+
Search:
+
+
+ + + + + + + + + + + + + + + + + + + + +
+PlayerWindow +PlayerWindow +

Properties
+onSelectedFunction +

Member Functions
+activateAllTabs +
+activateTab +
+createTab +
+deactivateTab +
+getActiveTab +
+getTab +
+hide +
+moveTabToPosition +
+moveTabToTheRight +
+selectTab +
+show +
+
+
+
+

PlayerWindow

+

+This object is only available on the client. +

+
+
+

+function PlayerWindow()
+

+
+
+

Returns

+
+

+A new instance of PlayerWindow +

+
+

+
+
+
+
+ +
property string onSelectedFunction
+
+
+
+
+
+
+

+function var activateAllTabs()
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var activateTab(Tab tab)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function Tab createTab(string name, string icon, string description)
+

+
+
+

+
+
+
+
+

+function var deactivateTab(Tab tab)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function Tab getActiveTab()
+

+
+
+

+
+
+
+
+

+function Tab getTab(string name)
+

+
+
+

+
+
+
+
+

+function var hide()
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var moveTabToPosition(Tab tab, int pos)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var moveTabToTheRight(Tab tab)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var selectTab(var val)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var show()
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+
+
+ Overview +
Home + Functions + Search +
+
Search:
+Predefined Functions & Example Scripts +
Command +Entity +FactionDatabase +PlanGenerator +Player +Sector +Server +UsableInventoryItem +
+
+

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

+
+ +
+ + diff --git a/Documentation/PluralForm.html b/Documentation/PluralForm.html new file mode 100644 index 0000000..cb75827 --- /dev/null +++ b/Documentation/PluralForm.html @@ -0,0 +1,465 @@ + + + PluralForm + + + + +
+
+

Avorion Script API Documentation

+
+
+ +
+
Search:
+
+
+ + + + + + + + + + + + + +
+PluralForm +PluralForm +

Properties
+amount +
+context +
+plural +
+singular +
+translated +

Member Functions
+
+
+
+

PluralForm

+
+
+

+function PluralForm(string singular, var plural, var contextOrAmount, var amount)
+

+
+
+

Returns

+
+

+A new instance of PluralForm +

+
+

+
+
+
+
+ +
property int amount
+
+
+
+
+ +
property string context
+
+
+
+
+ +
property string plural
+
+
+
+
+ +
property string singular
+
+
+
+
+ +
property string translated[read-only]
+
+
+
+
+
+
+
+
+ Overview +
Home + Functions + Search +
+
Search:
+Predefined Functions & Example Scripts +
Command +Entity +FactionDatabase +PlanGenerator +Player +Sector +Server +UsableInventoryItem +
+
+

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

+
+ +
+ + diff --git a/Documentation/Profiler.html b/Documentation/Profiler.html new file mode 100644 index 0000000..8961006 --- /dev/null +++ b/Documentation/Profiler.html @@ -0,0 +1,559 @@ + + + Profiler + + + + +
+
+

Avorion Script API Documentation

+
+
+ +
+
Search:
+
+
+ + + + + + + + + + + + + + + + + +
+Profiler +Profiler +

Properties
+printedSections +
+started +

Member Functions
+__tostring +
+addSection +
+done +
+print +
+reenter +
+reset +
+section +
+
+
+
+

Profiler

+
+
+

+function Profiler(string str)
+

+
+
+

Returns

+
+

+A new instance of Profiler +

+
+

+
+
+
+
+ +
property int printedSections
+
+
+
+
+ +
property bool started[read-only]
+
+
+
+
+
+
+

+function string __tostring()
+

+
+
+

+
+
+
+
+

+function var addSection(string name, double duration)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function double done()
+

+
+
+

+
+
+
+
+

+function var print()
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var reenter(string name)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var reset()
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var section(string name)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+
+
+ Overview +
Home + Functions + Search +
+
Search:
+Predefined Functions & Example Scripts +
Command +Entity +FactionDatabase +PlanGenerator +Player +Sector +Server +UsableInventoryItem +
+
+

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

+
+ +
+ + diff --git a/Documentation/ProgressBar.html b/Documentation/ProgressBar.html new file mode 100644 index 0000000..d5b1213 --- /dev/null +++ b/Documentation/ProgressBar.html @@ -0,0 +1,663 @@ + + + ProgressBar + + + + +
+
+

Avorion Script API Documentation

+
+
+ +
+
Search:
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ProgressBar +ProgressBar +

Properties
+color +
+progress +
+center +
+height +
+index +
+layer +
+localCenter +
+localPosition +
+localRect +
+lower +
+mouseOver +
+position +
+rect +
+size +
+tooltip +
+tooltipWidth +
+upper +
+visible +
+width +

Member Functions
+hide +
+isMouseOverAndUnobscured +
+show +
+
+
+
+

ProgressBar : UIElement

+

+This object is only available on the client. +

+
+
+

+function ProgressBar(int index)
+

+
+
+

Returns

+
+

+A new instance of ProgressBar +

+
+

+
+
+
+
+ +
property Color color
+
+
+
+
+ +
property float progress
+
+
+
+
+ +
property vec2 center
+
+
+
+
+ +
property float height
+
+
+
+
+ +
property int index[read-only]
+
+
+
+
+ +
property int layer
+
+
+
+
+ +
property vec2 localCenter[read-only]
+
+
+
+
+ +
property vec2 localPosition[read-only]
+
+
+
+
+ +
property Rect localRect[read-only]
+
+
+
+
+ +
property vec2 lower
+
+
+
+
+ +
property bool mouseOver[read-only]
+
+
+
+
+ +
property vec2 position
+
+
+
+
+ +
property Rect rect
+
+
+
+
+ +
property vec2 size
+
+
+
+
+ +
property var tooltip
+
+
+
+
+ +
property int tooltipWidth[write-only]
+
+
+
+
+ +
property vec2 upper
+
+
+
+
+ +
property bool visible
+
+
+
+
+ +
property float width
+
+
+
+
+
+
+

+function var hide()
+

+
+
+

+Inherited from UIElement + +

+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function bool isMouseOverAndUnobscured()
+

+
+
+

+Inherited from UIElement + +

+

+
+
+
+
+

+function var show()
+

+
+
+

+Inherited from UIElement + +

+

Returns

+
+

+nothing +

+
+

+
+
+
+
+
+
+ Overview +
Home + Functions + Search +
+
Search:
+Predefined Functions & Example Scripts +
Command +Entity +FactionDatabase +PlanGenerator +Player +Sector +Server +UsableInventoryItem +
+
+

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

+
+ +
+ + diff --git a/Documentation/QuadTree.html b/Documentation/QuadTree.html new file mode 100644 index 0000000..b8480c8 --- /dev/null +++ b/Documentation/QuadTree.html @@ -0,0 +1,474 @@ + + + QuadTree + + + + +
+
+

Avorion Script API Documentation

+
+
+ +
+
Search:
+
+
+ + + + + + + + + + + + +
+QuadTree +QuadTree +

Properties
+empty +

Member Functions
+get +
+insert +
+nearest +
+
+
+
+

QuadTree

+
+
+

+function QuadTree(vec2 min, vec2 max, int maxLevel)
+

+
+
+

Returns

+
+

+A new instance of QuadTree +

+
+

+
+
+
+
+ +
property bool empty[read-only]
+
+
+
+
+
+
+

+function auto values = get(vec2 center, float radius)
+

+
+
+

+
+
+
+
+

+function var insert(vec2 point)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var, var nearest(float x, float y, var radius)
+

+
+
+

+
+
+
+
+
+
+ Overview +
Home + Functions + Search +
+
Search:
+Predefined Functions & Example Scripts +
Command +Entity +FactionDatabase +PlanGenerator +Player +Sector +Server +UsableInventoryItem +
+
+

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

+
+ +
+ + diff --git a/Documentation/Random.html b/Documentation/Random.html new file mode 100644 index 0000000..afcc6aa --- /dev/null +++ b/Documentation/Random.html @@ -0,0 +1,567 @@ + + + Random + + + + +
+
+

Avorion Script API Documentation

+
+
+ +
+
Search:
+
+
+ + + + + + + + + + + + + + + + + + + +
+Random +Random +

Properties

Member Functions
+createSeed +
+get2DDirection +
+getBool +
+getDirection +
+getFloat +
+getInt +
+getValueOfDistribution +
+getVector +
+multitest +
+setSeed +
+test +
+
+
+
+

Random

+
+
+

+function Random(Seed seed)
+

+
+
+

Returns

+
+

+A new instance of Random +

+
+

+
+
+
+
+

+function Seed createSeed()
+

+
+
+

+
+
+
+
+

+function vec2 get2DDirection()
+

+
+
+

+
+
+
+
+

+function bool getBool()
+

+
+
+

+
+
+
+
+

+function vec3 getDirection()
+

+
+
+

+
+
+
+
+

+function float getFloat(var min, var max)
+

+
+
+

+
+
+
+
+

+function int getInt(var min, var max)
+

+
+
+

+
+
+
+
+

+function int getValueOfDistribution()
+

+
+
+

+
+
+
+
+

+function vec3 getVector(var min, var max)
+

+
+
+

+
+
+
+
+

+function unsigned int multitest(unsigned int tries, float probability)
+

+
+
+

+
+
+
+
+

+function var setSeed(Seed seed)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function bool test(float probability)
+

+
+
+

+
+
+
+
+
+
+ Overview +
Home + Functions + Search +
+
Search:
+Predefined Functions & Example Scripts +
Command +Entity +FactionDatabase +PlanGenerator +Player +Sector +Server +UsableInventoryItem +
+
+

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

+
+ +
+ + diff --git a/Documentation/Rarity.html b/Documentation/Rarity.html new file mode 100644 index 0000000..a1ca516 --- /dev/null +++ b/Documentation/Rarity.html @@ -0,0 +1,504 @@ + + + Rarity + + + + +
+
+

Avorion Script API Documentation

+
+
+ +
+
Search:
+
+
+ + + + + + + + + + + + + + + + +
+Rarity +Rarity +

Properties
+color +
+name +
+tooltipFontColor +
+type +
+value +

Member Functions
+__eq +
+__lt +
+__tostring +
+
+
+
+

Rarity

+
+
+

+function Rarity(int value)
+

+
+
+

Returns

+
+

+A new instance of Rarity +

+
+

+
+
+
+
+ +
property Color color[read-only]
+
+
+
+
+ +
property string name[read-only]
+
+
+
+
+ +
property Color tooltipFontColor[read-only]
+
+
+
+
+ +
property int type
+
+
+
+
+ +
property int value
+
+
+
+
+
+
+

+function bool __eq(Rarity other)
+

+
+
+

+
+
+
+
+

+function bool __lt(Rarity other)
+

+
+
+

+
+
+
+
+

+function string __tostring()
+

+
+
+

+
+
+
+
+
+
+ Overview +
Home + Functions + Search +
+
Search:
+Predefined Functions & Example Scripts +
Command +Entity +FactionDatabase +PlanGenerator +Player +Sector +Server +UsableInventoryItem +
+
+

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

+
+ +
+ + diff --git a/Documentation/Ray.html b/Documentation/Ray.html new file mode 100644 index 0000000..237db37 --- /dev/null +++ b/Documentation/Ray.html @@ -0,0 +1,505 @@ + + + Ray + + + + +
+
+

Avorion Script API Documentation

+
+
+ +
+
Search:
+
+
+ + + + + + + + + + + + + + + +
+Ray +Ray +

Properties
+direction +
+origin +
+planeIntersectionThickness +

Member Functions
+distanceToPoint +
+distanceToPoint2 +
+findClosestPoints +
+projectPoint +
+
+
+
+

Ray

+
+
+

+function Ray(vec3 pos, vec3 size)
+

+
+
+

Returns

+
+

+A new instance of Ray +

+
+

+
+
+
+
+ +
property vec3 direction
+
+
+
+
+ +
property vec3 origin
+
+
+
+
+ +
property float planeIntersectionThickness
+
+
+
+
+
+
+

+function float distanceToPoint(vec3 point)
+

+
+
+

+
+
+
+
+

+function float distanceToPoint2(vec3 point)
+

+
+
+

+
+
+
+
+

+function var findClosestPoints(Ray other, vec3 onSelf, vec3 onOther)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function vec3, float projectPoint(vec3 point)
+

+
+
+

+
+
+
+
+
+
+ Overview +
Home + Functions + Search +
+
Search:
+Predefined Functions & Example Scripts +
Command +Entity +FactionDatabase +PlanGenerator +Player +Sector +Server +UsableInventoryItem +
+
+

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

+
+ +
+ + diff --git a/Documentation/ReadOnlyBoarding.html b/Documentation/ReadOnlyBoarding.html new file mode 100644 index 0000000..0993e45 --- /dev/null +++ b/Documentation/ReadOnlyBoarding.html @@ -0,0 +1,515 @@ + + + ReadOnlyBoarding + + + + +
+
+

Avorion Script API Documentation

+
+
+ +
+
Search:
+ +
+

ReadOnlyBoarding

+
+
+

+function ReadOnlyBoarding(var id)
+

+
+
+

Parameters

+
+id +The id of the entity, must be an index of an existing entity or nil for the entity in the current script context
+
+

Returns

+
+

+A new instance of ReadOnlyBoarding +

+
+

+
+
+
+
+ +
property bool boardable[read-only]
+
+
+
+
+ +
property int boardingFaction[read-only]
+
+
+
+
+ +
property double defenseLevel[read-only]
+
+
+
+
+ +
property Entity entity[read-only]
+
+
+
+
+ +
property uuid entityId[read-only]
+
+
+
+
+ +
property int foughtRounds[read-only]
+
+
+
+
+ +
property int numDefenseWeaponsCurrentAttack[read-only]
+
+
+
+
+ +
property int simultaneousFighters[read-only]
+
+
+
+
+ +
property float undealtDamageBoarders[read-only]
+
+
+
+
+ +
property float undealtDamageDefenders[read-only]
+
+
+
+
+
+
+
+
+ Overview +
Home + Functions + Search +
+
Search:
+Predefined Functions & Example Scripts +
Command +Entity +FactionDatabase +PlanGenerator +Player +Sector +Server +UsableInventoryItem +
+
+

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

+
+ +
+ + diff --git a/Documentation/ReadOnlyBspTree.html b/Documentation/ReadOnlyBspTree.html new file mode 100644 index 0000000..8610cf4 --- /dev/null +++ b/Documentation/ReadOnlyBspTree.html @@ -0,0 +1,443 @@ + + + ReadOnlyBspTree + + + + +
+
+

Avorion Script API Documentation

+
+
+ +
+
Search:
+
+
+ + + + + + + + + + +
+ReadOnlyBspTree +ReadOnlyBspTree +

Properties
+entity +
+entityId +

Member Functions
+
+
+
+

ReadOnlyBspTree

+
+
+

+function ReadOnlyBspTree(var id)
+

+
+
+

Parameters

+
+id +The id of the entity, must be an index of an existing entity or nil for the entity in the current script context
+
+

Returns

+
+

+A new instance of ReadOnlyBspTree +

+
+

+
+
+
+
+ +
property Entity entity[read-only]
+
+
+
+
+ +
property uuid entityId[read-only]
+
+
+
+
+
+
+
+
+ Overview +
Home + Functions + Search +
+
Search:
+Predefined Functions & Example Scripts +
Command +Entity +FactionDatabase +PlanGenerator +Player +Sector +Server +UsableInventoryItem +
+
+

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

+
+ +
+ + diff --git a/Documentation/ReadOnlyCargoBay.html b/Documentation/ReadOnlyCargoBay.html new file mode 100644 index 0000000..a6c0a78 --- /dev/null +++ b/Documentation/ReadOnlyCargoBay.html @@ -0,0 +1,653 @@ + + + ReadOnlyCargoBay + + + + +
+
+

Avorion Script API Documentation

+
+
+ +
+
Search:
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ReadOnlyCargoBay +ReadOnlyCargoBay +

Properties
+alwaysStoreAtLeastOne +
+cargoHold +
+cargoVolume +
+empty +
+entity +
+entityId +
+fixedSize +
+freeSpace +
+numCargos +
+pickUpDangerous +
+pickUpDefaults +
+pickUpIllegal +
+pickUpOres +
+pickUpScrap +
+pickUpStolen +

Member Functions
+findCargos +
+getCargo +
+getCargos +
+getNumCargos +
+getSummary +
+
+
+
+

ReadOnlyCargoBay

+
+
+

+function ReadOnlyCargoBay(var id)
+

+
+
+

Parameters

+
+id +The id of the entity, must be an index of an existing entity or nil for the entity in the current script context
+
+

Returns

+
+

+A new instance of ReadOnlyCargoBay +

+
+

+
+
+
+
+ +
property bool alwaysStoreAtLeastOne[read-only]
+
+
+
+
+ +
property float cargoHold[read-only]
+
+
+
+
+ +
property float cargoVolume[read-only]
+
+
+
+
+ +
property bool empty[read-only]
+
+
+
+
+ +
property Entity entity[read-only]
+
+
+
+
+ +
property uuid entityId[read-only]
+
+
+
+
+ +
property bool fixedSize[read-only]
+
+
+
+
+ +
property float freeSpace[read-only]
+
+
+
+
+ +
property int numCargos[read-only]
+
+
+
+
+ +
property bool pickUpDangerous[read-only]
+
+
+
+
+ +
property bool pickUpDefaults[read-only]
+
+
+
+
+ +
property bool pickUpIllegal[read-only]
+
+
+
+
+ +
property bool pickUpOres[read-only]
+
+
+
+
+ +
property bool pickUpScrap[read-only]
+
+
+
+
+ +
property bool pickUpStolen[read-only]
+
+
+
+
+
+
+

+function table<TradingGood, int> findCargos(string name)
+

+
+
+

+Finds all cargos with the given name. +

+

Parameters

+
+name +A string that will be matched with the 'name' property of the cargos.
+
+

Returns

+
+

+A map containing all matching goods, with the good as key and amount as value. +

+
+

+
+
+
+
+

+function TradingGood, int... getCargo(unsigned int n)
+

+
+
+

+
+
+
+
+

+function table<TradingGood, int> getCargos()
+

+
+
+

+
+
+
+
+

+function int getNumCargos(var name)
+

+
+
+

+Counts all goods of the given type. When given a string, it will match the 'name' property of the goods. When given a TradingGood it will match the exact good. +

+

Parameters

+
+name +Either a TradingGood or a string containing the name of a trading good.
+
+

Returns

+
+

+The number of goods +

+
+

+
+
+
+
+

+function string getSummary(var goods)
+

+
+
+

+
+
+
+
+
+
+ Overview +
Home + Functions + Search +
+
Search:
+Predefined Functions & Example Scripts +
Command +Entity +FactionDatabase +PlanGenerator +Player +Sector +Server +UsableInventoryItem +
+
+

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

+
+ +
+ + diff --git a/Documentation/ReadOnlyControlUnit.html b/Documentation/ReadOnlyControlUnit.html new file mode 100644 index 0000000..6d893cd --- /dev/null +++ b/Documentation/ReadOnlyControlUnit.html @@ -0,0 +1,898 @@ + + + ReadOnlyControlUnit + + + + +
+
+

Avorion Script API Documentation

+
+
+ +
+
Search:
+ +
+

ReadOnlyControlUnit

+
+
+

+function ReadOnlyControlUnit(var id)
+

+
+
+

Parameters

+
+id +The id of the entity, must be an index of an existing entity or nil for the entity in the current script context
+
+

Returns

+
+

+A new instance of ReadOnlyControlUnit +

+
+

+
+
+
+
+ +
property bool autoPilotEnabled[read-only]
+
+
+
+
+ +
property float desiredVelocity[read-only]
+
+The current velocity the ship is trying to fly from 0 to 1, where 0 means standstill and 1 means the maximum speed the ship can fly without boosting. +
+
+
+ +
property Entity entity[read-only]
+
+
+
+
+ +
property uuid entityId[read-only]
+
+
+
+
+ +
property bool hasPilot[read-only]
+
+
+
+
+ +
property bool isBoosting[read-only]
+
+
+
+
+ +
property bool isDrifting[read-only]
+
+
+
+
+ +
property bool isStrafing[read-only]
+
+
+
+
+ +
property bool isTurning[read-only]
+
+
+
+
+ +
property int numFreeSeats[read-only]
+
+
+
+
+ +
property int numOccupiedSeats[read-only]
+
+
+
+
+ +
property vec3 turningSpeedFactor[read-only]
+
+A vec3 containing the turning speed multipliers for axis x, y, z. The turning speed factor is a multiplier for the turning speed of a ship, and is set in flyToLocation(), to smoothen turning once the ship looks towards its target (to avoid jittering). +
+
+
+
+
+

+function bitset<10> getActiveWeapons()
+

+
+
+

+Returns a list of bools representing the currently active weapon groups. +

+

+
+
+
+
+

+function vec3 getAimedPositionBySeat(int seatIndex)
+

+
+
+

+Returns the aimed position of a given seat. +

+

Parameters

+
+seatIndex +The index of the seat
+
+

+
+
+
+
+

+function vec3 getAimedPositionByWeaponGroup(int groupIndex)
+

+
+
+

+Returns the aimed position of the seat that controls the given weapon group. +

+

Parameters

+
+groupIndex +The weapon group of the seat
+
+

+
+
+
+
+

+function vec3... getAimedPositions()
+

+
+
+

+Returns a list of aimed positions of all seats +

+

+
+
+
+
+

+function int... getAllControlActions()
+

+
+
+

+Returns a list of bitsets (represented as ints) of control actions of all seats. +

+

+
+
+
+
+

+function int getControlActions(int seatIndex)
+

+
+
+

+Returns the bitset of control actions of a given seat. +

+

Parameters

+
+seatIndex +The index of the seat
+
+

+
+
+
+
+

+function int getControlActionsByWeaponGroup(int groupIndex)
+

+
+
+

+Returns the bitset of control actions of the seat that controls the given weapon group. +

+

Parameters

+
+groupIndex +The weapon group of the seat
+
+

+
+
+
+
+

+function vec3 getFlownToLocation()
+

+
+
+

+Returns the currently flown to location, which is set by calls to flyToLocation. Note: When the AI flies towards a location, it also sets this. +

+

+
+
+
+
+

+function int getSeatByWeaponGroup(int groupIndex)
+

+
+
+

+Returns the seat that controls a particular weapon group. +

+

Parameters

+
+groupIndex +The weapon group of the seat
+
+

+
+
+
+
+

+function ControlUnitSeat... getSeats()
+

+
+
+

+Returns a list of seats of the control unit. +

+

+
+
+
+
+

+function Entity getSelectedObject(int seatIndex)
+

+
+
+

+Returns the selected object of a given seat. +

+

Parameters

+
+seatIndex +The index of the seat
+
+

+
+
+
+
+

+function uuid getSelectedObjectId(int seatIndex)
+

+
+
+

+Returns the id of the selected object of a given seat. +

+

Parameters

+
+seatIndex +The index of the seat
+
+

+
+
+
+
+

+function uuid... getSelectedObjectIds()
+

+
+
+

+Returns a list of selected target ids of all seats +

+

+
+
+
+
+

+function bool isFiring(int seat)
+

+
+
+

+Checks if the given seat is currently pushing "Fire" (see ControlActionBit.Fire1) +

+

+
+
+
+
+

+function bool isFiringTorpedoes(int seat)
+

+
+
+

+Checks if the given seat is currently pushing "Fire Torpedoes" (see ControlActionBit.Fire2) +

+

+
+
+
+
+

+function bool isPlayerAPilot(int playerIndex)
+

+
+
+

+Checks if the given player is setting in any seat of the control unit. +

+

Parameters

+
+playerIndex +The index of the player
+
+

+
+
+
+
+

+function bool mayControlSquad(int playerIndex, int squadIndex)
+

+
+
+

+Checks if the given player has the right to control the given fighter squad. +

+

Parameters

+
+playerIndex +The index of the player
+squadIndex +The index of the squad
+
+

+
+
+
+
+

+function bool mayControlWeaponGroup(int playerIndex, int groupIndex)
+

+
+
+

+Checks if the given player has the right to control the given weapon group. +

+

Parameters

+
+playerIndex +The index of the player
+groupIndex +The index of the weapon group
+
+

+
+
+
+
+

+function bool maySteer(int playerIndex)
+

+
+
+

+Checks if the given player has the right to pilot (steer) the ship. The player must be sitting in the pilot seat. +

+

Parameters

+
+playerIndex +The index of the player
+
+

+
+
+
+
+
+
+ Overview +
Home + Functions + Search +
+
Search:
+Predefined Functions & Example Scripts +
Command +Entity +FactionDatabase +PlanGenerator +Player +Sector +Server +UsableInventoryItem +
+
+

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

+
+ +
+ + diff --git a/Documentation/ReadOnlyCrew.html b/Documentation/ReadOnlyCrew.html new file mode 100644 index 0000000..ae06c10 --- /dev/null +++ b/Documentation/ReadOnlyCrew.html @@ -0,0 +1,641 @@ + + + ReadOnlyCrew + + + + +
+
+

Avorion Script API Documentation

+
+
+ +
+
Search:
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ReadOnlyCrew +ReadOnlyCrew +

Properties
+attackers +
+autoAssignCrew +
+engineers +
+gunners +
+maxSize +
+mechanics +
+miners +
+pilots +
+security +
+size +
+unemployed +

Member Functions
+canAddCrew +
+canAddPassenger +
+getCaptain +
+getMembers +
+getMembersByProfession +
+getNumMembers +
+getPassengers +
+getWorkforce +
+hasCaptain +
+
+
+
+

ReadOnlyCrew

+
+
+

+function ReadOnlyCrew(var id)
+

+
+
+

Parameters

+
+id +The id of the entity, must be an index of an existing entity or nil for the entity in the current script context
+
+

Returns

+
+

+A new instance of ReadOnlyCrew +

+
+

+
+
+
+
+ +
property int attackers[read-only]
+
+
+
+
+ +
property int autoAssignCrew[read-only]
+
+
+
+
+ +
property int engineers[read-only]
+
+
+
+
+ +
property int gunners[read-only]
+
+
+
+
+ +
property int maxSize[read-only]
+
+
+
+
+ +
property int mechanics[read-only]
+
+
+
+
+ +
property int miners[read-only]
+
+
+
+
+ +
property int pilots[read-only]
+
+
+
+
+ +
property int security[read-only]
+
+
+
+
+ +
property int size[read-only]
+
+
+
+
+ +
property int unemployed[read-only]
+
+
+
+
+
+
+

+function var, var, table<int, string> canAddCrew(int number, int profession, int change)
+

+
+
+

+
+
+
+
+

+function var, var, table<int, string> canAddPassenger(var passenger)
+

+
+
+

+
+
+
+
+

+function Captain getCaptain()
+

+
+
+

+
+
+
+
+

+function table<CrewMan, unsigned int> getMembers()
+

+
+
+

+
+
+
+
+

+function int getMembersByProfession(int profession)
+

+
+
+

+
+
+
+
+

+function int getNumMembers(CrewMan crewman)
+

+
+
+

+
+
+
+
+

+function Captain... getPassengers()
+

+
+
+

+
+
+
+
+

+function table<CrewProfession, float> getWorkforce()
+

+
+
+

+
+
+
+
+

+function bool hasCaptain(var captainClass)
+

+
+
+

+
+
+
+
+
+
+ Overview +
Home + Functions + Search +
+
Search:
+Predefined Functions & Example Scripts +
Command +Entity +FactionDatabase +PlanGenerator +Player +Sector +Server +UsableInventoryItem +
+
+

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

+
+ +
+ + diff --git a/Documentation/ReadOnlyDeletionTimer.html b/Documentation/ReadOnlyDeletionTimer.html new file mode 100644 index 0000000..717d4ac --- /dev/null +++ b/Documentation/ReadOnlyDeletionTimer.html @@ -0,0 +1,461 @@ + + + ReadOnlyDeletionTimer + + + + +
+
+

Avorion Script API Documentation

+
+
+ +
+
Search:
+
+
+ + + + + + + + + + + + +
+ReadOnlyDeletionTimer +ReadOnlyDeletionTimer +

Properties
+enabled +
+entity +
+entityId +
+timeLeft +

Member Functions
+
+
+
+

ReadOnlyDeletionTimer

+
+
+

+function ReadOnlyDeletionTimer(var id)
+

+
+
+

Parameters

+
+id +The id of the entity, must be an index of an existing entity or nil for the entity in the current script context
+
+

Returns

+
+

+A new instance of ReadOnlyDeletionTimer +

+
+

+
+
+
+
+ +
property bool enabled[read-only]
+
+
+
+
+ +
property Entity entity[read-only]
+
+
+
+
+ +
property uuid entityId[read-only]
+
+
+
+
+ +
property float timeLeft[read-only]
+
+
+
+
+
+
+
+
+ Overview +
Home + Functions + Search +
+
Search:
+Predefined Functions & Example Scripts +
Command +Entity +FactionDatabase +PlanGenerator +Player +Sector +Server +UsableInventoryItem +
+
+

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

+
+ +
+ + diff --git a/Documentation/ReadOnlyEnergySystem.html b/Documentation/ReadOnlyEnergySystem.html new file mode 100644 index 0000000..619b471 --- /dev/null +++ b/Documentation/ReadOnlyEnergySystem.html @@ -0,0 +1,506 @@ + + + ReadOnlyEnergySystem + + + + +
+
+

Avorion Script API Documentation

+
+
+ +
+
Search:
+
+
+ + + + + + + + + + + + + + + + + +
+ReadOnlyEnergySystem +ReadOnlyEnergySystem +

Properties
+capacity +
+consumableEnergy +
+energy +
+entity +
+entityId +
+productionRate +
+rechargeRate +
+requiredEnergy +
+superflousEnergy +

Member Functions
+
+
+
+

ReadOnlyEnergySystem

+
+
+

+function ReadOnlyEnergySystem(var id)
+

+
+
+

Parameters

+
+id +The id of the entity, must be an index of an existing entity or nil for the entity in the current script context
+
+

Returns

+
+

+A new instance of ReadOnlyEnergySystem +

+
+

+
+
+
+
+ +
property double capacity[read-only]
+
+
+
+
+ +
property double consumableEnergy[read-only]
+
+
+
+
+ +
property double energy[read-only]
+
+
+
+
+ +
property Entity entity[read-only]
+
+
+
+
+ +
property uuid entityId[read-only]
+
+
+
+
+ +
property double productionRate[read-only]
+
+
+
+
+ +
property double rechargeRate[read-only]
+
+
+
+
+ +
property double requiredEnergy[read-only]
+
+
+
+
+ +
property double superflousEnergy[read-only]
+
+
+
+
+
+
+
+
+ Overview +
Home + Functions + Search +
+
Search:
+Predefined Functions & Example Scripts +
Command +Entity +FactionDatabase +PlanGenerator +Player +Sector +Server +UsableInventoryItem +
+
+

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

+
+ +
+ + diff --git a/Documentation/ReadOnlyEngine.html b/Documentation/ReadOnlyEngine.html new file mode 100644 index 0000000..f7e6e3a --- /dev/null +++ b/Documentation/ReadOnlyEngine.html @@ -0,0 +1,515 @@ + + + ReadOnlyEngine + + + + +
+
+

Avorion Script API Documentation

+
+
+ +
+
Search:
+
+
+ + + + + + + + + + + + + + + + + + +
+ReadOnlyEngine +ReadOnlyEngine +

Properties
+acceleration +
+boost +
+consumerIcon +
+consumerName +
+defaultPriority +
+entity +
+entityId +
+maxVelocity +
+requiredEnergy +
+reverseThrust +

Member Functions
+
+
+
+

ReadOnlyEngine

+
+
+

+function ReadOnlyEngine(var id)
+

+
+
+

Parameters

+
+id +The id of the entity, must be an index of an existing entity or nil for the entity in the current script context
+
+

Returns

+
+

+A new instance of ReadOnlyEngine +

+
+

+
+
+
+
+ +
property double acceleration[read-only]
+
+
+
+
+ +
property bool boost[read-only]
+
+
+
+
+ +
property string consumerIcon[read-only]
+
+
+
+
+ +
property string consumerName[read-only]
+
+
+
+
+ +
property int defaultPriority[read-only]
+
+
+
+
+ +
property Entity entity[read-only]
+
+
+
+
+ +
property uuid entityId[read-only]
+
+
+
+
+ +
property double maxVelocity[read-only]
+
+
+
+
+ +
property double requiredEnergy[read-only]
+
+
+
+
+ +
property double reverseThrust[read-only]
+
+
+
+
+
+
+
+
+ Overview +
Home + Functions + Search +
+
Search:
+Predefined Functions & Example Scripts +
Command +Entity +FactionDatabase +PlanGenerator +Player +Sector +Server +UsableInventoryItem +
+
+

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

+
+ +
+ + diff --git a/Documentation/ReadOnlyEntity.html b/Documentation/ReadOnlyEntity.html new file mode 100644 index 0000000..79456f3 --- /dev/null +++ b/Documentation/ReadOnlyEntity.html @@ -0,0 +1,2124 @@ + + + ReadOnlyEntity + + + + +
+
+

Avorion Script API Documentation

+
+
+ +
+
Search:
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ReadOnlyEntity +ReadOnlyEntity +

Properties
+aiOwned +
+allianceOwned +
+canPassRifts +
+controlActions +
+crew +
+crewSize +
+damageMultiplier +
+desiredVelocity +
+dockable +
+dockingParent +
+durability +
+excludedPlayer +
+exclusionTime +
+factionIndex +
+fighterCargoPickup +
+firePower +
+freeCargoSpace +
+hasPilot +
+hyperspaceCooldown +
+hyperspaceJumpReach +
+id +
+idealCrew +
+index +
+invincible +
+isAnomaly +
+isArmedTurret +
+isAsteroid +
+isContainer +
+isDrone +
+isFighter +
+isFlyable +
+isLoot +
+isObviouslyMineable +
+isOther +
+isShieldActive +
+isShip +
+isStation +
+isTurning +
+isTurret +
+isUnarmedTurret +
+isUnknown +
+isWormHole +
+isWreckage +
+look +
+mass +
+maxCargoSpace +
+maxCrewSize +
+maxDurability +
+minCrew +
+mothership +
+name +
+numCargos +
+numDefenseWeapons +
+numDefenseWeaponsCurrentAttack +
+numDockingPositions +
+numTurrets +
+occupiedCargoSpace +
+orientation +
+playerOrAllianceOwned +
+playerOwned +
+position +
+radius +
+reservationTime +
+reservedPlayer +
+right +
+selectedObject +
+shieldDurability +
+shieldMaxDurability +
+shieldMeshIntensity +
+size +
+timeAlive +
+title +
+translatedTitle +
+translation +
+translationf +
+transporterRange +
+type +
+typename +
+up +
+volume +

Member Functions
+canAddCrew +
+findCargos +
+getAimedPositionBySeat +
+getAimedPositions +
+getAllowedArbitraryTurrets +
+getAllowedArmedTurrets +
+getAllowedUnarmedTurrets +
+getAttachedBlockIndex +
+getBoostedValue +
+getBoundingBox +
+getBoundingSphere +
+getCaptain +
+getCargo +
+getCargoAmount +
+getCargos +
+getCrewMembers +
+getDamageContributorPlayerFactions +
+getDamageContributorPlayers +
+getDamageContributors +
+getDockedGroupBoundingBox +
+getDockedGroupBoundingSphere +
+getDockingPositions +
+getFreeArbitraryTurrets +
+getFreeArmedTurrets +
+getFreeUnarmedTurrets +
+getFullPlanCopy +
+getLowestMineableMaterial +
+getMalusFactor +
+getMineableMaterial +
+getMineableResources +
+getMoneyLootAmount +
+getNearestDistance +
+getNumArmedTurrets +
+getNumMiningTurrets +
+getNumSalvagingTurrets +
+getNumUnarmedTurrets +
+getPilotIndices +
+getPlanMoneyValue +
+getPlanResourceValue +
+getResourceLootAmount +
+getScripts +
+getTitleArguments +
+getTitleFormat +
+getTurret +
+getTurrets +
+getTurretSize +
+getTurretTemplateSize +
+getTurretTurningSpeed +
+getUndamagedPlanMoneyValue +
+getUndamagedPlanResourceValue +
+getValue +
+getValues +
+hasComponent +
+hasScript +
+hyperspaceBlocked +
+isCollectable +
+isInDockingArea +
+isInsideShield +
+isJumpRouteValid +
+isManned +
+isTurretAllowed +
+jumpPossible +
+resolveScriptPath +
+
+
+
+

ReadOnlyEntity

+
+
+

+function ReadOnlyEntity(var id)
+

+
+
+

Parameters

+
+id +The id of the entity, must be an id of an existing entity
+
+

Returns

+
+

+A new instance of ReadOnlyEntity +

+
+

+
+
+
+
+ +
property bool aiOwned[read-only]
+
+
+
+
+ +
property bool allianceOwned[read-only]
+
+
+
+
+ +
property bool canPassRifts[read-only]
+
+
+
+
+ +
property int controlActions[read-only]
+
+
+
+
+ +
property Crew crew[read-only]
+
+
+
+
+ +
property var crewSize[read-only]
+
+
+
+
+ +
property float damageMultiplier[read-only]
+
+
+
+
+ +
property float desiredVelocity[read-only]
+
+
+
+
+ +
property bool dockable[read-only]
+
+
+
+
+ +
property Uuid dockingParent[read-only]
+
+
+
+
+ +
property double durability[read-only]
+
+
+
+
+ +
property int excludedPlayer[read-only]
+
+
+
+
+ +
property int exclusionTime[read-only]
+
+
+
+
+ +
property int factionIndex[read-only]
+
+
+
+
+ +
property bool fighterCargoPickup[read-only]
+
+
+
+
+ +
property double firePower[read-only]
+
+
+
+
+ +
property var freeCargoSpace[read-only]
+
+
+
+
+ +
property bool hasPilot[read-only]
+
+
+
+
+ +
property float hyperspaceCooldown[read-only]
+
+
+
+
+ +
property float hyperspaceJumpReach[read-only]
+
+
+
+
+ +
property Uuid id[read-only]
+
+
+
+
+ +
property Crew idealCrew[read-only]
+
+
+
+
+ +
property Uuid index[read-only]
+
+
+
+
+ +
property bool invincible[read-only]
+
+
+
+
+ +
property bool isAnomaly[read-only]
+
+
+
+
+ +
property var isArmedTurret[read-only]
+
+
+
+
+ +
property bool isAsteroid[read-only]
+
+
+
+
+ +
property bool isContainer[read-only]
+
+
+
+
+ +
property bool isDrone[read-only]
+
+
+
+
+ +
property bool isFighter[read-only]
+
+
+
+
+ +
property bool isFlyable[read-only]
+
+
+
+
+ +
property bool isLoot[read-only]
+
+
+
+
+ +
property bool isObviouslyMineable[read-only]
+
+
+
+
+ +
property bool isOther[read-only]
+
+
+
+
+ +
property var isShieldActive[read-only]
+
+
+
+
+ +
property bool isShip[read-only]
+
+
+
+
+ +
property bool isStation[read-only]
+
+
+
+
+ +
property var isTurning[read-only]
+
+
+
+
+ +
property bool isTurret[read-only]
+
+
+
+
+ +
property var isUnarmedTurret[read-only]
+
+
+
+
+ +
property bool isUnknown[read-only]
+
+
+
+
+ +
property bool isWormHole[read-only]
+
+
+
+
+ +
property bool isWreckage[read-only]
+
+
+
+
+ +
property vec3 look[read-only]
+
+
+
+
+ +
property var mass[read-only]
+
+
+
+
+ +
property var maxCargoSpace[read-only]
+
+
+
+
+ +
property var maxCrewSize[read-only]
+
+
+
+
+ +
property var maxDurability[read-only]
+
+
+
+
+ +
property Crew minCrew[read-only]
+
+
+
+
+ +
property Entity mothership[read-only]
+
+
+
+
+ +
property string name[read-only]
+
+
+
+
+ +
property int numCargos[read-only]
+
+
+
+
+ +
property int numDefenseWeapons[read-only]
+
+
+
+
+ +
property int numDefenseWeaponsCurrentAttack[read-only]
+
+
+
+
+ +
property var numDockingPositions[read-only]
+
+
+
+
+ +
property var numTurrets[read-only]
+
+
+
+
+ +
property var occupiedCargoSpace[read-only]
+
+
+
+
+ +
property Matrix orientation[read-only]
+
+
+
+
+ +
property bool playerOrAllianceOwned[read-only]
+
+
+
+
+ +
property bool playerOwned[read-only]
+
+
+
+
+ +
property Matrix position[read-only]
+
+
+
+
+ +
property var radius[read-only]
+
+
+
+
+ +
property float reservationTime[read-only]
+
+
+
+
+ +
property int reservedPlayer[read-only]
+
+
+
+ +
+ +
property var selectedObject[read-only]
+
+
+
+
+ +
property double shieldDurability[read-only]
+
+
+
+
+ +
property double shieldMaxDurability[read-only]
+
+
+
+
+ +
property float shieldMeshIntensity[read-only]
+
+
+
+
+ +
property vec3 size[read-only]
+
+
+
+
+ +
property var timeAlive[read-only]
+
+
+
+
+ +
property string title[read-only]
+
+
+
+
+ +
property var translatedTitle[read-only]
+
+
+
+
+ +
property dvec3 translation[read-only]
+
+
+
+
+ +
property vec3 translationf[read-only]
+
+
+
+
+ +
property double transporterRange[read-only]
+
+
+
+
+ +
property int type[read-only]
+
+
+
+
+ +
property string typename[read-only]
+
+
+
+
+ +
property vec3 up[read-only]
+
+
+
+
+ +
property var volume[read-only]
+
+
+
+
+
+
+

+function var, var, table<int, string> canAddCrew(int number, int profession, bool change)
+

+
+
+

+
+
+
+
+

+function table<TradingGood, int> findCargos(string name)
+

+
+
+

+Finds all cargos with the given name. +

+

Parameters

+
+name +A string that will be matched with the 'name' property of the cargos.
+
+

Returns

+
+

+A map containing all matching goods, with the good as key and amount as value. +

+
+

+
+
+
+
+

+function vec3 getAimedPositionBySeat(int seat)
+

+
+
+

+
+
+
+
+

+function vec3... getAimedPositions()
+

+
+
+

+
+
+
+
+

+function var getAllowedArbitraryTurrets()
+

+
+
+

+
+
+
+
+

+function var getAllowedArmedTurrets()
+

+
+
+

+
+
+
+
+

+function var getAllowedUnarmedTurrets()
+

+
+
+

+
+
+
+
+

+function var getAttachedBlockIndex()
+

+
+
+

+Returns the Index of the block that the turret is build on +

+

+
+
+
+
+

+function var getBoostedValue(int type, float value)
+

+
+
+

+Returns value with included bonus, in case a bonus exists. Returns Nil if no bonuses at all, returns value if no bonuses for this stat exist. +

+

Parameters

+
+type +type of bonus stat, e.g. acceleration, higher level crew
+value +the value, that might be changed by bonuses
+
+

+
+
+
+
+

+function Box getBoundingBox()
+

+
+
+

+Returns Bounding Box for entity, use this if you need exact Bounding Box, e.g. for collision detection when entities are close to each other. +

+

+
+
+
+
+

+function Sphere getBoundingSphere()
+

+
+
+

+Returns Bounding Sphere for entity. Much faster than Bounding Box, but not as accurate. Use this if you need to check often. +

+

+
+
+
+
+

+function Captain getCaptain()
+

+
+
+

+
+
+
+
+

+function TradingGood, int... getCargo(unsigned int n)
+

+
+
+

+
+
+
+
+

+function int getCargoAmount(var name)
+

+
+
+

+Counts all goods of the given type. When given a string, it will match the 'name' property of the goods. When given a TradingGood it will match the exact good. +

+

Parameters

+
+name +Either a TradingGood or a string containing the name of a trading good.
+
+

Returns

+
+

+The number of goods +

+
+

+
+
+
+
+

+function table<TradingGood, int> getCargos()
+

+
+
+

+
+
+
+
+

+function var getCrewMembers(int profession)
+

+
+
+

+
+
+
+
+

+function int... getDamageContributorPlayerFactions()
+

+
+
+

+Lists all players and alliances that contributed damage to the entity +

+

Returns

+
+

+Indices of all players and alliances that contributed damage to the entity +

+
+

+
+
+
+
+

+function int... getDamageContributorPlayers()
+

+
+
+

+Lists all players that contributed damage to the entity +

+

Returns

+
+

+Indices of all players that contributed damage to the entity +

+
+

+
+
+
+
+

+function int... getDamageContributors()
+

+
+
+

+Lists all factions that contributed damage to the entity +

+

Returns

+
+

+Indices of all factions that contributed damage to the entity +

+
+

+
+
+
+
+

+function Box getDockedGroupBoundingBox()
+

+
+
+

+Returns Bounding Box for entity, but enlarged to also fit around all docked objects. Use this if you need exact Bounding Box, e.g. for collision detection when entities are close to each other. +

+

+
+
+
+
+

+function Sphere getDockedGroupBoundingSphere()
+

+
+
+

+Returns Bounding Box for entity, but enlarged to also fit around all docked objects. Use this if you need exact Bounding Box, e.g. for collision detection when entities are close to each other. +

+

+
+
+
+
+

+function var getDockingPositions()
+

+
+
+

+Lists all docking positions that the entity has +

+

Returns

+
+

+A table that contains a key-value pair (id, table) for each dock: +

+
+

+
+
+
+
+

+function var getFreeArbitraryTurrets()
+

+
+
+

+
+
+
+
+

+function var getFreeArmedTurrets()
+

+
+
+

+
+
+
+
+

+function var getFreeUnarmedTurrets()
+

+
+
+

+
+
+
+
+

+function BlockPlan getFullPlanCopy()
+

+
+
+

+Returns the plan of the entity. This copies the entire plan, keep that in mind when using plans with large block counts. +

+

Returns

+
+

+A copy of the plan of the entity +

+
+

+
+
+
+
+

+function Material getLowestMineableMaterial()
+

+
+
+

+
+
+
+
+

+function var, var getMalusFactor()
+

+
+
+

+
+
+
+
+

+function Material getMineableMaterial()
+

+
+
+

+
+
+
+
+

+function int... getMineableResources()
+

+
+
+

+
+
+
+
+

+function int getMoneyLootAmount()
+

+
+
+

+
+
+
+
+

+function var getNearestDistance(Entity other)
+

+
+
+

+
+
+
+
+

+function var getNumArmedTurrets()
+

+
+
+

+
+
+
+
+

+function var getNumMiningTurrets()
+

+
+
+

+
+
+
+
+

+function var getNumSalvagingTurrets()
+

+
+
+

+
+
+
+
+

+function var getNumUnarmedTurrets()
+

+
+
+

+
+
+
+
+

+function int... getPilotIndices()
+

+
+
+

+Returns Indices of piloting players +

+

Returns

+
+

+multiple return values: indices of players +

+
+

+
+
+
+
+

+function var getPlanMoneyValue()
+

+
+
+

+
+
+
+
+

+function double... getPlanResourceValue()
+

+
+
+

+
+
+
+
+

+function int getResourceLootAmount()
+

+
+
+

+
+
+
+
+

+function table<int, string> getScripts()
+

+
+
+

+
+
+
+
+

+function table<string, string> getTitleArguments()
+

+
+
+

+Retrieves the arguments to a title +

+

+
+
+
+
+

+function NamedFormat getTitleFormat()
+

+
+
+

+Retrieves the title as NamedFormat +

+

+
+
+
+
+

+function Entity getTurret(int index)
+

+
+
+

+
+
+
+
+

+function Entity... getTurrets()
+

+
+
+

+
+
+
+
+

+function var getTurretSize()
+

+
+
+

+
+
+
+
+

+function var getTurretTemplateSize()
+

+
+
+

+
+
+
+
+

+function var getTurretTurningSpeed()
+

+
+
+

+
+
+
+
+

+function var getUndamagedPlanMoneyValue()
+

+
+
+

+
+
+
+
+

+function double... getUndamagedPlanResourceValue()
+

+
+
+

+
+
+
+
+

+function var getValue(string key)
+

+
+
+

+Retrieves a custom value saved in the entity with the given key +

+

Parameters

+
+key +A string that serves as the name of the value
+
+

Returns

+
+

+The value if the key exists, otherwise nil +

+
+

+
+
+
+
+

+function table<string, var> getValues()
+

+
+
+

+Retrieves all key-value pairs of custom values of the entity +

+

Returns

+
+

+A table containing all custom key-value pairs +

+
+

+
+
+
+
+

+function bool hasComponent(int type)
+

+
+
+

+
+
+
+
+

+function var hasScript(string name)
+

+
+
+

+
+
+
+
+

+function var hyperspaceBlocked()
+

+
+
+

+
+
+
+
+

+function var isCollectable(Entity entity)
+

+
+
+

+
+
+
+
+

+function bool isInDockingArea(Entity other)
+

+
+
+

+
+
+
+
+

+function var isInsideShield(vec3 point)
+

+
+
+

+
+
+
+
+

+function bool, var isJumpRouteValid(int fromX, int fromY, int toX, int toY)
+

+
+
+

+
+
+
+
+

+function var isManned()
+

+
+
+

+
+
+
+
+

+function var isTurretAllowed(TurretTemplate ScriptTurretTemplate)
+

+
+
+

+Tests if the maximum number of turrets of this kind is not reached +

+

Parameters

+
+ScriptTurretTemplate +the template of the turret to be placed
+
+

+
+
+
+
+

+function int jumpPossible(int x, int y)
+

+
+
+

+Tests if the entity can jump to the specified coordinates +

+

Parameters

+
+x +The x-coordinates of the target sector
+y +The y-coordinates of the target sector
+
+

Returns

+
+

+Returns an error code:
-1 The entity doesn't have a hyperspace drive.
0 The entity can jump.
1 The hyperspace drive needs to recharge.
2 The target sector is too far away.
3 The entity is facing the wrong direction.
4 The hyperspace drive is being jammed.
+

+
+

+
+
+
+
+

+function var resolveScriptPath(string path)
+

+
+
+

+
+
+
+
+
+
+ Overview +
Home + Functions + Search +
+
Search:
+Predefined Functions & Example Scripts +
Command +Entity +FactionDatabase +PlanGenerator +Player +Sector +Server +UsableInventoryItem +
+
+

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

+
+ +
+ + diff --git a/Documentation/ReadOnlyEntityTransferrer.html b/Documentation/ReadOnlyEntityTransferrer.html new file mode 100644 index 0000000..295978f --- /dev/null +++ b/Documentation/ReadOnlyEntityTransferrer.html @@ -0,0 +1,468 @@ + + + ReadOnlyEntityTransferrer + + + + +
+
+

Avorion Script API Documentation

+
+
+ +
+
Search:
+
+
+ + + + + + + + + + + + +
+ReadOnlyEntityTransferrer +ReadOnlyEntityTransferrer +

Properties
+entity +
+entityId +
+sectorReady +

Member Functions
+isFactionOnWhitelist +
+
+
+
+

ReadOnlyEntityTransferrer

+

+This object is only available on the server. +

+
+
+

+function ReadOnlyEntityTransferrer(var id)
+

+
+
+

Parameters

+
+id +The id of the entity, must be an index of an existing entity or nil for the entity in the current script context
+
+

Returns

+
+

+A new instance of ReadOnlyEntityTransferrer +

+
+

+
+
+
+
+ +
property Entity entity[read-only]
+
+
+
+
+ +
property uuid entityId[read-only]
+
+
+
+
+ +
property bool sectorReady[read-only]
+
+
+
+
+
+
+

+function bool isFactionOnWhitelist(int faction)
+

+
+
+

+
+
+
+
+
+
+ Overview +
Home + Functions + Search +
+
Search:
+Predefined Functions & Example Scripts +
Command +Entity +FactionDatabase +PlanGenerator +Player +Sector +Server +UsableInventoryItem +
+
+

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

+
+ +
+ + diff --git a/Documentation/ReadOnlyFighterAI.html b/Documentation/ReadOnlyFighterAI.html new file mode 100644 index 0000000..3a5addb --- /dev/null +++ b/Documentation/ReadOnlyFighterAI.html @@ -0,0 +1,524 @@ + + + ReadOnlyFighterAI + + + + +
+
+

Avorion Script API Documentation

+
+
+ +
+
Search:
+
+
+ + + + + + + + + + + + + + + + + + + +
+ReadOnlyFighterAI +ReadOnlyFighterAI +

Properties
+circling +
+clearFeedbackEachTick +
+entity +
+entityId +
+evading +
+ignoreMothershipOrders +
+mothershipId +
+orders +
+reachedTarget +
+squad +
+target +

Member Functions
+
+
+
+

ReadOnlyFighterAI

+
+
+

+function ReadOnlyFighterAI(var id)
+

+
+
+

Parameters

+
+id +The id of the entity, must be an index of an existing entity or nil for the entity in the current script context
+
+

Returns

+
+

+A new instance of ReadOnlyFighterAI +

+
+

+
+
+
+
+ +
property bool circling[read-only]
+
+
+
+
+ +
property bool clearFeedbackEachTick[read-only]
+
+
+
+
+ +
property Entity entity[read-only]
+
+
+
+
+ +
property uuid entityId[read-only]
+
+
+
+
+ +
property bool evading[read-only]
+
+
+
+
+ +
property bool ignoreMothershipOrders[read-only]
+
+
+
+
+ +
property Uuid mothershipId[read-only]
+
+
+
+
+ +
property FighterOrders orders[read-only]
+
+
+
+
+ +
property bool reachedTarget[read-only]
+
+
+
+
+ +
property unsigned int squad[read-only]
+
+
+
+
+ +
property uuid target[read-only]
+
+
+
+
+
+
+
+
+ Overview +
Home + Functions + Search +
+
Search:
+Predefined Functions & Example Scripts +
Command +Entity +FactionDatabase +PlanGenerator +Player +Sector +Server +UsableInventoryItem +
+
+

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

+
+ +
+ + diff --git a/Documentation/ReadOnlyFighterController.html b/Documentation/ReadOnlyFighterController.html new file mode 100644 index 0000000..4c41baa --- /dev/null +++ b/Documentation/ReadOnlyFighterController.html @@ -0,0 +1,459 @@ + + + ReadOnlyFighterController + + + + +
+
+

Avorion Script API Documentation

+
+
+ +
+
Search:
+
+
+ + + + + + + + + + + +
+ReadOnlyFighterController +ReadOnlyFighterController +

Properties
+entity +
+entityId +

Member Functions
+getDeployedFighters +
+
+
+
+

ReadOnlyFighterController

+

+This object is only available on the server. +

+
+
+

+function ReadOnlyFighterController(var id)
+

+
+
+

Parameters

+
+id +The id of the entity, must be an index of an existing entity or nil for the entity in the current script context
+
+

Returns

+
+

+A new instance of ReadOnlyFighterController +

+
+

+
+
+
+
+ +
property Entity entity[read-only]
+
+
+
+
+ +
property uuid entityId[read-only]
+
+
+
+
+
+
+

+function Entity... getDeployedFighters(var squad)
+

+
+
+

+
+
+
+
+
+
+ Overview +
Home + Functions + Search +
+
Search:
+Predefined Functions & Example Scripts +
Command +Entity +FactionDatabase +PlanGenerator +Player +Sector +Server +UsableInventoryItem +
+
+

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

+
+ +
+ + diff --git a/Documentation/ReadOnlyHangar.html b/Documentation/ReadOnlyHangar.html new file mode 100644 index 0000000..9b15c67 --- /dev/null +++ b/Documentation/ReadOnlyHangar.html @@ -0,0 +1,775 @@ + + + ReadOnlyHangar + + + + +
+
+

Avorion Script API Documentation

+
+
+ +
+
Search:
+ +
+

ReadOnlyHangar

+
+
+

+function ReadOnlyHangar(var id)
+

+
+
+

Parameters

+
+id +The id of the entity, must be an index of an existing entity or nil for the entity in the current script context
+
+

Returns

+
+

+A new instance of ReadOnlyHangar +

+
+

+
+
+
+
+ +
property Entity entity[read-only]
+
+
+
+
+ +
property uuid entityId[read-only]
+
+
+
+
+ +
property float freeSpace[read-only]
+
+
+
+
+ +
property static int maxFighters[read-only]
+
+
+
+
+ +
property int maxSquads[read-only]
+
+
+
+
+ +
property static int minFighters[read-only]
+
+
+
+
+ +
property unsigned int numFighters[read-only]
+
+
+
+
+ +
property unsigned int numSquads[read-only]
+
+
+
+
+ +
property unsigned int numSupportedSquads[read-only]
+
+
+
+
+ +
property float occupiedSpace[read-only]
+
+
+
+
+ +
property static float space[read-only]
+
+
+
+
+
+
+

+function bool canLand(Entity entity)
+

+
+
+

+
+
+
+
+

+function bool fighterTypeMatchesSquad(FighterTemplate fighter, unsigned int squadIndex)
+

+
+
+

+
+
+
+
+

+function FighterTemplate getBlueprint(unsigned int squadIndex)
+

+
+
+

+
+
+
+
+

+function FighterTemplate getFighter(unsigned int squadIndex, unsigned int fighterIndex)
+

+
+
+

+
+
+
+
+

+function double getFighterDPS()
+

+
+
+

+
+
+
+
+

+function Material getHighestMaterialInSquadMainCategory(unsigned int squadIndex)
+

+
+
+

+
+
+
+
+

+function Matrix getRandomStartPosition()
+

+
+
+

+
+
+
+
+

+function Squad getSquad(unsigned int index)
+

+
+
+

+Returns a full squad. Caution: This function has to do a lot of copy operations and is slow. +

+

Parameters

+
+index +The index of the squad to get
+
+

Returns

+
+

+A Squad object containing the squad, or nil if no squad with the given index exists +

+
+

+
+
+
+
+

+function double getSquadDPS(unsigned int squadIndex)
+

+
+
+

+
+
+
+
+

+function unsigned int getSquadFighters(unsigned int squadIndex)
+

+
+
+

+
+
+
+
+

+function var getSquadFighterType(unsigned int squadIndex)
+

+
+
+

+
+
+
+
+

+function unsigned int getSquadFreeSlots(unsigned int squadIndex)
+

+
+
+

+
+
+
+
+

+function bool getSquadHasRawMinersOrSalvagers(unsigned int squadIndex)
+

+
+
+

+
+
+
+
+

+function Uuid getSquadId(unsigned int squadIndex)
+

+
+
+

+
+
+
+
+

+function var getSquadMainWeaponCategory(unsigned int squadIndex)
+

+
+
+

+Returns the weapon type that most fighters of this squad are equipped with. Use this to determine if an AI controlled ship can use this squad to mine or salvage. In case mulitple weapon types are equally present a random one is returned. +

+

+
+
+
+
+

+function unsigned int getSquadMaxFighters(unsigned int squadIndex)
+

+
+
+

+
+
+
+
+

+function var getSquadName(unsigned int squadIndex)
+

+
+
+

+
+
+
+
+

+function unsigned int... getSquads()
+

+
+
+

+
+
+
+
+
+
+ Overview +
Home + Functions + Search +
+
Search:
+Predefined Functions & Example Scripts +
Command +Entity +FactionDatabase +PlanGenerator +Player +Sector +Server +UsableInventoryItem +
+
+

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

+
+ +
+ + diff --git a/Documentation/ReadOnlyHyperspaceEngine.html b/Documentation/ReadOnlyHyperspaceEngine.html new file mode 100644 index 0000000..cfb5b43 --- /dev/null +++ b/Documentation/ReadOnlyHyperspaceEngine.html @@ -0,0 +1,626 @@ + + + ReadOnlyHyperspaceEngine + + + + +
+
+

Avorion Script API Documentation

+
+
+ +
+
Search:
+ +
+

ReadOnlyHyperspaceEngine

+
+
+

+function ReadOnlyHyperspaceEngine(var id)
+

+
+
+

Parameters

+
+id +The id of the entity, must be an index of an existing entity or nil for the entity in the current script context
+
+

Returns

+
+

+A new instance of ReadOnlyHyperspaceEngine +

+
+

+
+
+
+
+ +
property bool blocked[read-only]
+
+True if the hyperspace engine is being blocked. +
+
+
+ +
property bool clearSpace[read-only]
+
+Sets the hyperspace engine to "clear space", which speeds up the cooldown to avoid annoying wait times in empty sectors. This value is overridden if the engine is or gets blocked or distorted. +
+
+
+ +
property string consumerIcon[read-only]
+
+Energy consumer icon of the engine as shown in the energy tab. +
+
+
+ +
property string consumerName[read-only]
+
+Energy consumer name of the engine as shown in the energy tab. +
+
+
+ +
property float cooldown[read-only]
+
+Cooldown in seconds of the engine. Current cooldown is set to this on exhaustion of the hyperspace engine. When this value is changed, it will be overridden once the player builds, reloads or installs upgrades. +
+
+
+ +
property float cooldownSpeed[read-only]
+
+Cooldown speed factor. Default is 1, can be 0.25 (distorted), 0 (blocked) or up to 3 (clear space). If hyperspace energy efficiency is below 1, this value is adjusted accordingly. +
+
+
+ +
property float currentCooldown[read-only]
+
+Current cooldown in seconds of the engine. this is the number that ticks down over time. +
+
+
+ +
property int defaultPriority[read-only]
+
+Energy consumer default priority of the engine as shown in the energy tab. +
+
+
+ +
property bool displayedCooldown[read-only]
+
+Cooldown in seconds as it would be displayed to the player. This result varies, depending on distorts, clear space or blockage. +
+
+
+ +
property bool distorted[read-only]
+
+True if the hyperspace engine is being distorted. This is the case when a ship is under attack or when distort() was called. +
+
+
+ +
property Entity entity[read-only]
+
+
+
+
+ +
property uuid entityId[read-only]
+
+
+
+
+ +
property bool isSceneEmpty[read-only]
+
+Checks if the scene is considered "empty enough" to set "clear space" to true, and thus recharge the engine quicker. This is the case when there are only group, own faction or alliance member ships present +
+
+
+ +
property bool passBlocked[read-only]
+
+Whether or not the hyperspace engine is capable of jumping over rifts. When this value is changed, it will be overridden once the player builds or installs upgrades. +
+
+
+ +
property float range[read-only]
+
+Range in sectors of the engine. When this value is changed, it will be overridden once the player builds or installs upgrades. +
+
+
+ +
property double requiredEnergy[read-only]
+
+Currently required energy of the engine as shown in the energy tab. +
+
+
+ +
property float requiredEnergyForJump[read-only]
+
+Amount of energy in W required to do a hyperspace jump (or rather: recharge the engine) +
+
+
+
+
+

+function bool, var isJumpRouteValid(int fromX, int fromY, int toX, int toY)
+

+
+
+

+Checks if a hyperspace route would be valid. +

+

Parameters

+
+fromX +X coordinate of the origin
+fromY +Y coordinate of the origin
+toX +X coordinate of the destination
+toY +Y coordinate of the destination
+
+

Returns

+
+

+Returns a bool (true, false), and, if false, a string containing the reason why it's invalid +

+
+

+
+
+
+
+
+
+ Overview +
Home + Functions + Search +
+
Search:
+Predefined Functions & Example Scripts +
Command +Entity +FactionDatabase +PlanGenerator +Player +Sector +Server +UsableInventoryItem +
+
+

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

+
+ +
+ + diff --git a/Documentation/ReadOnlyIcon.html b/Documentation/ReadOnlyIcon.html new file mode 100644 index 0000000..b654262 --- /dev/null +++ b/Documentation/ReadOnlyIcon.html @@ -0,0 +1,527 @@ + + + ReadOnlyIcon + + + + +
+
+

Avorion Script API Documentation

+
+
+ +
+
Search:
+
+
+ + + + + + + + + + + + + + + + + + + +
+ReadOnlyIcon +ReadOnlyIcon +

Properties
+dangerIcon +
+dangerIconColor +
+dangerIconVisible +
+entity +
+entityId +
+icon +
+iconColor +
+secondaryIcon +
+secondaryIconColor +
+tertiaryIcon +
+tertiaryIconColor +

Member Functions
+
+
+
+

ReadOnlyIcon

+

+This object is only available on the client. +

+
+
+

+function ReadOnlyIcon(var id)
+

+
+
+

Parameters

+
+id +The id of the entity, must be an index of an existing entity or nil for the entity in the current script context
+
+

Returns

+
+

+A new instance of ReadOnlyIcon +

+
+

+
+
+
+
+ +
property string dangerIcon[read-only]
+
+
+
+
+ +
property Color dangerIconColor[read-only]
+
+
+
+
+ +
property bool dangerIconVisible[read-only]
+
+
+
+
+ +
property Entity entity[read-only]
+
+
+
+
+ +
property uuid entityId[read-only]
+
+
+
+
+ +
property string icon[read-only]
+
+
+
+
+ +
property Color iconColor[read-only]
+
+
+
+
+ +
property string secondaryIcon[read-only]
+
+
+
+
+ +
property Color secondaryIconColor[read-only]
+
+
+
+
+ +
property string tertiaryIcon[read-only]
+
+
+
+
+ +
property Color tertiaryIconColor[read-only]
+
+
+
+
+
+
+
+
+ Overview +
Home + Functions + Search +
+
Search:
+Predefined Functions & Example Scripts +
Command +Entity +FactionDatabase +PlanGenerator +Player +Sector +Server +UsableInventoryItem +
+
+

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

+
+ +
+ + diff --git a/Documentation/ReadOnlyInteractionText.html b/Documentation/ReadOnlyInteractionText.html new file mode 100644 index 0000000..af175fb --- /dev/null +++ b/Documentation/ReadOnlyInteractionText.html @@ -0,0 +1,452 @@ + + + ReadOnlyInteractionText + + + + +
+
+

Avorion Script API Documentation

+
+
+ +
+
Search:
+
+
+ + + + + + + + + + + +
+ReadOnlyInteractionText +ReadOnlyInteractionText +

Properties
+entity +
+entityId +
+text +

Member Functions
+
+
+
+

ReadOnlyInteractionText

+
+
+

+function ReadOnlyInteractionText(var id)
+

+
+
+

Parameters

+
+id +The id of the entity, must be an index of an existing entity or nil for the entity in the current script context
+
+

Returns

+
+

+A new instance of ReadOnlyInteractionText +

+
+

+
+
+
+
+ +
property Entity entity[read-only]
+
+
+
+
+ +
property uuid entityId[read-only]
+
+
+
+
+ +
property string text[read-only]
+
+
+
+
+
+
+
+
+ Overview +
Home + Functions + Search +
+
Search:
+Predefined Functions & Example Scripts +
Command +Entity +FactionDatabase +PlanGenerator +Player +Sector +Server +UsableInventoryItem +
+
+

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

+
+ +
+ + diff --git a/Documentation/ReadOnlyLoot.html b/Documentation/ReadOnlyLoot.html new file mode 100644 index 0000000..1b321dc --- /dev/null +++ b/Documentation/ReadOnlyLoot.html @@ -0,0 +1,446 @@ + + + ReadOnlyLoot + + + + +
+
+

Avorion Script API Documentation

+
+
+ +
+
Search:
+
+
+ + + + + + + + + + +
+ReadOnlyLoot +ReadOnlyLoot +

Properties
+entity +
+entityId +

Member Functions
+
+
+
+

ReadOnlyLoot

+

+This object is only available on the server. +

+
+
+

+function ReadOnlyLoot(var id)
+

+
+
+

Parameters

+
+id +The id of the entity, must be an index of an existing entity or nil for the entity in the current script context
+
+

Returns

+
+

+A new instance of ReadOnlyLoot +

+
+

+
+
+
+
+ +
property Entity entity[read-only]
+
+
+
+
+ +
property uuid entityId[read-only]
+
+
+
+
+
+
+
+
+ Overview +
Home + Functions + Search +
+
Search:
+Predefined Functions & Example Scripts +
Command +Entity +FactionDatabase +PlanGenerator +Player +Sector +Server +UsableInventoryItem +
+
+

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

+
+ +
+ + diff --git a/Documentation/ReadOnlyOwner.html b/Documentation/ReadOnlyOwner.html new file mode 100644 index 0000000..a03885f --- /dev/null +++ b/Documentation/ReadOnlyOwner.html @@ -0,0 +1,501 @@ + + + ReadOnlyOwner + + + + +
+
+

Avorion Script API Documentation

+
+
+ +
+
Search:
+
+
+ + + + + + + + + + + + + + + + +
+ReadOnlyOwner +ReadOnlyOwner +

Properties
+entity +
+entityId +
+factionIndex +
+isAIFaction +
+isAlliance +
+isPlayer +
+name +

Member Functions
+getRelationValue +
+
+
+
+

ReadOnlyOwner

+
+
+

+function ReadOnlyOwner(var id)
+

+
+
+

Parameters

+
+id +The id of the entity, must be an index of an existing entity or nil for the entity in the current script context
+
+

Returns

+
+

+A new instance of ReadOnlyOwner +

+
+

+
+
+
+
+ +
property Entity entity[read-only]
+
+
+
+
+ +
property uuid entityId[read-only]
+
+
+
+
+ +
property int factionIndex[read-only]
+
+
+
+
+ +
property bool isAIFaction[read-only]
+
+
+
+
+ +
property bool isAlliance[read-only]
+
+
+
+
+ +
property bool isPlayer[read-only]
+
+
+
+
+ +
property string name[read-only]
+
+
+
+
+
+
+

+function int getRelationValue(int otherFactionIndex)
+

+
+
+

+
+
+
+
+
+
+ Overview +
Home + Functions + Search +
+
Search:
+Predefined Functions & Example Scripts +
Command +Entity +FactionDatabase +PlanGenerator +Player +Sector +Server +UsableInventoryItem +
+
+

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

+
+ +
+ + diff --git a/Documentation/ReadOnlyPhysics.html b/Documentation/ReadOnlyPhysics.html new file mode 100644 index 0000000..058227f --- /dev/null +++ b/Documentation/ReadOnlyPhysics.html @@ -0,0 +1,515 @@ + + + ReadOnlyPhysics + + + + +
+
+

Avorion Script API Documentation

+
+
+ +
+
Search:
+
+
+ + + + + + + + + + + + + + + + + + +
+ReadOnlyPhysics +ReadOnlyPhysics +

Properties
+centerOfMass +
+centerOfRotation +
+driftDecrease +
+entity +
+entityId +
+invMass +
+kineticEnergy +
+mass +
+rotationalEnergy +
+rotationDecrease +

Member Functions
+
+
+
+

ReadOnlyPhysics

+
+
+

+function ReadOnlyPhysics(var id)
+

+
+
+

Parameters

+
+id +The id of the entity, must be an index of an existing entity or nil for the entity in the current script context
+
+

Returns

+
+

+A new instance of ReadOnlyPhysics +

+
+

+
+
+
+
+ +
property vec3 centerOfMass[read-only]
+
+
+
+
+ +
property vec3 centerOfRotation[read-only]
+
+
+
+
+ +
property double driftDecrease[read-only]
+
+
+
+
+ +
property Entity entity[read-only]
+
+
+
+
+ +
property uuid entityId[read-only]
+
+
+
+
+ +
property double invMass[read-only]
+
+
+
+
+ +
property double kineticEnergy[read-only]
+
+
+
+
+ +
property double mass[read-only]
+
+
+
+
+ +
property double rotationalEnergy[read-only]
+
+
+
+
+ +
property double rotationDecrease[read-only]
+
+
+
+
+
+
+
+
+ Overview +
Home + Functions + Search +
+
Search:
+Predefined Functions & Example Scripts +
Command +Entity +FactionDatabase +PlanGenerator +Player +Sector +Server +UsableInventoryItem +
+
+

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

+
+ +
+ + diff --git a/Documentation/ReadOnlyPlan.html b/Documentation/ReadOnlyPlan.html new file mode 100644 index 0000000..1ec1fbf --- /dev/null +++ b/Documentation/ReadOnlyPlan.html @@ -0,0 +1,791 @@ + + + ReadOnlyPlan + + + + +
+
+

Avorion Script API Documentation

+
+
+ +
+
Search:
+ +
+

ReadOnlyPlan

+
+
+

+function ReadOnlyPlan(var id)
+

+
+
+

Parameters

+
+id +The id of the entity, must be an index of an existing entity or nil for the entity in the current script context
+
+

Returns

+
+

+A new instance of ReadOnlyPlan +

+
+

+
+
+
+
+ +
property bool accumulatingHealth[read-only]
+
+
+
+
+ +
property Box boundingBox[read-only]
+
+
+
+
+ +
property Sphere boundingSphere[read-only]
+
+
+
+
+ +
property vec3 centerOfMass[read-only]
+
+
+
+
+ +
property bool collisionDamage[read-only]
+
+
+
+
+ +
property bool convex[read-only]
+
+
+
+
+ +
property double durability[read-only]
+
+
+
+
+ +
property Entity entity[read-only]
+
+
+
+
+ +
property uuid entityId[read-only]
+
+
+
+
+ +
property double mass[read-only]
+
+
+
+
+ +
property int numBlocks[read-only]
+
+
+
+
+ +
property double processingPower[read-only]
+
+
+
+
+ +
property float radius[read-only]
+
+
+
+
+ +
property BlockPlanBlock root[read-only]
+
+
+
+
+ +
property var rootIndex[read-only]
+
+
+
+
+ +
property bool singleBlockDestructionEnabled[read-only]
+
+
+
+
+ +
property int size[read-only]
+
+
+
+
+ +
property float volume[read-only]
+
+
+
+
+
+
+

+function bool empty()
+

+
+
+

+
+
+
+
+

+function bool exists(int index)
+

+
+
+

+
+
+
+
+

+function BlockPlan get()
+

+
+
+

+Returns the plan of the entity. This copies the entire plan, keep that in mind when using plans with large block counts. +

+

Returns

+
+

+A copy of the plan of the entity +

+
+

+
+
+
+
+

+function BlockPlanBlock getBlock(int index)
+

+
+
+

+
+
+
+
+

+function int... getBlockIndices()
+

+
+
+

+
+
+
+
+

+function int... getBlocksByType(int index)
+

+
+
+

+
+
+
+
+

+function double getMoneyValue()
+

+
+
+

+
+
+
+
+

+function BlockPlanBlock getNthBlock(int n)
+

+
+
+

+
+
+
+
+

+function var getNthIndex(int n)
+

+
+
+

+
+
+
+
+

+function int getNumBlocks(int blockIndex)
+

+
+
+

+
+
+
+
+

+function int... getRemoved(int index)
+

+
+
+

+
+
+
+
+

+function double... getResourceValue()
+

+
+
+

+
+
+
+
+

+function BlockStatistics getStats()
+

+
+
+

+
+
+
+
+

+function double getUndamagedMoneyValue()
+

+
+
+

+
+
+
+
+

+function double... getUndamagedResourceValue()
+

+
+
+

+
+
+
+
+
+
+ Overview +
Home + Functions + Search +
+
Search:
+Predefined Functions & Example Scripts +
Command +Entity +FactionDatabase +PlanGenerator +Player +Sector +Server +UsableInventoryItem +
+
+

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

+
+ +
+ + diff --git a/Documentation/ReadOnlyPlanMesh.html b/Documentation/ReadOnlyPlanMesh.html new file mode 100644 index 0000000..61e5e8f --- /dev/null +++ b/Documentation/ReadOnlyPlanMesh.html @@ -0,0 +1,446 @@ + + + ReadOnlyPlanMesh + + + + +
+
+

Avorion Script API Documentation

+
+
+ +
+
Search:
+
+
+ + + + + + + + + + +
+ReadOnlyPlanMesh +ReadOnlyPlanMesh +

Properties
+entity +
+entityId +

Member Functions
+
+
+
+

ReadOnlyPlanMesh

+

+This object is only available on the client. +

+
+
+

+function ReadOnlyPlanMesh(var id)
+

+
+
+

Parameters

+
+id +The id of the entity, must be an index of an existing entity or nil for the entity in the current script context
+
+

Returns

+
+

+A new instance of ReadOnlyPlanMesh +

+
+

+
+
+
+
+ +
property Entity entity[read-only]
+
+
+
+
+ +
property uuid entityId[read-only]
+
+
+
+
+
+
+
+
+ Overview +
Home + Functions + Search +
+
Search:
+Predefined Functions & Example Scripts +
Command +Entity +FactionDatabase +PlanGenerator +Player +Sector +Server +UsableInventoryItem +
+
+

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

+
+ +
+ + diff --git a/Documentation/ReadOnlyScriptUI.html b/Documentation/ReadOnlyScriptUI.html new file mode 100644 index 0000000..175ee47 --- /dev/null +++ b/Documentation/ReadOnlyScriptUI.html @@ -0,0 +1,446 @@ + + + ReadOnlyScriptUI + + + + +
+
+

Avorion Script API Documentation

+
+
+ +
+
Search:
+
+
+ + + + + + + + + + +
+ReadOnlyScriptUI +ReadOnlyScriptUI +

Properties
+entity +
+entityId +

Member Functions
+
+
+
+

ReadOnlyScriptUI

+

+This object is only available on the client. +

+
+
+

+function ReadOnlyScriptUI(var id)
+

+
+
+

Parameters

+
+id +The id of the entity, must be an index of an existing entity or nil for the entity in the current script context
+
+

Returns

+
+

+A new instance of ReadOnlyScriptUI +

+
+

+
+
+
+
+ +
property Entity entity[read-only]
+
+
+
+
+ +
property uuid entityId[read-only]
+
+
+
+
+
+
+
+
+ Overview +
Home + Functions + Search +
+
Search:
+Predefined Functions & Example Scripts +
Command +Entity +FactionDatabase +PlanGenerator +Player +Sector +Server +UsableInventoryItem +
+
+

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

+
+ +
+ + diff --git a/Documentation/ReadOnlySector.html b/Documentation/ReadOnlySector.html new file mode 100644 index 0000000..a519fe9 --- /dev/null +++ b/Documentation/ReadOnlySector.html @@ -0,0 +1,478 @@ + + + ReadOnlySector + + + + +
+
+

Avorion Script API Documentation

+
+
+ +
+
Search:
+
+
+ + + + + + + + + + + + + + +
+ReadOnlySector +ReadOnlySector +

Properties
+name +
+numEntities +
+numPlayers +
+persistent +
+pvpDamage +
+seed +

Member Functions
+
+
+
+

ReadOnlySector

+

+This object is only available on the server. +

+
+
+

+function ReadOnlySector()
+

+
+
+

Returns

+
+

+A new instance of ReadOnlySector +

+
+

+
+
+
+
+ +
property string name[read-only]
+
+Get the name of the sector, as specified by its SectorSpecifics +
+
+
+ +
property unsigned int numEntities[read-only]
+
+
+
+
+ +
property unsigned int numPlayers[read-only]
+
+
+
+
+ +
property bool persistent[read-only]
+
+
+
+
+ +
property bool pvpDamage[read-only]
+
+
+
+
+ +
property Seed seed[read-only]
+
+
+
+
+
+
+
+
+ Overview +
Home + Functions + Search +
+
Search:
+Predefined Functions & Example Scripts +
Command +Entity +FactionDatabase +PlanGenerator +Player +Sector +Server +UsableInventoryItem +
+
+

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

+
+ +
+ + diff --git a/Documentation/ReadOnlyShipAI.html b/Documentation/ReadOnlyShipAI.html new file mode 100644 index 0000000..203eeb2 --- /dev/null +++ b/Documentation/ReadOnlyShipAI.html @@ -0,0 +1,683 @@ + + + ReadOnlyShipAI + + + + +
+
+

Avorion Script API Documentation

+
+
+ +
+
Search:
+ +
+

ReadOnlyShipAI

+
+
+

+function ReadOnlyShipAI(var id)
+

+
+
+

Parameters

+
+id +The id of the entity, must be an index of an existing entity or nil for the entity in the current script context
+
+

Returns

+
+

+A new instance of ReadOnlyShipAI +

+
+

+
+
+
+
+ +
property uuid attackedEntity[read-only]
+
+The currently attacked entity. +
+
+
+ +
property Entity entity[read-only]
+
+
+
+
+ +
property uuid entityId[read-only]
+
+
+
+
+ +
property vec3 flyTarget[read-only]
+
+The location the entity is currently flying to, if in state "Fly" or "FlyLinear". +
+
+
+ +
property bool isAttackingSomething[read-only]
+
+True if the entity is currently attacking another entity. +
+
+
+ +
property bool isBusy[read-only]
+
+True if the entity is currently doing something that prevents ambient chatter. +
+
+
+ +
property bool isStuck[read-only]
+
+True if the entity is currently in state "Fly" and got stuck. +
+
+
+ +
property int state[read-only]
+
+The AIStateType that the AI is currently in. +
+
+
+
+
+

+function bool enemyFightersPresent()
+

+
+
+

+Returns true if there are enemy fighters present in the sector. +

+

+
+
+
+
+

+function bool enemyShipsPresent(var countCivilEnemies)
+

+
+
+

+Returns true if there are enemy ships present in the sector. +

+

Parameters

+
+countCivilEnemies +Set to true to also include civil ships like freighters and the like.
+
+

+
+
+
+
+

+function Entity... getEnemies()
+

+
+
+

+Returns a list of all entities that this AI considers hostile in the sector. +

+

+
+
+
+
+

+function uuid... getRegisteredEnemyEntities()
+

+
+
+

+Returns the list of entities that are always considered enemies. +

+

+
+
+
+
+

+function int... getRegisteredEnemyFactions()
+

+
+
+

+Returns the list of factions that are always considered enemies. +

+

+
+
+
+
+

+function uuid... getRegisteredFriendEntities()
+

+
+
+

+Returns the list of entities that are always considered friends. +

+

+
+
+
+
+

+function int... getRegisteredFriendFactions()
+

+
+
+

+Returns the list of factions that are always considered friends. +

+

+
+
+
+
+

+function bool isEnemy(Entity target)
+

+
+
+

+Checks if the given entity is considered an enemy. +

+

Parameters

+
+target +The entity to check
+
+

+
+
+
+
+

+function bool isRegisteredEnemy(Entity target)
+

+
+
+

+Checks if the given entity is registered to always be considered hostile. +

+

Parameters

+
+target +The entity to check
+
+

+
+
+
+
+

+function bool isRegisteredFriend(Entity target)
+

+
+
+

+Checks if the given entity is registered to always be considered friendly. +

+

Parameters

+
+target +The entity to check
+
+

+
+
+
+
+
+
+ Overview +
Home + Functions + Search +
+
Search:
+Predefined Functions & Example Scripts +
Command +Entity +FactionDatabase +PlanGenerator +Player +Sector +Server +UsableInventoryItem +
+
+

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

+
+ +
+ + diff --git a/Documentation/ReadOnlyShipSystem.html b/Documentation/ReadOnlyShipSystem.html new file mode 100644 index 0000000..e6534db --- /dev/null +++ b/Documentation/ReadOnlyShipSystem.html @@ -0,0 +1,522 @@ + + + ReadOnlyShipSystem + + + + +
+
+

Avorion Script API Documentation

+
+
+ +
+
Search:
+
+
+ + + + + + + + + + + + + + + + + +
+ReadOnlyShipSystem +ReadOnlyShipSystem +

Properties
+entity +
+entityId +
+maxSockets +
+numSockets +
+numUpgrades +

Member Functions
+getProcessingPowerForSocket +
+getUpgrade +
+getUpgrades +
+isPermanent +
+
+
+
+

ReadOnlyShipSystem

+
+
+

+function ReadOnlyShipSystem(var id)
+

+
+
+

Parameters

+
+id +The id of the entity, must be an index of an existing entity or nil for the entity in the current script context
+
+

Returns

+
+

+A new instance of ReadOnlyShipSystem +

+
+

+
+
+
+
+ +
property Entity entity[read-only]
+
+
+
+
+ +
property uuid entityId[read-only]
+
+
+
+
+ +
property static unsigned int maxSockets[read-only]
+
+
+
+
+ +
property static int numSockets[read-only]
+
+
+
+
+ +
property unsigned int numUpgrades[read-only]
+
+
+
+
+
+
+

+function double getProcessingPowerForSocket(unsigned int socket)
+

+
+
+

+
+
+
+
+

+function SystemUpgradeTemplate getUpgrade(unsigned int index)
+

+
+
+

+
+
+
+
+

+function pair... getUpgrades()
+

+
+
+

+
+
+
+
+

+function bool isPermanent(unsigned int socket)
+

+
+
+

+
+
+
+
+
+
+ Overview +
Home + Functions + Search +
+
Search:
+Predefined Functions & Example Scripts +
Command +Entity +FactionDatabase +PlanGenerator +Player +Sector +Server +UsableInventoryItem +
+
+

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

+
+ +
+ + diff --git a/Documentation/ReadOnlyTooltip.html b/Documentation/ReadOnlyTooltip.html new file mode 100644 index 0000000..266b904 --- /dev/null +++ b/Documentation/ReadOnlyTooltip.html @@ -0,0 +1,446 @@ + + + ReadOnlyTooltip + + + + +
+
+

Avorion Script API Documentation

+
+
+ +
+
Search:
+
+
+ + + + + + + + + + +
+ReadOnlyTooltip +ReadOnlyTooltip +

Properties
+entity +
+entityId +

Member Functions
+
+
+
+

ReadOnlyTooltip

+

+This object is only available on the client. +

+
+
+

+function ReadOnlyTooltip(var id)
+

+
+
+

Parameters

+
+id +The id of the entity, must be an index of an existing entity or nil for the entity in the current script context
+
+

Returns

+
+

+A new instance of ReadOnlyTooltip +

+
+

+
+
+
+
+ +
property Entity entity[read-only]
+
+
+
+
+ +
property uuid entityId[read-only]
+
+
+
+
+
+
+
+
+ Overview +
Home + Functions + Search +
+
Search:
+Predefined Functions & Example Scripts +
Command +Entity +FactionDatabase +PlanGenerator +Player +Sector +Server +UsableInventoryItem +
+
+

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

+
+ +
+ + diff --git a/Documentation/ReadOnlyTorpedoAI [Server] [Client] [Server] [Client].html b/Documentation/ReadOnlyTorpedoAI [Server] [Client] [Server] [Client].html new file mode 100644 index 0000000..caec524 --- /dev/null +++ b/Documentation/ReadOnlyTorpedoAI [Server] [Client] [Server] [Client].html @@ -0,0 +1,470 @@ + + + ReadOnlyTorpedoAI [Server] [Client] [Server] [Client] + + + + +
+
+

Avorion Script API Documentation

+
+
+ +
+
Search:
+
+
+ + + + + + + + + + + + + +
+ReadOnlyTorpedoAI [Server] [Client] [Server] [Client] +ReadOnlyTorpedoAI +

Properties
+drifting +
+entity +
+entityId +
+maxVelocity +
+turningSpeed +

Member Functions
+
+
+
+

ReadOnlyTorpedoAI [Server] [Client] [Server] [Client]

+
+
+

+function ReadOnlyTorpedoAI(var id)
+

+
+
+

Parameters

+
+id +The id of the entity, must be an index of an existing entity or nil for the entity in the current script context
+
+

Returns

+
+

+A new instance of ReadOnlyTorpedoAI +

+
+

+
+
+
+
+ +
property bool drifting[read-only]
+
+
+
+
+ +
property Entity entity[read-only]
+
+
+
+
+ +
property uuid entityId[read-only]
+
+
+
+
+ +
property float maxVelocity[read-only]
+
+
+
+
+ +
property float turningSpeed[read-only]
+
+
+
+
+
+
+
+
+ Overview +
Home + Functions + Search +
+
Search:
+Predefined Functions & Example Scripts +
Command +Entity +FactionDatabase +PlanGenerator +Player +Sector +Server +UsableInventoryItem +
+
+

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

+
+ +
+ + diff --git a/Documentation/ReadOnlyTorpedoLauncher.html b/Documentation/ReadOnlyTorpedoLauncher.html new file mode 100644 index 0000000..155c2cf --- /dev/null +++ b/Documentation/ReadOnlyTorpedoLauncher.html @@ -0,0 +1,578 @@ + + + ReadOnlyTorpedoLauncher + + + + +
+
+

Avorion Script API Documentation

+
+
+ +
+
Search:
+
+
+ + + + + + + + + + + + + + + + + + + + + +
+ReadOnlyTorpedoLauncher +ReadOnlyTorpedoLauncher +

Properties
+entity +
+entityId +
+freeStorage +
+maximumStorage +
+maxShafts +
+numShafts +
+numTorpedoes +
+occupiedStorage +

Member Functions
+getFreeSlots +
+getMaxTorpedoes +
+getNumTorpedoes +
+getShafts +
+getTorpedo +
+
+
+
+

ReadOnlyTorpedoLauncher

+
+
+

+function ReadOnlyTorpedoLauncher(var id)
+

+
+
+

Parameters

+
+id +The id of the entity, must be an index of an existing entity or nil for the entity in the current script context
+
+

Returns

+
+

+A new instance of ReadOnlyTorpedoLauncher +

+
+

+
+
+
+
+ +
property Entity entity[read-only]
+
+
+
+
+ +
property uuid entityId[read-only]
+
+
+
+
+ +
property float freeStorage[read-only]
+
+
+
+
+ +
property float maximumStorage[read-only]
+
+
+
+
+ +
property int maxShafts[read-only]
+
+
+
+
+ +
property unsigned int numShafts[read-only]
+
+
+
+
+ +
property unsigned int numTorpedoes[read-only]
+
+
+
+
+ +
property float occupiedStorage[read-only]
+
+
+
+
+
+
+

+function unsigned int getFreeSlots(var shaftIndex)
+

+
+
+

+
+
+
+
+

+function unsigned int getMaxTorpedoes(var shaftIndex)
+

+
+
+

+
+
+
+
+

+function unsigned int getNumTorpedoes(int shaftIndex)
+

+
+
+

+
+
+
+
+

+function unsigned int... getShafts()
+

+
+
+

+
+
+
+
+

+function TorpedoTemplate getTorpedo(int torpedoIndex, int shaftIndex)
+

+
+
+

+Accesses a torpedo in a specific shaft. +

+

Parameters

+
+torpedoIndex +
+shaftIndex, +-1 for torpedo storage
+
+

Returns

+
+

+The torpedo, if found. nil otherwise. +

+
+

+
+
+
+
+
+
+ Overview +
Home + Functions + Search +
+
Search:
+Predefined Functions & Example Scripts +
Command +Entity +FactionDatabase +PlanGenerator +Player +Sector +Server +UsableInventoryItem +
+
+

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

+
+ +
+ + diff --git a/Documentation/ReadOnlyTurretBases.html b/Documentation/ReadOnlyTurretBases.html new file mode 100644 index 0000000..e6c5c31 --- /dev/null +++ b/Documentation/ReadOnlyTurretBases.html @@ -0,0 +1,423 @@ + + + ReadOnlyTurretBases + + + + +
+
+

Avorion Script API Documentation

+
+
+ +
+
Search:
+
+
+ + + + + + + + +
+ReadOnlyTurretBases +ReadOnlyTurretBases +

Properties

Member Functions
+
+
+
+

ReadOnlyTurretBases

+
+
+

+function ReadOnlyTurretBases(var id)
+

+
+
+

Parameters

+
+id +The id of the entity, must be an index of an existing entity or nil for the entity in the current script context
+
+

Returns

+
+

+A new instance of ReadOnlyTurretBases +

+
+

+
+
+
+
+
+
+ Overview +
Home + Functions + Search +
+
Search:
+Predefined Functions & Example Scripts +
Command +Entity +FactionDatabase +PlanGenerator +Player +Sector +Server +UsableInventoryItem +
+
+

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

+
+ +
+ + diff --git a/Documentation/ReadOnlyTurretController.html b/Documentation/ReadOnlyTurretController.html new file mode 100644 index 0000000..5b37634 --- /dev/null +++ b/Documentation/ReadOnlyTurretController.html @@ -0,0 +1,459 @@ + + + ReadOnlyTurretController + + + + +
+
+

Avorion Script API Documentation

+
+
+ +
+
Search:
+
+
+ + + + + + + + + + + +
+ReadOnlyTurretController +ReadOnlyTurretController +

Properties
+entity +
+entityId +

Member Functions
+getGroupOrders +
+
+
+
+

ReadOnlyTurretController

+

+This object is only available on the server. +

+
+
+

+function ReadOnlyTurretController(var id)
+

+
+
+

Parameters

+
+id +The id of the entity, must be an index of an existing entity or nil for the entity in the current script context
+
+

Returns

+
+

+A new instance of ReadOnlyTurretController +

+
+

+
+
+
+
+ +
property Entity entity[read-only]
+
+
+
+
+ +
property uuid entityId[read-only]
+
+
+
+
+
+
+

+function int getGroupOrders(int group)
+

+
+
+

+
+
+
+
+
+
+ Overview +
Home + Functions + Search +
+
Search:
+Predefined Functions & Example Scripts +
Command +Entity +FactionDatabase +PlanGenerator +Player +Sector +Server +UsableInventoryItem +
+
+

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

+
+ +
+ + diff --git a/Documentation/ReadOnlyVelocity.html b/Documentation/ReadOnlyVelocity.html new file mode 100644 index 0000000..37ceaaa --- /dev/null +++ b/Documentation/ReadOnlyVelocity.html @@ -0,0 +1,506 @@ + + + ReadOnlyVelocity + + + + +
+
+

Avorion Script API Documentation

+
+
+ +
+
Search:
+
+
+ + + + + + + + + + + + + + + + + +
+ReadOnlyVelocity +ReadOnlyVelocity +

Properties
+axis +
+entity +
+entityId +
+linear +
+linear2 +
+localAngular +
+rotationSpeed +
+velocity +
+velocityf +

Member Functions
+
+
+
+

ReadOnlyVelocity

+
+
+

+function ReadOnlyVelocity(var id)
+

+
+
+

Parameters

+
+id +The id of the entity, must be an index of an existing entity or nil for the entity in the current script context
+
+

Returns

+
+

+A new instance of ReadOnlyVelocity +

+
+

+
+
+
+
+ +
property vec3 axis[read-only]
+
+
+
+
+ +
property Entity entity[read-only]
+
+
+
+
+ +
property uuid entityId[read-only]
+
+
+
+
+ +
property double linear[read-only]
+
+
+
+
+ +
property double linear2[read-only]
+
+
+
+
+ +
property vec3 localAngular[read-only]
+
+
+
+
+ +
property float rotationSpeed[read-only]
+
+
+
+
+ +
property dvec3 velocity[read-only]
+
+
+
+
+ +
property vec3 velocityf[read-only]
+
+
+
+
+
+
+
+
+ Overview +
Home + Functions + Search +
+
Search:
+Predefined Functions & Example Scripts +
Command +Entity +FactionDatabase +PlanGenerator +Player +Sector +Server +UsableInventoryItem +
+
+

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

+
+ +
+ + diff --git a/Documentation/ReadOnlyWeapons.html b/Documentation/ReadOnlyWeapons.html new file mode 100644 index 0000000..2fb9c25 --- /dev/null +++ b/Documentation/ReadOnlyWeapons.html @@ -0,0 +1,965 @@ + + + ReadOnlyWeapons + + + + +
+
+

Avorion Script API Documentation

+
+
+ +
+
Search:
+ +
+

ReadOnlyWeapons

+
+
+

+function ReadOnlyWeapons(var id)
+

+
+
+

Parameters

+
+id +The id of the entity, must be an index of an existing entity or nil for the entity in the current script context
+
+

Returns

+
+

+A new instance of ReadOnlyWeapons +

+
+

+
+
+
+
+ +
property float accuracy[read-only]
+
+
+
+
+ +
property bool armed[read-only]
+
+
+
+
+ +
property int averageTech[read-only]
+
+
+
+
+ +
property float baseEnergyPerSecond[read-only]
+
+
+
+
+ +
property float bestEfficiency[read-only]
+
+
+
+
+ +
property WeaponCategory category[read-only]
+
+
+
+
+ +
property bool civil[read-only]
+
+
+
+
+ +
property bool continuousBeam[read-only]
+
+
+
+
+ +
property float coolingRate[read-only]
+
+
+
+
+ +
property float coolingTime[read-only]
+
+
+
+
+ +
property int coolingType[read-only]
+
+
+
+
+ +
property float damage[read-only]
+
+
+
+
+ +
property int damageType[read-only]
+
+
+
+
+ +
property bool deathExplosion[read-only]
+
+
+
+
+ +
property float dps[read-only]
+
+
+
+
+ +
property float energyIncreasePerSecond[read-only]
+
+
+
+
+ +
property Entity entity[read-only]
+
+
+
+
+ +
property uuid entityId[read-only]
+
+
+
+
+ +
property float fireRate[read-only]
+
+
+
+
+ +
property bool firing[read-only]
+
+
+
+
+ +
property float firingsPerSecond[read-only]
+
+
+
+
+ +
property float heat[read-only]
+
+
+
+
+ +
property float heatPerShot[read-only]
+
+
+
+
+ +
property float holdingForce[read-only]
+
+
+
+
+ +
property float hullDamageMultiplicator[read-only]
+
+
+
+
+ +
property float hullDamageMultiplier[read-only]
+
+
+
+
+ +
property float hullRepairRate[read-only]
+
+
+
+
+ +
property Material material[read-only]
+
+
+
+
+ +
property float maxHeat[read-only]
+
+
+
+
+ +
property int maxTech[read-only]
+
+
+
+
+ +
property float metalBestEfficiency[read-only]
+
+
+
+
+ +
property float metalRawEfficiency[read-only]
+
+
+
+
+ +
property float metalRefinedEfficiency[read-only]
+
+
+
+
+ +
property int numVisibleWeapons[read-only]
+
+
+
+
+ +
property unsigned int numWeapons[read-only]
+
+
+
+
+ +
property float otherForce[read-only]
+
+
+
+
+ +
property bool overheated[read-only]
+
+
+
+
+ +
property Rarity rarity[read-only]
+
+
+
+
+ +
property float reach[read-only]
+
+
+
+
+ +
property double requiredShootingEnergy[read-only]
+
+
+
+
+ +
property bool seeker[read-only]
+
+
+
+
+ +
property float selfForce[read-only]
+
+
+
+
+ +
property float shieldDamageMultiplicator[read-only]
+
+
+
+
+ +
property float shieldDamageMultiplier[read-only]
+
+
+
+
+ +
property float shieldPenetration[read-only]
+
+
+
+
+ +
property float shieldRepairRate[read-only]
+
+
+
+
+ +
property float shootingTime[read-only]
+
+
+
+
+ +
property float shotSpeed[read-only]
+
+
+
+
+ +
property int shotsPerFiring[read-only]
+
+
+
+
+ +
property float shotsPerSecond[read-only]
+
+
+
+
+ +
property int shotsUntilOverheated[read-only]
+
+
+
+
+ +
property bool simultaneousShooting[read-only]
+
+
+
+
+ +
property float stoneBestEfficiency[read-only]
+
+
+
+
+ +
property float stoneDamageMultiplicator[read-only]
+
+
+
+
+ +
property float stoneDamageMultiplier[read-only]
+
+
+
+
+ +
property float stoneRawEfficiency[read-only]
+
+
+
+
+ +
property float stoneRefinedEfficiency[read-only]
+
+
+
+
+ +
property string weaponIcon[read-only]
+
+
+
+
+ +
property string weaponName[read-only]
+
+
+
+
+ +
property string weaponPrefix[read-only]
+
+
+
+
+
+
+
+
+ Overview +
Home + Functions + Search +
+
Search:
+Predefined Functions & Example Scripts +
Command +Entity +FactionDatabase +PlanGenerator +Player +Sector +Server +UsableInventoryItem +
+
+

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

+
+ +
+ + diff --git a/Documentation/ReadOnlyWormHole.html b/Documentation/ReadOnlyWormHole.html new file mode 100644 index 0000000..87bb1bf --- /dev/null +++ b/Documentation/ReadOnlyWormHole.html @@ -0,0 +1,519 @@ + + + ReadOnlyWormHole + + + + +
+
+

Avorion Script API Documentation

+
+
+ +
+
Search:
+
+
+ + + + + + + + + + + + + + + + + + +
+ReadOnlyWormHole +ReadOnlyWormHole +

Properties
+color +
+enabled +
+entity +
+entityId +
+oneWay +
+passageSize +
+simplifiedVisuals +
+visible +
+visualSize +

Member Functions
+fitsThrough +
+
+
+
+

ReadOnlyWormHole

+
+
+

+function ReadOnlyWormHole(var id)
+

+
+
+

Parameters

+
+id +The id of the entity, must be an index of an existing entity or nil for the entity in the current script context
+
+

Returns

+
+

+A new instance of ReadOnlyWormHole +

+
+

+
+
+
+
+ +
property Color color[read-only]
+
+
+
+
+ +
property bool enabled[read-only]
+
+
+
+
+ +
property Entity entity[read-only]
+
+
+
+
+ +
property uuid entityId[read-only]
+
+
+
+
+ +
property bool oneWay[read-only]
+
+
+
+
+ +
property float passageSize[read-only]
+
+
+
+
+ +
property bool simplifiedVisuals[read-only]
+
+
+
+
+ +
property bool visible[read-only]
+
+
+
+
+ +
property float visualSize[read-only]
+
+
+
+
+
+
+

+function bool fitsThrough(Entity entity)
+

+
+
+

+
+
+
+
+
+
+ Overview +
Home + Functions + Search +
+
Search:
+Predefined Functions & Example Scripts +
Command +Entity +FactionDatabase +PlanGenerator +Player +Sector +Server +UsableInventoryItem +
+
+

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

+
+ +
+ + diff --git a/Documentation/ReadOnlyWreckageCreator.html b/Documentation/ReadOnlyWreckageCreator.html new file mode 100644 index 0000000..8312f0b --- /dev/null +++ b/Documentation/ReadOnlyWreckageCreator.html @@ -0,0 +1,446 @@ + + + ReadOnlyWreckageCreator + + + + +
+
+

Avorion Script API Documentation

+
+
+ +
+
Search:
+
+
+ + + + + + + + + + +
+ReadOnlyWreckageCreator +ReadOnlyWreckageCreator +

Properties
+entity +
+entityId +

Member Functions
+
+
+
+

ReadOnlyWreckageCreator

+

+This object is only available on the server. +

+
+
+

+function ReadOnlyWreckageCreator(var id)
+

+
+
+

Parameters

+
+id +The id of the entity, must be an index of an existing entity or nil for the entity in the current script context
+
+

Returns

+
+

+A new instance of ReadOnlyWreckageCreator +

+
+

+
+
+
+
+ +
property Entity entity[read-only]
+
+
+
+
+ +
property uuid entityId[read-only]
+
+
+
+
+
+
+
+
+ Overview +
Home + Functions + Search +
+
Search:
+Predefined Functions & Example Scripts +
Command +Entity +FactionDatabase +PlanGenerator +Player +Sector +Server +UsableInventoryItem +
+
+

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

+
+ +
+ + diff --git a/Documentation/Rect.html b/Documentation/Rect.html new file mode 100644 index 0000000..f1bbe22 --- /dev/null +++ b/Documentation/Rect.html @@ -0,0 +1,528 @@ + + + Rect + + + + +
+
+

Avorion Script API Documentation

+
+
+ +
+
Search:
+
+
+ + + + + + + + + + + + + + + + + + + + +
+Rect +Rect +

Properties
+area +
+bottomLeft +
+bottomRight +
+center +
+height +
+lower +
+position +
+size +
+topLeft +
+topRight +
+upper +
+width +

Member Functions
+
+
+
+

Rect

+
+
+

+function Rect(var a, var b, var c, var d)
+

+
+
+

Returns

+
+

+A new instance of Rect +

+
+

+
+
+
+
+ +
property float area[read-only]
+
+
+
+
+ +
property vec2 bottomLeft[read-only]
+
+
+
+
+ +
property vec2 bottomRight[read-only]
+
+
+
+
+ +
property vec2 center[read-only]
+
+
+
+
+ +
property float height
+
+
+
+
+ +
property vec2 lower
+
+
+
+
+ +
property vec2 position
+
+
+
+
+ +
property vec2 size
+
+
+
+
+ +
property vec2 topLeft[read-only]
+
+
+
+
+ +
property vec2 topRight[read-only]
+
+
+
+
+ +
property vec2 upper
+
+
+
+
+ +
property float width
+
+
+
+
+
+
+
+
+ Overview +
Home + Functions + Search +
+
Search:
+Predefined Functions & Example Scripts +
Command +Entity +FactionDatabase +PlanGenerator +Player +Sector +Server +UsableInventoryItem +
+
+

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

+
+ +
+ + diff --git a/Documentation/RefractionFX.html b/Documentation/RefractionFX.html new file mode 100644 index 0000000..5603e14 --- /dev/null +++ b/Documentation/RefractionFX.html @@ -0,0 +1,531 @@ + + + RefractionFX + + + + +
+
+

Avorion Script API Documentation

+
+
+ +
+
Search:
+
+
+ + + + + + + + + + + + + + + + + + + + +
+RefractionFX +RefractionFX +

Properties
+aliveTime +
+color +
+entityId +
+intensity +
+maxAliveTime +
+offset +
+offsetSpeed +
+position +
+reflectivity +
+reflectivityColor +
+separation +
+uvScale +

Member Functions
+
+
+
+

RefractionFX

+

+This object is only available on the client. +

+
+
+

+function RefractionFX()
+

+
+
+

Returns

+
+

+A new instance of RefractionFX +

+
+

+
+
+
+
+ +
property float aliveTime
+
+
+
+
+ +
property vec3 color
+
+
+
+
+ +
property Uuid entityId
+
+
+
+
+ +
property float intensity
+
+
+
+
+ +
property float maxAliveTime
+
+
+
+
+ +
property vec2 offset
+
+
+
+
+ +
property vec2 offsetSpeed
+
+
+
+
+ +
property Matrix position
+
+
+
+
+ +
property float reflectivity
+
+
+
+
+ +
property vec3 reflectivityColor
+
+
+
+
+ +
property vec2 separation
+
+
+
+
+ +
property vec2 uvScale
+
+
+
+
+
+
+
+
+ Overview +
Home + Functions + Search +
+
Search:
+Predefined Functions & Example Scripts +
Command +Entity +FactionDatabase +PlanGenerator +Player +Sector +Server +UsableInventoryItem +
+
+

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

+
+ +
+ + diff --git a/Documentation/Relation.html b/Documentation/Relation.html new file mode 100644 index 0000000..5011c9c --- /dev/null +++ b/Documentation/Relation.html @@ -0,0 +1,499 @@ + + + Relation + + + + +
+
+

Avorion Script API Documentation

+
+
+ +
+
Search:
+
+
+ + + + + + + + + + + + + + + + +
+Relation +Relation +

Properties
+color +
+description +
+factionIndex +
+isStatic +
+level +
+status +
+translatedStatus +

Member Functions
+getSegments +
+
+
+
+

Relation

+
+
+

+function Relation()
+

+
+
+

+This is the default constructor of Relation. No further arguments are required. +

+

Returns

+
+

+A new instance of Relation +

+
+

+
+
+
+
+ +
property Color color[read-only]
+
+
+
+
+ +
property string description[read-only]
+
+
+
+
+ +
property int factionIndex
+
+
+
+
+ +
property bool isStatic
+
+
+
+
+ +
property int level
+
+
+
+
+ +
property int status
+
+
+
+
+ +
property string translatedStatus[read-only]
+
+
+
+
+
+
+

+function static const std::vector getSegments()
+

+
+
+

+
+
+
+
+
+
+ Overview +
Home + Functions + Search +
+
Search:
+Predefined Functions & Example Scripts +
Command +Entity +FactionDatabase +PlanGenerator +Player +Sector +Server +UsableInventoryItem +
+
+

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

+
+ +
+ + diff --git a/Documentation/SavedDesignsSelection.html b/Documentation/SavedDesignsSelection.html new file mode 100644 index 0000000..f488751 --- /dev/null +++ b/Documentation/SavedDesignsSelection.html @@ -0,0 +1,1722 @@ + + + SavedDesignsSelection + + + + +
+
+

Avorion Script API Documentation

+
+
+ +
+
Search:
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+SavedDesignsSelection +SavedDesignsSelection +

Properties
+dragFromEnabled +
+dropIntoEnabled +
+dropIntoSelfEnabled +
+entriesHighlightable +
+entriesSelectable +
+isRenderingDraggedItem +
+maxHorizontalEntries +
+numEntries +
+onClickedFunction +
+onDeselectedFunction +
+onSelectedFunction +
+padding +
+selected +
+selectedKey +
+center +
+height +
+index +
+layer +
+localCenter +
+localPosition +
+localRect +
+lower +
+mouseOver +
+position +
+rect +
+size +
+tooltip +
+tooltipWidth +
+upper +
+visible +
+width +

Member Functions
+getItem +
+getItems +
+getMouseOveredKey +
+getRect +
+refreshCurrentFolder +
+refreshTopLevelFolder +
+select +
+selectNoCallback +
+setPlanTypeFilter +
+setShowScrollArrows +
+unselect +
+clear +
+createAllianceEmblem +
+createArrowLine +
+createButton +
+createCaptainIcon +
+createCaptainProfile +
+createCheckBox +
+createComboBox +
+createContainer +
+createContextMenu +
+createCraftPortrait +
+createCrewBar +
+createFrame +
+createInputWindow +
+createInventorySelection +
+createLabel +
+createLine +
+createListBox +
+createListBoxEx +
+createMapArrowLine +
+createMapIcon +
+createMultiLineTextBox +
+createNumbersBar +
+createPicture +
+createPlanDisplayer +
+createProgressBar +
+createRect +
+createRoundButton +
+createSavedDesignsSelection +
+createScrollFrame +
+createSelection +
+createSlider +
+createStatisticsBar +
+createTabbedWindow +
+createTextBox +
+createTextField +
+createTooltipDisplayer +
+createTree +
+createValueComboBox +
+createWindow +
+hide +
+isMouseOverAndUnobscured +
+show +
+
+
+
+

SavedDesignsSelection : UIContainer

+

+This object is only available on the client. +

+
+
+

+function SavedDesignsSelection(int index)
+

+
+
+

Returns

+
+

+A new instance of SavedDesignsSelection +

+
+

+
+
+
+
+ +
property bool dragFromEnabled[write-only]
+
+
+
+
+ +
property bool dropIntoEnabled[write-only]
+
+
+
+
+ +
property bool dropIntoSelfEnabled[write-only]
+
+
+
+
+ +
property bool entriesHighlightable[write-only]
+
+
+
+
+ +
property bool entriesSelectable[write-only]
+
+
+
+
+ +
property bool isRenderingDraggedItem[read-only]
+
+
+
+
+ +
property unsigned int maxHorizontalEntries[read-only]
+
+
+
+
+ +
property int numEntries[read-only]
+
+
+
+
+ +
property string onClickedFunction
+
+
+
+
+ +
property string onDeselectedFunction
+
+
+
+
+ +
property string onSelectedFunction
+
+
+
+
+ +
property float padding[write-only]
+
+
+
+
+ +
property UserObject selected[read-only]
+
+
+
+
+ +
property ivec2 selectedKey[read-only]
+
+
+
+
+ +
property vec2 center
+
+
+
+
+ +
property float height
+
+
+
+
+ +
property int index[read-only]
+
+
+
+
+ +
property int layer
+
+
+
+
+ +
property vec2 localCenter[read-only]
+
+
+
+
+ +
property vec2 localPosition[read-only]
+
+
+
+
+ +
property Rect localRect[read-only]
+
+
+
+
+ +
property vec2 lower
+
+
+
+
+ +
property bool mouseOver[read-only]
+
+
+
+
+ +
property vec2 position
+
+
+
+
+ +
property Rect rect
+
+
+
+
+ +
property vec2 size
+
+
+
+
+ +
property var tooltip
+
+
+
+
+ +
property int tooltipWidth[write-only]
+
+
+
+
+ +
property vec2 upper
+
+
+
+
+ +
property bool visible
+
+
+
+
+ +
property float width
+
+
+
+
+
+
+

+function UserObject getItem(ivec2 key)
+

+
+
+

+
+
+
+
+

+function table<ivec2, UserObject> getItems()
+

+
+
+

+
+
+
+
+

+function ivec2 getMouseOveredKey()
+

+
+
+

+
+
+
+
+

+function int, Rect getRect(int x, int y)
+

+
+
+

+
+
+
+
+

+function var refreshCurrentFolder()
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var refreshTopLevelFolder()
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var select(ivec2 pos)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var selectNoCallback(ivec2 pos)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var setPlanTypeFilter(SavedDesignsSelection::PlanTypeFilter filter)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var setShowScrollArrows(bool showTop, bool showBottom, float width)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var unselect()
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var clear()
+

+
+
+

+Inherited from UIContainer + +

+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function AllianceEmblem createAllianceEmblem(Rect rect, int allianceIndex)
+

+
+
+

+Inherited from UIContainer + +

+

+
+
+
+
+

+function ArrowLine createArrowLine()
+

+
+
+

+Inherited from UIContainer + +

+

+
+
+
+
+

+function Button createButton(Rect rect, string caption, string function)
+

+
+
+

+Inherited from UIContainer + +

+

+
+
+
+
+

+function CaptainIcon createCaptainIcon(Rect rect)
+

+
+
+

+Inherited from UIContainer + +

+

+
+
+
+
+

+function CaptainProfile createCaptainProfile(Rect rect)
+

+
+
+

+Inherited from UIContainer + +

+

+
+
+
+
+

+function CheckBox createCheckBox(Rect rect, string caption, string onCheckedFunction)
+

+
+
+

+Inherited from UIContainer + +

+

+
+
+
+
+

+function ComboBox createComboBox(Rect rect, string onSelectedFunction)
+

+
+
+

+Inherited from UIContainer + +

+

+
+
+
+
+

+function UIContainer createContainer(Rect rect)
+

+
+
+

+Inherited from UIContainer + +

+

+
+
+
+
+

+function ContextMenu createContextMenu()
+

+
+
+

+Inherited from UIContainer + +

+

+
+
+
+
+

+function CraftPortrait createCraftPortrait(Rect rect, string function)
+

+
+
+

+Inherited from UIContainer + +

+

+
+
+
+
+

+function CrewBar createCrewBar(Rect rect)
+

+
+
+

+Inherited from UIContainer + +

+

+
+
+
+
+

+function Frame createFrame(Rect rect)
+

+
+
+

+Inherited from UIContainer + +

+

+
+
+
+
+

+function InputWindow createInputWindow()
+

+
+
+

+Inherited from UIContainer + +

+

+
+
+
+
+

+function InventorySelection createInventorySelection(Rect rect, int width)
+

+
+
+

+Inherited from UIContainer + +

+

+
+
+
+
+

+function Label createLabel(var position, string caption, int fontSize)
+

+
+
+

+Inherited from UIContainer + +

+

+
+
+
+
+

+function Line createLine(vec2 a, vec2 b)
+

+
+
+

+Inherited from UIContainer + +

+

+
+
+
+
+

+function ListBox createListBox(Rect rect)
+

+
+
+

+Inherited from UIContainer + +

+

+
+
+
+
+

+function ListBoxEx createListBoxEx(Rect rect)
+

+
+
+

+Inherited from UIContainer + +

+

+
+
+
+
+

+function MapArrowLine createMapArrowLine()
+

+
+
+

+Inherited from UIContainer + +

+

+
+
+
+
+

+function MapIcon createMapIcon(string texture, ivec2 coordinates, Color [or nil] color)
+

+
+
+

+Inherited from UIContainer + +

+

+
+
+
+
+

+function MultiLineTextBox createMultiLineTextBox(Rect rect)
+

+
+
+

+Inherited from UIContainer + +

+

+
+
+
+
+

+function NumbersBar createNumbersBar(Rect rect)
+

+
+
+

+Inherited from UIContainer + +

+

+
+
+
+
+

+function Picture createPicture(Rect rect, string path)
+

+
+
+

+Inherited from UIContainer + +

+

+
+
+
+
+

+function PlanDisplayer createPlanDisplayer(Rect rect)
+

+
+
+

+Inherited from UIContainer + +

+

+
+
+
+
+

+function ProgressBar createProgressBar(Rect rect, Color color)
+

+
+
+

+Inherited from UIContainer + +

+

+
+
+
+
+

+function UIRect createRect(Rect rect, Color color)
+

+
+
+

+Inherited from UIContainer + +

+

+
+
+
+
+

+function Button createRoundButton(Rect rect, string icon, string function)
+

+
+
+

+Inherited from UIContainer + +

+

+
+
+
+
+

+function SavedDesignsSelection createSavedDesignsSelection(Rect rect, int width)
+

+
+
+

+Inherited from UIContainer + +

+

+
+
+
+
+

+function ScrollFrame createScrollFrame(Rect rect)
+

+
+
+

+Inherited from UIContainer + +

+

+
+
+
+
+

+function Selection createSelection(Rect rect, int width)
+

+
+
+

+Inherited from UIContainer + +

+

+
+
+
+
+

+function Slider createSlider(Rect rect, int min, int max, int steps, string caption, string onValueChangedFunction)
+

+
+
+

+Inherited from UIContainer + +

+

+
+
+
+
+

+function StatisticsBar createStatisticsBar(Rect rect, Color color)
+

+
+
+

+Inherited from UIContainer + +

+

+
+
+
+
+

+function TabbedWindow createTabbedWindow(Rect rect)
+

+
+
+

+Inherited from UIContainer + +

+

+
+
+
+
+

+function TextBox createTextBox(Rect rect, string onTextChangedFunction)
+

+
+
+

+Inherited from UIContainer + +

+

+
+
+
+
+

+function TextField createTextField(Rect rect, string text)
+

+
+
+

+Inherited from UIContainer + +

+

+
+
+
+
+

+function TooltipDisplayer createTooltipDisplayer(Rect rect)
+

+
+
+

+Inherited from UIContainer + +

+

+
+
+
+
+

+function Tree createTree(Rect rect)
+

+
+
+

+Inherited from UIContainer + +

+

+
+
+
+
+

+function ValueComboBox createValueComboBox(Rect rect, string onSelectedFunction)
+

+
+
+

+Inherited from UIContainer + +

+

+
+
+
+
+

+function Window createWindow(Rect rect)
+

+
+
+

+Inherited from UIContainer + +

+

+
+
+
+
+

+function var hide()
+

+
+
+

+Inherited from UIElement + +

+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function bool isMouseOverAndUnobscured()
+

+
+
+

+Inherited from UIElement + +

+

+
+
+
+
+

+function var show()
+

+
+
+

+Inherited from UIElement + +

+

Returns

+
+

+nothing +

+
+

+
+
+
+
+
+
+ Overview +
Home + Functions + Search +
+
Search:
+Predefined Functions & Example Scripts +
Command +Entity +FactionDatabase +PlanGenerator +Player +Sector +Server +UsableInventoryItem +
+
+

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

+
+ +
+ + diff --git a/Documentation/Scenario.html b/Documentation/Scenario.html new file mode 100644 index 0000000..4124442 --- /dev/null +++ b/Documentation/Scenario.html @@ -0,0 +1,459 @@ + + + Scenario + + + + +
+
+

Avorion Script API Documentation

+
+
+ +
+
Search:
+
+
+ + + + + + + + + + + + +
+Scenario +Scenario +

Properties
+isClassic +
+isCreative +
+isNormal +
+type +

Member Functions
+
+
+
+

Scenario

+
+
+

+function Scenario()
+

+
+
+

+This is the default constructor of Scenario. No further arguments are required. +

+

Returns

+
+

+A new instance of Scenario +

+
+

+
+
+
+
+ +
property var isClassic[read-only]
+
+
+
+
+ +
property var isCreative[read-only]
+
+
+
+
+ +
property var isNormal[read-only]
+
+
+
+
+ +
property var type[read-only]
+
+
+
+
+
+
+
+
+ Overview +
Home + Functions + Search +
+
Search:
+Predefined Functions & Example Scripts +
Command +Entity +FactionDatabase +PlanGenerator +Player +Sector +Server +UsableInventoryItem +
+
+

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

+
+ +
+ + diff --git a/Documentation/ScriptUI.html b/Documentation/ScriptUI.html new file mode 100644 index 0000000..03fab2c --- /dev/null +++ b/Documentation/ScriptUI.html @@ -0,0 +1,661 @@ + + + ScriptUI + + + + +
+
+

Avorion Script API Documentation

+
+
+ +
+
Search:
+
+
+ + + + + + + + + + + + + + + + + + + + +
+ScriptUI +ScriptUI +

Properties
+entity +
+entityId +

Member Functions
+addDialogOption +
+createWindow +
+interactShowDialog +
+registerInteraction +
+registerWindow +
+restartInteraction +
+showDialog +
+startHailing +
+stopHailing +
+stopInteraction +
+
+
+
+

ScriptUI

+

+This object is only available on the client. +

+
+
+

+function ScriptUI(var id)
+

+
+
+

Parameters

+
+id +The id of the entity this component belongs to, or the entity itself, must be an id of an existing entity or nil for the entity in the current script context
+
+

Returns

+
+

+A new instance of ScriptUI +

+
+

+
+
+
+
+ +
property Entity entity[read-only]
+
+
+
+
+ +
property uuid entityId[read-only]
+
+
+
+
+
+
+

+function int addDialogOption(string text, string function, var priority)
+

+
+
+

+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

+
+text +The text that will be displayed as a chooseable option in the dialog
+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. A dialog table looks like this: local dialog = {text = "What's up?", textItalic = true/false, textColor = "0f0", talker = "Random Merchant", talkerItalic = true/false, talkerColor = "f00", onStart = "onStartFunctionCall", onEnd = "onEndFunctionCall", followUp = anotherDialogTable, answers = {{...}, {...}, {...}, ...}} Most of these table values are optional and will be filled in with default values if not present. The anwers table looks like this: local answers = {{answer = "Not much.", color = "ff0", italic = true/false, onSelect = "onThisAnswerWasSelectedFunction", followUp = dialogFollowingThisAnswer}, {text = "The Sky.", ...}, ...} Most of these table values are optional and will be filled in with default values if not present. You should check the scripts that come with the game for dialogs to get more info on how to structure them. +

+

Parameters

+
+dialog +A table containing the dialog that will be displayed
+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 true.
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var registerInteraction(string caption, string function, var priority)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var registerWindow(Window window, string caption, var priority)
+

+
+
+

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 entity. This will close and override the currently displayed dialog. A dialog table looks like this: local dialog = {text = "What's up?", textItalic = true/false, textColor = "0f0", talker = "Random Merchant", talkerItalic = true/false, talkerColor = "f00", onStart = "onStartFunctionCall", onEnd = "onEndFunctionCall", followUp = anotherDialogTable, answers = {{...}, {...}, {...}, ...}} Most of these table values are optional and will be filled in with default values if not present. The anwers table looks like this: local answers = {{answer = "Not much.", color = "ff0", italic = true/false, onSelect = "onThisAnswerWasSelectedFunction", followUp = dialogFollowingThisAnswer}, {text = "The Sky.", ...}, ...} Most of these table values are optional and will be filled in with default values if not present. You should check the scripts that come with the game for dialogs to get more info on how to structure them. +

+

Parameters

+
+dialog +A table containing the dialog that will be displayed
+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 true.
+
+

+
+
+
+
+

+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

+
+acceptCallback +The callback that will be called in case the player accepts the hail (dialogs should go in here)
+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 +

+
+

+
+
+
+
+
+
+ Overview +
Home + Functions + Search +
+
Search:
+Predefined Functions & Example Scripts +
Command +Entity +FactionDatabase +PlanGenerator +Player +Sector +Server +UsableInventoryItem +
+
+

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

+
+ +
+ + diff --git a/Documentation/ScrollFrame.html b/Documentation/ScrollFrame.html new file mode 100644 index 0000000..a677cde --- /dev/null +++ b/Documentation/ScrollFrame.html @@ -0,0 +1,1457 @@ + + + ScrollFrame + + + + +
+
+

Avorion Script API Documentation

+
+
+ +
+
Search:
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ScrollFrame +ScrollFrame +

Properties
+paddingBottom +
+paddingTop +
+scrollSpeed +
+center +
+height +
+index +
+layer +
+localCenter +
+localPosition +
+localRect +
+lower +
+mouseOver +
+position +
+rect +
+size +
+tooltip +
+tooltipWidth +
+upper +
+visible +
+width +

Member Functions
+scroll +
+clear +
+createAllianceEmblem +
+createArrowLine +
+createButton +
+createCaptainIcon +
+createCaptainProfile +
+createCheckBox +
+createComboBox +
+createContainer +
+createContextMenu +
+createCraftPortrait +
+createCrewBar +
+createFrame +
+createInputWindow +
+createInventorySelection +
+createLabel +
+createLine +
+createListBox +
+createListBoxEx +
+createMapArrowLine +
+createMapIcon +
+createMultiLineTextBox +
+createNumbersBar +
+createPicture +
+createPlanDisplayer +
+createProgressBar +
+createRect +
+createRoundButton +
+createSavedDesignsSelection +
+createScrollFrame +
+createSelection +
+createSlider +
+createStatisticsBar +
+createTabbedWindow +
+createTextBox +
+createTextField +
+createTooltipDisplayer +
+createTree +
+createValueComboBox +
+createWindow +
+hide +
+isMouseOverAndUnobscured +
+show +
+
+
+
+

ScrollFrame : UIContainer

+

+This object is only available on the client. +

+
+
+

+function ScrollFrame(int index)
+

+
+
+

Returns

+
+

+A new instance of ScrollFrame +

+
+

+
+
+
+
+ +
property int paddingBottom[write-only]
+
+
+
+
+ +
property int paddingTop[write-only]
+
+
+
+
+ +
property int scrollSpeed[write-only]
+
+
+
+
+ +
property vec2 center
+
+
+
+
+ +
property float height
+
+
+
+
+ +
property int index[read-only]
+
+
+
+
+ +
property int layer
+
+
+
+
+ +
property vec2 localCenter[read-only]
+
+
+
+
+ +
property vec2 localPosition[read-only]
+
+
+
+
+ +
property Rect localRect[read-only]
+
+
+
+
+ +
property vec2 lower
+
+
+
+
+ +
property bool mouseOver[read-only]
+
+
+
+
+ +
property vec2 position
+
+
+
+
+ +
property Rect rect
+
+
+
+
+ +
property vec2 size
+
+
+
+
+ +
property var tooltip
+
+
+
+
+ +
property int tooltipWidth[write-only]
+
+
+
+
+ +
property vec2 upper
+
+
+
+
+ +
property bool visible
+
+
+
+
+ +
property float width
+
+
+
+
+
+
+

+function var scroll(int numSteps)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var clear()
+

+
+
+

+Inherited from UIContainer + +

+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function AllianceEmblem createAllianceEmblem(Rect rect, int allianceIndex)
+

+
+
+

+Inherited from UIContainer + +

+

+
+
+
+
+

+function ArrowLine createArrowLine()
+

+
+
+

+Inherited from UIContainer + +

+

+
+
+
+
+

+function Button createButton(Rect rect, string caption, string function)
+

+
+
+

+Inherited from UIContainer + +

+

+
+
+
+
+

+function CaptainIcon createCaptainIcon(Rect rect)
+

+
+
+

+Inherited from UIContainer + +

+

+
+
+
+
+

+function CaptainProfile createCaptainProfile(Rect rect)
+

+
+
+

+Inherited from UIContainer + +

+

+
+
+
+
+

+function CheckBox createCheckBox(Rect rect, string caption, string onCheckedFunction)
+

+
+
+

+Inherited from UIContainer + +

+

+
+
+
+
+

+function ComboBox createComboBox(Rect rect, string onSelectedFunction)
+

+
+
+

+Inherited from UIContainer + +

+

+
+
+
+
+

+function UIContainer createContainer(Rect rect)
+

+
+
+

+Inherited from UIContainer + +

+

+
+
+
+
+

+function ContextMenu createContextMenu()
+

+
+
+

+Inherited from UIContainer + +

+

+
+
+
+
+

+function CraftPortrait createCraftPortrait(Rect rect, string function)
+

+
+
+

+Inherited from UIContainer + +

+

+
+
+
+
+

+function CrewBar createCrewBar(Rect rect)
+

+
+
+

+Inherited from UIContainer + +

+

+
+
+
+
+

+function Frame createFrame(Rect rect)
+

+
+
+

+Inherited from UIContainer + +

+

+
+
+
+
+

+function InputWindow createInputWindow()
+

+
+
+

+Inherited from UIContainer + +

+

+
+
+
+
+

+function InventorySelection createInventorySelection(Rect rect, int width)
+

+
+
+

+Inherited from UIContainer + +

+

+
+
+
+
+

+function Label createLabel(var position, string caption, int fontSize)
+

+
+
+

+Inherited from UIContainer + +

+

+
+
+
+
+

+function Line createLine(vec2 a, vec2 b)
+

+
+
+

+Inherited from UIContainer + +

+

+
+
+
+
+

+function ListBox createListBox(Rect rect)
+

+
+
+

+Inherited from UIContainer + +

+

+
+
+
+
+

+function ListBoxEx createListBoxEx(Rect rect)
+

+
+
+

+Inherited from UIContainer + +

+

+
+
+
+
+

+function MapArrowLine createMapArrowLine()
+

+
+
+

+Inherited from UIContainer + +

+

+
+
+
+
+

+function MapIcon createMapIcon(string texture, ivec2 coordinates, Color [or nil] color)
+

+
+
+

+Inherited from UIContainer + +

+

+
+
+
+
+

+function MultiLineTextBox createMultiLineTextBox(Rect rect)
+

+
+
+

+Inherited from UIContainer + +

+

+
+
+
+
+

+function NumbersBar createNumbersBar(Rect rect)
+

+
+
+

+Inherited from UIContainer + +

+

+
+
+
+
+

+function Picture createPicture(Rect rect, string path)
+

+
+
+

+Inherited from UIContainer + +

+

+
+
+
+
+

+function PlanDisplayer createPlanDisplayer(Rect rect)
+

+
+
+

+Inherited from UIContainer + +

+

+
+
+
+
+

+function ProgressBar createProgressBar(Rect rect, Color color)
+

+
+
+

+Inherited from UIContainer + +

+

+
+
+
+
+

+function UIRect createRect(Rect rect, Color color)
+

+
+
+

+Inherited from UIContainer + +

+

+
+
+
+
+

+function Button createRoundButton(Rect rect, string icon, string function)
+

+
+
+

+Inherited from UIContainer + +

+

+
+
+
+
+

+function SavedDesignsSelection createSavedDesignsSelection(Rect rect, int width)
+

+
+
+

+Inherited from UIContainer + +

+

+
+
+
+
+

+function ScrollFrame createScrollFrame(Rect rect)
+

+
+
+

+Inherited from UIContainer + +

+

+
+
+
+
+

+function Selection createSelection(Rect rect, int width)
+

+
+
+

+Inherited from UIContainer + +

+

+
+
+
+
+

+function Slider createSlider(Rect rect, int min, int max, int steps, string caption, string onValueChangedFunction)
+

+
+
+

+Inherited from UIContainer + +

+

+
+
+
+
+

+function StatisticsBar createStatisticsBar(Rect rect, Color color)
+

+
+
+

+Inherited from UIContainer + +

+

+
+
+
+
+

+function TabbedWindow createTabbedWindow(Rect rect)
+

+
+
+

+Inherited from UIContainer + +

+

+
+
+
+
+

+function TextBox createTextBox(Rect rect, string onTextChangedFunction)
+

+
+
+

+Inherited from UIContainer + +

+

+
+
+
+
+

+function TextField createTextField(Rect rect, string text)
+

+
+
+

+Inherited from UIContainer + +

+

+
+
+
+
+

+function TooltipDisplayer createTooltipDisplayer(Rect rect)
+

+
+
+

+Inherited from UIContainer + +

+

+
+
+
+
+

+function Tree createTree(Rect rect)
+

+
+
+

+Inherited from UIContainer + +

+

+
+
+
+
+

+function ValueComboBox createValueComboBox(Rect rect, string onSelectedFunction)
+

+
+
+

+Inherited from UIContainer + +

+

+
+
+
+
+

+function Window createWindow(Rect rect)
+

+
+
+

+Inherited from UIContainer + +

+

+
+
+
+
+

+function var hide()
+

+
+
+

+Inherited from UIElement + +

+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function bool isMouseOverAndUnobscured()
+

+
+
+

+Inherited from UIElement + +

+

+
+
+
+
+

+function var show()
+

+
+
+

+Inherited from UIElement + +

+

Returns

+
+

+nothing +

+
+

+
+
+
+
+
+
+ Overview +
Home + Functions + Search +
+
Search:
+Predefined Functions & Example Scripts +
Command +Entity +FactionDatabase +PlanGenerator +Player +Sector +Server +UsableInventoryItem +
+
+

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

+
+ +
+ + diff --git a/Documentation/Search.html b/Documentation/Search.html new file mode 100644 index 0000000..6a9565a --- /dev/null +++ b/Documentation/Search.html @@ -0,0 +1,393 @@ + + + Search + + + + +
+
+

Avorion Script API Documentation

+
+
+ +
+
+
+
+Search for: +
+
+
+
Initializing search database ...
+
+ + +
+
+
+ Overview +
Home + Functions + Search +
+
Search:
+Predefined Functions & Example Scripts +
Command +Entity +FactionDatabase +PlanGenerator +Player +Sector +Server +UsableInventoryItem +
+
+

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

+
+ +
+ + diff --git a/Documentation/Sector Callbacks.html b/Documentation/Sector Callbacks.html new file mode 100644 index 0000000..cf48eb6 --- /dev/null +++ b/Documentation/Sector Callbacks.html @@ -0,0 +1,2104 @@ + + + Avorion Script Callbacks - Sector + + + + +
+
+

Avorion Script API Documentation

+
+
+ +
+
Search:
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+onAIStateChanged +
+onAllScriptValuesChanged +
+onBlockChanged +
+onBlockDamaged +
+onBlockDestroyed +
+onBlockHealed +
+onBlockPlanChanged +
+onBlocksAdded +
+onBlocksRemove +
+onBlocksRemoved +
+onBoardersDefeated +
+onBoardersLand +
+onBoardingFight +
+onBoardingSuccessful +
+onCargoChanged +
+onCargoLootCollected +
+onCollision +
+onCraftSeatEntered +
+onCraftSeatLeft +
+onCrewChanged +
+onCrewChanged +
+onCrewLootCollected +
+onDamaged +
+onDestroyed +
+onDockedByEntity +
+onEntityCreated +
+onEntityDocked +
+onEntityEntered +
+onEntityJump +
+onEntityRemoved +
+onEntityUndocked +
+onFighterAdded +
+onFighterLanded +
+onFighterRemove +
+onFighterRemoved +
+onFighterStarted +
+onHealed +
+onHullHit +
+onInventoryItemLootCollected +
+onLootCollected +
+onMaterialLootCollected +
+onMoneyLootCollected +
+onPlanModifiedByBuilding +
+onPlayerEntered +
+onPlayerLeft +
+onRestoredFromDisk +
+onScriptAdded +
+onScriptRemoved +
+onScriptValueChanged +
+onSectorGenerated +
+onSetForDeletion +
+onShieldActivate +
+onShieldDamaged +
+onShieldDeactivate +
+onShieldHealed +
+onShieldHit +
+onShotCreated +
+onShotFired +
+onShotHit +
+onSquadAdded +
+onSquadOrdersChanged +
+onSquadRemove +
+onSquadRemoved +
+onStartFiring +
+onStopFiring +
+onSystemsChanged +
+onSystemUpgradeLootCollected +
+onTorpedoHit +
+onTorpedoHullHit +
+onTorpedoLaunched +
+onTorpedoShieldHit +
+onTurretAdded +
+onTurretDestroyed +
+onTurretLootCollected +
+onTurretRemoved +
+onTurretRemovedByPlayer +
+onUndockedFromEntity +
+
+
+
+

Sector Callbacks

+

+Note: Callbacks have to be buffered in certain situations and won't happen immediately. When unregistering a callback during a callback, all callbacks that were buffered during the last frame may still be sent, even though they were unregistered. +

+
+

+callback onAIStateChanged(entityId, state)
+

+
+

+Executed whenever the AI state of an entity changes +

+

Parameters

+
+entityId +The id of the entity
+state +The id of the new state
+
+

+
+
+
+

+callback onAllScriptValuesChanged(entityId)
+

+
+

+Executed whenever all scripts values of an entity in the sector have been changed at once +

+

Parameters

+
+entityId +The id of the entity
+
+

+
+
+
+

+callback onBlockChanged(objectIndex, blockIndex, changeFlags)
+

+
+

+Executed whenever a plan of an entity is changed in the sector. +

+

Parameters

+
+objectIndex +The id of the entity
+blockIndex +The index of the block
+changeFlags +The flags of the block changes
+
+

+
+
+
+

+callback onBlockDamaged(objectIndex, blockIndex, inflictorId, damage, damageType)
+

+
+

+Executed whenever a block object is damaged in the sector. This callback is executed after the damage is dealt to the block. Don't remove the block in this callback, this will lead to a crash. +

+

Parameters

+
+objectIndex +The index of the damaged object
+blockIndex +The index of the damaged block
+inflictorId +The id of the entity that inflicted the damage
+damage +The damage that was inflicted to the entity
+damageType +The type of damage
+
+

+
+
+
+

+callback onBlockDestroyed(objectIndex, index, block, lastDamageInflictor, damageSource)
+

+
+

+Executed whenever a block of a block object got destroyed This callback is executed *after* the block was destroyed +

+

Parameters

+
+objectIndex +The id of the entity
+index +Index of the block
+block +The block (as removed from the plan)
+lastDamageInflictor +The index of the last entity that inflicted damage to the destroyed block
+damageSource +The source of damage
+
+

+
+
+
+

+callback onBlockHealed(objectIndex, blockIndex, damage)
+

+
+

+Executed whenever a block of an object is healed in the sector. Don't remove the block in this callback, this will lead to a crash. +

+

Parameters

+
+objectIndex +The index of the healed object
+blockIndex +The index of the healed block
+damage +The damage the entity was healed for
+
+

+
+
+
+

+callback onBlockPlanChanged(objectIndex, allBlocksChanged)
+

+
+

+Executed whenever a plan of an entity is changed in the sector. +

+

Parameters

+
+objectIndex +The id of the entity
+allBlocksChanged +A boolean that indicates whether all the blocks in the block plan have potentially changed
+
+

+
+
+
+

+callback onBlocksAdded(objectIndex, wasRepaired, blockIndices)
+

+
+

+Executed whenever new blocks are added to the entity. This callback is executed after the block was added. +

+

Parameters

+
+objectIndex +The id of the entity
+wasRepaired +true if the callback was fired because of a repair operation, false otherwise
+blockIndices +The indices of the added blocks, as variable arguments list
+
+

+
+
+
+

+callback onBlocksRemove(objectIndex, blockIndices)
+

+
+

+Executed whenever a block will be removed from the plan by building (instead of combat). This callback is executed before the block is removed. IMPORTANT! This only fires on blocks that the player directly chose to be removed. Blocks that get removed because they don't have a connection to the root block any more get signalled after removal by 'onBlocksRemoved'. +

+

Parameters

+
+objectIndex +The id of the entity
+blockIndices +The indices of the removed blocks, as variable arguments list
+
+

+
+
+
+

+callback onBlocksRemoved(objectIndex, blockIndices)
+

+
+

+Executed whenever a block is removed from the plan by building (instead of combat). This callback is executed after the block is removed. +

+

Parameters

+
+objectIndex +The id of the entity
+blockIndices +The indices of the removed blocks, as variable arguments list
+
+

+
+
+
+

+callback onBoardersDefeated(entityId, attackingFaction)
+

+
+

+Executed whenever all boarders were defeated +

+

Parameters

+
+entityId +The id of the entity
+attackingFaction +The index of the attacking faction
+
+

+
+
+
+

+callback onBoardersLand(entityId, attackingFaction, firstLanding)
+

+
+

+Executed when boarders land on an entity +

+

Parameters

+
+entityId +The id of the entity
+attackingFaction +The index of the attacking faction
+firstLanding +True if these are the first boarders, false otherwise
+
+

+
+
+
+

+callback onBoardingFight(entityId, attackingFaction)
+

+
+

+Executed on every round of fighting with boarders +

+

Parameters

+
+entityId +The id of the entity
+attackingFaction +The index of the attacking faction
+
+

+
+
+
+

+callback onBoardingSuccessful(entityId, oldFactionIndex, newFactionIndex)
+

+
+

+Executed whenever an entity was boarded successfully +

+

Parameters

+
+entityId +The id of the entity
+oldFactionIndex +The index of the faction that owned the entity before boarding
+newFactionIndex +The index of the attacking faction that now owns the entity
+
+

+
+
+
+

+callback onCargoChanged(objectIndex, delta, good)
+

+
+

+Executed whenever the cargo of an entity in the sector changes. This callback is executed *after* the cargo was changed on the entity. +

+

Parameters

+
+objectIndex +The id of the entity
+delta +The amount of cargo that changed
+good +The good that changed
+
+

+
+
+
+

+callback onCargoLootCollected(collector, lootIndex, amount, good, owner)
+

+
+

+Executed whenever trading good loot gets collected by a player +

+

Parameters

+
+collector +The id of the entity that collected loot
+lootIndex +The index of the collected loot
+amount +The amount of goods that were collected
+good +The good that was inside the loot entity
+owner +The original owner of the cargo
+
+

+
+
+
+

+callback onCollision(objectIndexA, objectIndexB, damageA, damageB, steererA, steererB)
+

+
+

+Executed whenever two block objects collided in the sector +

+

Parameters

+
+objectIndexA +The index of the one colliding object
+objectIndexB +The index of the other colliding object
+damageA +The damage that is inflicted to object A
+damageB +The damage that is inflicted to object B
+steererA +The steerer ID of objectA. When an object is docked, not the object itself but the steerer is the one responsible for collisions
+steererB +The steerer ID of objectB. When an object is docked, not the object itself but the steerer is the one responsible for collisions
+
+

+
+
+
+

+callback onCraftSeatEntered(entityId, seat, playerIndex, firstPlayer)
+

+
+

+Executed whenever a player enters a craft +

+

Parameters

+
+entityId +The id of the entity
+seat +The seat index
+playerIndex +The index of the player that entered the seat
+firstPlayer +A bool indicating whether the craft's seats were empty before
+
+

+
+
+
+

+callback onCraftSeatLeft(entityId, seat, playerIndex, playersRemaining)
+

+
+

+Executed whenever a player leaves a craft +

+

Parameters

+
+entityId +The id of the entity
+seat +The seat index that was previously occupied
+playerIndex +The index of the player that left the seat
+playersRemaining +A bool indicating whether there are still players on the craft
+
+

+
+
+
+

+callback onCrewChanged(index)
+

+
+

+Executed whenever the crew of a entity in the sector changes. This callback is executed *after* the crew was changed on the entity. +

+

Parameters

+
+index +The id of the entity
+
+

+
+
+
+

+callback onCrewChanged(index, delta, profession)
+

+
+

+Executed whenever the crew of an entity in the sector changes. This callback is executed *after* the crew was changed on the entity. +

+

Parameters

+
+index +The id of the entity
+delta +The amount of crewmen that changed
+profession +The profession of the crew that changed
+
+

+
+
+
+

+callback onCrewLootCollected(collector, lootIndex)
+

+
+

+Executed whenever trading good loot gets collected by a player +

+

Parameters

+
+collector +The id of the entity that collected loot
+lootIndex +The index of the collected loot
+
+

+
+
+
+

+callback onDamaged(objectIndex, amount, inflictor, damageSource, damageType)
+

+
+

+Executed whenever an entity is damaged in the sector. +

+

Parameters

+
+objectIndex +The index of the damaged object
+amount +The amount of damage that was dealt
+inflictor +The id of the entity that dealt the damage
+damageSource +The source of damage
+damageType +The type of damage
+
+

+
+
+
+

+callback onDestroyed(index, lastDamageInflictor)
+

+
+

+Executed whenever an entity with durability was destroyed in the sector +

+

Parameters

+
+index +The id of the entity that was destroyed
+lastDamageInflictor +The index of the last entity that inflicted damage to the destroyed entity
+
+

+
+
+
+

+callback onDockedByEntity(dockeeId, dockerId)
+

+
+

+Executed whenever an entity was docked to another entity +

+

Parameters

+
+dockeeId +The id of the entity that was docked (child)
+dockerId +The id of the docking entity (parent)
+
+

+
+
+
+

+callback onEntityCreated(entityId)
+

+
+

+Executed whenever a new entity is created in the sector +

+

Parameters

+
+entityId +The index of the new entity
+
+

+
+
+
+

+callback onEntityDocked(dockerId, dockeeId)
+

+
+

+Executed whenever an entity docks to another entity +

+

Parameters

+
+dockerId +The id of the docking entity (parent)
+dockeeId +The id of the entity that was docked (child)
+
+

+
+
+
+

+callback onEntityEntered(shipIndex)
+

+
+

+Executed whenever a entity enters the sector. +

+

Parameters

+
+shipIndex +The index of the entity that entered the sector
+
+

+
+
+
+

+callback onEntityJump(shipId, x, y, sectorChangeType)
+

+
+

+Executed whenever a entity jumps into another sector. +

+

Parameters

+
+shipId +The id of the entity that will jump out of the sector
+x +The x coordinate of the target sector
+y +The y coordinate of the target sector
+sectorChangeType +SectorChangeType enum what kind of sector change it is
+
+

+
+
+
+

+callback onEntityRemoved(entityId)
+

+
+

+Executed whenever an entity was removed from the sector +

+

Parameters

+
+entityId +The index of the entity that was removed
+
+

+
+
+
+

+callback onEntityUndocked(dockerId, dockeeId)
+

+
+

+Executed whenever an entity undocks from another entity +

+

Parameters

+
+dockerId +The id of the docking entity (parent)
+dockeeId +The id of the entity that was docked (child)
+
+

+
+
+
+

+callback onFighterAdded(entityId, squadIndex, fighterIndex, landed)
+

+
+

+Executed whenever a fighter is added to an entity in the sector +

+

Parameters

+
+entityId +The id of the entity
+squadIndex +The index of the squad
+fighterIndex +The index of the fighter in the squad
+landed +A boolean whether the fighter landed or got added otherwise
+
+

+
+
+
+

+callback onFighterLanded(entityId, squadIndex, fighterId)
+

+
+

+Executed whenever a fighter lands in a hangar in the sector +

+

Parameters

+
+entityId +The id of the entity the fighter landed on
+squadIndex +The index of the squad
+fighterId +The id of the fighter that landed
+
+

+
+
+
+

+callback onFighterRemove(entityId, squadIndex, fighterIndex, started)
+

+
+

+Executed whenever a fighter is removed from an entity in the sector, before it gets removed +

+

Parameters

+
+entityId +The id of the entity
+squadIndex +The index of the squad
+fighterIndex +The index of the fighter in the squad
+started +A boolean whether the fighter started or got removed otherwise
+
+

+
+
+
+

+callback onFighterRemoved(entityId, squadIndex, fighterIndex, started)
+

+
+

+Executed whenever a fighter is removed from an entity in the sector, after it got removed +

+

Parameters

+
+entityId +The id of the entity
+squadIndex +The index of the squad
+fighterIndex +The index of the fighter in the squad
+started +A boolean whether the fighter started or got removed otherwise
+
+

+
+
+
+

+callback onFighterStarted(entityId, squadIndex, fighterId)
+

+
+

+Executed whenever a fighter starts from a hangar in the sector +

+

Parameters

+
+entityId +The id of the entity the fighter started from
+squadIndex +The index of the squad
+fighterId +The id of the fighter that started
+
+

+
+
+
+

+callback onHealed(objectIndex, amount, inflictor)
+

+
+

+Executed whenever an entity is healed in the sector. +

+

Parameters

+
+objectIndex +The index of the damaged entity
+amount +The amount of damage that was healed
+inflictor +The id of the entity that dealt the damage
+
+

+
+
+
+

+callback onHullHit(objectIndex, blockIndex, shooterIndex, damage, location)
+

+
+

+Executed whenever a block object is hit by a shot in the sector. Don't delete the block that is hit by the shot, this will lead to a crash. +

+

Parameters

+
+objectIndex +The index of the object that got shot at
+blockIndex +The index of the block that was hit by the shot
+shooterIndex +The index of the craft that fired the shot
+damage +The damage the shot dealt to the object
+location +The impact location
+
+

+
+
+
+

+callback onInventoryItemLootCollected(collector, lootIndex)
+

+
+

+Executed whenever inventory item loot gets collected by an entity +

+

Parameters

+
+collector +The id of the entity which collected the loot
+lootIndex +The index of the loot that was collected
+
+

+
+
+
+

+callback onLootCollected(collector, lootIndex)
+

+
+

+Executed whenever loot gets collected by anyone, be it player or AI faction +

+

Parameters

+
+collector +The id of the entity which collected the loot
+lootIndex +The index of the collected loot
+
+

+
+
+
+

+callback onMaterialLootCollected(collector, lootIndex, materialType, value)
+

+
+

+Executed whenever material loot gets collected by an entity +

+

Parameters

+
+collector +The id of the entity which collected the loot
+lootIndex +The index of the loot that was collected
+materialType +The type of material contained in the loot
+value +The amount of material the loot contained
+
+

+
+
+
+

+callback onMoneyLootCollected(collector, lootIndex, value)
+

+
+

+Executed whenever money loot gets collected by an entity +

+

Parameters

+
+collector +The id of the entity which collected the loot
+lootIndex +The index of the collected loot
+value +The amount of credits the loot contained
+
+

+
+
+
+

+callback onPlanModifiedByBuilding(shipIndex)
+

+
+

+Executed whenever the plan of an entity was modified by building, meaning adding or removing blocks. +

+

Parameters

+
+shipIndex +The index of the ship
+
+

+
+
+
+

+callback onPlayerEntered(playerIndex, sectorChangeType)
+

+
+

+Executed whenever a player enters the sector. This callback is executed immediately before the contents of the sector are sent to the player +

+

Parameters

+
+playerIndex +Index of the player
+sectorChangeType +The kind of sector change that is happening
+
+

+
+
+
+

+callback onPlayerLeft(playerIndex, sectorChangeType)
+

+
+

+Executed whenever a player leaves the sector. Executed after the player left. +

+

Parameters

+
+playerIndex +Index of the player
+sectorChangeType +The kind of sector change that is happening
+
+

+
+
+
+

+callback onRestoredFromDisk(time)
+

+
+

+Executed when a sector is loaded/restored from disk. This callback is called after the "restore" callback, for both entity and sector scripts. +

+

Parameters

+
+time +The time since the sector has been last updated. This value can be 0 or too small after database corruptions.
+
+

+
+
+
+

+callback onScriptAdded(entityId, scriptIndex, scriptPath)
+

+
+

+Executed after a script was added to an entity in the sector +

+

Parameters

+
+entityId +The id of the entity
+scriptIndex +The index of the new script
+scriptPath +The path of the new script
+
+

+
+
+
+

+callback onScriptRemoved(entityId, oldScriptIndex, scriptPath)
+

+
+

+Executed after a script was removed from an entity in the sector +

+

Parameters

+
+entityId +The id of the entity
+oldScriptIndex +The old index of the script that was removed
+scriptPath +The path of the old script
+
+

+
+
+
+

+callback onScriptValueChanged(entityId, name, value)
+

+
+

+Executed whenever a script value of an entity in the sector was changed +

+

Parameters

+
+entityId +The id of the entity
+name +The name of the value
+value +The new value
+
+

+
+
+
+

+callback onSectorGenerated(time)
+

+
+

+Executed when a sector is generated/created for the first time for both entity and sector scripts. +

+

Parameters

+
+time +The time the game has been running already. This value can be 0 or too small after database corruptions.
+
+

+
+
+
+

+callback onSetForDeletion(entityId, deletionType)
+

+
+

+Executed whenever an entity is to be deleted. +

+

Parameters

+
+entityId +The index of the entity that is to be deleted
+deletionType +The deletion type
+
+

+
+
+
+

+callback onShieldActivate(entityId)
+

+
+

+Executed whenever a shield activates in the sector +

+

Parameters

+
+entityId +The id of the entity
+
+

+
+
+
+

+callback onShieldDamaged(entityId, amount, damageType, inflictorId)
+

+
+

+Executed whenever a shield is damaged in the sector +

+

Parameters

+
+entityId +The id of the entity
+amount +The amount of damage inflicted
+damageType +The type of damage dealt
+inflictorId +The id of the entity that inflicted the damage
+
+

+
+
+
+

+callback onShieldDeactivate(entityId)
+

+
+

+Executed whenever a shield deactivates in the sector +

+

Parameters

+
+entityId +The id of the entity
+
+

+
+
+
+

+callback onShieldHealed(entityId, amount)
+

+
+

+Executed whenever a shield is healed in the sector +

+

Parameters

+
+entityId +The id of the entity
+amount +The amount of damage healed
+
+

+
+
+
+

+callback onShieldHit(objectIndex, shooterIndex, damage, location)
+

+
+

+Executed whenever an object's shield is hit by a shot in the sector. +

+

Parameters

+
+objectIndex +The index of the object that got shot at
+shooterIndex +The index of the craft that fired the shot
+damage +The damage the shot dealt to the object
+location +The impact location
+
+

+
+
+
+

+callback onShotCreated(shotIndex)
+

+
+

+Executed whenever a new shot is created in the sector +

+

Parameters

+
+shotIndex +The index of the new shot
+
+

+
+
+
+

+callback onShotFired(entityId)
+

+
+

+Executed whenever a shot is fired in the sector +

+

Parameters

+
+entityId +The index of the firing entity (weapon)
+
+

+
+
+
+

+callback onShotHit(objectIndex, shooterIndex, location)
+

+
+

+Executed whenever a block object is hit by a shot in the sector. +

+

Parameters

+
+objectIndex +The index of the object that got shot at
+shooterIndex +The index of the craft that fired the shot
+location +The impact location
+
+

+
+
+
+

+callback onSquadAdded(entityId, index)
+

+
+

+Executed whenever a squad is added to an entity in the sector +

+

Parameters

+
+entityId +The id of the entity
+index +The index of the squad
+
+

+
+
+
+

+callback onSquadOrdersChanged(entityId, squadIndex, orders, targetId)
+

+
+

+Executed whenever the orders of a squad change in the sector +

+

Parameters

+
+entityId +The id of the entity
+squadIndex +The index of the squad
+orders +The orders of the squad
+targetId +The target assigned to the fighters
+
+

+
+
+
+

+callback onSquadRemove(entityId, index)
+

+
+

+Executed whenever a squad is removed from an entity in the sector, before the squad gets removed +

+

Parameters

+
+entityId +The id of the entity
+index +The index of the squad
+
+

+
+
+
+

+callback onSquadRemoved(entityId, index)
+

+
+

+Executed whenever a squad is removed from an entity in the sector, after the squad got removed +

+

Parameters

+
+entityId +The id of the entity
+index +The index of the squad
+
+

+
+
+
+

+callback onStartFiring(entityId)
+

+
+

+Executed whenever an entity starts firing in the sector +

+

Parameters

+
+entityId +The index of the firing entity (weapon)
+
+

+
+
+
+

+callback onStopFiring(entityId)
+

+
+

+Executed whenever an entity stops firing in the sector +

+

Parameters

+
+entityId +The index of the firing entity (weapon)
+
+

+
+
+
+

+callback onSystemsChanged(shipIndex)
+

+
+

+Executed whenever the systems of a ship in the sector changed. This callback is executed *after* the system was changed on the entity. +

+

Parameters

+
+shipIndex +The index of the ship
+
+

+
+
+
+

+callback onSystemUpgradeLootCollected(collector, lootIndex)
+

+
+

+Executed whenever system upgrade loot gets collected by an entity +

+

Parameters

+
+collector +The id of the entity which collected the loot
+lootIndex +The index of the loot that was collected
+
+

+
+
+
+

+callback onTorpedoHit(objectIndex, shooterIndex, torpedoIndex)
+

+
+

+Executed whenever a block object is hit by a torpedo in the sector. +

+

Parameters

+
+objectIndex +The index of the object that got shot at
+shooterIndex +The index of the craft that fired the torpedo
+torpedoIndex +The index of the torpedo that hit the object
+
+

+
+
+
+

+callback onTorpedoHullHit(objectIndex, blockIndex, shooterIndex, damage, torpedoIndex)
+

+
+

+Executed whenever a block object is hit by a torpedo in the sector. Don't delete the block that is hit by the torpedo, this will lead to a crash. +

+

Parameters

+
+objectIndex +The index of the object that got shot at
+blockIndex +The index of the block that was hit by the torpedo
+shooterIndex +The index of the craft that fired the torpedo
+damage +The damage the torpedo dealt to the object
+torpedoIndex +The index of the torpedo that hit the object
+
+

+
+
+
+

+callback onTorpedoLaunched(entityId, torpedoId)
+

+
+

+Executed whenever a torpedo was launched from an entity +

+

Parameters

+
+entityId +The id of the entity
+torpedoId +The id of the launched torpedo
+
+

+
+
+
+

+callback onTorpedoShieldHit(objectIndex, shooterIndex, damage, torpedoIndex)
+

+
+

+Executed whenever an object's shield is hit by a torpedo in the sector. +

+

Parameters

+
+objectIndex +The index of the object that got shot at
+shooterIndex +The index of the craft that fired the torpedo
+damage +The damage the torpedo dealt to the object
+torpedoIndex +The index of the torpedo that hit the object
+
+

+
+
+
+

+callback onTurretAdded(shipIndex, turretIndex)
+

+
+

+Executed whenever a turret was added to a ship in the sector +

+

Parameters

+
+shipIndex +The id of the entity that turret was attached to
+turretIndex +The index of the turret
+
+

+
+
+
+

+callback onTurretDestroyed(turretIndex, shipIndex, lastDamageInflictor)
+

+
+

+Executed whenever a turret was destroyed in the sector +

+

Parameters

+
+turretIndex +The index of the turret that was destroyed
+shipIndex +The id of the entity that turret was attached to
+lastDamageInflictor +The index of the last entity that inflicted damage to the destroyed entity
+
+

+
+
+
+

+callback onTurretLootCollected(collector, lootIndex)
+

+
+

+Executed whenever turret loot gets collected by an entity controlled by AI +

+

Parameters

+
+collector +The id of the entity which collected the loot
+lootIndex +The index of the collected loot
+
+

+
+
+
+

+callback onTurretRemoved(shipIndex, turretIndex)
+

+
+

+Executed whenever a turret was removed in the sector +

+

Parameters

+
+shipIndex +The id of the entity that turret was attached to
+turretIndex +The index of the turret
+
+

+
+
+
+

+callback onTurretRemovedByPlayer(shipIndex, turretIndex)
+

+
+

+Executed whenever a turret was removed from a ship by the player in the sector +

+

Parameters

+
+shipIndex +The id of the entity that turret was attached to
+turretIndex +The index of the turret
+
+

+
+
+
+

+callback onUndockedFromEntity(dockeeId, dockerId)
+

+
+

+Executed whenever an entity was undocked from another entity +

+

Parameters

+
+dockeeId +The id of the entity that was docked (child)
+dockerId +The id of the docking entity (parent)
+
+

+
+
+
+
+
+
+ Overview +
Home + Functions + Search +
+
Search:
+Predefined Functions & Example Scripts +
Command +Entity +FactionDatabase +PlanGenerator +Player +Sector +Server +UsableInventoryItem +
+
+

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

+
+ +
+ + diff --git a/Documentation/Sector [Client].html b/Documentation/Sector [Client].html new file mode 100644 index 0000000..8f9d401 --- /dev/null +++ b/Documentation/Sector [Client].html @@ -0,0 +1,1424 @@ + + + Sector [Client] + + + + +
+
+

Avorion Script API Documentation

+
+
+ +
+
Search:
+ +
+

Sector [Client]

+

+This object is only available on the client. +

+
+
+

+function Sector()
+

+
+
+

Returns

+
+

+A new instance of Sector +

+
+

+
+
+
+
+ +
property string name
+
+Get the name of the sector, as specified by its SectorSpecifics +
+
+
+ +
property Seed seed[read-only]
+
+
+
+
+
+
+

+function var addInertiaFieldGlow(var id)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var addStaticHyperspaceGlow(var id)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function int callbacksRegistered(string callbackName, var functionName)
+

+
+
+

+Check how many functions are registered to a callback from the current script VM. +

+

Parameters

+
+callbackName +The name of the callback
+functionName +The name of the function for which to check. If nil, will count all functions that are registered to this callback.
+
+

Returns

+
+

+The amount of functions registered to the callback +

+
+

+
+
+
+
+

+function var createDust(vec3 pos, float size, Color color, float lifeSpan)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var createDustExplosion(vec3 pos, float size, Color color)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var createExplosion(vec3 pos, float size, bool silent)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var createGlow(vec3 pos, float size, Color color)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function GlowFX createGlowBox(Box box)
+

+
+
+

+
+
+
+
+

+function var createGlows(vec3... positions, float size, Color color)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function GlowFX createGlowSphere(float radius, ivec2 resolution)
+

+
+
+

+
+
+
+
+

+function var createHyperspaceEnteringGlowAnimation(Entity entity)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var createHyperspaceJumpAnimation(Entity entity, vec3 [or nil] direction, Color [or nil] color, var intensity)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function LaserFX createLaser(vec3 from, vec3 to, Color color, float width)
+

+
+
+

+
+
+
+
+

+function RefractionFX createRefractionBox(Box box)
+

+
+
+

+
+
+
+
+

+function RefractionFX createRefractionSphere(float radius, ivec2 resolution)
+

+
+
+

+
+
+
+
+

+function var createShockwave(vec3 pos, float size, float duration, vec3 color)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var createSpark(vec3 pos, vec3 v, float size, float aliveTime, Color color, float slowDownFactor, Entity [or nil] entity, var texture)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function Entity... getAllies(int factionIndex)
+

+
+
+

+Returns all allies of the given faction in the sector. Allies include ships of the same faction. Allied entities are determined as follows:
- they belong to the same faction
- they belong to factions whose relations are above 70.000
- they belong to players of the same group
- they belong to players of the same alliance
- they belong to a player and their alliance
+

+

Parameters

+
+factionIndex +The faction index of the faction whose ally ships are to be queried
+
+

Returns

+
+

+Multiple values: All detected allies in the sector +

+
+

+
+
+
+
+

+function int, int getCoordinates()
+

+
+
+

+
+
+
+
+

+function Entity... getEnemies(int factionIndex)
+

+
+
+

+Returns all enemies of the given faction in the sector. Enemies are determined as ships of factions where relations are below -40.000 +

+

Parameters

+
+factionIndex +The faction index of the faction whose enemy ships are to be queried
+
+

Returns

+
+

+Multiple return values: All detected enemies in the sector +

+
+

+
+
+
+
+

+function Entity... getEntities()
+

+
+
+

+
+
+
+
+

+function Entity... getEntitiesByComponent(int component)
+

+
+
+

+
+
+
+
+

+function Entity... getEntitiesByComponents(Type... types)
+

+
+
+

+Returns all entities in the sector that have a specific set of components +

+

Parameters

+
+types +The desired set of component types (See enum ComponentType)
+
+

Returns

+
+

+Multiple return values: All matching entities in the sector +

+
+

+
+
+
+
+

+function Entity... getEntitiesByFaction(int factionIndex)
+

+
+
+

+
+
+
+
+

+function Entity... getEntitiesByLocation(Sphere sphere)
+

+
+
+

+
+
+
+
+

+function Entity... getEntitiesByScript(string scriptName)
+

+
+
+

+
+
+
+
+

+function Entity... getEntitiesByScriptValue(string name, var value)
+

+
+
+

+Returns all entities in the sector that have a specific value assigned to them. Values can be set with Entity:setValue(name, value) and read with Entity:getValue(name). +

+

Parameters

+
+name +The value name to check for
+value +A value to check against. If this is set, only entities will be returned whose value is equal to the passed value. If this is nil, all entities will be returned that have any value with the given name assigned.
+
+

Returns

+
+

+Multiple return values: All matching entities in the sector +

+
+

+
+
+
+
+

+function Entity... getEntitiesByType(int type)
+

+
+
+

+
+
+
+
+

+function Entity getEntity(var id)
+

+
+
+

+
+
+
+
+

+function Entity getEntityByFactionAndName(int factionIndex, string name)
+

+
+
+

+
+
+
+
+

+function unsigned int getNumAllies(int faction)
+

+
+
+

+
+
+
+
+

+function unsigned int getNumEnemies(int factionIndex)
+

+
+
+

+
+
+
+
+

+function unsigned int getNumEntities()
+

+
+
+

+
+
+
+
+

+function unsigned int getNumEntitiesByComponent(int component)
+

+
+
+

+
+
+
+
+

+function unsigned int getNumEntitiesByComponents()
+

+
+
+

+
+
+
+
+

+function unsigned int getNumEntitiesByFaction(int factionIndex)
+

+
+
+

+
+
+
+
+

+function unsigned int getNumEntitiesByLocation(Sphere sphere)
+

+
+
+

+
+
+
+
+

+function unsigned int getNumEntitiesByScript(string scriptName)
+

+
+
+

+
+
+
+
+

+function unsigned int getNumEntitiesByType(int type)
+

+
+
+

+
+
+
+
+

+function int... getPresentFactions()
+

+
+
+

+Returns all indices of all present factions +

+

Returns

+
+

+a list of int indices of all present factions +

+
+

+
+
+
+
+

+function var getValue(string name)
+

+
+
+

+
+
+
+
+

+function UserObject... intersectBeamRay(Ray ray, Uuid [or nil] ignoredEntity, Uuid [or nil] ignoredEntityShields)
+

+
+
+

+Intersects a beam in the sector, similar to the way that weapon beams are intersected. If an entity has a shield, that shield will be part of the test. If the beam would intersect with multiple entities, then the entity with its intersection point closest to the ray origin is chosen. +

+

Parameters

+
+ray +The ray that should be intersected
+ignoredEntity +A uuid that can be optionally set. If this was set, the entity with this ID will be ignored during the intersection.
+ignoredEntityShields +A uuid that can be optionally set. If this was set, the shields of the entity with this ID will be ignored during the intersection.
+
+

Returns

+
+

+The entity closest to the origin of the ray, that was hit (if one or more were hit), as well as the point where the ray intersects with the object (or its shield). +

+
+

+
+
+
+
+

+function var... invokeFunction(var scriptName, string functionName, var... arguments)
+

+
+
+

+Invokes a function in a script of the sector. Use this function to invoke functions from one script in another script. The first return value of the function is an integer indicating whether or not the call was successful. When it was, this integer is followed by the return values of the invoked function. +

+

Parameters

+
+scriptName +The name or index of the script containing the function
+functionName +The name of the function that will be executed
+arguments +An arbitrary list of arguments that will be given to the invoked function
+
+

Returns

+
+

+Returns at least 1 value indicating if the call succeeded:
0 The call was successful. In this case, the return values of the script are returned in addition to the call result, following the call result.
3 The call failed because the given script was not found
4 The call failed because the given function was not found in the script
5 The call failed because the script's state has errors and is invalid
+

+
+

+
+
+
+
+

+function int registerCallback(string callbackName, string functionName)
+

+
+
+

+Register a callback in the sector. The callback receiver has to be inside the sector for the registration to succeed. The callback will be removed if the receiver leaves the sector or gets destroyed, or when a hyperspace jump happens. Double registration of callbacks doesn't work. When the same callback to the same callback of the same script instance is registered twice, it will still only be called once. +

+

Parameters

+
+callbackName +The name of the callback
+functionName +The name of the function that will be executed in the script when the callback happens
+
+

Returns

+
+

+0 on success, 1 if the registration failed +

+
+

+
+
+
+
+

+function var removeGlowObject(GlowFX object)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var removeInertiaFieldGlow(var id)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var removeLaser(LaserFX laser)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var removeRefractionObject(RefractionFX object)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var removeStaticHyperspaceGlow(var id)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var resetFog()
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var sendCallback()
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var setFogColor(Color color)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var setFogColorFactor(float in)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var setFogDensity(float in)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var unregisterCallback(string callbackName, string functionName)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+
+
+ Overview +
Home + Functions + Search +
+
Search:
+Predefined Functions & Example Scripts +
Command +Entity +FactionDatabase +PlanGenerator +Player +Sector +Server +UsableInventoryItem +
+
+

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

+
+ +
+ + diff --git a/Documentation/Sector [Server].html b/Documentation/Sector [Server].html new file mode 100644 index 0000000..fc80e1d --- /dev/null +++ b/Documentation/Sector [Server].html @@ -0,0 +1,2024 @@ + + + Sector [Server] + + + + +
+
+

Avorion Script API Documentation

+
+
+ +
+
Search:
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Sector [Server] +Sector +

Properties
+name +
+numEntities +
+numPlayers +
+persistent +
+pvpDamage +
+seed +

Member Functions
+addScript +
+addScriptOnce +
+belongsToFaction +
+broadcastChatMessage +
+callbacksRegistered +
+clearTickLengthAnalysisQueue +
+clearValues +
+collectGarbage +
+copyEntity +
+createAsteroid +
+createEntity +
+createObject +
+createShip +
+createStation +
+createWormHole +
+createWreckage +
+deleteEntity +
+deleteEntityJumped +
+dropBundle +
+dropCargo +
+dropMoney +
+dropResources +
+dropSectorTurret +
+dropTurret +
+dropUpgrade +
+dropUsableItem +
+dropVanillaItem +
+exists +
+getAllies +
+getCoordinates +
+getEnemies +
+getEntities +
+getEntitiesByComponent +
+getEntitiesByComponents +
+getEntitiesByFaction +
+getEntitiesByLocation +
+getEntitiesByScript +
+getEntitiesByScriptValue +
+getEntitiesByType +
+getEntity +
+getEntityByFactionAndName +
+getNumAllies +
+getNumEnemies +
+getNumEntities +
+getNumEntitiesByComponent +
+getNumEntitiesByComponents +
+getNumEntitiesByFaction +
+getNumEntitiesByLocation +
+getNumEntitiesByScript +
+getNumEntitiesByScriptValue +
+getNumEntitiesByType +
+getPlayers +
+getPresentFactions +
+getScripts +
+getValue +
+getValues +
+hasEnemies +
+hasScript +
+intersectBeamRay +
+invokeFunction +
+isEntitySetForDeletion +
+registerCallback +
+removeScript +
+replaceEntity +
+resendEntity +
+resolveScriptPath +
+sendCallback +
+setValue +
+transferEntity +
+unregisterCallback +
+
+
+
+

Sector [Server]

+

+This object is only available on the server. +

+
+
+

+function Sector()
+

+
+
+

Returns

+
+

+A new instance of Sector +

+
+

+
+
+
+
+ +
property string name
+
+Get the name of the sector, as specified by its SectorSpecifics +
+
+
+ +
property unsigned int numEntities[read-only]
+
+
+
+
+ +
property unsigned int numPlayers[read-only]
+
+
+
+
+ +
property bool persistent
+
+
+
+
+ +
property bool pvpDamage
+
+
+
+
+ +
property Seed seed[read-only]
+
+
+
+
+
+
+

+function int addScript()
+

+
+
+

+
+
+
+
+

+function var addScriptOnce()
+

+
+
+

+
+
+
+
+

+function bool belongsToFaction(int factionIndex, var id)
+

+
+
+

+Returns if the entity with the given id belongs to a specific faction. This is a performance optimization for quick checks of ids versus faction. Use if you have an id that you want to check for its faction, and not the entity. If you already have an Entity constructed, use the factionIndex property of the entity, that's faster than this function. +

+

Parameters

+
+factionIndex +The index of the faction to test
+id +The id of the entity to test
+
+

Returns

+
+

+A boolean indicating if the entity belongs to the faction +

+
+

+
+
+
+
+

+function var broadcastChatMessage(var sender, int messageType, string message, PluralForm... args)
+

+
+
+

+Broadcast a chat message to all players that are currently in the sector. Supports sending of format arguments so that the chat message can be translated on the client. +

+

Parameters

+
+sender +The sender that will be displayed for the chat message
+messageType +The type of chat message, 0 = Normal, 1 = Error, 2 = Warning, 3 = Info
+message +The message that will be sent
+args +The format arguments that will be sent
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function int callbacksRegistered(string callbackName, var functionName)
+

+
+
+

+Check how many functions are registered to a callback from the current script VM. +

+

Parameters

+
+callbackName +The name of the callback
+functionName +The name of the function for which to check. If nil, will count all functions that are registered to this callback.
+
+

Returns

+
+

+The amount of functions registered to the callback +

+
+

+
+
+
+
+

+function var clearTickLengthAnalysisQueue()
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var clearValues()
+

+
+
+

+Removes all custom values of the object +

+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var collectGarbage(var entity)
+

+
+
+

+Immediately deletes all entities in the sector that are set for deletion. Don't call this function from an entity script. Only call this if you know what you're doing. +

+

Parameters

+
+entity +The entity to delete
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function // see copyEntity(Entity entity, Matrix positoin)
+

+
+
+

+Creates a copy of an existing entity +

+

Parameters

+
+entity +The entity to copy
+positoin +The new position of the copy
+
+

Returns

+
+

+The new entity +

+
+

+
+
+
+
+

+function Entity createAsteroid(BlockPlan plan, bool resources, Matrix position)
+

+
+
+

+Convenience function to create an asteroid. Creates a new asteroid in the sector. This entity will have all components required for a default asteroid. +

+

Parameters

+
+plan +The plan of the asteroid, this plan will be empty after the call since the plan is moved (instead of copied) into the created entity
+resources +1 if the asteroid should have mineable resources, 0 if not
+position +The position of the asteroid
+
+

Returns

+
+

+An entity representing the new asteroid +

+
+

+
+
+
+
+

+function Entity createEntity(EntityDescriptor descriptor, var arrivalType)
+

+
+
+

+Creates a new arbitrary entity in the sector +

+

Parameters

+
+descriptor +A descriptor representing the entity to create, this descriptor will be empty after the call since the data is moved (instead of copied) into the created entity
+arrivalType +The arrival type of the ship
+
+

Returns

+
+

+The new entity +

+
+

+
+
+
+
+

+function Entity createObject(BlockPlan plan, Matrix position, var arrivalType)
+

+
+
+

+Convenience function to create a default object. Creates a new default object in the sector. This object has basic components for appearance and physics simulation, such as a plan, velocity and physics +

+

Parameters

+
+plan +The plan of the object, this plan will be empty after the call since the plan is moved (instead of copied) into the created entity
+position +The position of the object
+arrivalType +The arrival type of the ship
+
+

Returns

+
+

+An entity representing the new object +

+
+

+
+
+
+
+

+function Entity createShip(Faction faction, string name, BlockPlan plan, Matrix position, var arrivalType)
+

+
+
+

+Convenience function to create a ship. Creates a new ship in the sector. This entity will have all components required for a default ship. +

+

Parameters

+
+faction +The faction the ship will belong to
+name +The name of the ship, pass "" for a random name; Ships for AIFactions will always get a random name
+plan +The plan of the ship, this plan will be empty after the call since the plan is moved (instead of copied) into the created entity
+position +The position of the ship
+arrivalType +The arrival type of the ship
+
+

Returns

+
+

+An entity representing the new ship +

+
+

+
+
+
+
+

+function Entity createStation(Faction faction, BlockPlan plan, Matrix position, var script, var... args)
+

+
+
+

+Convenience function to create a station. Creates a new station in the sector. A random name will be assigned in case of an AI station. This entity will have all components required for a default station. +

+

Parameters

+
+faction +The faction the station will belong to
+plan +The plan of the station, this plan will be empty after the call since the plan is moved (instead of copied) into the created entity
+position +The position of the station
+script +An optional script that will be used on creation of the station
+args +Arguments to the script that will be passed to its "initialize" function
+
+

Returns

+
+

+An entity representing the new station +

+
+

+
+
+
+
+

+function Entity createWormHole(int x, int y, Color color, float visualSize, var passageSize)
+

+
+
+

+Convenience function to create a wormhole. Creates a new wormhole in the sector. This entity will have all components required for a default wormhole. +

+

Parameters

+
+x +The destination sector's X coordinate
+y +The destination sector's Y coordinate
+color +The color of the wormhole
+visualSize +The size of the wormhole
+passageSize +The size that is used to determine if ships fit through. If nil max value will be used.
+
+

Returns

+
+

+An entity representing the new wormhole +

+
+

+
+
+
+
+

+function Entity createWreckage(BlockPlan plan, Matrix position)
+

+
+
+

+Convenience function to create a wreckage. Creates a new wreckage in the sector. This entity will have all components required for a default wreckage. +

+

Parameters

+
+plan +The plan of the wreckage, this plan will be empty after the call since the plan is moved (instead of copied) into the created entity
+position +The position of the wreckage
+
+

Returns

+
+

+An entity representing the new wreckage +

+
+

+
+
+
+
+

+function var deleteEntity(Entity entity)
+

+
+
+

+Sets an entity for deletion. The entity is not deleted right away, but will be marked for deletion and will be deleted at the end of the current frame. +

+

Parameters

+
+entity +The entity to delete
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var deleteEntityJumped(Entity entity)
+

+
+
+

+Sets an entity for deletion. The entity is not deleted right away, but will be marked for deletion and will be deleted at the end of the current frame. This function also creates a hyperspace animation when deleting the entity. +

+

Parameters

+
+entity +The entity to delete
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var dropBundle()
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function Entity dropCargo(vec3 position, Faction [or nil] reservedFor, Faction [or nil] deniedFor, TradingGood good, int owner, int amount)
+

+
+
+

+
+
+
+
+

+function Entity dropMoney(vec3 position, Faction [or nil] reservedFor, Faction [or nil] deniedFor, int amount)
+

+
+
+

+
+
+
+
+

+function Entity dropResources(vec3 position, Faction [or nil] reservedFor, Faction [or nil] deniedFor, Material material, int amount)
+

+
+
+

+
+
+
+
+

+function Entity dropSectorTurret(vec3 position, Faction [or nil] reservedFor, Faction [or nil] deniedFor)
+

+
+
+

+Drops a random turret that is appropriate for this sector. Can return nil as well, since turrets with higher slot numbers won't always be dropped so that not too much money value is dropped all the time. +

+

Parameters

+
+position +The position of where to drop the turret
+reservedFor +Faction the loot is reserved for, or nil
+deniedFor +Faction the loot is denied for, or nil
+
+

Returns

+
+

+The new entity, or nil +

+
+

+
+
+
+
+

+function Entity dropTurret(vec3 position, Faction [or nil] reservedFor, Faction [or nil] deniedFor, TurretTemplate desc)
+

+
+
+

+
+
+
+
+

+function Entity dropUpgrade(vec3 position, Faction [or nil] reservedFor, Faction [or nil] deniedFor, SystemUpgradeTemplate upgrade)
+

+
+
+

+
+
+
+
+

+function Entity dropUsableItem(vec3 position, Faction [or nil] reservedFor, Faction [or nil] deniedFor, UsableInventoryItem item)
+

+
+
+

+
+
+
+
+

+function Entity dropVanillaItem(vec3 position, Faction [or nil] reservedFor, Faction [or nil] deniedFor, VanillaInventoryItem item)
+

+
+
+

+
+
+
+
+

+function bool exists(var id)
+

+
+
+

+Returns if the entity with the given id exists in the sector. This is a performance optimization for quick checks of existance. Use if you have an id (but not a constructed Entity) that you want to check for existance. If you already have an Entity constructed, use the valid() function, which is faster. +

+

Parameters

+
+id +The id of the entity to test
+
+

Returns

+
+

+A boolean indicating if the entity with the index exists +

+
+

+
+
+
+
+

+function Entity... getAllies(int factionIndex)
+

+
+
+

+Returns all allies of the given faction in the sector. Allies include ships of the same faction. Allied entities are determined as follows:
- they belong to the same faction
- they belong to factions whose relations are above 70.000
- they belong to players of the same group
- they belong to players of the same alliance
- they belong to a player and their alliance
+

+

Parameters

+
+factionIndex +The faction index of the faction whose ally ships are to be queried
+
+

Returns

+
+

+Multiple values: All detected allies in the sector +

+
+

+
+
+
+
+

+function int, int getCoordinates()
+

+
+
+

+Access the x, y coordinates of the sector +

+

Returns

+
+

+2 return values: x, y coordinates of the sector +

+
+

+
+
+
+
+

+function Entity... getEnemies(int factionIndex)
+

+
+
+

+Returns all enemies of the given faction in the sector. Enemies are determined as ships of factions where relations are below -40.000 +

+

Parameters

+
+factionIndex +The faction index of the faction whose enemy ships are to be queried
+
+

Returns

+
+

+Multiple return values: All detected enemies in the sector +

+
+

+
+
+
+
+

+function Entity... getEntities()
+

+
+
+

+Returns all entities in the sector +

+

Returns

+
+

+Multiple return values: All entities in the sector +

+
+

+
+
+
+
+

+function Entity... getEntitiesByComponent(int type)
+

+
+
+

+Returns all entities in the sector that have a specific component +

+

Parameters

+
+type +The desired component type (See enum ComponentType)
+
+

Returns

+
+

+Multiple return values: All matching entities in the sector +

+
+

+
+
+
+
+

+function Entity... getEntitiesByComponents(Type... types)
+

+
+
+

+Returns all entities in the sector that have a specific set of components +

+

Parameters

+
+types +The desired set of component types (See enum ComponentType)
+
+

Returns

+
+

+Multiple return values: All matching entities in the sector +

+
+

+
+
+
+
+

+function Entity... getEntitiesByFaction(int factionIndex)
+

+
+
+

+Returns all entities in the sector that belong to the given faction Complexity: O(n) +

+

Parameters

+
+factionIndex +The desired faction
+
+

Returns

+
+

+Multiple return values: All matching entities in the sector +

+
+

+
+
+
+
+

+function Entity... getEntitiesByLocation(Sphere sphere)
+

+
+
+

+Returns all entities in the sector whose bounding spheres intersect with the given sphere. Entities without a bounding sphere component will not be considered.
Complexity: O(logn) +

+

Parameters

+
+sphere +The intersected sphere
+
+

Returns

+
+

+Multiple return values: All matching entities in the sector +

+
+

+
+
+
+
+

+function Entity... getEntitiesByScript(string script)
+

+
+
+

+Returns all entities in the sector that have a specific script attached to them +

+

Parameters

+
+script +The script that is to check for. This operation checks if the given script name is contained in the actual script name.
+
+

Returns

+
+

+Multiple return values: All matching entities in the sector +

+
+

+
+
+
+
+

+function Entity... getEntitiesByScriptValue(string name, var value)
+

+
+
+

+Returns all entities in the sector that have a specific value assigned to them. Values can be set with Entity:setValue(name, value) and read with Entity:getValue(name). +

+

Parameters

+
+name +The value name to check for
+value +A value to check against. If this is set, only entities will be returned whose value is equal to the passed value. If this is nil, all entities will be returned that have any value with the given name assigned.
+
+

Returns

+
+

+Multiple return values: All matching entities in the sector +

+
+

+
+
+
+
+

+function Entity... getEntitiesByType(int type)
+

+
+
+

+Returns all entities in the sector that have a specific type +

+

Parameters

+
+type +The desired entity type (See enum EntityType)
+
+

Returns

+
+

+Multiple return values: All matching entities in the sector +

+
+

+
+
+
+
+

+function Entity getEntity(var index)
+

+
+
+

+Find an entity by index in the sector.
Complexity: O(logn) +

+

Parameters

+
+index +The index of the entity as Uuid or std::string
+
+

Returns

+
+

+The entity or nil if not found +

+
+

+
+
+
+
+

+function Entity getEntityByFactionAndName(int factionIndex, string name)
+

+
+
+

+
+
+
+
+

+function unsigned int getNumAllies(int faction)
+

+
+
+

+
+
+
+
+

+function unsigned int getNumEnemies(int factionIndex)
+

+
+
+

+
+
+
+
+

+function unsigned int getNumEntities()
+

+
+
+

+
+
+
+
+

+function unsigned int getNumEntitiesByComponent(int component)
+

+
+
+

+
+
+
+
+

+function unsigned int getNumEntitiesByComponents()
+

+
+
+

+
+
+
+
+

+function unsigned int getNumEntitiesByFaction(int factionIndex)
+

+
+
+

+
+
+
+
+

+function unsigned int getNumEntitiesByLocation(Sphere sphere)
+

+
+
+

+
+
+
+
+

+function unsigned int getNumEntitiesByScript(string scriptName)
+

+
+
+

+
+
+
+
+

+function unsigned int getNumEntitiesByScriptValue(string valueName, var value)
+

+
+
+

+
+
+
+
+

+function unsigned int getNumEntitiesByType(int type)
+

+
+
+

+
+
+
+
+

+function Player... getPlayers()
+

+
+
+

+Returns all players that are currently in the sector +

+

Returns

+
+

+Multiple return values: All players in the sector +

+
+

+
+
+
+
+

+function int... getPresentFactions()
+

+
+
+

+Returns all indices of all present factions +

+

Returns

+
+

+a list of int indices of all present factions +

+
+

+
+
+
+
+

+function table<int, string> getScripts()
+

+
+
+

+
+
+
+
+

+function var getValue(string key)
+

+
+
+

+Retrieves a custom value saved in the entity with the given key +

+

Parameters

+
+key +A string that serves as the name of the value
+
+

Returns

+
+

+The value if the key exists, otherwise nil +

+
+

+
+
+
+
+

+function table<string, var> getValues()
+

+
+
+

+Retrieves all key-value pairs of custom values of the entity +

+

Returns

+
+

+A table containing all custom key-value pairs +

+
+

+
+
+
+
+

+function bool hasEnemies(int factionIndex)
+

+
+
+

+Checks if the given faction has any enemy ships or objects in the sector +

+

Parameters

+
+factionIndex +The index of the faction
+
+

Returns

+
+

+true if there are enemies present, false otherwise +

+
+

+
+
+
+
+

+function bool hasScript(string name)
+

+
+
+

+
+
+
+
+

+function UserObject... intersectBeamRay(Ray ray, Uuid [or nil] ignoredEntity, Uuid [or nil] ignoredEntityShields)
+

+
+
+

+Intersects a beam in the sector, similar to the way that weapon beams are intersected. If an entity has a shield, that shield will be part of the test. If the beam would intersect with multiple entities, then the entity with its intersection point closest to the ray origin is chosen. +

+

Parameters

+
+ray +The ray that should be intersected
+ignoredEntity +A uuid that can be optionally set. If this was set, the entity with this ID will be ignored during the intersection.
+ignoredEntityShields +A uuid that can be optionally set. If this was set, the shields of the entity with this ID will be ignored during the intersection.
+
+

Returns

+
+

+The entity closest to the origin of the ray, that was hit (if one or more were hit), as well as the point where the ray intersects with the object (or its shield). +

+
+

+
+
+
+
+

+function var... invokeFunction(var scriptName, string functionName, var... arguments)
+

+
+
+

+Invokes a function in a script of the sector. Use this function to invoke functions from one script in another script. The first return value of the function is an integer indicating whether or not the call was successful. When it was, this integer is followed by the return values of the invoked function. +

+

Parameters

+
+scriptName +The name of the script containing the function
+functionName +The name of the function that will be executed
+arguments +An arbitrary list of arguments that will be given to the invoked function
+
+

Returns

+
+

+Returns at least 1 value indicating if the call succeeded:
0 The call was successful. In this case, the return values of the script are returned in addition to the call result, following the call result
3 The call failed because the given script was not found in the sector
4 The call failed because the given function was not found in the script
+

+
+

+
+
+
+
+

+function bool isEntitySetForDeletion(Entity entity)
+

+
+
+

+
+
+
+
+

+function int registerCallback(string callbackName, string functionName)
+

+
+
+

+Register a callback in the sector. The callback receiver has to be inside the sector for the registration to succeed. The callback will be removed if the receiver leaves the sector or gets destroyed, or the sector gets unloaded. Double registration of callbacks doesn't work. When the same callback to the same callback of the same script instance is registered twice, it will still only be called once. +

+

Parameters

+
+callbackName +The name of the callback
+functionName +The name of the function that will be executed in the script when the callback happens
+
+

Returns

+
+

+0 on success, 1 if the registration failed +

+
+

+
+
+
+
+

+function var removeScript(var script)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function Entity replaceEntity(var toReplace, EntityDescriptor descriptor, var arrivalType)
+

+
+
+

+Creates a new arbitrary entity in the sector, and deletes the previous entity. The replacement will be seamless on the client +

+

Parameters

+
+toReplace +The entity to replace, can be of type Entity, Uuid or string
+descriptor +A descriptor representing the entity to create, this descriptor will be empty after the call since the data is moved (instead of copied) into the created entity
+arrivalType +The arrival type of the ship
+
+

Returns

+
+

+The new entity +

+
+

+
+
+
+
+

+function var resendEntity(Entity entity)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function string resolveScriptPath(string path)
+

+
+
+

+
+
+
+
+

+function var sendCallback()
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var setValue(string key, var value)
+

+
+
+

+Sets a custom value +

+

Parameters

+
+key +A string that serves as the name of the value
+value +The value to save. Must be bool, number, string or nil. If nil is given, the value will be deleted.
+
+

+
+
+
+
+

+function var transferEntity(Entity entity, int x, int y, int type)
+

+
+
+

+Marks an entity for transfer to another sector. Child entities such as turrets will be transferred as well. The entity will be removed from the sector after the frame ends. Default transfer type will just move the entity without any effects or other behaviours and the entity will be placed at the exact same position as in the previous sector. Jump transfer will simulate a jump behavior, including an effect on the client and placing the entity at the edge of the destination sector. Gate and Wormhole transfer will place the entity in front of the outgoing gate or wormhole, if there is any that leads to the origin sector. Otherwise, same behavior as Default transfer. While technically, Wormhole transfer and Gate transfer is the exact same thing internally, we have to distinguish it for different things like for example achievements. +

+

Parameters

+
+entity +The entity that is to be transferred
+x +The x coordinate of the target sector
+y +The y coordinate of the target sector
+type +The type of transfer: SectorChangeType
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var unregisterCallback(string callbackName, string functionName)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+
+
+ Overview +
Home + Functions + Search +
+
Search:
+Predefined Functions & Example Scripts +
Command +Entity +FactionDatabase +PlanGenerator +Player +Sector +Server +UsableInventoryItem +
+
+

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

+
+ +
+ + diff --git a/Documentation/SectorFunctions.html b/Documentation/SectorFunctions.html new file mode 100644 index 0000000..d7e7869 --- /dev/null +++ b/Documentation/SectorFunctions.html @@ -0,0 +1,625 @@ + + + Avorion Predefined Functions - Sector + + + + +
+
+

Avorion Script API Documentation

+
+
+ +
+
Search:
+
+
+ + + + + + + + + + +
+updateServer +
+initialize +
+update +
+getUpdateInterval +
+onRemove +
+onDelete +
+secure +
+restore +
+updateClient +
+
+
+
+

Sector Script Predefined Functions

+
+

Tip: Scroll down for an example script!

+
+
+

+function updateServer(timeStep)
+

+
+

+Update tick that is only executed on the server. See the documentation for getUpdateInterval() for details on the frequency of these calls.

Server Function: This function is only called on the server. +

+

Parameters

+
+timeStep +The amount of time that passed since the last update tick
+
+

+
+
+
+

+function initialize(...)
+

+
+

+This function is always the very first function that is called in a script, and only once during the lifetime of the script. The function is always called on the server first, before client instances are available, so invoking client functions will never work. This function is both called when a script gets newly attached to an object, and when the object is loaded from the database during a load from disk operation. During a load from disk operation, no parameters are passed to the function, and a global variable '_restoring' is set to true. +

+

Parameters

+
+... +Parameters that are passed through from the adding of the script. nil if the script was loaded from the database while loading a sector or player or similar.
+
+

+
+
+
+

+function update(timeStep)
+

+
+

+Called every tick, both on client and server. See the documentation for getUpdateInterval() for details on the frequency of these calls. +

+

Parameters

+
+timeStep +The amount of time passed since the last update tick
+
+

+
+
+
+

+function getUpdateInterval()
+

+
+

+Defines the update tick interval of the script. This interval can not be less than the update tick interval of the server or client, depending on where the script is running. The update(), updateParallelRead(), updateParallelSelf(), updateClient() and updateServer() functions will only be called after at least this much time has passed. The minimum update interval for the client varies with the framerate of the client. The minimum update interval for the server is 50 ms. This function is called after initialize() or after the update functions were called. If this function is not defined, the update functions will be called every tick. +

+

Expected return values

+
+

+The desired update tick interval in seconds +

+
+

+
+
+
+

+function onRemove()
+

+
+

+Called when the script is about to be removed from the object, before the removal. +

+

+
+
+
+

+function onDelete()
+

+
+

+Called when the script is about to be deleted from the object, before the deletion. This is the last call that will be done to an object script. This function is also called when the object it is attached to is deleted. +

+

+
+
+
+

+function secure()
+

+
+

+Called to secure values from the script. This function is called when the object is unloaded from the server. It's called at other times as well to refresh data, or when objects are copied or during regular saves. The table returned by this function will be passed to the restore() function when the object is loaded and read from disk. All values that are in the table must be numbers, strings or other tables. Values that aren't of the above types will be converted to nil and an error message will be printed. +

+

Expected return values

+
+

+A table containing values that should be saved +

+
+

+
+
+
+

+function restore(values)
+

+
+

+Called to restore previously secured values for the script. This is called after initialize(). Receives the values that were gathered from the last called to the secure() function. This function is called when the object is read from disk and restored, after initialize() was called. +

+

Parameters

+
+values +The table previously returned by the secure() function
+
+

+
+
+
+

+function updateClient(timeStep)
+

+
+

+Update tick that is only executed on the client. See the documentation for getUpdateInterval() for details on the frequency of these calls.

Client Function: This function is only called on the client. +

+

Parameters

+
+timeStep +The amount of time that passed since the last update tick
+
+

+
+
+


Sector Example Script

+
+ +-- Update tick that is only executed on the server. See the documentation for getUpdateInterval()
+-- for details on the frequency of these calls.
+-- Server Function: This function is only called on the server.
+function updateServer(timeStep)
+
+end
+
-- This function is always the very first function that is called in a script, and only once during
+-- the lifetime of the script. The function is always called on the server first, before client
+-- instances are available, so invoking client functions will never work. This function is both
+-- called when a script gets newly attached to an object, and when the object is loaded from the
+-- database during a load from disk operation. During a load from disk operation, no parameters
+-- are passed to the function, and a global variable '_restoring' is set to true.
+function initialize(...)
+
+end
+
-- Called every tick, both on client and server. See the documentation for getUpdateInterval()
+-- for details on the frequency of these calls.
+function update(timeStep)
+
+end
+
-- Defines the update tick interval of the script. This interval can not be less than the update
+-- tick interval of the server or client, depending on where the script is running. The update(),
+-- updateParallelRead(), updateParallelSelf(), updateClient() and updateServer() functions will
+-- only be called after at least this much time has passed. The minimum update interval for the
+-- client varies with the framerate of the client. The minimum update interval for the server
+-- is 50 ms. This function is called after initialize() or after the update functions were called.
+-- If this function is not defined, the update functions will be called every tick.
+function getUpdateInterval()
+
+end
+
-- Called when the script is about to be removed from the object, before the removal.
+function onRemove()
+
+end
+
-- Called when the script is about to be deleted from the object, before the deletion. This is
+-- the last call that will be done to an object script. This function is also called when the
+-- object it is attached to is deleted.
+function onDelete()
+
+end
+
-- Called to secure values from the script. This function is called when the object is unloaded
+-- from the server. It's called at other times as well to refresh data, or when objects are copied
+-- or during regular saves. The table returned by this function will be passed to the restore()
+-- function when the object is loaded and read from disk. All values that are in the table must
+-- be numbers, strings or other tables. Values that aren't of the above types will be converted
+-- to nil and an error message will be printed.
+function secure()
+
+end
+
-- Called to restore previously secured values for the script. This is called after initialize().
+-- Receives the values that were gathered from the last called to the secure() function. This
+-- function is called when the object is read from disk and restored, after initialize() was called.
+function restore(values)
+
+end
+
-- Update tick that is only executed on the client. See the documentation for getUpdateInterval()
+-- for details on the frequency of these calls.
+-- Client Function: This function is only called on the client.
+function updateClient(timeStep)
+
+end
+ +
+
+
+
+
+
+ Overview +
Home + Functions + Search +
+
Search:
+Predefined Functions & Example Scripts +
Command +Entity +FactionDatabase +PlanGenerator +Player +Sector +Server +UsableInventoryItem +
+
+

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

+
+ +
+ + diff --git a/Documentation/SectorView.html b/Documentation/SectorView.html new file mode 100644 index 0000000..1db89a1 --- /dev/null +++ b/Documentation/SectorView.html @@ -0,0 +1,818 @@ + + + SectorView + + + + +
+
+

Avorion Script API Documentation

+
+
+ +
+
Search:
+ +
+

SectorView

+
+
+

+function SectorView()
+

+
+
+

+This is the default constructor of SectorView. No further arguments are required. +

+

Returns

+
+

+A new instance of SectorView +

+
+

+
+
+
+
+ +
property bool deathLocation
+
+
+
+
+ +
property int factionIndex
+
+
+
+
+ +
property bool hasContent[read-only]
+
+
+
+
+ +
property float influence
+
+
+
+
+ +
property bool manuallyTagged
+
+
+
+
+ +
property string name
+
+
+
+
+ +
property NamedFormat note
+
+
+
+
+ +
property int numAsteroids
+
+
+
+
+ +
property int numShips
+
+
+
+
+ +
property int numStations
+
+
+
+
+ +
property int numWrecks
+
+
+
+
+ +
property string tagIconPath
+
+
+
+
+ +
property double timeStamp
+
+
+
+
+ +
property bool visited[read-only]
+
+
+
+
+
+
+

+function float calculateInfluence(int stations)
+

+
+
+

+
+
+
+
+

+function int, int getCoordinates()
+

+
+
+

+
+
+
+
+

+function table<int, int> getCraftsByFaction()
+

+
+
+

+
+
+
+
+

+function table<string, string> getCustomEntries()
+

+
+
+

+
+
+
+
+

+function ivec2... getGateDestinations()
+

+
+
+

+
+
+
+
+

+function table<int, int> getShipsByFaction()
+

+
+
+

+
+
+
+
+

+function table<int, int> getStationsByFaction()
+

+
+
+

+
+
+
+
+

+function NamedFormat... getStationTitles()
+

+
+
+

+
+
+
+
+

+function ivec2... getWormHoleDestinations()
+

+
+
+

+
+
+
+
+

+function var setCoordinates(int x, int y)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var setCraftsByFaction(int_map_type in)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var setCustomEntry(string key, string line)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var setGateDestinations()
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var setShipsByFaction(int_map_type in)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var setStationsByFaction(int_map_type in)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var setStationTitles()
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var setWormHoleDestinations()
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+
+
+ Overview +
Home + Functions + Search +
+
Search:
+Predefined Functions & Example Scripts +
Command +Entity +FactionDatabase +PlanGenerator +Player +Sector +Server +UsableInventoryItem +
+
+

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

+
+ +
+ + diff --git a/Documentation/Seed.html b/Documentation/Seed.html new file mode 100644 index 0000000..2a4897c --- /dev/null +++ b/Documentation/Seed.html @@ -0,0 +1,556 @@ + + + Seed + + + + +
+
+

Avorion Script API Documentation

+
+
+ +
+
Search:
+
+
+ + + + + + + + + + + + + + + + + + + +
+Seed +Seed +

Properties
+int32 +
+value +

Member Functions
+__add +
+__div +
+__eq +
+__le +
+__lt +
+__mul +
+__sub +
+__tostring +
+__unm +
+
+
+
+

Seed

+
+
+

+function Seed(var in)
+

+
+
+

Returns

+
+

+A new instance of Seed +

+
+

+
+
+
+
+ +
property int int32[read-only]
+
+
+
+
+ +
property double value
+
+There are two types you can use to set the value: number or string. ATTENTION: The number type (double) is not sufficient to store the full range of values (64 bit). To get the value in a reliable way use tostring(). To set the value in a reliable way assign a string. +
+
+
+
+
+

+function Seed __add(int other)
+

+
+
+

+
+
+
+
+

+function Seed __div(int other)
+

+
+
+

+
+
+
+
+

+function var __eq(Seed other)
+

+
+
+

+
+
+
+
+

+function var __le(Seed other)
+

+
+
+

+
+
+
+
+

+function var __lt(Seed other)
+

+
+
+

+
+
+
+
+

+function Seed __mul(int other)
+

+
+
+

+
+
+
+
+

+function Seed __sub(int other)
+

+
+
+

+
+
+
+
+

+function string __tostring()
+

+
+
+

+
+
+
+
+

+function Seed __unm()
+

+
+
+

+
+
+
+
+
+
+ Overview +
Home + Functions + Search +
+
Search:
+Predefined Functions & Example Scripts +
Command +Entity +FactionDatabase +PlanGenerator +Player +Sector +Server +UsableInventoryItem +
+
+

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

+
+ +
+ + diff --git a/Documentation/Selection.html b/Documentation/Selection.html new file mode 100644 index 0000000..787e07e --- /dev/null +++ b/Documentation/Selection.html @@ -0,0 +1,1124 @@ + + + Selection + + + + +
+
+

Avorion Script API Documentation

+
+
+ +
+
Search:
+ +
+

Selection : UIElement

+

+This object is only available on the client. +

+
+
+

+function Selection(int index)
+

+
+
+

Returns

+
+

+A new instance of Selection +

+
+

+
+
+
+
+ +
property bool dragFromEnabled[write-only]
+
+
+
+
+ +
property bool dropIntoEnabled[write-only]
+
+
+
+
+ +
property bool dropIntoSelfEnabled[write-only]
+
+
+
+
+ +
property bool entriesHighlightable[write-only]
+
+
+
+
+ +
property bool entriesSelectable[write-only]
+
+
+
+
+ +
property bool hasSelectedItemFrame
+
+
+
+
+ +
property bool isRenderingDraggedItem[read-only]
+
+
+
+
+ +
property unsigned int maxHorizontalEntries[read-only]
+
+
+
+
+ +
property int numEntries[read-only]
+
+
+
+
+ +
property string onClickedFunction
+
+
+
+
+ +
property string onDeselectedFunction
+
+
+
+
+ +
property string onDroppedFunction
+
+
+
+
+ +
property string onEntriesSortedFunction
+
+
+
+
+ +
property string onInsertedFunction
+
+
+
+
+ +
property string onReceivedFunction
+
+
+
+
+ +
property string onSelectedFunction
+
+
+
+
+ +
property float padding[write-only]
+
+
+
+
+ +
property UserObject selected[read-only]
+
+
+
+
+ +
property ivec2 selectedKey[read-only]
+
+
+
+
+ +
property bool showScrollBar[write-only]
+
+
+
+
+ +
property vec2 center
+
+
+
+
+ +
property float height
+
+
+
+
+ +
property int index[read-only]
+
+
+
+
+ +
property int layer
+
+
+
+
+ +
property vec2 localCenter[read-only]
+
+
+
+
+ +
property vec2 localPosition[read-only]
+
+
+
+
+ +
property Rect localRect[read-only]
+
+
+
+
+ +
property vec2 lower
+
+
+
+
+ +
property bool mouseOver[read-only]
+
+
+
+
+ +
property vec2 position
+
+
+
+
+ +
property Rect rect
+
+
+
+
+ +
property vec2 size
+
+
+
+
+ +
property var tooltip
+
+
+
+
+ +
property int tooltipWidth[write-only]
+
+
+
+
+ +
property vec2 upper
+
+
+
+
+ +
property bool visible
+
+
+
+
+ +
property float width
+
+
+
+
+
+
+

+function var add(var item, var pos)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var addEmpty(var pos)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var addEmptyRows(int amount)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var clear()
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var fillRow()
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var fillWithEmptyRows()
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function UserObject getItem(ivec2 key)
+

+
+
+

+
+
+
+
+

+function table<ivec2, UserObject> getItems()
+

+
+
+

+
+
+
+
+

+function ivec2 getMouseOveredKey()
+

+
+
+

+
+
+
+
+

+function int, Rect getRect(int x, int y)
+

+
+
+

+
+
+
+
+

+function var remove(ivec2 key)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var select(ivec2 pos)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var selectNoCallback(ivec2 pos)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var setCustomRects(table_t rects)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var setFieldSize(float in)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var setShowScrollArrows(bool showTop, bool showBottom, float width)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var unselect()
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var hide()
+

+
+
+

+Inherited from UIElement + +

+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function bool isMouseOverAndUnobscured()
+

+
+
+

+Inherited from UIElement + +

+

+
+
+
+
+

+function var show()
+

+
+
+

+Inherited from UIElement + +

+

Returns

+
+

+nothing +

+
+

+
+
+
+
+
+
+ Overview +
Home + Functions + Search +
+
Search:
+Predefined Functions & Example Scripts +
Command +Entity +FactionDatabase +PlanGenerator +Player +Sector +Server +UsableInventoryItem +
+
+

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

+
+ +
+ + diff --git a/Documentation/SelectionItem.html b/Documentation/SelectionItem.html new file mode 100644 index 0000000..a3b4f24 --- /dev/null +++ b/Documentation/SelectionItem.html @@ -0,0 +1,594 @@ + + + SelectionItem + + + + +
+
+

Avorion Script API Documentation

+
+
+ +
+
Search:
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
+SelectionItem +SelectionItem +

Properties
+amount +
+backdrop +
+backgroundColor +
+borderColor +
+borderGlow +
+color +
+icon +
+texture +
+tooltip +
+value0 +
+value1 +
+value2 +
+value3 +
+value4 +
+value5 +
+value6 +
+value7 +
+value8 +
+value9 +

Member Functions
+
+
+
+

SelectionItem

+

+This object is only available on the client. +

+
+
+

+function SelectionItem()
+

+
+
+

Returns

+
+

+A new instance of SelectionItem +

+
+

+
+
+
+
+ +
property var amount
+
+
+
+
+ +
property bool backdrop
+
+
+
+
+ +
property Color backgroundColor
+
+
+
+
+ +
property Color borderColor
+
+
+
+
+ +
property bool borderGlow
+
+
+
+
+ +
property Color color
+
+
+
+
+ +
property bool icon
+
+
+
+
+ +
property string texture
+
+
+
+
+ +
property var tooltip[write-only]
+
+
+
+
+ +
property var value0
+
+
+
+
+ +
property var value1
+
+
+
+
+ +
property var value2
+
+
+
+
+ +
property var value3
+
+
+
+
+ +
property var value4
+
+
+
+
+ +
property var value5
+
+
+
+
+ +
property var value6
+
+
+
+
+ +
property var value7
+
+
+
+
+ +
property var value8
+
+
+
+
+ +
property var value9
+
+
+
+
+
+
+
+
+ Overview +
Home + Functions + Search +
+
Search:
+Predefined Functions & Example Scripts +
Command +Entity +FactionDatabase +PlanGenerator +Player +Sector +Server +UsableInventoryItem +
+
+

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

+
+ +
+ + diff --git a/Documentation/Server Callbacks.html b/Documentation/Server Callbacks.html new file mode 100644 index 0000000..ef584eb --- /dev/null +++ b/Documentation/Server Callbacks.html @@ -0,0 +1,456 @@ + + + Avorion Script Callbacks - Server + + + + +
+
+

Avorion Script API Documentation

+
+
+ +
+
Search:
+
+ +
+
+

Server Callbacks

+

+Note: Callbacks have to be buffered in certain situations and won't happen immediately. When unregistering a callback during a callback, all callbacks that were buffered during the last tick may still be sent, even though they were unregistered. +

+
+

+callback onChatMessage(playerIndex, text, channel)
+

+
+

+Executed whenever the player sent a chat message to the server. Only called if the chat message is valid and the player doesn't have a chat ban. +

+

Parameters

+
+playerIndex +Index of the player
+text +The text content of the chat message
+channel +The channel the message was sent to. 0 = All, 1 = Sector, 2 = Group, 3 = Alliance
+
+

+
+
+
+

+callback onPlayerLogIn(playerIndex)
+

+
+

+Executed whenever a player was logged in +

+

Parameters

+
+playerIndex +The index of the player who logged in
+
+

+
+
+
+

+callback onPlayerLogOff(playerIndex)
+

+
+

+Executed whenever a player was logged off +

+

Parameters

+
+playerIndex +The index of the player who logged off
+
+

+
+
+
+
+
+
+ Overview +
Home + Functions + Search +
+
Search:
+Predefined Functions & Example Scripts +
Command +Entity +FactionDatabase +PlanGenerator +Player +Sector +Server +UsableInventoryItem +
+
+

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

+
+ +
+ + diff --git a/Documentation/Server.html b/Documentation/Server.html new file mode 100644 index 0000000..ab5e4a2 --- /dev/null +++ b/Documentation/Server.html @@ -0,0 +1,1071 @@ + + + Server + + + + +
+
+

Avorion Script API Documentation

+
+
+ +
+
Search:
+ +
+

Server

+

+This object is only available on the server. +

+
+
+

+function Server()
+

+
+
+

Returns

+
+

+A new instance of Server +

+
+

+
+
+
+
+ +
property int accessMode[read-only]
+
+
+
+
+ +
property float collisionDamage[read-only]
+
+
+
+
+ +
property string description[read-only]
+
+
+
+
+ +
property int difficulty[read-only]
+
+
+
+
+ +
property string folder[read-only]
+
+
+
+
+ +
property int gamePort[read-only]
+
+
+
+
+ +
property int generatorThreads[read-only]
+
+
+
+
+ +
property bool infiniteResources[read-only]
+
+
+
+
+ +
property int maxPlayers[read-only]
+
+
+
+
+ +
property string name[read-only]
+
+
+
+
+ +
property const numAdministrators[read-only]
+
+
+
+
+ +
property double paused[read-only]
+
+
+
+
+ +
property int players[read-only]
+
+
+
+
+ +
property bool playerToPlayerDamage
+
+
+
+
+ +
property int rconPort[read-only]
+
+
+
+
+ +
property double runtime[read-only]
+
+
+
+
+ +
property bool sameStartSector[read-only]
+
+
+
+
+ +
property int scriptThreads[read-only]
+
+
+
+
+ +
property Seed seed[read-only]
+
+
+
+
+ +
property var sessionId[read-only]
+
+
+
+
+ +
property int steamMasterPort[read-only]
+
+
+
+
+ +
property int steamQueryPort[read-only]
+
+
+
+
+ +
property int udpPollingPort[read-only]
+
+
+
+
+ +
property double unpausedRuntime[read-only]
+
+
+
+
+ +
property int workerThreads[read-only]
+
+
+
+
+ +
property int xsotanInvasionSectors[read-only]
+
+
+
+
+
+
+

+function var addChatCommand(Player sender, string command)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var broadcastChatMessage(var sender, int messageType, string message, PluralForm... args)
+

+
+
+

+Broadcast a chat message to all players on the server. Supports sending of format arguments so that the message can be translated on the client. +

+

Parameters

+
+sender +The sender that will be displayed for the chat message
+messageType +The type of chat message, 0 = Normal, 1 = Error, 2 = Warning, 3 = Info
+message +The message that will be sent
+args +The format arguments that will be sent
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function int callbacksRegistered(string callbackName, var functionName)
+

+
+
+

+Check how many functions are registered to a callback from the current script VM. +

+

Parameters

+
+callbackName +The name of the callback
+functionName +The name of the function for which to check. If nil, will count all functions that are registered to this callback.
+
+

Returns

+
+

+The amount of functions registered to the callback. -1 if an error occurred. +

+
+

+
+
+
+
+

+function string... getBlackList()
+

+
+
+

+
+
+
+
+

+function string... getIpBlackList()
+

+
+
+

+
+
+
+
+

+function Player... getOnlinePlayers()
+

+
+
+

+
+
+
+
+

+function Player... getPlayers()
+

+
+
+

+
+
+
+
+

+function var getValue(string key)
+

+
+
+

+Retrieves a custom value saved in the entity with the given key +

+

Parameters

+
+key +A string that serves as the name of the value
+
+

Returns

+
+

+The value if the key exists, otherwise nil +

+
+

+
+
+
+
+

+function table<string, var> getValues()
+

+
+
+

+Retrieves all key-value pairs of custom values of the entity +

+

Returns

+
+

+A table containing all custom key-value pairs +

+
+

+
+
+
+
+

+function string... getWhiteList()
+

+
+
+

+
+
+
+
+

+function bool hasAdminPrivileges(Player player)
+

+
+
+

+
+
+
+
+

+function bool isOnline(int index)
+

+
+
+

+Checks if the player or the alliance with the given index is currently online. An alliance counts as online if at least one member is online. +

+

Parameters

+
+index +The index of the player or alliance
+
+

Returns

+
+

+true if online, false otherwise +

+
+

+
+
+
+
+

+function int registerCallback(string callbackName, string functionName)
+

+
+
+

+Register a callback in the server. The callback may arrive with a delay. Double registration of callbacks doesn't work. When the same callback to the same callback of the same script instance is registered twice, it will still only be called once. +

+

Parameters

+
+callbackName +The name of the callback
+functionName +The name of the function that will be executed in the script when the callback happens
+
+

Returns

+
+

+0 on success, 1 if the registration failed +

+
+

+
+
+
+
+

+function var removeBlacklistedIp(string ip)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var removeBlacklistedName(string name)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var removeWhitelistedName(string name)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var save()
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var sendCallback()
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var setValue(string key, var value)
+

+
+
+

+Sets a custom value +

+

Parameters

+
+key +A string that serves as the name of the value
+value +The value to save. Must be bool, number, string or nil. If nil is given, the value will be deleted.
+
+

+
+
+
+
+

+function var stop()
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function int unregisterCallback(string callbackName, string functionName)
+

+
+
+

+
+
+
+
+
+
+ Overview +
Home + Functions + Search +
+
Search:
+Predefined Functions & Example Scripts +
Command +Entity +FactionDatabase +PlanGenerator +Player +Sector +Server +UsableInventoryItem +
+
+

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

+
+ +
+ + diff --git a/Documentation/ServerFunctions.html b/Documentation/ServerFunctions.html new file mode 100644 index 0000000..dca3222 --- /dev/null +++ b/Documentation/ServerFunctions.html @@ -0,0 +1,463 @@ + + + Avorion Predefined Functions - Server + + + + +
+
+

Avorion Script API Documentation

+
+
+ +
+
Search:
+
+
+ + + + +
+onStartUp +
+onShutDown +
+update +
+
+
+
+

Server Script Predefined Functions

+
+

Tip: Scroll down for an example script!

+
+
+

+function onStartUp()
+

+
+

+Called when the server starts up, after databases were initialized.

Server Function: This function is only called on the server. +

+

+
+
+
+

+function onShutDown()
+

+
+

+Called when the server shuts down, after players were disconnected.

Server Function: This function is only called on the server. +

+

+
+
+
+

+function update(timeStep)
+

+
+

+Called every tick by the server, before sector and player updates start.

Server Function: This function is only called on the server. +

+

Parameters

+
+timeStep +The amount of time passed since the last tick
+
+

+
+
+


Server Example Script

+
+ +-- Called when the server starts up, after databases were initialized.
+-- Server Function: This function is only called on the server.
+function onStartUp()
+
+end
+
-- Called when the server shuts down, after players were disconnected.
+-- Server Function: This function is only called on the server.
+function onShutDown()
+
+end
+
-- Called every tick by the server, before sector and player updates start.
+-- Server Function: This function is only called on the server.
+function update(timeStep)
+
+end
+ +
+
+
+
+
+
+ Overview +
Home + Functions + Search +
+
Search:
+Predefined Functions & Example Scripts +
Command +Entity +FactionDatabase +PlanGenerator +Player +Sector +Server +UsableInventoryItem +
+
+

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

+
+ +
+ + diff --git a/Documentation/Shield.html b/Documentation/Shield.html new file mode 100644 index 0000000..d2be6c7 --- /dev/null +++ b/Documentation/Shield.html @@ -0,0 +1,782 @@ + + + Shield + + + + +
+
+

Avorion Script API Documentation

+
+
+ +
+
Search:
+ +
+

Shield

+
+
+

+function Shield(var id)
+

+
+
+

Parameters

+
+id +The id of the entity this component belongs to, or the entity itself, must be an id of an existing entity or nil for the entity in the current script context
+
+

Returns

+
+

+A new instance of Shield +

+
+

+
+
+
+
+ +
property float creationDurabilityFactor[write-only]
+
+
+
+
+ +
property double damageFactor
+
+
+
+
+ +
property float deactivationFactor[read-only]
+
+
+
+
+ +
property float deactivationTime[read-only]
+
+
+
+
+ +
property double durability
+
+
+
+
+ +
property Entity entity[read-only]
+
+
+
+
+ +
property uuid entityId[read-only]
+
+
+
+
+ +
property float filledPercentage[read-only]
+
+
+
+
+ +
property bool immuneToDeactivation
+
+
+
+
+ +
property bool impenetrable
+
+
+
+
+ +
property bool invincible
+
+
+
+
+ +
property double maxDurabilityFactor
+
+
+
+
+ +
property double maximum
+
+
+
+
+ +
property float rechargeTime[read-only]
+
+
+
+
+ +
property float timeUntilRechargeAfterDepletion[read-only]
+
+
+
+
+ +
property float timeUntilRechargeAfterHit[read-only]
+
+
+
+
+
+
+

+function var changeDurability(double amount)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function double getMaxDurability(bool withUpgrades)
+

+
+
+

+Returns max durability of the shield +

+

Parameters

+
+withUpgrades +if true, upgrade effects will be included in the result
+
+

+
+
+
+
+

+function var, var getResistance()
+

+
+
+

+
+
+
+
+

+function var healDamage(double amount)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var inflictDamage(double amount, var damageSource, var damageType, vec3 location, Uuid inflictorId)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function pair intersectGlobalRay(Ray ray, vec3 location)
+

+
+
+

+
+
+
+
+

+function bool intersectGlobalSphere(Sphere sphere)
+

+
+
+

+
+
+
+
+

+function pair intersectLocalRay(Ray ray, vec3 location)
+

+
+
+

+
+
+
+
+

+function bool intersectLocalSphere(Sphere sphere)
+

+
+
+

+
+
+
+
+

+function bool isActive()
+

+
+
+

+Returns whether entity has a shield, the durability is above 0 and it isn't currently deactivated +

+

+
+
+
+
+

+function bool isInside(vec3 point)
+

+
+
+

+Check if the given point is inside the shield's outer boundaries +

+

+
+
+
+
+

+function var resetResistance()
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var setResistance(var damageType, float factor)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+
+
+ Overview +
Home + Functions + Search +
+
Search:
+Predefined Functions & Example Scripts +
Command +Entity +FactionDatabase +PlanGenerator +Player +Sector +Server +UsableInventoryItem +
+
+

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

+
+ +
+ + diff --git a/Documentation/ShipAI.html b/Documentation/ShipAI.html new file mode 100644 index 0000000..6e7d7f5 --- /dev/null +++ b/Documentation/ShipAI.html @@ -0,0 +1,1601 @@ + + + ShipAI + + + + +
+
+

Avorion Script API Documentation

+
+
+ +
+
Search:
+ +
+

ShipAI

+
+
+

+function ShipAI(var id)
+

+
+
+

Parameters

+
+id +The id of the entity this component belongs to, or the entity itself, must be an id of an existing entity or nil for the entity in the current script context
+
+

Returns

+
+

+A new instance of ShipAI +

+
+

+
+
+
+
+ +
property uuid attackedEntity[read-only]
+
+The currently attacked entity. +
+
+
+ +
property Entity entity[read-only]
+
+
+
+
+ +
property uuid entityId[read-only]
+
+
+
+
+ +
property vec3 flyTarget[read-only]
+
+The location the entity is currently flying to, if in state "Fly" or "FlyLinear". +
+
+
+ +
property bool isAttackingSomething[read-only]
+
+True if the entity is currently attacking another entity. +
+
+
+ +
property bool isBusy[read-only]
+
+True if the entity is currently doing something that prevents ambient chatter. +
+
+
+ +
property bool isStuck[read-only]
+
+True if the entity is currently in state "Fly" and got stuck. +
+
+
+ +
property int state[read-only]
+
+The AIStateType that the AI is currently in. +
+
+
+
+
+

+function var clearEnemyEntities()
+

+
+
+

+Removes all registered entities from the enemy list so that this AI no longer always considers them their enemy. +

+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var clearEnemyFactions()
+

+
+
+

+Removes all registered factions from the enemy list so that this AI no longer always considers them their enemy. +

+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var clearFriendEntities()
+

+
+
+

+Removes all registered entities from the friend list so that this AI no longer always considers them their ally/friend. +

+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var clearFriendFactions()
+

+
+
+

+Removes all registered factions from the friend list so that this AI no longer always considers them their ally/friend. +

+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function bool enemyFightersPresent()
+

+
+
+

+Returns true if there are enemy fighters present in the sector. +

+

+
+
+
+
+

+function bool enemyShipsPresent(var countCivilEnemies)
+

+
+
+

+Returns true if there are enemy ships present in the sector. +

+

Parameters

+
+countCivilEnemies +Set to true to also include civil ships like freighters and the like.
+
+

+
+
+
+
+

+function Entity... getEnemies()
+

+
+
+

+Returns a list of all entities that this AI considers hostile in the sector. +

+

+
+
+
+
+

+function Entity... getEnemyFighters()
+

+
+
+

+Returns a list of all fighters that this AI considers hostile in the sector. +

+

+
+
+
+
+

+function Entity... getEnemyShips()
+

+
+
+

+Returns a list of all non-fighter entities that this AI considers hostile in the sector. +

+

+
+
+
+
+

+function Uuid getEscortTarget()
+

+
+
+

+Returns the Uuid of the escorted craft or nil if Escort is not active. +

+

+
+
+
+
+

+function Uuid getFollowTarget()
+

+
+
+

+Returns the Uuid of the followed or escorted craft or nil if neither Follow nor Escort is active. +

+

+
+
+
+
+

+function Entity getNearestEnemy()
+

+
+
+

+Finds the closest enemy of the AI in the sector. +

+

+
+
+
+
+

+function uuid... getRegisteredEnemyEntities()
+

+
+
+

+Returns the list of entities that are always considered enemies. +

+

+
+
+
+
+

+function int... getRegisteredEnemyFactions()
+

+
+
+

+Returns the list of factions that are always considered enemies. +

+

+
+
+
+
+

+function uuid... getRegisteredFriendEntities()
+

+
+
+

+Returns the list of entities that are always considered friends. +

+

+
+
+
+
+

+function int... getRegisteredFriendFactions()
+

+
+
+

+Returns the list of factions that are always considered friends. +

+

+
+
+
+
+

+function bool isEnemy(Entity target)
+

+
+
+

+Checks if the given entity is considered an enemy. +

+

Parameters

+
+target +The entity to check
+
+

+
+
+
+
+

+function bool isEnemyPresent(var countCivilEnemies)
+

+
+
+

+Returns true if there are any enemy entities present in the sector. +

+

Parameters

+
+countCivilEnemies +Set to true to also include civil ships like freighters and the like.
+
+

+
+
+
+
+

+function bool isRegisteredEnemy(Entity target)
+

+
+
+

+Checks if the given entity is registered to always be considered hostile. +

+

Parameters

+
+target +The entity to check
+
+

+
+
+
+
+

+function bool isRegisteredFriend(Entity target)
+

+
+
+

+Checks if the given entity is registered to always be considered friendly. +

+

Parameters

+
+target +The entity to check
+
+

+
+
+
+
+

+function var registerEnemyEntity(Uuid id)
+

+
+
+

+Adds a single entity that this AI will always consider their enemy. This setting overrides normal faction relations. Registering a new enemy entity will do an internal unregisterFriendEntity(id) call and vice versa. +

+

Parameters

+
+id +The id of the entity
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var registerEnemyFaction(int index)
+

+
+
+

+Adds a faction that this AI will always consider their enemy. This setting overrides normal faction relations. Registering a new enemy faction will do an internal unregisterFriendFaction(index) call and vice versa. +

+

Parameters

+
+index +The index of the new friend faction
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var registerFriendEntity(Uuid id)
+

+
+
+

+Adds a single entity that this AI will always consider their ally/friend. This setting overrides normal faction relations. Registering a new friend entity will do an internal unregisterEnemyEntity(id) call and vice versa. +

+

Parameters

+
+id +The id of the entity
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var registerFriendFaction(int index)
+

+
+
+

+Adds a faction that this AI will always consider their ally/friend. This setting overrides normal faction relations. Registering a new friend faction will do an internal unregisterEnemyFaction(index) call and vice versa. +

+

Parameters

+
+index +The index of the new friend faction
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var setAggressive(var attackCivilShips, var canFinish)
+

+
+
+

+Sets the AI's current state to 'Aggressive'. The ship will attack its enemies and switch between enemies when taking damage (classic aggro principle). +

+

Parameters

+
+attackCivilShips +Pass "true" to have it attack civil ships as well
+canFinish +Pass "true" to have the state change to 'Idle' once there are no more enemies.
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var setAttack(Entity target)
+

+
+
+

+Sets the AI's current state to 'Attack'. The ship will attack the given target. It will also try to stay moving to make it harder for enemies to hit it. The state ends when the target can't be found any more, or when the target has been out of reach for more than 60 seconds. The ship will not follow through gates or jump after its target. +

+

Parameters

+
+target +The attacked entity
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var setBoard(Entity target)
+

+
+
+

+Sets the AI's current state to 'Board'. The ship will try to board the target. The state ends when the target can no longer be found or boarded, or when boarding was successful. +

+

Parameters

+
+target +The targeted entity
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var setEscort(Entity escortedShip)
+

+
+
+

+Sets the AI's current state to 'Escort'. The ship will follow the specified entity and attack enemies that try attacking the escorted ship. This state switches between the 'Follow' and the 'Attack' logic internally. The state ends when the escorted object can't be found any more. A ship set to escort will follow through hyperspace and gates. +

+

Parameters

+
+escortedShip +The ship it should escort
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var setFly(vec3 location, float arrivalRadius, Entity collisionException, var fighterOrders, var lenientArrivalAllowed)
+

+
+
+

+Sets the AI's current state to 'Fly'. The ship will fly towards a destination and evade obstacles. If it can't fly to its location without potentially colliding with other objects, it will remain still. +

+

Parameters

+
+location +The location it should fly to
+arrivalRadius +The arrival radius of the location, once the ship is inside the radius it will stop flying
+collisionException +Pass an Entity as an exception, which won't be considered during flight path calculation. nil for no exception.
+fighterOrders +The desired fighter orders or nil
+lenientArrivalAllowed +A bool indicating whether the ship is allowed to arrive at the final waypoint instead of the actual destination
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var setFlyLinear(vec3 location, float arrivalRadius, var avoidCollisions)
+

+
+
+

+Sets the AI's current state to 'Fly Linear'. The ship will fly towards a destination linearly and will not evade obstacles. +

+

Parameters

+
+location +The location it should fly to
+arrivalRadius +The arrival radius of the location, once the ship is inside the radius it will stop flying
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var setFollow(Entity followedShip, var followedToOtherSectors)
+

+
+
+

+Sets the AI's current state to 'Follow'. The ship will follow the specified entity. The state ends when the escorted object can't be found any more. A ship set to follow will follow through hyperspace and gates. +

+

Parameters

+
+followedShip +The ship it should follow
+followedToOtherSectors +a bool indicating whether the ship should follow to other sectors (false, by default)
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var setGuard(vec3 location)
+

+
+
+

+Sets the AI's current state to 'Guard'. The ship will remain around a specified location and attack enemies that get too close. +

+

Parameters

+
+location +The location it should guard
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var setHarvest(Entity target)
+

+
+
+

+Sets the AI's current state to 'Harvest'. The ship will try to mine/salvage the target. The state ends when the target can no longer be found. +

+

Parameters

+
+target +The targeted entity
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var setIdle()
+

+
+
+

+Sets the AI's current state to 'Idle', which can be compared to a player just stopping to move their hands. That means that any keys that the AI might still have pressed, will remain pressed until otherwise told so via the ControlUnit component. +

+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var setJump(int x, int y)
+

+
+
+

+Sets the AI's current state to 'Jump'. The ship will turn towards a specified sector and try to jump into it. If it can't it will just turn towards the destination sector. The state ends when it arrives at its destination. +

+

Parameters

+
+x +The x coordinate of the target sector
+y +The y coordinate of the target sector
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var setPassive()
+

+
+
+

+Sets the AI's current state to 'Passive'. The ship will actively do nothing at all and try to stand still at all cost. +

+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var setPassiveShooting(bool enabled)
+

+
+
+

+Enables or disables the ability to shoot enemy ships passively while flying around. +

+

Parameters

+
+enabled +true to enable, false to disable
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var setPassiveTurning(vec3 location)
+

+
+
+

+Sets the AI's current state to 'Passive Turning'. The ship will turn towards a position, but not fly there and will always set its desired velocity to 0. +

+

Parameters

+
+location +The location it should turn towards.
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var setRepair()
+

+
+
+

+Sets the AI's current state to 'Repair'. Similar to 'Aggressive', but for repairs. The ship will look for allies and heal them. This state does not end. +

+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var setRepairTarget(Entity target)
+

+
+
+

+Sets the AI's current state to 'Repair Target'. Can repair itself. The state ends when the target can't be found any more. +

+

Parameters

+
+target +The targeted entity
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var setStatus(string status, string_pair... arguments)
+

+
+
+

+DEPRECATED, use ShipAI:setStatusMessage(). Sets the status that will be set in the ship info and other places (eg. ships/fleet tab) +

+

Parameters

+
+status +a string that will be used as status, can be a format string for easier translation.

+arguments +Set the string arguments (if format string is used) as vector of string_pair.
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var setStatusMessage(string status, string_pair... arguments)
+

+
+
+

+Sets the status that will be set in the ship info and other places (eg. ships/fleet tab) +

+

Parameters

+
+status +a string that will be used as status, can be a format string for easier translation.

+arguments +Set the string arguments (if format string is used) as vector of string_pair.
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var stop()
+

+
+
+

+Stops the ship and sets its state to 'Idle'. +

+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var unregisterEnemyEntity(Uuid id)
+

+
+
+

+Removes a single entity from the enemy list so that this AI no longer always considers it their enemy. +

+

Parameters

+
+id +The id of the entity
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var unregisterEnemyFaction(int index)
+

+
+
+

+Removes a faction from the enemy list so that this AI no longer always considers them their enemy. +

+

Parameters

+
+index +The index of the faction to remove
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var unregisterFriendEntity(Uuid id)
+

+
+
+

+Removes a single entity from the friend list so that this AI no longer always considers it their ally/friend. +

+

Parameters

+
+id +The id of the entity
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var unregisterFriendFaction(int index)
+

+
+
+

+Removes a faction from the friend list so that this AI no longer always considers them their ally/friend. +

+

Parameters

+
+index +The index of the faction to remove
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+
+
+ Overview +
Home + Functions + Search +
+
Search:
+Predefined Functions & Example Scripts +
Command +Entity +FactionDatabase +PlanGenerator +Player +Sector +Server +UsableInventoryItem +
+
+

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

+
+ +
+ + diff --git a/Documentation/ShipDatabaseEntry [Client].html b/Documentation/ShipDatabaseEntry [Client].html new file mode 100644 index 0000000..a9f5943 --- /dev/null +++ b/Documentation/ShipDatabaseEntry [Client].html @@ -0,0 +1,1147 @@ + + + ShipDatabaseEntry [Client] + + + + +
+
+

Avorion Script API Documentation

+
+
+ +
+
Search:
+ +
+

ShipDatabaseEntry [Client]

+

+This represents an interface to a database entry of a ship of a Player or Alliance (=ShipOwner). When writing values here, proceed with caution and note that many database entries that linked directly to the ship will be overridden steadily (when changed on the ship) while it's being simulated in a sector. It only makes sense to update these values if the ship is in background simulation, and you want to change properties of the ship.
Note: Changing the name or faction properties of the instance will make the instance point to another faction/ship of that faction. It will not change the faction or name of the ship. If you want to change the ship's name, use the setNewName() function. Changing the ship's faction is not possible with this.

This object is only available on the client. +

+
+
+

+function ShipDatabaseEntry(int faction, string name)
+

+
+
+

Returns

+
+

+A new instance of ShipDatabaseEntry +

+
+

+
+
+
+
+ +
property int faction
+
+
+
+
+ +
property string name
+
+
+
+
+ +
property int numBlocks[read-only]
+
+
+
+
+
+
+

+function Crew buildIdealCrew()
+

+
+
+

+
+
+
+
+

+function bool exists()
+

+
+
+

+
+
+
+
+

+function ShipAvailability getAvailability()
+

+
+
+

+
+
+
+
+

+function Captain getCaptain()
+

+
+
+

+
+
+
+
+

+function table<TradingGood, float>, float getCargo()
+

+
+
+

+Returns the current cargo and the cargo bay size. The cargo is stored in a table of the format result = { }; result[good1] = 5; result[good2] = 4; ... etc. The goods are used as keys, the amount of the good is the value. +

+

Returns

+
+

+returns 2 values: 1. A table holding the current cargo of the ship; 2. a number containing the cargo bay size of the ship +

+
+

+
+
+
+
+

+function int, int getCoordinates()
+

+
+
+

+
+
+
+
+

+function Crew getCrew()
+

+
+
+

+
+
+
+
+

+function bool getCrewRequirementsFulfilled()
+

+
+
+

+Returns a boolean whether the crew requirements of the craft are all fulfilled. These are things like overpopulation, not enough crew members, etc. +

+

Returns

+
+

+A boolean whether the crew requirements of the ship are all fulfilled. +

+
+

+
+
+
+
+

+function var getDocksEnabled()
+

+
+
+

+Returns information about the crafts's docks. If in transport mode, docks are disabled. Only valid for stations. +

+

Returns

+
+

+A bool value indicating whether docks are enabled or not +

+
+

+
+
+
+
+

+function double, double getDPSValues()
+

+
+
+

+Returns information about the ship's DPS. +

+

Returns

+
+

+2 values: Total turret DPS; Total fighter DPS +

+
+

+
+
+
+
+

+function var... getDurabilityProperties()
+

+
+
+

+Returns information about the ship's hull durability. Returns 5 values: The maximum durability, the durability percentage, range 0 to 1; The HP malus factor (from boarding or reconstruction), 0 to 1; A MalusReason enum value, the reason for the malus; A bool indicating if the ship is currently damaged (blocks are lost) +

+

Returns

+
+

+5 values: Maximum durability; durability percentage; malus factor; malus reason, damaged +

+
+

+
+
+
+
+

+function var... getEnergyProperties()
+

+
+
+

+Returns the energy properties of the craft. +

+

Returns

+
+

+Two values: required energy, produced energy in watts +

+
+

+
+
+
+
+

+function int getEntityType()
+

+
+
+

+
+
+
+
+

+function bool getFighterSquadRequirementsFulfilled()
+

+
+
+

+Returns a boolean whether the figher squad requirements of the craft are all fulfilled. That's not fulfilled when there aren't enough squads for fighters. +

+

Returns

+
+

+A boolean whether the requirements are all fulfilled. +

+
+

+
+
+
+
+

+function bool getFighterStartRequirementsFulfilled()
+

+
+
+

+Returns a boolean whether the figher start requirements of the craft are all fulfilled. That's not fulfilled when there aren't any starting positions for fighters. +

+

Returns

+
+

+A boolean whether the requirements are all fulfilled. +

+
+

+
+
+
+
+

+function float getFreeCargoSpace()
+

+
+
+

+Returns the amount of free cargo space on the ship. +

+

Returns

+
+

+A number value containing the free cargo bay space of the ship +

+
+

+
+
+
+
+

+function table<unsigned int, Squad>, table_t getHangar()
+

+
+
+

+Returns the current hangar squads and misc info about the hangar. The squads are stored in a table of the format squads = {}; squads[index1] = squad1; squads[index2] = squad2; ... etc. The squad indices are used as keys, the value is a Squad class. The second value is information about the hangar, with a few properties such as its space, occupied space, etc. It's recommended to use printTable() to print the complete table for inspection. +

+

Returns

+
+

+returns 2 values: 1. A table holding the current squads of the ship; 2. a table containing more hangar info +

+
+

+
+
+
+
+

+function var... getHyperspaceProperties()
+

+
+
+

+Returns the hyperspace range, if the ship can pass over rifts, hyperspace cooldown and if the hyperspace engine is currently impaired (blocked or distorted by enemies) . +

+

Returns

+
+

+returns 4 values: 1. A number containing the hyperspace range of the ship; 2. A boolean whether the ship can jump over rifts; 3. The hyperspace cooldown in seconds of the ship; 4. A boolean whether the hyperspace engine is currently impaired +

+
+

+
+
+
+
+

+function string getIcon()
+

+
+
+

+
+
+
+
+

+function table<unsigned int, Squad>, table_t getLightweightHangar()
+

+
+
+

+Returns the current hangar squads and misc info about the hangar. Lightweight version that will not return BlockPlans of fighters. The squads are stored in a table of the format squads = {}; squads[index1] = squad1; squads[index2] = squad2; ... etc. The squad indices are used as keys, the value is a Squad class. The second value is information about the hangar, with a few properties such as its space, occupied space, etc. It's recommended to use printTable() to print the complete table for inspection. +

+

Returns

+
+

+returns 2 values: 1. A table holding the current squads of the ship; 2. a table containing more hangar info +

+
+

+
+
+
+
+

+function Matrix getLocalPosition()
+

+
+
+

+
+
+
+
+

+function string getOrderInfo()
+

+
+
+

+
+
+
+
+

+function float getPaymentTime()
+

+
+
+

+
+
+
+
+

+function BlockPlan getPlan()
+

+
+
+

+
+
+
+
+

+function double getPlanValue()
+

+
+
+

+
+
+
+
+

+function var getPlayerPiloted()
+

+
+
+

+Returns whether the craft is currently being piloted by a player. +

+

Returns

+
+

+A bool value whether the craft is currently being piloted by a player. +

+
+

+
+
+
+
+

+function double getReconstructionValue()
+

+
+
+

+
+
+
+
+

+function table<int, string> getScripts()
+

+
+
+

+Returns the scripts that are currently attached to the ship, in the form of a table with key = scriptIndex, value = scriptPath. +

+

Returns

+
+

+A table containing script paths by script index +

+
+

+
+
+
+
+

+function var getScriptValue(string key)
+

+
+
+

+Retrieves a custom value +

+

Parameters

+
+key +the name of the value as a string
+
+

Returns

+
+

+The value +

+
+

+
+
+
+
+

+function var getScriptValues()
+

+
+
+

+Returns the script values of the ship. These are the values that can be set via the setValue() and getValue() functions. +

+

Returns

+
+

+A table containing the script values by name +

+
+

+
+
+
+
+

+function var getSecuredScriptValues()
+

+
+
+

+Returns the secured values of all scripts attached to the ship. Contains a table per script. This table is the one that's passed to the script in the "restore(values)" function. +

+

Returns

+
+

+A table containing value tables by script index +

+
+

+
+
+
+
+

+function float, float getShields()
+

+
+
+

+Returns the max shields and percentage of the shields of the craft. +

+

Returns

+
+

+2 number values: 1. The maximum shields, 2. the percentage of the craft's shield, range 0 to 1 +

+
+

+
+
+
+
+

+function NamedFormat getStatusMessage()
+

+
+
+

+
+
+
+
+

+function pair... getSystems()
+

+
+
+

+Returns the currently equipped subsystems of the ship. The subsystems are stored in a table of the format subsystems = {}; subsystems[subsystem1] = {...}; subsystems[subsystem2] = {...}; ... etc. The keys of the returned table are the subsystems, the values are information about the subsystems. It's recommended to use printTable() to print the tables for inspection. +

+

Returns

+
+

+returns a table where the subsystems are the keys, and tables holding information about the subsystems are the values +

+
+

+
+
+
+
+

+function Format getTitle()
+

+
+
+

+
+
+
+
+

+function TorpedoTemplate... getTorpedoes()
+

+
+
+

+Returns the current torpedo shafts and misc info about the torpedo launcher. The shafts are stored in a table of the format shafts = {}; shafts[index1] = shaft1; shafts[index2] = shaft2; ... etc. The shaft indices are used as keys, the value is a TorpedoShaft class. Shaft with index -1 is the general torpedo storage. Note that the space for the shafts is an integer number of torpedoes, while the space for the general storage is torpedo space, which torpedoes take up and which can be extended with blocks. The second value is information about the launcher, with a few properties such as its space, occupied space, etc. It's recommended to use printTable() to print the complete table for inspection. +

+

Returns

+
+

+returns 2 values: 1. A table holding the current shafts of the ship; 2. a table containing more launcher info +

+
+

+
+
+
+
+

+function pair... getTurrets()
+

+
+
+

+Returns the currently equipped turrets of the ship. The turrets are stored in a table of the format turrets = {}; turrets[turret1] = {...}; turrets[turret2] = {...}; ... etc. The keys of the returned table are the turrets, the values are information about the turrets. It's recommended to use printTable() to print the tables for inspection. +

+

Returns

+
+

+returns a table where the turrets are the keys, and tables holding information about the turrets are the values +

+
+

+
+
+
+
+

+function bool getTurretSlotRequirementsFulfilled()
+

+
+
+

+Returns a boolean whether the turret slot requirements of the craft are all fulfilled. That's not fulfilled when there aren't enough slots for all turrets. +

+

Returns

+
+

+A boolean whether the requirements are all fulfilled. +

+
+

+
+
+
+
+
+
+ Overview +
Home + Functions + Search +
+
Search:
+Predefined Functions & Example Scripts +
Command +Entity +FactionDatabase +PlanGenerator +Player +Sector +Server +UsableInventoryItem +
+
+

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

+
+ +
+ + diff --git a/Documentation/ShipDatabaseEntry [Server].html b/Documentation/ShipDatabaseEntry [Server].html new file mode 100644 index 0000000..9bb1169 --- /dev/null +++ b/Documentation/ShipDatabaseEntry [Server].html @@ -0,0 +1,1608 @@ + + + ShipDatabaseEntry [Server] + + + + +
+
+

Avorion Script API Documentation

+
+
+ +
+
Search:
+ +
+

ShipDatabaseEntry [Server]

+

+This represents an interface to a database entry of a ship of a Player or Alliance (=ShipOwner). When writing values here, proceed with caution and note that many database entries that linked directly to the ship will be overridden steadily (when changed on the ship) while it's being simulated in a sector. It only makes sense to update these values if the ship is in background simulation, and you want to change properties of the ship.
Note: Changing the name or faction properties of the instance will make the instance point to another faction/ship of that faction. It will not change the faction or name of the ship. If you want to change the ship's name, use the setNewName() function. Changing the ship's faction is not possible with this.

This object is only available on the server. +

+
+
+

+function ShipDatabaseEntry(int faction, string name)
+

+
+
+

Returns

+
+

+A new instance of ShipDatabaseEntry +

+
+

+
+
+
+
+ +
property int faction
+
+
+
+
+ +
property string name
+
+
+
+
+ +
property int numBlocks[read-only]
+
+
+
+
+
+
+

+function var addScript(string path)
+

+
+
+

+Adds a script to the entity. For technical reasons, it's not possible to pass initialization values here. The script will be attached as if it was restored from database, so a call to initialize() won't have any parameters and _restoring will be set to true. +

+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var addScriptOnce(string path)
+

+
+
+

+Adds a script to the entity, if a script with the same name is not yet already attached. For technical reasons, it's not possible to pass initialization values here. The script will be attached as if it was restored from database, so a call to initialize() won't have any parameters and _restoring will be set to true. +

+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function Crew buildIdealCrew()
+

+
+
+

+
+
+
+
+

+function bool exists()
+

+
+
+

+
+
+
+
+

+function ShipAvailability getAvailability()
+

+
+
+

+
+
+
+
+

+function Captain getCaptain()
+

+
+
+

+
+
+
+
+

+function table<TradingGood, float>, float getCargo()
+

+
+
+

+Returns the current cargo and the cargo bay size. The cargo is stored in a table of the format result = { }; result[good1] = 5; result[good2] = 4; ... etc. The goods are used as keys, the amount of the good is the value. +

+

Returns

+
+

+returns 2 values: 1. A table holding the current cargo of the ship; 2. a number containing the cargo bay size of the ship +

+
+

+
+
+
+
+

+function int, int getCoordinates()
+

+
+
+

+
+
+
+
+

+function Crew getCrew()
+

+
+
+

+
+
+
+
+

+function bool getCrewRequirementsFulfilled()
+

+
+
+

+Returns a boolean whether the crew requirements of the craft are all fulfilled. These are things like overpopulation, not enough crew members, etc. +

+

Returns

+
+

+A boolean whether the crew requirements of the ship are all fulfilled. +

+
+

+
+
+
+
+

+function var getDocksEnabled()
+

+
+
+

+Returns information about the crafts's docks. If in transport mode, docks are disabled. Only valid for stations. +

+

Returns

+
+

+A bool value indicating whether docks are enabled or not +

+
+

+
+
+
+
+

+function double, double getDPSValues()
+

+
+
+

+Returns information about the ship's DPS. +

+

Returns

+
+

+2 values: Total turret DPS; Total fighter DPS +

+
+

+
+
+
+
+

+function var... getDurabilityProperties()
+

+
+
+

+Returns information about the ship's hull durability. Returns 5 values: The maximum durability, the durability percentage, range 0 to 1; The HP malus factor (from boarding or reconstruction), 0 to 1; A MalusReason enum value, the reason for the malus; A bool indicating if the ship is currently damaged (blocks are lost) +

+

Returns

+
+

+5 values: Maximum durability; durability percentage; malus factor; malus reason, damaged +

+
+

+
+
+
+
+

+function var... getEnergyProperties()
+

+
+
+

+Returns the energy properties of the craft. +

+

Returns

+
+

+Two values: required energy, produced energy in watts +

+
+

+
+
+
+
+

+function int getEntityType()
+

+
+
+

+
+
+
+
+

+function bool getFighterSquadRequirementsFulfilled()
+

+
+
+

+Returns a boolean whether the figher squad requirements of the craft are all fulfilled. That's not fulfilled when there aren't enough squads for fighters. +

+

Returns

+
+

+A boolean whether the requirements are all fulfilled. +

+
+

+
+
+
+
+

+function bool getFighterStartRequirementsFulfilled()
+

+
+
+

+Returns a boolean whether the figher start requirements of the craft are all fulfilled. That's not fulfilled when there aren't any starting positions for fighters. +

+

Returns

+
+

+A boolean whether the requirements are all fulfilled. +

+
+

+
+
+
+
+

+function float getFreeCargoSpace()
+

+
+
+

+Returns the amount of free cargo space on the ship. +

+

Returns

+
+

+A number value containing the free cargo bay space of the ship +

+
+

+
+
+
+
+

+function table<unsigned int, Squad>, table_t getHangar()
+

+
+
+

+Returns the current hangar squads and misc info about the hangar. The squads are stored in a table of the format squads = {}; squads[index1] = squad1; squads[index2] = squad2; ... etc. The squad indices are used as keys, the value is a Squad class. The second value is information about the hangar, with a few properties such as its space, occupied space, etc. It's recommended to use printTable() to print the complete table for inspection. +

+

Returns

+
+

+returns 2 values: 1. A table holding the current squads of the ship; 2. a table containing more hangar info +

+
+

+
+
+
+
+

+function var... getHyperspaceProperties()
+

+
+
+

+Returns the hyperspace range, if the ship can pass over rifts, hyperspace cooldown and if the hyperspace engine is currently impaired (blocked or distorted by enemies) . +

+

Returns

+
+

+returns 4 values: 1. A number containing the hyperspace range of the ship; 2. A boolean whether the ship can jump over rifts; 3. The hyperspace cooldown in seconds of the ship; 4. A boolean whether the hyperspace engine is currently impaired +

+
+

+
+
+
+
+

+function string getIcon()
+

+
+
+

+
+
+
+
+

+function table<unsigned int, Squad>, table_t getLightweightHangar()
+

+
+
+

+Returns the current hangar squads and misc info about the hangar. Lightweight version that will not return BlockPlans of fighters. The squads are stored in a table of the format squads = {}; squads[index1] = squad1; squads[index2] = squad2; ... etc. The squad indices are used as keys, the value is a Squad class. The second value is information about the hangar, with a few properties such as its space, occupied space, etc. It's recommended to use printTable() to print the complete table for inspection. +

+

Returns

+
+

+returns 2 values: 1. A table holding the current squads of the ship; 2. a table containing more hangar info +

+
+

+
+
+
+
+

+function Matrix getLocalPosition()
+

+
+
+

+
+
+
+
+

+function string getOrderInfo()
+

+
+
+

+
+
+
+
+

+function float getPaymentTime()
+

+
+
+

+
+
+
+
+

+function BlockPlan getPlan()
+

+
+
+

+
+
+
+
+

+function double getPlanValue()
+

+
+
+

+
+
+
+
+

+function var getPlayerPiloted()
+

+
+
+

+Returns whether the craft is currently being piloted by a player. +

+

Returns

+
+

+A bool value whether the craft is currently being piloted by a player. +

+
+

+
+
+
+
+

+function double getReconstructionValue()
+

+
+
+

+
+
+
+
+

+function table<int, string> getScripts()
+

+
+
+

+Returns the scripts that are currently attached to the ship, in the form of a table with key = scriptIndex, value = scriptPath. +

+

Returns

+
+

+A table containing script paths by script index +

+
+

+
+
+
+
+

+function var getScriptValue(string key)
+

+
+
+

+Retrieves a custom value +

+

Parameters

+
+key +the name of the value as a string
+
+

Returns

+
+

+The value +

+
+

+
+
+
+
+

+function var getScriptValues()
+

+
+
+

+Returns the script values of the ship. These are the values that can be set via the setValue() and getValue() functions. +

+

Returns

+
+

+A table containing the script values by name +

+
+

+
+
+
+
+

+function var getSecuredScriptValues()
+

+
+
+

+Returns the secured values of all scripts attached to the ship. Contains a table per script. This table is the one that's passed to the script in the "restore(values)" function. +

+

Returns

+
+

+A table containing value tables by script index +

+
+

+
+
+
+
+

+function float, float getShields()
+

+
+
+

+Returns the max shields and percentage of the shields of the craft. +

+

Returns

+
+

+2 number values: 1. The maximum shields, 2. the percentage of the craft's shield, range 0 to 1 +

+
+

+
+
+
+
+

+function NamedFormat getStatusMessage()
+

+
+
+

+
+
+
+
+

+function pair... getSystems()
+

+
+
+

+Returns the currently equipped subsystems of the ship. The subsystems are stored in a table of the format subsystems = {}; subsystems[subsystem1] = {...}; subsystems[subsystem2] = {...}; ... etc. The keys of the returned table are the subsystems, the values are information about the subsystems. It's recommended to use printTable() to print the tables for inspection. +

+

Returns

+
+

+returns a table where the subsystems are the keys, and tables holding information about the subsystems are the values +

+
+

+
+
+
+
+

+function Format getTitle()
+

+
+
+

+
+
+
+
+

+function TorpedoTemplate... getTorpedoes()
+

+
+
+

+Returns the current torpedo shafts and misc info about the torpedo launcher. The shafts are stored in a table of the format shafts = {}; shafts[index1] = shaft1; shafts[index2] = shaft2; ... etc. The shaft indices are used as keys, the value is a TorpedoShaft class. Shaft with index -1 is the general torpedo storage. Note that the space for the shafts is an integer number of torpedoes, while the space for the general storage is torpedo space, which torpedoes take up and which can be extended with blocks. The second value is information about the launcher, with a few properties such as its space, occupied space, etc. It's recommended to use printTable() to print the complete table for inspection. +

+

Returns

+
+

+returns 2 values: 1. A table holding the current shafts of the ship; 2. a table containing more launcher info +

+
+

+
+
+
+
+

+function pair... getTurrets()
+

+
+
+

+Returns the currently equipped turrets of the ship. The turrets are stored in a table of the format turrets = {}; turrets[turret1] = {...}; turrets[turret2] = {...}; ... etc. The keys of the returned table are the turrets, the values are information about the turrets. It's recommended to use printTable() to print the tables for inspection. +

+

Returns

+
+

+returns a table where the turrets are the keys, and tables holding information about the turrets are the values +

+
+

+
+
+
+
+

+function bool getTurretSlotRequirementsFulfilled()
+

+
+
+

+Returns a boolean whether the turret slot requirements of the craft are all fulfilled. That's not fulfilled when there aren't enough slots for all turrets. +

+

Returns

+
+

+A boolean whether the requirements are all fulfilled. +

+
+

+
+
+
+
+

+function var removeScript(var script)
+

+
+
+

+Removes a script from the entity. +

+

Parameters

+
+script +A path (fragment) or index of the script that should be removed.
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var setAvailability(ShipAvailability availability)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var setCaptain(Captain captain)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var setCargo(table_t cargo)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var setCoordinates(int x, int y)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var setCrew(Crew other)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var setDurabilityMalus(float malusFactor, DurabilityMalusReason reason)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var setDurabilityPercentage(float percentage)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var setHangar(table_t squads)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var setIcon(string icon)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var setLocalPosition(Matrix matrix)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var setNewName(string newName)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var setOrderInfo(string info)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var setPaymentTime(float timeSincePayDay)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var setPlan(BlockPlan plan)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var setReconstructionValue(double value)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var setScriptValue(string key, var value)
+

+
+
+

+Sets a custom value. +

+

Parameters

+
+key +A string that serves as the name of the value
+value +The value to save. Must be bool, number, string or nil. If nil is given, the value will be deleted.
+
+

Returns

+
+

+The previous value +

+
+

+
+
+
+
+

+function var setShieldPercentage(float percentage)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var setStatusMessage(NamedFormat status)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var setTitle(NamedFormat title)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var setTorpedoes(table_t torpedoes)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+
+
+ Overview +
Home + Functions + Search +
+
Search:
+Predefined Functions & Example Scripts +
Command +Entity +FactionDatabase +PlanGenerator +Player +Sector +Server +UsableInventoryItem +
+
+

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

+
+ +
+ + diff --git a/Documentation/ShipSystem.html b/Documentation/ShipSystem.html new file mode 100644 index 0000000..294a9d5 --- /dev/null +++ b/Documentation/ShipSystem.html @@ -0,0 +1,630 @@ + + + ShipSystem + + + + +
+
+

Avorion Script API Documentation

+
+
+ +
+
Search:
+
+
+ + + + + + + + + + + + + + + + + + + + + + + +
+ShipSystem +ShipSystem +

Properties
+entity +
+entityId +
+maxSockets +
+numSockets +
+numUpgrades +

Member Functions
+addUpgrade +
+clear +
+getProcessingPowerForSocket +
+getUpgrade +
+getUpgrades +
+isPermanent +
+removeUpgrade +
+setNumSockets +
+setUpgrade +
+swap +
+
+
+
+

ShipSystem

+
+
+

+function ShipSystem(var id)
+

+
+
+

Parameters

+
+id +The id of the entity this component belongs to, or the entity itself, must be an id of an existing entity or nil for the entity in the current script context
+
+

Returns

+
+

+A new instance of ShipSystem +

+
+

+
+
+
+
+ +
property Entity entity[read-only]
+
+
+
+
+ +
property uuid entityId[read-only]
+
+
+
+
+ +
property static unsigned int maxSockets[read-only]
+
+
+
+
+ +
property static int numSockets[read-only]
+
+
+
+
+ +
property unsigned int numUpgrades[read-only]
+
+
+
+
+
+
+

+function unsigned int addUpgrade(SystemUpgradeTemplate upgrade, bool permanent)
+

+
+
+

+
+
+
+
+

+function var clear()
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function double getProcessingPowerForSocket(unsigned int socket)
+

+
+
+

+
+
+
+
+

+function SystemUpgradeTemplate getUpgrade(unsigned int index)
+

+
+
+

+
+
+
+
+

+function pair... getUpgrades()
+

+
+
+

+
+
+
+
+

+function bool isPermanent(unsigned int socket)
+

+
+
+

+
+
+
+
+

+function var removeUpgrade(unsigned int slot)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var setNumSockets(unsigned int in)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var setUpgrade(SystemUpgradeTemplate upgrade, unsigned int socket, bool permanent)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var swap(unsigned int socketA, unsigned int socketB)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+
+
+ Overview +
Home + Functions + Search +
+
Search:
+Predefined Functions & Example Scripts +
Command +Entity +FactionDatabase +PlanGenerator +Player +Sector +Server +UsableInventoryItem +
+
+

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

+
+ +
+ + diff --git a/Documentation/ShipWindow.html b/Documentation/ShipWindow.html new file mode 100644 index 0000000..b6a8d6d --- /dev/null +++ b/Documentation/ShipWindow.html @@ -0,0 +1,854 @@ + + + ShipWindow + + + + +
+
+

Avorion Script API Documentation

+
+
+ +
+
Search:
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ShipWindow +ShipWindow +

Properties
+craftId +
+onSelectedFunction +
+center +
+height +
+index +
+layer +
+localCenter +
+localPosition +
+localRect +
+lower +
+mouseOver +
+position +
+rect +
+size +
+tooltip +
+tooltipWidth +
+upper +
+visible +
+width +

Member Functions
+activateAllTabs +
+activateTab +
+createTab +
+deactivateTab +
+getActiveTab +
+getTab +
+hide +
+moveTabToTheRight +
+moveTabToTheRight +
+selectTab +
+show +
+hide +
+isMouseOverAndUnobscured +
+show +
+
+
+
+

ShipWindow : UIElement

+

+This object is only available on the client. +

+
+
+

+function ShipWindow()
+

+
+
+

Returns

+
+

+A new instance of ShipWindow +

+
+

+
+
+
+
+ +
property Uuid craftId[read-only]
+
+
+
+
+ +
property string onSelectedFunction
+
+
+
+
+ +
property vec2 center
+
+
+
+
+ +
property float height
+
+
+
+
+ +
property int index[read-only]
+
+
+
+
+ +
property int layer
+
+
+
+
+ +
property vec2 localCenter[read-only]
+
+
+
+
+ +
property vec2 localPosition[read-only]
+
+
+
+
+ +
property Rect localRect[read-only]
+
+
+
+
+ +
property vec2 lower
+
+
+
+
+ +
property bool mouseOver[read-only]
+
+
+
+
+ +
property vec2 position
+
+
+
+
+ +
property Rect rect
+
+
+
+
+ +
property vec2 size
+
+
+
+
+ +
property var tooltip
+
+
+
+
+ +
property int tooltipWidth[write-only]
+
+
+
+
+ +
property vec2 upper
+
+
+
+
+ +
property bool visible
+
+
+
+
+ +
property float width
+
+
+
+
+
+
+

+function var activateAllTabs()
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var activateTab(Tab tab)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function Tab createTab(string name, string icon, string description)
+

+
+
+

+
+
+
+
+

+function var deactivateTab(Tab tab)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function Tab getActiveTab()
+

+
+
+

+
+
+
+
+

+function Tab getTab(string name)
+

+
+
+

+
+
+
+
+

+function var hide()
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var moveTabToTheRight(Tab tab)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var moveTabToTheRight(Tab tab, int pos)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var selectTab(var val)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var show(Uuid id)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var hide()
+

+
+
+

+Inherited from UIElement + +

+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function bool isMouseOverAndUnobscured()
+

+
+
+

+Inherited from UIElement + +

+

+
+
+
+
+

+function var show()
+

+
+
+

+Inherited from UIElement + +

+

Returns

+
+

+nothing +

+
+

+
+
+
+
+
+
+ Overview +
Home + Functions + Search +
+
Search:
+Predefined Functions & Example Scripts +
Command +Entity +FactionDatabase +PlanGenerator +Player +Sector +Server +UsableInventoryItem +
+
+

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

+
+ +
+ + diff --git a/Documentation/Slider.html b/Documentation/Slider.html new file mode 100644 index 0000000..5ba1d20 --- /dev/null +++ b/Documentation/Slider.html @@ -0,0 +1,930 @@ + + + Slider + + + + +
+
+

Avorion Script API Documentation

+
+
+ +
+
Search:
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Slider +Slider +

Properties
+active +
+caption +
+color +
+description +
+glowColor +
+max +
+min +
+onChangedFunction +
+onMouseUpChangedFunction +
+segments +
+showCaption +
+showDescription +
+showMaxValue +
+showScale +
+showValue +
+sliderPosition +
+stepSize +
+unit +
+value +
+center +
+height +
+index +
+layer +
+localCenter +
+localPosition +
+localRect +
+lower +
+mouseOver +
+position +
+rect +
+size +
+tooltip +
+tooltipWidth +
+upper +
+visible +
+width +

Member Functions
+setMaxNoCallback +
+setMinNoCallback +
+setNumSegmentsNoCallback +
+setRatio +
+setSliderPositionNoCallback +
+setValueNoCallback +
+hide +
+isMouseOverAndUnobscured +
+show +
+
+
+
+

Slider : UIElement

+

+This object is only available on the client. +

+
+
+

+function Slider(int index)
+

+
+
+

Returns

+
+

+A new instance of Slider +

+
+

+
+
+
+
+ +
property bool active
+
+
+
+
+ +
property string caption[write-only]
+
+
+
+
+ +
property var color[write-only]
+
+
+
+
+ +
property string description[write-only]
+
+
+
+
+ +
property var glowColor[write-only]
+
+
+
+
+ +
property float max
+
+
+
+
+ +
property float min
+
+
+
+
+ +
property string onChangedFunction
+
+
+
+
+ +
property string onMouseUpChangedFunction
+
+
+
+
+ +
property unsigned int segments[write-only]
+
+
+
+
+ +
property bool showCaption[write-only]
+
+
+
+
+ +
property bool showDescription[write-only]
+
+
+
+
+ +
property bool showMaxValue[write-only]
+
+
+
+
+ +
property bool showScale[write-only]
+
+
+
+
+ +
property bool showValue[write-only]
+
+
+
+
+ +
property float sliderPosition
+
+
+
+
+ +
property float stepSize[write-only]
+
+
+
+
+ +
property string unit[write-only]
+
+
+
+
+ +
property float value
+
+
+
+
+ +
property vec2 center
+
+
+
+
+ +
property float height
+
+
+
+
+ +
property int index[read-only]
+
+
+
+
+ +
property int layer
+
+
+
+
+ +
property vec2 localCenter[read-only]
+
+
+
+
+ +
property vec2 localPosition[read-only]
+
+
+
+
+ +
property Rect localRect[read-only]
+
+
+
+
+ +
property vec2 lower
+
+
+
+
+ +
property bool mouseOver[read-only]
+
+
+
+
+ +
property vec2 position
+
+
+
+
+ +
property Rect rect
+
+
+
+
+ +
property vec2 size
+
+
+
+
+ +
property var tooltip
+
+
+
+
+ +
property int tooltipWidth[write-only]
+
+
+
+
+ +
property vec2 upper
+
+
+
+
+ +
property bool visible
+
+
+
+
+ +
property float width
+
+
+
+
+
+
+

+function var setMaxNoCallback(float in)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var setMinNoCallback(float in)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var setNumSegmentsNoCallback(unsigned int in)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var setRatio(float inFrom, float inTo)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var setSliderPositionNoCallback(float in)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var setValueNoCallback(float in)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var hide()
+

+
+
+

+Inherited from UIElement + +

+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function bool isMouseOverAndUnobscured()
+

+
+
+

+Inherited from UIElement + +

+

+
+
+
+
+

+function var show()
+

+
+
+

+Inherited from UIElement + +

+

Returns

+
+

+nothing +

+
+

+
+
+
+
+
+
+ Overview +
Home + Functions + Search +
+
Search:
+Predefined Functions & Example Scripts +
Command +Entity +FactionDatabase +PlanGenerator +Player +Sector +Server +UsableInventoryItem +
+
+

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

+
+ +
+ + diff --git a/Documentation/SoundSource.html b/Documentation/SoundSource.html new file mode 100644 index 0000000..8d51a5b --- /dev/null +++ b/Documentation/SoundSource.html @@ -0,0 +1,549 @@ + + + SoundSource + + + + +
+
+

Avorion Script API Documentation

+
+
+ +
+
Search:
+
+
+ + + + + + + + + + + + + + + + + + +
+SoundSource +SoundSource +

Properties
+is3D +
+loop +
+maxRadius +
+minRadius +
+playing +
+position +
+volume +

Member Functions
+play +
+stop +
+terminate +
+
+
+
+

SoundSource

+

+Sound sources are sound emitters. These objects are meant for long, looping and constant sounds. If you want to play a quick sound (and only once) use the playSound() function. You have to keep this object around in your script. Once the object gets destroyed by the lua garbage collector, the sound will stop playing. If you want to destroy the object actively and free the sound resource, use its terminate() function.

This object is only available on the client. +

+
+
+

+function SoundSource(string soundName, var position, var radius)
+

+
+
+

+Creates a new sound source. +

+

Returns

+
+

+A new instance of SoundSource +

+
+

+
+
+
+
+ +
property bool is3D[read-only]
+
+
+
+
+ +
property bool loop
+
+
+
+
+ +
property float maxRadius
+
+
+
+
+ +
property float minRadius
+
+
+
+
+ +
property bool playing[read-only]
+
+
+
+
+ +
property vec3 position
+
+
+
+
+ +
property float volume
+
+
+
+
+
+
+

+function var play()
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var stop()
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var terminate()
+

+
+
+

+Stops the sound and frees all resources connected to it. The SoundSource object will be inaccessible after this function. +

+

Returns

+
+

+nothing +

+
+

+
+
+
+
+
+
+ Overview +
Home + Functions + Search +
+
Search:
+Predefined Functions & Example Scripts +
Command +Entity +FactionDatabase +PlanGenerator +Player +Sector +Server +UsableInventoryItem +
+
+

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

+
+ +
+ + diff --git a/Documentation/Sphere.html b/Documentation/Sphere.html new file mode 100644 index 0000000..b59c055 --- /dev/null +++ b/Documentation/Sphere.html @@ -0,0 +1,451 @@ + + + Sphere + + + + +
+
+

Avorion Script API Documentation

+
+
+ +
+
Search:
+
+
+ + + + + + + + + + + +
+Sphere +Sphere +

Properties
+center +
+radius +

Member Functions
+intersect +
+
+
+
+

Sphere

+
+
+

+function Sphere(vec3 center, float radius)
+

+
+
+

Returns

+
+

+A new instance of Sphere +

+
+

+
+
+
+
+ +
property vec3 center
+
+
+
+
+ +
property float radius
+
+
+
+
+
+
+

+function bool intersect(Sphere other)
+

+
+
+

+
+
+
+
+
+
+ Overview +
Home + Functions + Search +
+
Search:
+Predefined Functions & Example Scripts +
Command +Entity +FactionDatabase +PlanGenerator +Player +Sector +Server +UsableInventoryItem +
+
+

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

+
+ +
+ + diff --git a/Documentation/Squad.html b/Documentation/Squad.html new file mode 100644 index 0000000..43c5981 --- /dev/null +++ b/Documentation/Squad.html @@ -0,0 +1,505 @@ + + + Squad + + + + +
+
+

Avorion Script API Documentation

+
+
+ +
+
Search:
+
+
+ + + + + + + + + + + + + + + +
+Squad +Squad +

Properties
+index +
+name +
+numFighters +

Member Functions
+addFighter +
+getBlueprint +
+getFighter +
+getFighters +
+
+
+
+

Squad

+
+
+

+function Squad()
+

+
+
+

Returns

+
+

+A new instance of Squad +

+
+

+
+
+
+
+ +
property unsigned int index[read-only]
+
+
+
+
+ +
property string name
+
+
+
+
+ +
property var numFighters[read-only]
+
+
+
+
+
+
+

+function var addFighter(FighterTemplate fighter)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function FighterTemplate getBlueprint()
+

+
+
+

+
+
+
+
+

+function FighterTemplate getFighter(unsigned int index)
+

+
+
+

+
+
+
+
+

+function FighterTemplate... getFighters()
+

+
+
+

+
+
+
+
+
+
+ Overview +
Home + Functions + Search +
+
Search:
+Predefined Functions & Example Scripts +
Command +Entity +FactionDatabase +PlanGenerator +Player +Sector +Server +UsableInventoryItem +
+
+

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

+
+ +
+ + diff --git a/Documentation/StatisticsBar.html b/Documentation/StatisticsBar.html new file mode 100644 index 0000000..18a6784 --- /dev/null +++ b/Documentation/StatisticsBar.html @@ -0,0 +1,710 @@ + + + StatisticsBar + + + + +
+
+

Avorion Script API Documentation

+
+
+ +
+
Search:
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+StatisticsBar +StatisticsBar +

Properties
+color +
+name +
+value +
+center +
+height +
+index +
+layer +
+localCenter +
+localPosition +
+localRect +
+lower +
+mouseOver +
+position +
+rect +
+size +
+tooltip +
+tooltipWidth +
+upper +
+visible +
+width +

Member Functions
+setRange +
+setValue +
+hide +
+isMouseOverAndUnobscured +
+show +
+
+
+
+

StatisticsBar : UIElement

+

+This object is only available on the client. +

+
+
+

+function StatisticsBar(int index)
+

+
+
+

Returns

+
+

+A new instance of StatisticsBar +

+
+

+
+
+
+
+ +
property Color color[write-only]
+
+
+
+
+ +
property string name[write-only]
+
+
+
+
+ +
property float value[write-only]
+
+
+
+
+ +
property vec2 center
+
+
+
+
+ +
property float height
+
+
+
+
+ +
property int index[read-only]
+
+
+
+
+ +
property int layer
+
+
+
+
+ +
property vec2 localCenter[read-only]
+
+
+
+
+ +
property vec2 localPosition[read-only]
+
+
+
+
+ +
property Rect localRect[read-only]
+
+
+
+
+ +
property vec2 lower
+
+
+
+
+ +
property bool mouseOver[read-only]
+
+
+
+
+ +
property vec2 position
+
+
+
+
+ +
property Rect rect
+
+
+
+
+ +
property vec2 size
+
+
+
+
+ +
property var tooltip
+
+
+
+
+ +
property int tooltipWidth[write-only]
+
+
+
+
+ +
property vec2 upper
+
+
+
+
+ +
property bool visible
+
+
+
+
+ +
property float width
+
+
+
+
+
+
+

+function var setRange(float minRange, float maxRange)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var setValue(float value, string name, Color color)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var hide()
+

+
+
+

+Inherited from UIElement + +

+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function bool isMouseOverAndUnobscured()
+

+
+
+

+Inherited from UIElement + +

+

+
+
+
+
+

+function var show()
+

+
+
+

+Inherited from UIElement + +

+

Returns

+
+

+nothing +

+
+

+
+
+
+
+
+
+ Overview +
Home + Functions + Search +
+
Search:
+Predefined Functions & Example Scripts +
Command +Entity +FactionDatabase +PlanGenerator +Player +Sector +Server +UsableInventoryItem +
+
+

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

+
+ +
+ + diff --git a/Documentation/StrategyState.html b/Documentation/StrategyState.html new file mode 100644 index 0000000..9a559cd --- /dev/null +++ b/Documentation/StrategyState.html @@ -0,0 +1,510 @@ + + + StrategyState + + + + +
+
+

Avorion Script API Documentation

+
+
+ +
+
Search:
+
+
+ + + + + + + + + + + + + +
+StrategyState +StrategyState +

Properties

Member Functions
+addToSelection +
+centerCameraOnSelection +
+clearSelection +
+getSelection +
+toggleSelect +
+
+
+
+

StrategyState

+

+This object is only available on the client. +

+
+
+

+function StrategyState()
+

+
+
+

Returns

+
+

+A new instance of StrategyState +

+
+

+
+
+
+
+

+function var addToSelection(var entity)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var centerCameraOnSelection()
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var clearSelection()
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function Uuid... getSelection()
+

+
+
+

+
+
+
+
+

+function var toggleSelect(var entity)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+
+
+ Overview +
Home + Functions + Search +
+
Search:
+Predefined Functions & Example Scripts +
Command +Entity +FactionDatabase +PlanGenerator +Player +Sector +Server +UsableInventoryItem +
+
+

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

+
+ +
+ + diff --git a/Documentation/StructuralIntegrity.html b/Documentation/StructuralIntegrity.html new file mode 100644 index 0000000..76a65ea --- /dev/null +++ b/Documentation/StructuralIntegrity.html @@ -0,0 +1,460 @@ + + + StructuralIntegrity + + + + +
+
+

Avorion Script API Documentation

+
+
+ +
+
Search:
+
+
+ + + + + + + + + + +
+StructuralIntegrity +StructuralIntegrity +

Properties

Member Functions
+getProtectedBlocks +
+hasProtection +
+
+
+
+

StructuralIntegrity

+
+
+

+function StructuralIntegrity(var id)
+

+
+
+

Parameters

+
+id +The id of the entity this component belongs to, or the entity itself, must be an id of an existing entity or nil for the entity in the current script context
+
+

Returns

+
+

+A new instance of StructuralIntegrity +

+
+

+
+
+
+
+

+function int... getProtectedBlocks()
+

+
+
+

+Returns the indices of the blocks that are protected by a integrity field +

+

+
+
+
+
+

+function bool hasProtection(int index)
+

+
+
+

+Returns whether the block at the index is protected by a integrity field +

+

Parameters

+
+index +Index of the block
+
+

+
+
+
+
+
+
+ Overview +
Home + Functions + Search +
+
Search:
+Predefined Functions & Example Scripts +
Command +Entity +FactionDatabase +PlanGenerator +Player +Sector +Server +UsableInventoryItem +
+
+

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

+
+ +
+ + diff --git a/Documentation/SystemUpgradeLoot.html b/Documentation/SystemUpgradeLoot.html new file mode 100644 index 0000000..c630104 --- /dev/null +++ b/Documentation/SystemUpgradeLoot.html @@ -0,0 +1,434 @@ + + + SystemUpgradeLoot + + + + +
+
+

Avorion Script API Documentation

+
+
+ +
+
Search:
+
+
+ + + + + + + + + +
+SystemUpgradeLoot +SystemUpgradeLoot +

Properties
+upgrade +

Member Functions
+
+
+
+

SystemUpgradeLoot

+
+
+

+function SystemUpgradeLoot(var id)
+

+
+
+

Parameters

+
+id +The id of the entity this component belongs to, or the entity itself, must be an id of an existing entity or nil for the entity in the current script context
+
+

Returns

+
+

+A new instance of SystemUpgradeLoot +

+
+

+
+
+
+
+ +
property SystemUpgradeTemplate upgrade
+
+
+
+
+
+
+
+
+ Overview +
Home + Functions + Search +
+
Search:
+Predefined Functions & Example Scripts +
Command +Entity +FactionDatabase +PlanGenerator +Player +Sector +Server +UsableInventoryItem +
+
+

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

+
+ +
+ + diff --git a/Documentation/SystemUpgradeTemplate.html b/Documentation/SystemUpgradeTemplate.html new file mode 100644 index 0000000..b6e6387 --- /dev/null +++ b/Documentation/SystemUpgradeTemplate.html @@ -0,0 +1,563 @@ + + + SystemUpgradeTemplate + + + + +
+
+

Avorion Script API Documentation

+
+
+ +
+
Search:
+
+
+ + + + + + + + + + + + + + + + + + + + + + + +
+SystemUpgradeTemplate +SystemUpgradeTemplate +

Properties
+favorite +
+icon +
+itemType +
+missionRelevant +
+name +
+price +
+rarity +
+recent +
+script +
+seed +
+stackable +
+tooltip +
+trash +

Member Functions
+__eq +
+getEnergy +
+
+
+
+

SystemUpgradeTemplate

+
+
+

+function SystemUpgradeTemplate(string script, Rarity rarity, Seed seed)
+

+
+
+

Returns

+
+

+A new instance of SystemUpgradeTemplate +

+
+

+
+
+
+
+ +
property bool favorite
+
+
+
+
+ +
property string icon[read-only]
+
+
+
+
+ +
property InventoryItemType itemType[read-only]
+
+
+
+
+ +
property bool missionRelevant[read-only]
+
+
+
+
+ +
property string name[read-only]
+
+
+
+
+ +
property int price[read-only]
+
+
+
+
+ +
property Rarity rarity
+
+
+
+
+ +
property bool recent
+
+
+
+
+ +
property string script
+
+
+
+
+ +
property Seed seed
+
+
+
+
+ +
property bool stackable[read-only]
+
+
+
+
+ +
property UserObject tooltip[read-only]
+
+
+
+
+ +
property bool trash
+
+
+
+
+
+
+

+function bool __eq(var other)
+

+
+
+

+
+
+
+
+

+function double getEnergy(bool permanent)
+

+
+
+

+
+
+
+
+
+
+ Overview +
Home + Functions + Search +
+
Search:
+Predefined Functions & Example Scripts +
Command +Entity +FactionDatabase +PlanGenerator +Player +Sector +Server +UsableInventoryItem +
+
+

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

+
+ +
+ + diff --git a/Documentation/Tab.html b/Documentation/Tab.html new file mode 100644 index 0000000..aad77f1 --- /dev/null +++ b/Documentation/Tab.html @@ -0,0 +1,1465 @@ + + + Tab + + + + +
+
+

Avorion Script API Documentation

+
+
+ +
+
Search:
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Tab +Tab +

Properties
+description +
+icon +
+isActiveTab +
+name +
+onSelectedFunction +
+onShowFunction +
+center +
+height +
+index +
+layer +
+localCenter +
+localPosition +
+localRect +
+lower +
+mouseOver +
+position +
+rect +
+size +
+tooltip +
+tooltipWidth +
+upper +
+visible +
+width +

Member Functions
+clear +
+createAllianceEmblem +
+createArrowLine +
+createButton +
+createCaptainIcon +
+createCaptainProfile +
+createCheckBox +
+createComboBox +
+createContainer +
+createContextMenu +
+createCraftPortrait +
+createCrewBar +
+createFrame +
+createInputWindow +
+createInventorySelection +
+createLabel +
+createLine +
+createListBox +
+createListBoxEx +
+createMapArrowLine +
+createMapIcon +
+createMultiLineTextBox +
+createNumbersBar +
+createPicture +
+createPlanDisplayer +
+createProgressBar +
+createRect +
+createRoundButton +
+createSavedDesignsSelection +
+createScrollFrame +
+createSelection +
+createSlider +
+createStatisticsBar +
+createTabbedWindow +
+createTextBox +
+createTextField +
+createTooltipDisplayer +
+createTree +
+createValueComboBox +
+createWindow +
+hide +
+isMouseOverAndUnobscured +
+show +
+
+
+
+

Tab : UIContainer

+

+This object is only available on the client. +

+
+
+

+function Tab(int index)
+

+
+
+

Returns

+
+

+A new instance of Tab +

+
+

+
+
+
+
+ +
property string description
+
+
+
+
+ +
property string icon
+
+
+
+
+ +
property bool isActiveTab[read-only]
+
+
+
+
+ +
property string name[read-only]
+
+
+
+
+ +
property string onSelectedFunction
+
+
+
+
+ +
property string onShowFunction
+
+
+
+
+ +
property vec2 center
+
+
+
+
+ +
property float height
+
+
+
+
+ +
property int index[read-only]
+
+
+
+
+ +
property int layer
+
+
+
+
+ +
property vec2 localCenter[read-only]
+
+
+
+
+ +
property vec2 localPosition[read-only]
+
+
+
+
+ +
property Rect localRect[read-only]
+
+
+
+
+ +
property vec2 lower
+
+
+
+
+ +
property bool mouseOver[read-only]
+
+
+
+
+ +
property vec2 position
+
+
+
+
+ +
property Rect rect
+
+
+
+
+ +
property vec2 size
+
+
+
+
+ +
property var tooltip
+
+
+
+
+ +
property int tooltipWidth[write-only]
+
+
+
+
+ +
property vec2 upper
+
+
+
+
+ +
property bool visible
+
+
+
+
+ +
property float width
+
+
+
+
+
+
+

+function var clear()
+

+
+
+

+Inherited from UIContainer + +

+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function AllianceEmblem createAllianceEmblem(Rect rect, int allianceIndex)
+

+
+
+

+Inherited from UIContainer + +

+

+
+
+
+
+

+function ArrowLine createArrowLine()
+

+
+
+

+Inherited from UIContainer + +

+

+
+
+
+
+

+function Button createButton(Rect rect, string caption, string function)
+

+
+
+

+Inherited from UIContainer + +

+

+
+
+
+
+

+function CaptainIcon createCaptainIcon(Rect rect)
+

+
+
+

+Inherited from UIContainer + +

+

+
+
+
+
+

+function CaptainProfile createCaptainProfile(Rect rect)
+

+
+
+

+Inherited from UIContainer + +

+

+
+
+
+
+

+function CheckBox createCheckBox(Rect rect, string caption, string onCheckedFunction)
+

+
+
+

+Inherited from UIContainer + +

+

+
+
+
+
+

+function ComboBox createComboBox(Rect rect, string onSelectedFunction)
+

+
+
+

+Inherited from UIContainer + +

+

+
+
+
+
+

+function UIContainer createContainer(Rect rect)
+

+
+
+

+Inherited from UIContainer + +

+

+
+
+
+
+

+function ContextMenu createContextMenu()
+

+
+
+

+Inherited from UIContainer + +

+

+
+
+
+
+

+function CraftPortrait createCraftPortrait(Rect rect, string function)
+

+
+
+

+Inherited from UIContainer + +

+

+
+
+
+
+

+function CrewBar createCrewBar(Rect rect)
+

+
+
+

+Inherited from UIContainer + +

+

+
+
+
+
+

+function Frame createFrame(Rect rect)
+

+
+
+

+Inherited from UIContainer + +

+

+
+
+
+
+

+function InputWindow createInputWindow()
+

+
+
+

+Inherited from UIContainer + +

+

+
+
+
+
+

+function InventorySelection createInventorySelection(Rect rect, int width)
+

+
+
+

+Inherited from UIContainer + +

+

+
+
+
+
+

+function Label createLabel(var position, string caption, int fontSize)
+

+
+
+

+Inherited from UIContainer + +

+

+
+
+
+
+

+function Line createLine(vec2 a, vec2 b)
+

+
+
+

+Inherited from UIContainer + +

+

+
+
+
+
+

+function ListBox createListBox(Rect rect)
+

+
+
+

+Inherited from UIContainer + +

+

+
+
+
+
+

+function ListBoxEx createListBoxEx(Rect rect)
+

+
+
+

+Inherited from UIContainer + +

+

+
+
+
+
+

+function MapArrowLine createMapArrowLine()
+

+
+
+

+Inherited from UIContainer + +

+

+
+
+
+
+

+function MapIcon createMapIcon(string texture, ivec2 coordinates, Color [or nil] color)
+

+
+
+

+Inherited from UIContainer + +

+

+
+
+
+
+

+function MultiLineTextBox createMultiLineTextBox(Rect rect)
+

+
+
+

+Inherited from UIContainer + +

+

+
+
+
+
+

+function NumbersBar createNumbersBar(Rect rect)
+

+
+
+

+Inherited from UIContainer + +

+

+
+
+
+
+

+function Picture createPicture(Rect rect, string path)
+

+
+
+

+Inherited from UIContainer + +

+

+
+
+
+
+

+function PlanDisplayer createPlanDisplayer(Rect rect)
+

+
+
+

+Inherited from UIContainer + +

+

+
+
+
+
+

+function ProgressBar createProgressBar(Rect rect, Color color)
+

+
+
+

+Inherited from UIContainer + +

+

+
+
+
+
+

+function UIRect createRect(Rect rect, Color color)
+

+
+
+

+Inherited from UIContainer + +

+

+
+
+
+
+

+function Button createRoundButton(Rect rect, string icon, string function)
+

+
+
+

+Inherited from UIContainer + +

+

+
+
+
+
+

+function SavedDesignsSelection createSavedDesignsSelection(Rect rect, int width)
+

+
+
+

+Inherited from UIContainer + +

+

+
+
+
+
+

+function ScrollFrame createScrollFrame(Rect rect)
+

+
+
+

+Inherited from UIContainer + +

+

+
+
+
+
+

+function Selection createSelection(Rect rect, int width)
+

+
+
+

+Inherited from UIContainer + +

+

+
+
+
+
+

+function Slider createSlider(Rect rect, int min, int max, int steps, string caption, string onValueChangedFunction)
+

+
+
+

+Inherited from UIContainer + +

+

+
+
+
+
+

+function StatisticsBar createStatisticsBar(Rect rect, Color color)
+

+
+
+

+Inherited from UIContainer + +

+

+
+
+
+
+

+function TabbedWindow createTabbedWindow(Rect rect)
+

+
+
+

+Inherited from UIContainer + +

+

+
+
+
+
+

+function TextBox createTextBox(Rect rect, string onTextChangedFunction)
+

+
+
+

+Inherited from UIContainer + +

+

+
+
+
+
+

+function TextField createTextField(Rect rect, string text)
+

+
+
+

+Inherited from UIContainer + +

+

+
+
+
+
+

+function TooltipDisplayer createTooltipDisplayer(Rect rect)
+

+
+
+

+Inherited from UIContainer + +

+

+
+
+
+
+

+function Tree createTree(Rect rect)
+

+
+
+

+Inherited from UIContainer + +

+

+
+
+
+
+

+function ValueComboBox createValueComboBox(Rect rect, string onSelectedFunction)
+

+
+
+

+Inherited from UIContainer + +

+

+
+
+
+
+

+function Window createWindow(Rect rect)
+

+
+
+

+Inherited from UIContainer + +

+

+
+
+
+
+

+function var hide()
+

+
+
+

+Inherited from UIElement + +

+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function bool isMouseOverAndUnobscured()
+

+
+
+

+Inherited from UIElement + +

+

+
+
+
+
+

+function var show()
+

+
+
+

+Inherited from UIElement + +

+

Returns

+
+

+nothing +

+
+

+
+
+
+
+
+
+ Overview +
Home + Functions + Search +
+
Search:
+Predefined Functions & Example Scripts +
Command +Entity +FactionDatabase +PlanGenerator +Player +Sector +Server +UsableInventoryItem +
+
+

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

+
+ +
+ + diff --git a/Documentation/TabbedWindow.html b/Documentation/TabbedWindow.html new file mode 100644 index 0000000..5d95dcc --- /dev/null +++ b/Documentation/TabbedWindow.html @@ -0,0 +1,1611 @@ + + + TabbedWindow + + + + +
+
+

Avorion Script API Documentation

+
+
+ +
+
Search:
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+TabbedWindow +TabbedWindow +

Properties
+onSelectedFunction +
+center +
+height +
+index +
+layer +
+localCenter +
+localPosition +
+localRect +
+lower +
+mouseOver +
+position +
+rect +
+size +
+tooltip +
+tooltipWidth +
+upper +
+visible +
+width +

Member Functions
+activateAllTabs +
+activateTab +
+createTab +
+deactivateTab +
+getActiveTab +
+getTab +
+hide +
+moveTabToPosition +
+moveTabToTheRight +
+selectTab +
+show +
+clear +
+createAllianceEmblem +
+createArrowLine +
+createButton +
+createCaptainIcon +
+createCaptainProfile +
+createCheckBox +
+createComboBox +
+createContainer +
+createContextMenu +
+createCraftPortrait +
+createCrewBar +
+createFrame +
+createInputWindow +
+createInventorySelection +
+createLabel +
+createLine +
+createListBox +
+createListBoxEx +
+createMapArrowLine +
+createMapIcon +
+createMultiLineTextBox +
+createNumbersBar +
+createPicture +
+createPlanDisplayer +
+createProgressBar +
+createRect +
+createRoundButton +
+createSavedDesignsSelection +
+createScrollFrame +
+createSelection +
+createSlider +
+createStatisticsBar +
+createTabbedWindow +
+createTextBox +
+createTextField +
+createTooltipDisplayer +
+createTree +
+createValueComboBox +
+createWindow +
+hide +
+isMouseOverAndUnobscured +
+show +
+
+
+
+

TabbedWindow : UIContainer

+

+This object is only available on the client. +

+
+
+

+function TabbedWindow(int index)
+

+
+
+

Returns

+
+

+A new instance of TabbedWindow +

+
+

+
+
+
+
+ +
property string onSelectedFunction
+
+
+
+
+ +
property vec2 center
+
+
+
+
+ +
property float height
+
+
+
+
+ +
property int index[read-only]
+
+
+
+
+ +
property int layer
+
+
+
+
+ +
property vec2 localCenter[read-only]
+
+
+
+
+ +
property vec2 localPosition[read-only]
+
+
+
+
+ +
property Rect localRect[read-only]
+
+
+
+
+ +
property vec2 lower
+
+
+
+
+ +
property bool mouseOver[read-only]
+
+
+
+
+ +
property vec2 position
+
+
+
+
+ +
property Rect rect
+
+
+
+
+ +
property vec2 size
+
+
+
+
+ +
property var tooltip
+
+
+
+
+ +
property int tooltipWidth[write-only]
+
+
+
+
+ +
property vec2 upper
+
+
+
+
+ +
property bool visible
+
+
+
+
+ +
property float width
+
+
+
+
+
+
+

+function var activateAllTabs()
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var activateTab(Tab tab)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function Tab createTab(string name, string icon, string description)
+

+
+
+

+
+
+
+
+

+function var deactivateTab(Tab tab)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function Tab getActiveTab()
+

+
+
+

+
+
+
+
+

+function Tab getTab(string name)
+

+
+
+

+
+
+
+
+

+function var hide()
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var moveTabToPosition(Tab tab, int pos)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var moveTabToTheRight(Tab tab)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var selectTab(Tab tab)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var show()
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var clear()
+

+
+
+

+Inherited from UIContainer + +

+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function AllianceEmblem createAllianceEmblem(Rect rect, int allianceIndex)
+

+
+
+

+Inherited from UIContainer + +

+

+
+
+
+
+

+function ArrowLine createArrowLine()
+

+
+
+

+Inherited from UIContainer + +

+

+
+
+
+
+

+function Button createButton(Rect rect, string caption, string function)
+

+
+
+

+Inherited from UIContainer + +

+

+
+
+
+
+

+function CaptainIcon createCaptainIcon(Rect rect)
+

+
+
+

+Inherited from UIContainer + +

+

+
+
+
+
+

+function CaptainProfile createCaptainProfile(Rect rect)
+

+
+
+

+Inherited from UIContainer + +

+

+
+
+
+
+

+function CheckBox createCheckBox(Rect rect, string caption, string onCheckedFunction)
+

+
+
+

+Inherited from UIContainer + +

+

+
+
+
+
+

+function ComboBox createComboBox(Rect rect, string onSelectedFunction)
+

+
+
+

+Inherited from UIContainer + +

+

+
+
+
+
+

+function UIContainer createContainer(Rect rect)
+

+
+
+

+Inherited from UIContainer + +

+

+
+
+
+
+

+function ContextMenu createContextMenu()
+

+
+
+

+Inherited from UIContainer + +

+

+
+
+
+
+

+function CraftPortrait createCraftPortrait(Rect rect, string function)
+

+
+
+

+Inherited from UIContainer + +

+

+
+
+
+
+

+function CrewBar createCrewBar(Rect rect)
+

+
+
+

+Inherited from UIContainer + +

+

+
+
+
+
+

+function Frame createFrame(Rect rect)
+

+
+
+

+Inherited from UIContainer + +

+

+
+
+
+
+

+function InputWindow createInputWindow()
+

+
+
+

+Inherited from UIContainer + +

+

+
+
+
+
+

+function InventorySelection createInventorySelection(Rect rect, int width)
+

+
+
+

+Inherited from UIContainer + +

+

+
+
+
+
+

+function Label createLabel(var position, string caption, int fontSize)
+

+
+
+

+Inherited from UIContainer + +

+

+
+
+
+
+

+function Line createLine(vec2 a, vec2 b)
+

+
+
+

+Inherited from UIContainer + +

+

+
+
+
+
+

+function ListBox createListBox(Rect rect)
+

+
+
+

+Inherited from UIContainer + +

+

+
+
+
+
+

+function ListBoxEx createListBoxEx(Rect rect)
+

+
+
+

+Inherited from UIContainer + +

+

+
+
+
+
+

+function MapArrowLine createMapArrowLine()
+

+
+
+

+Inherited from UIContainer + +

+

+
+
+
+
+

+function MapIcon createMapIcon(string texture, ivec2 coordinates, Color [or nil] color)
+

+
+
+

+Inherited from UIContainer + +

+

+
+
+
+
+

+function MultiLineTextBox createMultiLineTextBox(Rect rect)
+

+
+
+

+Inherited from UIContainer + +

+

+
+
+
+
+

+function NumbersBar createNumbersBar(Rect rect)
+

+
+
+

+Inherited from UIContainer + +

+

+
+
+
+
+

+function Picture createPicture(Rect rect, string path)
+

+
+
+

+Inherited from UIContainer + +

+

+
+
+
+
+

+function PlanDisplayer createPlanDisplayer(Rect rect)
+

+
+
+

+Inherited from UIContainer + +

+

+
+
+
+
+

+function ProgressBar createProgressBar(Rect rect, Color color)
+

+
+
+

+Inherited from UIContainer + +

+

+
+
+
+
+

+function UIRect createRect(Rect rect, Color color)
+

+
+
+

+Inherited from UIContainer + +

+

+
+
+
+
+

+function Button createRoundButton(Rect rect, string icon, string function)
+

+
+
+

+Inherited from UIContainer + +

+

+
+
+
+
+

+function SavedDesignsSelection createSavedDesignsSelection(Rect rect, int width)
+

+
+
+

+Inherited from UIContainer + +

+

+
+
+
+
+

+function ScrollFrame createScrollFrame(Rect rect)
+

+
+
+

+Inherited from UIContainer + +

+

+
+
+
+
+

+function Selection createSelection(Rect rect, int width)
+

+
+
+

+Inherited from UIContainer + +

+

+
+
+
+
+

+function Slider createSlider(Rect rect, int min, int max, int steps, string caption, string onValueChangedFunction)
+

+
+
+

+Inherited from UIContainer + +

+

+
+
+
+
+

+function StatisticsBar createStatisticsBar(Rect rect, Color color)
+

+
+
+

+Inherited from UIContainer + +

+

+
+
+
+
+

+function TabbedWindow createTabbedWindow(Rect rect)
+

+
+
+

+Inherited from UIContainer + +

+

+
+
+
+
+

+function TextBox createTextBox(Rect rect, string onTextChangedFunction)
+

+
+
+

+Inherited from UIContainer + +

+

+
+
+
+
+

+function TextField createTextField(Rect rect, string text)
+

+
+
+

+Inherited from UIContainer + +

+

+
+
+
+
+

+function TooltipDisplayer createTooltipDisplayer(Rect rect)
+

+
+
+

+Inherited from UIContainer + +

+

+
+
+
+
+

+function Tree createTree(Rect rect)
+

+
+
+

+Inherited from UIContainer + +

+

+
+
+
+
+

+function ValueComboBox createValueComboBox(Rect rect, string onSelectedFunction)
+

+
+
+

+Inherited from UIContainer + +

+

+
+
+
+
+

+function Window createWindow(Rect rect)
+

+
+
+

+Inherited from UIContainer + +

+

+
+
+
+
+

+function var hide()
+

+
+
+

+Inherited from UIElement + +

+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function bool isMouseOverAndUnobscured()
+

+
+
+

+Inherited from UIElement + +

+

+
+
+
+
+

+function var show()
+

+
+
+

+Inherited from UIElement + +

+

Returns

+
+

+nothing +

+
+

+
+
+
+
+
+
+ Overview +
Home + Functions + Search +
+
Search:
+Predefined Functions & Example Scripts +
Command +Entity +FactionDatabase +PlanGenerator +Player +Sector +Server +UsableInventoryItem +
+
+

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

+
+ +
+ + diff --git a/Documentation/TargetIndicator.html b/Documentation/TargetIndicator.html new file mode 100644 index 0000000..a7c017b --- /dev/null +++ b/Documentation/TargetIndicator.html @@ -0,0 +1,500 @@ + + + TargetIndicator + + + + +
+
+

Avorion Script API Documentation

+
+
+ +
+
Search:
+
+
+ + + + + + + + + + + + + + + + +
+TargetIndicator +TargetIndicator +

Properties
+color +
+onScreen +
+position +
+rect +
+relationStatus +
+size +
+visible +
+visuals +

Member Functions
+
+
+
+

TargetIndicator

+

+This object is only available on the client. +

+
+
+

+function TargetIndicator(var target)
+

+
+
+

Parameters

+
+target +Either an Entity object or a vec3 (location in space)
+
+

Returns

+
+

+A new instance of TargetIndicator +

+
+

+
+
+
+
+ +
property Color color
+
+
+
+
+ +
property bool onScreen
+
+
+
+
+ +
property vec2 position
+
+
+
+
+ +
property Rect rect[read-only]
+
+
+
+
+ +
property RelationStatus relationStatus
+
+
+
+
+ +
property int size
+
+
+
+
+ +
property bool visible
+
+
+
+
+ +
property TargetIndicator::Visuals visuals
+
+
+
+
+
+
+
+
+ Overview +
Home + Functions + Search +
+
Search:
+Predefined Functions & Example Scripts +
Command +Entity +FactionDatabase +PlanGenerator +Player +Sector +Server +UsableInventoryItem +
+
+

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

+
+ +
+ + diff --git a/Documentation/TextBox.html b/Documentation/TextBox.html new file mode 100644 index 0000000..1706d57 --- /dev/null +++ b/Documentation/TextBox.html @@ -0,0 +1,904 @@ + + + TextBox + + + + +
+
+

Avorion Script API Documentation

+
+
+ +
+
Search:
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+TextBox +TextBox +

Properties
+active +
+allowedCharacters +
+backgroundIcon +
+backgroundText +
+clearOnClick +
+cursor +
+editable +
+forbiddenCharacters +
+frameColor +
+isTypingActive +
+maxCharacters +
+onTextChangedFunction +
+tabTarget +
+text +
+center +
+height +
+index +
+layer +
+localCenter +
+localPosition +
+localRect +
+lower +
+mouseOver +
+position +
+rect +
+size +
+tooltip +
+tooltipWidth +
+upper +
+visible +
+width +

Member Functions
+clear +
+forbidInvalidFilenameChars +
+moveCursorLeft +
+moveCursorLeftCtrl +
+moveCursorRight +
+moveCursorRightCtrl +
+resetFrameColor +
+hide +
+isMouseOverAndUnobscured +
+show +
+
+
+
+

TextBox : UIElement

+

+This object is only available on the client. +

+
+
+

+function TextBox(int index)
+

+
+
+

Returns

+
+

+A new instance of TextBox +

+
+

+
+
+
+
+ +
property bool active[write-only]
+
+
+
+
+ +
property string allowedCharacters[write-only]
+
+
+
+
+ +
property string backgroundIcon[write-only]
+
+
+
+
+ +
property string backgroundText[write-only]
+
+
+
+
+ +
property bool clearOnClick[write-only]
+
+
+
+
+ +
property int cursor[write-only]
+
+
+
+
+ +
property bool editable[write-only]
+
+
+
+
+ +
property string forbiddenCharacters[write-only]
+
+
+
+
+ +
property Color frameColor[write-only]
+
+
+
+
+ +
property bool isTypingActive[read-only]
+
+
+
+
+ +
property unsigned int maxCharacters[write-only]
+
+
+
+
+ +
property string onTextChangedFunction[write-only]
+
+
+
+
+ +
property TextBox tabTarget[write-only]
+
+
+
+
+ +
property string text
+
+
+
+
+ +
property vec2 center
+
+
+
+
+ +
property float height
+
+
+
+
+ +
property int index[read-only]
+
+
+
+
+ +
property int layer
+
+
+
+
+ +
property vec2 localCenter[read-only]
+
+
+
+
+ +
property vec2 localPosition[read-only]
+
+
+
+
+ +
property Rect localRect[read-only]
+
+
+
+
+ +
property vec2 lower
+
+
+
+
+ +
property bool mouseOver[read-only]
+
+
+
+
+ +
property vec2 position
+
+
+
+
+ +
property Rect rect
+
+
+
+
+ +
property vec2 size
+
+
+
+
+ +
property var tooltip
+
+
+
+
+ +
property int tooltipWidth[write-only]
+
+
+
+
+ +
property vec2 upper
+
+
+
+
+ +
property bool visible
+
+
+
+
+ +
property float width
+
+
+
+
+
+
+

+function var clear()
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var forbidInvalidFilenameChars()
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var moveCursorLeft()
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var moveCursorLeftCtrl()
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var moveCursorRight()
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var moveCursorRightCtrl()
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var resetFrameColor()
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var hide()
+

+
+
+

+Inherited from UIElement + +

+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function bool isMouseOverAndUnobscured()
+

+
+
+

+Inherited from UIElement + +

+

+
+
+
+
+

+function var show()
+

+
+
+

+Inherited from UIElement + +

+

Returns

+
+

+nothing +

+
+

+
+
+
+
+
+
+ Overview +
Home + Functions + Search +
+
Search:
+Predefined Functions & Example Scripts +
Command +Entity +FactionDatabase +PlanGenerator +Player +Sector +Server +UsableInventoryItem +
+
+

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

+
+ +
+ + diff --git a/Documentation/TextField.html b/Documentation/TextField.html new file mode 100644 index 0000000..beb5353 --- /dev/null +++ b/Documentation/TextField.html @@ -0,0 +1,755 @@ + + + TextField + + + + +
+
+

Avorion Script API Documentation

+
+
+ +
+
Search:
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+TextField +TextField +

Properties
+bold +
+font +
+fontColor +
+fontSize +
+italic +
+outlined +
+padding +
+scrollable +
+shadowed +
+strikethrough +
+text +
+underlined +
+center +
+height +
+index +
+layer +
+localCenter +
+localPosition +
+localRect +
+lower +
+mouseOver +
+position +
+rect +
+size +
+tooltip +
+tooltipWidth +
+upper +
+visible +
+width +

Member Functions
+hide +
+isMouseOverAndUnobscured +
+show +
+
+
+
+

TextField : UIElement

+

+This object is only available on the client. +

+
+
+

+function TextField(int index)
+

+
+
+

Returns

+
+

+A new instance of TextField +

+
+

+
+
+
+
+ +
property bool bold
+
+
+
+
+ +
property int font
+
+
+
+
+ +
property Color fontColor
+
+
+
+
+ +
property int fontSize
+
+
+
+
+ +
property bool italic
+
+
+
+
+ +
property bool outlined
+
+Sets text outlined. Text can not be shadowed and outlined at the same time. +
+
+
+ +
property int padding
+
+
+
+
+ +
property bool scrollable
+
+
+
+
+ +
property bool shadowed
+
+Sets text shadowed. Text can not be shadowed and outlined at the same time. +
+
+
+ +
property bool strikethrough
+
+
+
+
+ +
property string text
+
+
+
+
+ +
property bool underlined
+
+
+
+
+ +
property vec2 center
+
+
+
+
+ +
property float height
+
+
+
+
+ +
property int index[read-only]
+
+
+
+
+ +
property int layer
+
+
+
+
+ +
property vec2 localCenter[read-only]
+
+
+
+
+ +
property vec2 localPosition[read-only]
+
+
+
+
+ +
property Rect localRect[read-only]
+
+
+
+
+ +
property vec2 lower
+
+
+
+
+ +
property bool mouseOver[read-only]
+
+
+
+
+ +
property vec2 position
+
+
+
+
+ +
property Rect rect
+
+
+
+
+ +
property vec2 size
+
+
+
+
+ +
property var tooltip
+
+
+
+
+ +
property int tooltipWidth[write-only]
+
+
+
+
+ +
property vec2 upper
+
+
+
+
+ +
property bool visible
+
+
+
+
+ +
property float width
+
+
+
+
+
+
+

+function var hide()
+

+
+
+

+Inherited from UIElement + +

+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function bool isMouseOverAndUnobscured()
+

+
+
+

+Inherited from UIElement + +

+

+
+
+
+
+

+function var show()
+

+
+
+

+Inherited from UIElement + +

+

Returns

+
+

+nothing +

+
+

+
+
+
+
+
+
+ Overview +
Home + Functions + Search +
+
Search:
+Predefined Functions & Example Scripts +
Command +Entity +FactionDatabase +PlanGenerator +Player +Sector +Server +UsableInventoryItem +
+
+

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

+
+ +
+ + diff --git a/Documentation/Thrusters.html b/Documentation/Thrusters.html new file mode 100644 index 0000000..39f59b6 --- /dev/null +++ b/Documentation/Thrusters.html @@ -0,0 +1,497 @@ + + + Thrusters + + + + +
+
+

Avorion Script API Documentation

+
+
+ +
+
Search:
+
+
+ + + + + + + + + + + + + + + + +
+Thrusters +Thrusters +

Properties
+basePitch +
+baseRoll +
+baseYaw +
+currentPitch +
+currentRoll +
+currentYaw +
+fixedStats +
+thrust +

Member Functions
+
+
+
+

Thrusters

+
+
+

+function Thrusters(var id)
+

+
+
+

Parameters

+
+id +The id of the entity this component belongs to, or the entity itself, must be an id of an existing entity or nil for the entity in the current script context
+
+

Returns

+
+

+A new instance of Thrusters +

+
+

+
+
+
+
+ +
property double basePitch
+
+
+
+
+ +
property double baseRoll
+
+
+
+
+ +
property double baseYaw
+
+
+
+
+ +
property double currentPitch[read-only]
+
+
+
+
+ +
property double currentRoll[read-only]
+
+
+
+
+ +
property double currentYaw[read-only]
+
+
+
+
+ +
property bool fixedStats
+
+
+
+
+ +
property vec3 thrust
+
+
+
+
+
+
+
+
+ Overview +
Home + Functions + Search +
+
Search:
+Predefined Functions & Example Scripts +
Command +Entity +FactionDatabase +PlanGenerator +Player +Sector +Server +UsableInventoryItem +
+
+

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

+
+ +
+ + diff --git a/Documentation/Timer.html b/Documentation/Timer.html new file mode 100644 index 0000000..b3640e3 --- /dev/null +++ b/Documentation/Timer.html @@ -0,0 +1,532 @@ + + + Timer + + + + +
+
+

Avorion Script API Documentation

+
+
+ +
+
Search:
+
+
+ + + + + + + + + + + + + + + + +
+Timer +Timer +

Properties
+milliseconds +
+running +
+seconds +
+secondsStr +

Member Functions
+reset +
+restart +
+start +
+stop +
+
+
+
+

Timer

+
+
+

+function Timer()
+

+
+
+

Returns

+
+

+A new instance of Timer +

+
+

+
+
+
+
+ +
property int milliseconds[read-only]
+
+
+
+
+ +
property bool running[read-only]
+
+
+
+
+ +
property double seconds[read-only]
+
+
+
+
+ +
property string secondsStr[read-only]
+
+
+
+
+
+
+

+function var reset()
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var restart()
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var start()
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var stop()
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+
+
+ Overview +
Home + Functions + Search +
+
Search:
+Predefined Functions & Example Scripts +
Command +Entity +FactionDatabase +PlanGenerator +Player +Sector +Server +UsableInventoryItem +
+
+

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

+
+ +
+ + diff --git a/Documentation/Tooltip.html b/Documentation/Tooltip.html new file mode 100644 index 0000000..c1b2caf --- /dev/null +++ b/Documentation/Tooltip.html @@ -0,0 +1,621 @@ + + + Tooltip + + + + +
+
+

Avorion Script API Documentation

+
+
+ +
+
Search:
+
+
+ + + + + + + + + + + + + + + + + + + + + + +
+Tooltip +Tooltip +

Properties
+backgroundFadeColor +
+borderColor +
+icon +
+price +
+rarity +

Member Functions
+addLine +
+addLineFront +
+clear +
+getIcons +
+getLine +
+getLines +
+removeLine +
+setIcons +
+setLine +
+
+
+
+

Tooltip

+
+
+

+function Tooltip()
+

+
+
+

+This is the default constructor of Tooltip. No further arguments are required. +

+

Returns

+
+

+A new instance of Tooltip +

+
+

+
+
+
+
+ +
property Color backgroundFadeColor
+
+
+
+
+ +
property Color borderColor
+
+
+
+
+ +
property string icon
+
+
+
+
+ +
property double price
+
+
+
+
+ +
property Rarity rarity[write-only]
+
+
+
+
+
+
+

+function var addLine(TooltipLine line)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var addLineFront(TooltipLine line)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var clear()
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function string... getIcons()
+

+
+
+

+
+
+
+
+

+function TooltipLine getLine(int i)
+

+
+
+

+
+
+
+
+

+function TooltipLine... getLines()
+

+
+
+

+
+
+
+
+

+function var removeLine(int i)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var setIcons()
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var setLine(int i, TooltipLine line)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+
+
+ Overview +
Home + Functions + Search +
+
Search:
+Predefined Functions & Example Scripts +
Command +Entity +FactionDatabase +PlanGenerator +Player +Sector +Server +UsableInventoryItem +
+
+

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

+
+ +
+ + diff --git a/Documentation/TooltipDisplayer.html b/Documentation/TooltipDisplayer.html new file mode 100644 index 0000000..76cbdae --- /dev/null +++ b/Documentation/TooltipDisplayer.html @@ -0,0 +1,664 @@ + + + TooltipDisplayer + + + + +
+
+

Avorion Script API Documentation

+
+
+ +
+
Search:
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+TooltipDisplayer +TooltipDisplayer +

Properties
+center +
+height +
+index +
+layer +
+localCenter +
+localPosition +
+localRect +
+lower +
+mouseOver +
+position +
+rect +
+size +
+tooltip +
+tooltipWidth +
+upper +
+visible +
+width +

Member Functions
+setTooltip +
+hide +
+isMouseOverAndUnobscured +
+show +
+
+
+
+

TooltipDisplayer : UIElement

+

+This object is only available on the client. +

+
+
+

+function TooltipDisplayer(int index)
+

+
+
+

Returns

+
+

+A new instance of TooltipDisplayer +

+
+

+
+
+
+
+ +
property vec2 center
+
+
+
+
+ +
property float height
+
+
+
+
+ +
property int index[read-only]
+
+
+
+
+ +
property int layer
+
+
+
+
+ +
property vec2 localCenter[read-only]
+
+
+
+
+ +
property vec2 localPosition[read-only]
+
+
+
+
+ +
property Rect localRect[read-only]
+
+
+
+
+ +
property vec2 lower
+
+
+
+
+ +
property bool mouseOver[read-only]
+
+
+
+
+ +
property vec2 position
+
+
+
+
+ +
property Rect rect
+
+
+
+
+ +
property vec2 size
+
+
+
+
+ +
property var tooltip
+
+
+
+
+ +
property int tooltipWidth[write-only]
+
+
+
+
+ +
property vec2 upper
+
+
+
+
+ +
property bool visible
+
+
+
+
+ +
property float width
+
+
+
+
+
+
+

+function var setTooltip(Tooltip [or nil] tooltip)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var hide()
+

+
+
+

+Inherited from UIElement + +

+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function bool isMouseOverAndUnobscured()
+

+
+
+

+Inherited from UIElement + +

+

+
+
+
+
+

+function var show()
+

+
+
+

+Inherited from UIElement + +

+

Returns

+
+

+nothing +

+
+

+
+
+
+
+
+
+ Overview +
Home + Functions + Search +
+
Search:
+Predefined Functions & Example Scripts +
Command +Entity +FactionDatabase +PlanGenerator +Player +Sector +Server +UsableInventoryItem +
+
+

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

+
+ +
+ + diff --git a/Documentation/TooltipLine.html b/Documentation/TooltipLine.html new file mode 100644 index 0000000..230a785 --- /dev/null +++ b/Documentation/TooltipLine.html @@ -0,0 +1,600 @@ + + + TooltipLine + + + + +
+
+

Avorion Script API Documentation

+
+
+ +
+
Search:
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+TooltipLine +TooltipLine +

Properties
+backgroundColor +
+cbold +
+ccolor +
+citalic +
+ctext +
+fontSize +
+fontType +
+height +
+icon +
+iconColor +
+iconRight +
+iconRightColor +
+lbold +
+lcolor +
+litalic +
+ltext +
+rbold +
+rcolor +
+ritalic +
+rtext +

Member Functions
+
+
+
+

TooltipLine

+
+
+

+function TooltipLine(int height, int fontSize)
+

+
+
+

Returns

+
+

+A new instance of TooltipLine +

+
+

+
+
+
+
+ +
property Color backgroundColor
+
+
+
+
+ +
property bool cbold
+
+
+
+
+ +
property Color ccolor
+
+
+
+
+ +
property bool citalic
+
+
+
+
+ +
property string ctext
+
+
+
+
+ +
property int fontSize
+
+
+
+
+ +
property int fontType
+
+
+
+
+ +
property int height
+
+
+
+
+ +
property string icon
+
+
+
+
+ +
property Color iconColor
+
+
+
+
+ +
property string iconRight
+
+
+
+
+ +
property Color iconRightColor
+
+
+
+
+ +
property bool lbold
+
+
+
+
+ +
property Color lcolor
+
+
+
+
+ +
property bool litalic
+
+
+
+
+ +
property string ltext
+
+
+
+
+ +
property bool rbold
+
+
+
+
+ +
property Color rcolor
+
+
+
+
+ +
property bool ritalic
+
+
+
+
+ +
property string rtext
+
+
+
+
+
+
+
+
+ Overview +
Home + Functions + Search +
+
Search:
+Predefined Functions & Example Scripts +
Command +Entity +FactionDatabase +PlanGenerator +Player +Sector +Server +UsableInventoryItem +
+
+

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

+
+ +
+ + diff --git a/Documentation/TooltipRenderer.html b/Documentation/TooltipRenderer.html new file mode 100644 index 0000000..4574628 --- /dev/null +++ b/Documentation/TooltipRenderer.html @@ -0,0 +1,470 @@ + + + TooltipRenderer + + + + +
+
+

Avorion Script API Documentation

+
+
+ +
+
Search:
+
+
+ + + + + + + + + + + +
+TooltipRenderer +TooltipRenderer +

Properties
+size +

Member Functions
+draw +
+drawMouseTooltip +
+
+
+
+

TooltipRenderer

+

+This object is only available on the client. +

+
+
+

+function TooltipRenderer(Tooltip tooltip)
+

+
+
+

Returns

+
+

+A new instance of TooltipRenderer +

+
+

+
+
+
+
+ +
property vec2 size[read-only]
+
+
+
+
+
+
+

+function var draw(vec2 )
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var drawMouseTooltip(vec2 )
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+
+
+ Overview +
Home + Functions + Search +
+
Search:
+Predefined Functions & Example Scripts +
Command +Entity +FactionDatabase +PlanGenerator +Player +Sector +Server +UsableInventoryItem +
+
+

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

+
+ +
+ + diff --git a/Documentation/Torpedo.html b/Documentation/Torpedo.html new file mode 100644 index 0000000..8747d38 --- /dev/null +++ b/Documentation/Torpedo.html @@ -0,0 +1,512 @@ + + + Torpedo + + + + +
+
+

Avorion Script API Documentation

+
+
+ +
+
Search:
+
+
+ + + + + + + + + + + + + + + +
+Torpedo +Torpedo +

Properties
+collisionWithParentEnabled +
+firedByAIControlledPlayerShip +
+intendedTargetFaction +
+shootingCraft +

Member Functions
+getTemplate +
+setTemplate +
+startDetonation +
+
+
+
+

Torpedo

+
+
+

+function Torpedo(var id)
+

+
+
+

Parameters

+
+id +The id of the entity this component belongs to, or the entity itself, must be an id of an existing entity or nil for the entity in the current script context
+
+

Returns

+
+

+A new instance of Torpedo +

+
+

+
+
+
+
+ +
property bool collisionWithParentEnabled
+
+
+
+
+ +
property bool firedByAIControlledPlayerShip
+
+
+
+
+ +
property int intendedTargetFaction
+
+
+
+
+ +
property Uuid shootingCraft
+
+
+
+
+
+
+

+function TorpedoTemplate getTemplate()
+

+
+
+

+
+
+
+
+

+function var setTemplate(TorpedoTemplate torpedo)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var startDetonation()
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+
+
+ Overview +
Home + Functions + Search +
+
Search:
+Predefined Functions & Example Scripts +
Command +Entity +FactionDatabase +PlanGenerator +Player +Sector +Server +UsableInventoryItem +
+
+

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

+
+ +
+ + diff --git a/Documentation/TorpedoAI.html b/Documentation/TorpedoAI.html new file mode 100644 index 0000000..d11cb80 --- /dev/null +++ b/Documentation/TorpedoAI.html @@ -0,0 +1,506 @@ + + + TorpedoAI + + + + +
+
+

Avorion Script API Documentation

+
+
+ +
+
Search:
+
+
+ + + + + + + + + + + + + + + + + +
+TorpedoAI +TorpedoAI +

Properties
+desiredVelocity +
+dotLastFrame +
+driftTime +
+entity +
+entityId +
+flightTime +
+missedTargetCounter +
+originalDriftTime +
+target +

Member Functions
+
+
+
+

TorpedoAI

+
+
+

+function TorpedoAI(var id)
+

+
+
+

Parameters

+
+id +The id of the entity this component belongs to, or the entity itself, must be an id of an existing entity or nil for the entity in the current script context
+
+

Returns

+
+

+A new instance of TorpedoAI +

+
+

+
+
+
+
+ +
property float desiredVelocity
+
+
+
+
+ +
property float dotLastFrame[read-only]
+
+
+
+
+ +
property float driftTime
+
+
+
+
+ +
property Entity entity[read-only]
+
+
+
+
+ +
property uuid entityId[read-only]
+
+
+
+
+ +
property float flightTime
+
+
+
+
+ +
property float missedTargetCounter
+
+
+
+
+ +
property float originalDriftTime
+
+
+
+
+ +
property Uuid target
+
+
+
+
+
+
+
+
+ Overview +
Home + Functions + Search +
+
Search:
+Predefined Functions & Example Scripts +
Command +Entity +FactionDatabase +PlanGenerator +Player +Sector +Server +UsableInventoryItem +
+
+

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

+
+ +
+ + diff --git a/Documentation/TorpedoLauncher.html b/Documentation/TorpedoLauncher.html new file mode 100644 index 0000000..192c1d3 --- /dev/null +++ b/Documentation/TorpedoLauncher.html @@ -0,0 +1,661 @@ + + + TorpedoLauncher + + + + +
+
+

Avorion Script API Documentation

+
+
+ +
+
Search:
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
+TorpedoLauncher +TorpedoLauncher +

Properties
+entity +
+entityId +
+freeStorage +
+maximumStorage +
+maxShafts +
+numShafts +
+numTorpedoes +
+occupiedStorage +

Member Functions
+addTorpedo +
+clear +
+createTorpedo +
+getFreeSlots +
+getMaxTorpedoes +
+getNumTorpedoes +
+getShafts +
+getTorpedo +
+moveTorpedoToShaft +
+removeTorpedo +
+
+
+
+

TorpedoLauncher

+
+
+

+function TorpedoLauncher(var id)
+

+
+
+

Parameters

+
+id +The id of the entity this component belongs to, or the entity itself, must be an id of an existing entity or nil for the entity in the current script context
+
+

Returns

+
+

+A new instance of TorpedoLauncher +

+
+

+
+
+
+
+ +
property Entity entity[read-only]
+
+
+
+
+ +
property uuid entityId[read-only]
+
+
+
+
+ +
property float freeStorage[read-only]
+
+
+
+
+ +
property float maximumStorage[read-only]
+
+
+
+
+ +
property int maxShafts[read-only]
+
+
+
+
+ +
property unsigned int numShafts[read-only]
+
+
+
+
+ +
property unsigned int numTorpedoes[read-only]
+
+
+
+
+ +
property float occupiedStorage[read-only]
+
+
+
+
+
+
+

+function bool addTorpedo(TorpedoTemplate torpedo, var shaft)
+

+
+
+

+
+
+
+
+

+function var clear()
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function Entity createTorpedo(Box position, TorpedoTemplate torpedo)
+

+
+
+

+
+
+
+
+

+function unsigned int getFreeSlots(var shaftIndex)
+

+
+
+

+
+
+
+
+

+function unsigned int getMaxTorpedoes(var shaftIndex)
+

+
+
+

+
+
+
+
+

+function unsigned int getNumTorpedoes(int shaftIndex)
+

+
+
+

+
+
+
+
+

+function unsigned int... getShafts()
+

+
+
+

+
+
+
+
+

+function TorpedoTemplate getTorpedo(int torpedoIndex, int shaftIndex)
+

+
+
+

+Accesses a torpedo in a specific shaft. +

+

Parameters

+
+torpedoIndex +
+shaftIndex, +-1 for torpedo storage
+
+

Returns

+
+

+The torpedo, if found. nil otherwise. +

+
+

+
+
+
+
+

+function var moveTorpedoToShaft(var shaftIndex, int torpedoIndex, var newShaftIndex)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var removeTorpedo(int index, var shaft)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+
+
+ Overview +
Home + Functions + Search +
+
Search:
+Predefined Functions & Example Scripts +
Command +Entity +FactionDatabase +PlanGenerator +Player +Sector +Server +UsableInventoryItem +
+
+

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

+
+ +
+ + diff --git a/Documentation/TorpedoShaft.html b/Documentation/TorpedoShaft.html new file mode 100644 index 0000000..a1b97c2 --- /dev/null +++ b/Documentation/TorpedoShaft.html @@ -0,0 +1,515 @@ + + + TorpedoShaft + + + + +
+
+

Avorion Script API Documentation

+
+
+ +
+
Search:
+
+
+ + + + + + + + + + + + + + + + + +
+TorpedoShaft +TorpedoShaft +

Properties
+automaticLoadingType +
+enabled +
+freeSpace +
+index +
+obstructed +
+occupiedSpace +
+space +

Member Functions
+getTorpedoes +
+setTorpedoes +
+
+
+
+

TorpedoShaft

+
+
+

+function TorpedoShaft()
+

+
+
+

Returns

+
+

+A new instance of TorpedoShaft +

+
+

+
+
+
+
+ +
property int automaticLoadingType[read-only]
+
+
+
+
+ +
property bool enabled[read-only]
+
+
+
+
+ +
property var freeSpace[read-only]
+
+
+
+
+ +
property unsigned int index[read-only]
+
+
+
+
+ +
property bool obstructed[read-only]
+
+
+
+
+ +
property double occupiedSpace[read-only]
+
+
+
+
+ +
property double space[read-only]
+
+
+
+
+
+
+

+function TorpedoTemplate... getTorpedoes()
+

+
+
+

+
+
+
+
+

+function var setTorpedoes()
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+
+
+ Overview +
Home + Functions + Search +
+
Search:
+Predefined Functions & Example Scripts +
Command +Entity +FactionDatabase +PlanGenerator +Player +Sector +Server +UsableInventoryItem +
+
+

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

+
+ +
+ + diff --git a/Documentation/TorpedoTemplate.html b/Documentation/TorpedoTemplate.html new file mode 100644 index 0000000..1c93e55 --- /dev/null +++ b/Documentation/TorpedoTemplate.html @@ -0,0 +1,738 @@ + + + TorpedoTemplate + + + + +
+
+

Avorion Script API Documentation

+
+
+ +
+
Search:
+ +
+

TorpedoTemplate

+
+
+

+function TorpedoTemplate()
+

+
+
+

+This is the default constructor of TorpedoTemplate. No further arguments are required. +

+

Returns

+
+

+A new instance of TorpedoTemplate +

+
+

+
+
+
+
+ +
property float acceleration
+
+
+
+
+ +
property string bodyClass
+
+
+
+
+ +
property DamageType damageType
+
+
+
+
+ +
property float damageVelocityFactor
+
+
+
+
+ +
property float durability
+
+
+
+
+ +
property bool energyDrain
+
+
+
+
+ +
property float explosionRadius
+
+
+
+
+ +
property float explosionSize
+
+
+
+
+ +
property float flashDuration
+
+
+
+
+ +
property float flashSize
+
+
+
+
+ +
property Color headColor
+
+
+
+
+ +
property float hullDamage
+
+
+
+
+ +
property string icon
+
+
+
+
+ +
property float maxVelocity
+
+
+
+
+ +
property string name
+
+
+
+
+ +
property int numShockwaves
+
+
+
+
+ +
property string prefix
+
+
+
+
+ +
property Rarity rarity
+
+
+
+
+ +
property float reach
+
+
+
+
+ +
property bool shieldAndHullDamage
+
+
+
+
+ +
property float shieldDamage
+
+
+
+
+ +
property bool shieldDeactivation
+
+
+
+
+ +
property bool shieldPenetration
+
+
+
+
+ +
property Color shockwaveColor
+
+
+
+
+ +
property float shockwaveDuration
+
+
+
+
+ +
property float shockwaveSize
+
+
+
+
+ +
property float size
+
+
+
+
+ +
property double storageEnergyDrain
+
+
+
+
+ +
property Color stripeColor
+
+
+
+
+ +
property int stripes
+
+
+
+
+ +
property int tech
+
+
+
+
+ +
property float turningSpeed
+
+
+
+
+ +
property int type
+
+
+
+
+ +
property int visualSeed
+
+
+
+
+ +
property string warheadClass
+
+
+
+
+
+
+
+
+ Overview +
Home + Functions + Search +
+
Search:
+Predefined Functions & Example Scripts +
Command +Entity +FactionDatabase +PlanGenerator +Player +Sector +Server +UsableInventoryItem +
+
+

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

+
+ +
+ + diff --git a/Documentation/TradingGood.html b/Documentation/TradingGood.html new file mode 100644 index 0000000..3ffc795 --- /dev/null +++ b/Documentation/TradingGood.html @@ -0,0 +1,607 @@ + + + TradingGood + + + + +
+
+

Avorion Script API Documentation

+
+
+ +
+
Search:
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
+TradingGood +TradingGood +

Properties
+color +
+dangerous +
+description +
+displayDescription +
+icon +
+illegal +
+mesh +
+name +
+plural +
+price +
+size +
+stolen +
+suspicious +
+tagDescription +
+tags +

Member Functions
+__eq +
+__tostring +
+displayName +
+pluralForm +
+
+
+
+

TradingGood

+
+
+

+function TradingGood(string name, string plural, string description, string icon, float price, float size)
+

+
+
+

Returns

+
+

+A new instance of TradingGood +

+
+

+
+
+
+
+ +
property Color color[read-only]
+
+
+
+
+ +
property bool dangerous
+
+
+
+
+ +
property string description
+
+
+
+
+ +
property string displayDescription[read-only]
+
+
+
+
+ +
property string icon
+
+
+
+
+ +
property bool illegal
+
+
+
+
+ +
property string mesh
+
+
+
+
+ +
property string name
+
+
+
+
+ +
property string plural
+
+
+
+
+ +
property float price
+
+
+
+
+ +
property float size
+
+
+
+
+ +
property bool stolen
+
+
+
+
+ +
property bool suspicious
+
+
+
+
+ +
property string tagDescription[read-only]
+
+
+
+
+ +
property table_t tags
+
+
+
+
+
+
+

+function bool __eq(TradingGood other)
+

+
+
+

+
+
+
+
+

+function string __tostring()
+

+
+
+

+
+
+
+
+

+function string displayName(int amount)
+

+
+
+

+
+
+
+
+

+function PluralForm pluralForm(int amount)
+

+
+
+

+
+
+
+
+
+
+ Overview +
Home + Functions + Search +
+
Search:
+Predefined Functions & Example Scripts +
Command +Entity +FactionDatabase +PlanGenerator +Player +Sector +Server +UsableInventoryItem +
+
+

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

+
+ +
+ + diff --git a/Documentation/Tree.html b/Documentation/Tree.html new file mode 100644 index 0000000..ee9965d --- /dev/null +++ b/Documentation/Tree.html @@ -0,0 +1,759 @@ + + + Tree + + + + +
+
+

Avorion Script API Documentation

+
+
+ +
+
Search:
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Tree +Tree +

Properties
+onSelectedFunction +
+selectedIndex +
+center +
+height +
+index +
+layer +
+localCenter +
+localPosition +
+localRect +
+lower +
+mouseOver +
+position +
+rect +
+size +
+tooltip +
+tooltipWidth +
+upper +
+visible +
+width +

Member Functions
+add +
+clear +
+selectById +
+selectNext +
+selectPrevious +
+setLevelStyle +
+hide +
+isMouseOverAndUnobscured +
+show +
+
+
+
+

Tree : UIElement

+

+This object is only available on the client. +

+
+
+

+function Tree(int index)
+

+
+
+

Returns

+
+

+A new instance of Tree +

+
+

+
+
+
+
+ +
property string onSelectedFunction
+
+
+
+
+ +
property int selectedIndex
+
+
+
+
+ +
property vec2 center
+
+
+
+
+ +
property float height
+
+
+
+
+ +
property int index[read-only]
+
+
+
+
+ +
property int layer
+
+
+
+
+ +
property vec2 localCenter[read-only]
+
+
+
+
+ +
property vec2 localPosition[read-only]
+
+
+
+
+ +
property Rect localRect[read-only]
+
+
+
+
+ +
property vec2 lower
+
+
+
+
+ +
property bool mouseOver[read-only]
+
+
+
+
+ +
property vec2 position
+
+
+
+
+ +
property Rect rect
+
+
+
+
+ +
property vec2 size
+
+
+
+
+ +
property var tooltip
+
+
+
+
+ +
property int tooltipWidth[write-only]
+
+
+
+
+ +
property vec2 upper
+
+
+
+
+ +
property bool visible
+
+
+
+
+ +
property float width
+
+
+
+
+
+
+

+function int add(var parent, string caption, var onSelected, var hasContent, var id)
+

+
+
+

+
+
+
+
+

+function var clear()
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var selectById(string id)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function int selectNext()
+

+
+
+

+
+
+
+
+

+function int selectPrevious()
+

+
+
+

+
+
+
+
+

+function var setLevelStyle(int level, int height, int fontSize)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var hide()
+

+
+
+

+Inherited from UIElement + +

+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function bool isMouseOverAndUnobscured()
+

+
+
+

+Inherited from UIElement + +

+

+
+
+
+
+

+function var show()
+

+
+
+

+Inherited from UIElement + +

+

Returns

+
+

+nothing +

+
+

+
+
+
+
+
+
+ Overview +
Home + Functions + Search +
+
Search:
+Predefined Functions & Example Scripts +
Command +Entity +FactionDatabase +PlanGenerator +Player +Sector +Server +UsableInventoryItem +
+
+

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

+
+ +
+ + diff --git a/Documentation/Turret.html b/Documentation/Turret.html new file mode 100644 index 0000000..4cb7a17 --- /dev/null +++ b/Documentation/Turret.html @@ -0,0 +1,740 @@ + + + Turret + + + + +
+
+

Avorion Script API Documentation

+
+
+ +
+
Search:
+ +
+

Turret

+
+
+

+function Turret(var id)
+

+
+
+

Parameters

+
+id +The id of the entity this component belongs to, or the entity itself, must be an id of an existing entity or nil for the entity in the current script context
+
+

Returns

+
+

+A new instance of Turret +

+
+

+
+
+
+
+ +
property bool activated
+
+
+
+
+ +
property int attachedBlock
+
+
+
+
+ +
property bool automatic
+
+
+
+
+ +
property bool coaxial
+
+
+
+
+ +
property bool craftPlayerPiloted[read-only]
+
+
+
+
+ +
property float damageMultiplier[read-only]
+
+
+
+
+ +
property bool enabledByAI[read-only]
+
+
+
+
+ +
property bool favorite
+
+
+
+
+ +
property int group
+
+
+
+
+ +
property bool horizontalRotation[read-only]
+
+
+
+
+ +
property Matrix localPosition[read-only]
+
+
+
+
+ +
property bool lookingAtTarget[read-only]
+
+
+
+
+ +
property bool rigin[read-only]
+
+
+
+
+ +
property bool selected
+
+
+
+
+ +
property uuid shootingCraft[read-only]
+
+
+
+
+ +
property int shootingFaction[read-only]
+
+
+
+
+ +
property uuid shotCollisionException[read-only]
+
+
+
+
+ +
property float size[read-only]
+
+
+
+
+ +
property uuid targetedObject[read-only]
+
+
+
+
+ +
property float templateSize
+
+
+
+
+ +
property bool trash
+
+
+
+
+ +
property float turningSpeed
+
+
+
+
+ +
property int usedSlots
+
+
+
+
+ +
property bool verticalRotation[read-only]
+
+
+
+
+ +
property bool weaponsPlayerControlled[read-only]
+
+
+
+
+
+
+

+function var consumeEnergyForShot(double amount)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function vec3 getCurrentVelocity()
+

+
+
+

+
+
+
+
+

+function Matrix getLookingPosition()
+

+
+
+

+
+
+
+
+

+function bool hasEnergyForShot(double amount)
+

+
+
+

+
+
+
+
+

+function var setOrientation(float rotationVertical, float rotationHorizontal, bool lookingAtTarget)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function bool shootingVectorOk(var ray)
+

+
+
+

+
+
+
+
+
+
+ Overview +
Home + Functions + Search +
+
Search:
+Predefined Functions & Example Scripts +
Command +Entity +FactionDatabase +PlanGenerator +Player +Sector +Server +UsableInventoryItem +
+
+

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

+
+ +
+ + diff --git a/Documentation/TurretAI.html b/Documentation/TurretAI.html new file mode 100644 index 0000000..0633ff5 --- /dev/null +++ b/Documentation/TurretAI.html @@ -0,0 +1,470 @@ + + + TurretAI + + + + +
+
+

Avorion Script API Documentation

+
+
+ +
+
Search:
+
+
+ + + + + + + + + + + + + +
+TurretAI +TurretAI +

Properties
+aimedPosition +
+independentTargetingEnabled +
+parentSaysShouldFire +
+shouldFire +
+targetedEntity +

Member Functions
+
+
+
+

TurretAI

+
+
+

+function TurretAI(var id)
+

+
+
+

Parameters

+
+id +The id of the entity this component belongs to, or the entity itself, must be an id of an existing entity or nil for the entity in the current script context
+
+

Returns

+
+

+A new instance of TurretAI +

+
+

+
+
+
+
+ +
property vec3 aimedPosition
+
+
+
+
+ +
property bool independentTargetingEnabled[read-only]
+
+
+
+
+ +
property bool parentSaysShouldFire[read-only]
+
+
+
+
+ +
property bool shouldFire[read-only]
+
+
+
+
+ +
property Uuid targetedEntity
+
+
+
+
+
+
+
+
+ Overview +
Home + Functions + Search +
+
Search:
+Predefined Functions & Example Scripts +
Command +Entity +FactionDatabase +PlanGenerator +Player +Sector +Server +UsableInventoryItem +
+
+

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

+
+ +
+ + diff --git a/Documentation/TurretBases.html b/Documentation/TurretBases.html new file mode 100644 index 0000000..0804b81 --- /dev/null +++ b/Documentation/TurretBases.html @@ -0,0 +1,477 @@ + + + TurretBases + + + + +
+
+

Avorion Script API Documentation

+
+
+ +
+
Search:
+
+
+ + + + + + + + + + + +
+TurretBases +TurretBases +

Properties

Member Functions
+getDesigns +
+setDesign +
+setDesigns +
+
+
+
+

TurretBases

+
+
+

+function TurretBases(var id)
+

+
+
+

Parameters

+
+id +The id of the entity this component belongs to, or the entity itself, must be an id of an existing entity or nil for the entity in the current script context
+
+

Returns

+
+

+A new instance of TurretBases +

+
+

+
+
+
+
+

+function table<int, TurretDesign> getDesigns()
+

+
+
+

+Returns a table with all turret designs. This table stores the turret base block index as a key and the design as its value. +

+

+
+
+
+
+

+function var setDesign(var index, TurretDesign design)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var setDesigns(table_t designs)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+
+
+ Overview +
Home + Functions + Search +
+
Search:
+Predefined Functions & Example Scripts +
Command +Entity +FactionDatabase +PlanGenerator +Player +Sector +Server +UsableInventoryItem +
+
+

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

+
+ +
+ + diff --git a/Documentation/TurretController.html b/Documentation/TurretController.html new file mode 100644 index 0000000..c52f74d --- /dev/null +++ b/Documentation/TurretController.html @@ -0,0 +1,478 @@ + + + TurretController + + + + +
+
+

Avorion Script API Documentation

+
+
+ +
+
Search:
+
+
+ + + + + + + + + + + + +
+TurretController +TurretController +

Properties
+entity +
+entityId +

Member Functions
+getGroupOrders +
+setGroupFireMode +
+
+
+
+

TurretController

+

+This object is only available on the server. +

+
+
+

+function TurretController(var id)
+

+
+
+

Parameters

+
+id +The id of the entity this component belongs to, or the entity itself, must be an id of an existing entity or nil for the entity in the current script context
+
+

Returns

+
+

+A new instance of TurretController +

+
+

+
+
+
+
+ +
property Entity entity[read-only]
+
+
+
+
+ +
property uuid entityId[read-only]
+
+
+
+
+
+
+

+function int getGroupOrders(int group)
+

+
+
+

+
+
+
+
+

+function var setGroupFireMode(int group, int autoFireMode)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+
+
+ Overview +
Home + Functions + Search +
+
Search:
+Predefined Functions & Example Scripts +
Command +Entity +FactionDatabase +PlanGenerator +Player +Sector +Server +UsableInventoryItem +
+
+

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

+
+ +
+ + diff --git a/Documentation/TurretDesign.html b/Documentation/TurretDesign.html new file mode 100644 index 0000000..789c8de --- /dev/null +++ b/Documentation/TurretDesign.html @@ -0,0 +1,624 @@ + + + TurretDesign + + + + +
+
+

Avorion Script API Documentation

+
+
+ +
+
Search:
+
+
+ + + + + + + + + + + + + + + + + + + + + +
+TurretDesign +TurretDesign +

Properties
+empty +

Member Functions
+getBarrels +
+getBase +
+getBody +
+getMoveBarrels +
+getMoveBase +
+getMoveBody +
+setBarrels +
+setBase +
+setBody +
+setMoveBarrels +
+setMoveBase +
+setMoveBody +
+
+
+
+

TurretDesign

+
+
+

+function TurretDesign()
+

+
+
+

+This is the default constructor of TurretDesign. No further arguments are required. +

+

Returns

+
+

+A new instance of TurretDesign +

+
+

+
+
+
+
+ +
property bool empty[read-only]
+
+
+
+
+
+
+

+function TurretDesignPart getBarrels()
+

+
+
+

+
+
+
+
+

+function TurretDesignPart getBase()
+

+
+
+

+
+
+
+
+

+function TurretDesignPart getBody()
+

+
+
+

+
+
+
+
+

+function TurretDesignPart getMoveBarrels()
+

+
+
+

+
+
+
+
+

+function TurretDesignPart getMoveBase()
+

+
+
+

+
+
+
+
+

+function TurretDesignPart getMoveBody()
+

+
+
+

+
+
+
+
+

+function var setBarrels(TurretDesignPart part)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var setBase(TurretDesignPart part)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var setBody(TurretDesignPart part)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var setMoveBarrels(TurretDesignPart part)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var setMoveBase(TurretDesignPart part)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var setMoveBody(TurretDesignPart part)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+
+
+ Overview +
Home + Functions + Search +
+
Search:
+Predefined Functions & Example Scripts +
Command +Entity +FactionDatabase +PlanGenerator +Player +Sector +Server +UsableInventoryItem +
+
+

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

+
+ +
+ + diff --git a/Documentation/TurretDesignPart.html b/Documentation/TurretDesignPart.html new file mode 100644 index 0000000..407e310 --- /dev/null +++ b/Documentation/TurretDesignPart.html @@ -0,0 +1,517 @@ + + + TurretDesignPart + + + + +
+
+

Avorion Script API Documentation

+
+
+ +
+
Search:
+
+
+ + + + + + + + + + + + + + +
+TurretDesignPart +TurretDesignPart +

Properties

Member Functions
+getMovePlan +
+getPlan +
+getPosition +
+setMovePlan +
+setPlan +
+setPosition +
+
+
+
+

TurretDesignPart

+
+
+

+function TurretDesignPart()
+

+
+
+

+This is the default constructor of TurretDesignPart. No further arguments are required. +

+

Returns

+
+

+A new instance of TurretDesignPart +

+
+

+
+
+
+
+

+function BlockPlan getMovePlan()
+

+
+
+

+
+
+
+
+

+function BlockPlan getPlan()
+

+
+
+

+
+
+
+
+

+function vec3 getPosition()
+

+
+
+

+
+
+
+
+

+function var setMovePlan(BlockPlan plan)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var setPlan(BlockPlan plan)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var setPosition(vec3 in)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+
+
+ Overview +
Home + Functions + Search +
+
Search:
+Predefined Functions & Example Scripts +
Command +Entity +FactionDatabase +PlanGenerator +Player +Sector +Server +UsableInventoryItem +
+
+

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

+
+ +
+ + diff --git a/Documentation/TurretDesignSelectionItem.html b/Documentation/TurretDesignSelectionItem.html new file mode 100644 index 0000000..eb49258 --- /dev/null +++ b/Documentation/TurretDesignSelectionItem.html @@ -0,0 +1,550 @@ + + + TurretDesignSelectionItem + + + + +
+
+

Avorion Script API Documentation

+
+
+ +
+
Search:
+
+
+ + + + + + + + + + + + + + + + + + + + + +
+TurretDesignSelectionItem +TurretDesignSelectionItem +

Properties
+deleteable +
+design +
+hasWorkshopIcon +
+highlighted +
+isLocalProject +
+isOwnSubmission +
+isSubscribedDesign +
+loaded +
+path +
+readyForDeletion +
+type +
+workshopUrl +

Member Functions
+refreshTexture +
+
+
+
+

TurretDesignSelectionItem

+

+This object is only available on the client. +

+
+
+

+function TurretDesignSelectionItem(string path)
+

+
+
+

Returns

+
+

+A new instance of TurretDesignSelectionItem +

+
+

+
+
+
+
+ +
property bool deleteable
+
+
+
+
+ +
property TurretDesign design[read-only]
+
+
+
+
+ +
property bool hasWorkshopIcon[read-only]
+
+
+
+
+ +
property bool highlighted
+
+
+
+
+ +
property bool isLocalProject
+
+
+
+
+ +
property bool isOwnSubmission
+
+
+
+
+ +
property bool isSubscribedDesign
+
+
+
+
+ +
property bool loaded[read-only]
+
+
+
+
+ +
property string path
+
+
+
+
+ +
property bool readyForDeletion
+
+
+
+
+ +
property SavedDesignType type[read-only]
+
+
+
+
+ +
property string workshopUrl[read-only]
+
+
+
+
+
+
+

+function var refreshTexture()
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+
+
+ Overview +
Home + Functions + Search +
+
Search:
+Predefined Functions & Example Scripts +
Command +Entity +FactionDatabase +PlanGenerator +Player +Sector +Server +UsableInventoryItem +
+
+

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

+
+ +
+ + diff --git a/Documentation/TurretTemplate.html b/Documentation/TurretTemplate.html new file mode 100644 index 0000000..f03fc79 --- /dev/null +++ b/Documentation/TurretTemplate.html @@ -0,0 +1,1311 @@ + + + TurretTemplate + + + + +
+
+

Avorion Script API Documentation

+
+
+ +
+
Search:
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+TurretTemplate +TurretTemplate +

Properties
+accuracy +
+ancient +
+armed +
+averageTech +
+baseEnergyPerSecond +
+bestEfficiency +
+blackMarketDLCOnly +
+category +
+civil +
+coaxial +
+continuousBeam +
+coolingRate +
+coolingTime +
+coolingType +
+crew +
+damage +
+damageType +
+deathExplosion +
+dps +
+energyIncreasePerSecond +
+favorite +
+fireRate +
+firing +
+firingsPerSecond +
+flavorText +
+heat +
+heatPerShot +
+holdingForce +
+hullDamageMultiplicator +
+hullDamageMultiplier +
+hullRepairRate +
+intoTheRiftDLCOnly +
+itemType +
+material +
+maxHeat +
+maxTech +
+metalBestEfficiency +
+metalRawEfficiency +
+metalRefinedEfficiency +
+missionRelevant +
+name +
+numVisibleWeapons +
+numWeapons +
+otherForce +
+overheated +
+rarity +
+reach +
+recent +
+requiredShootingEnergy +
+seeker +
+selfForce +
+shieldDamageMultiplicator +
+shieldDamageMultiplier +
+shieldPenetration +
+shieldRepairRate +
+shootingTime +
+shotSpeed +
+shotsPerFiring +
+shotsPerSecond +
+shotsUntilOverheated +
+simultaneousShooting +
+size +
+slots +
+slotType +
+stackable +
+stoneBestEfficiency +
+stoneDamageMultiplicator +
+stoneDamageMultiplier +
+stoneRawEfficiency +
+stoneRefinedEfficiency +
+title +
+trash +
+turningSpeed +
+weaponIcon +
+weaponName +
+weaponPrefix +

Member Functions
+__eq +
+addDescription +
+addWeapon +
+clearDescriptions +
+clearWeapons +
+getCrew +
+getDescriptions +
+getWeapons +
+setBlackMarketDLCOnly +
+setIntoTheRiftDLCOnly +
+setRange +
+updateStaticStats +
+
+
+
+

TurretTemplate

+
+
+

+function TurretTemplate(var other)
+

+
+
+

Returns

+
+

+A new instance of TurretTemplate +

+
+

+
+
+
+
+ +
property float accuracy[read-only]
+
+
+
+
+ +
property bool ancient
+
+
+
+
+ +
property bool armed[read-only]
+
+
+
+
+ +
property int averageTech[read-only]
+
+
+
+
+ +
property float baseEnergyPerSecond
+
+
+
+
+ +
property float bestEfficiency[read-only]
+
+
+
+
+ +
property bool blackMarketDLCOnly[read-only]
+
+
+
+
+ +
property WeaponCategory category[read-only]
+
+
+
+
+ +
property bool civil[read-only]
+
+
+
+
+ +
property bool coaxial
+
+
+
+
+ +
property bool continuousBeam[read-only]
+
+
+
+
+ +
property float coolingRate
+
+
+
+
+ +
property float coolingTime[read-only]
+
+
+
+
+ +
property int coolingType
+
+
+
+
+ +
property Crew crew
+
+
+
+
+ +
property float damage[read-only]
+
+
+
+
+ +
property int damageType[read-only]
+
+
+
+
+ +
property bool deathExplosion[read-only]
+
+
+
+
+ +
property float dps[read-only]
+
+
+
+
+ +
property float energyIncreasePerSecond
+
+
+
+
+ +
property bool favorite
+
+
+
+
+ +
property float fireRate[read-only]
+
+
+
+
+ +
property bool firing
+
+
+
+
+ +
property float firingsPerSecond[read-only]
+
+
+
+
+ +
property var flavorText
+
+
+
+
+ +
property float heat[read-only]
+
+
+
+
+ +
property float heatPerShot
+
+
+
+
+ +
property float holdingForce[read-only]
+
+
+
+
+ +
property float hullDamageMultiplicator[read-only]
+
+
+
+
+ +
property float hullDamageMultiplier[read-only]
+
+
+
+
+ +
property float hullRepairRate[read-only]
+
+
+
+
+ +
property bool intoTheRiftDLCOnly[read-only]
+
+
+
+
+ +
property int itemType[read-only]
+
+
+
+
+ +
property Material material[read-only]
+
+
+
+
+ +
property float maxHeat
+
+
+
+
+ +
property int maxTech[read-only]
+
+
+
+
+ +
property float metalBestEfficiency[read-only]
+
+
+
+
+ +
property float metalRawEfficiency[read-only]
+
+
+
+
+ +
property float metalRefinedEfficiency[read-only]
+
+
+
+
+ +
property bool missionRelevant
+
+
+
+
+ +
property var name[read-only]
+
+
+
+
+ +
property int numVisibleWeapons[read-only]
+
+
+
+
+ +
property int numWeapons[read-only]
+
+
+
+
+ +
property float otherForce[read-only]
+
+
+
+
+ +
property bool overheated[read-only]
+
+
+
+
+ +
property Rarity rarity[read-only]
+
+
+
+
+ +
property float reach[read-only]
+
+
+
+
+ +
property bool recent
+
+
+
+
+ +
property double requiredShootingEnergy[read-only]
+
+
+
+
+ +
property bool seeker[read-only]
+
+
+
+
+ +
property float selfForce[read-only]
+
+
+
+
+ +
property float shieldDamageMultiplicator[read-only]
+
+
+
+
+ +
property float shieldDamageMultiplier[read-only]
+
+
+
+
+ +
property float shieldPenetration[read-only]
+
+
+
+
+ +
property float shieldRepairRate[read-only]
+
+
+
+
+ +
property float shootingTime[read-only]
+
+
+
+
+ +
property float shotSpeed[read-only]
+
+
+
+
+ +
property int shotsPerFiring[read-only]
+
+
+
+
+ +
property float shotsPerSecond[read-only]
+
+
+
+
+ +
property int shotsUntilOverheated[read-only]
+
+
+
+
+ +
property bool simultaneousShooting
+
+
+
+
+ +
property float size
+
+
+
+
+ +
property int slots
+
+
+
+
+ +
property TurretSlotType slotType
+
+
+
+
+ +
property bool stackable[read-only]
+
+
+
+
+ +
property float stoneBestEfficiency[read-only]
+
+
+
+
+ +
property float stoneDamageMultiplicator[read-only]
+
+
+
+
+ +
property float stoneDamageMultiplier[read-only]
+
+
+
+
+ +
property float stoneRawEfficiency[read-only]
+
+
+
+
+ +
property float stoneRefinedEfficiency[read-only]
+
+
+
+
+ +
property var title
+
+
+
+
+ +
property bool trash
+
+
+
+
+ +
property float turningSpeed
+
+
+
+
+ +
property string weaponIcon[read-only]
+
+
+
+
+ +
property string weaponName[read-only]
+
+
+
+
+ +
property string weaponPrefix[read-only]
+
+
+
+
+
+
+

+function bool __eq(var other)
+

+
+
+

+
+
+
+
+

+function var addDescription(string str, string value)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var addWeapon(var weapon)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var clearDescriptions()
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var clearWeapons()
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function Crew getCrew()
+

+
+
+

+
+
+
+
+

+function table<string, string> getDescriptions()
+

+
+
+

+
+
+
+
+

+function Weapon... getWeapons()
+

+
+
+

+Returns all weapons of the object +

+

+
+
+
+
+

+function var setBlackMarketDLCOnly()
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var setIntoTheRiftDLCOnly()
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var setRange(float range)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var updateStaticStats()
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+
+
+ Overview +
Home + Functions + Search +
+
Search:
+Predefined Functions & Example Scripts +
Command +Entity +FactionDatabase +PlanGenerator +Player +Sector +Server +UsableInventoryItem +
+
+

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

+
+ +
+ + diff --git a/Documentation/UIArbitraryHorizontalSplitter.html b/Documentation/UIArbitraryHorizontalSplitter.html new file mode 100644 index 0000000..92c8fc4 --- /dev/null +++ b/Documentation/UIArbitraryHorizontalSplitter.html @@ -0,0 +1,1124 @@ + + + UIArbitraryHorizontalSplitter + + + + +
+
+

Avorion Script API Documentation

+
+
+ +
+
Search:
+ +
+

UIArbitraryHorizontalSplitter

+

+This class gets a rect and creates multiple new rects by arbitrarily splitting the given rect horizontally n times, creating n + 1 new rects. Considers properties like margin and padding between the new rects.

This object is only available on the client. +

+
+
+

+function UIArbitraryHorizontalSplitter(Rect rect, int padding, int margin, float... splits)
+

+
+
+

Parameters

+
+rect +The rect to split
+padding +
+margin +
+splits +The y coordinates of the splits in pixels
+
+

Returns

+
+

+A new instance of UIArbitraryHorizontalSplitter +

+
+

+
+
+
+
+ +
property Rect inner[read-only]
+
+
+
+
+ +
property int margin[write-only]
+
+
+
+
+ +
property int marginBottom
+
+
+
+
+ +
property int marginLeft
+
+
+
+
+ +
property int marginRight
+
+
+
+
+ +
property int marginTop
+
+
+
+
+ +
property int padding[write-only]
+
+
+
+
+ +
property int paddingBottom
+
+
+
+
+ +
property int paddingInside
+
+
+
+
+ +
property int paddingLeft
+
+
+
+
+ +
property int paddingRight
+
+
+
+
+ +
property int paddingTop
+
+
+
+
+ +
property Rect rect
+
+
+
+
+
+
+

+function Rect getBottomLeftRect(Rect rect)
+

+
+
+

+Aligns the given rect to a specific side +

+

Parameters

+
+rect +The given rect
+
+

Returns

+
+

+A copy of the given rect, aligned to the specific side +

+
+

+
+
+
+
+

+function Rect getBottomRect(Rect rect)
+

+
+
+

+Aligns the given rect to a specific side +

+

Parameters

+
+rect +The given rect
+
+

Returns

+
+

+A copy of the given rect, aligned to the specific side +

+
+

+
+
+
+
+

+function Rect getBottomRightRect(Rect rect)
+

+
+
+

+Aligns the given rect to a specific side +

+

Parameters

+
+rect +The given rect
+
+

Returns

+
+

+A copy of the given rect, aligned to the specific side +

+
+

+
+
+
+
+

+function Rect getCenterRect(Rect rect)
+

+
+
+

+Aligns the given rect to a specific side +

+

Parameters

+
+rect +The given rect
+
+

Returns

+
+

+A copy of the given rect, aligned to the specific side +

+
+

+
+
+
+
+

+function Rect getLeftRect(Rect rect)
+

+
+
+

+Aligns the given rect to a specific side +

+

Parameters

+
+rect +The given rect
+
+

Returns

+
+

+A copy of the given rect, aligned to the specific side +

+
+

+
+
+
+
+

+function Rect getRightRect(Rect rect)
+

+
+
+

+Aligns the given rect to a specific side +

+

Parameters

+
+rect +The given rect
+
+

Returns

+
+

+A copy of the given rect, aligned to the specific side +

+
+

+
+
+
+
+

+function Rect getTopLeftRect(Rect rect)
+

+
+
+

+Aligns the given rect to a specific side +

+

Parameters

+
+rect +The given rect
+
+

Returns

+
+

+A copy of the given rect, aligned to the specific side +

+
+

+
+
+
+
+

+function Rect getTopRect(Rect rect)
+

+
+
+

+Aligns the given rect to a specific side +

+

Parameters

+
+rect +The given rect
+
+

Returns

+
+

+A copy of the given rect, aligned to the specific side +

+
+

+
+
+
+
+

+function Rect getTopRightRect(Rect rect)
+

+
+
+

+Aligns the given rect to a specific side +

+

Parameters

+
+rect +The given rect
+
+

Returns

+
+

+A copy of the given rect, aligned to the specific side +

+
+

+
+
+
+
+

+function Rect partition(int index)
+

+
+
+

+Retrieves one of the new created rects +

+

Parameters

+
+index +The index of the retrieved rect, from 0 to splits
+
+

Returns

+
+

+A new rect, size was determined by splitting +

+
+

+
+
+
+
+

+function UIElement placeElementBottom(UIElement element)
+

+
+
+

+Aligns the given UI element to a specific side +

+

Parameters

+
+element +The given UI element
+
+

Returns

+
+

+A reference to the given UI element +

+
+

+
+
+
+
+

+function UIElement placeElementBottomLeft(UIElement element)
+

+
+
+

+Aligns the given UI element to a specific side +

+

Parameters

+
+element +The given UI element
+
+

Returns

+
+

+A reference to the given UI element +

+
+

+
+
+
+
+

+function UIElement placeElementBottomRight(UIElement element)
+

+
+
+

+Aligns the given UI element to a specific side +

+

Parameters

+
+element +The given UI element
+
+

Returns

+
+

+A reference to the given UI element +

+
+

+
+
+
+
+

+function UIElement placeElementCenter(UIElement element)
+

+
+
+

+Aligns the given UI element to a specific side +

+

Parameters

+
+element +The given UI element
+
+

Returns

+
+

+A reference to the given UI element +

+
+

+
+
+
+
+

+function UIElement placeElementLeft(UIElement element)
+

+
+
+

+Aligns the given UI element to a specific side +

+

Parameters

+
+element +The given UI element
+
+

Returns

+
+

+A reference to the given UI element +

+
+

+
+
+
+
+

+function UIElement placeElementRight(UIElement element)
+

+
+
+

+Aligns the given UI element to a specific side +

+

Parameters

+
+element +The given UI element
+
+

Returns

+
+

+A reference to the given UI element +

+
+

+
+
+
+
+

+function UIElement placeElementTop(UIElement element)
+

+
+
+

+Aligns the given UI element to a specific side +

+

Parameters

+
+element +The given UI element
+
+

Returns

+
+

+A reference to the given UI element +

+
+

+
+
+
+
+

+function UIElement placeElementTopLeft(UIElement element)
+

+
+
+

+Aligns the given UI element to a specific side +

+

Parameters

+
+element +The given UI element
+
+

Returns

+
+

+A reference to the given UI element +

+
+

+
+
+
+
+

+function UIElement placeElementTopRight(UIElement element)
+

+
+
+

+Aligns the given UI element to a specific side +

+

Parameters

+
+element +The given UI element
+
+

Returns

+
+

+A reference to the given UI element +

+
+

+
+
+
+
+

+function var setMargin(int left, int right, int top, int bottom)
+

+
+
+

Parameters

+
+left +margin on the left side
+right +margin on the right side
+top +margin on the top side
+bottom +margin on the bottom side
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var setPadding(int left, int right, int top, int bottom)
+

+
+
+

Parameters

+
+left +padding on the left side
+right +padding on the right side
+top +padding on the top side
+bottom +padding on the bottom side
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+
+
+ Overview +
Home + Functions + Search +
+
Search:
+Predefined Functions & Example Scripts +
Command +Entity +FactionDatabase +PlanGenerator +Player +Sector +Server +UsableInventoryItem +
+
+

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

+
+ +
+ + diff --git a/Documentation/UIArbitraryVerticalSplitter.html b/Documentation/UIArbitraryVerticalSplitter.html new file mode 100644 index 0000000..792fa2d --- /dev/null +++ b/Documentation/UIArbitraryVerticalSplitter.html @@ -0,0 +1,1124 @@ + + + UIArbitraryVerticalSplitter + + + + +
+
+

Avorion Script API Documentation

+
+
+ +
+
Search:
+ +
+

UIArbitraryVerticalSplitter

+

+This class gets a rect and creates multiple new rects by arbitrarily splitting the given rect vertically n times, creating n + 1 new rects. Considers properties like margin and padding between the new rects.

This object is only available on the client. +

+
+
+

+function UIArbitraryVerticalSplitter(Rect rect, int padding, int margin, float... splits)
+

+
+
+

Parameters

+
+rect +The rect to split
+padding +
+margin +
+splits +The x coordinates of the splits in pixels
+
+

Returns

+
+

+A new instance of UIArbitraryVerticalSplitter +

+
+

+
+
+
+
+ +
property Rect inner[read-only]
+
+
+
+
+ +
property int margin[write-only]
+
+
+
+
+ +
property int marginBottom
+
+
+
+
+ +
property int marginLeft
+
+
+
+
+ +
property int marginRight
+
+
+
+
+ +
property int marginTop
+
+
+
+
+ +
property int padding[write-only]
+
+
+
+
+ +
property int paddingBottom
+
+
+
+
+ +
property int paddingInside
+
+
+
+
+ +
property int paddingLeft
+
+
+
+
+ +
property int paddingRight
+
+
+
+
+ +
property int paddingTop
+
+
+
+
+ +
property Rect rect
+
+
+
+
+
+
+

+function Rect getBottomLeftRect(Rect rect)
+

+
+
+

+Aligns the given rect to a specific side +

+

Parameters

+
+rect +The given rect
+
+

Returns

+
+

+A copy of the given rect, aligned to the specific side +

+
+

+
+
+
+
+

+function Rect getBottomRect(Rect rect)
+

+
+
+

+Aligns the given rect to a specific side +

+

Parameters

+
+rect +The given rect
+
+

Returns

+
+

+A copy of the given rect, aligned to the specific side +

+
+

+
+
+
+
+

+function Rect getBottomRightRect(Rect rect)
+

+
+
+

+Aligns the given rect to a specific side +

+

Parameters

+
+rect +The given rect
+
+

Returns

+
+

+A copy of the given rect, aligned to the specific side +

+
+

+
+
+
+
+

+function Rect getCenterRect(Rect rect)
+

+
+
+

+Aligns the given rect to a specific side +

+

Parameters

+
+rect +The given rect
+
+

Returns

+
+

+A copy of the given rect, aligned to the specific side +

+
+

+
+
+
+
+

+function Rect getLeftRect(Rect rect)
+

+
+
+

+Aligns the given rect to a specific side +

+

Parameters

+
+rect +The given rect
+
+

Returns

+
+

+A copy of the given rect, aligned to the specific side +

+
+

+
+
+
+
+

+function Rect getRightRect(Rect rect)
+

+
+
+

+Aligns the given rect to a specific side +

+

Parameters

+
+rect +The given rect
+
+

Returns

+
+

+A copy of the given rect, aligned to the specific side +

+
+

+
+
+
+
+

+function Rect getTopLeftRect(Rect rect)
+

+
+
+

+Aligns the given rect to a specific side +

+

Parameters

+
+rect +The given rect
+
+

Returns

+
+

+A copy of the given rect, aligned to the specific side +

+
+

+
+
+
+
+

+function Rect getTopRect(Rect rect)
+

+
+
+

+Aligns the given rect to a specific side +

+

Parameters

+
+rect +The given rect
+
+

Returns

+
+

+A copy of the given rect, aligned to the specific side +

+
+

+
+
+
+
+

+function Rect getTopRightRect(Rect rect)
+

+
+
+

+Aligns the given rect to a specific side +

+

Parameters

+
+rect +The given rect
+
+

Returns

+
+

+A copy of the given rect, aligned to the specific side +

+
+

+
+
+
+
+

+function Rect partition(int index)
+

+
+
+

+Retrieves one of the new created rects +

+

Parameters

+
+index +The index of the retrieved rect, from 0 to splits
+
+

Returns

+
+

+A new rect, size was determined by splitting +

+
+

+
+
+
+
+

+function UIElement placeElementBottom(UIElement element)
+

+
+
+

+Aligns the given UI element to a specific side +

+

Parameters

+
+element +The given UI element
+
+

Returns

+
+

+A reference to the given UI element +

+
+

+
+
+
+
+

+function UIElement placeElementBottomLeft(UIElement element)
+

+
+
+

+Aligns the given UI element to a specific side +

+

Parameters

+
+element +The given UI element
+
+

Returns

+
+

+A reference to the given UI element +

+
+

+
+
+
+
+

+function UIElement placeElementBottomRight(UIElement element)
+

+
+
+

+Aligns the given UI element to a specific side +

+

Parameters

+
+element +The given UI element
+
+

Returns

+
+

+A reference to the given UI element +

+
+

+
+
+
+
+

+function UIElement placeElementCenter(UIElement element)
+

+
+
+

+Aligns the given UI element to a specific side +

+

Parameters

+
+element +The given UI element
+
+

Returns

+
+

+A reference to the given UI element +

+
+

+
+
+
+
+

+function UIElement placeElementLeft(UIElement element)
+

+
+
+

+Aligns the given UI element to a specific side +

+

Parameters

+
+element +The given UI element
+
+

Returns

+
+

+A reference to the given UI element +

+
+

+
+
+
+
+

+function UIElement placeElementRight(UIElement element)
+

+
+
+

+Aligns the given UI element to a specific side +

+

Parameters

+
+element +The given UI element
+
+

Returns

+
+

+A reference to the given UI element +

+
+

+
+
+
+
+

+function UIElement placeElementTop(UIElement element)
+

+
+
+

+Aligns the given UI element to a specific side +

+

Parameters

+
+element +The given UI element
+
+

Returns

+
+

+A reference to the given UI element +

+
+

+
+
+
+
+

+function UIElement placeElementTopLeft(UIElement element)
+

+
+
+

+Aligns the given UI element to a specific side +

+

Parameters

+
+element +The given UI element
+
+

Returns

+
+

+A reference to the given UI element +

+
+

+
+
+
+
+

+function UIElement placeElementTopRight(UIElement element)
+

+
+
+

+Aligns the given UI element to a specific side +

+

Parameters

+
+element +The given UI element
+
+

Returns

+
+

+A reference to the given UI element +

+
+

+
+
+
+
+

+function var setMargin(int left, int right, int top, int bottom)
+

+
+
+

Parameters

+
+left +margin on the left side
+right +margin on the right side
+top +margin on the top side
+bottom +margin on the bottom side
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var setPadding(int left, int right, int top, int bottom)
+

+
+
+

Parameters

+
+left +padding on the left side
+right +padding on the right side
+top +padding on the top side
+bottom +padding on the bottom side
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+
+
+ Overview +
Home + Functions + Search +
+
Search:
+Predefined Functions & Example Scripts +
Command +Entity +FactionDatabase +PlanGenerator +Player +Sector +Server +UsableInventoryItem +
+
+

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

+
+ +
+ + diff --git a/Documentation/UIContainer.html b/Documentation/UIContainer.html new file mode 100644 index 0000000..42300fc --- /dev/null +++ b/Documentation/UIContainer.html @@ -0,0 +1,1171 @@ + + + UIContainer + + + + +
+
+

Avorion Script API Documentation

+
+
+ +
+
Search:
+ +
+

UIContainer : UIElement

+

+This object is only available on the client. +

+
+
+

+function UIContainer(int index)
+

+
+
+

Returns

+
+

+A new instance of UIContainer +

+
+

+
+
+
+
+ +
property vec2 center
+
+
+
+
+ +
property float height
+
+
+
+
+ +
property int index[read-only]
+
+
+
+
+ +
property int layer
+
+
+
+
+ +
property vec2 localCenter[read-only]
+
+
+
+
+ +
property vec2 localPosition[read-only]
+
+
+
+
+ +
property Rect localRect[read-only]
+
+
+
+
+ +
property vec2 lower
+
+
+
+
+ +
property bool mouseOver[read-only]
+
+
+
+
+ +
property vec2 position
+
+
+
+
+ +
property Rect rect
+
+
+
+
+ +
property vec2 size
+
+
+
+
+ +
property var tooltip
+
+
+
+
+ +
property int tooltipWidth[write-only]
+
+
+
+
+ +
property vec2 upper
+
+
+
+
+ +
property bool visible
+
+
+
+
+ +
property float width
+
+
+
+
+
+
+

+function var clear()
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function AllianceEmblem createAllianceEmblem(Rect rect, int allianceIndex)
+

+
+
+

+
+
+
+
+

+function ArrowLine createArrowLine()
+

+
+
+

+
+
+
+
+

+function Button createButton(Rect rect, string caption, string function)
+

+
+
+

+
+
+
+
+

+function CaptainIcon createCaptainIcon(Rect rect)
+

+
+
+

+
+
+
+
+

+function CaptainProfile createCaptainProfile(Rect rect)
+

+
+
+

+
+
+
+
+

+function CheckBox createCheckBox(Rect rect, string caption, string onCheckedFunction)
+

+
+
+

+
+
+
+
+

+function ComboBox createComboBox(Rect rect, string onSelectedFunction)
+

+
+
+

+
+
+
+
+

+function UIContainer createContainer(Rect rect)
+

+
+
+

+
+
+
+
+

+function ContextMenu createContextMenu()
+

+
+
+

+
+
+
+
+

+function CraftPortrait createCraftPortrait(Rect rect, string function)
+

+
+
+

+
+
+
+
+

+function CrewBar createCrewBar(Rect rect)
+

+
+
+

+
+
+
+
+

+function Frame createFrame(Rect rect)
+

+
+
+

+
+
+
+
+

+function InputWindow createInputWindow()
+

+
+
+

+
+
+
+
+

+function InventorySelection createInventorySelection(Rect rect, int width)
+

+
+
+

+
+
+
+
+

+function Label createLabel(var position, string caption, int fontSize)
+

+
+
+

+
+
+
+
+

+function Line createLine(vec2 a, vec2 b)
+

+
+
+

+
+
+
+
+

+function ListBox createListBox(Rect rect)
+

+
+
+

+
+
+
+
+

+function ListBoxEx createListBoxEx(Rect rect)
+

+
+
+

+
+
+
+
+

+function MapArrowLine createMapArrowLine()
+

+
+
+

+
+
+
+
+

+function MapIcon createMapIcon(string texture, ivec2 coordinates, Color [or nil] color)
+

+
+
+

+
+
+
+
+

+function MultiLineTextBox createMultiLineTextBox(Rect rect)
+

+
+
+

+
+
+
+
+

+function NumbersBar createNumbersBar(Rect rect)
+

+
+
+

+
+
+
+
+

+function Picture createPicture(Rect rect, string path)
+

+
+
+

+
+
+
+
+

+function PlanDisplayer createPlanDisplayer(Rect rect)
+

+
+
+

+
+
+
+
+

+function ProgressBar createProgressBar(Rect rect, Color color)
+

+
+
+

+
+
+
+
+

+function UIRect createRect(Rect rect, Color color)
+

+
+
+

+
+
+
+
+

+function Button createRoundButton(Rect rect, string icon, string function)
+

+
+
+

+
+
+
+
+

+function SavedDesignsSelection createSavedDesignsSelection(Rect rect, int width)
+

+
+
+

+
+
+
+
+

+function ScrollFrame createScrollFrame(Rect rect)
+

+
+
+

+
+
+
+
+

+function Selection createSelection(Rect rect, int width)
+

+
+
+

+
+
+
+
+

+function Slider createSlider(Rect rect, int min, int max, int steps, string caption, string onValueChangedFunction)
+

+
+
+

+
+
+
+
+

+function StatisticsBar createStatisticsBar(Rect rect, Color color)
+

+
+
+

+
+
+
+
+

+function TabbedWindow createTabbedWindow(Rect rect)
+

+
+
+

+
+
+
+
+

+function TextBox createTextBox(Rect rect, string onTextChangedFunction)
+

+
+
+

+
+
+
+
+

+function TextField createTextField(Rect rect, string text)
+

+
+
+

+
+
+
+
+

+function TooltipDisplayer createTooltipDisplayer(Rect rect)
+

+
+
+

+
+
+
+
+

+function Tree createTree(Rect rect)
+

+
+
+

+
+
+
+
+

+function ValueComboBox createValueComboBox(Rect rect, string onSelectedFunction)
+

+
+
+

+
+
+
+
+

+function Window createWindow(Rect rect)
+

+
+
+

+
+
+
+
+

+function var hide()
+

+
+
+

+Inherited from UIElement + +

+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function bool isMouseOverAndUnobscured()
+

+
+
+

+Inherited from UIElement + +

+

+
+
+
+
+

+function var show()
+

+
+
+

+Inherited from UIElement + +

+

Returns

+
+

+nothing +

+
+

+
+
+
+
+
+
+ Overview +
Home + Functions + Search +
+
Search:
+Predefined Functions & Example Scripts +
Command +Entity +FactionDatabase +PlanGenerator +Player +Sector +Server +UsableInventoryItem +
+
+

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

+
+ +
+ + diff --git a/Documentation/UIElement.html b/Documentation/UIElement.html new file mode 100644 index 0000000..d1b0b26 --- /dev/null +++ b/Documentation/UIElement.html @@ -0,0 +1,627 @@ + + + UIElement + + + + +
+
+

Avorion Script API Documentation

+
+
+ +
+
Search:
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+UIElement +UIElement +

Properties
+center +
+height +
+index +
+layer +
+localCenter +
+localPosition +
+localRect +
+lower +
+mouseOver +
+position +
+rect +
+size +
+tooltip +
+tooltipWidth +
+upper +
+visible +
+width +

Member Functions
+hide +
+isMouseOverAndUnobscured +
+show +
+
+
+
+

UIElement

+

+This represents a UI Element. Creating an object of this type will not create a new element, but will rather create an interface to access an existing element. Use the UIContainer class to create new entities.
Note: The index property of a UI Element can be changed, but won't change the actual index of the underlying element. Instead, the element interface will be pointing to another element with the new index. Use this for performance to avoid creating lots of element interfaces.

This object is only available on the client. +

+
+
+

+function UIElement(int index)
+

+
+
+

Returns

+
+

+A new instance of UIElement +

+
+

+
+
+
+
+ +
property vec2 center
+
+
+
+
+ +
property float height
+
+
+
+
+ +
property int index[read-only]
+
+
+
+
+ +
property int layer
+
+
+
+
+ +
property vec2 localCenter[read-only]
+
+
+
+
+ +
property vec2 localPosition[read-only]
+
+
+
+
+ +
property Rect localRect[read-only]
+
+
+
+
+ +
property vec2 lower
+
+
+
+
+ +
property bool mouseOver[read-only]
+
+
+
+
+ +
property vec2 position
+
+
+
+
+ +
property Rect rect
+
+
+
+
+ +
property vec2 size
+
+
+
+
+ +
property var tooltip
+
+
+
+
+ +
property int tooltipWidth[write-only]
+
+
+
+
+ +
property vec2 upper
+
+
+
+
+ +
property bool visible
+
+
+
+
+ +
property float width
+
+
+
+
+
+
+

+function var hide()
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function bool isMouseOverAndUnobscured()
+

+
+
+

+
+
+
+
+

+function var show()
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+
+
+ Overview +
Home + Functions + Search +
+
Search:
+Predefined Functions & Example Scripts +
Command +Entity +FactionDatabase +PlanGenerator +Player +Sector +Server +UsableInventoryItem +
+
+

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

+
+ +
+ + diff --git a/Documentation/UIGridSplitter.html b/Documentation/UIGridSplitter.html new file mode 100644 index 0000000..b0916d0 --- /dev/null +++ b/Documentation/UIGridSplitter.html @@ -0,0 +1,1146 @@ + + + UIGridSplitter + + + + +
+
+

Avorion Script API Documentation

+
+
+ +
+
Search:
+ +
+

UIGridSplitter

+

+This class gets a rect and creates multiple new rects by splitting the rect into a grid. Considers properties like margin and padding between the new rects.

This object is only available on the client. +

+
+
+

+function UIGridSplitter(Rect rect, int padding, int margin, int horizontalTiles, int verticalTiles)
+

+
+
+

Parameters

+
+rect +The rect to split
+padding +
+margin +
+horizontalTiles +
+verticalTiles +
+
+

Returns

+
+

+A new instance of UIGridSplitter +

+
+

+
+
+
+
+ +
property int horizontalTiles
+
+
+
+
+ +
property Rect inner[read-only]
+
+
+
+
+ +
property int margin[write-only]
+
+
+
+
+ +
property int marginBottom
+
+
+
+
+ +
property int marginLeft
+
+
+
+
+ +
property int marginRight
+
+
+
+
+ +
property int marginTop
+
+
+
+
+ +
property int padding[write-only]
+
+
+
+
+ +
property int paddingBottom
+
+
+
+
+ +
property int paddingInside
+
+
+
+
+ +
property int paddingLeft
+
+
+
+
+ +
property int paddingRight
+
+
+
+
+ +
property int paddingTop
+
+
+
+
+ +
property Rect rect
+
+
+
+
+ +
property int verticalTiles
+
+
+
+
+
+
+

+function Rect getBottomLeftRect(Rect rect)
+

+
+
+

+Aligns the given rect to a specific side +

+

Parameters

+
+rect +The given rect
+
+

Returns

+
+

+A copy of the given rect, aligned to the specific side +

+
+

+
+
+
+
+

+function Rect getBottomRect(Rect rect)
+

+
+
+

+Aligns the given rect to a specific side +

+

Parameters

+
+rect +The given rect
+
+

Returns

+
+

+A copy of the given rect, aligned to the specific side +

+
+

+
+
+
+
+

+function Rect getBottomRightRect(Rect rect)
+

+
+
+

+Aligns the given rect to a specific side +

+

Parameters

+
+rect +The given rect
+
+

Returns

+
+

+A copy of the given rect, aligned to the specific side +

+
+

+
+
+
+
+

+function Rect getCenterRect(Rect rect)
+

+
+
+

+Aligns the given rect to a specific side +

+

Parameters

+
+rect +The given rect
+
+

Returns

+
+

+A copy of the given rect, aligned to the specific side +

+
+

+
+
+
+
+

+function Rect getLeftRect(Rect rect)
+

+
+
+

+Aligns the given rect to a specific side +

+

Parameters

+
+rect +The given rect
+
+

Returns

+
+

+A copy of the given rect, aligned to the specific side +

+
+

+
+
+
+
+

+function Rect getRightRect(Rect rect)
+

+
+
+

+Aligns the given rect to a specific side +

+

Parameters

+
+rect +The given rect
+
+

Returns

+
+

+A copy of the given rect, aligned to the specific side +

+
+

+
+
+
+
+

+function Rect getTopLeftRect(Rect rect)
+

+
+
+

+Aligns the given rect to a specific side +

+

Parameters

+
+rect +The given rect
+
+

Returns

+
+

+A copy of the given rect, aligned to the specific side +

+
+

+
+
+
+
+

+function Rect getTopRect(Rect rect)
+

+
+
+

+Aligns the given rect to a specific side +

+

Parameters

+
+rect +The given rect
+
+

Returns

+
+

+A copy of the given rect, aligned to the specific side +

+
+

+
+
+
+
+

+function Rect getTopRightRect(Rect rect)
+

+
+
+

+Aligns the given rect to a specific side +

+

Parameters

+
+rect +The given rect
+
+

Returns

+
+

+A copy of the given rect, aligned to the specific side +

+
+

+
+
+
+
+

+function Rect partition(int x, var y)
+

+
+
+

+Retrieves one of the new created rects. If y is nil, returns the xth rect in a left-to-right order, walking through the lines +

+

Parameters

+
+x +The x index of the retrieved rect, starting at 0
+y +The y index of the retrieved rect, starting at 0
+
+

Returns

+
+

+A new rect, size was determined by splitting +

+
+

+
+
+
+
+

+function UIElement placeElementBottom(UIElement element)
+

+
+
+

+Aligns the given UI element to a specific side +

+

Parameters

+
+element +The given UI element
+
+

Returns

+
+

+A reference to the given UI element +

+
+

+
+
+
+
+

+function UIElement placeElementBottomLeft(UIElement element)
+

+
+
+

+Aligns the given UI element to a specific side +

+

Parameters

+
+element +The given UI element
+
+

Returns

+
+

+A reference to the given UI element +

+
+

+
+
+
+
+

+function UIElement placeElementBottomRight(UIElement element)
+

+
+
+

+Aligns the given UI element to a specific side +

+

Parameters

+
+element +The given UI element
+
+

Returns

+
+

+A reference to the given UI element +

+
+

+
+
+
+
+

+function UIElement placeElementCenter(UIElement element)
+

+
+
+

+Aligns the given UI element to a specific side +

+

Parameters

+
+element +The given UI element
+
+

Returns

+
+

+A reference to the given UI element +

+
+

+
+
+
+
+

+function UIElement placeElementLeft(UIElement element)
+

+
+
+

+Aligns the given UI element to a specific side +

+

Parameters

+
+element +The given UI element
+
+

Returns

+
+

+A reference to the given UI element +

+
+

+
+
+
+
+

+function UIElement placeElementRight(UIElement element)
+

+
+
+

+Aligns the given UI element to a specific side +

+

Parameters

+
+element +The given UI element
+
+

Returns

+
+

+A reference to the given UI element +

+
+

+
+
+
+
+

+function UIElement placeElementTop(UIElement element)
+

+
+
+

+Aligns the given UI element to a specific side +

+

Parameters

+
+element +The given UI element
+
+

Returns

+
+

+A reference to the given UI element +

+
+

+
+
+
+
+

+function UIElement placeElementTopLeft(UIElement element)
+

+
+
+

+Aligns the given UI element to a specific side +

+

Parameters

+
+element +The given UI element
+
+

Returns

+
+

+A reference to the given UI element +

+
+

+
+
+
+
+

+function UIElement placeElementTopRight(UIElement element)
+

+
+
+

+Aligns the given UI element to a specific side +

+

Parameters

+
+element +The given UI element
+
+

Returns

+
+

+A reference to the given UI element +

+
+

+
+
+
+
+

+function var setMargin(int left, int right, int top, int bottom)
+

+
+
+

Parameters

+
+left +margin on the left side
+right +margin on the right side
+top +margin on the top side
+bottom +margin on the bottom side
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var setPadding(int left, int right, int top, int bottom)
+

+
+
+

Parameters

+
+left +padding on the left side
+right +padding on the right side
+top +padding on the top side
+bottom +padding on the bottom side
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+
+
+ Overview +
Home + Functions + Search +
+
Search:
+Predefined Functions & Example Scripts +
Command +Entity +FactionDatabase +PlanGenerator +Player +Sector +Server +UsableInventoryItem +
+
+

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

+
+ +
+ + diff --git a/Documentation/UIHorizontalLister.html b/Documentation/UIHorizontalLister.html new file mode 100644 index 0000000..e19092f --- /dev/null +++ b/Documentation/UIHorizontalLister.html @@ -0,0 +1,1234 @@ + + + UIHorizontalLister + + + + +
+
+

Avorion Script API Documentation

+
+
+ +
+
Search:
+ +
+

UIHorizontalLister

+

+This class gets a rect and aligns given elements in a left-to-right list style inside the rect. Considers properties like margin and padding between the elements.

This object is only available on the client. +

+
+
+

+function UIHorizontalLister(Rect rect, int padding, int margin)
+

+
+
+

Parameters

+
+rect +The rect in which the lister aligns its elenents
+padding +
+margin +
+
+

Returns

+
+

+A new instance of UIHorizontalLister +

+
+

+
+
+
+
+ +
property Rect inner[read-only]
+
+
+
+
+ +
property int margin[write-only]
+
+
+
+
+ +
property int marginBottom
+
+
+
+
+ +
property int marginLeft
+
+
+
+
+ +
property int marginRight
+
+
+
+
+ +
property int marginTop
+
+
+
+
+ +
property int padding[write-only]
+
+
+
+
+ +
property int paddingBottom
+
+
+
+
+ +
property int paddingLeft
+
+
+
+
+ +
property int paddingRight
+
+
+
+
+ +
property int paddingTop
+
+
+
+
+ +
property Rect rect
+
+
+
+
+
+
+

+function Rect getBottomLeftRect(Rect rect)
+

+
+
+

+Aligns the given rect to a specific side +

+

Parameters

+
+rect +The given rect
+
+

Returns

+
+

+A copy of the given rect, aligned to the specific side +

+
+

+
+
+
+
+

+function Rect getBottomRect(Rect rect)
+

+
+
+

+Aligns the given rect to a specific side +

+

Parameters

+
+rect +The given rect
+
+

Returns

+
+

+A copy of the given rect, aligned to the specific side +

+
+

+
+
+
+
+

+function Rect getBottomRightRect(Rect rect)
+

+
+
+

+Aligns the given rect to a specific side +

+

Parameters

+
+rect +The given rect
+
+

Returns

+
+

+A copy of the given rect, aligned to the specific side +

+
+

+
+
+
+
+

+function Rect getCenterRect(Rect rect)
+

+
+
+

+Aligns the given rect to a specific side +

+

Parameters

+
+rect +The given rect
+
+

Returns

+
+

+A copy of the given rect, aligned to the specific side +

+
+

+
+
+
+
+

+function Rect getLeftRect(Rect rect)
+

+
+
+

+Aligns the given rect to a specific side +

+

Parameters

+
+rect +The given rect
+
+

Returns

+
+

+A copy of the given rect, aligned to the specific side +

+
+

+
+
+
+
+

+function Rect getRightRect(Rect rect)
+

+
+
+

+Aligns the given rect to a specific side +

+

Parameters

+
+rect +The given rect
+
+

Returns

+
+

+A copy of the given rect, aligned to the specific side +

+
+

+
+
+
+
+

+function Rect getTopLeftRect(Rect rect)
+

+
+
+

+Aligns the given rect to a specific side +

+

Parameters

+
+rect +The given rect
+
+

Returns

+
+

+A copy of the given rect, aligned to the specific side +

+
+

+
+
+
+
+

+function Rect getTopRect(Rect rect)
+

+
+
+

+Aligns the given rect to a specific side +

+

Parameters

+
+rect +The given rect
+
+

Returns

+
+

+A copy of the given rect, aligned to the specific side +

+
+

+
+
+
+
+

+function Rect getTopRightRect(Rect rect)
+

+
+
+

+Aligns the given rect to a specific side +

+

Parameters

+
+rect +The given rect
+
+

Returns

+
+

+A copy of the given rect, aligned to the specific side +

+
+

+
+
+
+
+

+function var hasEnoughSpace(float vec)
+

+
+
+

+Checks if there is enough space to fit a rect with the given height into the lister's remaining rect +

+

Parameters

+
+vec +The size of the rect to test for
+
+

Returns

+
+

+true if there's enough space, false if not +

+
+

+
+
+
+
+

+function Rect nextQuadraticRect()
+

+
+
+

+
+
+
+
+

+function Rect nextRect(float height)
+

+
+
+

+Returns the next rect of a certain height that would be created. The rect will have the full width of the rect given to the lister. +

+

Parameters

+
+height +The height of the rect
+
+

Returns

+
+

+The Rect +

+
+

+
+
+
+
+

+function UIElement placeBottom(vec2 vec)
+

+
+
+

+Uses the given vector to create a Rect of size Rect(0, 0, vec.x, vec.y), places it in the list and aligns it to the right +

+

Parameters

+
+vec +The given size of the rect to align
+
+

Returns

+
+

+The aligned rect +

+
+

+
+
+
+
+

+function UIElement placeCenter(vec2 vec)
+

+
+
+

+Uses the given vector to create a Rect of size Rect(0, 0, vec.x, vec.y), places it in the list and centers it +

+

Parameters

+
+vec +The given size of the rect to align
+
+

Returns

+
+

+The aligned rect +

+
+

+
+
+
+
+

+function UIElement placeElementBottom(UIElement element)
+

+
+
+

+Aligns the given UI element to a specific side +

+

Parameters

+
+element +The given UI element
+
+

Returns

+
+

+A reference to the given UI element +

+
+

+
+
+
+
+

+function UIElement placeElementBottomLeft(UIElement element)
+

+
+
+

+Aligns the given UI element to a specific side +

+

Parameters

+
+element +The given UI element
+
+

Returns

+
+

+A reference to the given UI element +

+
+

+
+
+
+
+

+function UIElement placeElementBottomRight(UIElement element)
+

+
+
+

+Aligns the given UI element to a specific side +

+

Parameters

+
+element +The given UI element
+
+

Returns

+
+

+A reference to the given UI element +

+
+

+
+
+
+
+

+function UIElement placeElementCenter(UIElement element)
+

+
+
+

+Aligns the given UI element to a specific side +

+

Parameters

+
+element +The given UI element
+
+

Returns

+
+

+A reference to the given UI element +

+
+

+
+
+
+
+

+function UIElement placeElementLeft(UIElement element)
+

+
+
+

+Aligns the given UI element to a specific side +

+

Parameters

+
+element +The given UI element
+
+

Returns

+
+

+A reference to the given UI element +

+
+

+
+
+
+
+

+function UIElement placeElementRight(UIElement element)
+

+
+
+

+Aligns the given UI element to a specific side +

+

Parameters

+
+element +The given UI element
+
+

Returns

+
+

+A reference to the given UI element +

+
+

+
+
+
+
+

+function UIElement placeElementTop(UIElement element)
+

+
+
+

+Aligns the given UI element to a specific side +

+

Parameters

+
+element +The given UI element
+
+

Returns

+
+

+A reference to the given UI element +

+
+

+
+
+
+
+

+function UIElement placeElementTopLeft(UIElement element)
+

+
+
+

+Aligns the given UI element to a specific side +

+

Parameters

+
+element +The given UI element
+
+

Returns

+
+

+A reference to the given UI element +

+
+

+
+
+
+
+

+function UIElement placeElementTopRight(UIElement element)
+

+
+
+

+Aligns the given UI element to a specific side +

+

Parameters

+
+element +The given UI element
+
+

Returns

+
+

+A reference to the given UI element +

+
+

+
+
+
+
+

+function UIElement placeTop(vec2 vec)
+

+
+
+

+Uses the given vector to create a Rect of size Rect(0, 0, vec.x, vec.y), places it in the list and aligns it to the left +

+

Parameters

+
+vec +The given size of the rect to align
+
+

Returns

+
+

+The aligned rect +

+
+

+
+
+
+
+

+function var setMargin(int left, int right, int top, int bottom)
+

+
+
+

Parameters

+
+left +margin on the left side
+right +margin on the right side
+top +margin on the top side
+bottom +margin on the bottom side
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var setPadding(int left, int right, int top, int bottom)
+

+
+
+

Parameters

+
+left +padding on the left side
+right +padding on the right side
+top +padding on the top side
+bottom +padding on the bottom side
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+
+
+ Overview +
Home + Functions + Search +
+
Search:
+Predefined Functions & Example Scripts +
Command +Entity +FactionDatabase +PlanGenerator +Player +Sector +Server +UsableInventoryItem +
+
+

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

+
+ +
+ + diff --git a/Documentation/UIHorizontalMultiSplitter.html b/Documentation/UIHorizontalMultiSplitter.html new file mode 100644 index 0000000..e09c200 --- /dev/null +++ b/Documentation/UIHorizontalMultiSplitter.html @@ -0,0 +1,1142 @@ + + + UIHorizontalMultiSplitter + + + + +
+
+

Avorion Script API Documentation

+
+
+ +
+
Search:
+ +
+

UIHorizontalMultiSplitter

+

+This class gets a rect and creates multiple new rects by evenly splitting the given rect horizontally n times, creating n + 1 new rects. Considers properties like margin and padding between the new rects.

This object is only available on the client. +

+
+
+

+function UIHorizontalMultiSplitter(Rect rect, int padding, int margin, int splits)
+

+
+
+

Parameters

+
+rect +The rect to split
+padding +
+margin +
+splits +The number of splits performed
+
+

Returns

+
+

+A new instance of UIHorizontalMultiSplitter +

+
+

+
+
+
+
+ +
property Rect bottom[read-only]
+
+
+
+
+ +
property Rect inner[read-only]
+
+
+
+
+ +
property int margin[write-only]
+
+
+
+
+ +
property int marginBottom
+
+
+
+
+ +
property int marginLeft
+
+
+
+
+ +
property int marginRight
+
+
+
+
+ +
property int marginTop
+
+
+
+
+ +
property int padding[write-only]
+
+
+
+
+ +
property int paddingBottom
+
+
+
+
+ +
property int paddingInside
+
+
+
+
+ +
property int paddingLeft
+
+
+
+
+ +
property int paddingRight
+
+
+
+
+ +
property int paddingTop
+
+
+
+
+ +
property Rect rect
+
+
+
+
+ +
property Rect top[read-only]
+
+
+
+
+
+
+

+function Rect getBottomLeftRect(Rect rect)
+

+
+
+

+Aligns the given rect to a specific side +

+

Parameters

+
+rect +The given rect
+
+

Returns

+
+

+A copy of the given rect, aligned to the specific side +

+
+

+
+
+
+
+

+function Rect getBottomRect(Rect rect)
+

+
+
+

+Aligns the given rect to a specific side +

+

Parameters

+
+rect +The given rect
+
+

Returns

+
+

+A copy of the given rect, aligned to the specific side +

+
+

+
+
+
+
+

+function Rect getBottomRightRect(Rect rect)
+

+
+
+

+Aligns the given rect to a specific side +

+

Parameters

+
+rect +The given rect
+
+

Returns

+
+

+A copy of the given rect, aligned to the specific side +

+
+

+
+
+
+
+

+function Rect getCenterRect(Rect rect)
+

+
+
+

+Aligns the given rect to a specific side +

+

Parameters

+
+rect +The given rect
+
+

Returns

+
+

+A copy of the given rect, aligned to the specific side +

+
+

+
+
+
+
+

+function Rect getLeftRect(Rect rect)
+

+
+
+

+Aligns the given rect to a specific side +

+

Parameters

+
+rect +The given rect
+
+

Returns

+
+

+A copy of the given rect, aligned to the specific side +

+
+

+
+
+
+
+

+function Rect getRightRect(Rect rect)
+

+
+
+

+Aligns the given rect to a specific side +

+

Parameters

+
+rect +The given rect
+
+

Returns

+
+

+A copy of the given rect, aligned to the specific side +

+
+

+
+
+
+
+

+function Rect getTopLeftRect(Rect rect)
+

+
+
+

+Aligns the given rect to a specific side +

+

Parameters

+
+rect +The given rect
+
+

Returns

+
+

+A copy of the given rect, aligned to the specific side +

+
+

+
+
+
+
+

+function Rect getTopRect(Rect rect)
+

+
+
+

+Aligns the given rect to a specific side +

+

Parameters

+
+rect +The given rect
+
+

Returns

+
+

+A copy of the given rect, aligned to the specific side +

+
+

+
+
+
+
+

+function Rect getTopRightRect(Rect rect)
+

+
+
+

+Aligns the given rect to a specific side +

+

Parameters

+
+rect +The given rect
+
+

Returns

+
+

+A copy of the given rect, aligned to the specific side +

+
+

+
+
+
+
+

+function Rect partition(int index)
+

+
+
+

+Retrieves one of the new created rects +

+

Parameters

+
+index +The index of the retrieved rect, from 0 to splits
+
+

Returns

+
+

+A new rect, size was determined by splitting +

+
+

+
+
+
+
+

+function UIElement placeElementBottom(UIElement element)
+

+
+
+

+Aligns the given UI element to a specific side +

+

Parameters

+
+element +The given UI element
+
+

Returns

+
+

+A reference to the given UI element +

+
+

+
+
+
+
+

+function UIElement placeElementBottomLeft(UIElement element)
+

+
+
+

+Aligns the given UI element to a specific side +

+

Parameters

+
+element +The given UI element
+
+

Returns

+
+

+A reference to the given UI element +

+
+

+
+
+
+
+

+function UIElement placeElementBottomRight(UIElement element)
+

+
+
+

+Aligns the given UI element to a specific side +

+

Parameters

+
+element +The given UI element
+
+

Returns

+
+

+A reference to the given UI element +

+
+

+
+
+
+
+

+function UIElement placeElementCenter(UIElement element)
+

+
+
+

+Aligns the given UI element to a specific side +

+

Parameters

+
+element +The given UI element
+
+

Returns

+
+

+A reference to the given UI element +

+
+

+
+
+
+
+

+function UIElement placeElementLeft(UIElement element)
+

+
+
+

+Aligns the given UI element to a specific side +

+

Parameters

+
+element +The given UI element
+
+

Returns

+
+

+A reference to the given UI element +

+
+

+
+
+
+
+

+function UIElement placeElementRight(UIElement element)
+

+
+
+

+Aligns the given UI element to a specific side +

+

Parameters

+
+element +The given UI element
+
+

Returns

+
+

+A reference to the given UI element +

+
+

+
+
+
+
+

+function UIElement placeElementTop(UIElement element)
+

+
+
+

+Aligns the given UI element to a specific side +

+

Parameters

+
+element +The given UI element
+
+

Returns

+
+

+A reference to the given UI element +

+
+

+
+
+
+
+

+function UIElement placeElementTopLeft(UIElement element)
+

+
+
+

+Aligns the given UI element to a specific side +

+

Parameters

+
+element +The given UI element
+
+

Returns

+
+

+A reference to the given UI element +

+
+

+
+
+
+
+

+function UIElement placeElementTopRight(UIElement element)
+

+
+
+

+Aligns the given UI element to a specific side +

+

Parameters

+
+element +The given UI element
+
+

Returns

+
+

+A reference to the given UI element +

+
+

+
+
+
+
+

+function var setMargin(int left, int right, int top, int bottom)
+

+
+
+

Parameters

+
+left +margin on the left side
+right +margin on the right side
+top +margin on the top side
+bottom +margin on the bottom side
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var setPadding(int left, int right, int top, int bottom)
+

+
+
+

Parameters

+
+left +padding on the left side
+right +padding on the right side
+top +padding on the top side
+bottom +padding on the bottom side
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+
+
+ Overview +
Home + Functions + Search +
+
Search:
+Predefined Functions & Example Scripts +
Command +Entity +FactionDatabase +PlanGenerator +Player +Sector +Server +UsableInventoryItem +
+
+

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

+
+ +
+ + diff --git a/Documentation/UIHorizontalSplitter.html b/Documentation/UIHorizontalSplitter.html new file mode 100644 index 0000000..cba7673 --- /dev/null +++ b/Documentation/UIHorizontalSplitter.html @@ -0,0 +1,1186 @@ + + + UIHorizontalSplitter + + + + +
+
+

Avorion Script API Documentation

+
+
+ +
+
Search:
+ +
+

UIHorizontalSplitter

+

+This class gets a rect and creates two new rects by splitting the given rect horizontally. Considers properties like margin and padding between the new rects.

This object is only available on the client. +

+
+
+

+function UIHorizontalSplitter(Rect rect, int padding, int margin, float ratio)
+

+
+
+

Parameters

+
+rect +The rect to split
+padding +
+margin +
+ratio +The ratio of the split rects' sizes
+
+

Returns

+
+

+A new instance of UIHorizontalSplitter +

+
+

+
+
+
+
+ +
property Rect bottom[read-only]
+
+
+
+
+ +
property int bottomSize[write-only]
+
+
+
+
+ +
property Rect inner[read-only]
+
+
+
+
+ +
property int margin[write-only]
+
+
+
+
+ +
property int marginBottom
+
+
+
+
+ +
property int marginLeft
+
+
+
+
+ +
property int marginRight
+
+
+
+
+ +
property int marginTop
+
+
+
+
+ +
property int padding[write-only]
+
+
+
+
+ +
property int paddingBottom
+
+
+
+
+ +
property int paddingInside
+
+
+
+
+ +
property int paddingLeft
+
+
+
+
+ +
property int paddingRight
+
+
+
+
+ +
property int paddingTop
+
+
+
+
+ +
property float ratio
+
+
+
+
+ +
property Rect rect
+
+
+
+
+ +
property Rect top[read-only]
+
+
+
+
+ +
property int topSize[write-only]
+
+
+
+
+
+
+

+function Rect getBottomLeftRect(Rect rect)
+

+
+
+

+Aligns the given rect to a specific side +

+

Parameters

+
+rect +The given rect
+
+

Returns

+
+

+A copy of the given rect, aligned to the specific side +

+
+

+
+
+
+
+

+function Rect getBottomRect(Rect rect)
+

+
+
+

+Aligns the given rect to a specific side +

+

Parameters

+
+rect +The given rect
+
+

Returns

+
+

+A copy of the given rect, aligned to the specific side +

+
+

+
+
+
+
+

+function Rect getBottomRightRect(Rect rect)
+

+
+
+

+Aligns the given rect to a specific side +

+

Parameters

+
+rect +The given rect
+
+

Returns

+
+

+A copy of the given rect, aligned to the specific side +

+
+

+
+
+
+
+

+function Rect getCenterRect(Rect rect)
+

+
+
+

+Aligns the given rect to a specific side +

+

Parameters

+
+rect +The given rect
+
+

Returns

+
+

+A copy of the given rect, aligned to the specific side +

+
+

+
+
+
+
+

+function Rect getLeftRect(Rect rect)
+

+
+
+

+Aligns the given rect to a specific side +

+

Parameters

+
+rect +The given rect
+
+

Returns

+
+

+A copy of the given rect, aligned to the specific side +

+
+

+
+
+
+
+

+function Rect getRightRect(Rect rect)
+

+
+
+

+Aligns the given rect to a specific side +

+

Parameters

+
+rect +The given rect
+
+

Returns

+
+

+A copy of the given rect, aligned to the specific side +

+
+

+
+
+
+
+

+function Rect getTopLeftRect(Rect rect)
+

+
+
+

+Aligns the given rect to a specific side +

+

Parameters

+
+rect +The given rect
+
+

Returns

+
+

+A copy of the given rect, aligned to the specific side +

+
+

+
+
+
+
+

+function Rect getTopRect(Rect rect)
+

+
+
+

+Aligns the given rect to a specific side +

+

Parameters

+
+rect +The given rect
+
+

Returns

+
+

+A copy of the given rect, aligned to the specific side +

+
+

+
+
+
+
+

+function Rect getTopRightRect(Rect rect)
+

+
+
+

+Aligns the given rect to a specific side +

+

Parameters

+
+rect +The given rect
+
+

Returns

+
+

+A copy of the given rect, aligned to the specific side +

+
+

+
+
+
+
+

+function UIElement placeElementBottom(UIElement element)
+

+
+
+

+Aligns the given UI element to a specific side +

+

Parameters

+
+element +The given UI element
+
+

Returns

+
+

+A reference to the given UI element +

+
+

+
+
+
+
+

+function UIElement placeElementBottomLeft(UIElement element)
+

+
+
+

+Aligns the given UI element to a specific side +

+

Parameters

+
+element +The given UI element
+
+

Returns

+
+

+A reference to the given UI element +

+
+

+
+
+
+
+

+function UIElement placeElementBottomRight(UIElement element)
+

+
+
+

+Aligns the given UI element to a specific side +

+

Parameters

+
+element +The given UI element
+
+

Returns

+
+

+A reference to the given UI element +

+
+

+
+
+
+
+

+function UIElement placeElementCenter(UIElement element)
+

+
+
+

+Aligns the given UI element to a specific side +

+

Parameters

+
+element +The given UI element
+
+

Returns

+
+

+A reference to the given UI element +

+
+

+
+
+
+
+

+function UIElement placeElementLeft(UIElement element)
+

+
+
+

+Aligns the given UI element to a specific side +

+

Parameters

+
+element +The given UI element
+
+

Returns

+
+

+A reference to the given UI element +

+
+

+
+
+
+
+

+function UIElement placeElementRight(UIElement element)
+

+
+
+

+Aligns the given UI element to a specific side +

+

Parameters

+
+element +The given UI element
+
+

Returns

+
+

+A reference to the given UI element +

+
+

+
+
+
+
+

+function UIElement placeElementTop(UIElement element)
+

+
+
+

+Aligns the given UI element to a specific side +

+

Parameters

+
+element +The given UI element
+
+

Returns

+
+

+A reference to the given UI element +

+
+

+
+
+
+
+

+function UIElement placeElementTopLeft(UIElement element)
+

+
+
+

+Aligns the given UI element to a specific side +

+

Parameters

+
+element +The given UI element
+
+

Returns

+
+

+A reference to the given UI element +

+
+

+
+
+
+
+

+function UIElement placeElementTopRight(UIElement element)
+

+
+
+

+Aligns the given UI element to a specific side +

+

Parameters

+
+element +The given UI element
+
+

Returns

+
+

+A reference to the given UI element +

+
+

+
+
+
+
+

+function var setBottomQuadratic()
+

+
+
+

+Set the bottom side to have a quadratic size, if possible +

+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var setMargin(int left, int right, int top, int bottom)
+

+
+
+

Parameters

+
+left +margin on the left side
+right +margin on the right side
+top +margin on the top side
+bottom +margin on the bottom side
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var setPadding(int left, int right, int top, int bottom)
+

+
+
+

Parameters

+
+left +padding on the left side
+right +padding on the right side
+top +padding on the top side
+bottom +padding on the bottom side
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var setTopQuadratic()
+

+
+
+

+Set the top side to have a quadratic size, if possible +

+

Returns

+
+

+nothing +

+
+

+
+
+
+
+
+
+ Overview +
Home + Functions + Search +
+
Search:
+Predefined Functions & Example Scripts +
Command +Entity +FactionDatabase +PlanGenerator +Player +Sector +Server +UsableInventoryItem +
+
+

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

+
+ +
+ + diff --git a/Documentation/UIOrganizer.html b/Documentation/UIOrganizer.html new file mode 100644 index 0000000..8fa2f40 --- /dev/null +++ b/Documentation/UIOrganizer.html @@ -0,0 +1,1087 @@ + + + UIOrganizer + + + + +
+
+

Avorion Script API Documentation

+
+
+ +
+
Search:
+ +
+

UIOrganizer

+

+This object is only available on the client. +

+
+
+

+function UIOrganizer(var a, var b)
+

+
+
+

+Expects either a Rect specifying the rect of this UI organizer for parameter a and nil for b, or a vec2 for a and a vec2 for b, specifying the lower and upper bounds for the UI organizer rect.
Examples:
UIOrganizer(Rect(0, 20, 150, 250))
UIOrganizer(vec2(0, 20), vec2(150, 250))
+

+

Parameters

+
+a +Either a Rect and b is nil, or a vec2 and b is a vec2, too
+b +Nil if a is a Rect, or a vec2 if a is a vec2
+
+

Returns

+
+

+A new instance of UIOrganizer +

+
+

+
+
+
+
+ +
property Rect inner[read-only]
+
+
+
+
+ +
property int margin[write-only]
+
+
+
+
+ +
property int marginBottom
+
+
+
+
+ +
property int marginLeft
+
+
+
+
+ +
property int marginRight
+
+
+
+
+ +
property int marginTop
+
+
+
+
+ +
property int padding[write-only]
+
+
+
+
+ +
property int paddingBottom
+
+
+
+
+ +
property int paddingLeft
+
+
+
+
+ +
property int paddingRight
+
+
+
+
+ +
property int paddingTop
+
+
+
+
+ +
property Rect rect
+
+
+
+
+
+
+

+function Rect getBottomLeftRect(Rect rect)
+

+
+
+

+Aligns the given rect to a specific side +

+

Parameters

+
+rect +The given rect
+
+

Returns

+
+

+A copy of the given rect, aligned to the specific side +

+
+

+
+
+
+
+

+function Rect getBottomRect(Rect rect)
+

+
+
+

+Aligns the given rect to a specific side +

+

Parameters

+
+rect +The given rect
+
+

Returns

+
+

+A copy of the given rect, aligned to the specific side +

+
+

+
+
+
+
+

+function Rect getBottomRightRect(Rect rect)
+

+
+
+

+Aligns the given rect to a specific side +

+

Parameters

+
+rect +The given rect
+
+

Returns

+
+

+A copy of the given rect, aligned to the specific side +

+
+

+
+
+
+
+

+function Rect getCenterRect(Rect rect)
+

+
+
+

+Aligns the given rect to a specific side +

+

Parameters

+
+rect +The given rect
+
+

Returns

+
+

+A copy of the given rect, aligned to the specific side +

+
+

+
+
+
+
+

+function Rect getLeftRect(Rect rect)
+

+
+
+

+Aligns the given rect to a specific side +

+

Parameters

+
+rect +The given rect
+
+

Returns

+
+

+A copy of the given rect, aligned to the specific side +

+
+

+
+
+
+
+

+function Rect getRightRect(Rect rect)
+

+
+
+

+Aligns the given rect to a specific side +

+

Parameters

+
+rect +The given rect
+
+

Returns

+
+

+A copy of the given rect, aligned to the specific side +

+
+

+
+
+
+
+

+function Rect getTopLeftRect(Rect rect)
+

+
+
+

+Aligns the given rect to a specific side +

+

Parameters

+
+rect +The given rect
+
+

Returns

+
+

+A copy of the given rect, aligned to the specific side +

+
+

+
+
+
+
+

+function Rect getTopRect(Rect rect)
+

+
+
+

+Aligns the given rect to a specific side +

+

Parameters

+
+rect +The given rect
+
+

Returns

+
+

+A copy of the given rect, aligned to the specific side +

+
+

+
+
+
+
+

+function Rect getTopRightRect(Rect rect)
+

+
+
+

+Aligns the given rect to a specific side +

+

Parameters

+
+rect +The given rect
+
+

Returns

+
+

+A copy of the given rect, aligned to the specific side +

+
+

+
+
+
+
+

+function UIElement placeElementBottom(UIElement element)
+

+
+
+

+Aligns the given UI element to a specific side +

+

Parameters

+
+element +The given UI element
+
+

Returns

+
+

+A reference to the given UI element +

+
+

+
+
+
+
+

+function UIElement placeElementBottomLeft(UIElement element)
+

+
+
+

+Aligns the given UI element to a specific side +

+

Parameters

+
+element +The given UI element
+
+

Returns

+
+

+A reference to the given UI element +

+
+

+
+
+
+
+

+function UIElement placeElementBottomRight(UIElement element)
+

+
+
+

+Aligns the given UI element to a specific side +

+

Parameters

+
+element +The given UI element
+
+

Returns

+
+

+A reference to the given UI element +

+
+

+
+
+
+
+

+function UIElement placeElementCenter(UIElement element)
+

+
+
+

+Aligns the given UI element to a specific side +

+

Parameters

+
+element +The given UI element
+
+

Returns

+
+

+A reference to the given UI element +

+
+

+
+
+
+
+

+function UIElement placeElementLeft(UIElement element)
+

+
+
+

+Aligns the given UI element to a specific side +

+

Parameters

+
+element +The given UI element
+
+

Returns

+
+

+A reference to the given UI element +

+
+

+
+
+
+
+

+function UIElement placeElementRight(UIElement element)
+

+
+
+

+Aligns the given UI element to a specific side +

+

Parameters

+
+element +The given UI element
+
+

Returns

+
+

+A reference to the given UI element +

+
+

+
+
+
+
+

+function UIElement placeElementTop(UIElement element)
+

+
+
+

+Aligns the given UI element to a specific side +

+

Parameters

+
+element +The given UI element
+
+

Returns

+
+

+A reference to the given UI element +

+
+

+
+
+
+
+

+function UIElement placeElementTopLeft(UIElement element)
+

+
+
+

+Aligns the given UI element to a specific side +

+

Parameters

+
+element +The given UI element
+
+

Returns

+
+

+A reference to the given UI element +

+
+

+
+
+
+
+

+function UIElement placeElementTopRight(UIElement element)
+

+
+
+

+Aligns the given UI element to a specific side +

+

Parameters

+
+element +The given UI element
+
+

Returns

+
+

+A reference to the given UI element +

+
+

+
+
+
+
+

+function var setMargin(int left, int right, int top, int bottom)
+

+
+
+

Parameters

+
+left +margin on the left side
+right +margin on the right side
+top +margin on the top side
+bottom +margin on the bottom side
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var setPadding(int left, int right, int top, int bottom)
+

+
+
+

Parameters

+
+left +padding on the left side
+right +padding on the right side
+top +padding on the top side
+bottom +padding on the bottom side
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+
+
+ Overview +
Home + Functions + Search +
+
Search:
+Predefined Functions & Example Scripts +
Command +Entity +FactionDatabase +PlanGenerator +Player +Sector +Server +UsableInventoryItem +
+
+

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

+
+ +
+ + diff --git a/Documentation/UIRect.html b/Documentation/UIRect.html new file mode 100644 index 0000000..a484cb5 --- /dev/null +++ b/Documentation/UIRect.html @@ -0,0 +1,654 @@ + + + UIRect + + + + +
+
+

Avorion Script API Documentation

+
+
+ +
+
Search:
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+UIRect +UIRect +

Properties
+color +
+center +
+height +
+index +
+layer +
+localCenter +
+localPosition +
+localRect +
+lower +
+mouseOver +
+position +
+rect +
+size +
+tooltip +
+tooltipWidth +
+upper +
+visible +
+width +

Member Functions
+hide +
+isMouseOverAndUnobscured +
+show +
+
+
+
+

UIRect : UIElement

+

+This object is only available on the client. +

+
+
+

+function UIRect(int index)
+

+
+
+

Returns

+
+

+A new instance of UIRect +

+
+

+
+
+
+
+ +
property Color color
+
+
+
+
+ +
property vec2 center
+
+
+
+
+ +
property float height
+
+
+
+
+ +
property int index[read-only]
+
+
+
+
+ +
property int layer
+
+
+
+
+ +
property vec2 localCenter[read-only]
+
+
+
+
+ +
property vec2 localPosition[read-only]
+
+
+
+
+ +
property Rect localRect[read-only]
+
+
+
+
+ +
property vec2 lower
+
+
+
+
+ +
property bool mouseOver[read-only]
+
+
+
+
+ +
property vec2 position
+
+
+
+
+ +
property Rect rect
+
+
+
+
+ +
property vec2 size
+
+
+
+
+ +
property var tooltip
+
+
+
+
+ +
property int tooltipWidth[write-only]
+
+
+
+
+ +
property vec2 upper
+
+
+
+
+ +
property bool visible
+
+
+
+
+ +
property float width
+
+
+
+
+
+
+

+function var hide()
+

+
+
+

+Inherited from UIElement + +

+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function bool isMouseOverAndUnobscured()
+

+
+
+

+Inherited from UIElement + +

+

+
+
+
+
+

+function var show()
+

+
+
+

+Inherited from UIElement + +

+

Returns

+
+

+nothing +

+
+

+
+
+
+
+
+
+ Overview +
Home + Functions + Search +
+
Search:
+Predefined Functions & Example Scripts +
Command +Entity +FactionDatabase +PlanGenerator +Player +Sector +Server +UsableInventoryItem +
+
+

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

+
+ +
+ + diff --git a/Documentation/UIRenderer.html b/Documentation/UIRenderer.html new file mode 100644 index 0000000..5212f92 --- /dev/null +++ b/Documentation/UIRenderer.html @@ -0,0 +1,827 @@ + + + UIRenderer + + + + +
+
+

Avorion Script API Documentation

+
+
+ +
+
Search:
+ +
+

UIRenderer

+

+This object is only available on the client. +

+
+
+

+function UIRenderer()
+

+
+
+

Returns

+
+

+A new instance of UIRenderer +

+
+

+
+
+
+
+

+function vec2, int calculateEntityTargeter(Entity entity)
+

+
+
+

+
+
+
+
+

+function var display()
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function Color getEntityTargeterColor(Entity entity)
+

+
+
+

+
+
+
+
+

+function var renderArrow(vec2 pointedAt, Color color, int layer)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var renderBorder(vec2 lower, vec2 upper, Color color, var layer)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var renderCenteredPixelIcon(vec2 position, Color color, string icon, vec2 [or nil] uvScale, var layer)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var renderCentralArrow(vec2 pointedAt, float width, float length, float visibilityThreshold, Color color, int layer)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var renderControls(vec2 position, int action, string text, var layer)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var renderEntityArrow(Entity entity, float width, float length, float visibilityThreshold, Color color, var distanceFromCenter, var layer)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var renderEntityTargeter(Entity entity, Color color, var size, var layer)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var renderGlow(Rect rect, Color color, var layer)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var renderIcon(vec2 lower, vec2 upper, Color color, string icon, vec2 [or nil] uvScale, var layer)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var renderIndicatorArrow(TargetIndicator indicator, float width, float length, float visibilityThreshold, Color color, var distanceFromCenter, var layer)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var renderLine(vec2 a, vec2 b, Color color, var layer)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var renderLineGlow(vec2 p1, vec2 p2, Color c1, Color c2, var layer)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var renderOutlinedLine(vec2 a, vec2 b, int d1, int d2, int d3, int d4, Color color, var layer)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var renderPixelIcon(vec2 topLeft, Color color, string icon, vec2 [or nil] uvScale, var layer)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var renderRect(vec2 lower, vec2 upper, Color color, var layer)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var renderSelectedTargetIndicator(TargetIndicator indicator, var layer)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var renderTargeter(vec2 pos, float size, Color color, int layer)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var renderTargetHP(TargetIndicator indicator, float hpcoeff, Color hpColor, var layer)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var renderTargetIndicator(TargetIndicator indicator, var layer)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+
+
+ Overview +
Home + Functions + Search +
+
Search:
+Predefined Functions & Example Scripts +
Command +Entity +FactionDatabase +PlanGenerator +Player +Sector +Server +UsableInventoryItem +
+
+

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

+
+ +
+ + diff --git a/Documentation/UIVerticalLister.html b/Documentation/UIVerticalLister.html new file mode 100644 index 0000000..00a9f22 --- /dev/null +++ b/Documentation/UIVerticalLister.html @@ -0,0 +1,1234 @@ + + + UIVerticalLister + + + + +
+
+

Avorion Script API Documentation

+
+
+ +
+
Search:
+ +
+

UIVerticalLister

+

+This class gets a rect and aligns given elements in a list style inside the rect. Considers properties like margin and padding between the elements.

This object is only available on the client. +

+
+
+

+function UIVerticalLister(Rect rect, int padding, int margin)
+

+
+
+

Parameters

+
+rect +The rect in which the lister aligns its elenents
+padding +
+margin +
+
+

Returns

+
+

+A new instance of UIVerticalLister +

+
+

+
+
+
+
+ +
property Rect inner[read-only]
+
+
+
+
+ +
property int margin[write-only]
+
+
+
+
+ +
property int marginBottom
+
+
+
+
+ +
property int marginLeft
+
+
+
+
+ +
property int marginRight
+
+
+
+
+ +
property int marginTop
+
+
+
+
+ +
property int padding[write-only]
+
+
+
+
+ +
property int paddingBottom
+
+
+
+
+ +
property int paddingLeft
+
+
+
+
+ +
property int paddingRight
+
+
+
+
+ +
property int paddingTop
+
+
+
+
+ +
property Rect rect
+
+
+
+
+
+
+

+function Rect getBottomLeftRect(Rect rect)
+

+
+
+

+Aligns the given rect to a specific side +

+

Parameters

+
+rect +The given rect
+
+

Returns

+
+

+A copy of the given rect, aligned to the specific side +

+
+

+
+
+
+
+

+function Rect getBottomRect(Rect rect)
+

+
+
+

+Aligns the given rect to a specific side +

+

Parameters

+
+rect +The given rect
+
+

Returns

+
+

+A copy of the given rect, aligned to the specific side +

+
+

+
+
+
+
+

+function Rect getBottomRightRect(Rect rect)
+

+
+
+

+Aligns the given rect to a specific side +

+

Parameters

+
+rect +The given rect
+
+

Returns

+
+

+A copy of the given rect, aligned to the specific side +

+
+

+
+
+
+
+

+function Rect getCenterRect(Rect rect)
+

+
+
+

+Aligns the given rect to a specific side +

+

Parameters

+
+rect +The given rect
+
+

Returns

+
+

+A copy of the given rect, aligned to the specific side +

+
+

+
+
+
+
+

+function Rect getLeftRect(Rect rect)
+

+
+
+

+Aligns the given rect to a specific side +

+

Parameters

+
+rect +The given rect
+
+

Returns

+
+

+A copy of the given rect, aligned to the specific side +

+
+

+
+
+
+
+

+function Rect getRightRect(Rect rect)
+

+
+
+

+Aligns the given rect to a specific side +

+

Parameters

+
+rect +The given rect
+
+

Returns

+
+

+A copy of the given rect, aligned to the specific side +

+
+

+
+
+
+
+

+function Rect getTopLeftRect(Rect rect)
+

+
+
+

+Aligns the given rect to a specific side +

+

Parameters

+
+rect +The given rect
+
+

Returns

+
+

+A copy of the given rect, aligned to the specific side +

+
+

+
+
+
+
+

+function Rect getTopRect(Rect rect)
+

+
+
+

+Aligns the given rect to a specific side +

+

Parameters

+
+rect +The given rect
+
+

Returns

+
+

+A copy of the given rect, aligned to the specific side +

+
+

+
+
+
+
+

+function Rect getTopRightRect(Rect rect)
+

+
+
+

+Aligns the given rect to a specific side +

+

Parameters

+
+rect +The given rect
+
+

Returns

+
+

+A copy of the given rect, aligned to the specific side +

+
+

+
+
+
+
+

+function var hasEnoughSpace(float vec)
+

+
+
+

+Checks if there is enough space to fit a rect with the given height into the lister's remaining rect +

+

Parameters

+
+vec +The size of the rect to test for
+
+

Returns

+
+

+true if there's enough space, false if not +

+
+

+
+
+
+
+

+function Rect nextQuadraticRect()
+

+
+
+

+
+
+
+
+

+function Rect nextRect(float height)
+

+
+
+

+Returns the next rect of a certain height that would be created. The rect will have the full width of the rect given to the lister. +

+

Parameters

+
+height +The height of the rect
+
+

Returns

+
+

+The Rect +

+
+

+
+
+
+
+

+function UIElement placeCenter(vec2 vec)
+

+
+
+

+Uses the given vector to create a Rect of size Rect(0, 0, vec.x, vec.y), places it in the list and centers it +

+

Parameters

+
+vec +The given size of the rect to align
+
+

Returns

+
+

+The aligned rect +

+
+

+
+
+
+
+

+function UIElement placeElementBottom(UIElement element)
+

+
+
+

+Aligns the given UI element to a specific side +

+

Parameters

+
+element +The given UI element
+
+

Returns

+
+

+A reference to the given UI element +

+
+

+
+
+
+
+

+function UIElement placeElementBottomLeft(UIElement element)
+

+
+
+

+Aligns the given UI element to a specific side +

+

Parameters

+
+element +The given UI element
+
+

Returns

+
+

+A reference to the given UI element +

+
+

+
+
+
+
+

+function UIElement placeElementBottomRight(UIElement element)
+

+
+
+

+Aligns the given UI element to a specific side +

+

Parameters

+
+element +The given UI element
+
+

Returns

+
+

+A reference to the given UI element +

+
+

+
+
+
+
+

+function UIElement placeElementCenter(UIElement element)
+

+
+
+

+Aligns the given UI element to a specific side +

+

Parameters

+
+element +The given UI element
+
+

Returns

+
+

+A reference to the given UI element +

+
+

+
+
+
+
+

+function UIElement placeElementLeft(UIElement element)
+

+
+
+

+Aligns the given UI element to a specific side +

+

Parameters

+
+element +The given UI element
+
+

Returns

+
+

+A reference to the given UI element +

+
+

+
+
+
+
+

+function UIElement placeElementRight(UIElement element)
+

+
+
+

+Aligns the given UI element to a specific side +

+

Parameters

+
+element +The given UI element
+
+

Returns

+
+

+A reference to the given UI element +

+
+

+
+
+
+
+

+function UIElement placeElementTop(UIElement element)
+

+
+
+

+Aligns the given UI element to a specific side +

+

Parameters

+
+element +The given UI element
+
+

Returns

+
+

+A reference to the given UI element +

+
+

+
+
+
+
+

+function UIElement placeElementTopLeft(UIElement element)
+

+
+
+

+Aligns the given UI element to a specific side +

+

Parameters

+
+element +The given UI element
+
+

Returns

+
+

+A reference to the given UI element +

+
+

+
+
+
+
+

+function UIElement placeElementTopRight(UIElement element)
+

+
+
+

+Aligns the given UI element to a specific side +

+

Parameters

+
+element +The given UI element
+
+

Returns

+
+

+A reference to the given UI element +

+
+

+
+
+
+
+

+function UIElement placeLeft(vec2 vec)
+

+
+
+

+Uses the given vector to create a Rect of size Rect(0, 0, vec.x, vec.y), places it in the list and aligns it to the left +

+

Parameters

+
+vec +The given size of the rect to align
+
+

Returns

+
+

+The aligned rect +

+
+

+
+
+
+
+

+function UIElement placeRight(vec2 vec)
+

+
+
+

+Uses the given vector to create a Rect of size Rect(0, 0, vec.x, vec.y), places it in the list and aligns it to the right +

+

Parameters

+
+vec +The given size of the rect to align
+
+

Returns

+
+

+The aligned rect +

+
+

+
+
+
+
+

+function var setMargin(int left, int right, int top, int bottom)
+

+
+
+

Parameters

+
+left +margin on the left side
+right +margin on the right side
+top +margin on the top side
+bottom +margin on the bottom side
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var setPadding(int left, int right, int top, int bottom)
+

+
+
+

Parameters

+
+left +padding on the left side
+right +padding on the right side
+top +padding on the top side
+bottom +padding on the bottom side
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+
+
+ Overview +
Home + Functions + Search +
+
Search:
+Predefined Functions & Example Scripts +
Command +Entity +FactionDatabase +PlanGenerator +Player +Sector +Server +UsableInventoryItem +
+
+

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

+
+ +
+ + diff --git a/Documentation/UIVerticalMultiSplitter.html b/Documentation/UIVerticalMultiSplitter.html new file mode 100644 index 0000000..2944bb5 --- /dev/null +++ b/Documentation/UIVerticalMultiSplitter.html @@ -0,0 +1,1142 @@ + + + UIVerticalMultiSplitter + + + + +
+
+

Avorion Script API Documentation

+
+
+ +
+
Search:
+ +
+

UIVerticalMultiSplitter

+

+This class gets a rect and creates multiple new rects by evenly splitting the given rect vertically n times, creating n + 1 new rects. Considers properties like margin and padding between the new rects.

This object is only available on the client. +

+
+
+

+function UIVerticalMultiSplitter(Rect rect, int padding, int margin, int splits)
+

+
+
+

Parameters

+
+rect +The rect to split
+padding +
+margin +
+splits +The number of splits performed
+
+

Returns

+
+

+A new instance of UIVerticalMultiSplitter +

+
+

+
+
+
+
+ +
property Rect inner[read-only]
+
+
+
+
+ +
property Rect left[read-only]
+
+
+
+
+ +
property int margin[write-only]
+
+
+
+
+ +
property int marginBottom
+
+
+
+
+ +
property int marginLeft
+
+
+
+
+ +
property int marginRight
+
+
+
+
+ +
property int marginTop
+
+
+
+
+ +
property int padding[write-only]
+
+
+
+
+ +
property int paddingBottom
+
+
+
+
+ +
property int paddingInside
+
+
+
+
+ +
property int paddingLeft
+
+
+
+
+ +
property int paddingRight
+
+
+
+
+ +
property int paddingTop
+
+
+
+
+ +
property Rect rect
+
+
+
+ +
+
+
+

+function Rect getBottomLeftRect(Rect rect)
+

+
+
+

+Aligns the given rect to a specific side +

+

Parameters

+
+rect +The given rect
+
+

Returns

+
+

+A copy of the given rect, aligned to the specific side +

+
+

+
+
+
+
+

+function Rect getBottomRect(Rect rect)
+

+
+
+

+Aligns the given rect to a specific side +

+

Parameters

+
+rect +The given rect
+
+

Returns

+
+

+A copy of the given rect, aligned to the specific side +

+
+

+
+
+
+
+

+function Rect getBottomRightRect(Rect rect)
+

+
+
+

+Aligns the given rect to a specific side +

+

Parameters

+
+rect +The given rect
+
+

Returns

+
+

+A copy of the given rect, aligned to the specific side +

+
+

+
+
+
+
+

+function Rect getCenterRect(Rect rect)
+

+
+
+

+Aligns the given rect to a specific side +

+

Parameters

+
+rect +The given rect
+
+

Returns

+
+

+A copy of the given rect, aligned to the specific side +

+
+

+
+
+
+
+

+function Rect getLeftRect(Rect rect)
+

+
+
+

+Aligns the given rect to a specific side +

+

Parameters

+
+rect +The given rect
+
+

Returns

+
+

+A copy of the given rect, aligned to the specific side +

+
+

+
+
+
+
+

+function Rect getRightRect(Rect rect)
+

+
+
+

+Aligns the given rect to a specific side +

+

Parameters

+
+rect +The given rect
+
+

Returns

+
+

+A copy of the given rect, aligned to the specific side +

+
+

+
+
+
+
+

+function Rect getTopLeftRect(Rect rect)
+

+
+
+

+Aligns the given rect to a specific side +

+

Parameters

+
+rect +The given rect
+
+

Returns

+
+

+A copy of the given rect, aligned to the specific side +

+
+

+
+
+
+
+

+function Rect getTopRect(Rect rect)
+

+
+
+

+Aligns the given rect to a specific side +

+

Parameters

+
+rect +The given rect
+
+

Returns

+
+

+A copy of the given rect, aligned to the specific side +

+
+

+
+
+
+
+

+function Rect getTopRightRect(Rect rect)
+

+
+
+

+Aligns the given rect to a specific side +

+

Parameters

+
+rect +The given rect
+
+

Returns

+
+

+A copy of the given rect, aligned to the specific side +

+
+

+
+
+
+
+

+function Rect partition(int index)
+

+
+
+

+Retrieves one of the new created rects +

+

Parameters

+
+index +The index of the retrieved rect, from 0 to splits
+
+

Returns

+
+

+A new rect, size was determined by splitting +

+
+

+
+
+
+
+

+function UIElement placeElementBottom(UIElement element)
+

+
+
+

+Aligns the given UI element to a specific side +

+

Parameters

+
+element +The given UI element
+
+

Returns

+
+

+A reference to the given UI element +

+
+

+
+
+
+
+

+function UIElement placeElementBottomLeft(UIElement element)
+

+
+
+

+Aligns the given UI element to a specific side +

+

Parameters

+
+element +The given UI element
+
+

Returns

+
+

+A reference to the given UI element +

+
+

+
+
+
+
+

+function UIElement placeElementBottomRight(UIElement element)
+

+
+
+

+Aligns the given UI element to a specific side +

+

Parameters

+
+element +The given UI element
+
+

Returns

+
+

+A reference to the given UI element +

+
+

+
+
+
+
+

+function UIElement placeElementCenter(UIElement element)
+

+
+
+

+Aligns the given UI element to a specific side +

+

Parameters

+
+element +The given UI element
+
+

Returns

+
+

+A reference to the given UI element +

+
+

+
+
+
+
+

+function UIElement placeElementLeft(UIElement element)
+

+
+
+

+Aligns the given UI element to a specific side +

+

Parameters

+
+element +The given UI element
+
+

Returns

+
+

+A reference to the given UI element +

+
+

+
+
+
+
+

+function UIElement placeElementRight(UIElement element)
+

+
+
+

+Aligns the given UI element to a specific side +

+

Parameters

+
+element +The given UI element
+
+

Returns

+
+

+A reference to the given UI element +

+
+

+
+
+
+
+

+function UIElement placeElementTop(UIElement element)
+

+
+
+

+Aligns the given UI element to a specific side +

+

Parameters

+
+element +The given UI element
+
+

Returns

+
+

+A reference to the given UI element +

+
+

+
+
+
+
+

+function UIElement placeElementTopLeft(UIElement element)
+

+
+
+

+Aligns the given UI element to a specific side +

+

Parameters

+
+element +The given UI element
+
+

Returns

+
+

+A reference to the given UI element +

+
+

+
+
+
+
+

+function UIElement placeElementTopRight(UIElement element)
+

+
+
+

+Aligns the given UI element to a specific side +

+

Parameters

+
+element +The given UI element
+
+

Returns

+
+

+A reference to the given UI element +

+
+

+
+
+
+
+

+function var setMargin(int left, int right, int top, int bottom)
+

+
+
+

Parameters

+
+left +margin on the left side
+right +margin on the right side
+top +margin on the top side
+bottom +margin on the bottom side
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var setPadding(int left, int right, int top, int bottom)
+

+
+
+

Parameters

+
+left +padding on the left side
+right +padding on the right side
+top +padding on the top side
+bottom +padding on the bottom side
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+
+
+ Overview +
Home + Functions + Search +
+
Search:
+Predefined Functions & Example Scripts +
Command +Entity +FactionDatabase +PlanGenerator +Player +Sector +Server +UsableInventoryItem +
+
+

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

+
+ +
+ + diff --git a/Documentation/UIVerticalSplitter.html b/Documentation/UIVerticalSplitter.html new file mode 100644 index 0000000..4199970 --- /dev/null +++ b/Documentation/UIVerticalSplitter.html @@ -0,0 +1,1186 @@ + + + UIVerticalSplitter + + + + +
+
+

Avorion Script API Documentation

+
+
+ +
+
Search:
+ +
+

UIVerticalSplitter

+

+This class gets a rect and creates two new rects by splitting the given rect vertically. Considers properties like margin and padding between the new rects.

This object is only available on the client. +

+
+
+

+function UIVerticalSplitter(Rect rect, int padding, int margin, float ratio)
+

+
+
+

Parameters

+
+rect +The rect to split
+padding +
+margin +
+ratio +The ratio of the split rects' sizes
+
+

Returns

+
+

+A new instance of UIVerticalSplitter +

+
+

+
+
+
+
+ +
property Rect inner[read-only]
+
+
+
+
+ +
property Rect left[read-only]
+
+
+
+
+ +
property int leftSize[write-only]
+
+
+
+
+ +
property int margin[write-only]
+
+
+
+
+ +
property int marginBottom
+
+
+
+
+ +
property int marginLeft
+
+
+
+
+ +
property int marginRight
+
+
+
+
+ +
property int marginTop
+
+
+
+
+ +
property int padding[write-only]
+
+
+
+
+ +
property int paddingBottom
+
+
+
+
+ +
property int paddingInside
+
+
+
+
+ +
property int paddingLeft
+
+
+
+
+ +
property int paddingRight
+
+
+
+
+ +
property int paddingTop
+
+
+
+
+ +
property float ratio
+
+
+
+
+ +
property Rect rect
+
+
+
+ +
+ +
property int rightSize[write-only]
+
+
+
+
+
+
+

+function Rect getBottomLeftRect(Rect rect)
+

+
+
+

+Aligns the given rect to a specific side +

+

Parameters

+
+rect +The given rect
+
+

Returns

+
+

+A copy of the given rect, aligned to the specific side +

+
+

+
+
+
+
+

+function Rect getBottomRect(Rect rect)
+

+
+
+

+Aligns the given rect to a specific side +

+

Parameters

+
+rect +The given rect
+
+

Returns

+
+

+A copy of the given rect, aligned to the specific side +

+
+

+
+
+
+
+

+function Rect getBottomRightRect(Rect rect)
+

+
+
+

+Aligns the given rect to a specific side +

+

Parameters

+
+rect +The given rect
+
+

Returns

+
+

+A copy of the given rect, aligned to the specific side +

+
+

+
+
+
+
+

+function Rect getCenterRect(Rect rect)
+

+
+
+

+Aligns the given rect to a specific side +

+

Parameters

+
+rect +The given rect
+
+

Returns

+
+

+A copy of the given rect, aligned to the specific side +

+
+

+
+
+
+
+

+function Rect getLeftRect(Rect rect)
+

+
+
+

+Aligns the given rect to a specific side +

+

Parameters

+
+rect +The given rect
+
+

Returns

+
+

+A copy of the given rect, aligned to the specific side +

+
+

+
+
+
+
+

+function Rect getRightRect(Rect rect)
+

+
+
+

+Aligns the given rect to a specific side +

+

Parameters

+
+rect +The given rect
+
+

Returns

+
+

+A copy of the given rect, aligned to the specific side +

+
+

+
+
+
+
+

+function Rect getTopLeftRect(Rect rect)
+

+
+
+

+Aligns the given rect to a specific side +

+

Parameters

+
+rect +The given rect
+
+

Returns

+
+

+A copy of the given rect, aligned to the specific side +

+
+

+
+
+
+
+

+function Rect getTopRect(Rect rect)
+

+
+
+

+Aligns the given rect to a specific side +

+

Parameters

+
+rect +The given rect
+
+

Returns

+
+

+A copy of the given rect, aligned to the specific side +

+
+

+
+
+
+
+

+function Rect getTopRightRect(Rect rect)
+

+
+
+

+Aligns the given rect to a specific side +

+

Parameters

+
+rect +The given rect
+
+

Returns

+
+

+A copy of the given rect, aligned to the specific side +

+
+

+
+
+
+
+

+function UIElement placeElementBottom(UIElement element)
+

+
+
+

+Aligns the given UI element to a specific side +

+

Parameters

+
+element +The given UI element
+
+

Returns

+
+

+A reference to the given UI element +

+
+

+
+
+
+
+

+function UIElement placeElementBottomLeft(UIElement element)
+

+
+
+

+Aligns the given UI element to a specific side +

+

Parameters

+
+element +The given UI element
+
+

Returns

+
+

+A reference to the given UI element +

+
+

+
+
+
+
+

+function UIElement placeElementBottomRight(UIElement element)
+

+
+
+

+Aligns the given UI element to a specific side +

+

Parameters

+
+element +The given UI element
+
+

Returns

+
+

+A reference to the given UI element +

+
+

+
+
+
+
+

+function UIElement placeElementCenter(UIElement element)
+

+
+
+

+Aligns the given UI element to a specific side +

+

Parameters

+
+element +The given UI element
+
+

Returns

+
+

+A reference to the given UI element +

+
+

+
+
+
+
+

+function UIElement placeElementLeft(UIElement element)
+

+
+
+

+Aligns the given UI element to a specific side +

+

Parameters

+
+element +The given UI element
+
+

Returns

+
+

+A reference to the given UI element +

+
+

+
+
+
+
+

+function UIElement placeElementRight(UIElement element)
+

+
+
+

+Aligns the given UI element to a specific side +

+

Parameters

+
+element +The given UI element
+
+

Returns

+
+

+A reference to the given UI element +

+
+

+
+
+
+
+

+function UIElement placeElementTop(UIElement element)
+

+
+
+

+Aligns the given UI element to a specific side +

+

Parameters

+
+element +The given UI element
+
+

Returns

+
+

+A reference to the given UI element +

+
+

+
+
+
+
+

+function UIElement placeElementTopLeft(UIElement element)
+

+
+
+

+Aligns the given UI element to a specific side +

+

Parameters

+
+element +The given UI element
+
+

Returns

+
+

+A reference to the given UI element +

+
+

+
+
+
+
+

+function UIElement placeElementTopRight(UIElement element)
+

+
+
+

+Aligns the given UI element to a specific side +

+

Parameters

+
+element +The given UI element
+
+

Returns

+
+

+A reference to the given UI element +

+
+

+
+
+
+
+

+function var setLeftQuadratic()
+

+
+
+

+Set the left side to have a quadratic size, if possible +

+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var setMargin(int left, int right, int top, int bottom)
+

+
+
+

Parameters

+
+left +margin on the left side
+right +margin on the right side
+top +margin on the top side
+bottom +margin on the bottom side
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var setPadding(int left, int right, int top, int bottom)
+

+
+
+

Parameters

+
+left +padding on the left side
+right +padding on the right side
+top +padding on the top side
+bottom +padding on the bottom side
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var setRightQuadratic()
+

+
+
+

+Set the right side to have a quadratic size, if possible +

+

Returns

+
+

+nothing +

+
+

+
+
+
+
+
+
+ Overview +
Home + Functions + Search +
+
Search:
+Predefined Functions & Example Scripts +
Command +Entity +FactionDatabase +PlanGenerator +Player +Sector +Server +UsableInventoryItem +
+
+

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

+
+ +
+ + diff --git a/Documentation/UsableInventoryItem.html b/Documentation/UsableInventoryItem.html new file mode 100644 index 0000000..d391a7b --- /dev/null +++ b/Documentation/UsableInventoryItem.html @@ -0,0 +1,703 @@ + + + UsableInventoryItem + + + + +
+
+

Avorion Script API Documentation

+
+
+ +
+
Search:
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+UsableInventoryItem +UsableInventoryItem +

Properties
+boundFaction +
+depleteOnUse +
+droppable +
+favorite +
+icon +
+iconColor +
+itemType +
+missionRelevant +
+name +
+price +
+rarity +
+recent +
+script +
+stackable +
+tradeable +
+trash +

Member Functions
+__eq +
+clearValues +
+getTooltip +
+getValue +
+getValues +
+setTooltip +
+setValue +
+
+
+
+

UsableInventoryItem

+
+
+

+function UsableInventoryItem(string script, Rarity rarity, var... values)
+

+
+
+

Returns

+
+

+A new instance of UsableInventoryItem +

+
+

+
+
+
+
+ +
property int boundFaction
+
+
+
+
+ +
property bool depleteOnUse
+
+
+
+
+ +
property bool droppable
+
+
+
+
+ +
property bool favorite
+
+
+
+
+ +
property string icon
+
+
+
+
+ +
property Color iconColor
+
+
+
+
+ +
property InventoryItemType itemType[read-only]
+
+
+
+
+ +
property bool missionRelevant
+
+
+
+
+ +
property string name
+
+
+
+
+ +
property int price
+
+
+
+
+ +
property Rarity rarity
+
+
+
+
+ +
property bool recent
+
+
+
+
+ +
property string script
+
+
+
+
+ +
property bool stackable
+
+
+
+
+ +
property bool tradeable
+
+
+
+
+ +
property bool trash
+
+
+
+
+
+
+

+function bool __eq(var other)
+

+
+
+

+
+
+
+
+

+function var clearValues()
+

+
+
+

+Removes all custom values of the object +

+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function Tooltip getTooltip()
+

+
+
+

+
+
+
+
+

+function var getValue(string key)
+

+
+
+

+Retrieves a custom value saved in the entity with the given key +

+

Parameters

+
+key +A string that serves as the name of the value
+
+

Returns

+
+

+The value if the key exists, otherwise nil +

+
+

+
+
+
+
+

+function table<string, var> getValues()
+

+
+
+

+Retrieves all key-value pairs of custom values of the entity +

+

Returns

+
+

+A table containing all custom key-value pairs +

+
+

+
+
+
+
+

+function var setTooltip(Tooltip tooltip)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var setValue(string key, var value)
+

+
+
+

+Sets a custom value +

+

Parameters

+
+key +A string that serves as the name of the value
+value +The value to save. Must be bool, number, string or nil. If nil is given, the value will be deleted.
+
+

+
+
+
+
+
+
+ Overview +
Home + Functions + Search +
+
Search:
+Predefined Functions & Example Scripts +
Command +Entity +FactionDatabase +PlanGenerator +Player +Sector +Server +UsableInventoryItem +
+
+

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

+
+ +
+ + diff --git a/Documentation/UsableInventoryItemFunctions.html b/Documentation/UsableInventoryItemFunctions.html new file mode 100644 index 0000000..c643f7a --- /dev/null +++ b/Documentation/UsableInventoryItemFunctions.html @@ -0,0 +1,468 @@ + + + Avorion Predefined Functions - UsableInventoryItem + + + + +
+
+

Avorion Script API Documentation

+
+
+ +
+
Search:
+
+
+ + + +
+create +
+activate +
+
+
+
+

UsableInventoryItem Script Predefined Functions

+
+

Tip: Scroll down for an example script!

+
+
+

+function create(item, rarity, values...)
+

+
+

+Used to create a new usable inventory item. A pre-filled variant of the item is given as first argument, with script, rarity and icon color already filled in. This item can be filled and should be returned after creating it. +

+

Parameters

+
+item +A pre-filled variant of the item, with script (don't change in this function), rarity and icon color already filled in
+rarity +The rarity of the item, can be changed
+values... +All values passed after rarity when calling UsableInventoryItem(script, rarity, ...)
+
+

Expected return values

+
+

+The completely filled in item with tooltip, values, etc. +

+
+

+
+
+
+

+function activate(player)
+

+
+

+Called when the player uses the item. Sector and Faction background variables are set, entity of the player using it CAN be set. Return true if the usage was successful and the item can be depleted, if the depletedOnUse property is set to true. If false is returned, the item won't be depleted and will be able to be used again. +

+

Parameters

+
+player +The player using the item. This will always be a player, never an Alliance.
+
+

Expected return values

+
+

+true if the usage was successful and the item can be depleted (only if the depletedOnUse property is set to true). +

+
+

+
+
+


UsableInventoryItem Example Script

+
+ +-- Used to create a new usable inventory item. A pre-filled variant of the item is given as first
+-- argument, with script, rarity and icon color already filled in. This item can be filled and
+-- should be returned after creating it.
+function create(item, rarity, values...)
+
+end
+
-- Called when the player uses the item. Sector and Faction background variables are set, entity
+-- of the player using it CAN be set. Return true if the usage was successful and the item can
+-- be depleted, if the depletedOnUse property is set to true. If false is returned, the item won't
+-- be depleted and will be able to be used again.
+function activate(player)
+
+end
+ +
+
+
+
+
+
+ Overview +
Home + Functions + Search +
+
Search:
+Predefined Functions & Example Scripts +
Command +Entity +FactionDatabase +PlanGenerator +Player +Sector +Server +UsableInventoryItem +
+
+

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

+
+ +
+ + diff --git a/Documentation/Uuid.html b/Documentation/Uuid.html new file mode 100644 index 0000000..09cc590 --- /dev/null +++ b/Documentation/Uuid.html @@ -0,0 +1,546 @@ + + + Uuid + + + + +
+
+

Avorion Script API Documentation

+
+
+ +
+
Search:
+
+
+ + + + + + + + + + + + + + + + + + +
+Uuid +Uuid +

Properties
+isNil +
+number +
+string +
+value +

Member Functions
+__eq +
+__le +
+__lt +
+__tostring +
+reset +
+toRandom +
+
+
+
+

Uuid

+
+
+

+function Uuid(var uuid)
+

+
+
+

Returns

+
+

+A new instance of Uuid +

+
+

+
+
+
+
+ +
property bool isNil[read-only]
+
+
+
+
+ +
property int number[read-only]
+
+
+
+
+ +
property string string[read-only]
+
+
+
+
+ +
property string value[read-only]
+
+
+
+
+
+
+

+function bool __eq(var other)
+

+
+
+

+
+
+
+
+

+function bool __le(var other)
+

+
+
+

+
+
+
+
+

+function bool __lt(var other)
+

+
+
+

+
+
+
+
+

+function string __tostring()
+

+
+
+

+
+
+
+
+

+function var reset()
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var toRandom()
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+
+
+ Overview +
Home + Functions + Search +
+
Search:
+Predefined Functions & Example Scripts +
Command +Entity +FactionDatabase +PlanGenerator +Player +Sector +Server +UsableInventoryItem +
+
+

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

+
+ +
+ + diff --git a/Documentation/ValueComboBox.html b/Documentation/ValueComboBox.html new file mode 100644 index 0000000..37b23b4 --- /dev/null +++ b/Documentation/ValueComboBox.html @@ -0,0 +1,838 @@ + + + ValueComboBox + + + + +
+
+

Avorion Script API Documentation

+
+
+ +
+
Search:
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ValueComboBox +ValueComboBox +

Properties
+active +
+clampTextAtArrow +
+entriesPerPage +
+onSelectedFunction +
+scrollPosition +
+selectedEntry +
+selectedIndex +
+selectedValue +
+center +
+height +
+index +
+layer +
+localCenter +
+localPosition +
+localRect +
+lower +
+mouseOver +
+position +
+rect +
+size +
+tooltip +
+tooltipWidth +
+upper +
+visible +
+width +

Member Functions
+addEntry +
+clear +
+getEntry +
+getValue +
+setEntryTooltip +
+setSelectedIndexNoCallback +
+setSelectedValueNoCallback +
+hide +
+isMouseOverAndUnobscured +
+show +
+
+
+
+

ValueComboBox : UIElement

+

+This object is only available on the client. +

+
+
+

+function ValueComboBox(int index)
+

+
+
+

Returns

+
+

+A new instance of ValueComboBox +

+
+

+
+
+
+
+ +
property bool active
+
+
+
+
+ +
property bool clampTextAtArrow[write-only]
+
+
+
+
+ +
property int entriesPerPage[write-only]
+
+
+
+
+ +
property string onSelectedFunction[write-only]
+
+
+
+
+ +
property int scrollPosition
+
+
+
+
+ +
property string selectedEntry[read-only]
+
+
+
+
+ +
property int selectedIndex
+
+
+
+
+ +
property var selectedValue
+
+
+
+
+ +
property vec2 center
+
+
+
+
+ +
property float height
+
+
+
+
+ +
property int index[read-only]
+
+
+
+
+ +
property int layer
+
+
+
+
+ +
property vec2 localCenter[read-only]
+
+
+
+
+ +
property vec2 localPosition[read-only]
+
+
+
+
+ +
property Rect localRect[read-only]
+
+
+
+
+ +
property vec2 lower
+
+
+
+
+ +
property bool mouseOver[read-only]
+
+
+
+
+ +
property vec2 position
+
+
+
+
+ +
property Rect rect
+
+
+
+
+ +
property vec2 size
+
+
+
+
+ +
property var tooltip
+
+
+
+
+ +
property int tooltipWidth[write-only]
+
+
+
+
+ +
property vec2 upper
+
+
+
+
+ +
property bool visible
+
+
+
+
+ +
property float width
+
+
+
+
+
+
+

+function var addEntry(var value, string entry, var color)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var clear()
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function string getEntry(int index)
+

+
+
+

+
+
+
+
+

+function var getValue(int index)
+

+
+
+

+
+
+
+
+

+function var setEntryTooltip(int index, string in)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var setSelectedIndexNoCallback(int in)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var setSelectedValueNoCallback(var value)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var hide()
+

+
+
+

+Inherited from UIElement + +

+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function bool isMouseOverAndUnobscured()
+

+
+
+

+Inherited from UIElement + +

+

+
+
+
+
+

+function var show()
+

+
+
+

+Inherited from UIElement + +

+

Returns

+
+

+nothing +

+
+

+
+
+
+
+
+
+ Overview +
Home + Functions + Search +
+
Search:
+Predefined Functions & Example Scripts +
Command +Entity +FactionDatabase +PlanGenerator +Player +Sector +Server +UsableInventoryItem +
+
+

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

+
+ +
+ + diff --git a/Documentation/VanillaInventoryItem.html b/Documentation/VanillaInventoryItem.html new file mode 100644 index 0000000..8a3b0e3 --- /dev/null +++ b/Documentation/VanillaInventoryItem.html @@ -0,0 +1,688 @@ + + + VanillaInventoryItem + + + + +
+
+

Avorion Script API Documentation

+
+
+ +
+
Search:
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+VanillaInventoryItem +VanillaInventoryItem +

Properties
+boundFaction +
+droppable +
+favorite +
+icon +
+iconColor +
+itemType +
+missionRelevant +
+name +
+price +
+rarity +
+recent +
+stackable +
+tradeable +
+trash +

Member Functions
+__eq +
+clearValues +
+getTooltip +
+getValue +
+getValues +
+setTooltip +
+setValue +
+
+
+
+

VanillaInventoryItem

+
+
+

+function VanillaInventoryItem()
+

+
+
+

+This is the default constructor of VanillaInventoryItem. No further arguments are required. +

+

Returns

+
+

+A new instance of VanillaInventoryItem +

+
+

+
+
+
+
+ +
property int boundFaction
+
+
+
+
+ +
property bool droppable
+
+
+
+
+ +
property bool favorite
+
+
+
+
+ +
property string icon
+
+
+
+
+ +
property Color iconColor
+
+
+
+
+ +
property InventoryItemType itemType[read-only]
+
+
+
+
+ +
property bool missionRelevant
+
+
+
+
+ +
property string name
+
+
+
+
+ +
property int price
+
+
+
+
+ +
property Rarity rarity
+
+
+
+
+ +
property bool recent
+
+
+
+
+ +
property bool stackable
+
+
+
+
+ +
property bool tradeable
+
+
+
+
+ +
property bool trash
+
+
+
+
+
+
+

+function bool __eq(var other)
+

+
+
+

+
+
+
+
+

+function var clearValues()
+

+
+
+

+Removes all custom values of the object +

+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function Tooltip getTooltip()
+

+
+
+

+
+
+
+
+

+function var getValue(string key)
+

+
+
+

+Retrieves a custom value saved in the entity with the given key +

+

Parameters

+
+key +A string that serves as the name of the value
+
+

Returns

+
+

+The value if the key exists, otherwise nil +

+
+

+
+
+
+
+

+function table<string, var> getValues()
+

+
+
+

+Retrieves all key-value pairs of custom values of the entity +

+

Returns

+
+

+A table containing all custom key-value pairs +

+
+

+
+
+
+
+

+function var setTooltip(Tooltip tooltip)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var setValue(string key, var value)
+

+
+
+

+Sets a custom value +

+

Parameters

+
+key +A string that serves as the name of the value
+value +The value to save. Must be bool, number, string or nil. If nil is given, the value will be deleted.
+
+

+
+
+
+
+
+
+ Overview +
Home + Functions + Search +
+
Search:
+Predefined Functions & Example Scripts +
Command +Entity +FactionDatabase +PlanGenerator +Player +Sector +Server +UsableInventoryItem +
+
+

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

+
+ +
+ + diff --git a/Documentation/Velocity.html b/Documentation/Velocity.html new file mode 100644 index 0000000..116a994 --- /dev/null +++ b/Documentation/Velocity.html @@ -0,0 +1,563 @@ + + + Velocity + + + + +
+
+

Avorion Script API Documentation

+
+
+ +
+
Search:
+
+
+ + + + + + + + + + + + + + + + + + + + +
+Velocity +Velocity +

Properties
+axis +
+entity +
+entityId +
+linear +
+linear2 +
+localAngular +
+rotationSpeed +
+velocity +
+velocityf +

Member Functions
+addRotation +
+addVelocity +
+setAngularVelocity +
+
+
+
+

Velocity

+
+
+

+function Velocity(var id)
+

+
+
+

Parameters

+
+id +The id of the entity this component belongs to, or the entity itself, must be an id of an existing entity or nil for the entity in the current script context
+
+

Returns

+
+

+A new instance of Velocity +

+
+

+
+
+
+
+ +
property vec3 axis[read-only]
+
+
+
+
+ +
property Entity entity[read-only]
+
+
+
+
+ +
property uuid entityId[read-only]
+
+
+
+
+ +
property double linear[read-only]
+
+
+
+
+ +
property double linear2[read-only]
+
+
+
+
+ +
property vec3 localAngular[read-only]
+
+
+
+
+ +
property float rotationSpeed[read-only]
+
+
+
+
+ +
property dvec3 velocity
+
+
+
+
+ +
property vec3 velocityf
+
+
+
+
+
+
+

+function var addRotation(vec3 axis, float angle)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var addVelocity(vec3 delta)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var setAngularVelocity(vec3 axis, float angle)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+
+
+ Overview +
Home + Functions + Search +
+
Search:
+Predefined Functions & Example Scripts +
Command +Entity +FactionDatabase +PlanGenerator +Player +Sector +Server +UsableInventoryItem +
+
+

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

+
+ +
+ + diff --git a/Documentation/Version.html b/Documentation/Version.html new file mode 100644 index 0000000..8435f2a --- /dev/null +++ b/Documentation/Version.html @@ -0,0 +1,513 @@ + + + Version + + + + +
+
+

Avorion Script API Documentation

+
+
+ +
+
Search:
+
+
+ + + + + + + + + + + + + + + + + +
+Version +Version +

Properties
+major +
+minor +
+patch +
+revision +
+revisionHash +
+status +

Member Functions
+__eq +
+__lt +
+__tostring +
+
+
+
+

Version

+
+
+

+function Version(var majorVersion, var minorVersion, var patch)
+

+
+
+

Returns

+
+

+A new instance of Version +

+
+

+
+
+
+
+ +
property int major
+
+
+
+
+ +
property int minor
+
+
+
+
+ +
property int patch
+
+
+
+
+ +
property string revision
+
+
+
+
+ +
property string revisionHash
+
+
+
+
+ +
property string status
+
+
+
+
+
+
+

+function bool __eq(Version other)
+

+
+
+

+
+
+
+
+

+function bool __lt(Version other)
+

+
+
+

+
+
+
+
+

+function string __tostring()
+

+
+
+

+
+
+
+
+
+
+ Overview +
Home + Functions + Search +
+
Search:
+Predefined Functions & Example Scripts +
Command +Entity +FactionDatabase +PlanGenerator +Player +Sector +Server +UsableInventoryItem +
+
+

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

+
+ +
+ + diff --git a/Documentation/Weapon.html b/Documentation/Weapon.html new file mode 100644 index 0000000..128bda5 --- /dev/null +++ b/Documentation/Weapon.html @@ -0,0 +1,1092 @@ + + + Weapon + + + + +
+
+

Avorion Script API Documentation

+
+
+ +
+
Search:
+ +
+

Weapon

+
+
+

+function Weapon()
+

+
+
+

Returns

+
+

+A new instance of Weapon +

+
+

+
+
+
+
+ +
property float accuracy
+
+
+
+
+ +
property int appearance
+
+
+
+
+ +
property int appearanceSeed
+
+
+
+
+ +
property bool armed[read-only]
+
+
+
+
+ +
property float banimationAcceleration
+
+
+
+
+ +
property float banimationSpeed
+
+
+
+
+ +
property float bauraWidth
+
+
+
+
+ +
property Color binnerColor
+
+
+
+
+ +
property float blength
+
+
+
+
+ +
property int blockPenetration
+
+
+
+
+ +
property Color bouterColor
+
+
+
+
+ +
property int bshape
+
+
+
+
+ +
property float bshapeSize
+
+
+
+
+ +
property float bwidth
+
+
+
+
+ +
property bool civil[read-only]
+
+
+
+
+ +
property bool continuousBeam
+
+
+
+
+ +
property float damage
+
+
+
+
+ +
property DamageType damageType
+
+
+
+
+ +
property bool deathExplosion
+
+
+
+
+ +
property float dps[read-only]
+
+
+
+
+ +
property float explosionRadius
+
+
+
+
+ +
property float fireDelay
+
+
+
+
+ +
property float fireRate
+
+
+
+
+ +
property float holdingForce
+
+
+
+
+ +
property float hullDamage[read-only]
+
+
+
+
+ +
property float hullDamageMultiplicator
+
+
+
+
+ +
property float hullDamageMultiplier
+
+
+
+
+ +
property float hullRepair
+
+
+
+
+ +
property string icon
+
+
+
+
+ +
property bool impactExplosion
+
+
+
+
+ +
property int impactParticles
+
+
+
+
+ +
property int impactSound
+
+
+
+
+ +
property bool isBeam[read-only]
+
+
+
+
+ +
property bool isProjectile[read-only]
+
+
+
+
+ +
property vec3 localPosition
+
+
+
+
+ +
property Material material
+
+
+
+
+ +
property float metalRawEfficiency
+
+
+
+
+ +
property float metalRefinedEfficiency
+
+
+
+
+ +
property string name
+
+
+
+
+ +
property float otherForce
+
+
+
+
+ +
property float pangularVelocity
+
+
+
+
+ +
property Color pcolor
+
+
+
+
+ +
property float pmaximumTime
+
+
+
+
+ +
property vec3 position[read-only]
+
+
+
+
+ +
property string prefix
+
+
+
+
+ +
property int pshape
+
+
+
+
+ +
property float psize
+
+
+
+
+ +
property float pvelocity
+
+
+
+
+ +
property Rarity rarity
+
+
+
+
+ +
property float reach
+
+
+
+
+ +
property float recoil
+
+
+
+
+ +
property bool seeker
+
+
+
+
+ +
property float selfForce
+
+
+
+
+ +
property float shieldDamage[read-only]
+
+
+
+
+ +
property float shieldDamageMultiplicator
+
+
+
+
+ +
property float shieldDamageMultiplier
+
+
+
+
+ +
property float shieldPenetration
+
+
+
+
+ +
property float shieldRepair
+
+
+
+
+ +
property vec3 shotCreationPosition
+
+
+
+
+ +
property int shotsFired
+
+
+
+
+ +
property float shotsPerSecond[read-only]
+
+
+
+
+ +
property Material smaterial
+
+
+
+
+ +
property string sound
+
+
+
+
+ +
property float stoneDamageMultiplicator
+
+
+
+
+ +
property float stoneDamageMultiplier
+
+
+
+
+ +
property float stoneRawEfficiency
+
+
+
+
+ +
property float stoneRefinedEfficiency
+
+
+
+
+ +
property int tech
+
+
+
+
+ +
property bool timedDeath
+
+
+
+
+
+
+

+function bool propertiesEqual(Weapon other)
+

+
+
+

+
+
+
+
+

+function var setBeam()
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var setProjectile()
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+
+
+ Overview +
Home + Functions + Search +
+
Search:
+Predefined Functions & Example Scripts +
Command +Entity +FactionDatabase +PlanGenerator +Player +Sector +Server +UsableInventoryItem +
+
+

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

+
+ +
+ + diff --git a/Documentation/Weapons.html b/Documentation/Weapons.html new file mode 100644 index 0000000..6b057b2 --- /dev/null +++ b/Documentation/Weapons.html @@ -0,0 +1,1089 @@ + + + Weapons + + + + +
+
+

Avorion Script API Documentation

+
+
+ +
+
Search:
+ +
+

Weapons

+
+
+

+function Weapons(var id)
+

+
+
+

Parameters

+
+id +The id of the entity this component belongs to, or the entity itself, must be an id of an existing entity or nil for the entity in the current script context
+
+

Returns

+
+

+A new instance of Weapons +

+
+

+
+
+
+
+ +
property float accuracy[read-only]
+
+
+
+
+ +
property bool armed[read-only]
+
+
+
+
+ +
property int averageTech[read-only]
+
+
+
+
+ +
property float baseEnergyPerSecond
+
+
+
+
+ +
property float bestEfficiency[read-only]
+
+
+
+
+ +
property WeaponCategory category[read-only]
+
+
+
+
+ +
property bool civil[read-only]
+
+
+
+
+ +
property bool continuousBeam[read-only]
+
+
+
+
+ +
property float coolingRate
+
+
+
+
+ +
property float coolingTime[read-only]
+
+
+
+
+ +
property int coolingType
+
+
+
+
+ +
property float damage[read-only]
+
+
+
+
+ +
property int damageType[read-only]
+
+
+
+
+ +
property bool deathExplosion[read-only]
+
+
+
+
+ +
property float dps[read-only]
+
+
+
+
+ +
property float energyIncreasePerSecond
+
+
+
+
+ +
property Entity entity[read-only]
+
+
+
+
+ +
property uuid entityId[read-only]
+
+
+
+
+ +
property float fireRate[read-only]
+
+
+
+
+ +
property bool firing
+
+
+
+
+ +
property float firingsPerSecond[read-only]
+
+
+
+
+ +
property float heat[read-only]
+
+
+
+
+ +
property float heatPerShot
+
+
+
+
+ +
property float holdingForce[read-only]
+
+
+
+
+ +
property float hullDamageMultiplicator[read-only]
+
+
+
+
+ +
property float hullDamageMultiplier[read-only]
+
+
+
+
+ +
property float hullRepairRate[read-only]
+
+
+
+
+ +
property Material material[read-only]
+
+
+
+
+ +
property float maxHeat
+
+
+
+
+ +
property int maxTech[read-only]
+
+
+
+
+ +
property float metalBestEfficiency[read-only]
+
+
+
+
+ +
property float metalRawEfficiency[read-only]
+
+
+
+
+ +
property float metalRefinedEfficiency[read-only]
+
+
+
+
+ +
property int numVisibleWeapons[read-only]
+
+
+
+
+ +
property unsigned int numWeapons[read-only]
+
+
+
+
+ +
property float otherForce[read-only]
+
+
+
+
+ +
property bool overheated[read-only]
+
+
+
+
+ +
property Rarity rarity[read-only]
+
+
+
+
+ +
property float reach[read-only]
+
+
+
+
+ +
property double requiredShootingEnergy[read-only]
+
+
+
+
+ +
property bool seeker[read-only]
+
+
+
+
+ +
property float selfForce[read-only]
+
+
+
+
+ +
property float shieldDamageMultiplicator[read-only]
+
+
+
+
+ +
property float shieldDamageMultiplier[read-only]
+
+
+
+
+ +
property float shieldPenetration[read-only]
+
+
+
+
+ +
property float shieldRepairRate[read-only]
+
+
+
+
+ +
property float shootingTime[read-only]
+
+
+
+
+ +
property float shotSpeed[read-only]
+
+
+
+
+ +
property int shotsPerFiring[read-only]
+
+
+
+
+ +
property float shotsPerSecond[read-only]
+
+
+
+
+ +
property int shotsUntilOverheated[read-only]
+
+
+
+
+ +
property bool simultaneousShooting
+
+
+
+
+ +
property float stoneBestEfficiency[read-only]
+
+
+
+
+ +
property float stoneDamageMultiplicator[read-only]
+
+
+
+
+ +
property float stoneDamageMultiplier[read-only]
+
+
+
+
+ +
property float stoneRawEfficiency[read-only]
+
+
+
+
+ +
property float stoneRefinedEfficiency[read-only]
+
+
+
+
+ +
property string weaponIcon[read-only]
+
+
+
+
+ +
property string weaponName[read-only]
+
+
+
+
+ +
property string weaponPrefix[read-only]
+
+
+
+
+
+
+

+function var addDescription(string str, string value)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var addWeapon(var weapon)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var clearDescriptions()
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var clearWeapons()
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function table<string, string> getDescriptions()
+

+
+
+

+
+
+
+
+

+function Weapon... getWeapons()
+

+
+
+

+Returns all weapons of the object +

+

+
+
+
+
+

+function var updateStaticStats()
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+
+
+ Overview +
Home + Functions + Search +
+
Search:
+Predefined Functions & Example Scripts +
Command +Entity +FactionDatabase +PlanGenerator +Player +Sector +Server +UsableInventoryItem +
+
+

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

+
+ +
+ + diff --git a/Documentation/Window.html b/Documentation/Window.html new file mode 100644 index 0000000..0a2c4c5 --- /dev/null +++ b/Documentation/Window.html @@ -0,0 +1,1502 @@ + + + Window + + + + +
+
+

Avorion Script API Documentation

+
+
+ +
+
Search:
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Window +Window +

Properties
+caption +
+clickThrough +
+closeableWithEscape +
+consumeAllEvents +
+moveable +
+shadeBackground +
+showCloseButton +
+transparency +
+center +
+height +
+index +
+layer +
+localCenter +
+localPosition +
+localRect +
+lower +
+mouseOver +
+position +
+rect +
+size +
+tooltip +
+tooltipWidth +
+upper +
+visible +
+width +

Member Functions
+center +
+clear +
+createAllianceEmblem +
+createArrowLine +
+createButton +
+createCaptainIcon +
+createCaptainProfile +
+createCheckBox +
+createComboBox +
+createContainer +
+createContextMenu +
+createCraftPortrait +
+createCrewBar +
+createFrame +
+createInputWindow +
+createInventorySelection +
+createLabel +
+createLine +
+createListBox +
+createListBoxEx +
+createMapArrowLine +
+createMapIcon +
+createMultiLineTextBox +
+createNumbersBar +
+createPicture +
+createPlanDisplayer +
+createProgressBar +
+createRect +
+createRoundButton +
+createSavedDesignsSelection +
+createScrollFrame +
+createSelection +
+createSlider +
+createStatisticsBar +
+createTabbedWindow +
+createTextBox +
+createTextField +
+createTooltipDisplayer +
+createTree +
+createValueComboBox +
+createWindow +
+hide +
+isMouseOverAndUnobscured +
+show +
+
+
+
+

Window : UIContainer

+

+This object is only available on the client. +

+
+
+

+function Window(int index)
+

+
+
+

Returns

+
+

+A new instance of Window +

+
+

+
+
+
+
+ +
property string caption
+
+
+
+
+ +
property bool clickThrough
+
+
+
+
+ +
property bool closeableWithEscape
+
+
+
+
+ +
property bool consumeAllEvents
+
+
+
+
+ +
property bool moveable
+
+
+
+
+ +
property bool shadeBackground
+
+
+
+
+ +
property bool showCloseButton
+
+
+
+
+ +
property float transparency
+
+
+
+
+ +
property vec2 center
+
+
+
+
+ +
property float height
+
+
+
+
+ +
property int index[read-only]
+
+
+
+
+ +
property int layer
+
+
+
+
+ +
property vec2 localCenter[read-only]
+
+
+
+
+ +
property vec2 localPosition[read-only]
+
+
+
+
+ +
property Rect localRect[read-only]
+
+
+
+
+ +
property vec2 lower
+
+
+
+
+ +
property bool mouseOver[read-only]
+
+
+
+
+ +
property vec2 position
+
+
+
+
+ +
property Rect rect
+
+
+
+
+ +
property vec2 size
+
+
+
+
+ +
property var tooltip
+
+
+
+
+ +
property int tooltipWidth[write-only]
+
+
+
+
+ +
property vec2 upper
+
+
+
+
+ +
property bool visible
+
+
+
+
+ +
property float width
+
+
+
+
+
+
+

+function var center()
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function var clear()
+

+
+
+

+Inherited from UIContainer + +

+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function AllianceEmblem createAllianceEmblem(Rect rect, int allianceIndex)
+

+
+
+

+Inherited from UIContainer + +

+

+
+
+
+
+

+function ArrowLine createArrowLine()
+

+
+
+

+Inherited from UIContainer + +

+

+
+
+
+
+

+function Button createButton(Rect rect, string caption, string function)
+

+
+
+

+Inherited from UIContainer + +

+

+
+
+
+
+

+function CaptainIcon createCaptainIcon(Rect rect)
+

+
+
+

+Inherited from UIContainer + +

+

+
+
+
+
+

+function CaptainProfile createCaptainProfile(Rect rect)
+

+
+
+

+Inherited from UIContainer + +

+

+
+
+
+
+

+function CheckBox createCheckBox(Rect rect, string caption, string onCheckedFunction)
+

+
+
+

+Inherited from UIContainer + +

+

+
+
+
+
+

+function ComboBox createComboBox(Rect rect, string onSelectedFunction)
+

+
+
+

+Inherited from UIContainer + +

+

+
+
+
+
+

+function UIContainer createContainer(Rect rect)
+

+
+
+

+Inherited from UIContainer + +

+

+
+
+
+
+

+function ContextMenu createContextMenu()
+

+
+
+

+Inherited from UIContainer + +

+

+
+
+
+
+

+function CraftPortrait createCraftPortrait(Rect rect, string function)
+

+
+
+

+Inherited from UIContainer + +

+

+
+
+
+
+

+function CrewBar createCrewBar(Rect rect)
+

+
+
+

+Inherited from UIContainer + +

+

+
+
+
+
+

+function Frame createFrame(Rect rect)
+

+
+
+

+Inherited from UIContainer + +

+

+
+
+
+
+

+function InputWindow createInputWindow()
+

+
+
+

+Inherited from UIContainer + +

+

+
+
+
+
+

+function InventorySelection createInventorySelection(Rect rect, int width)
+

+
+
+

+Inherited from UIContainer + +

+

+
+
+
+
+

+function Label createLabel(var position, string caption, int fontSize)
+

+
+
+

+Inherited from UIContainer + +

+

+
+
+
+
+

+function Line createLine(vec2 a, vec2 b)
+

+
+
+

+Inherited from UIContainer + +

+

+
+
+
+
+

+function ListBox createListBox(Rect rect)
+

+
+
+

+Inherited from UIContainer + +

+

+
+
+
+
+

+function ListBoxEx createListBoxEx(Rect rect)
+

+
+
+

+Inherited from UIContainer + +

+

+
+
+
+
+

+function MapArrowLine createMapArrowLine()
+

+
+
+

+Inherited from UIContainer + +

+

+
+
+
+
+

+function MapIcon createMapIcon(string texture, ivec2 coordinates, Color [or nil] color)
+

+
+
+

+Inherited from UIContainer + +

+

+
+
+
+
+

+function MultiLineTextBox createMultiLineTextBox(Rect rect)
+

+
+
+

+Inherited from UIContainer + +

+

+
+
+
+
+

+function NumbersBar createNumbersBar(Rect rect)
+

+
+
+

+Inherited from UIContainer + +

+

+
+
+
+
+

+function Picture createPicture(Rect rect, string path)
+

+
+
+

+Inherited from UIContainer + +

+

+
+
+
+
+

+function PlanDisplayer createPlanDisplayer(Rect rect)
+

+
+
+

+Inherited from UIContainer + +

+

+
+
+
+
+

+function ProgressBar createProgressBar(Rect rect, Color color)
+

+
+
+

+Inherited from UIContainer + +

+

+
+
+
+
+

+function UIRect createRect(Rect rect, Color color)
+

+
+
+

+Inherited from UIContainer + +

+

+
+
+
+
+

+function Button createRoundButton(Rect rect, string icon, string function)
+

+
+
+

+Inherited from UIContainer + +

+

+
+
+
+
+

+function SavedDesignsSelection createSavedDesignsSelection(Rect rect, int width)
+

+
+
+

+Inherited from UIContainer + +

+

+
+
+
+
+

+function ScrollFrame createScrollFrame(Rect rect)
+

+
+
+

+Inherited from UIContainer + +

+

+
+
+
+
+

+function Selection createSelection(Rect rect, int width)
+

+
+
+

+Inherited from UIContainer + +

+

+
+
+
+
+

+function Slider createSlider(Rect rect, int min, int max, int steps, string caption, string onValueChangedFunction)
+

+
+
+

+Inherited from UIContainer + +

+

+
+
+
+
+

+function StatisticsBar createStatisticsBar(Rect rect, Color color)
+

+
+
+

+Inherited from UIContainer + +

+

+
+
+
+
+

+function TabbedWindow createTabbedWindow(Rect rect)
+

+
+
+

+Inherited from UIContainer + +

+

+
+
+
+
+

+function TextBox createTextBox(Rect rect, string onTextChangedFunction)
+

+
+
+

+Inherited from UIContainer + +

+

+
+
+
+
+

+function TextField createTextField(Rect rect, string text)
+

+
+
+

+Inherited from UIContainer + +

+

+
+
+
+
+

+function TooltipDisplayer createTooltipDisplayer(Rect rect)
+

+
+
+

+Inherited from UIContainer + +

+

+
+
+
+
+

+function Tree createTree(Rect rect)
+

+
+
+

+Inherited from UIContainer + +

+

+
+
+
+
+

+function ValueComboBox createValueComboBox(Rect rect, string onSelectedFunction)
+

+
+
+

+Inherited from UIContainer + +

+

+
+
+
+
+

+function Window createWindow(Rect rect)
+

+
+
+

+Inherited from UIContainer + +

+

+
+
+
+
+

+function var hide()
+

+
+
+

+Inherited from UIElement + +

+

Returns

+
+

+nothing +

+
+

+
+
+
+
+

+function bool isMouseOverAndUnobscured()
+

+
+
+

+Inherited from UIElement + +

+

+
+
+
+
+

+function var show()
+

+
+
+

+Inherited from UIElement + +

+

Returns

+
+

+nothing +

+
+

+
+
+
+
+
+
+ Overview +
Home + Functions + Search +
+
Search:
+Predefined Functions & Example Scripts +
Command +Entity +FactionDatabase +PlanGenerator +Player +Sector +Server +UsableInventoryItem +
+
+

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

+
+ +
+ + diff --git a/Documentation/WormHole.html b/Documentation/WormHole.html new file mode 100644 index 0000000..9062f0b --- /dev/null +++ b/Documentation/WormHole.html @@ -0,0 +1,551 @@ + + + WormHole + + + + +
+
+

Avorion Script API Documentation

+
+
+ +
+
Search:
+
+
+ + + + + + + + + + + + + + + + + + + + +
+WormHole +WormHole +

Properties
+color +
+enabled +
+entity +
+entityId +
+oneWay +
+passageSize +
+simplifiedVisuals +
+visible +
+visualSize +

Member Functions
+fitsThrough +
+getTargetCoordinates +
+setTargetCoordinates +
+
+
+
+

WormHole

+
+
+

+function WormHole(var id)
+

+
+
+

Parameters

+
+id +The id of the entity this component belongs to, or the entity itself, must be an id of an existing entity or nil for the entity in the current script context
+
+

Returns

+
+

+A new instance of WormHole +

+
+

+
+
+
+
+ +
property Color color
+
+
+
+
+ +
property bool enabled
+
+
+
+
+ +
property Entity entity[read-only]
+
+
+
+
+ +
property uuid entityId[read-only]
+
+
+
+
+ +
property bool oneWay
+
+
+
+
+ +
property float passageSize
+
+
+
+
+ +
property bool simplifiedVisuals
+
+
+
+
+ +
property bool visible
+
+
+
+
+ +
property float visualSize
+
+
+
+
+
+
+

+function bool fitsThrough(Entity entity)
+

+
+
+

+
+
+
+
+

+function int, int getTargetCoordinates()
+

+
+
+

+
+
+
+
+

+function var setTargetCoordinates(int x, int y)
+

+
+
+

Returns

+
+

+nothing +

+
+

+
+
+
+
+
+
+ Overview +
Home + Functions + Search +
+
Search:
+Predefined Functions & Example Scripts +
Command +Entity +FactionDatabase +PlanGenerator +Player +Sector +Server +UsableInventoryItem +
+
+

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

+
+ +
+ + diff --git a/Documentation/WreckageCreator.html b/Documentation/WreckageCreator.html new file mode 100644 index 0000000..3a308c2 --- /dev/null +++ b/Documentation/WreckageCreator.html @@ -0,0 +1,455 @@ + + + WreckageCreator + + + + +
+
+

Avorion Script API Documentation

+
+
+ +
+
Search:
+
+
+ + + + + + + + + + + +
+WreckageCreator +WreckageCreator +

Properties
+active +
+entity +
+entityId +

Member Functions
+
+
+
+

WreckageCreator

+

+This object is only available on the server. +

+
+
+

+function WreckageCreator(var id)
+

+
+
+

Parameters

+
+id +The id of the entity this component belongs to, or the entity itself, must be an id of an existing entity or nil for the entity in the current script context
+
+

Returns

+
+

+A new instance of WreckageCreator +

+
+

+
+
+
+
+ +
property bool active[write-only]
+
+
+
+
+ +
property Entity entity[read-only]
+
+
+
+
+ +
property uuid entityId[read-only]
+
+
+
+
+
+
+
+
+ Overview +
Home + Functions + Search +
+
Search:
+Predefined Functions & Example Scripts +
Command +Entity +FactionDatabase +PlanGenerator +Player +Sector +Server +UsableInventoryItem +
+
+

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

+
+ +
+ + diff --git a/Documentation/dvec2.html b/Documentation/dvec2.html new file mode 100644 index 0000000..aa505a6 --- /dev/null +++ b/Documentation/dvec2.html @@ -0,0 +1,549 @@ + + + dvec2 + + + + +
+
+

Avorion Script API Documentation

+
+
+ +
+
Search:
+
+
+ + + + + + + + + + + + + + + + + + +
+dvec2 +dvec2 +

Properties
+x +
+y +

Member Functions
+__add +
+__div +
+__eq +
+__lt +
+__mul +
+__sub +
+__tostring +
+__unm +
+
+
+
+

dvec2

+
+
+

+function dvec2(var x, var y)
+

+
+
+

Parameters

+
+x +
+y +
+
+

Returns

+
+

+A new instance of dvec2 +

+
+

+
+
+
+
+ +
property double x
+
+
+
+
+ +
property double y
+
+
+
+
+
+
+

+function dvec2 __add(var other)
+

+
+
+

+
+
+
+
+

+function dvec2 __div(var other)
+

+
+
+

+
+
+
+
+

+function bool __eq(dvec2 other)
+

+
+
+

+
+
+
+
+

+function bool __lt(dvec2 other)
+

+
+
+

+
+
+
+
+

+function dvec2 __mul(var other)
+

+
+
+

+
+
+
+
+

+function dvec2 __sub(var other)
+

+
+
+

+
+
+
+
+

+function string __tostring()
+

+
+
+

+
+
+
+
+

+function dvec2 __unm()
+

+
+
+

+
+
+
+
+
+
+ Overview +
Home + Functions + Search +
+
Search:
+Predefined Functions & Example Scripts +
Command +Entity +FactionDatabase +PlanGenerator +Player +Sector +Server +UsableInventoryItem +
+
+

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

+
+ +
+ + diff --git a/Documentation/dvec3.html b/Documentation/dvec3.html new file mode 100644 index 0000000..f3a5649 --- /dev/null +++ b/Documentation/dvec3.html @@ -0,0 +1,560 @@ + + + dvec3 + + + + +
+
+

Avorion Script API Documentation

+
+
+ +
+
Search:
+
+
+ + + + + + + + + + + + + + + + + + + +
+dvec3 +dvec3 +

Properties
+x +
+y +
+z +

Member Functions
+__add +
+__div +
+__eq +
+__lt +
+__mul +
+__sub +
+__tostring +
+__unm +
+
+
+
+

dvec3

+
+
+

+function dvec3(var x, var y, var z)
+

+
+
+

Parameters

+
+x +
+y +
+z +
+
+

Returns

+
+

+A new instance of dvec3 +

+
+

+
+
+
+
+ +
property double x
+
+
+
+
+ +
property double y
+
+
+
+
+ +
property double z
+
+
+
+
+
+
+

+function dvec3 __add(var other)
+

+
+
+

+
+
+
+
+

+function dvec3 __div(var other)
+

+
+
+

+
+
+
+
+

+function bool __eq(dvec3 other)
+

+
+
+

+
+
+
+
+

+function bool __lt(dvec3 other)
+

+
+
+

+
+
+
+
+

+function dvec3 __mul(var other)
+

+
+
+

+
+
+
+
+

+function dvec3 __sub(var other)
+

+
+
+

+
+
+
+
+

+function string __tostring()
+

+
+
+

+
+
+
+
+

+function dvec3 __unm()
+

+
+
+

+
+
+
+
+
+
+ Overview +
Home + Functions + Search +
+
Search:
+Predefined Functions & Example Scripts +
Command +Entity +FactionDatabase +PlanGenerator +Player +Sector +Server +UsableInventoryItem +
+
+

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

+
+ +
+ + diff --git a/Documentation/dvec4.html b/Documentation/dvec4.html new file mode 100644 index 0000000..06c375d --- /dev/null +++ b/Documentation/dvec4.html @@ -0,0 +1,571 @@ + + + dvec4 + + + + +
+
+

Avorion Script API Documentation

+
+
+ +
+
Search:
+
+
+ + + + + + + + + + + + + + + + + + + + +
+dvec4 +dvec4 +

Properties
+w +
+x +
+y +
+z +

Member Functions
+__add +
+__div +
+__eq +
+__lt +
+__mul +
+__sub +
+__tostring +
+__unm +
+
+
+
+

dvec4

+
+
+

+function dvec4(var x, var y, var z, var w)
+

+
+
+

Parameters

+
+x +
+y +
+z +
+w +
+
+

Returns

+
+

+A new instance of dvec4 +

+
+

+
+
+
+
+ +
property double w
+
+
+
+
+ +
property double x
+
+
+
+
+ +
property double y
+
+
+
+
+ +
property double z
+
+
+
+
+
+
+

+function dvec4 __add(var other)
+

+
+
+

+
+
+
+
+

+function dvec4 __div(var other)
+

+
+
+

+
+
+
+
+

+function bool __eq(dvec4 other)
+

+
+
+

+
+
+
+
+

+function bool __lt(dvec4 other)
+

+
+
+

+
+
+
+
+

+function dvec4 __mul(var other)
+

+
+
+

+
+
+
+
+

+function dvec4 __sub(var other)
+

+
+
+

+
+
+
+
+

+function string __tostring()
+

+
+
+

+
+
+
+
+

+function dvec4 __unm()
+

+
+
+

+
+
+
+
+
+
+ Overview +
Home + Functions + Search +
+
Search:
+Predefined Functions & Example Scripts +
Command +Entity +FactionDatabase +PlanGenerator +Player +Sector +Server +UsableInventoryItem +
+
+

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

+
+ +
+ + diff --git a/Documentation/index.html b/Documentation/index.html new file mode 100644 index 0000000..b4d78c9 --- /dev/null +++ b/Documentation/index.html @@ -0,0 +1,2221 @@ + + + Avorion Documentation + + + + +
+
+

Avorion Script API Documentation

+
+

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

+
+
+
+ Overview +
Home + Functions + Search +
+
Search:
+Predefined Functions & Example Scripts +
Command +Entity +FactionDatabase +PlanGenerator +Player +Sector +Server +UsableInventoryItem +
+
+
+

Objects

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Achievements +
+Alliance [Client] +
+Alliance [Server] +
+AllianceEmblem +
+AllianceMember +
+AllianceRank +
+AllianceTab +
+ArrowLine +
+BlockPlan +
+BlockPlanBlock +
+BlockStatistics +
+Boarding +
+Box +
+BspTree +
+Button [Client] [Client] +
+Button [Client] [Client] +
+CameraKeyFrame +
+Captain +
+CaptainIcon +
+CaptainProfile +
+CaptainSelectionItem +
+CargoBay +
+CargoLoot +
+CheckBox +
+Client +
+ClientSettings +
+Color +
+ColorSelectionItem +
+ComboBox +
+ContextMenu +
+ControlUnit +
+ControlUnitSeat +
+CraftDesign +
+CraftDesignSelectionItem +
+CraftPortrait +
+CraftStatsOverview +
+Crew +
+CrewBar +
+CrewComponent +
+CrewMan +
+CrewProfession +
+DebugInfo +
+DeletionTimer +
+DirectFlightPhysics +
+DockingClamps +
+DockingParent +
+DockingPositions +
+Durability +
+dvec2 +
+dvec3 +
+dvec4 +
+EnergySystem +
+Engine +
+Entity +
+EntityDescriptor +
+EntityIcon +
+EntityTooltip +
+EntityTransferrer +
+Faction [Client] +
+Faction [Server] +
+FighterAI +
+FighterController +
+FighterTemplate +
+Format +
+Frame +
+Galaxy [Client] +
+Galaxy [Server] +
+GalaxyMap +
+GameInput +
+GameSettings +
+GlowFX +
+Group +
+Hangar +
+HighResolutionTimer +
+Hud +
+HyperspaceEngine +
+IconSelectionItem +
+InputWindow +
+InteractionText +
+Inventory +
+InventoryItemLoot +
+InventoryReferenceSelectionItem +
+InventorySelection +
+InventorySelectionItem +
+InventoryTurret +
+ivec2 +
+ivec3 +
+ivec4 +
+Keyboard +
+Label +
+Language +
+LaserFX +
+Line +
+ListBox +
+ListBoxEx +
+Loot +
+Mail +
+MapArrowLine +
+MapIcon +
+Material +
+Matrix +
+ModManager +
+Mouse +
+MultiLineTextBox +
+Music +
+NamedFormat +
+NumbersBar +
+Owner +
+Physics +
+Picture +
+PixelIconSelectionItem +
+Plan +
+PlanBspTree +
+PlanDisplayer +
+Planet +
+PlanetSpecifics +
+PlanGenerationStage +
+PlanMesh +
+PlanPart +
+PlanStyle +
+Player [Client] +
+Player [Server] +
+PlayerId +
+PlayerWindow +
+PluralForm +
+Profiler +
+ProgressBar +
+QuadTree +
+Random +
+Rarity +
+Ray +
+ReadOnlyBoarding +
+ReadOnlyBspTree +
+ReadOnlyCargoBay +
+ReadOnlyControlUnit +
+ReadOnlyCrew +
+ReadOnlyDeletionTimer +
+ReadOnlyEnergySystem +
+ReadOnlyEngine +
+ReadOnlyEntity +
+ReadOnlyEntityTransferrer +
+ReadOnlyFighterAI +
+ReadOnlyFighterController +
+ReadOnlyHangar +
+ReadOnlyHyperspaceEngine +
+ReadOnlyIcon +
+ReadOnlyInteractionText +
+ReadOnlyLoot +
+ReadOnlyOwner +
+ReadOnlyPhysics +
+ReadOnlyPlan +
+ReadOnlyPlanMesh +
+ReadOnlyScriptUI +
+ReadOnlySector +
+ReadOnlyShipAI +
+ReadOnlyShipSystem +
+ReadOnlyTooltip +
+ReadOnlyTorpedoAI [Server] [Client] [Server] [Client] +
+ReadOnlyTorpedoAI [Server] [Client] [Server] [Client] +
+ReadOnlyTorpedoLauncher +
+ReadOnlyTurretBases +
+ReadOnlyTurretController +
+ReadOnlyVelocity +
+ReadOnlyWeapons +
+ReadOnlyWormHole +
+ReadOnlyWreckageCreator +
+Rect +
+RefractionFX +
+Relation +
+SavedDesignsSelection +
+Scenario +
+ScriptUI +
+ScrollFrame +
+Sector [Client] +
+Sector [Server] +
+SectorView +
+Seed +
+Selection +
+SelectionItem +
+Server +
+Shield +
+ShipAI +
+ShipDatabaseEntry [Client] +
+ShipDatabaseEntry [Server] +
+ShipSystem +
+ShipWindow +
+Slider +
+SoundSource +
+Sphere +
+Squad +
+StatisticsBar +
+StrategyState +
+StructuralIntegrity +
+SystemUpgradeLoot +
+SystemUpgradeTemplate +
+Tab +
+TabbedWindow +
+TargetIndicator +
+TextBox +
+TextField +
+Thrusters +
+Timer +
+Tooltip +
+TooltipDisplayer +
+TooltipLine +
+TooltipRenderer +
+Torpedo +
+TorpedoAI +
+TorpedoLauncher +
+TorpedoShaft +
+TorpedoTemplate +
+TradingGood +
+Tree +
+Turret +
+TurretAI +
+TurretBases +
+TurretController +
+TurretDesign +
+TurretDesignPart +
+TurretDesignSelectionItem +
+TurretTemplate +
+UIArbitraryHorizontalSplitter +
+UIArbitraryVerticalSplitter +
+UIContainer +
+UIElement +
+UIGridSplitter +
+UIHorizontalLister +
+UIHorizontalMultiSplitter +
+UIHorizontalSplitter +
+UIOrganizer +
+UIRect +
+UIRenderer +
+UIVerticalLister +
+UIVerticalMultiSplitter +
+UIVerticalSplitter +
+UsableInventoryItem +
+Uuid +
+ValueComboBox +
+VanillaInventoryItem +
+vec2 +
+vec3 +
+vec4 +
+Velocity +
+Version +
+Weapon +
+Weapons +
+Window +
+WormHole +
+WreckageCreator +
+

+
+
+
+

Functions

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+addCountdownBar +
+addSectorProblem +
+addShipProblem +
+appTime +
+appTimeMs +
+AsteroidDescriptor +
+async +
+async +
+async +
+asyncf +
+asyncf +
+asyncf +
+broadcastInvokeClientFunction +
+calculateJumpPath +
+canBoard +
+canBuildAdvancedBlocksInCurrentEnvironment +
+canBuildInCurrentEnvironment +
+canRepairInCurrentEnvironment +
+CargoLootDescriptor +
+checkReadSecureFilename +
+checkWriteSecureFilename +
+ColorARGB +
+ColorHSV +
+ColorInt +
+ColorNone +
+ColorPalette +
+ColorRGB +
+copy +
+createDirectory +
+createMonetaryString +
+CreateTemplateFromTurret +
+credits +
+CrewLootDescriptor +
+cross +
+deferredCallback +
+deleteFile +
+displayChatMessage +
+displayMissionAccomplishedText +
+displaySpeechBubble +
+distance +
+distance2 +
+dot +
+drawBorder +
+drawDebugBox +
+drawDebugLine +
+drawDebugSphere +
+drawFighterTooltip +
+drawRect +
+drawText +
+drawTextRect +
+drawTurretTooltip +
+DroneDescriptor +
+eprint +
+FighterDescriptor +
+GameSeed +
+GameVersion +
+GeneratePlanFromStyle +
+getColorPalette +
+getCurrentLanguage +
+getGlobal +
+getLanguage +
+GetLocalizedString +
+getParentEntity +
+getParentFaction +
+getParentFaction +
+getPlayerCraft +
+getReadableValue +
+getResolution +
+getSavedShips +
+getScriptPath +
+getSessionId +
+getTrackedMissionScriptIndex +
+getWorkshopShips +
+HighestRarity +
+InventoryItemLootDescriptor +
+invokeAllianceFunction +
+invokeClientFunction +
+invokeEntityFunction +
+invokeEntityFunction +
+invokeFactionFunction +
+invokeSectorFunction +
+invokeSectorFunction +
+invokeServerFunction +
+isAllianceScript +
+isBehemothDLCInstalled +
+isBlackMarketDLCInstalled +
+isEntityScript +
+isGalaxyScript +
+isIntoTheRiftDLCInstalled +
+isPlayerScript +
+isSectorScript +
+IsValidMaterial +
+keycodeFromScancode +
+length +
+length2 +
+listFilesOfDirectory +
+loadInternalData +
+LoadPlanFromFile +
+LoadPlanFromString +
+LoadTurretDesignFromFile +
+lookAt +
+LowestRarity +
+makeFastHash +
+makeHash +
+makeHash64 +
+MatrixLookUp +
+MatrixLookUpPosition +
+MatrixLookUpRight +
+MatrixYawPitchRoll +
+Mods +
+MoneyLootDescriptor +
+normalize +
+normalize_ip +
+NumMaterials +
+onClient +
+onClient +
+onClient +
+onServer +
+onServer +
+onServer +
+ownsBehemothDLC +
+ownsBlackMarketDLC +
+ownsIntoTheRiftDLC +
+perspective +
+play3DSound +
+playSound +
+plural_t +
+plural_with_context_t +
+print +
+printlog +
+projectPoint +
+registerBoss +
+removeCountdownBar +
+removeDirectory +
+removeSectorProblem +
+removeShipProblem +
+reportError +
+ResourceLootDescriptor +
+rotate +
+run +
+run +
+runEntityCode +
+runFactionCode +
+runSectorCode +
+scale +
+scancodeFromKeycode +
+scriptPath +
+SectorSeed +
+SeedStr +
+serializable +
+setBossBarTitle +
+setBossHealth +
+setBossHealthColor +
+setCountdownPriority +
+setGlobal +
+setTrackedMission +
+setTrackThisMission +
+ShipDescriptor +
+sleep +
+StationDescriptor +
+SystemUpgradeLootDescriptor +
+terminate +
+TorpedoDescriptor +
+translate +
+trim +
+TurretDescriptor +
+TurretLootDescriptor +
+unregisterBoss +
+valid +
+WormholeDescriptor +
+WreckageDescriptor +
+wreckify +
+writeTrace +
+

+
+ +
+ +
+
+
+
+ Overview +
Home + Functions + Search +
+
Search:
+Predefined Functions & Example Scripts +
Command +Entity +FactionDatabase +PlanGenerator +Player +Sector +Server +UsableInventoryItem +
+ +
+ + diff --git a/Documentation/ivec2.html b/Documentation/ivec2.html new file mode 100644 index 0000000..578c9c6 --- /dev/null +++ b/Documentation/ivec2.html @@ -0,0 +1,549 @@ + + + ivec2 + + + + +
+
+

Avorion Script API Documentation

+
+
+ +
+
Search:
+
+
+ + + + + + + + + + + + + + + + + + +
+ivec2 +ivec2 +

Properties
+x +
+y +

Member Functions
+__add +
+__div +
+__eq +
+__lt +
+__mul +
+__sub +
+__tostring +
+__unm +
+
+
+
+

ivec2

+
+
+

+function ivec2(var x, var y)
+

+
+
+

Parameters

+
+x +
+y +
+
+

Returns

+
+

+A new instance of ivec2 +

+
+

+
+
+
+
+ +
property int x
+
+
+
+
+ +
property int y
+
+
+
+
+
+
+

+function ivec2 __add(var other)
+

+
+
+

+
+
+
+
+

+function ivec2 __div(var other)
+

+
+
+

+
+
+
+
+

+function bool __eq(ivec2 other)
+

+
+
+

+
+
+
+
+

+function bool __lt(ivec2 other)
+

+
+
+

+
+
+
+
+

+function ivec2 __mul(var other)
+

+
+
+

+
+
+
+
+

+function ivec2 __sub(var other)
+

+
+
+

+
+
+
+
+

+function string __tostring()
+

+
+
+

+
+
+
+
+

+function ivec2 __unm()
+

+
+
+

+
+
+
+
+
+
+ Overview +
Home + Functions + Search +
+
Search:
+Predefined Functions & Example Scripts +
Command +Entity +FactionDatabase +PlanGenerator +Player +Sector +Server +UsableInventoryItem +
+
+

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

+
+ +
+ + diff --git a/Documentation/ivec3.html b/Documentation/ivec3.html new file mode 100644 index 0000000..9786e30 --- /dev/null +++ b/Documentation/ivec3.html @@ -0,0 +1,560 @@ + + + ivec3 + + + + +
+
+

Avorion Script API Documentation

+
+
+ +
+
Search:
+
+
+ + + + + + + + + + + + + + + + + + + +
+ivec3 +ivec3 +

Properties
+x +
+y +
+z +

Member Functions
+__add +
+__div +
+__eq +
+__lt +
+__mul +
+__sub +
+__tostring +
+__unm +
+
+
+
+

ivec3

+
+
+

+function ivec3(var x, var y, var z)
+

+
+
+

Parameters

+
+x +
+y +
+z +
+
+

Returns

+
+

+A new instance of ivec3 +

+
+

+
+
+
+
+ +
property int x
+
+
+
+
+ +
property int y
+
+
+
+
+ +
property int z
+
+
+
+
+
+
+

+function ivec3 __add(var other)
+

+
+
+

+
+
+
+
+

+function ivec3 __div(var other)
+

+
+
+

+
+
+
+
+

+function bool __eq(ivec3 other)
+

+
+
+

+
+
+
+
+

+function bool __lt(ivec3 other)
+

+
+
+

+
+
+
+
+

+function ivec3 __mul(var other)
+

+
+
+

+
+
+
+
+

+function ivec3 __sub(var other)
+

+
+
+

+
+
+
+
+

+function string __tostring()
+

+
+
+

+
+
+
+
+

+function ivec3 __unm()
+

+
+
+

+
+
+
+
+
+
+ Overview +
Home + Functions + Search +
+
Search:
+Predefined Functions & Example Scripts +
Command +Entity +FactionDatabase +PlanGenerator +Player +Sector +Server +UsableInventoryItem +
+
+

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

+
+ +
+ + diff --git a/Documentation/ivec4.html b/Documentation/ivec4.html new file mode 100644 index 0000000..36991f9 --- /dev/null +++ b/Documentation/ivec4.html @@ -0,0 +1,571 @@ + + + ivec4 + + + + +
+
+

Avorion Script API Documentation

+
+
+ +
+
Search:
+
+
+ + + + + + + + + + + + + + + + + + + + +
+ivec4 +ivec4 +

Properties
+w +
+x +
+y +
+z +

Member Functions
+__add +
+__div +
+__eq +
+__lt +
+__mul +
+__sub +
+__tostring +
+__unm +
+
+
+
+

ivec4

+
+
+

+function ivec4(var x, var y, var z, var w)
+

+
+
+

Parameters

+
+x +
+y +
+z +
+w +
+
+

Returns

+
+

+A new instance of ivec4 +

+
+

+
+
+
+
+ +
property int w
+
+
+
+
+ +
property int x
+
+
+
+
+ +
property int y
+
+
+
+
+ +
property int z
+
+
+
+
+
+
+

+function ivec4 __add(var other)
+

+
+
+

+
+
+
+
+

+function ivec4 __div(var other)
+

+
+
+

+
+
+
+
+

+function bool __eq(ivec4 other)
+

+
+
+

+
+
+
+
+

+function bool __lt(ivec4 other)
+

+
+
+

+
+
+
+
+

+function ivec4 __mul(var other)
+

+
+
+

+
+
+
+
+

+function ivec4 __sub(var other)
+

+
+
+

+
+
+
+
+

+function string __tostring()
+

+
+
+

+
+
+
+
+

+function ivec4 __unm()
+

+
+
+

+
+
+
+
+
+
+ Overview +
Home + Functions + Search +
+
Search:
+Predefined Functions & Example Scripts +
Command +Entity +FactionDatabase +PlanGenerator +Player +Sector +Server +UsableInventoryItem +
+
+

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

+
+ +
+ + diff --git a/Documentation/stylesheet.css b/Documentation/stylesheet.css new file mode 100644 index 0000000..a396681 --- /dev/null +++ b/Documentation/stylesheet.css @@ -0,0 +1,260 @@ +body { + background-color: #101010; + color: #d0d0d0; + margin: 0px; +} + +h1, +h2, +h3, +h4, +h5, +h6, +h7 { + color: #f0f0f0; +} + +a.unrecognizable:visited { + color: #d0d0d0; +} +a.unrecognizable:link { + color: #d0d0d0; +} + +a:visited { + color: #4080cc; +} + +a:link { + color: #70c0ff; +} + +a:hover { + color: #90e0ff; +} + +.maincentered { + margin: auto; + width: 1220px; + + padding: 10px; + font-family: monospace; + + box-shadow: 0px 0px 50px 2px rgba(0, 0, 0, 0.5); +} + +.maincontent { + display: inline-block; + min-height: 950px; +} + +.documentationheader { + text-align: center; +} + +.floatleft { + float: left; + width: 300px; + font-size: 12px; + padding-right: 10px; +} + +.floatright { + float: right; + width: 900px; + padding-left: 10px; +} + +.floatanywhere { + float: left; + width: 295px; + font-size: 12px; + padding: 5px; +} + +.fullwidth { + width: 1220px; +} + +.codecontainer { + background-color: #1a1a1a; + border-width: 0px; + padding: 10px; + margin-bottom: 20px; +} + +.disclaimer { + background-color: #1a1a1a; + border-width: 0px; + padding: 10px; + padding-top: 1px; + padding-bottom: 1px; + margin-bottom: 20px; + color: #e0e000; +} + +.sitemap { + background-color: #1a1a1a; + border-width: 0px; + padding: 10px; + margin-bottom: 20px; +} + +.code { + font-family: monospace; +} + +.keyword { + font-family: monospace; + font-weight: bold; + color: #55ff55; +} + +.comment { + font-family: monospace; + color: #005500; +} + +.type { + font-family: monospace; + font-weight: bold; + color: #55ff55; +} + +.parameter { + font-family: monospace; + font-weight: bold; + color: #f0f0f0; +} + +.function { + font-family: monospace; + font-weight: bold; + color: #f0f0f0; +} + +.property { + font-family: monospace; + font-weight: bold; +} + +.inheritedcode { + font-family: monospace; + font-style: italic; +} + +.inheritedproperty { + font-family: monospace; + font-style: italic; +} + +.inheritedfunction { + font-family: monospace; + font-weight: bold; + font-style: italic; +} + +.indented { + padding-left: 50px; +} + +.headerlisting { + font-size: 12px; + padding-bottom: 10px; +} + +.flexheader { + display: flex; + padding-bottom: 0px; +} + +.flexheader > form { + margin-block-end: 0px; +} + +.flexheaderwhitespace { + flex: 1; +} + +.headersearchinput { + margin-left: 0.5em; +} + +.lastheaderlisting { + font-size: 12px; + padding-bottom: 10px; +} + +.footer { + max-width: 1200px; + width: 100%; + margin-left: auto; + margin-right: auto; + padding: 0px; + margin: auto; + margin-bottom: 50px; +} + +.floatheadline { + font-size: 15px; + font-weight: bold; + text-align: center; + padding: 0px; + margin: 0px; +} + +.docheader { + font-size: 12px; + font-weight: bold; + color: #f0f0f0; +} + +.warning { + color: #d44; + font-weight: bold; + font-style: italic; +} + +.searchoutput { + width: 100%; + margin-top: 20px; + margin-bottom: 20px; +} + +.searchresults { + width: 100%; + min-height: 1000px; + padding: 10px; + padding-top: 20px; + padding-bottom: 0px; +} + +.searchresult { + width: 100%; +} + +.clickable { + cursor: pointer; +} + +.searchmatch { + color: black; + background-color: orange; +} + +.searchresulttext { + font-size: 12px; + font-weight: bold; + color: #f0f0f0; + margin-top: 13px; +} + +.searchresultsubtext { + padding-left: 20px; + margin-top: 13px; +} + +a.nolinkcolor { + color: inherit; + text-decoration: none; +} diff --git a/Documentation/vec2.html b/Documentation/vec2.html new file mode 100644 index 0000000..ea0f7f8 --- /dev/null +++ b/Documentation/vec2.html @@ -0,0 +1,549 @@ + + + vec2 + + + + +
+
+

Avorion Script API Documentation

+
+
+ +
+
Search:
+
+
+ + + + + + + + + + + + + + + + + + +
+vec2 +vec2 +

Properties
+x +
+y +

Member Functions
+__add +
+__div +
+__eq +
+__lt +
+__mul +
+__sub +
+__tostring +
+__unm +
+
+
+
+

vec2

+
+
+

+function vec2(var x, var y)
+

+
+
+

Parameters

+
+x +
+y +
+
+

Returns

+
+

+A new instance of vec2 +

+
+

+
+
+
+
+ +
property float x
+
+
+
+
+ +
property float y
+
+
+
+
+
+
+

+function vec2 __add(var other)
+

+
+
+

+
+
+
+
+

+function vec2 __div(var other)
+

+
+
+

+
+
+
+
+

+function bool __eq(vec2 other)
+

+
+
+

+
+
+
+
+

+function bool __lt(vec2 other)
+

+
+
+

+
+
+
+
+

+function vec2 __mul(var other)
+

+
+
+

+
+
+
+
+

+function vec2 __sub(var other)
+

+
+
+

+
+
+
+
+

+function string __tostring()
+

+
+
+

+
+
+
+
+

+function vec2 __unm()
+

+
+
+

+
+
+
+
+
+
+ Overview +
Home + Functions + Search +
+
Search:
+Predefined Functions & Example Scripts +
Command +Entity +FactionDatabase +PlanGenerator +Player +Sector +Server +UsableInventoryItem +
+
+

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

+
+ +
+ + diff --git a/Documentation/vec3.html b/Documentation/vec3.html new file mode 100644 index 0000000..0cce82a --- /dev/null +++ b/Documentation/vec3.html @@ -0,0 +1,560 @@ + + + vec3 + + + + +
+
+

Avorion Script API Documentation

+
+
+ +
+
Search:
+
+
+ + + + + + + + + + + + + + + + + + + +
+vec3 +vec3 +

Properties
+x +
+y +
+z +

Member Functions
+__add +
+__div +
+__eq +
+__lt +
+__mul +
+__sub +
+__tostring +
+__unm +
+
+
+
+

vec3

+
+
+

+function vec3(var x, var y, var z)
+

+
+
+

Parameters

+
+x +
+y +
+z +
+
+

Returns

+
+

+A new instance of vec3 +

+
+

+
+
+
+
+ +
property float x
+
+
+
+
+ +
property float y
+
+
+
+
+ +
property float z
+
+
+
+
+
+
+

+function vec3 __add(var other)
+

+
+
+

+
+
+
+
+

+function vec3 __div(var other)
+

+
+
+

+
+
+
+
+

+function bool __eq(vec3 other)
+

+
+
+

+
+
+
+
+

+function bool __lt(vec3 other)
+

+
+
+

+
+
+
+
+

+function vec3 __mul(var other)
+

+
+
+

+
+
+
+
+

+function vec3 __sub(var other)
+

+
+
+

+
+
+
+
+

+function string __tostring()
+

+
+
+

+
+
+
+
+

+function vec3 __unm()
+

+
+
+

+
+
+
+
+
+
+ Overview +
Home + Functions + Search +
+
Search:
+Predefined Functions & Example Scripts +
Command +Entity +FactionDatabase +PlanGenerator +Player +Sector +Server +UsableInventoryItem +
+
+

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

+
+ +
+ + diff --git a/Documentation/vec4.html b/Documentation/vec4.html new file mode 100644 index 0000000..d123004 --- /dev/null +++ b/Documentation/vec4.html @@ -0,0 +1,571 @@ + + + vec4 + + + + +
+
+

Avorion Script API Documentation

+
+
+ +
+
Search:
+
+
+ + + + + + + + + + + + + + + + + + + + +
+vec4 +vec4 +

Properties
+w +
+x +
+y +
+z +

Member Functions
+__add +
+__div +
+__eq +
+__lt +
+__mul +
+__sub +
+__tostring +
+__unm +
+
+
+
+

vec4

+
+
+

+function vec4(var x, var y, var z, var w)
+

+
+
+

Parameters

+
+x +
+y +
+z +
+w +
+
+

Returns

+
+

+A new instance of vec4 +

+
+

+
+
+
+
+ +
property float w
+
+
+
+
+ +
property float x
+
+
+
+
+ +
property float y
+
+
+
+
+ +
property float z
+
+
+
+
+
+
+

+function vec4 __add(var other)
+

+
+
+

+
+
+
+
+

+function vec4 __div(var other)
+

+
+
+

+
+
+
+
+

+function bool __eq(vec4 other)
+

+
+
+

+
+
+
+
+

+function bool __lt(vec4 other)
+

+
+
+

+
+
+
+
+

+function vec4 __mul(var other)
+

+
+
+

+
+
+
+
+

+function vec4 __sub(var other)
+

+
+
+

+
+
+
+
+

+function string __tostring()
+

+
+
+

+
+
+
+
+

+function vec4 __unm()
+

+
+
+

+
+
+
+
+
+
+ Overview +
Home + Functions + Search +
+
Search:
+Predefined Functions & Example Scripts +
Command +Entity +FactionDatabase +PlanGenerator +Player +Sector +Server +UsableInventoryItem +
+
+

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

+
+ +
+ +