Anarkis Defense System - Real Wings Edition v1.16

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

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

Post by Nicoman35 » Thu, 6. Feb 14, 22:23

Jingai wrote:Will thiss work with AP 3.1?
Has been downloaded over 1000 times, check for complains and judge yourself ;)

Jingai
Posts: 10
Joined: Sun, 24. Nov 13, 03:59

Post by Jingai » Fri, 7. Feb 14, 21:30

I've been looking for something that will allow carriers to lunch and recall their fighters while OOS and without any input from the player, will this mod do this?

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

Post by Nicoman35 » Sat, 8. Feb 14, 10:44

Jingai wrote:I've been looking for something that will allow carriers to lunch and recall their fighters while OOS and without any input from the player, will this mod do this?
At least it SHOULD. Arm and man a carrier, make your choices in the tactical setup, then enable autocarrier (you have to assign a hotkey for the ADS manager first).

builder680
Posts: 1315
Joined: Mon, 14. Feb 11, 03:58
x4

Post by builder680 » Wed, 19. Mar 14, 09:45

This is quite a bit of fun!

But (there's always a but! :) ) it bothered my that my ships (with Docking Computers * ) would "internally" dock even on "external" docking carriers such as the Griffon. I wanted to see my fighters. After spending a while digging through various scripts and seeing what was calling what, I traced down anarkis.acc.guide.home.xml as the one I needed to change. Then, after some trial and error, I found the right line and what needed to be entered.

In line 37, I changed:

!move.movetoobject

to

!move.returntohomebase

Boom. Now I can see my ships docked externally, and everything else stays the same as it was. If this is still being updated, it's a minor but cool change that you might like to incorporate.

* The Docking Computers brings up another point. I believe original ADS required Transporter Devices, but it looks like you changed that to Docking Computers (which is good). However, I think ships still use the Transporter Device of 7-8 km range to insta-dock (which I couldn't find how to change). Docking Computer range is more like 4 km or so.

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

Post by Nicoman35 » Wed, 19. Mar 14, 12:07

builder680 wrote:This is quite a bit of fun!

But (there's always a but! :) ) it bothered my that my ships (with Docking Computers * ) would "internally" dock even on "external" docking carriers such as the Griffon. I wanted to see my fighters. After spending a while digging through various scripts and seeing what was calling what, I traced down anarkis.acc.guide.home.xml as the one I needed to change. Then, after some trial and error, I found the right line and what needed to be entered.

In line 37, I changed:

!move.movetoobject

to

!move.returntohomebase

Boom. Now I can see my ships docked externally, and everything else stays the same as it was. If this is still being updated, it's a minor but cool change that you might like to incorporate.

* The Docking Computers brings up another point. I believe original ADS required Transporter Devices, but it looks like you changed that to Docking Computers (which is good). However, I think ships still use the Transporter Device of 7-8 km range to insta-dock (which I couldn't find how to change). Docking Computer range is more like 4 km or so.
Thank you for feedback, builder680.
Exactly that issue bothered me too. Good thing, that you got a solution to that :thumb_up:
Though I find it somewhat wierd, because
!move.returntohomebase
calls
!move.movetostation
which will then use

Code: Select all

[THIS]-> put into environment $targetstation->
to dock ships using docking computers.
Which leads to the bug, that ships will not be seen on outer docking places, but HEY, if it works -> *1000 hugs*, I will test it and implement it.
And yes, I am still working on 1.13, but I want this version to be compatible with Pirate Guild and Yaki Armada, which means quite some headaches for me, because I have to review (and fully understand) the two mods. But I am still developing...

As for the docking range, I decided to dock the ships at transporter range

Code: Select all

$range -> get transporter range
which ist different sometimes (e.g. XRM 7km :wink:)

builder680
Posts: 1315
Joined: Mon, 14. Feb 11, 03:58
x4

Post by builder680 » Wed, 19. Mar 14, 12:25

Yeah, it works, "mostly."

I say mostly because it seems that if I call all the fighters back in rapid succession (where a lot dock at once) some seem to still disappear into "internal" docking, and some I can see externally. If I stagger their docking, then I can see them all... usually. I really have no idea at all how scripting works, I just did a couple hours of trial and error. You might have better luck playing with different commands.

:)

EDIT: Since you said the !move.returntohomebase just calls !move.movetostation, I changed line 37 to that. Same result, the (most) ships are visible (usually) externally. If it saves a step I might as well use it. I just don't know what to change to get 100% success on external visibility though. Something else is occasionally making some ships dock internally.

Brokkoli
Posts: 15
Joined: Fri, 11. Oct 13, 21:50

Post by Brokkoli » Sat, 22. Mar 14, 00:48

I got a bug report:

When I use the "Clear sector" command, the shields of my carrier return to full everytime a wing launches. I use ANCC scramble on top of ADS - RWE, so I'm not sure which script is responsible.

Anyway, great script and thanks for updating it. I use Bullwinkles Drone Carrier software to produce my fighters and ADS to handle them. That combination provides all the carrier fun with minimum time required to set it up and manage it.

Now I got some ideas for future versions:
An option to launch a number of wings to standby at location. Then an option to give commands to wings on standby. Basically the option to command multiples wings as if they were one big wing. Go there. Wait here. Attack that. Retreat to here.
When I was experimenting with carriers without any scripts, I put all ships in one wing and ordered the wing around. That felt like the natural way to use a fighter swarm.

I just got an idea how to implement this functionality. (I have no knowledge of scripting, so please forgive me if my assumptions are incorrect.) New option "launch x fighters for standby". All of them will be added to one wing. You can move this wing around as you wish by giving the wing orders. If you now give any other ADS order, this standby wing will act as a ship pool where active ADS wings will be formed from.
So say you send 20 ships out on standby. Now you want to send 1 attack wing of size 5 ships to attack a target. These 5 ships are taken from the standby wing, which is reduced to 15 ships. If the attack wing has finished it's task, it will return to the standby wing. Then there would also be an optional retreat order "return to standby wing"
I imagine something like this is possible to do. This idea could be taken further by making the standby wing act like a "virtual ads carrier". It would react like if an ADS carrier was actually at this location. I am not sure if that is possible with scripting, but maybe you can place a nav boy or some object at the go-to location of the standby wing and use this to get distances of enemies to the standby wing.

Ok, post got longer than intended :-) Just my 2ct if you are looking for ideas.

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

Post by Nicoman35 » Sat, 22. Mar 14, 10:00

Brokkoli wrote:I got a bug report:

When I use the "Clear sector" command, the shields of my carrier return to full everytime a wing launches. I use ANCC scramble on top of ADS - RWE, so I'm not sure which script is responsible.
Ah, very good, it is my mod causing this issue. Thank you for reporting, just corrected this for v1.13. There are only two lines of the code to be changed to correct this behaviour, so if desired, I can tell how to correct this for v1.12.

Brokkoli wrote:Anyway, great script and thanks for updating it. I use Bullwinkles Drone Carrier software to produce my fighters and ADS to handle them. That combination provides all the carrier fun with minimum time required to set it up and manage it.
Cool - never used DCS myself :oops: (don't hit me, doc!), but good to read they get along with each other.

Regarding this 'virtual carrier' thing with standby wings - it's certanly possible, but - I have just made a breef overview and have come to the conclusion, that this will be a LOT of work.
I am already working at ADS in slow ride mode, so time untill achieving that would exceed reasonable timescale. I fear, it would not be completed at all, so I am sorry to decline your wish.
But... if some is willing - I have no problems with others adding stuff... (It's more like the others having a problem with the amount of work this would mean ;-)).

Brokkoli
Posts: 15
Joined: Fri, 11. Oct 13, 21:50

Post by Brokkoli » Sun, 23. Mar 14, 21:32

If 1.13 is not far away, I don't mind waiting.

As I said, I have no knowledge of the script editor so I don't know how difficult something is to code. If it's not worth the time, forget it.

rmazurek
Posts: 87
Joined: Tue, 13. Aug 13, 04:04
x3tc

Post by rmazurek » Tue, 17. Jun 14, 20:03

Wow. Someone cares for X3 yet. Great :D

One suggestion. There is minimal threat engage. I think more important thing is missing. MAXIMUM threat engage.

I lost 3 fully equiped Zephyrus because they tried to attack capital ships by themself.

Maybe it's intended only to full sector defence not only against fighters or for bigger carriers only, but i think even if you have stronger fleet it's posiible that it gets to enemy capital and dies before could retreat.
I mean the situation if you have ADS on station (or not) and not very strong carriers (TM class for example) that are assigned to defence grid.

At least implementing standard attack fighters/attack capitals in ADS would be great advantage.

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

Post by Nicoman35 » Tue, 17. Jun 14, 20:28

rmazurek wrote:Wow. Someone cares for X3 yet. Great :D

One suggestion. There is minimal threat engage. I think more important thing is missing. MAXIMUM threat engage.

I lost 3 fully equiped Zephyrus because they tried to attack capital ships by themself.

Maybe it's intended only to full sector defence not only against fighters or for bigger carriers only, but i think even if you have stronger fleet it's posiible that it gets to enemy capital and dies before could retreat.
I mean the situation if you have ADS on station (or not) and not very strong carriers (TM class for example) that are assigned to defence grid.

At least implementing standard attack fighters/attack capitals in ADS would be great advantage.
You are right. When I wrote this part of the autocarrier, I presumed the player to have a potent carrier with a lots of firepower, tons of missiles and enough resources to engage almost ANY threat.
I did not pay attention to the low end. Basicly because I thought autocarriers would be used in the later game.
A breef estimate leads me to the conclusion that this could be done. But not for v1.13.
Basicly because this version it is ready and I will release it soon. The problem to the delay were the other mods which use ADS: Pirate Guild 3 and Yaki Armada 2.
I had to rework a lot to get them working together.
So, I'll have to release v1.13 along with modified versions of PG3 and YA2.
Everything is ready now, but it the amount of work for the presentation here in the forum kept me from doing it.
Expect a release within this week.
As for the max threat level, I'll keep that in mind for v1.14.

rmazurek
Posts: 87
Joined: Tue, 13. Aug 13, 04:04
x3tc

Post by rmazurek » Wed, 18. Jun 14, 21:22

Actually it's not a problem for me. Just found script for enchanced patrols. Hopefully it makes patroling ships disangage if enemy is too strong so they should not make suicide attacks.

Iit's good to combine it with this script. I can send TM for patrol and set autocarrier option. I hope it would work. It should if ADS can break and restore any possible command.

And I am not sure of TM jumping. It's rather for clearing trade routes of several pirate fighters. For bigger threats I will buy some capital ships and more fighters.

One thing i think is missing is posiibility to add sectors without own properties to engage enemies. I mean to keep routes between own stations safe.
Usually it's not a problem because most ships use jumpdrive but sometimes there is need to move not fully equiped ship (without drons/missiles on MARS) to equipment dock etc.
It would be nice to escort ship to border outpost and not worrying for it too much after that. Actually it would be great if there would be possibility to set for each station/carrier custom set of sectors to engage.

One other thing that would be usefull (or maybe i missed it in this script) is posiibility to set for carriers rearming pattern (such as "scimitar x spectre, y poltergaist, z drones; sabre x poltergaist and y drones" etc) and define amount for each were that would trigger auto resupply at specified station/ship if current number is less than defined number.

EDIT: Actually there would be 2 patterns: one for carrier and one for carrier's owned ships

Not complaining ofcoure because this script is great anyway. Just an idea I think nobody suggested yet.

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

Post by Nicoman35 » Wed, 18. Jun 14, 23:16

rmazurek wrote:One other thing that would be usefull (or maybe i missed it in this script) is posiibility to set for carriers rearming pattern (such as "scimitar x spectre, y poltergaist, z drones; sabre x poltergaist and y drones" etc) and define amount for each were that would trigger auto resupply at specified station/ship if current number is less than defined number.
There IS the possibility to set rearming patterns for ships. You got to open ADS Manager -> open setup menu -> Resupply ships mangagement.

As for the carrier, I use a version of the Buy / sell lopp mod which I have modified to keep the carrier supplied.
I always wanted to integrate it into ADS....but I think someone else will have to do it ;)

rmazurek
Posts: 87
Joined: Tue, 13. Aug 13, 04:04
x3tc

Post by rmazurek » Wed, 18. Jun 14, 23:44

This is some solution. However I meant to resupply at own base / ship, not buying from NPC. What I make now manually is using traders to buy ammo, rockets etc and store it in 1 ship (later in HQ when I obtain it). If some ship is running low on something it needs, i move it to sstation with that ship and transfer needed weres.

What I mean it would be nice to automate this process. It's not a big problem yet since I have not strong fleet yet but it might be hard to monitor it when will be much more ships.

EDIT: Just answered myself. There is already CLS. As carrier would be kept in home station it would just stand there on CLS and loading weres if needed.

The only problem to solve would be patrolling TM's but I guess there is some script that could help. Maybe loop patrol/CLS?

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

Post by Nicoman35 » Fri, 20. Jun 14, 15:28

I forgot to remove a bit of test code preventing the defend hotkey to funciton correctly :oops:. Either you remove that test code manually from the scipt anarkis.acc.hotkey.cmd.defend.xml (it is well marked), or redownload completely.
Sorry for inconvenience.

rmazurek
Posts: 87
Joined: Tue, 13. Aug 13, 04:04
x3tc

Post by rmazurek » Fri, 20. Jun 14, 16:57

For me it works. But I downloaded script several days ago.
You mean defend carrier, right?

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

Post by Nicoman35 » Fri, 20. Jun 14, 17:06

Yes, it works for you?? Hm. Could you post the content of the script anarkis.acc.hotkey.cmd.defend.xml here? You are able to open it with your browser.

rmazurek
Posts: 87
Joined: Tue, 13. Aug 13, 04:04
x3tc

Post by rmazurek » Fri, 20. Jun 14, 17:18

Code: Select all

<?xml version="1.0" standalone="yes"?>
<?xml-stylesheet href="x2script.xsl" type="text/xsl"?>
<!-- Generated using X-Studio -->
<script>
	<name>anarkis.acc.hotkey.cmd.defend</name>
	<version>34</version>
	<engineversion>44</engineversion>
	<description>ACC - Hotkeys : Defend Carrier  * nicoman35 *</description>
	<arguments />
	<sourcetext>
		<line linenr="001" indent="">
			<comment>* Multiple hotkey press recognition</comment>
		</line>
		<line linenr="002" indent="">
			<var>$script.name</var>
			<text> </text>
			<text>=</text>
			<text> </text>
			<text>get</text>
			<text> </text>
			<text>script</text>
			<text> </text>
			<text>name</text>
		</line>
		<line linenr="003" indent="" interruptable="@">
			<var>$wing.nr</var>
			<text> </text>
			<text>=</text>
			<text> </text>
			<var>null</var>
			<text>-></text>
			<text> </text>
			<text>call</text>
			<text> </text>
			<text>script</text>
			<text> </text>
			<call>lib.gz.multi.hotkey</call>
			<text> </text>
			<text>:</text>
			<text> </text>
			<text>Hotkey.Name</text>
			<text>=</text>
			<var>$script.name</var>
			<text> </text>
			<text>Wait.Delay</text>
			<text>=</text>
			<var>300</var>
		</line>
		<line linenr="004" indent="">
			<text>while</text>
			<text> </text>
			<text>is</text>
			<text> </text>
			<text>datatype</text>
			<text>[</text>
			<var>$wing.nr</var>
			<text>]</text>
			<text> </text>
			<text>==</text>
			<text> </text>
			<var>[DATATYPE_NULL]</var>
		</line>
		<line linenr="005" indent=" " interruptable="@">
			<text>=</text>
			<text> </text>
			<text>wait</text>
			<text> </text>
			<var>50</var>
			<text> </text>
			<text>ms</text>
		</line>
		<line linenr="006" indent="">
			<text>end</text>
		</line>
		<line linenr="007" indent="" />
		<line linenr="008" indent="">
			<comment>* Available Ships will be dispatched in wings of variable size.  If playership has an ADS compatible homebase assigned, check this too; this way it is possible, to command a carrier from another ship</comment>
		</line>
		<line linenr="009" indent="">
			<var>$homebase</var>
			<text> </text>
			<text>=</text>
			<text> </text>
			<var>[PLAYERSHIP]</var>
			<text>-></text>
			<text> </text>
			<text>get</text>
			<text> </text>
			<text>homebase</text>
		</line>
		<line linenr="010" indent="" interruptable="@">
			<text>if</text>
			<text> </text>
			<var>[PLAYERSHIP]</var>
			<text> </text>
			<text>-></text>
			<text> </text>
			<text>call</text>
			<text> </text>
			<text>script</text>
			<text> </text>
			<call>anarkis.acc.is.compatible</call>
			<text> </text>
			<text>:</text>
		</line>
		<line linenr="011" indent=" " interruptable="@">
			<text>START</text>
			<text> </text>
			<var>[PLAYERSHIP]</var>
			<text>-></text>
			<text> </text>
			<text>call</text>
			<text> </text>
			<text>script</text>
			<text> </text>
			<call>anarkis.acc.wing.defendcarrier.pl</call>
			<text> </text>
			<text>:</text>
			<text> </text>
			<text>wing.nr</text>
			<text>=</text>
			<var>$wing.nr</var>
		</line>
		<line linenr="012" indent="" interruptable="@">
			<text>else</text>
			<text> </text>
			<text>if</text>
			<text> </text>
			<var>$homebase</var>
			<text>-></text>
			<text> </text>
			<text>call</text>
			<text> </text>
			<text>script</text>
			<text> </text>
			<call>anarkis.acc.is.compatible</call>
			<text> </text>
			<text>:</text>
		</line>
		<line linenr="013" indent=" " interruptable="@">
			<text>START</text>
			<text> </text>
			<var>$homebase</var>
			<text>-></text>
			<text> </text>
			<text>call</text>
			<text> </text>
			<text>script</text>
			<text> </text>
			<call>anarkis.acc.wing.defendcarrier.pl</call>
			<text> </text>
			<text>:</text>
			<text> </text>
			<text>wing.nr</text>
			<text>=</text>
			<var>$wing.nr</var>
		</line>
		<line linenr="014" indent="">
			<text>end</text>
		</line>
		<line linenr="015" indent="" />
		<line linenr="016" indent="">
			<text>return</text>
			<text> </text>
			<var>null</var>
		</line>
		<line linenr="017" indent="" />
		<line linenr="018" indent="" />
	</sourcetext>
	<codearray>
		<sval type="array" size="10">
			<sval type="string" val="anarkis.acc.hotkey.cmd.defend" />
			<sval type="int" val="44" />
			<sval type="string" val="ACC - Hotkeys : Defend Carrier  * nicoman35 *" />
			<sval type="int" val="34" />
			<sval type="int" val="0" />
			<sval type="array" size="3">
				<sval type="string" val="script.name" />
				<sval type="string" val="wing.nr" />
				<sval type="string" val="homebase" />
			</sval>
			<sval type="array" size="12">
				<sval type="array" size="2">
					<sval type="int" val="1032" />
					<sval type="int" val="0" />
				</sval>
				<sval type="array" size="10">
					<sval type="int" val="102" />
					<sval type="string" val="lib.gz.multi.hotkey" />
					<sval type="int" val="1" />
					<sval type="int" val="0" />
					<sval type="int" val="0" />
					<sval type="int" val="2" />
					<sval type="int" val="131074" />
					<sval type="int" val="0" />
					<sval type="int" val="4" />
					<sval type="int" val="300" />
				</sval>
				<sval type="array" size="6">
					<sval type="int" val="125" />
					<sval type="int" val="-1610611447" />
					<sval type="int" val="131074" />
					<sval type="int" val="1" />
					<sval type="int" val="20" />
					<sval type="int" val="0" />
				</sval>
				<sval type="array" size="4">
					<sval type="int" val="105" />
					<sval type="int" val="-2147483647" />
					<sval type="int" val="4" />
					<sval type="int" val="50" />
				</sval>
				<sval type="array" size="2">
					<sval type="int" val="112" />
					<sval type="int" val="2" />
				</sval>
				<sval type="array" size="4">
					<sval type="int" val="704" />
					<sval type="int" val="131075" />
					<sval type="int" val="3" />
					<sval type="int" val="2" />
				</sval>
				<sval type="array" size="6">
					<sval type="int" val="102" />
					<sval type="string" val="anarkis.acc.is.compatible" />
					<sval type="int" val="-1610610429" />
					<sval type="int" val="131075" />
					<sval type="int" val="3" />
					<sval type="int" val="0" />
				</sval>
				<sval type="array" size="8">
					<sval type="int" val="102" />
					<sval type="string" val="anarkis.acc.wing.defendcarrier.pl" />
					<sval type="int" val="-2147483646" />
					<sval type="int" val="131075" />
					<sval type="int" val="3" />
					<sval type="int" val="1" />
					<sval type="int" val="131074" />
					<sval type="int" val="1" />
				</sval>
				<sval type="array" size="2">
					<sval type="int" val="112" />
					<sval type="int" val="11" />
				</sval>
				<sval type="array" size="6">
					<sval type="int" val="102" />
					<sval type="string" val="anarkis.acc.is.compatible" />
					<sval type="int" val="-1610609915" />
					<sval type="int" val="131074" />
					<sval type="int" val="2" />
					<sval type="int" val="0" />
				</sval>
				<sval type="array" size="8">
					<sval type="int" val="102" />
					<sval type="string" val="anarkis.acc.wing.defendcarrier.pl" />
					<sval type="int" val="-2147483646" />
					<sval type="int" val="131074" />
					<sval type="int" val="2" />
					<sval type="int" val="1" />
					<sval type="int" val="131074" />
					<sval type="int" val="1" />
				</sval>
				<sval type="array" size="3">
					<sval type="int" val="103" />
					<sval type="int" val="0" />
					<sval type="int" val="0" />
				</sval>
			</sval>
			<sval type="int" val="0" />
			<sval type="array" size="8">
				<sval type="array" size="3">
					<sval type="int" val="0" />
					<sval type="int" val="1" />
					<sval type="string" val="Multiple hotkey press recognition" />
				</sval>
				<sval type="array" size="2">
					<sval type="int" val="5" />
					<sval type="int" val="4" />
				</sval>
				<sval type="array" size="2">
					<sval type="int" val="5" />
					<sval type="int" val="2" />
				</sval>
				<sval type="array" size="3">
					<sval type="int" val="5" />
					<sval type="int" val="1" />
					<sval type="string" val="Available Ships will be dispatched in wings of variable size.  If playership has an ADS compatible homebase assigned, check this too; this way it is possible, to command a carrier from another ship" />
				</sval>
				<sval type="array" size="2">
					<sval type="int" val="11" />
					<sval type="int" val="4" />
				</sval>
				<sval type="array" size="2">
					<sval type="int" val="11" />
					<sval type="int" val="2" />
				</sval>
				<sval type="array" size="2">
					<sval type="int" val="12" />
					<sval type="int" val="2" />
				</sval>
				<sval type="array" size="2">
					<sval type="int" val="12" />
					<sval type="int" val="2" />
				</sval>
			</sval>
			<sval type="int" val="0" />
		</sval>
	</codearray>
</script>

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

Post by Nicoman35 » Fri, 20. Jun 14, 17:57

:o No, the debug code is not there - OK, I'm sick of amnesia. Mabe I should take a brake from modding...

rmazurek
Posts: 87
Joined: Tue, 13. Aug 13, 04:04
x3tc

Post by rmazurek » Fri, 20. Jun 14, 18:21

But not too long, please ;)
Even if I upgrade hardware to play X Rebirth I would like to play X3 anyway. Like it much more in many ways.

Post Reply

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