[SCR] Docking Lockup Fix + Upgrade (v6 - 13.06.09)

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

User avatar
Gazz
Posts: 12430
Joined: Fri, 13. Jan 06, 17:39
x3tc

[SCR] Docking Lockup Fix + Upgrade (v6 - 13.06.09)

Post by Gazz » Fri, 20. Mar 09, 17:03

English / Deutsch
  • When a ship flies to a carrier/station with the intention of docking it occasionally freezes indefinitely when it reaches the very start of the blinkenlighten runway markers.
  • It was also reported that a ship could freeze indefinitely when sitting at the docking clamps but not quite docking.
  • This script is designed to fix the former but possibly also the latter. (could not reproduce)
  • Ships use an installed Docking Computer when within 5km of the target station/carrier.
    (= Transporter range in vanilla)
  • Lockup Fix and Docking Computer are automatically available for all scripts that call:
    !move.movetostation
    !move.returntohomebase
    That means all vanilla scripts and just about all custom ones.
  • Custom scripts that tap into SIGNAL_DOCKED will not recognise this as "proper docking" when In Sector but the stock X3 "auto-supply when docking" does work.

    OOS there are no incompatibility issues.
ImageDownload: ZIP


Installation:
Copy the contents of the ZIP into the TC folder.


Resources used: none
Last edited by Gazz on Sat, 13. Jun 09, 13:18, edited 13 times in total.
My complete script download page. . . . . . I AM THE LAW!
There is no sense crying over every mistake. You just keep on trying till you run out of cake.

User avatar
Gazz
Posts: 12430
Joined: Fri, 13. Jan 06, 17:39
x3tc

Post by Gazz » Fri, 20. Mar 09, 17:04

** reserved **
My complete script download page. . . . . . I AM THE LAW!
There is no sense crying over every mistake. You just keep on trying till you run out of cake.

User avatar
Gazz
Posts: 12430
Joined: Fri, 13. Jan 06, 17:39
x3tc

Post by Gazz » Sun, 5. Apr 09, 08:26

Version 2 released.

Functionality extended to "Return to Homebase"
My complete script download page. . . . . . I AM THE LAW!
There is no sense crying over every mistake. You just keep on trying till you run out of cake.

User avatar
Locksley
Posts: 366
Joined: Fri, 18. Mar 05, 17:26
x3tc

Post by Locksley » Sun, 5. Apr 09, 09:47

Great Gazz!

I have used quite a few of our scripts over the years (is it two years :roll: ) and I am greatly appreciating you still being around enlightning the X-verse.

Cheers!

User avatar
Gazz
Posts: 12430
Joined: Fri, 13. Jan 06, 17:39
x3tc

Post by Gazz » Mon, 6. Apr 09, 20:34

Version 3 released.

For the first time ever the Docking Computer has been seamlessly integrated into station/carrier landings.

When within 5 km of the target station/carrier, a ship uses it's docking computer, if available.


You may say that this has been done before - but it has not.
This time I successfully melded "-> fly to station" with instant docking while not leaving any script residue or hanging tasks.
Unlike previous attempts at this (including mine =) this does not cause hanging scripts so all actors in the game can (and do) freely call it as their regular station landing script.

So do all of your own ships, while using all the regular Egosoft scripts.
For instance, you know how fighters with "Protect Carrier" automatically land after they are done protecting except that now they would automatically use an installed docking computer, making this a very quick and painless affair.
My complete script download page. . . . . . I AM THE LAW!
There is no sense crying over every mistake. You just keep on trying till you run out of cake.

User avatar
MegaJohnny
Posts: 2055
Joined: Wed, 4. Jun 08, 22:30
x4

Post by MegaJohnny » Mon, 6. Apr 09, 22:02

AI docking computers!

*screams loudly and runs in circles*

Oh by the way does this work with any command that makes a ship dock with something? Jump to station, return home etc?

User avatar
Gazz
Posts: 12430
Joined: Fri, 13. Jan 06, 17:39
x3tc

Post by Gazz » Mon, 6. Apr 09, 23:57

