[SCRIPT][AP] ANCC Scramble - An ADS module [V0.7 - 03/10/13]

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
anachron13
Posts: 144
Joined: Tue, 2. Nov 10, 23:41
x3tc

[SCRIPT][AP] ANCC Scramble - An ADS module [V0.7 - 03/10/13]

Post by anachron13 » Sat, 6. Oct 12, 15:27

ANachron Carrier Command software - Scramble
An Anarkis Defense System module.



Introduction :
While the ADS clear sector command is quite effective to launch all your active fighters to attack everything, i was not totally satisfied with it for a more tactical usage in the AP battlefields . So the idea behind ANCC Scramble is to launch fighters and try to guide them in a smarter way by assigning them targets by priority.
These script will add three new hotkeys called "ANCC - Scramble launch", "ANCC - Scramble : Priority target" and "ANCC - Dynamic Overview"



Prerequisite :
Anarkis Defense System, an ADS compatible carrier with active fighters.
Cycrow's hotkey manager is highly recommended



Features list :

- NEW The Overview hotkey will list all the ADS fighters of your current carrier conveniently, and allow you to give attack, protect, scramble or dock orders to your fighters.
[ external image ]

- Active ADS fighters will be launched in wings of 5, fighters that can't be launched in at least a wing of 4 will stay in reserve to replace destroyed ships. For example : if there is 38 active fighters in your carrier, 7 wings will be launched and 3 fighters will be added to reserve. If there is 24 fighters, 4 wings of 5 and one wing of 4 will be launched.

- Active ADS M6 will be launched in wings of 2 if possible, or alone.

- Wing leaders will first look for military targets in direct vicinity of the carrier (less than 10 km), then for military targets between 10km and radar range of the carrier (as defined in the automated mode option of ADS), then for freighters and TL. If no target found, they will escort the carrier.

- Wing Leaders will try to choose their targets depending on number of wing available to attack this target, trying to avoid sending a single wing against an M2 while there is 5 wings against a M5

- The carrier will monitor the Scramble wings and launch reinforcement if an ADS active ship is available. Destroyed scramble wings will be reformed as soon as there is at least three fighters available. Any active ADS fighters with full hull is eligible to be send as reinforcement.

- As in ADS, if the option is checked, damaged ships will try to retreat, and if succesfull will be available as reinforcement when needed hull repairs are done.

-The "ANCC - Scramble : Priority target" hotkey on an enemy will add it as a priority target to your scramble fighters. All enemy ships except freighters that are less than 5 km around the priority target will also be considered with higher priority. If the priority target is out of radar range it will be ignored until it is in radar range again. Using this hotkey on a allied target or with no target will remove the priority target. This hotkey can be used before launching your fighters or during the fight, but remember your fighters will not change target until their current one is dead.



Important things :

- I have added "anarkis.lib.dockall.secure.xml" in the archive, i have modified it to handle the renaming system of ANCC.Scramble and to correct a small docking bug with some XRM ships. If you don't want to replace this file, use the modified ANCC rename script available in the optional files.

- The ANCC Scramble rename feature will be deactivated when you turn off the rename option of ADS.

- This module work better in close range, i suggest to avoid using a radar range over 30km. The closer your are of your fighters, better will be their chance to retreat succesfully. And they are quite effective at swarming big ships letting you add your guns to the fight without being in too much troubles.


Credits :

- Serial Kicked : My scripts are heavily based on his work. Many thanks to him.

- Mr.Bear : Thanks to his amazing X-Studio, i have found a new vocation in x3 scripting.

- Jack08, EmperorJon, Cycrow, Gazz and many others in this forum for their help, without them i couldn't have done it the way i wanted.



Download link :
[ external image ]
If you have version 0.2 or 0.5 of ANCC Scramble installed, i suggest that you remove all scripts starting by 'anachron' from your scripts folder before installing this version, as it will avoid unused scripts to stay in your scripts folder.

