[SCR - TC] Auto Aim (v3, 20.02.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

orlando100
Posts: 49
Joined: Sat, 5. Dec 09, 16:31

Post by orlando100 » Wed, 30. Dec 09, 14:55

THX very usefull
Gazz wrote: If anyone wants to butcher or rewrite it - feel free to do so.
I will do some tuning
and add some options.

Neskiairti
Posts: 36
Joined: Thu, 29. Nov 07, 18:58
x3tc

Post by Neskiairti » Sat, 26. Jun 10, 15:59

should be noted.. this addon seems to randomly cause a crash in the latest version... 2.7.1 I'm not sure about 2.7

some times when triggering auto-aim the game just locks up.
Eeep! it got me again!

User avatar
Jaga_Telesin
Posts: 435
Joined: Sat, 16. Sep 06, 22:48
x4

Post by Jaga_Telesin » Mon, 9. Aug 10, 19:03

You probably don't see a lot of feedback on this script Gazz, but I wanted to chime in and say "thank you".

I fly with a mouse/keyboard setup, and when in a ship that turns slowly (like most big ships), classic flight mode just doesn't cut it. Having to continually move the mouse to reset it on the mousepad and keep dragging to keep turning.. ugh. And using the mouse flight mode destroys shot accuracy as you know.

With your script, I can have the best of both worlds - easy turning of bigger/slower ships with a mouse, and good accuracy on forward guns. I have found my survivability has gone up in dogfights using it on an M3 fighter as well.

I would highly recommend this script to *anyone* using mouse/keyboard flight controls.

Cheers.

User avatar
Temo
Posts: 2
Joined: Fri, 10. Sep 10, 04:42
x4

Post by Temo » Mon, 13. Sep 10, 02:55

Gazz wrote:I had the same issue for a while.
A complete reinstall of TC fixed the crashes.

After that the exact same script worked without a problem.
yes it's a great script.
but it still cause random crashes.
i've tried to reinstall over itself, but still CTD. i've started to experience those crashes with me flying fast ships like Arrow.
should i remove the game and install it gain or what?

are you sure it's ok with other scripts cuz i have many of them running.

User avatar
anachron13
Posts: 144
Joined: Tue, 2. Nov 10, 23:41
x3tc

Post by anachron13 » Tue, 2. Nov 10, 23:43

Same problem here. Random crash even on a fresh install.

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

Post by Gazz » Wed, 3. Nov 10, 01:59

It doesn't do anything "illegal".
It selects targets and fires the cockpit guns. All perfectly legit and harmless script instructions.

It does work on a fast timer to be able to do it's job but it's only one script like that among possibly thousands of concurrently running scripts in your game.
I don't know any way to "fix" it because it doesn't do anything... wrong.

Somehow X3 must have an issue with hotkey scripts per se.
The NICE script, which heavily relies on a lot and fast clicking of hotkeys, also has crash issues.
Some memory allocation issue where (large) hotkey scripts are loaded into memory at a fast pace before memory of the "finished" scripts can be reallocated? Who knows?
Will the issue be fixed at this point in the life of X3? Sorry, but I think not.
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.

Sam Redstone
Posts: 189
Joined: Mon, 22. Dec 08, 16:13
xr

Post by Sam Redstone » Fri, 31. Dec 10, 11:51

OK, I know this is an old thread, but I absolutely have to post here and say THANK YOU.

I was beginning to have real trouble in XTC (the X-Tended Mod for Terran Conflict, which is now in its first public release) because ALL of the M7 class frontal weapons are now flagged as "chargeable." This means if you hold down the boresight fire key, as I am used to doing, they don't fire a nice stream of projectiles, but rather "charge up" a shot... and usually miss.

This script was recommended to me simply to solve that issue, and it did... but it has done MUCH MORE for my game than that! I use a mouse + keyboard and, like Jaga said above, this script is UTTERLY INDISPENSABLE for anyone who uses that control setup.

Previously, I could only hit an enemy if my targeting reticule was placed over the leading "pip" and that meant that I could only shoot at my enemies while basically flying a collision course toward them!

Now, with this life-changing script, I can actually steer my million-ton frigate AWAY from a collision, and also strafe and roll, all while pouring hot death right into his bridge.

Is it fair? In my opinion, it perfectly simulates having a separate crew member firing the guns while the captain is busy with the helm... in other words, completely realistic. Can you imagine if the navy required the captain of a boat to aim and fire the guns, WHILE steering the ship? Ridiculous!

In short, this is one of those things that has the feeling of "ah, this should have been in the game all along." Gazz, I know I've said it before, but you're a genius. I was ready to quit playing this game, and your tiny little auto-aim script has made me excited to play it all over again. I wish I had known about this back when you wrote it... I'd have been using it the whole time.

You're the best. Thank you.

P.S. No compatibility issues with XTC that I've found, but I'm not really knowledgeable about scripting. Hopefully it won't do any damage down the road. :) I don't think I could go back to playing without it (at least not in an M7 with frontal guns).

EDIT - one last thought. The people who said the script wasn't switching on properly, or switching on, firing a shot or two, and toggling back off... I think I know why. At least, I figured out why it was doing it to me. I was holding down the left mouse button at the same time I hit the hotkey, and the game really doesn't like that. Any key you press while the button is held down seems to rapid-fire. Try it: with the left mouse button held down, try hitting any key, like "T" to switch off the little targeting brackets while they're flashing, and you'll hear several bleeps happen very quickly (and the brackets will still be flashing, because you've just pressed "T" more than once).

So just make sure you're not pressing any other keys or buttons at the same time (i.e. not "mouse steering") and it should work fine. It does for me, anyway.

Oh, and happy new year. There, I'm done. :)
"Will you please get me a couple of things?" ~ Mahi Ma

Every Boron dies. Squiddy McSquid truly lived.

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

Post by Gazz » Fri, 31. Dec 10, 15:45

Sam Redstone wrote:Is it fair? In my opinion, it perfectly simulates having a separate crew member firing the guns while the captain is busy with the helm... in other words, completely realistic.
This script is a very simplistic fight script - minus the steering - and it uses the same firing arc as AI ships.
Every AI M7 works under the exact same conditions and they do not have to aim more carefully or anything like that.

In some ways it would be neater if the script could fire while the button is held down but the script engine does not know events like ButtonUp or ButtonDown.
You can, however, do that with macro software like Autohotkey. Pick a button and have it send one "key" on ButtonDown and a second on ButtonUp. Simple.
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.

Sam Redstone
Posts: 189
Joined: Mon, 22. Dec 08, 16:13
xr

Post by Sam Redstone » Sat, 1. Jan 11, 06:45

I could see that being more appropriate for, say, an M3, sure. But for where I am right now, in the M7 range, the way it works now is just perfect. Captain gives the order to open fire, gun crew goes to town. Captain says cease fire, they stop. Love it, love it.

I'm getting handy at quickly redirecting it at different targets, too. I can have a long spray of Tetryon Pulses heading toward a Pirate M8, then switch targets and send a shorter spray at an M3, then switch and send a spray at an M4... and by the time they start connecting with their targets, 3 or 4 pirates are already doomed. Then the rest get in range for my Meson Blasters and Alpha Flak, and it's over for that battle group.

Against a single M7, I usually come out with my shields above 90%, whereas the best I could manage previously was 50%. Against two at once, I can still keep at least a third of my shields, whereas before I was in mortal danger.

Finally, since AI-controlled M8s and M7Ms actually FIRE TORPEDOES in XTC, I've got the "missile screen" bound to a hotkey, too. So far the ECM system in XTC has been sufficient to save my hide, but I feel more comfortable having a last-ditch backup.

I just can't say enough good things about it. I had the day off work today and spent most of it doing patrols and sector defense missions in my once-hated Cerberus. Pure joy. Thanks again. :)
"Will you please get me a couple of things?" ~ Mahi Ma

Every Boron dies. Squiddy McSquid truly lived.

lordmuck
Posts: 1736
Joined: Sun, 1. Mar 09, 12:25
x4

Post by lordmuck » Mon, 3. Jan 11, 19:36

Hmmmmmm, charged weapons do not seem to take the same kind of aiming help this script does as normal auto shots (XTC- mod)

Meneliki
Posts: 28
Joined: Thu, 1. Sep 11, 00:58
x4

whoa

Post by Meneliki » Wed, 7. Sep 11, 05:10

Holy crap I just discovered boresight + autoaim.. woohoo! This game ROCKS with a joystick now!

User avatar
TrixX
Posts: 2035
Joined: Wed, 18. Aug 10, 14:28
x3tc

Re: whoa

Post by TrixX » Wed, 7. Sep 11, 07:20

Meneliki wrote:Holy crap I just discovered boresight + autoaim.. woohoo! This game ROCKS with a joystick now!
o.O I never use it with fighters :D

Only time I use it is for cap ships ;)

But then I come from FPS and Privateer 2 lineage...
"If you’re not prepared to be wrong, you’ll never come up with anything original."
Sir Ken Robinson

User avatar
Klord
Posts: 872
Joined: Wed, 1. Feb 12, 20:31
x3ap

Post by Klord » Sun, 19. Feb 12, 21:02

Wow...this is awesome...something I have lOoking for since I got my first m6.
Thank you Gazz....thanks a lot. GOod luck...

Edit - & somebody please do explain me, what is this "boresight + autoaim" ?
It might lOoks like a stupid question...but I really wanna know what it is.

Vayde
Posts: 849
Joined: Fri, 6. Feb 04, 21:02
x3tc

Post by Vayde » Sun, 19. Feb 12, 21:26

Boresight: A term used to describe the accurate alignment of avionic equipment in an airframe. Or in our case a spaceship.

Using the sight that's provided on the HUD with Gazz's autoaim script gives a much higher % of being able to hit your current target with your main guns. If you remap the hotkey it to the trigger on your joystick, when Betty announces "Target Locked On" you can really hear those pilots scream :)

