[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: 12430
Joined: Fri, 13. Jan 06, 17:39
x3tc

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

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: 5337
Joined: Sat, 7. Jan 06, 17: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: 12430
Joined: Fri, 13. Jan 06, 17:39
x3tc

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, 06: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: 12430
Joined: Fri, 13. Jan 06, 17:39
x3tc

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: 12430
Joined: Fri, 13. Jan 06, 17:39
x3tc

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, 20: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, 22: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: 12430
Joined: Fri, 13. Jan 06, 17:39
x3tc

Post by Gazz » Tue, 28. Oct 08, 00: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: 21
Joined: Tue, 4. Nov 08, 09:47
x4

Post by DitDog » Fri, 7. Nov 08, 23: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, 08:38
x4

Post by bbgun77 » Mon, 24. Nov 08, 09: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: 1102
Joined: Wed, 6. Nov 02, 21:31
x3tc

Post by xiriod » Wed, 3. Dec 08, 16: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: 12430
Joined: Fri, 13. Jan 06, 17:39
x3tc

Post by Gazz » Wed, 3. Dec 08, 16: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: 1102
Joined: Wed, 6. Nov 02, 21:31
x3tc

Post by xiriod » Wed, 3. Dec 08, 16: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?

Post Reply

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