Page 1 of 3

[SCRIPT] Dead Ships Revival Script

Posted: Wed, 25. Apr 07, 13:04
by euclid
Have you encountered 'dead' ships (see this tech support thread and also this one in the German tech support forum)? Then this script is for you :-)



Download link


Just copy both files into your script folder. Whenever you load a game the script searches for dead ships and starts a job on them. You will find a message in your log on the number of revived ships.

Edit: dead link revived - thx Merroc :-)


Cheers Euclid

Posted: Wed, 25. Apr 07, 13:41
by ttl
Great idea :thumb_up:

But I would ask for a more accurate description on how you determine a ship is "dead", and what you make it do? Or do you just wipe the poor buggers out? Or am I just paranoid about my game :roll:

Posted: Wed, 25. Apr 07, 13:46
by jlehtone
Each spawned NPC ship runs a script defined in jobs.txt. "Dead ship" no longer runs a script it is supposed to run forever. This script regognizes those halted ships and probably restarts the command that the ship is supposed to run.

I guess this is the same script, which the germans include in the X3plus script collection?

Posted: Wed, 25. Apr 07, 13:53
by Lucike
jlehtone wrote:I guess this is the same script, which the germans include in the X3plus script collection?
Similarly ... the result is the same.

Posted: Wed, 25. Apr 07, 16:18
by Red Spot
jlehtone wrote:..........no longer runs a script it is supposed to run forever.

not completelly correct as most scripts are designed to shut down on almost any "dunno" ...

its the job-scripts that generally are supposed to run forever and some, mostly "follower" scripts, again shut down on specific conditions (those ships are generally revived by their job-leader when in specific conditions)



G

Posted: Wed, 25. Apr 07, 18:41
by DangerDave
In my experience, 'dead' ships, that have no command set for whatever reason, will be automatically 'revived' unless 'set race controlled logic' is set to FALSE for those ships.

Posted: Wed, 25. Apr 07, 19:37
by Stormsong
Technical stuff aside, all I know is that the script revived several dozen "dead" ships in my game the first time I loaded after installing, and continues to do so every time I load subsequent games (generally one or two ships per session).

Posted: Wed, 25. Apr 07, 19:41
by xTemon
Mind if I ask what a dead ship is :gruebel:

Posted: Wed, 25. Apr 07, 19:42
by Lancefighter
From what i understand, it is a NPC ship without a command - IE, Not the un-polited ships you can 'steal', but just random ships that aren't doing anything.

Posted: Wed, 21. Nov 07, 15:17
by JuanCudz
Anyone know another source for this script? I'm getting a 404 error for the website.

Posted: Wed, 21. Nov 07, 16:44
by moggy2
I've got I copy of it. I'll pm you a link in a sec.

@euclid, I can host it on xai-corp.net if you want to find a new home for it.

Posted: Wed, 21. Nov 07, 20:33
by vtecem
moggy2 wrote:I've got I copy of it. I'll pm you a link in a sec.

@euclid, I can host it on xai-corp.net if you want to find a new home for it.
That would be cool, so I can get a copy of it too. :)

Posted: Thu, 22. Nov 07, 13:56
by Stormsong
Wasn't this included in the Bonus Pack at some point, or did that never come about?

Posted: Thu, 22. Nov 07, 14:10
by moggy2
I tested it for the bonus pack, but it didn't make it in.

While it revived some of the dead ships, when I looked closely, there were a few ships that it was reviving each time In other words they weren't all revived.

Posted: Thu, 22. Nov 07, 16:05
by jlehtone
What does

Code: Select all

039       $Ship -> beginne Arbeit
do?

(That is in 'setup.freetrader.xml' included in X3plus. Apparently a oneshot restarter more geared to get X3plus version of freetrader running.)

Posted: Thu, 22. Nov 07, 17:38
by moggy2
probably "start Job" or whatever the command actually is. That's how this script works.

Posted: Thu, 22. Nov 07, 19:55
by ninjitsumonk
Lancefighter wrote:From what i understand, it is a NPC ship without a command - IE, Not the un-polited ships you can 'steal', but just random ships that aren't doing anything.
errmm... No.
There are hundreds of ships not running commands in game, mainly civilian ones but there are others, a dead ship should be one that doesn't have a "task 0", yet is owned by somebody, ie non-capturable.
Though I haven't looked at the script so I could be wrong.

Posted: Thu, 22. Nov 07, 20:39
by jlehtone
@moggy, I don't have euclid's version, so can you say how much this X3plus (Lucike's) version differs?

Code: Select all

...
033      $TaskUse = $Ship -> is task 0 in use
034      $Command = $Ship -> get command
035      $JobID = $Ship -> get job id
036      $Pilotname = $Ship -> get pilot name
037      $NoPilot =  read text: page=35 id=21
038      skip if not $Command == COMMAND_NONE AND $JobID == 0 AND $Pilotname != $NoPilot AND ! $TaskUse
039       $Ship -> beginne Arbeit
...
Ie, would it fail the same way?

Posted: Thu, 22. Nov 07, 21:15
by paulms1980
is anyone else hosting this script?
the link is dead
this is really messing up my game
somebody please help

Posted: Thu, 13. Mar 08, 19:17
by euclid
Sorry for the late feedback (just one PM and it would have been faster :p) . I have revived the download link. Thanks Merroc :-)


Cheers Euclid