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 » Wed, 22. Jan 14, 09:10

I got a question: I want to make passengers and marines available on stations. As stations can not contain marines or passengers, I have to replace them by variables.
But now I got a problem. While on training, I want in some menus to have dynamic displays.
A marine or mechanic (passenger) are handled as objects, which are easyer to handle than just variables.
While on training, a script is running on each member currently training. I want to do something similar for stations.
Running the task on the station is not an option, as I want this more flexible (user should be able to move members in training from station to ship back and forth)
Also, I want to avoid global tasks, as the handling seems very complicated to me. So, I have the idea, of creating an invincible object (e.g. astronaut) far away, and let the dynamic training timer run on this object.
Question: Do you guys know any smarter way of doing that? Maybe create the object in null?

User avatar
DrBullwinkle
Posts: 5715
Joined: Sat, 17. Dec 11, 01:44
x3tc

Post by DrBullwinkle » Wed, 22. Jan 14, 09:13

Equipment Docks can hold marines. You will have to test to see whether you can do all that you want to do.

squshy7
Posts: 6
Joined: Sun, 29. Jul 12, 15:54
x3ap

Post by squshy7 » Sat, 25. Jan 14, 18:53

hey guys,
ive searched allll over this thread and the original ADS thread and I cannot come up with an answer.

Are TM's incapable of hiring mechanics?
I have tried with one in both argon prime and the wall, it has the ADS manager working and a cargo life support system, but when I go into the ADS manager for the TM (this is a magnetar specifically), there is no "repair bay" option to hire mechanics. Or are mechanics hired in a different menu?

EDIT: ok so with a little experimentation with cheat menu, apparently TM class can't hire mechanics (M1 is working just fine so the script is working ok); i assume this is by design? Also, if I wanted to make TMs available to have repair bays, does anyone what xmls in ADS I would need to edit?

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

Post by Nicoman35 » Sat, 25. Jan 14, 20:10

squshy7 wrote:hey guys,
ive searched allll over this thread and the original ADS thread and I cannot come up with an answer.

Are TM's incapable of hiring mechanics?
I have tried with one in both argon prime and the wall, it has the ADS manager working and a cargo life support system, but when I go into the ADS manager for the TM (this is a magnetar specifically), there is no "repair bay" option to hire mechanics. Or are mechanics hired in a different menu?

EDIT: ok so with a little experimentation with cheat menu, apparently TM class can't hire mechanics (M1 is working just fine so the script is working ok); i assume this is by design? Also, if I wanted to make TMs available to have repair bays, does anyone what xmls in ADS I would need to edit?
Yup, I ignored TM's, as I thaught they are not big enough to hold repair sections / barracks and such.
v1.13 WILL have TM support, this means I will include TM's to not compromise the idea of a TM as a 'poor man carrier'.
This might take a while though :(

DevilishMoney
Posts: 114
Joined: Tue, 29. Dec 09, 14:01
x3ap

Post by DevilishMoney » Sun, 26. Jan 14, 20:52

Will this work with Shimrod Smart turrets script as I see from the first post that it has options for Mars Turrets.

Thanks

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

Post by Nicoman35 » Sun, 26. Jan 14, 22:37

DevilishMoney wrote:Will this work with Shimrod Smart turrets script as I see from the first post that it has options for Mars Turrets.
Simply test it, nerver tested it myself yet, as I am working on on another part of this constuction site at the moment.
There cannot happen much beside ADS not using smart turrets ;)

DevilishMoney
Posts: 114
Joined: Tue, 29. Dec 09, 14:01
x3ap

Post by DevilishMoney » Sun, 26. Jan 14, 22:44

Thanks for the reply, will not been able to test for atleast two weeks as I am going on holiday will test when I get back.

Thanks

User avatar
Serial Kicked
Posts: 3823
Joined: Fri, 12. Aug 05, 20:46
x3tc

Post by Serial Kicked » Tue, 28. Jan 14, 01:10

Oh, i just noticed this version of my script, nice work !

