Question: owner vs trueowner

The place to discuss scripting and game modifications for X4: Foundations.

Moderators: Moderators for English X Forum, Scripting / Modding Moderators

Post Reply
ns88ns
Posts: 90
Joined: Sun, 11. Sep 11, 22:00
x4

Question: owner vs trueowner

Post by ns88ns » Sat, 21. Oct 23, 01:36

Hi, Community and Egosoft devs.

There are three $component properties pointing to the owning faction:

$component.owner
$component.trueowner
$component.coverowner

What is the difference between these properties? The difference is quite unclear in the documentation. In which cases/scenarios these properties are different?

Regards.

Alan Phipps
Moderator (English)
Moderator (English)
Posts: 30439
Joined: Fri, 16. Apr 04, 19:21
x4

Re: Question: owner vs trueowner

Post by Alan Phipps » Sat, 21. Oct 23, 13:56

Did you mean this question to be about X Rebirth and not X4?

It would be logical if owner would be the faction flag the ship is currently showing as used for general gameplay script handling. Trueowner would be the underlying faction that the ship really belongs to up to the point of actual change of ownership (eg sale or capture), and coverowner would be any false flag that the ship is or would be masked as - perhaps for mission, plot or piracy/evasion purposes.
A dog has a master; a cat has domestic staff.

ns88ns
Posts: 90
Joined: Sun, 11. Sep 11, 22:00
x4

Re: Question: owner vs trueowner

Post by ns88ns » Sat, 21. Oct 23, 22:27

M... Nope... This question is exactly about X4F (v6.20, release), not about X Rebirth. Please, move the thread back to X4F modding sections. Thank you in advance.

Yes, it would be logic but the question is about how it is implemented now in-game. Are there any scenarios now in the game that expose the difference? I see than many default scripts use the property trueowner instead of owner though the logic of usage is not clear from the scripts. I traced those scripts and found that owner and trueowner are always the same there. Documentation is quite weak (from X4F scriptproperties):

Code: Select all

owner		faction		Owner faction (cover owner if set, otherwise true owner)
trueowner	faction		True Owner faction
coverowner	faction		Cover Owner faction
Is not so much...

I dug a bit more .XSDs and found that owner and coverowner can be set but trueowner can't be set. Perhaps it Is because there are only two (actually) properties: trueowner and coverowner. And the owner is just conditional GET. Just thoughts. Unfortunately, the documentation doesn't explain whether the properties are RO or RW. Though, your idea looks sensible. I need to dive deep into pirate-related scenarios (e.g. plunder) - perhaps these properties are different for pirates (like SCA and BUC).

Thank you.
Regards.

Alan Phipps
Moderator (English)
Moderator (English)
Posts: 30439
Joined: Fri, 16. Apr 04, 19:21
x4

Re: Question: owner vs trueowner

Post by Alan Phipps » Sun, 22. Oct 23, 13:55

Heh it wasn't moved, you posted it in X Rebirth forums. Now repositioned.
A dog has a master; a cat has domestic staff.

User avatar
Dj_FRedy
Posts: 230
Joined: Mon, 27. Jun 11, 05:58
x4

Re: Question: owner vs trueowner

Post by Dj_FRedy » Sun, 22. Oct 23, 22:24

Alan has explained it perfectly and as I understand it:
· 'set_owner' sets 'owner' and 'trueowner'
· set_cover_owner' sets 'owner' and 'coverowner'
This way 'owner' can be turned into a type of dynamic variable by 'set_cover_owner' without changing the owner faction of the component, and 'trueowner' remains invariable to be used for comparison, or simply as a conditional variable.

A script that wants to recover the true owner faction should always use 'trueowner', for everything else 'owner', because you always have to count on the pirates being cover... remember that the player can also use cover at certain times in the game, as well as other situations where you can simply expect faction variability by cover or not.
All this makes the scripts more modular.
"All my contributions to the Technical Support and Public Beta Feedback sections will be concise and to the point, no diatribes, that's what the other sections are for".
Thank you for your efforts.

|K.O.S.H.
Posts: 3724
Joined: Fri, 19. Dec 03, 10:36
x3tc

Re: Question: owner vs trueowner

Post by |K.O.S.H. » Wed, 25. Oct 23, 13:47

in X3 trueowner was the makerrace of the ship. Owner was the actual race/faction. And coverowner seems to be, what faction is displayed, if its a hidden pirate.

E.e. An antigone person in an eclipse vanguard is:
trueowner = argon
owner = antigone
coverowner = null

a SCA-pirate split in a Phönix vanguard covered as teladi is
trueowner = teladi
owner = SCA
coverowner = teladi

i dont give you 100% on that, because i only know about older X-games, but for me that sounds logical.

Edit: That also explains, why truewoner is readonly, you cannot set the makerace.
Wing Commander Mod - German Topic
06.07.11 - v1.1 RELEASED!

Mysterial
Posts: 645
Joined: Wed, 6. Nov 02, 20:31
x4

Re: Question: owner vs trueowner

Post by Mysterial » Wed, 8. Nov 23, 20:59

trueowner is the faction that owns the ship for real.
coverowner is the faction the ship is disguised as, if any. Mostly used for pirates and rarely by story missions.
owner is equal to coverowner if set, trueowner if not. Most cases of looking at someone else's ship will use this variable so that they are properly fooled by disguises.

Post Reply

Return to “X4: Foundations - Scripts and Modding”