[SCRIPT] Turret on/off Hotkey V1 (3.16.07)

The place to discuss scripting and game modifications for X³: Reunion.

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

User avatar
Klyith
Posts: 594
Joined: Fri, 6. Jan 06, 01:38
x3

[SCRIPT] Turret on/off Hotkey V1 (3.16.07)

Post by Klyith » Tue, 16. Jan 07, 03:48

Turret On / Off Toggle Hotkey :: v1.0
Download: Zip file :: SPK package

The problem:
"Boron no fight! We give-- BOOM!"
The solution:
A hotkey to quickly turn off all turrets. It won't prevent every loss of bail-outs (there's only so much you can do when 20 hept bolts are already in flight vs an M5), but it may save some ships, and be useful in other cases as well.


This hotkey will toggle your turrets off and on. Each turret's active command is individually stored when it is turned off, so when turned on the exact scheme is restarted. I.E. if you have your ship set to front attack target, left & right protect ship, and rear missile defense, after hitting the hotkey twice the same scripts will be in place.

Your ship computer gives audio feedback for on and off switching:
"Targeting no aim" = Turrets turned off.
"Weapon system ready" = Turrets turned on.
and for possible errors (see readme).

The memory system uses local variables on each ship, so changing from one ship to another is not a problem.
I personally like using the caps lock key -- the light gives a nice on/off feel.

:: Version history ::
0.9 - initial release
1.0 - support for Xai turret commands & Fud adv missile defense, text file and uninstall script added


- - -
This script brought to you by Wild Turkey 101.
Last edited by Klyith on Sat, 17. Mar 07, 18:40, edited 2 times in total.

Cedrk
Posts: 79
Joined: Sat, 8. Jul 06, 01:59
x3tc

Post by Cedrk » Tue, 16. Jan 07, 08:14

This idea has been around on the forum for some time but no one had written a script to do it until now, great work!.... downloading now
I personally like using the caps lock key -- the light gives a nice on/off feel.
or you could use the Num lock key or scroll lock.

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

Post by Gazz » Fri, 16. Mar 07, 17:39

This has the nice side effect that your turrets are forced to recalculate the target and don't keep firing at some M5 at 2km. =)

Beautifully simple!

PS: do you have to turn the turrets back on before you leave the ship or is that done automatically?
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.

John Buford
Posts: 164
Joined: Sat, 3. Jan 04, 20:11
x2

Post by John Buford » Fri, 16. Mar 07, 19:34

Is this compatible with the xaicorp turrent commands?

reinhart_menken
Posts: 229
Joined: Sat, 27. Jan 07, 05:23

Post by reinhart_menken » Fri, 16. Mar 07, 22:50

Hello again ;)

Must say this is a great script. I have been having this same problem (more like annoyance) and always had to go through a couple steps to turn off my turret. In the end I just always kept my turrets off unless I get into a very tight situation (makes me think my turret is rather useless).

User avatar
Klyith
Posts: 594
Joined: Fri, 6. Jan 06, 01:38
x3

Post by Klyith » Sat, 17. Mar 07, 00:33

John Buford wrote:Is this compatible with the xaicorp turrent commands?
It is... NOW. :D Version 1.0 released!
I've actually had added support for both Xai Turret Commands and Fud's Adv Missile Defense for a while, but I never bothered to do a public update. The topic sank like a rock the first time around so I figured nobody was using it. Nice to see I was wrong. 8)

So, the update: HotTurret interacts with Xai's turret scripts just like the standard ones, on & off. However, it ignores Fud's Advanced Missile Defense script (which shoots missiles only). So if you use that, you can turn off any offensive turrets and not have your defensive script interrupted.

Also added: an uninstall script, which you can run manually from the script editor to remove the hotkey.
Gazz wrote:PS: do you have to turn the turrets back on before you leave the ship or is that done automatically?
Yes, if you want the turrets on. It does store the turret settings locally to the ship though. So if you turn off the turrets on a ship, switch to another, and then swap back to the original ship, hitting the hotkey will turn them on again.


Public vote time: would people rather have the turrets auto-resume if you swap to another ship?

User avatar
jocan2003
Posts: 629
Joined: Tue, 6. Mar 07, 17:48
x4

Post by jocan2003 » Sat, 17. Mar 07, 06:15

great!! ive been looking for something like this!!!! mucchhooo thanks man :)

for the swap if leave ship would be good, as it would offer protection if we forget, and it would turn back on in case we want to stay in the other ship so we dont have to fly back on the other ship to turn it back on or redo all the turret setting from command window or perhaps just add a command in the ship addition command? so we can turn it off and on from distance

ORIOLE
Posts: 324
Joined: Wed, 20. Oct 04, 10:34
x2

Post by ORIOLE » Sat, 17. Mar 07, 10:27

Great script that adds to the enjoyment of X3, well done :!:

