[SCRIPT] Dead Ships Revival Script

The place to discuss scripting and game modifications for X³: Reunion.

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

User avatar
euclid
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 13293
Joined: Sun, 15. Feb 04, 20:12
x4

[SCRIPT] Dead Ships Revival Script

Post by euclid » Wed, 25. Apr 07, 13:04

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
Last edited by euclid on Wed, 5. Feb 14, 17:58, edited 2 times in total.

User avatar
ttl
Posts: 537
Joined: Sun, 6. Feb 05, 13:04
x3tc

Post by ttl » Wed, 25. Apr 07, 13:41

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:

jlehtone
Posts: 21809
Joined: Sat, 23. Apr 05, 21:42
x4

Post by jlehtone » Wed, 25. Apr 07, 13:46

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?

User avatar
Lucike
Posts: 12969
Joined: Sun, 9. May 04, 21:26
x4

Post by Lucike » Wed, 25. Apr 07, 13:53

jlehtone wrote:I guess this is the same script, which the germans include in the X3plus script collection?
Similarly ... the result is the same.
Image

User avatar
Red Spot
Posts: 3461
Joined: Fri, 4. Feb 05, 13:44
x3

Post by Red Spot » Wed, 25. Apr 07, 16:18

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

DangerDave
Posts: 113
Joined: Fri, 23. Mar 07, 23:32

Post by DangerDave » Wed, 25. Apr 07, 18:41

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.
Dave.

Stormsong
Posts: 5309
Joined: Wed, 6. Nov 02, 20:31
x3tc

Post by Stormsong » Wed, 25. Apr 07, 19:37

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).
"The most beautiful thing we can experience is the mysterious. It is the source of all true art and science."

xTemon
Posts: 996
Joined: Tue, 9. Jan 07, 20:01
x3tc

Post by xTemon » Wed, 25. Apr 07, 19:41

Mind if I ask what a dead ship is :gruebel:

Lancefighter
Posts: 3144
Joined: Sun, 19. Dec 04, 02:41
x4

Post by Lancefighter » Wed, 25. Apr 07, 19:42

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.

User avatar
JuanCudz
Posts: 91
Joined: Mon, 6. Sep 04, 13:59
x3

Post by JuanCudz » Wed, 21. Nov 07, 15:17

Anyone know another source for this script? I'm getting a 404 error for the website.
"I had an Alfredo Garibaldi under my command during the Dilgar invasion. Excellent soldier."
"That's my dad."
"So much for genetics."
-- General Richard Franklin and Garibaldi in Babylon 5:"GROPOS"

User avatar
moggy2
Posts: 5505
Joined: Wed, 6. Nov 02, 20:31
x3ap

Post by moggy2 » Wed, 21. Nov 07, 16:44

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.

User avatar
vtecem
Posts: 197
Joined: Thu, 28. Sep 06, 00:17
x4

Post by vtecem » Wed, 21. Nov 07, 20:33

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. :)

Stormsong
Posts: 5309
Joined: Wed, 6. Nov 02, 20:31
x3tc

Post by Stormsong » Thu, 22. Nov 07, 13:56

Wasn't this included in the Bonus Pack at some point, or did that never come about?
"The most beautiful thing we can experience is the mysterious. It is the source of all true art and science."

User avatar
moggy2
Posts: 5505
Joined: Wed, 6. Nov 02, 20:31
x3ap

Post by moggy2 » Thu, 22. Nov 07, 14:10

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.

jlehtone
Posts: 21809
Joined: Sat, 23. Apr 05, 21:42
x4

Post by jlehtone » Thu, 22. Nov 07, 16:05

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.)
Goner Pancake Protector X
Insanity included at no extra charge.
There is no Box. I am the sand.

User avatar
moggy2
Posts: 5505
Joined: Wed, 6. Nov 02, 20:31
x3ap

Post by moggy2 » Thu, 22. Nov 07, 17:38

probably "start Job" or whatever the command actually is. That's how this script works.

User avatar
ninjitsumonk
Posts: 1874
Joined: Thu, 1. Mar 07, 09:21
x3

Post by ninjitsumonk » Thu, 22. Nov 07, 19:55

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.
Archeo Avis wrote:
if you take out phrasing and root notes and just look at the notes, they are the same
So what you're saying is, if you ignore everything that's different and focus only on the one thing that's the same, they're same.

Good God.

jlehtone
Posts: 21809
Joined: Sat, 23. Apr 05, 21:42
x4

Post by jlehtone » Thu, 22. Nov 07, 20:39

@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?
Goner Pancake Protector X
Insanity included at no extra charge.
There is no Box. I am the sand.

paulms1980
Posts: 933
Joined: Fri, 5. Mar 04, 17:23
x3tc

Post by paulms1980 » Thu, 22. Nov 07, 21:15

is anyone else hosting this script?
the link is dead
this is really messing up my game
somebody please help

User avatar
euclid
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 13293
Joined: Sun, 15. Feb 04, 20:12
x4

Post by euclid » Thu, 13. Mar 08, 19:17

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

Post Reply

Return to “X³: Reunion - Scripts and Modding”