[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

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

[SCR - TC] Auto Aim (v3, 20.02.09)

Post by Gazz » Fri, 17. Oct 08, 02:31

English / Deutsch

TC has been improved in many places but there is one... design decision... that I'd rather live without. =)

In the cursor follow flight mode, Auto Aim is practically disabled.
If you don't hit the perfect pixel on that M5 that is circling you, you're SOL.

In classic mode (Boresight fire + Auto Aim on) I can annihilate the same M5 within short notice. Wonder why.

So I just combined those 2 flight / aim modes and I'm a happy pilot again. =)

  • This basically turns your cockpit lasers into a semi-automatic turret.
    Even with terrible FPS you still have a chance to hit something.
  • Fight Command Software Mk1 required.
  • Fight Command Software Mk2 required.
  • This script installs 4 Hotkeys.
  • Hotkey Auto Aim : Fire
    A targeted enemy is attacked whenever it enters the area in front of the ship, where lasers in cursor follow mode can normally fire.

    If autofire is currently enabled it is turned off and a confirmation ding sound played.

    Changing the target also disables Autofire.

    This is exactly the same aiming mode that your ship uses with a vanilla X3 combat script.
    It is not a cheat.
  • Hotkey Auto Aim : Missiles
    The Missile Defense Mode automatically uses the ship's main guns to engage missiles that are attacking the ship.

    Quite a few ships use swarm missiles in TC and an M4 without turrets has little hope of surviving that barrage.
    Trying to manually target and shoot all those missiles with the mouse is simply hopeless.

    The main guns fire in gatling mode increasing the rate of fire and conserving laser energy especially for heavy/slow lasers like HEPT.
  • Hotkey Auto Aim : Target
    Find next enemy ship in scanner range.
    Targets in front of the ship and in laser range are preferred.

    If a target is found it is immediately attacked. (Auto Aim : Fire enabled)

    If you are currently in your space suit this hotkey toggles between these targets instead:
    • closest claimable ship
    • closest own ship
    • second closest own ship
  • Hotkey Auto Aim : Repair
    Repair / Attack Target.
    Using this feature, all ships can be attacked - including neutral or own ships.

    This feature is highly convenient if you eject to repair your (or one of your capped ships) with the repair laser.
    Auto fire is - and stays - enabled until the ship is fully repaired.

    You can surely find more interesting things to do than holding down the fire button for 5 minutes....
    Check your property list, rule your fledgling empire...
  • If an autofire mode (Fire, Missiles) is currently enabled, any of the hotkeys disables it and a confirmation ding sound is played.

[ external image ] Download (ZIP)
Last edited by Gazz on Wed, 4. Aug 10, 14:06, edited 10 times in total.
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.

eladan
Posts: 7168
Joined: Sat, 7. Jan 06, 16:01
x4

Post by eladan » Fri, 17. Oct 08, 03:33

@Gazz - there will be an X3:TC forum, so this will be moved soon. Probably best to hold off on releasing any more (if you have 'em :wink:) just until the forum is open to avoid confusion.

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

Post by Gazz » Fri, 17. Oct 08, 12:43

Nah, no worries. I'm not really scripting anything, yet.
This was more of a reflex when I couldn't get the hang of the new controls.

Why complain when I can change it? =P
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.

ViceGrips
Posts: 17
Joined: Sun, 1. Feb 04, 05:57
x4

Possible issue

Post by ViceGrips » Sat, 25. Oct 08, 05:33

I'm not sure if I'm the only one but everytime I run this script my game CTD. I have all of your other scripts, cycrows and 1 of LVs. I'm currently having no problems with any of the others. Just curious if you have any suggestions. Thanks

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

Post by Gazz » Sat, 25. Oct 08, 08:51

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.
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.

Grimm Spector
Posts: 137
Joined: Thu, 23. Oct 08, 17:06
x3tc

Post by Grimm Spector » Sat, 25. Oct 08, 19:29

is there a way you could make it so it doesn't fire automatically, but simply attaches the "mouse fire location" perfectly to the lead indicator and let's you mouse fly normally and shoot at your own discretion?

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

Post by Gazz » Sat, 25. Oct 08, 20:42

It does exactly that right now. You can start/stop fire whenever.
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.

PunkiBastardo
Posts: 4
Joined: Sun, 23. Mar 08, 19:29

Post by PunkiBastardo » Sat, 25. Oct 08, 21:47

Gazz wrote:It does exactly that right now. You can start/stop fire whenever.
Yes it does, but i think he's trying to say that it could remain firing as long as you keep the button pressed, as if it were the fire button but not having to aim at the target.
I had thought of this too, the actual fps degradation has led me to rely heavily on this script for combat, as it is impossible to aim at about 2-5fps, and the problem is that at that point the game has a hard time registering the keys pressed and this makes it really hard to get it to recognaise any more than 2 clicks. I mean, for example I usually have to click 5 or 6 times for it to register the 4click "attack any target" command, and that leads to a couple of mins of me just standing still trying to get the combo right. Thank god you added that deactivation sound, as it is really helpfull at those times where you really don't know at what point of the autoaim modes you are .
I know you didn't want it to have lots of hotkeys, but perhaps there could be an extra hotkey that made autoaim work as long as you kept it pressed, I wish i could do this myself but I'm afraid I don't have the skills.

Oh and btw awesome scripts Gazz, I use all of em.

Edit
Ok I just thought of this, perhaps the same hotkey already in use could have this functionality when kept pressed, I don't know if it could be done, but it's just an idea... Thanks for reading!

Grimm Spector
Posts: 137
Joined: Thu, 23. Oct 08, 17:06
x3tc

Post by Grimm Spector » Mon, 27. Oct 08, 21:38

yes I mean what PunkiBastardo said, I don't want it to fire ALL THE TIME on it's own when it's toggled on, maybe another thought would be a script that can when toggled on keeps the mouse cursor within the frontal "mouse fire" box area where the guns can actually angle to fire at, so that as I'm moving I must get the enemies lead indicator within that box under my mouse cursor before I know I can fire, forcing me to get them within the mouse fire angle range...?

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

Post by Gazz » Mon, 27. Oct 08, 23:12

PunkiBastardo wrote:Yes it does, but i think he's trying to say that it could remain firing as long as you keep the button pressed, as if it were the fire button but not having to aim at the target.
A hotkey is executed once the key is pressed down.
X3 has no detectable event for a button remaining pressed.
The start/stop system is a workaround but the closest I could get to the "real thing".

the actual fps degradation has led me to rely heavily on this script for combat, as it is impossible to aim at about 2-5fps, and the problem is that at that point the game has a hard time registering the keys pressed and this makes it really hard to get it to recognaise any more than 2 clicks. I mean, for example I usually have to click 5 or 6 times for it to register the 4click "attack any target" command
I never anticipated such low FPS.

There are 2 possible solutions.
- more hotkeys for the different features
- longer keypress delay to "chain" clicks.
Currently it's 400ms but that's just an arbitrarily picked number.
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.

DitDog
Posts: 32
Joined: Tue, 4. Nov 08, 08:47
x4

Post by DitDog » Fri, 7. Nov 08, 22:38

i cant seem to get your script to run...i am new to this kinda thing...and was woundering if you could explain where and what to do, to get this thing running.

i already have the script editor running..so no need to tell me about name change n such...just what to do to get your script working, and the hotkey n such setup...please

Regards
DitDog

bbgun77
Posts: 87
Joined: Tue, 18. Nov 08, 07:38
x4

Post by bbgun77 » Mon, 24. Nov 08, 08:57

Some strange happend, when after I use this script period of time, opens fire change to "Burst fire" about 1/3 fire rat of nomal.If I change ship that is nomal.Back this ship,question has hapended.What wrong did i do?

xiriod
Posts: 1131
Joined: Wed, 6. Nov 02, 20:31
x3tc

Post by xiriod » Wed, 3. Dec 08, 15:01

This script works, some times. I set the hotkey to one of my joystick buttons, and some times it works. But most of the time it does not. Anyone else have this?

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

Post by Gazz » Wed, 3. Dec 08, 15:19

Well, I pretty much abandoned this script because the cursor follow flight mode hmm... is there a polite version of "sucks"?

If anyone wants to butcher or rewrite it - feel free to do so.
Technically it's just a very very simple turret script.

Personally I only use it for targeting and for the repair laser autofire.
I completely switched to classic flight controls and they work beautifully.
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.

xiriod
Posts: 1131
Joined: Wed, 6. Nov 02, 20:31
x3tc

Post by xiriod » Wed, 3. Dec 08, 15:29

Ok. Since it has a hotkey and everything, is there any hocus pocus to remove it? Or do I just simply remove the hotkey reference and delete the files?

tontonfred
Posts: 126
Joined: Mon, 1. Jan 07, 23:43
x3

Post by tontonfred » Wed, 3. Dec 08, 19:21

Gazz wrote:is there a polite version of "sucks"?
I think the words you are looking for are "does not quite perform to my tastes" :P

Anyway, got a similar problem as xiriod : if I use hotkey 1x, most often it won't shoot (I tried toggling several times, doesn't do anything); if I then use hotkey 2x, it will correctly target and then shoot. Not a big deal, as I bound the hotkey to RMB, I just double-right-click with the enemy in front of me, and it works that way.

BTW, thank you thank you thank you for the auto-repairlaser, I was tired of sticking a pin in my mouse to hold down the right mouse button !

Fred

Denamic
Posts: 9
Joined: Tue, 2. Dec 08, 21:45
x4

Post by Denamic » Thu, 4. Dec 08, 19:32

All I really want is to be able to shoot at M5 ships and actually hit once in a while.
Doing that in, say, a katana this close to impossible.
Of course, the M6 Katana has issues hitting any fighter, due to its hueg space between its frontal guns.
Well, the MARS turret script takes care of M5 ships pretty well, but it's still very hard to hit fighters in general with a Katana.
It's very frustrating when you're like 100m away from a xenon L, shooting at it with all your might, but the width of the ship and the lack of auto aim makes you literally shoot around it. All while the other 25 xenon ships in the area are eating away at your shields, fast. Missing at point blank does not make me a happy person.
Violence only works if you use it.

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

Post by Gazz » Thu, 4. Dec 08, 19:35

Have you tried the classic flight mode with auto aim or does that not work, either?


It works extremely well for me and makes this script's original function practically obsolete. (not to mention that it was only a crude workaround to begin with =)
Last edited by Gazz on Thu, 4. Dec 08, 20:25, edited 1 time in total.
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.

Denamic
Posts: 9
Joined: Tue, 2. Dec 08, 21:45
x4

Post by Denamic » Thu, 4. Dec 08, 20:17

Hadn't thought of that.
I'll give it a go.

Edit: Never mind! I found a way to make it work. Just keep the bore-sight on the reticle thing and press the 'fire through bore-sight' key (default ctrl), and the auto-aim will shoot for you (and actually hit (!!))! Feels good to hit things.
Violence only works if you use it.

ragamer
Posts: 523
Joined: Wed, 6. Nov 02, 20:31
x4

Post by ragamer » Fri, 5. Dec 08, 13:12

Erm... Even with Advanced Controls up you can make your lasers converge.

It's the Fire on Reticule key, default mapped to CTRL. So you can use CTRL to focus fire on those pesky M5 and at the same time using Mouse Firing to shoot at the capitals with a wider angle while you are free to move.

Post Reply

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