I only use the repair laser portion of the 4 hotkey's as I like to navigate my menus while repairing a freighter hull from the outside :)
Still life in the old dog yet...

User avatar
Klord
Posts: 872
Joined: Wed, 1. Feb 12, 20:31
x3ap

Post by Klord » Sun, 19. Feb 12, 22:00

Im using mouse & keyboard...& even without that boresight fire, still I could hear lots of screams in a short period.

I was sick of giving the same attack target command again & again for each & every ships which comes in front of me. Specially to those khak buggies..now Im saved.

Thank you.. :)

Spy-MasterX
Posts: 3
Joined: Fri, 15. Oct 10, 10:50
x3tc

Post by Spy-MasterX » Fri, 4. May 12, 05:53

I know this is a very old thread, and what I'm about to ask is a very newbie question. But how do I set the hotkeys? I've installed the script and no idea how to use it. I only just started playing the game about a couple days ago and its the first game in its series I've ever touched, everything is all very new to me. I've been googling about everything but everything is mostly explained as if you have played a previous game. The learning curve is very steep. I only just found out that you have to use bore sight for auto aim to work, and I only just found out what using the bore sight was a couple hours ago. I;m flying the ship you first get when you pick argon patriot, an elite I think, with maxed speed, cargo and rudder upgrades with mk1 and mk2 fight software. I just realised I could mount a turret, so I bought another of whatever my elites default weapon was and put it as the turret, and set it to missile defence, but it is hopeless at defending against missiles, I have better luck turning my whole ship towards the missile and firing it down manually. But this isn't helpful when I'm trying to run away from a whole xenon army, or have a whole swarm of missiles coming for me. This script looked as if it could help, but I don't know how to use it xP (let alone any other script).

