--- title: find_ship_by_true_owner summary: X4 interface reference. Types are established only within the stated scope. section: reference kind: api status: reference updated: 2026-10-26 tags: ["API","X4"] sources: ["https://wiki.egosoft.com/X4%20Foundations%20Wiki/Modding%20Support/","https://www.lua.org/manual/5.1/manual.html","https://luajit.org/ext_ffi_api.html"] --- ## Return value | Type | Meaning | | --- | --- | | [`none`](wiki:type-results) (MD action) | Types describe the declared interface, not proof of a successful game effect. | [Types and methods](wiki:types) ## XML attributes [How schema types work](wiki:schema-types) `libraries/common.xsd` | Attribute | Schema type | Required | Default / fixed | | --- | --- | --- | --- | | `chance` | [`expression`](wiki:schema-expression-b8bc0e4f) | no | not declared | | `weight` | [`expression`](wiki:schema-expression-b8bc0e4f) | no | not declared | | `comment` | [`comment`](wiki:schema-comment-c44bb2fd) | no | not declared | | `normalcluster` | [`booleanexpression`](wiki:schema-booleanexpression-1c6e91c7) | no | not declared | | `presentationcluster` | [`booleanexpression`](wiki:schema-booleanexpression-1c6e91c7) | no | not declared | | `venturercluster` | [`booleanexpression`](wiki:schema-booleanexpression-1c6e91c7) | no | not declared | | `explorationcluster` | [`booleanexpression`](wiki:schema-booleanexpression-1c6e91c7) | no | not declared | | `macro` | [`expression`](wiki:schema-expression-b8bc0e4f) | no | not declared | | `owner` | [`owners`](wiki:schema-owners-6f0e3a8c) | no | not declared | | `trueowner` | [`owners`](wiki:schema-owners-6f0e3a8c) | no | not declared | | `coverowner` | [`owners`](wiki:schema-owners-6f0e3a8c) | no | not declared | | `policefaction` | [`owners`](wiki:schema-owners-6f0e3a8c) | no | not declared | | `negateownerfilter` | [`booleanexpression`](wiki:schema-booleanexpression-1c6e91c7) | no | not declared | | `tag` | [`expression`](wiki:schema-expression-b8bc0e4f) | no | not declared | | `excluded` | [`expression`](wiki:schema-expression-b8bc0e4f) | no | not declared | | `grouptag` | [`expression`](wiki:schema-expression-b8bc0e4f) | no | not declared | | `shieldgrouptag` | [`expression`](wiki:schema-expression-b8bc0e4f) | no | not declared | | `state` | [`componentstateexprlookup`](wiki:schema-componentstateexprlookup-ab71703f) | no | not declared | | `integrated` | [`booleanexpression`](wiki:schema-booleanexpression-1c6e91c7) | no | not declared | | `invulnerable` | [`booleanexpression`](wiki:schema-booleanexpression-1c6e91c7) | no | not declared | | `hullinvulnerable` | [`booleanexpression`](wiki:schema-booleanexpression-1c6e91c7) | no | not declared | | `shieldinvulnerable` | [`booleanexpression`](wiki:schema-booleanexpression-1c6e91c7) | no | not declared | | `indestructible` | [`booleanexpression`](wiki:schema-booleanexpression-1c6e91c7) | no | not declared | | `checkoperational` | [`booleanexpression`](wiki:schema-booleanexpression-1c6e91c7) | no | not declared | | `functional` | [`booleanexpression`](wiki:schema-booleanexpression-1c6e91c7) | no | not declared | | `surfaceelement` | [`booleanexpression`](wiki:schema-booleanexpression-1c6e91c7) | no | not declared | | `module` | [`booleanexpression`](wiki:schema-booleanexpression-1c6e91c7) | no | not declared | | `known` | [`booleanexpression`](wiki:schema-booleanexpression-1c6e91c7) | no | not declared | | `knownto` | [`factionexprlookup`](wiki:schema-factionexprlookup-6ea384ee) | no | not declared | | `isinliveview` | [`booleanexpression`](wiki:schema-booleanexpression-1c6e91c7) | no | not declared | | `destination` | [`expression`](wiki:schema-expression-b8bc0e4f) | no | not declared | | `hastradeoffer` | [`booleanexpression`](wiki:schema-booleanexpression-1c6e91c7) | no | not declared | | `tradesknownto` | [`factionexprlookup`](wiki:schema-factionexprlookup-6ea384ee) | no | not declared | | `canhavedynamicinterior` | [`booleanexpression`](wiki:schema-booleanexpression-1c6e91c7) | no | not declared | | `canhaveofferlocation` | [`expression`](wiki:schema-expression-b8bc0e4f) | no | not declared | | `freemissionofferslot` | [`booleanexpression`](wiki:schema-booleanexpression-1c6e91c7) | no | not declared | | `freesignalleakslot` | [`booleanexpression`](wiki:schema-booleanexpression-1c6e91c7) | no | not declared | | `numfreeactorslots` | [`expression`](wiki:schema-expression-b8bc0e4f) | no | not declared | | `freemissionactorslot` | [`freemissionactorslot`](wiki:schema-freemissionactorslot-70522aa4) | no | not declared | | `masstraffic` | [`booleanexpression`](wiki:schema-booleanexpression-1c6e91c7) | no | not declared | | `regionobject` | [`booleanexpression`](wiki:schema-booleanexpression-1c6e91c7) | no | not declared | | `onlineobject` | [`booleanexpression`](wiki:schema-booleanexpression-1c6e91c7) | no | not declared | | `venture` | [`expression`](wiki:schema-expression-b8bc0e4f) | no | not declared | | `visitor` | [`booleanexpression`](wiki:schema-booleanexpression-1c6e91c7) | no | not declared | | `walkable` | [`booleanexpression`](wiki:schema-booleanexpression-1c6e91c7) | no | not declared | | `haswalkableroom` | [`booleanexpression`](wiki:schema-booleanexpression-1c6e91c7) | no | not declared | | `locked` | [`booleanexpression`](wiki:schema-booleanexpression-1c6e91c7) | no | not declared | | `roompopulationtype` | [`roompopulationtypeexprlookup`](wiki:schema-roompopulationtypeexprlookup-ff3130df) | no | not declared | | `building` | [`booleanexpression`](wiki:schema-booleanexpression-1c6e91c7) | no | not declared | | `busy` | [`booleanexpression`](wiki:schema-booleanexpression-1c6e91c7) | no | not declared | | `hasbuildingtask` | [`booleanexpression`](wiki:schema-booleanexpression-1c6e91c7) | no | not declared | | `hasfixedconstruction` | [`booleanexpression`](wiki:schema-booleanexpression-1c6e91c7) | no | not declared | | `hasstagedconstruction` | [`booleanexpression`](wiki:schema-booleanexpression-1c6e91c7) | no | not declared | | `canbebuiltby` | [`expression`](wiki:schema-expression-b8bc0e4f) | no | not declared | | `canbebuiltbyany` | [`expression`](wiki:schema-expression-b8bc0e4f) | no | not declared | | `canbuildfor` | [`factionexprlookup`](wiki:schema-factionexprlookup-6ea384ee) | no | not declared | | `canbuildclass` | [`expression`](wiki:schema-expression-b8bc0e4f) | no | not declared | | `canbuildships` | [`booleanexpression`](wiki:schema-booleanexpression-1c6e91c7) | no | not declared | | `canequipclass` | [`expression`](wiki:schema-expression-b8bc0e4f) | no | not declared | | `cansupplyclass` | [`expression`](wiki:schema-expression-b8bc0e4f) | no | not declared | | `canequipships` | [`expression`](wiki:schema-expression-b8bc0e4f) | no | not declared | | `cansupplyships` | [`expression`](wiki:schema-expression-b8bc0e4f) | no | not declared | | `canbuildequipment` | [`expression`](wiki:schema-expression-b8bc0e4f) | no | not declared | | `canbuildmacro` | [`expression`](wiki:schema-expression-b8bc0e4f) | no | not declared | | `waretransport` | [`waretransportlookup`](wiki:schema-waretransportlookup-7add9c14) | no | not declared | | `weaponmode` | [`weaponmodelookup`](wiki:schema-weaponmodelookup-9f01ea8b) | no | not declared | | `weapontype` | [`weapontypelookup`](wiki:schema-weapontypelookup-de2d587c) | no | not declared | | `primarypurpose` | [`purposelookup`](wiki:schema-purposelookup-955966b0) | no | not declared | | `deployable` | [`booleanexpression`](wiki:schema-booleanexpression-1c6e91c7) | no | not declared | | `datavault` | [`booleanexpression`](wiki:schema-booleanexpression-1c6e91c7) | no | not declared | | `landmark` | [`booleanexpression`](wiki:schema-booleanexpression-1c6e91c7) | no | not declared | | `deployablecategory` | [`deployablecategorylookup`](wiki:schema-deployablecategorylookup-c0f83070) | no | not declared | | `mayattack` | [`expression`](wiki:schema-expression-b8bc0e4f) | no | not declared | | `maybeattackedby` | [`expression`](wiki:schema-expression-b8bc0e4f) | no | not declared | | `ishostileto` | [`expression`](wiki:schema-expression-b8bc0e4f) | no | not declared | | `canbepickedup` | [`booleanexpression`](wiki:schema-booleanexpression-1c6e91c7) | no | not declared | | `commandeerable` | [`booleanexpression`](wiki:schema-booleanexpression-1c6e91c7) | no | not declared | | `unit` | [`booleanexpression`](wiki:schema-booleanexpression-1c6e91c7) | no | not declared | | `hascommander` | [`booleanexpression`](wiki:schema-booleanexpression-1c6e91c7) | no | not declared | | `hascontrolentity` | [`controlpost`](wiki:schema-controlpost-7bcf4ba7) | no | not declared | | `capturable` | [`booleanexpression`](wiki:schema-booleanexpression-1c6e91c7) | no | not declared | | `accelerator` | [`booleanexpression`](wiki:schema-booleanexpression-1c6e91c7) | no | not declared | | `superhighwaygate` | [`booleanexpression`](wiki:schema-booleanexpression-1c6e91c7) | no | not declared | | `active` | [`booleanexpression`](wiki:schema-booleanexpression-1c6e91c7) | no | not declared | | `paused` | [`booleanexpression`](wiki:schema-booleanexpression-1c6e91c7) | no | not declared | | `pausedmanually` | [`booleanexpression`](wiki:schema-booleanexpression-1c6e91c7) | no | not declared | | `signalleaktype` | [`signalleaktypelookup`](wiki:schema-signalleaktypelookup-6261bbdb) | no | not declared | | `extension` | [`expression`](wiki:schema-expression-b8bc0e4f) | no | not declared | | `personalextension` | [`expression`](wiki:schema-expression-b8bc0e4f) | no | not declared | | `covered` | [`booleanexpression`](wiki:schema-booleanexpression-1c6e91c7) | no | not declared | | `canbedismantled` | [`booleanexpression`](wiki:schema-booleanexpression-1c6e91c7) | no | not declared | | `canbetowed` | [`booleanexpression`](wiki:schema-booleanexpression-1c6e91c7) | no | not declared | | `reachablefrom` | [`expression`](wiki:schema-expression-b8bc0e4f) | no | not declared | | `physicsareready` | [`booleanexpression`](wiki:schema-booleanexpression-1c6e91c7) | no | not declared | | `canbelivestreamed` | [`booleanexpression`](wiki:schema-booleanexpression-1c6e91c7) | no | not declared | | `internallystored` | [`booleanexpression`](wiki:schema-booleanexpression-1c6e91c7) | no | not declared | | `docked` | [`docked`](wiki:schema-docked-f8f22ee3) | no | not declared | | `shiptype` | [`shiptypeexprlookup`](wiki:schema-shiptypeexprlookup-7c3b46ad) | no | not declared | | `hasjob` | [`booleanexpression`](wiki:schema-booleanexpression-1c6e91c7) | no | not declared | | `job` | [`expression`](wiki:schema-expression-b8bc0e4f) | no | not declared | | `validjobship` | [`booleanexpression`](wiki:schema-booleanexpression-1c6e91c7) | no | not declared | | `jobtags` | [`expression`](wiki:schema-expression-b8bc0e4f) | no | not declared | | `requestedjobship` | [`booleanexpression`](wiki:schema-booleanexpression-1c6e91c7) | no | not declared | | `subordinatejobship` | [`booleanexpression`](wiki:schema-booleanexpression-1c6e91c7) | no | not declared | | `encounterid` | [`expression`](wiki:schema-expression-b8bc0e4f) | no | not declared | | `encountership` | [`booleanexpression`](wiki:schema-booleanexpression-1c6e91c7) | no | not declared | | `class` | [`shipclasslookup`](wiki:schema-shipclasslookup-73b4e416) | no | not declared | | `godshipentry` | [`expression`](wiki:schema-expression-b8bc0e4f) | no | not declared | | `faction` | [`factionexprlookup`](wiki:schema-factionexprlookup-6ea384ee) | yes | not declared | | `space` | [`spacelistnozone`](wiki:schema-spacelistnozone-8cdc184d) | yes | not declared | | `append` | [`findappend`](wiki:schema-findappend-c485cc76) | no | not declared | | `multiple` | [`findmultiple`](wiki:schema-findmultiple-b94a146b) | no | not declared | | `required` | [`findrequired`](wiki:schema-findrequired-b9b6ae34) | no | not declared | | `sortbydistanceto` | [`expression`](wiki:schema-expression-b8bc0e4f) | no | not declared | | `sortbygatedistancefrom` | [`expression`](wiki:schema-expression-b8bc0e4f) | no | not declared | | `sortbygatedistanceto` | [`expression`](wiki:schema-expression-b8bc0e4f) | no | not declared | | `sortbyvalue` | [`expression`](wiki:schema-expression-b8bc0e4f) | no | not declared | | `sortdescending` | [`booleanexpression`](wiki:schema-booleanexpression-1c6e91c7) | no | not declared | | `sortlimit` | [`expression`](wiki:schema-expression-b8bc0e4f) | no | not declared | | `name` | [`lvaluename`](wiki:schema-lvaluename-743c13fb) | no | not declared | | `groupname` | [`groupname`](wiki:schema-groupname-27041f4e) | no | not declared | An MD action can write to a named variable or change the world. This is not a Lua return value. The output variable depends on the action and its attributes. ## Example and context See [language basics](wiki:x4-code-basics), [types and methods](wiki:types) and [Lua / MD events](wiki:md-lua-bridge). Examples there are independent learning examples. No project source files or private implementation fragments are distributed with this reference.