[SCRIPT]-(Updated 15-08-09)-Intelligent Targeting System v1.50

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

WindsOfBoreas
Posts: 283
Joined: Sun, 3. Aug 08, 20:30

[SCRIPT]-(Updated 15-08-09)-Intelligent Targeting System v1.50

Post by WindsOfBoreas » Thu, 27. Nov 08, 11:26

Intelligent Targeting System

IF YOU DOWNLOADED VERSION 1.50 BEFORE AUGUST 15, 2009 AT 1400 CDT (UTC - 5), DOWNLOAD THE FILE AGAIN

Download

FileFront Downloads
Changelog
  • Version 1.50
  • Reworked Category/Target hotkey scripts.
  • Added Saved Targets Menu.
  • Added Saved Targets Multi-Press Hotkey.

    Version 1.40
  • Reworked Entire text file system. Intelligent Targeting System is now available for localization.
  • Reworked Every script. Cleaned up the variable names.
  • Streamlined Entire plugin. Now uses less memory.
  • Fixed Searches not changing category if a search type was selected in the Search Menu.
  • Fixed Auto-Target script starting more than once under special circumstances.
  • Fixed Player-owned ships being subject to gravidar range limitation.
  • Added Select Non-Scanned function.

    Version 1.30
  • Fixed Global variable array not saving properly.
  • Fixed Corporation Strings for the Search String Menu.
  • Added Customizable Quad-Press of the Menu hotkey.

    Version 1.20
  • Fixed String Search interfering with Asteroids, Flying Wares, and Gates.
  • Added Double-Press and Triple-Press quick key function to the Menu hotkey.
  • Added Configuration Options
    • Sort Array Option (Alphabetically, Distance to All Objects, Distance to Enemies)
    • Customizable Double-Press of the Menu hotkey.
    • Customizable Triple-Press of the Menu hotkey.
  • Added Next Category hotkey.
  • Added Previous Category hotkey.

    Version 1.10
  • Fixed Class and Race menus registering unknown objects.
  • Reworked String Menu and Append System.
  • Reworked No Aim Next and Previous hotkey recognition.
  • Added Auto-Targeting of Enemies and Auto-Target Menu.
  • Added Search for Enemy Ships Option.
  • Added Search Mineral Menu
  • Added Search Ware Menu
  • Added Search Amount/Yield Menu
  • Added Search for Asteroids with Collectable Rocks Only Option.

What this Does...

There are seven (7) hotkeys added:
  • ITS: Next Target
  • ITS: Previous Target
  • ITS: Next Category
  • ITS: Previous Category
  • ITS: Search Menu
    • This hotkey also has double-press, triple-press, and quad-press functions.
  • ITS: Saved Menu
  • ITS: Saved Target
    • This hotkey has up to ten multi-presses.
The Intelligent Targeting System (ITS) is a system which targets objects based on context. When you press either the Next or the Previous hotkeys, the ITS will switch your target to the next or previous object of its kind. This is broken into five main groups.
  • Known Asteroids
  • Known Gates
  • Ships within gravidar distance.
    • Friendly or Neutral
    • Enemy
    • Owned
  • Known Stations
    • Friendly or Neutral
    • Enemy
    • Owned
  • Flying Wares within gravidar distance
The ITS also comes with a special search menu which allows you to have search expressions at your fingertips with the Search Menu hotkey. This menu includes Object Class, Distance to Object, Object Race, Yield of Asteroid, Amount of Flying Ware, Ware of Flying Ware, and even allows for string expressions for the object names.

In Version 1.50, Saved Targets was added to ITS. With this, you can save an unlimited amount of ships or stations that you can recall through the Saved Menu hotkey. As well, the Saved Targets hotkey takes up to ten presses, each having its own saved target. This hotkey must be configured through the Saved Menu.

How to Use...

To use the Intelligent Targeting System (ITS), simply press the Next Target or Previous Target hotkey. If something is currently targeted, this will switch your target to another object of similar type. If you have no aim, it will cycle through the categories until one is found; this is completely affected by you Search Menu choices.

Pressing the Next Category or Previous Category hotkeys will switch between the different object classes. Example: if you have an enemy ship selected and you press the Previous Category hotkey, if there are normal ships in the sector, the ITS will switch to Friendly or Neutral ships. Pressing the Next Category hotkey would switch it to player ships, if there were any in the sector.

