Problem with traders with their escorts circling with no destination

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
SlayerAIM
Posts: 8
Joined: Tue, 19. Jul 16, 11:50

Problem with traders with their escorts circling with no destination

Post by SlayerAIM » Tue, 19. Jul 16, 12:04

http://steamcommunity.com/id/slayeraim/ ... 9521089608

This sector and maybe a few other is killing my x3 : Albion Prelude's performance, would like to know if there is any scripts/mods available to remove/delete unwanted or locationless ships.

Sorry this is my first post and i have been looking everywhere for a script so could not find any.

ThankS!

User avatar
ubuntufreakdragon
Posts: 5198
Joined: Thu, 23. Jun 11, 14:57
x4

Post by ubuntufreakdragon » Tue, 19. Jul 16, 14:15

Nice spam :roll: ,
It shouldn't be that difficult to write a kill script to get rid of them, but first we need to know why this happened or it will happen again :P , rename player to "Thereshallbewings" go to comandconsole-scripteditor-Additional Information enable both, than look up the info of the spam ships, search for jobid or jobwingsid, if the have one your jobs-file does something weird if not it's likely a mad side-mission that needs to be stopped
My X3 Mods

XRebirth, things left to patch:
In General; On Firing NPC's; In De Vries; Out Of Zone; And the Antiwishlist

SlayerAIM
Posts: 8
Joined: Tue, 19. Jul 16, 11:50

Post by SlayerAIM » Tue, 19. Jul 16, 14:48

It looks like that what you said, jobid is ranging from 210 lets say to 1300.... i guess its not a good thing??

How would i go about fixing this, i am a programmer so coding not hard for me but i need some reference to go on. :)

User avatar
ubuntufreakdragon
Posts: 5198
Joined: Thu, 23. Jun 11, 14:57
x4

Post by ubuntufreakdragon » Tue, 19. Jul 16, 15:41

ok so far so good it's not a broken mission, puh :roll: , we still have to fix the jods have you ever moded the jobs if not it should be enough to delete all spawning ships and hope it doesn't come back (restart what ever isn't working :roll: ), if a ship is not invulnerable has a job id and is not owned by the player it's safe to kill by script it as it will just respawn
so we will iterate over all species than over all ships they own and kill them thats all.
Here is a complete list of aviable comands: http://forum.egosoft.com/viewtopic.php?t=286349
you can use the ingame Scripteditor to code the script, select a script and press r to manually run it.

Code: Select all

$arr.race = array alloc: size=0
*now we add all races that spam ships
append Argon to array $arr.race
...
$index1 = size of array $arr.race
while $index1
 =dec index1
 $arr.ship = get ship array: of race $race class/type=null
 $index2 = size of array $arr.race
 while $index2
  =dec index2
  $ship=$arr.ship[$index2]
  *check wheather we are a jobs ship
  if not $ship->get job id
   skip if $ship get job leader
    continue
  end
  *don't delete jobsships
  do if $ship -> is invincible
   continue
  do if $ship == PLAYERSHIP
   continue
  $ship-> destruct: show no explosion= True
 end
end
return null
....you know
If the spam contiues nothing is lost, all we need to do to stop is crating an invalid JOBS and JOBWINGS file and load the save with it, than swich back to the normal file(JOBS is the only file thats unable to corrupt saves ;) )
My X3 Mods

XRebirth, things left to patch:
In General; On Firing NPC's; In De Vries; Out Of Zone; And the Antiwishlist

SlayerAIM
Posts: 8
Joined: Tue, 19. Jul 16, 11:50

Post by SlayerAIM » Wed, 20. Jul 16, 09:43

I have an issue with this part

Code: Select all

 if not $ship->get job id 
   skip if $ship get job leader 
    continue 
  end
For some reason i cant seem to find the get job id part is it referenced as something else like object id or so?

User avatar
X2-Illuminatus
Moderator (Deutsch)
Moderator (Deutsch)
Posts: 24965
Joined: Sun, 2. Apr 06, 16:38
x4

Post by X2-Illuminatus » Wed, 20. Jul 16, 11:01

The "get job id" command can be found in the Fly Commands section.
Nun verfügbar! X3: Farnham's Legacy - Ein neues Kapitel für einen alten Favoriten

Die komplette X-Roman-Reihe jetzt als Kindle E-Books! (Farnhams Legende, Nopileos, X3: Yoshiko, X3: Hüter der Tore, X3: Wächter der Erde)

Neuauflage der fünf X-Romane als Taschenbuch

The official X-novels Farnham's Legend, Nopileos, X3: Yoshiko as Kindle e-books!

SlayerAIM
Posts: 8
Joined: Tue, 19. Jul 16, 11:50

Post by SlayerAIM » Wed, 20. Jul 16, 11:42

