Emergency Jump [TC][AP][Script]

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
DrBullwinkle
Posts: 5715
Joined: Sat, 17. Dec 11, 01:44
x3tc

Emergency Jump [TC][AP][Script]

Post by DrBullwinkle » Fri, 10. May 13, 18:44

.

Emergency Jump
Forces a more reliable jump when shield drops below the Emergency Jump threshold set in the Command Console.

[ external image ] Emergency Jump


[ external image ]

Features
  • Forces a more reliable jump when shield drops below the Emergency Jump threshold set in the Command Console.
  • Works on BigShips (M8, TM, and larger).
  • Follows the settings in the Command Console.
  • If the ship has a homebase or homesector set, then ship will jump to home rather than a random jump.
(Thanks to swatti who pestered me about this until it was hard to ignore. ;) )



Notes
  • This script is not perfect. Jumping is never entirely reliable, although this script will give your ships a better chance to survive.
  • Newly acquired ships do not automatically run Emergency Jump (not yet -- I may add that feature in the future). Save and reload to activate new ships.
  • To set a homebase for a capital ship: Assign the ship to a wing, set a homebase for the wing, then remove the ship from the wing. The homebase will remain.


Compatibility
  • Works for TC and AP. Should be compatible with most stuff.

    If you ask me whether it works with XRM, I'm going to tell you to punch yourself for asking. :)
    • (it should!)

Requirements
  • X3TC or X3AP
    BigShip (TM, M8, or larger) with Emergency Jump settings configured in Command Console.

How to Install
How to UnInstall
  • 1) UnInstall with the Plugin Manager or
    2) Delete the setup script, run the setup script in the Uninstall folder, then save your game. You can then remove all of the scripts (but leave plugin.signal.targeted.emergency.jump if you also use the Signal_Targeted script.)

    (Do not simply delete the script without doing the above first.)

How to Use
  • Set the Emergency Jump settings in the Command Console for the ship that you want to jump.
    When you acquire new ships, you must save and reload to activate the script on the new ships.

History
  • v4 (2014-03-26)
    * Will not jump to homesector (which can be incorrectly set on stolen or captured ships). (Barleyman)

    v3 (2013-05-29)
    - Reports emergency jumps to player logbook.
    - Will not jump into war zone in AP.

    v2 (2013-05-13)
    - Does not work on the playership (the ship that the player is currently flying). (swatti)

    v1 (2013-05-10)
    - First release. Please report any problems.

* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Links
.
Last edited by DrBullwinkle on Thu, 26. Nov 15, 16:55, edited 11 times in total.

User avatar
joelR
Posts: 2008
Joined: Mon, 9. Jul 07, 23:33
x3tc

Post by joelR » Fri, 10. May 13, 18:54

You sir, deserve a cookie. :thumb_up:

Nanook
Moderator (English)
Moderator (English)
Posts: 27829
Joined: Thu, 15. May 03, 20:57
x4

Re: Emergency Jump [TC][AP][Script]

Post by Nanook » Fri, 10. May 13, 20:05

DrBullwinkle wrote:...
When you acquire new ships, you must save and reload to activate the script on the new ships....
Can you not just go into the script editor and reinit the cache?

Anyway, thanks for doing this. :thumb_up: :)
Have a great idea for the current or a future game? You can post it in the [L3+] Ideas forum.

X4 is a journey, not a destination. Have fun on your travels.

swatti
Posts: 1278
Joined: Sun, 7. Dec 03, 12:03
x4

Post by swatti » Fri, 10. May 13, 20:06

You sir are my hero!

I will run some tests as soon as i get the chance.

d_ka
Posts: 254
Joined: Wed, 15. Feb 12, 18:00
x3ap

Post by d_ka » Sat, 11. May 13, 08:49

Hey, Dr.B.

I haven´t tried your improved script yet ( just found it, actually ), but i have a couple of questions:

