[SCR] XTC Safe undocking scripts (Standalone Version)

The place to discuss scripting and game modifications for X³: Terran Conflict and X³: Albion Prelude.

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

Post Reply
User avatar
Aragon Speed
Posts: 818
Joined: Sat, 10. Dec 05, 13:30
x4

[SCR] XTC Safe undocking scripts (Standalone Version)

Post by Aragon Speed » Sat, 15. Aug 09, 09:23

XTC Safe undocking scripts

In XTM and XTC there are some ships that have trouble undocking without blowing up while the player is IS. This is due to their sheer size causing them to crash into the station they are undocking from.

There are a few ships that also suffer from this available as mods for TC, and in both cases the simplest way to solve this problem is for the player to order the ship to undock while they are OOS.

We found this spoilt the immersion factor, especially if it was a ship you were flying. Having to get into another ship and to fly OOS just to undock, and then to return to your ship of choice was a real bind.

The safe undocking scripts we created for X3R\XTM to solve this have now been ported across to TC. So that everyone can have ships that don't blow up when they undock, we have altered our XTC scripts to work as standalone scripts for everyone to use.

These are very simple scripts that just turn the collision detection off on big ships for a short amount of time when you undock, thus stopping the ship from crashing into the station it is undocking from.

Usage:
Just drop the scripts from the zip file into your scripts folder, and then forget about them. Yep, as simple as that. ;)

(You will need to activate the script editor for these scripts to work. But your running modded anyway right, so what does that matter? :D )

Big Ship Safe Undocking: >>>Click to download<<<

These scripts are a modders resource. If you want to include them in your own mod then you are welcome to do so without having to ask for permission.
Last edited by Aragon Speed on Sun, 16. Aug 09, 08:04, edited 1 time in total.

User avatar
chaosras
Posts: 99
Joined: Thu, 28. Oct 04, 18:50
x3tc

Post by chaosras » Sat, 15. Aug 09, 16:52

So from an initial look at these scripts, they apply only to TLs, M7s, and larger undocking at shipyards and equipment docks?
Space Cowboy - http://www.myspace.com/hardknight

"I've seen things you people wouldn't believe. Attack ships on fire off the shoulder of Orion.
I watched C-beams glitter in the dark near Tannhäuser Gate. All those moments will be
lost in time, like tears in rain."
- R. Batty

HKP Transponder Interface Software
HKP Enhanced Missile Barrage

Gorium
Posts: 202
Joined: Sat, 13. Jun 09, 22:19
x3tc

Post by Gorium » Sat, 15. Aug 09, 21:16

Could this mod be extended to M6s as well? The Hyperion sometimes has issues getting out of some station...

Will wait for this improvement and apply the script then...

Nice creation though.

User avatar
Aragon Speed
Posts: 818
Joined: Sat, 10. Dec 05, 13:30
x4

Post by Aragon Speed » Sun, 16. Aug 09, 08:02

chaosras wrote:So from an initial look at these scripts, they apply only to TLs, M7s, and larger undocking at shipyards and equipment docks?
Yup.
Gorium wrote:Could this mod be extended to M6s as well? The Hyperion sometimes has issues getting out of some station...
The scripts run on individual stations and not on ships, which is why it is limited to EQ docks and SY's, any more and it could start to have serious performance problems - and I think TC has enough of those already. ^^

If the Hyp has trouble with those stations, then we could add that in as an exception I suppose, but to be honest the scripts are really aimed at the larger mod ships and not at ships that are already in the stock game.

Alan Phipps
Moderator (English)
Moderator (English)
Posts: 30349
Joined: Fri, 16. Apr 04, 19:21
x4

Post by Alan Phipps » Sun, 16. Aug 09, 17:22

For M6 undocking issues (super shipyards with internal M6 docking and some stations that cause Springblossom/Hyperion to collide with nearby parts of the station) you don't need to change ship to go OOS or anything. Just stay onboard but undock the M6 using the autopilot (fly to ..., dock at ... etc) and there are no collision issues.

InSeeCure
Posts: 23
Joined: Wed, 9. Sep 09, 21:05
x4

Post by InSeeCure » Mon, 28. Sep 09, 01:59

Hi... Am new to the forum and therefor sometimes ask stupid things....

But here goes, is it possible to do the same for gates? Like a ''Safe gate travel''
By that I mean all ships coming out using the center of an gate? (M8,M6,M7,M2 and M1)

Getting tired off accidents using the gates, I ones killed 2 M8's, 1 M6 and just missing an M7 going through 5 terran sectors, not a good way to travel...

User avatar
enenra
Posts: 7150
Joined: Fri, 8. Apr 05, 19:09
x4

Post by enenra » Mon, 28. Sep 09, 11:02

That won't be possible - at least not in the same way like the safe undocking script works.

Firstly, it would mean to make all ships entering a certain radius of a gate invincible, which wouldn't quite be that cool for combat.
Secondly disabling their collision body, which is essentially what this script does (--> the ships are invincible), would prevent a ship from using gates - they would just pass through the event horizon. ;)

User avatar
X2-Eliah
Posts: 4369
Joined: Thu, 12. Oct 06, 16:30
x4

Post by X2-Eliah » Mon, 28. Sep 09, 11:04

In theory, it would be possible, I suppose.

The problem would be the implementation.
Firstoff, the script that would check the ships entering/exiting sector would have to be constantly running. Since ships do not give special signals when entering sector, the script would be very CPU-intensive, as it would utilize a number of workarounds.

