[SCRIPT] Anarkis Defense System - v2.65.1 - [2010-08-13]

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

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

Post by joelR »

Good job man. I will get this installed and give you feedback. I might suggest you even start your own thread?
User avatar
joelR
Posts: 2008
Joined: Mon, 9. Jul 07, 23:33
x3tc

Post by joelR »

anachron13 wrote:Hello,

If anyone is interested, i have developped a 'module' for ADS called ANCC Scramble.
I was not really happy with the ADS clear sector command which is just launching fighters with the "attack all" command. So the idea behind ANCC Scramble is to try to launch fighters in a smarter way by assigning them targets by priority. See the feature list below for more details.
These script will add a new hotkey called "ANCC - Scramble launch"



This is a beta so read carefully before trying it, and make a copy of your savegames.



Prerequisite :
Only tested on AP
ADS, an ADS compatible carrier and active fighters renamed using the rename function of ADS
Cycrow's hotkey manager is highly recommended



Features list :

- Active ADS fighters will be launched in wings of 5, fighters that can't be launched in at least a wing of 4 will be placed in reserve to replace destroyed ships. For exemple : 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 mod option of ADS), then for freighters and TL. If no target found, they will escort the carrier.

- Wing Leaders will try to choose their target 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

- After each target, wing leader will check for their wingmate and call for reinforcement if needed. Reserve ships will be sent to complete the wing if any available.

- As in ADS, if the option is checked, damaged ships will try to retreat, and if succesfull will be added to reserve when needed hull repair are done.



Know bugs:

- Sometimes, in the properties windows, some wing leader indicate "attack..." without indicating any target, but they are still attacking something. It will resolve by itself when their current target is dead.

- Sometimes when multiple leaders of a same wing died in a row ( ie first wing leader died, calling for a new wing leader who die almost immediatly) some wingmate will be stuck in "attack same target as..." and no target. If they are being attacked, the retreat script will eventually kick in and they will be added to the reserve list, else they will just stay here doing nothing. i haven't found any solution yet.



Important things :

- You need to rename your ship using the rename system of ADS. In this beta version, your ship will be renamed with a prefix and their ADS name to indicate their actual state for debugging purpose. When recalling with the ADS dock all hotkey, they will not be set to their original name as it will require to edit the dock all script. I will eventually upload a version that doesn't rename the ships tomorrow.

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

- It's my first scripts for the X series, and it has ended really bigger than i was expecting. There may be some bugs that i will not be able to resolve without rewriting some big part of the code.


Final note :

- This scripts are heavily based on the work of Serial Kicked and will be only distributed throught his thread as this is indissociable from ADS. Many thanks to him for his work on ADS.

Download link :
ANCC Scramble V0.1
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 need to execute the 'anachron.uninstall.scramble.shortcut' script to delete the shortcut.
Hard to be certain its your scripts but I had to disable the retreat function as all my ships got stuck in this retreat loop. They would dock then undock then immediately retreat again. (during a battle)
User avatar
anachron13
Posts: 144
Joined: Tue, 2. Nov 10, 23:41
x3tc

Post by anachron13 »

It's probably my script. I'm currently rewriting the reserve script to try to avoid this kind of problem.
Higgy10
Posts: 10
Joined: Wed, 26. Sep 12, 17:37

Post by Higgy10 »

I have a question of ads, in my current xrm game i just bought a bragi m2 but there no no ads options in the command menu.
User avatar
jack775544
Posts: 1277
Joined: Tue, 13. Dec 11, 08:27
x4

Post by jack775544 »

Serial Kicked wrote:The script adds various commands for the M7, M1, TM and TL class ships
I don't see M2 in there ;)
1940s - Various "computers" are "programmed" using direct wiring and switches. Engineers do this in order to avoid the tabs vs spaces debate.
Higgy10
Posts: 10
Joined: Wed, 26. Sep 12, 17:37

Post by Higgy10 »

jack775544 wrote:
Serial Kicked wrote:The script adds various commands for the M7, M1, TM and TL class ships
I don't see M2 in there ;)
Ya i didnt either but thought i saw i post on one the pages where someone said m2 was supported! No biggie if not thx. Great script too!
User avatar
jack775544
Posts: 1277
Joined: Tue, 13. Dec 11, 08:27
x4

Post by jack775544 »

Ahh m2's are supported for the defence grid feature
1940s - Various "computers" are "programmed" using direct wiring and switches. Engineers do this in order to avoid the tabs vs spaces debate.
TouchMyNipple
Posts: 181
Joined: Wed, 15. Sep 10, 13:09
x4

Post by TouchMyNipple »