1. CODEA escort ships ( M6 etc. ) do have their homebase set at the carrier ( the main ship ), but they also have extra homebase settings for M6 and others ( if you disable the CODEA on the carrier, the ships jump and dock at a pre defined station ). So, my question is: would your script interfere with those settings?

2. SRD ( search and resque duty/service ): recently i´ve mentioned in XRM thread that ships running that script seem to use emerjency jump settings properly. So, the second question is: would it work with your changes as well?

Thx in advance for the answers, and for your efforts :)

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

Post by DrBullwinkle » Sat, 11. May 13, 11:14

Emergency Jump will not interfere with settings, but it will work on any ship that has Emergency Jump activated in the Command Console.

So, if you have other scripts that perform their own emergency jumping, then it may be difficult to predict which script will react first. The ship might try to jump twice.

If you already have CODEA and/or SRD running on your military ships, then you may not need Emergency Jump anyway. If your goal is to defend non-military ships, then Signal_Targeted (with Emergency Jump) might be a better choice. Signal_Targeted is more pro-active about jumping (it tries to avoid combat entirely). Also, Signal_Targeted can be enabled/disabled on specific ships.

swatti
Posts: 1278
Joined: Sun, 7. Dec 03, 12:03
x4

Post by swatti » Sun, 12. May 13, 20:31

Small testing done AND IT FRIGGIN WORKS!!

If flown by player, the ship goes into an autopilot-frenzy when the threshhold is met. It just turns on autopilot the second you give it command or try to move. Also it wont E-jump if flow by player...
Minor issue, not a real problem.

When the ship starts to jump, it cuts the engines and simply holds still, this may end up being quite hazardous. Any chance to let the ship resume its command till it jumps or just keep it moving somehow. Any "follow closest" or just attack enemies would keep object-avoidance active and the ship moving. Minor issue, more of "finetuning" if possible.

Overall, AWASOME!

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

Post by DrBullwinkle » Sun, 12. May 13, 20:44

Excellent. I am glad you like it, swatti!


swatti wrote:If flown by player, the ship goes into an autopilot-frenzy when the threshhold is met.


OK. I will fix that. The player ship should not attempt to emergency jump. Thank you for the report.


When the ship starts to jump, it cuts the engines and simply holds still
Yes, that is how the jump drive works for all AI-flown ships. It is less of an issue when OOS.

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

Post by DrBullwinkle » Mon, 13. May 13, 09:49

Updated

History
-------
v3 (2013-05-29)
- Reports emergency jumps to player logbook.
- Will not jump into war zone in AP.

v2 (2013-05-13)
- Does not work on the playership (the ship that the player is currently flying). (swatti)
Last edited by DrBullwinkle on Wed, 29. May 13, 11:47, edited 1 time in total.

swatti
Posts: 1278
Joined: Sun, 7. Dec 03, 12:03
x4

Post by swatti » Wed, 29. May 13, 11:29

Heres an odd one. My frigates seem to allways jump to Ocracokes Storm... Even if in the very sector itself. Sadly its often filled with trigger-happy Yaki including their whole carrier-fleet. :D

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

Post by DrBullwinkle » Wed, 29. May 13, 11:39

swatti wrote:My frigates seem to allways jump to Ocracokes Storm... Even if in the very sector itself.
Do you mean that they jump from Oracoke's Storm to Oracoke's Storm? That would be odd. They should not do that unless they cannot find anywhere else to jump.

Where are they jumping from (if not Oracoke's Storm)?

Are you friends with the Yaki? Neutral? Foe? Ships should not emergency jump into enemy sectors.

Can you reproduce the behavior in a vanilla-ish game with just the Cheat Package and Emergency Jump? If you can, then post the save so that I can look at it.

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

Post by DrBullwinkle » Wed, 29. May 13, 11:51

@swatti: Although I made fun of you a little, I have to say that this has become one of my must-have scripts. Thanks for making me do it. ;)




Update

Emergency Jump
Emergency Jump
[ external image ]

History
-------
v3 (2013-05-29)
- Will not jump into war zone in AP.
- Reports emergency jumps to player logbook.