To customize the ITS somewhat, open the Configuration Menu.
  • The option Select Array Sort Type will change the way the ITS selects the next and previous targets. Setting this to Distance: All will sort the array so that with each press of the hotkey, you will select an object that is either closer or farther away. Setting this to Distance: Enemies will do the same but only for enemy ships and stations. The default is Alphabetically.
  • The Menu Key Double-Press menu allows you quick access to one of the Search Menu's functions. Once you have something selected, simply double-press the Menu hotkey to access the function.
  • The Menu Key Triple-Press menu performs the same as with the double-press menu. The only difference is that you must triple-press the Menu key to access the function.
  • The Menu Key Quad-Press menu performs the same as the double and triple-press menu. The only difference is that you must quad-press the Menu key to access the function.
To use the Search Menu, press the Search Menu hotkey to bring up the menu.
  • Using the Select Distance menu is simple. Choose to input a new distance, but be warned, you cannot search farther than your scanner range. Choose the No Distance option to return to a broader search.
  • The Select Non-Scanned menu allows you to narrow the search down to non-scanned objects. Unfortunately, this function is currently limited to Asteroids. The code is already in place if a patch gives the ability to find non-scanned ships.
  • The Auto-Target menu will select the routine which the computer will use to select the next enemy (either after one is destroyed or you lose aim). This can be by class or race (if you have selected one) or by the overall power of an enemy or simply by the closest proximity of an enemy. Choose No Auto-Target to return to a broader search.
  • The Search Enemies Only (On/Off) option, if turned on, will only cycle through enemy ships if you do not have any aim.
  • If you have a ship selected, the Select Class menu will have the ship classes; likewise, if you have a station targeted, station classes will be in that menu. Choosing a class will narrow the ITS search down further to only that class. Choose the No Class option to return to a broader search.
  • Selecting race with the Select Race menu is just as easy. Select a race and the search will be limited to objects owned by that race alone. Choose the No Race option to return to a broader search.
  • Use the Select String menu to narrow down the names of objects that can be targeted. You may use several strings here for greater accuracy. For instance, using Terracorp and Transporter will narrow down the search to bio, energy, and mineral transporters owned by Terracorp in the sector.
    • The Append to Search Array: option will merely add the selected string to the end of the array.
    • The Replace in Search Array: option will allow you to replace one of the words already in the array with the new word.
    • The Replace all Search Array: option will replace the entire search string array with the new word.
    You may also type your own string and save it for later usage. Choose No String to return to a broader search.
  • The Search Collectable Only (On/Off) option will only target asteroids which have collectable rocks.
  • The Select Mineral menu will allow you to select only asteroids of that mineral to target. Choose No Mineral to return to a broader search.
  • Using the Select Ware menu will allow you to only target flying wares of the type selected. Choose No Ware to return to a broader search.
  • The Select Amount menu allows you to choose the minimum yield for asteroids or the minimum amount of a ware within a flying crate. Choose No Amount to return to a broader search.
To use the Saved Targets Menu, press the Saved Menu hotkey to bring up the menu.
  • If you have a ship or station selected that is not already saved, the option Save Current Target will be available. With this, your target is saved to its appropriate array.
  • The option Save New Target will bring up a user input which will let you select a ship or station. If the selected object is already saved, the action will be canceled.
  • The option Edit Saved Targets will take you to a sub-menu which allows you to remove all saved targets or individual targets from their respective arrays.
  • Multi-Press Menu will take you to a sub-menu which allows you to set up the multi-presses.
  • If you have targets already saved, the targets will be listed under the Saved Ships or Saved Stations headings. Selecting one of these options will target the object if it is in open space and your sector. If it is docked, in a different sector, or no longer exists, the parentheses will say so.

To use the Multi-Press Menu, select its option in the Saved Targets Menu. This sub-menu will show you the ten multi-presses. Select one of the options to take you to the Assign Press Menu.
  • The option Assign Press ## will always be available. It will be the only option if nothing is currently assigned to the press slot. Pressing this will take to you a list of your saved targets. If something is already assigned to the slot, it will ask for confirmation to overwrite.
  • The option Move Press ## will allow you to move the key press to another slot. If something is already assigned to the slot you choose, it will ask for confirmation to overwrite.
  • Remove Press ## will remove the key press.
