[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: 13244
Joined: Fri, 13. Jan 06, 16:39
x4

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

Post by Gazz » Fri, 20. Mar 09, 16: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.
[ external image ]Download: 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: 13244
Joined: Fri, 13. Jan 06, 16:39
x4

Post by Gazz » Fri, 20. Mar 09, 16: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: 13244
Joined: Fri, 13. Jan 06, 16:39
x4

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: 371
Joined: Fri, 18. Mar 05, 16: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: 13244
Joined: Fri, 13. Jan 06, 16:39
x4

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: 2195
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: 13244
Joined: Fri, 13. Jan 06, 16:39
x4

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.


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: 933
Joined: Fri, 5. Mar 04, 17: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: 13244
Joined: Fri, 13. Jan 06, 16:39
x4

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: 723
Joined: Sat, 8. Nov 08, 02:51
x4

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

Congratulations, nice work :)

User avatar
Locksley
Posts: 371
Joined: Fri, 18. Mar 05, 16: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: 13244
Joined: Fri, 13. Jan 06, 16:39
x4

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: 371
Joined: Fri, 18. Mar 05, 16: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?

User avatar
Gazz
Posts: 13244
Joined: Fri, 13. Jan 06, 16:39
x4

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

Locksley wrote:Dang! No solution for Aldrin then :P
You could work around the problem.

Code: Select all

Arguments
1: Position , Var/Sector Position , 'Position' 

Source Text
001   $Object =  get player tracking aim
002   $X = $Position[0]
003   $Y = $Position[1]
004   $Z = $Position[2]
005   $Object -> force position: x=$X y=$Y z=$Z
If stations/gates/whatever do not work that close to the Fat Rock, why not move them to where then can work?

You could arrange everything into a "regular" sector 500km away from the rock. =P
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: 371
Joined: Fri, 18. Mar 05, 16:26
x3tc

Post by Locksley » Sun, 12. Apr 09, 20:04

Thankyou Gazz, you are a most helpfull person - if ever you close go Gothenburg Sweden I'll buy you an IPA :D

Lately I've been thinking about what can be done to optimize the standard scripts in TC. I'm wondering if there are alot of overhead that could be removed or run when in station only or entering a new sector... Now I'll go and play some more, I got to get a Xenon invasion mission so I will know how much my system will slow down :p

User avatar
Gazz
Posts: 13244
Joined: Fri, 13. Jan 06, 16:39
x4

Post by Gazz » Wed, 6. May 09, 23:16

Version 5 released.

SIGNAL_DOCKED issue resolved for OOS ships.
Still remains for IS ships.
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.

tc3
Posts: 45
Joined: Sun, 30. Jul 06, 13:16
x3tc

Post by tc3 » Sun, 7. Jun 09, 12:59

thanks for this dude, gonna give it a shot, looks very handy. :)

Motika
Posts: 67
Joined: Tue, 9. Jan 07, 03:53

Post by Motika » Mon, 8. Jun 09, 03:55

will this work ok with CODEA Weapon system?

Post Reply

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