Second, The player would easily cheat the system by staying near the gate and fighting while being invincible.

Third, all enemies that jump in are immune for a while, which is not what you'd want.

Four, If only the playership is affected, then after every jump the game would have to load extra scripts before even loading the sector.


Fifth, if your ship has no collision detection, it can not jump at all - it will just fly through the gate instead of jumping, since the whole event itself is triggered by a collision of the ship against the rotating thingie.

InSeeCure
Posts: 23
Joined: Wed, 9. Sep 09, 21:05
x4

Post by InSeeCure » Mon, 28. Sep 09, 22:20

OKEY OKEY OKEY I GET IT I GET IT :lol:.... bad ide.... emm

Okey getting a bit off topic now but I just have one more.... stupid ide....

There is an mod that makes gates 300% bigger and I was wondering if it's possible to change the entery/exit points, say that big ships have one entery point off center and one exit point to the opposite side maybe making the small ship lane just top and bottom, and make M6's and M8's take the small ship lane...

Thanks for the respons :) and sorry for going off topic :(

MegaBurn
Posts: 278
Joined: Mon, 30. Jan 06, 15:52
xr

Re: [SCR] XTC Safe undocking scripts (Standalone Version)

Post by MegaBurn » Wed, 20. Jan 21, 23:31

Hey,
Got an error report, revisiting X3-AP (can't run X4 at the moment), started a large mod/script build and ran into a severe problem with XTC Safe Undocking.

Problem: New game start failure, player ship not setup with equipment, no/default faction relations, no plots, etc, and is promptly destroyed by Terran Border Control.

Likely Problem: ~/addon/director/start.xml fails to run. XRM is known to be sensitive to setup scripts causing delays, setup.Sart.SafeUndocking starts by interating the entire universe to build an array of all shipyards and then does that again to build an array of all equipment docs, thereby front loading a lot of processing long before its needed, at a time when that processing load can cause problems.

Likely Solution: Replace this safe undocking script with Gazz's implementation. When I swapped them out it works, no problem.

Reproduction: Install per usage case, mainly following the directions in the "IEX patch for XRM-TCAP with LoCo XRM for AP3.2" patch (see near end of IEX thread). Then start a new game as Terran Defender, notice it loads faster than it should for XRM, shields are missing, threatening comms from Terran Border Control for trespassing, incoming missile warnings, game over...

Usage Case: Fresh install of X3 Terran War Pack (GOG), and the following mods and scripts.

Code: Select all

Mods:
-- XRM
-- IE
-- IEX
-- TCAP-IEX 2.2a
-- "Updated TCAP files for X3AP3.2" patch
-- "XRM-TCAP Final" patch
-- "Updated XRM-TCAP files for AP3.2 and TCAP2.2a" patch
-- Lost Colonies 202 XRM
-- "LoCo XRM patch for XRM TCAP for AP3.2" patch
-- "IEX patch for XRM-TCAP with LoCo XRM for AP3.2" (above installed per instructions in this patch)
-- XRM Docking Ware Size
-- XRM High Hull Pack: Tships extracted (cat/dat not used)
-- Loading screen controls remover
-- Holy Asteroids Mod 2.0
-- XChange Guild Portals
-- Enhanced Equipment Docks 2.7-2.2: scripts only
-- Enhanced Equipment Docks AP Unofficial (cat/dat)
-- Comp Cleaner AP
-- Advanced Complex Hub
-- OWP External docking
-- Lucikes Modification Collection (cat/dat only)
-- XRM-Saturn Complexes (Terran)
-- BounceV1.7

Mod Build Cat/Dat Files:
-- 01, 02, 03, 04: Vanilla
-- 05 = 42 Loading screen controls remover
-- 06 = Modification Collection
-- 07 = Holy Asteroids
-- 08 = Advanced Complex Hub
-- 09 = eEQ 2.7 AP
-- 10 = Comp Cleaner
-- 11 = OWP External docking
-- 12 = XChange Guild Portals
-- 13 = XRM part 1
-- 14 = XRM part 2
-- 15 = IE
-- 16 = IEX
-- 17 = TC_Plots_2.2a_AP_3.1_IEX
-- 18 = LoCo202xrm
-- 19 = SaturnCH
-- 20 = Docking ware size (need TwareT in a cat/dat for plug-in manager)
-- XX = High hull pack: Tships extracted

Package Manager:  (independent scripts)
-- Community Plugin Configuration
-- Hotkey Manager
-- Plugin Manager Library Scripts AP
-- Ware Manager
-- Cheat Collection Package AP
-- Marine Repairs and Training V214
-- ImprovedBoarding-V1.24a_Bullwinkle_Hack_2013-06-23

Scripts:
-- Safe Undocking
This is followed by another 35 scripts not yet installed, and upward of 20 more to install later.

Recommendation: Add a note to the original post that XTC Safe Undocking should only be used with TC, and recommend players use Gazz's implementation with AP.

Hope this helps someone to save some hours of troubleshooting. For anyone else is doing a similarly large script/mod build, be mindful of setup scripts, before giving up on a problematic script, look for alternatives (as in this case), or try adding a 30 second "wait" line at the top of the setup script, or delay setup to the first save game load (see MARS setup), or at worst wait to install that script until after starting a new game.

-Chris
"Only the dead have seen the end of war." -Plato

Post Reply

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