v2 (2013-05-13)
- Does not work on the playership (the ship that the player is currently flying). (swatti)

v1
- Original Release

adrianx
Posts: 106
Joined: Sun, 24. Apr 11, 18:45
x3tc

Re: Emergency Jump [TC][AP][Script]

Post by adrianx » Wed, 29. May 13, 16:21

DrBullwinkle wrote: [ external image ] Emergency Jump
Thanks for yet another useful script, but the link takes me to the unpacked file list rather than a specific Download page; tried in firefox and chrome. Clicking File/Download takes me to a google login page on firefox but actually downloads in Chrome (maybe my google login is remembered from before in chrome). At any rate, this seems different to, e.g. Drone Carrier Software, which takes me to a Downloads page.

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

Post by DrBullwinkle » Wed, 29. May 13, 16:35

Yep.

Google Code is closing; at least the downloads section is. So we need to find a new place to host files (*sigh*).

I tried Google Drive here. As you observed, the user should use the File menu to download the file. I do not know why you would have to log in. The file should be public.

However, Google Drive does not tell me how many downloads there have been, which helps me to track whether people are liking/using a version (I get feedback from about 0.1% of players. Really.). So I may switch to x1tp.com for my next upload.

adrianx
Posts: 106
Joined: Sun, 24. Apr 11, 18:45
x3tc

Post by adrianx » Wed, 29. May 13, 16:55

DrBullwinkle wrote: Google Code is closing; at least the downloads section is. So we need to find a new place to host files (*sigh*).
Well, there are a few I suppose although github springs to mind if you want revision control as well, although, actually I'm not sure about a specific download page (haven't used it enough to know). It is actually a shame there is no central repository, like e.g. tesnexus. Trying to find older scripts, at least for Reunion, has in some cases become impossible. The files have just disappeared from the net.

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

Post by DrBullwinkle » Wed, 29. May 13, 17:02

Yes, it is a chronic problem which has led to hundreds of stale links on this forum.

I believe that github has the same problem as Google Code (they have closed their download section).

x1tp.com is (currently) the closest thing to an X download site.
Last edited by DrBullwinkle on Tue, 3. Dec 13, 22:35, edited 1 time in total.

swatti
Posts: 1278
Joined: Sun, 7. Dec 03, 12:03
x4

Post by swatti » Thu, 30. May 13, 20:16

Could it be that the ship tries to jump to Ocracokes Storm because it was "liberated" from the Yaki. Yaki do hate me and i do give em equal love back and have built myself a VERY efficant frigate-pack from ships liberated from em.

Nowdays i use a PHQ as a homebase so they should jump there automaticly(?) but when no home was set they jumped allways to O-storm no matter where they were. They jumped there even if they were allready there... Cant remember if they re-jumped if attacked in O-storm.

If you want to re-create it, cap a Kariudo, arm it and send it somewhere to get hurt OR just cheat a yaki-one and turn the ownership over to you... Mine were legit captures.

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

Post by DrBullwinkle » Thu, 30. May 13, 20:25

If "liberated" means that you used a script to change the ownership of Oracoke's Storm, then that might explain why ships think it is an OK place to jump. Why they always jump there is more mysterious.

Are you saying that all ships that jump to Oracoke's Storm have a homebase set? Where is the homebase?

swatti
Posts: 1278
Joined: Sun, 7. Dec 03, 12:03
x4

Post by swatti » Thu, 30. May 13, 20:29

O-storm is still Yaki sector. The ships were stolen in there. Maybe something lingers in the ships...

They jumped there when the DID NOT have a home-base set. Gotta test how they function now when the DO have home set. Only the Kariudos jump to O-storm, rest jump elsewhere as normal.

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

Post by DrBullwinkle » Thu, 30. May 13, 20:32

swatti wrote: Only the Kariudos jump to O-storm, rest jump elsewhere as normal.
Aha.

Try Super Script Killer (SSK) (for captured/boarded ships) on them and let me know if that fixes the problem.

Post Reply

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