Enjoy,
The North Wind
Last edited by WindsOfBoreas on Sat, 15. Aug 09, 20:49, edited 15 times in total.
"Humanity has the stars in its future, and that future is too important to be lost under the burden of juvenile folly and ignorant superstition." - Isaac Asimov

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

Post by Kilrathi Avenger » Thu, 27. Nov 08, 11:37

Download not available
"As I slide down the banister of life;
my job is just another splinter in the bum"

WindsOfBoreas
Posts: 283
Joined: Sun, 3. Aug 08, 20:30

Post by WindsOfBoreas » Thu, 27. Nov 08, 11:39

Both work fine for me. What browser are you using? If Firefox, do you have the NoScript extension and do you have FileFront enabled?
"Humanity has the stars in its future, and that future is too important to be lost under the burden of juvenile folly and ignorant superstition." - Isaac Asimov

Coruskane
Posts: 849
Joined: Fri, 13. Jun 08, 13:14
x4

Post by Coruskane » Thu, 27. Nov 08, 13:41

what the default system should have been all along. I can't wait to try,

nice one

WindsOfBoreas
Posts: 283
Joined: Sun, 3. Aug 08, 20:30

Post by WindsOfBoreas » Fri, 28. Nov 08, 04:02

Has anyone had any problems with the script? Any suggestions for improvements?
"Humanity has the stars in its future, and that future is too important to be lost under the burden of juvenile folly and ignorant superstition." - Isaac Asimov

WindsOfBoreas
Posts: 283
Joined: Sun, 3. Aug 08, 20:30

Post by WindsOfBoreas » Sat, 29. Nov 08, 11:59

Updated to version 1.10
  • Version 1.10
  • Fixed Class and Race menus registering unknown objects.
  • Reworked String Menu and Append System.
  • Reworked No Aim Next and Previous hotkey recognition.
  • Added Auto-Targeting of Enemies and Auto-Target Menu.
  • Added Search for Enemy Ships Option.
  • Added Search Mineral Menu
  • Added Search Ware Menu
  • Added Search Amount/Yield Menu
  • Added Search for Asteroids with Collectable Rocks Only Option.
"Humanity has the stars in its future, and that future is too important to be lost under the burden of juvenile folly and ignorant superstition." - Isaac Asimov

Thrandisher
Posts: 357
Joined: Sun, 1. Jul 07, 03:33
x4

Post by Thrandisher » Mon, 1. Dec 08, 05:45

Hmm, i seem to target asteroids when there no enemy's around and i have it set to enemy's only. There a way to get it to not target them at all?

WindsOfBoreas
Posts: 283
Joined: Sun, 3. Aug 08, 20:30

Post by WindsOfBoreas » Mon, 1. Dec 08, 06:47

The way that ITS is set up is that it searches for categories when you have nothing currently targeted. The cycle goes like this.
  1. Friendly or Neutral Ships
  2. Enemy Ships
  3. Stations
  4. Flying Wares
  5. Asteroids
  6. Gates
So, if there are no friendly ships in an area, it'll switch to enemy ships. If there are no ships at all, it'll switch to stations, and so on.

That list, however, is if you have no search options turned on.

So in your case, if you have "Search Enemies Only" option turned on, the list starts at the Enemy Ships index. Even if there are friendly or neutral ships in the area, the hotkeys will not target them until you turn off the enemies only option.

The list is also the priority for search options; if you have selected a mineral type for an asteroid and you have nothing currently targeted, you will skip to targeting Asteroids. Or if you have a station class selected, it'll switch to targeting stations.

____________________________

On another note, I'm thinking of using the multiple hotkey press library by Gazz to allow the Next and Previous hotkeys to switch categories while you have something targeted. So if you have ships currently targeted and you press the next key two times, your aim will be set to the first station in the sector. Or if you press the previous key twice, you'll switch to the gates. This should completely eliminate the need for all six of the next/previous targeting keys.

Likewise, I could make the menu key a multi-function key to allow quick access to change search options. In example, you press the menu key twice and it toggles the "Search Enemies Only" option. Or I could have the multi-click functions be customizable via Cycrow's Community Plugin Configuration menu, so you can choose what you want to be double-press and triple-press and so on. Maybe you use the class menu a lot, make it double-press.

