Game API
The Game API describes the in-universe abstractions a mod interacts with: things that exist in the X4 universe, their properties, what you can do to them, and what events they fire.
When you have a question like:
- βHow do I change ownership of a ship?β β look up Ship
- βHow do I list stations in a sector?β β look up Sector
- βHow do I react when a station is destroyed?β β look up Station (Events section)
Youβll find: description, properties, actions, libraries, events, examples, gotchas, related abstractions.
For how to write the code that uses these β Cue, Library, Event/Condition, Action, Variable, Expression β see the Modding language reference instead.
Categories
Section titled βCategoriesβThe spatial hierarchy where everything exists β Universe β Cluster β Sector β Zone, plus Highway and Gate.
Things that exist in the world β Station (and its 8 subtypes), Ship, Module, Resource region.
Who owns and controls things β Faction (parent), Player, NPC factions, Crew.
Ware, Trade offer, Subscription, Inventory, Cargo.
What objects do in-universe β Order (a ship is executing X), Mission (a player has accepted Y), Conversation, Boarding operation.
For the language-side of behavior (how to write an order or a generic mission) see Aiscript Framework and MD Framework.
Prototype status
Section titled βPrototype statusβCurrently filled: Station and Sector. Other pages are placeholders to demonstrate navigation structure.