Thanks i have found it.

Finnished up the script but all the ships is stil there. All the ships had Job ID's even the onces not in that sector.

Can it be something else then?

UniTrader
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 14571
Joined: Sun, 20. Nov 05, 22:45
x4

Post by UniTrader » Wed, 20. Jul 16, 12:14

Usually the result looks a bit diffrent but did you play around with the Gate connections?
if not stated otherwise everything i post is licensed under WTFPL

Ich mache keine S&M-Auftragsarbeiten, aber wenn es fragen gibt wie man etwas umsetzen kann helfe ich gerne weiter ;)

I wont do Script&Mod Request work, but if there are questions how to do something i will GLaDly help ;)

SlayerAIM
Posts: 8
Joined: Tue, 19. Jul 16, 11:50

Post by SlayerAIM » Wed, 20. Jul 16, 12:28

Well i was busy with the first gate with the pub plot, so then this is the reason all traders are idling in that sector?

UniTrader
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 14571
Joined: Sun, 20. Nov 05, 22:45
x4

Post by UniTrader » Wed, 20. Jul 16, 12:53

Nope, hub should be fine.. but if you assign wrong gate ids to certain gates ships will lose orientation and anter the same gate pair over and over, resulting in roughly the same amount of ships in a sector
if not stated otherwise everything i post is licensed under WTFPL

Ich mache keine S&M-Auftragsarbeiten, aber wenn es fragen gibt wie man etwas umsetzen kann helfe ich gerne weiter ;)

I wont do Script&Mod Request work, but if there are questions how to do something i will GLaDly help ;)

SlayerAIM
Posts: 8
Joined: Tue, 19. Jul 16, 11:50

Post by SlayerAIM » Wed, 20. Jul 16, 12:56

Well in that case i did not play around with the gate ID's as i have never played around with scripting in X3, only thing i did was activating the first gate of the hub plot.

Just now learning the scripts to solve this issue as my save file now crashes due to someting slowing my performance down :cry:

User avatar
ubuntufreakdragon
Posts: 5198
Joined: Thu, 23. Jun 11, 14:57
x4

Post by ubuntufreakdragon » Wed, 20. Jul 16, 14:37

stupid question you have launched the script via the "r" hotkey after creating it, if the script doesn't help we will do the following we place two empty textdokuments under the following paths:
for Terranconflict:
<gamedir>\types\Jobs.txt
<gamedir>\types\JobWings.txt
for Albionprelude:
<gamedir>\addon\types\Jobs.txt
<gamedir>\addon\types\JobWings.txt
This will block the Game from Spawning any ships (and delete any jobsrelated data from the save) than we run our kill script save again and remove the documents.
My X3 Mods

XRebirth, things left to patch:
In General; On Firing NPC's; In De Vries; Out Of Zone; And the Antiwishlist

SlayerAIM
Posts: 8
Joined: Tue, 19. Jul 16, 11:50

Post by SlayerAIM » Wed, 20. Jul 16, 15:36

I got the script to work its deleting 5800 ships. But my universe is empty afterwords, i have also made it so it leaves round about 100 ships left per race and it works but it leaves the ships thats spammed behind. I am not sure on how many ships the games suppose to have but 100 seems fair but its deleting the wanted ships aswell like the TL and TM ships.

*NOTE*

In my universe there are a few TS ships with the current command IDLE and its just cruising around lol.

[ external image ]

I have look around on the scripts and its definetly the jobs script creating these ships. from that image and my understanding is that that exact script was called 1900 times? the same goes for military trader.

User avatar
ubuntufreakdragon
Posts: 5198
Joined: Thu, 23. Jun 11, 14:57
x4

Post by ubuntufreakdragon » Wed, 20. Jul 16, 16:02

These ships(all difined by jobs) are not important they respawn all after about 15min-1hour.

If you know the exackt jobs id you can look up the job inside the jobs file inside one .cat/.dat archive with the X3 editor 2.
My X3 Mods

XRebirth, things left to patch:
In General; On Firing NPC's; In De Vries; Out Of Zone; And the Antiwishlist

SlayerAIM
Posts: 8
Joined: Tue, 19. Jul 16, 11:50

Post by SlayerAIM » Wed, 20. Jul 16, 16:08

So its safe to clear the universe and wait and hour or so?

User avatar
ubuntufreakdragon
Posts: 5198
Joined: Thu, 23. Jun 11, 14:57
x4

Post by ubuntufreakdragon » Wed, 20. Jul 16, 16:18

Yes, everything that has a job id respawns automatically.
My X3 Mods

XRebirth, things left to patch:
In General; On Firing NPC's; In De Vries; Out Of Zone; And the Antiwishlist

Post Reply

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