...
You can access many player-related game properties via the keyword “player”, for example:
player.name: The player’s name
player.age: The passed in-game time since game start
player.money: The money in the player’s account
player.ship: The ship the player is currently on (not necessarily the player's ship), or null if the player is on a station
- player.primaryship (X Rebirth only): The player's own ship (but the player is not necessarily on board)
- player.occupiedship (X4 only): The ship that the player is currently piloting, or null if the player is not piloting
- player.entity: The actual player object
player.zone, player.sector, player.cluster, player.galaxy: Location of the player entity
player.copilot (X Rebirth only): The co-pilot NPC
The game consists of objects of different classes (zones, ships, stations, NPCs). They have the common datatype "component", however, they have different properties, e.g. NPCs have the property "race", but ships don't.
...