Installation : Just extract in your addon\scripts folder.
Uninstall : If you have the hotkey manager, just delete all scripts starting by 'anachron' and 'setup.ANCC.scramble.hotkey.xml'. Else you will first need to execute the 'anachron.uninstall.scramble.shortcut' script to delete the shortcuts.


Changelog :
V0.7 :
- Better ADS - Real Wings Edition support. The hull and shield limits setting will be used and rwe wings should be displayed more correctly in the overview
- Most of the text is now in a t file
- More colorful overview
- Some minor bugs correction

V0.6a :
- Forgot to remove a debug log, sorry for the spam in the logbook !
- Ships waiting for launch will now be displayed correctly in the overview.

V0.6 :
- NEW FEATURE : Dynamic Overview! Monitor your fighters and give them new orders with this new hotkey.
- Renaming system revamped again, should work a lot better. It can now be disabled using the ADS rename fighters option.
- Lots of bugs solved, the behaviour of the scrambled ships should be a lot less eratic when suffering heavy losses.
- Destroyed wings will now be reformed if there is enough docked fighters available.
- Every fighters assigned to ADS with full hull can be used to send reinforcement to incomplete scramble wings. Meaning that if you add new ADS fighters to your carrier while a scramble is in progress, they will be immediatly used to replace dead fighters.
- Basic compatibility with ADS - Real Wings Edition. Both scripts can be installed, i have adapted my script to respond to the new "dock all" procedure of the Nicoman35 script. The only thing not working for now is the "protect..." command from the Overview menu.

V0.5 :
- NEW FEATURE : priority target!
- wingmates should launch a little bit faster now
- rename system revamped, no need to use the ADS rename system anymore.
- corrected a bug where sometimes SIGNAL_ATTACKED was overriding the leader current target.
- some scripts cleanup for better performance.

V0.2 : Initial release



Edit [1st Dec 2015]: replaced outdated with working xdownloads link. X2-Illuminatus
Last edited by anachron13 on Thu, 3. Oct 13, 17:05, edited 8 times in total.

User avatar
joelR
Posts: 2008
Joined: Mon, 9. Jul 07, 23:33
x3tc

Post by joelR » Sat, 6. Oct 12, 15:46

Brilliant!

Cronos988
Posts: 691
Joined: Mon, 27. Aug 07, 12:34
x3tc

Post by Cronos988 » Sun, 7. Oct 12, 09:53

A very nice addition. May I ask how you decide who to send against a given target?

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

Post by anachron13 » Sun, 7. Oct 12, 10:19

Every wing leaders add themselves in a local variable used to count available wings and call for a 'i need a target' script when their previous target is dead. This script decide for a new target depending amongst other things on the number of available wing leaders (for example, wings will be sent againt an M2 only if their is at least 6 wings available, or if there is no other target available). When a new target is found, this target will be returned to all other wing leaders waiting for a new target until there is enough wing sent or the target is dead. Rinse and repeat. ;)

I'm currently working on adding a new hotkey to give a priority to a target, or a group of targets if there is an escort. I hope to allow for more control on what your wings are doing without having to manually control everything.

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

Post by anachron13 » Sun, 14. Oct 12, 16:53

New version.

I've added a new "ANCC - Scramble : Priority target" hotkey. Used on an enemy it will add it as a priority target to your scramble fighters.
All enemy ships except freighters that are less than 5 km around the priority target will also be considered with higher priority.
If the priority target is out of radar range it will be ignored until it is in radar range again.
Using this hotkey on a allied target or with no target will remove the priority target. This hotkey can be used before launching your fighters or during the fight, but remember your fighters will not change target until their current one is dead.

Full changelog at the end of the first post.

Nicoman35
Posts: 681
Joined: Thu, 17. Nov 05, 13:12
x3tc

Post by Nicoman35 » Sun, 28. Oct 12, 16:59

