I got a problem regarding "set relation" command

The place to discuss scripting and game modifications for X³: Terran Conflict and X³: Albion Prelude.

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

Post Reply
Nicoman35
Posts: 681
Joined: Thu, 17. Nov 05, 13:12
x3tc

I got a problem regarding "set relation" command

Post by Nicoman35 » Mon, 12. May 14, 08:28

I have problems regarding this command:
$ship = set relation against $target to [Foe]

Situation: A wing of fighters is to attack some target. To asure the ships will kill the target, I set the relation of every ship in the wing via upper command to [Foe].
Everything is fine, when ships belonging to the player are commanded.

For example: My wing should attack an Argon transporter. Player notoriety to Argons is somewhere around +500.000. So, the Argons are friendly to me.
When executed, the transporter switches it's color to red -as it should be-, and the wing performs the kill.

BUT, when I try the same for NPC ships, for example a pirate wing should kill a boron transporter, the ships will not change the relation!!!??!
The ships AI in the wing is already switched off by following:

[THIS]-> set race logic control enabled to [FALSE]
[THIS]-> disable ship rebuild
[THIS]-> set StartAction enabled to [FALSE]

So, I should have full control over this pirate wing. Nevertheless I am not able to change the relation to the Boron transporter to foe, it remains neutral all the time. With the result, that the Pirate wing simply follow that transporter like little puppies all the time.

Does anyone know something about this behaviour? Where is the fault?

User avatar
Litcube
Posts: 4254
Joined: Fri, 20. Oct 06, 19:02
xr

Post by Litcube » Mon, 12. May 14, 16:34

Annoying question: You're sure the Boron transporter isn't a hidden Pirate?

Nicoman35
Posts: 681
Joined: Thu, 17. Nov 05, 13:12
x3tc

Post by Nicoman35 » Mon, 12. May 14, 17:16

Most annoying answer: I do not know!
I wrote a little test script, which will switch relations of two objects. By pressing a hotkey, I am able to choose two objects in the universe, then the relations will be switched back and forth. So I do not remember, which particular ship that was.
But this does not matter, as I tried many ships, including M2s and stations. Now there COULD be a serious pirate infiltration problem in my universe, but I strongly doubt it....
It almost seems to me, that this command is only working well for changing relations of player owned objects to objects belonging to other races. I'll upload my example later for anyone interested to test.

Nicoman35
Posts: 681
Joined: Thu, 17. Nov 05, 13:12
x3tc

Post by Nicoman35 » Mon, 12. May 14, 22:09

Here the promised link
You have to use fake patch method. A hotkey called 'TEST CHANGE RELATION' will be added.
On hotkey press, you will be asked wether to run the main task on
1) Playership
2) as a global task
3) on some other object
then you will be asked for two objects to change relations. The result will be output in the logfile nr 8510.

Nicoman35
Posts: 681
Joined: Thu, 17. Nov 05, 13:12
x3tc

Post by Nicoman35 » Tue, 13. May 14, 19:54

Ok, obviously, there is a problem with this command. Anyone got an idea, how to command a NPC wing to attack and destroy a given target, even if this target is not a foe?

User avatar
Litcube
Posts: 4254
Joined: Fri, 20. Oct 06, 19:02
xr

Post by Litcube » Tue, 13. May 14, 19:56

I'll be home on the 26th. If you remind me, I'll help you quash this. And if it is a bug in the command, I'll fix it for LU.

Nicoman35
Posts: 681
Joined: Thu, 17. Nov 05, 13:12
x3tc

Post by Nicoman35 » Tue, 13. May 14, 23:23

Ok Litcube, I will send you a PM remider on 26.5. Happy.... - whatever you are doing now.

User avatar
Litcube
Posts: 4254
Joined: Fri, 20. Oct 06, 19:02
xr

Post by Litcube » Mon, 26. May 14, 18:43

Nic, I've run this scenario.


It works just fine for me, but it will not work if the race of the attacker is the same race as the target. The fight scripts won't allow it.

You may have to write your own, if this is what the problem is.

Post Reply

Return to “X³: Terran Conflict / Albion Prelude - Scripts and Modding”