Tell me what you all think.
"Humanity has the stars in its future, and that future is too important to be lost under the burden of juvenile folly and ignorant superstition." - Isaac Asimov

Thrandisher
Posts: 357
Joined: Sun, 1. Jul 07, 03:33
x4

Post by Thrandisher » Mon, 1. Dec 08, 07:22

Ahh, ok then. Working as intended then so far!
I was so useta to haveing my target keys only for enemys, i didnt even think of that logic there, lol.

Well if you added in the double hotkey thing, i would probly go with the Community plugin configuration menu. There are times where i do spam the target key trying to get a certain target. So id hate to have the double key go into effect when im trying to get just the right target. Then again im a joystick user so thats my reasoning behind that.

WindsOfBoreas
Posts: 283
Joined: Sun, 3. Aug 08, 20:30

Post by WindsOfBoreas » Mon, 1. Dec 08, 08:00

Well, it may be better then to have two other hotkeys. Gazz's script has a delay function, but the delay may be so much (due to the natural cycling through of the targets) that it would be too laborious for the player. The menu key, however, could still use it.
"Humanity has the stars in its future, and that future is too important to be lost under the burden of juvenile folly and ignorant superstition." - Isaac Asimov

WindsOfBoreas
Posts: 283
Joined: Sun, 3. Aug 08, 20:30

Post by WindsOfBoreas » Tue, 2. Dec 08, 06:36

Updated to version 1.20

USE THE UNINSTALL SCRIPT FROM THE PREVIOUS VERSION BEFORE UPDATING TO VERSION 1.20
  • Version 1.20
  • Fixed String Search interfering with Asteroids, Flying Wares, and Gates.
  • Added Double-Press and Triple-Press quick key function to the Menu hotkey.
  • Added Configuration Options
    • Sort Array Option (Alphabetically, Distance to All Objects, Distance to Enemies)
    • Customizable Double-Press of the Menu hotkey.
    • Customizable Triple-Press of the Menu hotkey.
  • Added Next Category hotkey.
  • Added Previous Category hotkey.
"Humanity has the stars in its future, and that future is too important to be lost under the burden of juvenile folly and ignorant superstition." - Isaac Asimov

WindsOfBoreas
Posts: 283
Joined: Sun, 3. Aug 08, 20:30

Post by WindsOfBoreas » Thu, 4. Dec 08, 23:01

Well, it seems that I missed some of the corporation names.

Aside from Jonferco, NMMC, Plutarch, and Terracorp, what other corporations are there. I missed the others because I haven't come across them yet (haven't traveled outside of five sectors from Omicron Lyrae).

If people could list the corporation names, I would be very grateful.

____________________

Aside from that, how is this working for people?

Any suggestions to improve it? Any new functions you think it might need?

Please, I'm all ears.
"Humanity has the stars in its future, and that future is too important to be lost under the burden of juvenile folly and ignorant superstition." - Isaac Asimov

Thrandisher
Posts: 357
Joined: Sun, 1. Jul 07, 03:33
x4

Post by Thrandisher » Fri, 5. Dec 08, 00:00

Terracorp, Otas, Jsdo, Plurarch mining corporation, Nvidium minning and manafacturing corporation (ptni), Dukes Buccaneers, Atreus shipbuilding currents, Split strong arm.

Page 8-11 on manual, no idea on steam if ya have that one.

Thats how there listed as main names things. Jsdo is jonferco, Atreus is some boron one (can tell i go up there alot, heh).

So far so good for me on it, although i will admit i havent done to much advance targeting. The only pet peave i have probly is it doesnt save the settings for, Search Enemies Only. But that is really minor and only takes 2 clicks when loading up a game.

WindsOfBoreas
Posts: 283
Joined: Sun, 3. Aug 08, 20:30

Post by WindsOfBoreas » Fri, 5. Dec 08, 00:25

Thanks for the names, asser69.

It should save all search selections; each search selection is part of an array that is saved to a global variable.
"Humanity has the stars in its future, and that future is too important to be lost under the burden of juvenile folly and ignorant superstition." - Isaac Asimov

WindsOfBoreas
Posts: 283
Joined: Sun, 3. Aug 08, 20:30

Post by WindsOfBoreas » Thu, 11. Dec 08, 22:11