Could you please pack it into a .spk package :?:

:)

chilipalmer
Posts: 576
Joined: Wed, 28. Dec 05, 14:09
x3

Post by chilipalmer » Sat, 17. Mar 07, 10:39

nice
will try this out

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

Post by Gazz » Sat, 17. Mar 07, 11:28

Klyith wrote:Public vote time: would people rather have the turrets auto-resume if you swap to another ship?
I did this with another script. =)
My "Homebase Rememberance Aid" sets the homebase to what it was before I entered the ship and it also restores the turret setting now.
(and other stuff)

Alas, I had to change YOUR script or that, too, because you hardcoded it to [PLAYERSHIP] so it would not run on any other ship.
Changing that to a variable wasnt much of a feat, though.

Code: Select all

002   $Ship = [THIS]
003   skip if $Ship
004    $Ship = [PLAYERSHIP]
That way I can run the script on any ship. =)
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.

chilipalmer
Posts: 576
Joined: Wed, 28. Dec 05, 14:09
x3

Post by chilipalmer » Sat, 17. Mar 07, 14:09

is this universal set once and forget or do you have to set it up for every ship you get in ?

John Buford
Posts: 164
Joined: Sat, 3. Jan 04, 20:11
x2

Post by John Buford » Sat, 17. Mar 07, 14:12

Methinks I am going to test this, sounds like a very useful tool.

User avatar
Klyith
Posts: 594
Joined: Fri, 6. Jan 06, 01:38
x3

Post by Klyith » Sat, 17. Mar 07, 18:47

ORIOLE wrote:Could you please pack it into a .spk package :?:
Ask and ye shall receive ;)

chilipalmer wrote:is this universal set once and forget or do you have to set it up for every ship you get in ?
Not sure exactly how you mean that. The hotkey itself, you need to set a key in the control setup screen, but that's just once & universal when done. The action of using it is just "press the key = turrets off" and "press the key again = turrets on". It works in whatever ship you're piloting at the time.

chilipalmer
Posts: 576
Joined: Wed, 28. Dec 05, 14:09
x3

Post by chilipalmer » Sat, 17. Mar 07, 19:22

thanks for the reply i was not sure if it had to be setup for every ship individually

John Buford
Posts: 164
Joined: Sat, 3. Jan 04, 20:11
x2

Post by John Buford » Sat, 17. Mar 07, 20:44

Works like a charm. Maybe you could add a little beep before the "weapons system ready" voice of Betty else you get the impression of a full sentence "targetting no aim weapons systems ready", or just a beep/double beep/triple beep as in prolongued fights the continous chatter of Betty begins to tear down my sanity (just my preference maybe some other could post here about their experience)

Kilrathi Avenger
Posts: 275
Joined: Fri, 6. Feb 04, 20:16
x3tc

Post by Kilrathi Avenger » Sat, 17. Mar 07, 20:57

Not getting any response from the Spk download link :?
"As I slide down the banister of life;
my job is just another splinter in the bum"

chilipalmer
Posts: 576
Joined: Wed, 28. Dec 05, 14:09
x3

Post by chilipalmer » Sat, 17. Mar 07, 23:41

nope me neither its dead

User avatar
Klyith
Posts: 594
Joined: Fri, 6. Jan 06, 01:38
x3

Post by Klyith » Sat, 17. Mar 07, 23:45

John Buford wrote:or just a beep/double beep/triple beep as in prolongued fights the continous chatter of Betty begins to tear down my sanity
This would be an easy change to for anyone to make, even a non scripter. Just substitute a "play sound #" for the speak text instructions on line 57-58 & 103-104.

Just a beep isn't very informative; I liked the speech because it was unambiguous about which state the turrets were in. But I also hadn't anticipated that people were going to use this as a crude target-selection method. Once or twice in a fight is ok, but I agree if you are toggling your turrets on and off all the time it would get annoying. I dearly wish egosoft had made betty with more one word speech or short phrases. It would be much easier to so scripts like this if she could just say "turret on".

User avatar
Klyith
Posts: 594
Joined: Fri, 6. Jan 06, 01:38
x3

Post by Klyith » Sat, 17. Mar 07, 23:49

Not getting any response from the Spk download link
nope me neither its dead
Yep, the whole damn home.earthlink.net domain seems to be down... I need to dump this earthlink hosting, they're not even my ISP anymore but I paid $5 so that I could keep all my junk there and not have to deal with moving it...

Google pages ahoy! Temp links: spk zip

User avatar
Red Spot
Posts: 3461
Joined: Fri, 4. Feb 05, 13:44
x3

Post by Red Spot » Sat, 17. Mar 07, 23:53

go geocities, they are pretty good imo for a free host ...

(http://www.geocities.com)



G

Post Reply

Return to “X³: Reunion - Scripts and Modding”