[MOD] Captain and Defense Officer AI Overhaul (CDOAIO) v0.03 beta (New on 12 Apr.)
Moderators: Scripting / Modding Moderators, Moderators for English X Forum
-
- Posts: 63
- Joined: Sun, 5. Jan 14, 12:07
[MOD] Captain and Defense Officer AI Overhaul (CDOAIO) v0.03 beta (New on 12 Apr.)
The Captain and Defense Officer AI Overhaul (CDOAIO) mod adds a variety of new features and performance improvements to captain and defense officer AIs, most of which vary in significance with NPC skills. It includes a complete re-write of the defense officer AI used for capital ships, as well as the AI for capital ship captains attacking enemy ships. It also makes huge changes to the defence officer AI for stations, and the generic movement and undocking scripts for capital ship captains.
Changes to defence officer (both on stations and capital ships) include:
- Defense officers with at least 2 star combat skills can target surface elements on stations.
- Defense officers with at least 3 star combat skills can target surface elements on capital ships.
- Defense officers on capital ships which carry drones can launch groups of combat drones much more frequently with in increasing leadership skill. A defense officer with 5 star leadership skills can launch drones a little over four times faster than a defense officer with 1 star leadership skills.
- Defense officers scan the area more often during battle with increasing combat skill, meaning a defense officer with greater combat skill is very likely to realize when a new enemy has arrived, or an existing one has been destroyed, faster than one with lesser combat skill. (There is an element of random chance here though, as well.)
- Defense Officers can become demoralized and/or panic in battle. When this happens, they will occasionally randomly miss an opportunity to launch drones, or miss a scanning cycle. Their level of panic/demoralization depends on the outlook of the battle (how strong friendly ships are that are fighting with them, and how strong their enemies are). The defense officer's morale determines how easily rattled they are by long odds in battle, and thus, how likely they are to make a mistake under pressure.
Changes to captain include:
- Captains with at least 3 star navigation skills can use their jump drives in sector. Captains with 3 star navigation skill can jump a minimum distance of 300km.
- Captains with 4 star navigation skills can jump a minimum distance of 200km.
- Captains with 5 star navigation skills can jump a minimum distance of 100km.
- Captains keep their crew organized and motivated better with increasing leadership skill, which means that a ship with a captain highly skilled in leadership will often respond to new orders much faster than one with a captain who is a poor leader. (There is an element of random chance here, as sometimes a poor leader will still respond quickly, but a skilled leader always will.)
- Captains can move their ships more precisely, and will maneuver closer to objects or points in space they are trying to approach with increasing navigation skill.
- Captains will take note of enemy ship movement and relocate their ships to stay within firing range of an enemy they are attacking more regularly with increasing combat skill.
Important notes on compatibility:
There are two versions of this mod because it is incompatible with the IgnoreFuel mod by Hiiro, which is one of the most popular mods ever for X Rebirth. The base mod (CDOAIO_basic.7z) is for those who want to play having to refuel their capital ships' jump drives as is done in the base game. The other version (CDOAIO_IgnoreJumpFuel.7z) has exactly the same effect as the IgnoreFuel mod, allowing player owned capital ships to jump without consuming fuel, in addition to everything that is in the base mod. Do not use EITHER of these with the IgnoreFuel mod. It won't work.
This mod should be compatible with all other mods I have seen, and the ability of skilled captains to perform in-sector jumps should work when they are ordered to move with the (must-have) Manual Command Extension by Jack08/Berserk_Knight.
Hints:
These changes all apply equally to AI controlled ships/stations and ships/stations controlled by the player. Players need to be smarter in battle, as enemy ships and stations may not always just blindly fire at your ships' and stations' hulls as they always have. They may target surface elements as well. They may also be able to unleash a storm of drones like none ever seen in the base game. Unlike in the base game, a weaker ship with a good defense officer can sometimes defeat a more powerful ship with an incompetent one, and there is no way to predict the skill of the captain or defense officer on a ship spawned for a mission.
-----------------------------
Changes and Updates
-----------------------------
v 0.03 beta
- compatibility with base game version 1.30
- fixed bug preventing highly skilled captains from using jump gates
- fixed minor, rarely seen bug that could (rarely) interrupt and restart capital ship defense officer script when no enemies were present
v 0.02 beta
- fixed bug that could occasionally, in some cases, cause defense officers on friendly stations to briefly open fire on the player ship for no reason, then realize the player was friendly, and cease fire
v 0.01 beta
- initial release
Download:
http://www.nexusmods.com/xrebirth/mods/375/?
Changes to defence officer (both on stations and capital ships) include:
- Defense officers with at least 2 star combat skills can target surface elements on stations.
- Defense officers with at least 3 star combat skills can target surface elements on capital ships.
- Defense officers on capital ships which carry drones can launch groups of combat drones much more frequently with in increasing leadership skill. A defense officer with 5 star leadership skills can launch drones a little over four times faster than a defense officer with 1 star leadership skills.
- Defense officers scan the area more often during battle with increasing combat skill, meaning a defense officer with greater combat skill is very likely to realize when a new enemy has arrived, or an existing one has been destroyed, faster than one with lesser combat skill. (There is an element of random chance here though, as well.)
- Defense Officers can become demoralized and/or panic in battle. When this happens, they will occasionally randomly miss an opportunity to launch drones, or miss a scanning cycle. Their level of panic/demoralization depends on the outlook of the battle (how strong friendly ships are that are fighting with them, and how strong their enemies are). The defense officer's morale determines how easily rattled they are by long odds in battle, and thus, how likely they are to make a mistake under pressure.
Changes to captain include:
- Captains with at least 3 star navigation skills can use their jump drives in sector. Captains with 3 star navigation skill can jump a minimum distance of 300km.
- Captains with 4 star navigation skills can jump a minimum distance of 200km.
- Captains with 5 star navigation skills can jump a minimum distance of 100km.
- Captains keep their crew organized and motivated better with increasing leadership skill, which means that a ship with a captain highly skilled in leadership will often respond to new orders much faster than one with a captain who is a poor leader. (There is an element of random chance here, as sometimes a poor leader will still respond quickly, but a skilled leader always will.)
- Captains can move their ships more precisely, and will maneuver closer to objects or points in space they are trying to approach with increasing navigation skill.
- Captains will take note of enemy ship movement and relocate their ships to stay within firing range of an enemy they are attacking more regularly with increasing combat skill.
Important notes on compatibility:
There are two versions of this mod because it is incompatible with the IgnoreFuel mod by Hiiro, which is one of the most popular mods ever for X Rebirth. The base mod (CDOAIO_basic.7z) is for those who want to play having to refuel their capital ships' jump drives as is done in the base game. The other version (CDOAIO_IgnoreJumpFuel.7z) has exactly the same effect as the IgnoreFuel mod, allowing player owned capital ships to jump without consuming fuel, in addition to everything that is in the base mod. Do not use EITHER of these with the IgnoreFuel mod. It won't work.
This mod should be compatible with all other mods I have seen, and the ability of skilled captains to perform in-sector jumps should work when they are ordered to move with the (must-have) Manual Command Extension by Jack08/Berserk_Knight.
Hints:
These changes all apply equally to AI controlled ships/stations and ships/stations controlled by the player. Players need to be smarter in battle, as enemy ships and stations may not always just blindly fire at your ships' and stations' hulls as they always have. They may target surface elements as well. They may also be able to unleash a storm of drones like none ever seen in the base game. Unlike in the base game, a weaker ship with a good defense officer can sometimes defeat a more powerful ship with an incompetent one, and there is no way to predict the skill of the captain or defense officer on a ship spawned for a mission.
-----------------------------
Changes and Updates
-----------------------------
v 0.03 beta
- compatibility with base game version 1.30
- fixed bug preventing highly skilled captains from using jump gates
- fixed minor, rarely seen bug that could (rarely) interrupt and restart capital ship defense officer script when no enemies were present
v 0.02 beta
- fixed bug that could occasionally, in some cases, cause defense officers on friendly stations to briefly open fire on the player ship for no reason, then realize the player was friendly, and cease fire
v 0.01 beta
- initial release
Download:
http://www.nexusmods.com/xrebirth/mods/375/?
Last edited by clj on Sun, 13. Apr 14, 03:38, edited 4 times in total.
-
- Posts: 719
- Joined: Mon, 19. Dec 11, 22:59
Oooh this looks nice , Il give it a god later.
X4 Advert Redesign : https://www.nexusmods.com/x4foundations/mods/899
Split Voice Overhaul : https://www.nexusmods.com/x4foundations/mods/598
Split Voice Overhaul : https://www.nexusmods.com/x4foundations/mods/598
-
- Posts: 176
- Joined: Sat, 7. Feb 09, 20:53
hi... love this... cant wait to get it tested,
I have MCE & UFO installed.
just wanted to know if it works with UFO ? as it also rewrites defence officer scrip's or should I only use MCE with it ?
thanks
kat
I have MCE & UFO installed.
just wanted to know if it works with UFO ? as it also rewrites defence officer scrip's or should I only use MCE with it ?
thanks
kat
Q9550 2.83Ghz @ 3.4Ghz - 1600Mhz FSB
4GB corsair domi P2-8500/1066 DHX + Domi Fan
XFX6970 2GB 5500/880 + LG-Flattron W2453TQ
4GB corsair domi P2-8500/1066 DHX + Domi Fan
XFX6970 2GB 5500/880 + LG-Flattron W2453TQ
-
- Posts: 2774
- Joined: Tue, 29. Oct 13, 21:59
-
- Posts: 63
- Joined: Sun, 5. Jan 14, 12:07
UFO mod compatibility
@Commander Kat
UFO doesn't modify any of the base movement or combat scripts that this mod modifies, so at the very least they shouldn't cause any problems for each other. I just looked at a few of the UFO scripts now. I haven't gone through all of the UFO movement scripts yet, only a few of them, but from the ones I have looked at so far, it looks like they all call the same generic movement and undocking scripts that MCE does, so this mod should be fully compatible with UFO, meaning that, when UFO is used to order a ship to do something, the changes this mod makes should be accounted for. Let me know if you have any problems using UFO though.hi... love this... cant wait to get it tested,
I have MCE & UFO installed.
just wanted to know if it works with UFO ? as it also rewrites defence officer scrip's or should I only use MCE with it ?
thanks
kat
-
- Posts: 63
- Joined: Sun, 5. Jan 14, 12:07
New version available
I have released v 0.02 beta, which has the same features, but fixes a bug that would occasionally, in some cases, cause defense officers on friendly stations to briefly open fire on the player ship for no reason, then realize the player was friendly, and cease fire.
-
- Moderator (English)
- Posts: 8074
- Joined: Tue, 30. Mar 04, 12:28
-
- Posts: 12
- Joined: Tue, 26. Nov 13, 15:01
-
- Posts: 63
- Joined: Sun, 5. Jan 14, 12:07
@Sparky Sparkycorp
Thanks a lot! I may take you up on that soon. And sorry for the late reply, I haven't been around here in a while.
@mitasamodel
I haven't actually tested this with the new version of the game yet, so I can't be sure, but I don't think that CDOAIO is the cause of this problem, as I have seen other people who aren't using the mod (or at least didn't report using it) complain about this in the patch public beta forum. I suspect that this is a bug in the vanilla game. Still, you could uninstall CDOAIO and see if the problem persists. If it doesn't, then you know it is the mod, and you should definitely let me know about that.
Thanks a lot! I may take you up on that soon. And sorry for the late reply, I haven't been around here in a while.
@mitasamodel
I haven't actually tested this with the new version of the game yet, so I can't be sure, but I don't think that CDOAIO is the cause of this problem, as I have seen other people who aren't using the mod (or at least didn't report using it) complain about this in the patch public beta forum. I suspect that this is a bug in the vanilla game. Still, you could uninstall CDOAIO and see if the problem persists. If it doesn't, then you know it is the mod, and you should definitely let me know about that.
-
- Posts: 12
- Joined: Tue, 26. Nov 13, 15:01
Yes, I tested it with CDOAIO and then without it. Without CDOAIO it works correctly. But I'm absolutely sure that I want to play with this modclj wrote: I haven't actually tested this with the new version of the game yet, so I can't be sure, but I don't think that CDOAIO is the cause of this problem, as I have seen other people who aren't using the mod (or at least didn't report using it) complain about this in the patch public beta forum. I suspect that this is a bug in the vanilla game. Still, you could uninstall CDOAIO and see if the problem persists. If it doesn't, then you know it is the mod, and you should definitely let me know about that.

Game version is 1.30 (beta).
Additional info.
I command my ships via MCE to move to DeVries while we are located in Auspicious Excavation (Lookout Alpha, Albion). And they don't move at all.
If it is necessary, I will check if they move to me through gate if I go there first.
-
- Posts: 63
- Joined: Sun, 5. Jan 14, 12:07
-
- Posts: 25
- Joined: Sat, 1. Aug 09, 16:18
The problem is the forcejump value. If you set it to true ships wont fly through Gates, maybe if you escape movements in other Galaxy’s it would work or you can set the direct jump flag but that will have dramatic changes to movement (Albion → Maelstrom 1 jump). For the time being I will use your mod without the move.generic.xml and in sector jump.
-
- Posts: 63
- Joined: Sun, 5. Jan 14, 12:07
@Escaflow
I didn't look carefully enough at all the scripts that interact with the ones I was modifying, just the modded ones themselves. I have been using it since I wrote it, but never actually ordered one of my cap ships through a jump gate, so managed not to notice this problem in my own games.
I have a much better way to fix this problem, that will let cap ships with sufficiently skilled captains jump to the zone containing the gate, move through the gate, and then jump again to reach their destination, in the way that the mod's description would lead you believe they should. I have it written, and am testing it now. Assuming it works, I will get his published to the Nexus soon.
Although it wasn't in the patch notes, the 1.30 RC3 beta patch made a slight improvement to drone behavior, allowing them to engage multiple targets at once, instead of having to wait until one preferred target is destroyed to shoot at another. The current version of this mod prevents drones launched from carriers from doing this. I fixed that already in the next version, 0.03, but I haven't released it yet because this makes it incompatible with the current release version of the game, 1.25HF1.
I'm not sure if I should release a version which fixes this bug, and is compatible with 1.25HF1, and another one, possibly 0.04 later for compatibility with 1.30, or what... thoughts?
Thank you SO MUCH for pointing this out. You saved me who knows how much time hunting for the problem. I'm somewhat embarrassed about having not caught that in initially writing this mod.The problem is the forcejump value. If you set it to true ships wont fly through Gates, maybe if you escape movements in other Galaxy’s it would work or you can set the direct jump flag but that will have dramatic changes to movement (Albion → Maelstrom 1 jump). For the time being I will use your mod without the move.generic.xml and in sector jump.

I have a much better way to fix this problem, that will let cap ships with sufficiently skilled captains jump to the zone containing the gate, move through the gate, and then jump again to reach their destination, in the way that the mod's description would lead you believe they should. I have it written, and am testing it now. Assuming it works, I will get his published to the Nexus soon.
Although it wasn't in the patch notes, the 1.30 RC3 beta patch made a slight improvement to drone behavior, allowing them to engage multiple targets at once, instead of having to wait until one preferred target is destroyed to shoot at another. The current version of this mod prevents drones launched from carriers from doing this. I fixed that already in the next version, 0.03, but I haven't released it yet because this makes it incompatible with the current release version of the game, 1.25HF1.

-
- Posts: 63
- Joined: Sun, 5. Jan 14, 12:07
I have now corrected the bug that was preventing capital ships with skilled captains from using jump gates, in a way that will bring about the behavior that the MOD's description would lead you to expect. If ordered to move to a specific zone in another system, they will jump from zone to zone, and sector to sector along the way, and use the jump gate, to get to their destination as quickly as possible.
I have also updated the MOD to make use of new improvements in 1.30.
I have also updated the MOD to make use of new improvements in 1.30.
-
- Posts: 25
- Joined: Sat, 1. Aug 09, 16:18
While sweeping around another mod I came across a “maybe maybe not” issue in your fight.attack.object.capital.xml.
You are using the same script for IS and OOS (if <attention min="unknown"> is OOS) where ships are lunching drones.
Since the OOS combat is wildly broken and drones may or (mostly) may not docking at their carrier
(and in this progress are destroyed by move.dockat.drone) it could be a good idea to stay with the vanilla OOS combat or give a percentage bonus for each combat rank.
Personally I would like a version without in sector jump since I like this “riding the bullet” style while in the gravi-range-tingy of capships and never higher a Captain under 4 stars
You are using the same script for IS and OOS (if <attention min="unknown"> is OOS) where ships are lunching drones.
Since the OOS combat is wildly broken and drones may or (mostly) may not docking at their carrier
(and in this progress are destroyed by move.dockat.drone) it could be a good idea to stay with the vanilla OOS combat or give a percentage bonus for each combat rank.
Personally I would like a version without in sector jump since I like this “riding the bullet” style while in the gravi-range-tingy of capships and never higher a Captain under 4 stars

-
- Posts: 88
- Joined: Wed, 1. Jul 09, 21:03
-
- Posts: 63
- Joined: Sun, 5. Jan 14, 12:07
Escaflow wrote:
That said, I think it would be insane not have defence officers be able to lunch drones at the rate their skills allow them to whether they are in sight of the player or not. Otherwise, a ship that is very strong while the player i watching might lose it's edge in battle as soon as the player flies away, or docks somewhere.
It did occur to me to do exaclt as you suggested, and simply add a bonus for defense officer combat skills to the vanilla <attention min="inknown" > combat script. The problem with that is that a general cobat bonus doesn't have quite the same affect as being able to launch drones faster no matter what the value of that bonus is. I really, really wanted to ensure that battles would turn out the same way whether the player was present or not. Even if a bonus could, in principle, have that effect, I can't imagine how I would ever figure out the perfect value for the bonus to make that happen. It would probably have to be different for different ship types, different types on drones on board, etc. It would be a nightmare.
You can get exactly this by doing the following:
1.) Download the latest version of the CDOAIO MOD from the Nexus (either the basic, or ignore jump fuel version, whichever you prefer).
2.) In the MOD's aiscripts folder, open move.generic.xml in any text editor you like. Search for the following code:
This line will appear in three places if you are using the basic version, or six places if you are using the IgnoreJumpFuel version. Simply go to each of these lines, and change "true" to "false", so that they look like this:
That SHOULD leave all other changes associated with this mod in place, but remove the feature that allows skilled captains to use their jump drives in sector. 
jacko8787 wrote:
http://www.nexusmods.com/xrebirth/mods/357/?
I think the issue you bring up is improved, if not fixed, in patch 1.30. I'm not positive, but I seem to remember that being discussed in the patch public beta forum, and there are several drone related fixes in the patch notes.You are using the same script for IS and OOS (if <attention min="unknown"> is OOS) where ships are lunching drones.
Since the OOS combat is wildly broken and drones may or (mostly) may not docking at their carrier
(and in this progress are destroyed by move.dockat.drone) it could be a good idea to stay with the vanilla OOS combat or give a percentage bonus for each combat rank.
That said, I think it would be insane not have defence officers be able to lunch drones at the rate their skills allow them to whether they are in sight of the player or not. Otherwise, a ship that is very strong while the player i watching might lose it's edge in battle as soon as the player flies away, or docks somewhere.
It did occur to me to do exaclt as you suggested, and simply add a bonus for defense officer combat skills to the vanilla <attention min="inknown" > combat script. The problem with that is that a general cobat bonus doesn't have quite the same affect as being able to launch drones faster no matter what the value of that bonus is. I really, really wanted to ensure that battles would turn out the same way whether the player was present or not. Even if a bonus could, in principle, have that effect, I can't imagine how I would ever figure out the perfect value for the bonus to make that happen. It would probably have to be different for different ship types, different types on drones on board, etc. It would be a nightmare.
This is actually really easy.Personally I would like a version without in sector jump since I like this “riding the bullet” style while in the gravi-range-tingy of capships and never higher a Captain under 4 stars