MegaJohnny wrote:Oh by the way does this work with any command that makes a ship dock with something? Jump to station, return home etc?
Yes, unless someone (like Lucike) uses his very own navigation library, bypassing the default script calls. (CAG and family won't use this)

But all Egosoft scripts (and many others) surely do. Best buy, dock at, protect, jump to, etc.
Even the sectorwide broadcast for "All fighters, return to base" would work...
And if a boron energy transporter happens to spawn with a docking computer, sure thing he's gonna use it.
It's not a hack, it's a feature.

And yes, I am damn happy about it! (Woot!)
Over the years I'd made several attempts at this but all turned out as crude workarounds here and ugly clutches there. One way scripts that might hang up after docking or would kill the ship's current mainscript when trying to get unstuck, leaving it stranded, docked at some station with no idea how it got there and how to buy and return with the wares it was sent for.
Or others, that tried to simulate the smooth follow/approach course, that a ship normally takes, trying to catch a moving carrier with a series of moveto instructions. It kind of worked but it was crude and ugly. Messy.
But now I can make it faster, stronger! I have the technology!
My complete script download page. . . . . . I AM THE LAW!
There is no sense crying over every mistake. You just keep on trying till you run out of cake.

pelador
Posts: 1230
Joined: Wed, 6. Nov 02, 21:31
x3tc

Post by pelador » Tue, 7. Apr 09, 00:39

Gratz Gazz:

Image

coreador
Posts: 16
Joined: Fri, 3. Apr 09, 20:47
xrvr

Post by coreador » Sun, 12. Apr 09, 08:28

Does this work in X3 Reunion? If not, is there something comparable for it? Getting ships to dock on my TL is causing me major headaches.

paulms1980
Posts: 833
Joined: Fri, 5. Mar 04, 18:23
x3tc

Post by paulms1980 » Sun, 12. Apr 09, 09:41

so gazz this works without any hitches?
ans also is there any scripts that might be incompatible (excpet the cag scripts already mentioned)
otherwise this could be the coolest SHIP script ive seen
am powering up my carrier as i type lol

User avatar
Gazz
Posts: 12430
Joined: Fri, 13. Jan 06, 17:39
x3tc

Post by Gazz » Sun, 12. Apr 09, 15:13

Version 4 released.

Auto-Supply after docking works again.

Just found that one yesterday.
This "docking computer" way of docking does not trigger SIGNAL_DOCKED so the auto-supply script was not called.

If any custom scripts tap into SIGNAL_DOCKED, they will not register the (computerised) docking.
It's a rarely used feature, though, so few if any scripts will be affected.
My complete script download page. . . . . . I AM THE LAW!
There is no sense crying over every mistake. You just keep on trying till you run out of cake.

Troubleshooter11
Posts: 718
Joined: Sat, 8. Nov 08, 03:51
x4

Post by Troubleshooter11 » Sun, 12. Apr 09, 15:40

Congratulations, nice work :)

User avatar
Locksley
Posts: 366
Joined: Fri, 18. Mar 05, 17:26
x3tc

Post by Locksley » Sun, 12. Apr 09, 18:40

Nice Gazz.

I just watched one of my traders using it's docking computer - wizz :D

There was a complaint in spoiler forum that the auto pillok of ships can't dock to stations in Aldrin that are too close to the "big rock" in the middle - I pointed to this script and added that maybe one could do a check if ships are in Aldrin and give them a longer auto-docking range when in Aldrin only? Thus one would bypass the collison avoidance hopefully.

Maybe beoynd the scope of this script? Or even a stupid suggestion? :cry:

Cheers!

User avatar
Gazz
Posts: 12430
Joined: Fri, 13. Jan 06, 17:39
x3tc

Post by Gazz » Sun, 12. Apr 09, 19:34

Terran stations are so huge that the docking clamps are usually far more than 5km from the center of the station.
As a result, a ship approaching the docking clamps would at no point be close enough to use the docking computer.

This works the same way for the playership. If you want to use the DC you need to fly smack dab into the middle of a terran station and not towards the docking clamps.

But what really screws up everything in Aldrin is the huge asteroid. That I can't fix easily.


Well, what I could do is not use the standard 5km range but something like
Station.Radius + 2000m.
However, that would mean that ships could instantly dock clear across 24 km of open space... which is more than a little silly.
My complete script download page. . . . . . I AM THE LAW!
There is no sense crying over every mistake. You just keep on trying till you run out of cake.

User avatar
Locksley
Posts: 366
Joined: Fri, 18. Mar 05, 17:26
x3tc

Post by Locksley » Sun, 12. Apr 09, 19:43

Dang! No solution for Aldrin then :P

Too bad there is no check from the God engine building stations near that asteriod - there should be a clearance big enough so ships wouldn't start collision avoidance when they try to dock to a station too close to that rock.

Eh, on an entirely different note - do you know where I can find some info on Job files and the workings of the God engine?

Post Reply

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