Thanks for keeping my stuff up to date, nicoman35.
I will add some links on my official website toward your script.

Cheers,
SK.

// EDIT:

If you have questions regarding ADS coding and 3rd party integration, I'd suggest you to contact me via mail, I don't check this board very often.

// EDIT2:

Defense Grid was working correctly last time i checked. I have a few save-games with days of SETA 10x where ADS was defending a small empire using DG successfully. It may not be intuitive to use, had a few requirements and setup to do, but "not working" isn't the word to describe it (well, except if i screwed the script packaging & zipping which I kinda doubt).
X3:TC/AP Pirate Guild 3 - Yaki Armada 2 - Anarkis Defense System

Anarkis Gaming HQ
Independent Game Development
X3 Scripting and Modding Station

User avatar
DrBullwinkle
Posts: 5715
Joined: Sat, 17. Dec 11, 01:44
x3tc

Post by DrBullwinkle » Tue, 28. Jan 14, 01:53

Serial Kicked! Yay!

You have been missed.

User avatar
Serial Kicked
Posts: 3823
Joined: Fri, 12. Aug 05, 20:46
x3tc

Post by Serial Kicked » Tue, 28. Jan 14, 05:06

DrBullwinkle wrote:Serial Kicked! Yay!

You have been missed.
Thanks man :)

But I'm not here to stay, I have other projects going on and no interest whatsoever in X:Rebirth (sadly).

--

Ahem, well, I looked at this ADS fork, I have not read everything, but there's a lot of major issues at first glance. I am sorry if I am going to sound harsh, it's not really intended. But what have you done to my baby?!

The auto-carrier, the core feature of ADS, is completely broken beyond repair. It was probably the most commented and well written part of ADS, which is kinda logical given that I have improved it since X3:Reunion is out. And for some reason you managed to both increase its length and reduce its efficiency and feature count.

The 'smart' way it used to send wings of specific size against each individual threat while defending the carrier is gone, replaced by a call to attack.all.and.land to your wings. It's kinda sad to butcher it just to shoehorn the "real" wing system which is known for being less efficient. Not using !wing commands was not an oversight on my part, it was on purpose. The *only* advantage of !wing commands over mine is the nice display on the sector main, downsides are plentiful.

You force carriers to patrol into the autocarrier task, I don't know why. In the official ADS, carriers are able to run any command (including patrols across multiple sectors) without issue. This will break the defense grid if it tries to call a ship running autocarrier as a result. Autocarrier is a secondary task, it shouldn't interfere with the main task 0, except, maybe with a standby order while fighters are undocking/docking and even in this case, you want to interrupt the main task, not to replace it.

After a relatively long check, it doesn't seem to use my custom attack, protect, return.home (etc.) scripts at all. Instead it uses default Egosoft !wing.cmd scripts. As a result my fail-safe return home script isn't called and fighters may (rarely, it's like one out of a few hundreds under the right condition but it's annoying as hell when it happens) get caught by the infamous zombie bug: fighter won't answer any command, manual or script. Except if said bug has been fixed by egosoft in X3:AP of course (but let's be serious :))

Also, not using my custom signals and commands also means it has a reduced compatibility with 3rd party scripts. Some of my variables that can be (and are more commonly than you think) used by other scripters to check what my script are doing are not set properly. (may also cause defense grid to break if proper variables are not set, not checked)

Still, there's good ideas in the menu system and all the simple stuff (resupply, trade, mechanics, general ease and feel of the menu itself). New features seem to work as advertised, despite some being against the spirit of the original script (mechanics as a ware).

Also, to answer a previous post of yours, don't follow your idea of creating specific tasks for each passenger. There's a good reason why I use variables performance wise. And don't create anything in the "null" sector (seriously?)

It's not compatible with Pirate Guild or Yaki Armada, and it can't be without a major rewrite of both them and your ADS fork. Given what I have seen so far, I am not comfortable giving you the authorization to do so as their respective code is way more complex.

Sorry.

