Contents#
Types and methods. Parameter and result types refer to the stated X4 layer; unknown contracts are explicit.
Combat and ammunition#
Shipyards and construction#
Other X4 functions#
Loading and saving#
| Call / event | Returns |
|---|---|
| SaveLoadout | void |
| SaveLoadout2 | void |
| TriggerAutosave | void |
Map and presentation#
World and position#
| Call / event | Returns |
|---|---|
| GetAllResourceProbes | uint32_t |
| GetCameraRotation | Rotation |
| GetCompSlotControlPosition | const char* |
| GetContextByClass | UniverseID |
| GetDiscoveredSectorResources | uint32_t |
| GetNumAllResourceProbes | uint32_t |
| GetNumDiscoveredSectorResources | uint32_t |
| GetObjectPositionInSector | UIPosRot |
| GetPositionalOffset | UIPosRot |
| GetSectorControlStation | UniverseID |
| GetSectorPopulation | uint64_t |
| IsContestedSector | bool |
| SetPlayerCameraTargetView | void |
| SetPositionalOffset | void |
| SetSofttarget | bool |
Objects and identifiers#
| Call / event | Returns |
|---|---|
| ConvertStringTo64Bit | uint64_t |
| GetObjectIDCode | const char* |
AI rules and behavior#
Orders and control#
Trade, cargo and accounts#
| Call / event | Returns |
|---|---|
| GetCargo | uint32_t |
| GetMoneyLog | uint32_t |
| GetNumCargo | uint32_t |
| GetNumUnitCargo | uint32_t |
| GetNumWares | uint32_t |
| GetPlayerGlobalTradeLoopCargoReservationSetting | bool |
| GetShipTradeLoopCargoReservationSetting | bool |
| GetSupplyBudget | int64_t |
| GetTradeWareBudget | int64_t |
| GetUnitCargo | uint32_t |
| GetWares | uint32_t |
| HasShipTradeLoopCargoReservationOverride | bool |
| RemoveShipTradeLoopCargoReservationOverride | void |
| SetShipTradeLoopCargoReservationOverride | void |
Factions and diplomacy#
| Call / event | Returns |
|---|---|
| GetAllFactions | uint32_t |
| GetAllFactionStations | uint32_t |
| GetCurrentFleetLogo | UILogo |
| GetCurrentPlayerLogo | UILogo |
| GetFactionBuildMethod | unknown |
| GetFleetName | const char* |
| GetNumAllFactions | uint32_t |
| GetNumAllFactionStations | uint32_t |
| GetNumPlayerLogos | uint32_t |
| GetPlayerFactionName | const char* |
| GetPlayerLogos | uint32_t |
| IsFactionEnemyToFaction | bool |
| SetFactionBuildMethod | void |
| SetFleetLogo | void |
| SetFleetName | void |
| SetPlayerFactionName | void |
NPCs and characters#
| Call / event | Returns |
|---|---|
| GetContainerBuildPriceFactor | float |
| GetControlPanelName | const char* |
| GetEntityCombinedSkill | int32_t |
| GetPersonCombinedSkill | int32_t |
| GetPersonName | const char* |
| GetPersonRole | const char* |
| GetPlayerName | const char* |
| PerformCrewExchange2 | UICrewExchangeResult |