Hi anarchon13,
now that I am finally ready - or at least beta - whth my own script, I will turn my attention to ADS - again.
Just like you, I was unsattisfied with the performance of the fighter escort.
As I am playing my game with capital ships having nasty anti fighter weapons, the fighters get eaten up quickly by capitals when they get close to them.
I developed this idea: My fighter support should have 2 main targets:
1. Deal with any enemy fighter support FIRST
2. At the same time, they sould distract capital enemy fire without getting too close to the capitals by performing 1.

Once clearing the enemy fighter support,and if not called back to base, the fighters should join attacking the enemy capital ship.
Weakened by my carriers fire, now it should no longer be a problem.

I began developing my own routines, and I got quite far, but never ended it because of my script.

Now that I am almost ready, I saw you have done some work to ADS.
Question: Would you be interrested in my files for integration in your mod?

Rocier
Posts: 26
Joined: Mon, 11. Aug 08, 06:45
x3tc

Post by Rocier » Sun, 28. Oct 12, 17:34

I dont understand. This mod says its for AP, but the Anarkis Defense System says its for TC... which is it?

Brinnie
Posts: 800
Joined: Mon, 5. Jun 06, 08:26
x3tc

Post by Brinnie » Sun, 28. Oct 12, 20:04

I am having this issue with this script as well as with the ADS, I am quoting my post from the ADS thread:

"For some reason the shortcuts do not work, otherwise everything else seems to be working fine.
I wonder if it has something to do with the way I installed the script, I have used the plugin manager to package and install ADS.


The same applies to "ANachron Carrier Command software" the keys appear and can be assigned via the interface configuration menu but when assigned they do not do anything.

Any ideas on what's wrong?"

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

Post by anachron13 » Mon, 29. Oct 12, 09:38

@Nicoman35
Could be interesting indeed but it would require a new hotkey i think. I'm using my fighters with a different philosophy as i'm using a M7 carrier from XRM, and it is quite good at anti fighters task by himself but not so much against capital ship. So i rely on my fighters complement to take them out before they kill me. I was thinking to add M8 and M3 bombers support btw but i'm quite busy and don't have so much time for X3 lately.

@Rocier : ADS work on AP. See last pages of ADS thread for more informations.

@Brinnie : Your fighters must be activated in the ADS menu for ANCC to work, otherwise it will have no fighters to launch and so nothing will happen. I can't really help you with the ADS hotkey not working. Maybe try to install it without the plugin manager.

Brinnie
Posts: 800
Joined: Mon, 5. Jun 06, 08:26
x3tc

Post by Brinnie » Mon, 29. Oct 12, 11:04

anachron13 wrote:@Brinnie : Your fighters must be activated in the ADS menu for ANCC to work, otherwise it will have no fighters to launch and so nothing will happen. I can't really help you with the ADS hotkey not working. Maybe try to install it without the plugin manager.

Hi.
I will try again and double check that the ships are activated.

I mentioned the hotkeys not working here because they do not work in ANCC either and I thought it might a common issue, most likely an error on my part.
However while the hotkeys are not vital in ADS as the commands can be accessed via menus, I can't use the ANNC at all without the hotkeys.

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

Post by TouchMyNipple » Mon, 29. Oct 12, 12:15

Defintely an error with your installation. AFAIR you installed it via packing into an SPK and installing. I belive something went wrong.
Also make sure your ship is suited for ADS as some ships just don't run it.
Try a clean instal the standard way (backup clean folders, install ADS, check) and see if it helps.
Also you may have something in conflict with ADS or ADS hotkeys (mabe something calls for same comands? Outdated libraries? anything else like that...)

Still i'd recomend a clean check. If it works then it's definetly a problem with SPK.
Haste-whip TrixX!

Brinnie
Posts: 800
Joined: Mon, 5. Jun 06, 08:26
x3tc

Post by Brinnie » Mon, 29. Oct 12, 17:51

Well, I have tried as best as I could to try on a clean installation on another machine and I have installed both ADS and ANCC manually.

