Crappy freighters accumulating in my game and eating out FPS badly [AP]
Moderators: Moderators for English X Forum, Scripting / Modding Moderators
Crappy freighters accumulating in my game and eating out FPS badly [AP]
Some time ago I started noticing ships with names like "Split Caiman Super Freighter" in various sectors that just sit there with 0 speed and don't do anything, or, sometimes idle around. Today I discovered that these ships in fact are busy eating my FPS. They dropped it from ~45 to 15-20.
How I discovered it? I wrote a script that gets the ship list for each sector and destroys ships with names matching that template. There were 162 of them in the entire universe. Surprisingly, these ships were not visible in the get ship array: of race function. Only get ship array from sector seems to return them. Now my FPS went back to (almost) what it was in a new game (45 vs 60). Did anybody else notice such ships in their games?
I am running (almost) vanilla with just a PHQ mod and a change to globals for comm range.
How I discovered it? I wrote a script that gets the ship list for each sector and destroys ships with names matching that template. There were 162 of them in the entire universe. Surprisingly, these ships were not visible in the get ship array: of race function. Only get ship array from sector seems to return them. Now my FPS went back to (almost) what it was in a new game (45 vs 60). Did anybody else notice such ships in their games?
I am running (almost) vanilla with just a PHQ mod and a change to globals for comm range.
Interesting find, kurush. I'd like to check my game as well. Noticed that fps is getting worse slowly.
Could you please share your script or describe in more details the culprits? Are those only Caimans or other races TS can causes this for you too ?
Could you please share your script or describe in more details the culprits? Are those only Caimans or other races TS can causes this for you too ?
Be careful about reading health books. You may die of a misprint.
---Mark Twain---
---Mark Twain---
If they have stalled jobs, that was something that came up a long while back. Lucike made this: http://www.xuniversum.info/download/x3_ ... _V3100.zip to deal with it. Reboots their job.
He also made this which deals with the ones that have no jobs, or commands, and fill up the docks: http://www.xuniversum.info/download/x3_ ... _V3101.zip. That will clean them up. No job, no command, good-bye.
Hope this helps.
He also made this which deals with the ones that have no jobs, or commands, and fill up the docks: http://www.xuniversum.info/download/x3_ ... _V3101.zip. That will clean them up. No job, no command, good-bye.
Hope this helps.
- Sam L.R. Griffiths
- Posts: 10522
- Joined: Fri, 12. Mar 04, 19:47
This sounds like a long-standing issue that also exists in TC. I only work-around for this issue that I know of is to modify the jobs file (c/f vkerinav's Job Scripts for Xtra/SRM).
Other causes I know of is if the gate-routing to their destination is broken. This can occur in Modded TC with the Random Sector Management (RSM) mod/script if more than one gate with the same direction designation exists in a sector (e.g. two North Gates)
Other causes I know of is if the gate-routing to their destination is broken. This can occur in Modded TC with the Random Sector Management (RSM) mod/script if more than one gate with the same direction designation exists in a sector (e.g. two North Gates)
Lenna (aka [SRK] The_Rabbit)
"Understanding is a three edged sword... your side, their side... and the Truth!" - J.J. Sheriden, Babylon 5 S4E6 T28:55
"May god stand between you and harm in all the dark places you must walk." - Ancient Egyption Proverb
"When eating an elephant take one bite at a time" - Creighton Abrams
"Understanding is a three edged sword... your side, their side... and the Truth!" - J.J. Sheriden, Babylon 5 S4E6 T28:55
"May god stand between you and harm in all the dark places you must walk." - Ancient Egyption Proverb
"When eating an elephant take one bite at a time" - Creighton Abrams
I guess I will have to wait until I get more of them before I can check their job ID Where do I do it btw? Do I need to activate the script editor for it or is there just a script command to get the ID that I can plug in into my script? They were of all races, including "Pirate" and "Yaki" and considering their name template of <Race> <Ship type name>, they looked like leftovers from the Destroy Convoy missions. They also appeared in sectors in 1-2 jumps from where I was doing some massive amount of UFJD jumps. Lucike's script clears docked ships and these ones were free floating. I used the following code to clear them up:
Code: Select all
$X = 0
$Y = 0
while $X < 30 AND $Y < 30
$Sector = get sector from universe index: x=$X, y=$Y
if $Sector->exists
$shipar = $Sector -> get ship array from sector/ship/station
*: of race $raceobj class/type={TS 2031}
$count = size of array $shipar
while $count
dec $count =
$obj = $shipar[$count]
$name = $obj->get name
$sector = $obj->get sector
$homebase = $obj->get homebase
$Type = $obj->get ware type code of object
$raceobj = $obj -> get owner race
if $obj -> is of class {TS 2031}
$totalFreighters = $totalFreighters + 1
$racename = ''
if $raceobj == {Argon}
$racename = 'Argon'
else if $raceobj == {Boron}
$racename = 'Boron'
else if $raceobj == {Split}
$racename = 'Split'
else if $raceobj == {Paranid}
$racename = 'Paranid'
else if $raceobj == {Terran}
$racename = 'Terran'
else if $raceobj == {Teladi}
$racename = 'Teladi'
else if $raceobj == {Yaki}
$racename = 'Yaki'
else if $raceobj == {ATF 17}
$racename = 'ATF'
else if $raceobj == {Pirates}
$racename = 'Pirate'
end
$junkname = sprintf: fmt='%s %s', $racename, $Type, null, null, null
if $junkname == $name
inc $totalIdleFreighters =
write to log file 778 append=1 printf: fmt='%s ship %s from %s in %s', $name, $junkname, $homebase, $sector, null
$obj->destruct: show no explosion=1
else
*write to log file 778 append=1 printf: fmt='%s != %s ', $name, $junkname, null, null, null
end
end
end
end
if $X == 29
$X = 0
inc $Y =
else
inc $X =
end
end
- X2-Illuminatus
- Moderator (Deutsch)
- Posts: 24965
- Joined: Sun, 2. Apr 06, 16:38
In the Fly Commands there is the command <RetVar/IF><RefObj> get job id.
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!
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!
You must be right. I've not used unfocused jump in my game so far and your script only found one ship matching the name pattern. It was not really idling though, its pilot was offering to buy the ship. I am sure once the mission timeouts the ship will disappear by itself.
Be careful about reading health books. You may die of a misprint.
---Mark Twain---
---Mark Twain---
- apricotslice
- Posts: 14129
- Joined: Sun, 16. May 04, 13:01