[SCR] Safe undocking / jumping (v1.00, 08.04.12)

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

kaylo7
Posts: 23
Joined: Fri, 28. Jun 13, 12:45
x3tc

Post by kaylo7 » Fri, 19. Jul 13, 17:19

Sorry to resurrect this, but I was hoping someone could give a brief explanation of how you edit the script to stop it. I decided to uninstall as the acceleration + sliding in random directions kept getting me kill by running into the stations I was undocking from. Like others I ran into the crash issue while jumping/undocking after removing the script.

I see the posts above mine about adding a line to the script to disable it, but I don't see how to add "return null" in-game via the script manager. Insert adds a line, in which I presume to add "return null", but clicking on the blank line I created opens up a ton of potential script lists, and I have no idea which one to choose that actually has "return null" as an option. Can anyone help me out? 10 minutes or so of random clicking through the options netted zip.

User avatar
DrBullwinkle
Posts: 5715
Joined: Sat, 17. Dec 11, 01:44
x3tc

Re: [SCR] Safe undocking / jumping (v1.00, 08.04.12)

Post by DrBullwinkle » Fri, 19. Jul 13, 18:56

Gazz wrote:What this script does:

If the playership manually undocks from anything or enters a new sector by any means, it's collision detection is disabled .

Collisions are reenabled if any of these conditions is true:
In other words: Keep your hands off of the controls and there will be no "crash issue".

Try it... you will see that this script works great.

kaylo7
Posts: 23
Joined: Fri, 28. Jun 13, 12:45
x3tc

Post by kaylo7 » Sat, 20. Jul 13, 04:20

Yes and no - there is a what, 10 second timer? If I'm in something slow, especially if I don't have boost extension installed, then undocking from a military outpost or trading station may cause the script to launch me sideways into the structure, and no amount of strafing can get me out in time - even if I don't turn or enable autopilot.
So I still blow up.

Edit: Really I'd like the mod if it just didn't add random trajectories when undocking. The whole shooting sideways about 5 km the moment you undock is both disorienting and dangerous.

User avatar
DrBullwinkle
Posts: 5715
Joined: Sat, 17. Dec 11, 01:44
x3tc

Re: [SCR] Safe undocking / jumping (v1.00, 08.04.12)

Post by DrBullwinkle » Sat, 20. Jul 13, 05:18

DrBullwinkle wrote:Keep your hands off of the controls and there will be no "crash issue".

Try it.

kaylo7
Posts: 23
Joined: Fri, 28. Jun 13, 12:45
x3tc

Post by kaylo7 » Sat, 20. Jul 13, 08:45

Damn you and your quotes! Well, I reread the OP, which states
60 seconds expire
so I assume I should have plenty of time. I don't though - 10 seconds or so, like I'd stated. I'm not sure if there is another script interfering with collision (maybe bounce?) but I'm still blowing up. So a way to uninstall safely would be nice.

Oh and on a side note, just fyi, your edited repackaged Mars script you linked on that forum that excludes the repair goblins fake patch didn't work for me for some reason. It's the same size as the standard repackaged version less the fake patch, but only the normal version with the repair goblins fake patch worked for me. I was using it for XTM on my XTC install. To clarify:

mars-tc-ap_v5.26_RepackedForPluginManager_for.major.mods - Didn't work.

mars-tc-ap_v5.26_RepackedForPluginManager__Vanilla_TC_AP3.0 - Did work. After I removed the fake patch that is.

User avatar
DrBullwinkle
Posts: 5715
Joined: Sat, 17. Dec 11, 01:44
x3tc

Post by DrBullwinkle » Sat, 20. Jul 13, 14:10

Gazz wrote:The easiest way [to uninstall] would be to edit the script and copy / paste a "return null" to the first line of the script.
Interesting about MARS. I will take a second look at the packages.

kaylo7
Posts: 23
Joined: Fri, 28. Jun 13, 12:45
x3tc

Post by kaylo7 » Fri, 26. Jul 13, 23:09

In response to:
I cannot help it if you cannot read, kaylo. Not only did I tell you how to uninstall the script, but Gazz also tells you on the first page.

* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
DrBullwinkle wrote:
Gazz wrote:
The easiest way [to uninstall] would be to edit the script and copy / paste a "return null" to the first line of the script.

* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Now please stop filling up gnasirator's thread with nonsense. It is impolite.
I quote my initial post in regards to uninstalling and "return null."
I see the posts above mine about adding a line to the script to disable it, but I don't see how to add "return null" in-game via the script manager. Insert adds a line, in which I presume to add "return null", but clicking on the blank line I created opens up a ton of potential script lists, and I have no idea which one to choose that actually has "return null" as an option. Can anyone help me out? 10 minutes or so of random clicking through the options netted zip.

Tom5Cat
Posts: 107
Joined: Sun, 13. Jan 08, 19:35
x3ap

Post by Tom5Cat » Thu, 30. Jan 14, 20:01

Just thought I should mention that, after trying this in X3:TC, I got some unwanted results, imo:

- I can understand this being a great script for huge ships, but flying a fighter, most of the time (by far) you don't really need it, but it does impose itself nevertheless. It makes no distinction between ship types. Undocking from a station with a fast M5 and automatically racing at maximum speed right away, straight through anything and everything, really is a frightfull experience every single time. Especially when going straight through the entire interior of a station. I know that this is exactly the point of the script, but the least you can say is that it lacks some finesse in this regard.

- I use a free-jump script (like I'll bet many players do), which lets me jump straight to whatever location in a sector. This is especially handy when you like to end up at an exact spot, say the place where you 'd like to place a sat. When finishing the jump, this script forces the ship (like stated in previous point too) to be at maximum speed right away (forget about the accelerating part). By doing so (you can hear me coming, right?!) the ship clearly 'overshoots' that sweet spot you were aiming for.

- On a more technical level (I bet the most important point), the script seems to devour framerates in my game, resulting in freezes after a short while. I could not play for longer than 5 minutes before getting a freeze of a second or 2. It must be related to this script, because as soon as I turned it off, the problem too disappeared.

I must say that I almost always love the scripts from Gazz. Can't win all the time buddy, but please let me take this opportunity to thank you for many, many very fine scripts you've created, of which I use several all the time. This one isn't for me (in my TC-game!), but undoubtably it has all the uses in other games.

On a sidenote for people wanting to turn this script off again, after having installed it:
I understand that trying to actually uninstall (or even delete) it isn't the best way to go about it, rather than just turning it off (as I did). I can state that this went great in my game, following the advice of DrBullwinkle.
DrBullwinkle wrote:Add "return null" to the top of subroutine Undocking.Watcher.Script:. Around line 32 of setup.gz.safe.undocking.
Thx Gazz and thx DrBullwinkle (seems like I have to thank you a lot these days :wink: )

User avatar
Pac Bane
Posts: 12
Joined: Mon, 17. Sep 12, 12:10
xr

Post by Pac Bane » Thu, 19. Mar 15, 15:48

xiriod wrote:I had to remove this script for various reasons, or rather I want to, but when I do the game hangs whenever I try to undock from stations. Freezes. If I remove it while I am in space game freezes next time I go through a gate.

Is there any way we could have an uninstall script as well? :wink:

EDIT: Seemed all I needed to do was this:

Code: Select all

global secondary signal map: remove signal={SIGNAL_CHANGESECTOR} race={Player} class={Moveable Ship} name='safe.undock'
return null
It works again now, I can play, but was that enough as removal goes?
Recently installed the safe undocking script and wish to uninstall it and the file. Am I right in thinking that if I create the script quoted and run it, I can then remove the file completely?

Cheers :)

GlassDeviant
Posts: 291
Joined: Sun, 4. Nov 12, 12:06
x3tc

Something odd...

Post by GlassDeviant » Sun, 22. Mar 15, 04:16

Something odd happened today.

I cleared my game files and reinstalled AP 3.1, then downloaded a bunch of mods and installed them with X Plugin Manager. Pretty much like Nexus Mod Manager or Mod Organizer, so nothing especially new to me in concept though I've never used this one before.