Unfortunately the result is not any different. The shortcuts are available in the Options/interface/extension so I can assign keys to them but the keys do not work.

I have active ships and the commands work for ADS if I use the ship menu, I could not find the commands for ANCC there so I can't test it at all.

I have only a Panther and a Guppy as well as a few TLs, could that be the problem?
I only really tried script and module on the Panther.


Is there a place where I can download a clean "T and Scripts" set of folders for AP?
I have the steam version and I can't think of a way to get clean folders either then remove and reinstall the game.

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

Post by anachron13 » Mon, 29. Oct 12, 18:12

ANCC only have a hotkey, adding it to the ADS menu would require to edit ADS files. It's a weird problem.

Do you hear "command accepted" when pressing the ANCC hotkey?
If yes, what type of fighters are active in your panther?

To clean the T and Scripts folder, deleting them and relaunching steam should do the trick.

Edit : is your AP install up to date? I think one of the recent update fix a problem with custom script hotkey handling.

Brinnie
Posts: 800
Joined: Mon, 5. Jun 06, 08:26
x3tc

Post by Brinnie » Mon, 29. Oct 12, 18:19

I get no voice confirmation at all when using the shortcuts, only when using the commands for ADS from the menu.

Nova Raiders and Falcon Haulers.

Thanks for the tip I will backup and then delete the folders.

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

Post by anachron13 » Mon, 29. Oct 12, 18:28

It seem's that for some reasons the scripts assiocated with hotkey are not launched at all. Maybe try to delete controls assigned to the ADS and ANCC hotkeys, save your control profil and exit, launch it again and redefine your hotkeys. Make sure that there is no conflict.

Brinnie
Posts: 800
Joined: Mon, 5. Jun 06, 08:26
x3tc

Post by Brinnie » Mon, 29. Oct 12, 18:37

I have just used your neat trick to get clean files from steam and it worked a treat. Now that I have really clean folders I will try again what I was advised to do before.

I want to try it on spare PC that I have so not to mess things up in my current game.

I had already deleted the keys before removing the scripts but when I reinstall them the keys are remembered, there are no conflicts.

I didn't save the profile after deleting though, I will try that and I will report back later.

Thanks for your help.

- - - - - -
***** Update
-----------


I tried everything that was suggested and it made no difference at all.
I guess either this issue applies to the Panther or my game is corrupted in some way that it affects the usage of the shortcuts for ADS and it is not rectified by using clean T and Scripts folders.


I am thinking that the reason why I can't use the shortcuts for ANCC is a consequence of the fact that they do not work in ADS in the first place.


I will have to pass on this one.

Thanks again.

BelgarionNL
Posts: 17
Joined: Thu, 25. Dec 08, 13:27

Post by BelgarionNL » Wed, 31. Oct 12, 22:51

SCRAMBLE fighters is NOT working! (at least the shortcut is not!)

the priority target is working! just not the scramble one!

edit: now it is! I had shortcut on shift enter and that did not work!

thx

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

Post by TouchMyNipple » Thu, 1. Nov 12, 08:01

You should always keep in mind that some shortcut behaviour is hard-coded my windows and steam and the game doesn't override it. And as of my observations some shifted hotkeys are overrided by their unshifted alters. In your example an unshifted Enter that is by default 'always on' just got on top of your hotkey. I guess that has something to do with 'hotkey manager' as it has some limitations.
Haste-whip TrixX!

BelgarionNL
Posts: 17
Joined: Thu, 25. Dec 08, 13:27

Post by BelgarionNL » Fri, 2. Nov 12, 13:33

scramble launch no longer working! I can't get them to launch anymore

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

Post by anachron13 » Fri, 2. Nov 12, 19:11

Hello,

I need a little bit more informations to help you.
Did you hear 'command accepted' when pressing the scramble hotkey?
Is the ADS hotkey "clear sector" working?

Post Reply

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