kelmenwong
Posts: 197
Joined: Sat, 17. Mar 12, 17:40
x3tc

Post by kelmenwong » Fri, 4. May 12, 08:13

open the control menu ( / key, then control)
goto last tab, at bottom section, find these auto-aim: XXX

what you primary need is the control for aa:fire
in my case, i assign ` (left key of num 1) for fire

when you targeted an enemy, press the aa:fire, when in range, it will auto-aim and fire

iirc, you need to set another "auto-aim" to be on/fully/auto, which should shown at bottom left screen, it's a vanilla feature.

Spy-MasterX
Posts: 3
Joined: Fri, 15. Oct 10, 10:50
x3tc

Post by Spy-MasterX » Fri, 4. May 12, 08:27

Thank you very much I will try this as soon as possible

Spy-MasterX
Posts: 3
Joined: Fri, 15. Oct 10, 10:50
x3tc

Post by Spy-MasterX » Fri, 4. May 12, 08:42

BTW I have had it set at auto, using the "k" button, but what does iirc mean? heh...

TouchMyNipple
Posts: 178
Joined: Wed, 15. Sep 10, 13:09
x4

Post by TouchMyNipple » Fri, 4. May 12, 10:14

Wonder if this will be considered as a necropost but still...
I wanted to have a consultation on a topic of making a reliable script to fire main guns of, say, M7 while using outside camera.
Lemme explain - i use a joystick and more than that i plan on getting a two-stick system. And i realy enjoy flying m3 and m6 while only firing boresigth. No cursorfiring and stuff. But when it comes to an M7 it happens that i have to bother more about positioning so that as many turrets as possible are engaging target. Optimal in that case is 3rd-person camera. But then it is actualy impossible to use ships main guns.
I tried to use side monitors to aim mains but that is simply a nonsence - it doesn't even highlight ships so sometimes you can't even find them.
So what i was thinking if it is possible to make auto-aim a toggle-aiming mode to use with outside camera and aim at selected taget while not firing until i actualy hit "fire" button?
Haste-whip TrixX!

Post Reply

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