I wonder wich variables does ADS use to determine if the ship sia carier or not? Like it's realy strange that for some reason it just doesn't detect some ships ingrid and doesn't add them to carrier list. Although they have ships docked and homebased and all needed software.
I found this especialy when played XRM and thought Anachron13 could answer. Particulary worried about Hyperion with it's 2 fighter slots while being m6... i loved that shipp all the time i played XRM :roll:
Haste-whip TrixX!
User avatar
anachron13
Posts: 144
Joined: Tue, 2. Nov 10, 23:41
x3tc

Post by anachron13 »

It's a good question. There is quite a bunch of scripts in ads and i haven't look at them all.
The script called "anarkis.acc.get.carriers.xml" which seems to be the one interesting us return every M1, M7, TL and TM with a Carrier Command Software installed as a valid ADS carrier.
There is no other test in this script as far as i can tell.

If this is the only one used, it's quite easy to add other ship type.
Higgy10
Posts: 10
Joined: Wed, 26. Sep 12, 17:37

Post by Higgy10 »

That would be fabulous if you could add ships easily anachron as alot of m2's in xrm have decent fighter bays and could definitely make use of ads. Dont really want to get into using codea as it seems overly complicated and ads works great.
User avatar
anachron13
Posts: 144
Joined: Tue, 2. Nov 10, 23:41
x3tc

Post by anachron13 »

I have give it a closer look, i haven't open the 241 scripts (yes) composing ADS, but i have found at least 3 scripts requiring modification. I could give it a try if you want but i can't guarantee that it will be enough.

Edit : Add M2 to ADS :ads_m2.zip
I have just made a quick test with XRM and an ATF M2 Bragi, it seems to work fine. Make a backup of your savegame before trying this, just in case.
Higgy10
Posts: 10
Joined: Wed, 26. Sep 12, 17:37

Post by Higgy10 »

you are a god thx!
User avatar
anachron13
Posts: 144
Joined: Tue, 2. Nov 10, 23:41
x3tc

Post by anachron13 »

If anyone is interested, i have updated my post about my 'module' for ADS

I have rewrite most of it thanks to the help of Jack08 and i have corrected all known bug.

I will maybe start a new thread if it works correctly.
Last edited by anachron13 on Sat, 6. Oct 12, 15:29, edited 1 time in total.
User avatar
joelR
Posts: 2008
Joined: Mon, 9. Jul 07, 23:33
x3tc

Post by joelR »

anachron13 wrote:If anyone is interested, i have updated my post about my 'module' for ADS

I have rewrite most of it thanks to the help of Jack08 and i have corrected all known bug.

I will maybe start a new thread if it works correctly.
I would start a new thread anachrom13. Thats going to get lost in the shuffle...
User avatar
Brinnie
Posts: 909
Joined: Mon, 5. Jun 06, 08:26
x3tc

Post by Brinnie »

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?
Jonas801
Posts: 98
Joined: Mon, 8. Nov 10, 12:26
x3tc

Post by Jonas801 »

Very interesting mod. As a newcomer i wonder: Is it compatible with AP and XRM? Thanks in advance!
Mu
User avatar
anachron13
Posts: 144
Joined: Tue, 2. Nov 10, 23:41
x3tc

Post by anachron13 »

You should read pages 22 & 23 of this thread. :)
User avatar
Brinnie
Posts: 909
Joined: Mon, 5. Jun 06, 08:26
x3tc

Post by Brinnie »

anachron13 wrote:You should read pages 22 & 23 of this thread. :)


I don't know if you referred to my previous post with the above, but I have installed the fix anyway.
It didn't make any apparent difference to the problem that I was having but it did point out one important thing.


It is not that there was a problem with shortcuts for ADS or even with the ones in your module but rather I was wrong in the way I thought they were meant to work.
I just realized that you need to be in the carrier for them to function, I know stupid me, but I thought that I could target my carrier from my own ship and hit "dock all ships" or "clear sector" and the carrier would issue the commands.

Well I figured it out now, as they say better late than never.

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

Post by anachron13 »

It was for Jonas801.
Good to know you have solved your problem. What you have described could probably be done but it would require to edit some ADS original scripts. I prefer avoid doing this as each modification could potentially break another part of ADS.
User avatar
Brinnie
Posts: 909
Joined: Mon, 5. Jun 06, 08:26
x3tc

Post by Brinnie »

No worries, but maybe you can write a script for my head so I can understand this kind of thing quicker :)

It took me days to figure out the obvious.

Now that I know what I was doing wrong I will install your module for ADS again, I am confident the shortcuts will work in that too.

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