1.) Download the latest version of the CDOAIO MOD from the Nexus (either the basic, or ignore jump fuel version, whichever you prefer).
2.) In the MOD's aiscripts folder, open move.generic.xml in any text editor you like. Search for the following code:
Code: Select all
<param name="forcejumpusegates" value="true" />
Code: Select all
<param name="forcejumpusegates" value="false" />

jacko8787 wrote:
No, I'm afraid not, but you should be able to do that using the Manual Command Extension (MCE) now maintained by Berserk Knight. You can get it from the Nexus here:Does this mod gives you the option to assign small fighters to a Capital Ship such as the Sucellus or the Balor (whom doesn´t have drones) so they escort them and figth for them?
http://www.nexusmods.com/xrebirth/mods/357/?
-
- Posts: 25
- Joined: Sat, 1. Aug 09, 16:18
You are using the same script for IS and OOS (if <attention min="unknown"> is OOS) where ships are lunching drones.
Since the OOS combat is wildly broken and drones may or (mostly) may not docking at their carrier
(and in this progress are destroyed by move.dockat.drone) it could be a good idea to stay with the vanilla OOS combat or give a percentage bonus for each combat rank.
Its kinda fixed...ished.... something. The only problem with drones I encounter are player drones witch even in 1.30 wont return always and just stand there doing nothing.clj wrote:I think the issue you bring up is improved, if not fixed, in patch 1.30.
Its a neat idea and I like it a lot BUT the only thing drones are doing OOS is a basic “<run_script name="'move.dockat.drone'" sinceversion="1">” or simply self-destruct, you only got more CPU cycles burned :/clj wrote:That said, I think it would be insane not have defence officers be able to lunch drones at the rate their skills allow them to whether they are in sight of the player or not.
The real problem is that none of us knows what the hell “<get_attackstrength object="this.ship" target="$target" result="$result" />” returns and what values are used for it.clj wrote:The problem with that is that a general cobat bonus doesn't have quite the same affect as being able to launch drones faster no matter what the value of that bonus is.
Maybe the drones are taken into account or are just ignored or is just The Answer to the Ultimate Question of Life, the Universe, and Everything

