[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: Scripting / Modding Moderators, Moderators for English X Forum

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

Post by orlando100 » Wed, 30. Dec 09, 15: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: 35
Joined: Thu, 29. Nov 07, 19: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: 430
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

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: Wed, 3. Nov 10, 00:41
x3tc

Post by anachron13 » Wed, 3. Nov 10, 00:43

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

User avatar
Gazz
Posts: 12430
Joined: Fri, 13. Jan 06, 17:39
x3tc

Post by Gazz » Wed, 3. Nov 10, 02: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, 17:13
xr

Post by Sam Redstone » Fri, 31. Dec 10, 12: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: 12430
Joined: Fri, 13. Jan 06, 17:39
x3tc

Post by Gazz » Fri, 31. Dec 10, 16: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, 17:13
xr

Post by Sam Redstone » Sat, 1. Jan 11, 07: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: 1722
Joined: Sun, 1. Mar 09, 13:25
x4

Post by lordmuck » Mon, 3. Jan 11, 20: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: 27
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: 2022
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: 375
Joined: Wed, 1. Feb 12, 21:31
x3ap

Post by Klord » Sun, 19. Feb 12, 22: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.

User avatar
Vayde
Posts: 843
Joined: Fri, 6. Feb 04, 22:02
x3tc

Post by Vayde » Sun, 19. Feb 12, 22: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: 375
Joined: Wed, 1. Feb 12, 21:31
x3ap

Post by Klord » Sun, 19. Feb 12, 23: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.. :)

Post Reply

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