// EDIT: Also i hope you haven't modified any anarkis.lib.* file. Because they are used by all my scripts. So if you need to modify one, make a copy of it to avoid even further compatibility issues.
X3:TC/AP Pirate Guild 3 - Yaki Armada 2 - Anarkis Defense System

Anarkis Gaming HQ
Independent Game Development
X3 Scripting and Modding Station

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

Post by Nicoman35 » Tue, 28. Jan 14, 11:30

Hey Serial,
nice to see you around! :)
And thank you for your statement, finally some feedback after a long time.
I admit there are a lot of issues with ADS, especially regarding autocarrier and compatibility with Pirate Gulild 3 and Yaki armada 2.

When I began modifying ADS, I had the idea in mind, to have wings displayed at the map. So, I began doing exactely that.
I used the stock wing commands, which are crappy sometimes. I did not know of your custom commands for wings untill now.

Also, I am not a native programmer. Working on ADS, I got more and more experienced. In the beginning, I only had little to none scripting experience.
So I just began adding and modifying things in one place of this script, testing the cosequences. I am doing that right to the minute.

I did not and still do not have the entire overview to get everything working, but if I would have waited untill everyting runns smoothly -> me: :goner: you: :goner:
I made some design desicions which probably not everyone likes, but hey - I did my very best.
And I will continue my work, and sharing it with others. I am happy if someone has fun with it. If not - well - don't use it :).
Serial Kicked wrote:And don't create anything in the "null" sector (seriously?)
Why not?

User avatar
Serial Kicked
Posts: 3823
Joined: Fri, 12. Aug 05, 20:46
x3tc

Post by Serial Kicked » Tue, 28. Jan 14, 17:08

wow when I click the reply button I'm sent back to the forum index ? I had to use the quote button instead. Weird.

Anyway,
I used the stock wing commands, which are crappy sometimes. I did not know of your custom commands for wings untill now.
you should have stumbled across them, given that you removed their call from ads.autocarrier.xml. That's kinda my issue with your fork. I don't really mind someone taking over, on the contrary given the fact that I am working on my own game now. There's a lot of room for improvement, as you did with handling TS, resupply, bug-fixes, and other stuff.

But removing the main feature of ADS (which was being the best and least CPU intensive non cheating carrier AI available) so you can put another system in its place, not so much. Especially when it render the fork incompatible with my other plugins.
.[..] I only had little to none scripting experience.
So I just began adding and modifying things in one place of this script, testing the cosequences. I am doing that right to the minute.
Yeah I noticed, it's fairly easy to see the level of experience of someone when you can read his code. You have not chosen an easy script to begin scripting with. There's a hell a lot of code that's there for very specific reasons like getting around the game's engine undocumented bugs and weirdness. I don't even remember all the details myself.
[...]I would have waited untill everyting runns smoothly -> me: :goner: you: :goner:
I am not saying that.
I don't mind the bugs, I mind the step back in AI. ADS using the stock commands to protect / attack a sector isn't ADS.
And I will continue my work, and sharing it with others. I am happy if someone has fun with it. If not - well - don't use it :).
Errr... At the moment, that's not what I intend to do but you are very wrong on that point. I can perfectly kill your project, at least on this board and most of the major 3rd party sites. This is my work and you didn't get any authorization from me, nor asked for one. It wouldn't be the first time I get a clone to be removed from existence.

But as I said, I really don't want to go to such length and I assume you work in good faith, so a few (more or less mandatory) advices instead:

1) Your major additions are outside of the autocarrier script, and that the missile stuff you integrated can be easily moved to the individual ship commands or when ships are prepped before launch. So, instead of overwriting my files and libraries with your code (I am talking about the automated AI and ship commands. Not the menu system), you make copies of the file you really need to modify and call the said copies instead of the original files. PG and YA would then be much happier to find the real deal untouched. Development 101 ;)

Here is the list of files you have to keep intact if you want to be compatible with PG/YA:

- anarkis.acc.apply.active
- anarkis.acc.apply.relations
- anarkis.acc.cmd.* (except those with .pl)
- anarkis.acc.evaluate.*
- anarkis.acc.get.*
- anarkis.acc.lib.*
- anarkis.acc.repairshields
- anarkis.acc.repairshields.single
- anarkis.acc.task.autocarrier.npc
- anarkis.acc.task.hullcheck
- anarkis.acc.task.repairs
- anarkis.acc.signal.*
- anarkis.acc.wing.*
- anarkis.lib.*

You may want to check internal script calls of those files to check I have not missed one or two, but i think it's the full list. If you desperately need to modify one of them, make a copy and use it instead..

2) You have renamed the global variable used by all my plugins (and any plugin in general) to detect ADS and used to register it to the ECS feed, just to append your RWE at the end... Don't do that, obviously.

3) Speaking of globals and locals. If you really need to add new variables and settings (as you did), use your own variables (as you didn't). Don't interfere with the already existing globals and locals for compatibility reasons.

I just noticed while browsing your code that you rarely use the same logic to dock or use ships. You are obviously copy-pasting stuff from other scripters, do they know ?

Serial Kicked wrote:And don't create anything in the "null" sector (seriously?)
Why not?
null sec. is likely to be outside of the memory attributed to the game. That's more or less playing with fire. Depending on how the game is coded internally it can range from harmless to a ticking time bomb. Also, stuff there think they are in the Boron sector in (0,0), the map tend to think that too, but many "search/find" script commands have no idea where to find the stuff put into this "sector" (and the other way around scripts monitoring the boron sector may or may not get the stuff you created in null).


Also, as a side note, all my scripts have anarkis.debug.* scripts that are fairly easy to use, log in a text file and also display the message on screen. They can be disabled/enabled with a single global or script call. So you may want to use that so your debug log is not running all over your released version. Especially given the massive amount of logging you do, it would save you quite a lot of time in the end.
X3:TC/AP Pirate Guild 3 - Yaki Armada 2 - Anarkis Defense System

Anarkis Gaming HQ
Independent Game Development
X3 Scripting and Modding Station

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

Post by Nicoman35 » Tue, 28. Jan 14, 20:14

You have bad memory:
Serial Kicked wrote:I thought it was already included in the release topic.

Anyway:

My scripts & plugins can be used in any mod as long as you let me know and link the original topic in your release readme/topic/whatever.

My libraries can be freely reused anywhere with or without modifications.
Sad that you are not the person I have imagined. Last time I commented on you. Nice to have you met.

User avatar
Serial Kicked
Posts: 3823
Joined: Fri, 12. Aug 05, 20:46
x3tc

Post by Serial Kicked » Tue, 28. Jan 14, 20:44

Nicoman35 wrote:You have bad memory:
Serial Kicked wrote:I thought it was already included in the release topic.

Anyway:

My scripts & plugins can be used in any mod as long as you let me know and link the original topic in your release readme/topic/whatever.

My libraries can be freely reused anywhere with or without modifications.
Sad that you are not the person I have imagined. Last time I commented on you. Nice to have you met.
:roll:

Libraries is a keyword here. Like ECS and my anarkis.lib.* files. I never said anything about hacking my scripts and plugins without my consent. I said that my scripts/plugins can be included in 3rd party mods that's all, which is not the same at all. And even then, it's fairly obvious that copied libraries should be renamed to ensure compatibility with other scripts that may use the original version.

I spent an hour or two finding what files you should keep intact to keep your fork compatible with PG/YA, why your stuff isn't detected by my scripts at all, clued you on how to proceed to get the best of both worlds, and I gave you the authorization to continue granted a few healthy changes for the sake of compatibility.

So I am not exactly sure to know what you are angry about right now, nor what you expect me to do about it.
X3:TC/AP Pirate Guild 3 - Yaki Armada 2 - Anarkis Defense System

Anarkis Gaming HQ
Independent Game Development
X3 Scripting and Modding Station

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

Post by Jingai » Thu, 6. Feb 14, 21:16

Will thiss work with AP 3.1?

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:)

Post Reply

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