A few minor hiccups when I didn't grok that MARS shows a lot of file read errors in the menus until it finishes its setup, then everything went pretty smoothly until I started noticing something bizarre: every time I undocked, my Caiman SF XL was being thrown several tens of meters in a random direction. I don't know if gating/jumping did the same as there is nothing to really compare such a small distance against.

Soon enough I ended up with that random direction being "straight into the station docking port I just left", and I started slamming into it repeatedly, enough that I had to reload my game as I was nearly out of hull.

So...I removed this mod and restarted the game (new game), going through the same process as before (custom setup, Advanced Discoverer and a Caiman SF XL instead of the Humble Merchant ships, plus a few creds to start buying cargo [50k]). Undocking problem is now gone and everything working smoothly.

I have no idea if it was specifically because of this mod, or because of the combination of mods I installed. I can provide a list if you want.

Edit: Also had the same problem xiriod had, game crashing after removing the script, which is why I started a new game. Not a big deal since the problem occurred in a new game and I hadn't done much yet.
bibo ergo sum

GlassDeviant
Posts: 291
Joined: Sun, 4. Nov 12, 12:06
x3tc

Post by GlassDeviant » Sun, 22. Mar 15, 04:23

kaylo7 wrote:In response to:
I cannot help it if you cannot read, kaylo. Not only did I tell you how to uninstall the script, but Gazz also tells you on the first page.

* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
DrBullwinkle wrote:
Gazz wrote:
The easiest way [to uninstall] would be to edit the script and copy / paste a "return null" to the first line of the script.

* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Now please stop filling up gnasirator's thread with nonsense. It is impolite.
I quote my initial post in regards to uninstalling and "return null."
I see the posts above mine about adding a line to the script to disable it, but I don't see how to add "return null" in-game via the script manager. Insert adds a line, in which I presume to add "return null", but clicking on the blank line I created opens up a ton of potential script lists, and I have no idea which one to choose that actually has "return null" as an option. Can anyone help me out? 10 minutes or so of random clicking through the options netted zip.
You could always use Notepad or another text editor like vi, ed, notepad++ or whatever (just don't use a word processor).
bibo ergo sum

User avatar
X2-Illuminatus
Moderator (Deutsch)
Moderator (Deutsch)
Posts: 24949
Joined: Sun, 2. Apr 06, 16:38
x4

Post by X2-Illuminatus » Sun, 22. Mar 15, 11:13

You cannot (shouldn't) edit scripts with normal text or xml editors. The somewhat readable part (between the <sourcetext>-tags) is only used for displaying the scripts in a browser. The actual code stands between the <codearray>-tags.

To add a 'return null' statement to the end of the script, simply press "Esc" and save the script. Alternatively, the return command can be found in the General Commands section under 'Script Calls'. If there is already a 'return null' somewhere in the script, you can also navigate to that line, press 'c', navigate to the line you want to have the 'return null' and press 'v'.

Having said all that, kaylo7 posted about the problem almost two years ago. So I guess, the problem was solved on one way or the other already. ;)
Nun verfügbar! X3: Farnham's Legacy - Ein neues Kapitel für einen alten Favoriten

Die komplette X-Roman-Reihe jetzt als Kindle E-Books! (Farnhams Legende, Nopileos, X3: Yoshiko, X3: Hüter der Tore, X3: Wächter der Erde)

Neuauflage der fünf X-Romane als Taschenbuch

The official X-novels Farnham's Legend, Nopileos, X3: Yoshiko as Kindle e-books!

GlassDeviant
Posts: 291
Joined: Sun, 4. Nov 12, 12:06
x3tc

Post by GlassDeviant » Sun, 22. Mar 15, 15:12

X2-Illuminatus wrote:kaylo7 posted about the problem almost two years ago. So I guess, the problem was solved on one way or the other already. ;)
Perhaps for him, but not for Pac Bane, who is having the same problem more recently. In any case, thanks for the info. regarding editing those files in a text editor, I wouldn't want to mess up a game even worse by corrupting a file.
bibo ergo sum

Post Reply

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