On notoriety and friend/foe settings

X3:Reunion
Sooner or later you will need to find out if a ship is hostile.

<RetVar/IF> <RefObj> is <Subject> a enemy
<RetVar/IF> <RefObj> is <Subject> a friend
<RetVar/IF> <RefObj> is <Subject> neutral to me
<RetVar/IF> <RefObj> get relation to object <Var/Ship/Station>
and FIND.flags (!)

do that... basically.
What is not so obvious is that the actual result is dependant on
  • notoriety
  • ship race
  • sector security level
  • combat history
  • scripted override
  • ship changing sectors

Just for the explanation:
$Object.Sector = <RefObj> get sector
$Object.Race = <RefObj> get owner race
$Subject.Race = <Subject> get owner race
$Sector.Race = $Object.Sector get owner race
$Notoriety = get notoriery from race $Object.Race to race $Subject.Race

If <RefObj> = null / destroyed
    • then all results are null

If <Subject> = null / destroyed
    • then <Subject> is neutral (!)

If $Notoriety >= +10001
    • then <Subject> is a friend.

If <RefObj> is in a CORE sector
  • AND $Object.Race == $Sector.Race
  • AND $Notoriety <= -100
    • then <Subject> is an enemy.

If <RefObj> is in a CORE sector
  • AND $Object.Race != $Sector.Race
  • AND $Notoriety <= -10000
    • then <Subject> is an enemy.

If <RefObj> is NOT in a CORE sector
  • AND $Notoriety <= -10000
    • then <Subject> is an enemy.

If none of the above applies
    • then <Subject> is neutral.


<RefObj> of race Player only return Friend OR Foe as a relation since
that's the only thing they know.
You can not set a race to neutral on the ship command console.
You can not script a player ship to be neutral to <Subject>.
(And even if you find a way, you probably should not =)


<RefObj> never changes it's relation to <Subject> until
  • <RefObj> changes sectors
  • <RefObj> is attacked and hit by <Subject>
  • <RefObj> is ordered to attack <Subject>
    • (Attack script includes a scripted relation change)
  • scripted relation change
    • this setting stays when the ship changes sectors and there is no way to remove this override mode
boron