Updated to version 1.30
  • Version 1.30
  • Fixed Global variable array not saving properly.
  • Fixed Corporation Strings for the Search String Menu.
  • Added Customizable Quad-Press of the Menu hotkey.

______________________________

I'm not really sure what else I can add to this so unless there are some glaring mistakes that I have missed or someone suggests something, this will probably be the last release.
"Humanity has the stars in its future, and that future is too important to be lost under the burden of juvenile folly and ignorant superstition." - Isaac Asimov

WindsOfBoreas
Posts: 283
Joined: Sun, 3. Aug 08, 20:30

Post by WindsOfBoreas » Fri, 9. Jan 09, 21:12

So, has this plugin been working well for everyone? Does anyone have any suggestions for it?
"Humanity has the stars in its future, and that future is too important to be lost under the burden of juvenile folly and ignorant superstition." - Isaac Asimov

WindsOfBoreas
Posts: 283
Joined: Sun, 3. Aug 08, 20:30

Post by WindsOfBoreas » Sun, 25. Jan 09, 00:46

Updated to version 1.40
  • Version 1.40
  • Reworked Entire text file system. Intelligent Targeting System is now available for localization.
  • Reworked Every script. Cleaned up the variable names.
  • Streamlined Entire plugin. Now uses less memory.
  • Fixed Searches not changing category if a search type was selected in the Search Menu.
  • Fixed Auto-Target script starting more than once under special circumstances.
  • Fixed Player-owned ships being subject to gravidar range limitation.
  • Added Select Non-Scanned function.
_______________________________________

The Select Non-Scanned function is limited only to Asteroids right now. If a patch comes out allowing me to search for ships or if someone knows how (I looked for at least an hour through the commands and found nothing), the code is already in-place to put that functionality in place.

The North Wind
"Humanity has the stars in its future, and that future is too important to be lost under the burden of juvenile folly and ignorant superstition." - Isaac Asimov

Kraszus
Posts: 15
Joined: Thu, 30. Oct 08, 16:03
x4

Post by Kraszus » Sun, 25. Jan 09, 11:18

Hi Windsofboreas. I've just installed your mod as described above. However, I dont think it has installed correctly. It is enabled on the pluginmanager, however I can find no ITS menu and my targetting does not seem to have changed any.

Any ideas?

WindsOfBoreas
Posts: 283
Joined: Sun, 3. Aug 08, 20:30

Post by WindsOfBoreas » Sun, 25. Jan 09, 16:49

This plugin does nothing to modify X3TC's stock targeting system as that is hardcoded; it does, however, add five custom hotkeys that need to first be defined. You will find them on the Interface page of the hotkey editor at the bottom of the page.
  • ITS: Next Target
  • ITS: Previous Target
  • ITS: Next Category
  • ITS: Previous Category
  • ITS: Search Menu
    • This hotkey also has double-press, triple-press, and quad-press functions.
That is how the hotkeys look.
"Humanity has the stars in its future, and that future is too important to be lost under the burden of juvenile folly and ignorant superstition." - Isaac Asimov

WindsOfBoreas
Posts: 283
Joined: Sun, 3. Aug 08, 20:30

Post by WindsOfBoreas » Sat, 31. Jan 09, 06:30

Well, it seems that I have gone and broken part of the script with my rework, specifically the change category keys. I have temporarily disabled downloads until I can fix the problem. As well, to sweeten the next update, I am adding another function to it: Target Saving.

Target Saving will add two more hotkeys (I debated about how to implement it and unfortunately, adding hotkeys is the only thing that really makes any sense) "ITS: Saved Target Menu" and "ITS: Call Saved Targets".

The Saved Target Menu will be where you can set targets that you wish to save for quick recall later. Inside the menu, you will have the options to save a target, switch to a target, delete a target, or assign a target to the Call Saved Target multi-press hotkey. You can also move the targets around to whichever multi-press you feel comfortable with.

For quicker management, you can simply press the Call Saved Target hotkey with something targeted to set it automatically to that multi-press. This, however, only works when there is nothing assigned to that press. If there is something assigned to that multi-press, it will simply switch the player's aim to the target if available.

Now, this is just an experimental model. It may change in the day or two before I release it (and I promise that this time I won't break anything).
"Humanity has the stars in its future, and that future is too important to be lost under the burden of juvenile folly and ignorant superstition." - Isaac Asimov

Post Reply

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