… or I just delete move.generic and move.jump?clj wrote:This is actually really easy.You can get exactly this by doing the following:
[...]

Vanilla you can assign small ships to capships by just assign to the commander, but they don't do anything.jacko8787 wrote:Does this mod gives you the option to assign small fighters to a Capital Ship such as the Sucellus or the Balor (whom doesn´t have drones) so they escort them and figth for them?
What I don't get straight is the fact that NPC scripts mostly working fine. If you attack an capship drones get launched, attack you and fly back when you get out of range.
When there is an escort of small ships they break formation and defend the main ship. Why don't player ships do this?
-
- Moderator (English)
- Posts: 8074
- Joined: Tue, 30. Mar 04, 12:28
Hi clj,
With 2.0 re-fixing the Balor and Sucellus main weapons, is your mod compatible?
Regarding the issue of drone accumulation in some systems, I lost track of the various threads discussing possible causes. Was this mod a realistic possibility for the cause?
This is a nice mod and I thank you for it's creation.
Regards,
Sparks
With 2.0 re-fixing the Balor and Sucellus main weapons, is your mod compatible?
Regarding the issue of drone accumulation in some systems, I lost track of the various threads discussing possible causes. Was this mod a realistic possibility for the cause?
This is a nice mod and I thank you for it's creation.
Regards,
Sparks
-
- Posts: 1269
- Joined: Sat, 11. Sep 04, 16:43