[MOD] UFO - Ultimate Fleet Overhaul (V0.6.1 Beta, 3rd February 2015)

The place to discuss scripting and game modifications for X Rebirth.

Moderators: Moderators for English X Forum, Scripting / Modding Moderators

Post Reply
Mad_Joker
Posts: 274
Joined: Sun, 14. May 06, 11:21
x3

[MOD] UFO - Ultimate Fleet Overhaul (V0.6.1 Beta, 3rd February 2015)

Post by Mad_Joker » Thu, 28. Nov 13, 17:22

Author: MadJoker
Version: V0.6.1 Beta
Date: 3rd February 2015

X:Rebirth Version: 3.20

=== About ===

Ever wondered why capital ships were just sitting idly while being bombarded by enemies? Ever were angry that your followers were being destroyed in distant sectors while you had long changed positions?

If you can answer these questions with 'yes', then this mod is for you.

This mod is a complete rewrite from scratch for the escort and capital ship combat scripts.

=== Details ===

This mod adds a fleet management UI to the game, accessible via the Sidebar (in the INFO section).

The most basic functionality of this mod is to just assign some ships to the 'Player Fleet' and they will follow you and engage enemies based on the selected stances (see below). The ships will then not be part of your squad in terms of that game mechanic, so you won't see "In my squad" on the property monitor. But it will still behave correctly.

UFO allows you to assign "stances" to your fleets, ships, and even single NPCs. Stances are seperated into "Aggression Level" and "Formation Mode".

The following is a list of all aggression Levels:
  • Passive: This mode forces the formation mode "Don't Break". In this mode captains and pilots will stay in formation with the fleet at all times, and defence officers will never fire at enemies.
  • Defensive: Captains and pilots will react to enemies based on their formation mode only if the fleet is attacked. Defence officers will fire upon enemies only if the fleet is attacked.
  • Offensive: Captains and pilots will react to enemies based on their formation mode as soon as enemies are detected. Defence officers will fire upon any enemy in range.
The following is a list of all formation modes (note that defence officers ignore formation modes):
  • Break: In this mode captains and pilots will break formation based on their aggression level.
  • Don't Break: In this mode, captains and pilots will always stay in formation and never fly towards the enemy, regardless of aggression level.
UFO also allows you to give some basic commands to your fleet. Below is a list of all commands currently supported:
  • Escort Ship: This orders the fleet to protect a chosen ship based on the stances of the fleet (e.g. if all ships are 'Passive' then this is just a follow command).
  • Move to Zone: This orders the fleet to move to a chosen zone. Enemies will be engaged based on the stances of the fleet (e.g. in 'Offensive' stance, this acts like an attack command).
Should any of your fleets engage some enemies, they will send you a real-time status report with details about your fleet, the enemy ships, and the zone where the enemy was detected.

This mod also features using crew skills. For example, highly skilled captains can make in-sector jumps with their capital ships, and ships in general react faster to changing circumstances based on their skills.

Please be aware that this is a beta release and as such might melt your PC, destroy the world, or who knows. So please use it with caution.

=== Download ===

Image

Image

=== Installation (Nexus) ===

Extract and copy the "UFO" folder to the "Steam\steamapps\common\X Rebirth\extensions" folder (create the extensions folder if you don't have it already).

If you are upgrading from a previous version, delete the old UFO folder first, and then extract the new one.

=== Installation (Workshop) ===

Simply subscribe to the mod.

=== Dependencies ===

You will need to download LibMJ to use UFO.

=== Compatibility ===

This mod is incompatible with any other mod that changes the pilot/captain/defence officer scripts. That being said, the UFO scripts only become active once a ship is assigned to a fleet. Therefore, as long as a ship is not in a fleet, all other mods should work correctly with that ship.

=== Uninstallation ===

UFO features a one-click uninstallation routine. To access it, click the 'Info' icon in the top left corner of the Fleet Management menu and then select the 'Uninstall' button and follow the on-screen instructions (also available in the logbook).

Note that this will cause all pilots/captains that were in a fleet when uninstalling, to not have any scripts running, and will start the stock capital defence script on all defence officers.

=== Known limitations/issues ===
  • The Fleet Management menu is only available while not being docked
  • Ships without captain/pilot or defence officer cannot be added to fleets
  • Before using their boost for far away targets, capital ships will rotate to align with the target; however, this rotation does not take obstacles into account. Capital ships will also sometimes get stuck in crowded areas. To resolve this issue simply leave the area, since movement that happens outside of the player's area is not impeded by obstacles.
  • Zones and ships as targets for fleet commands can not yet be selected via the map, but instead use a list menu
  • Fleets lead by fighters cannot escort other fighters; this is due to how formations work in the game
  • Launched drones might not always correctly return to their carrier
  • When a fleet commander is killed, the fleet will be dissolved and you will have to create a new fleet
  • UFO cannot cope with crew changes; should you change some crew on a fleet ship, please re-assign the ship
=== Technical Details ===

For texts I am using page 99998.

=== Release history ===

- [2013-11-28 - V0.1.1 Experimental]
Initial Release
- [2013-11-28 - V0.2.0 Experimental]
Fixed issue where defence officer scripts wouldn't properly start on load
Added "Broadcast Orders" menu that allows better fleet
- [2013-11-29 - V0.3.0 Experimental]
Changed wording from "Order" to "Stance"
Fixed bug that caused fleets to not engage some enemies
Added option to set stance for single ships
Fixed core game bug where defence officers could not be commed on capital ships through the property menu "CO" button
Added "Fleet Report" option that allows to get an overview of all active stances (note that you have to broadcast stances
at least once to all ships in order for this to work)
Made it impossible to add capital ships to a fleet that don't have a defence officer
Made stance broadcast affect selected ship as well in case it is not the fleet commander (i.e. has no commander itself)
Improved the way orders are acknowledged (by showing many NPCs at once)
- [2013-11-29 - V0.3.1 Experimental]
Fixes a bug that causes capital ships being unable to follow you into other sectors/clusters
Also disabled jump fuel requirements for now until I can come up with a more elegant way of handling jump fuel (like making
the needed amount base on navigation skill of captain and science skill of engineer)
- [2013-11-30 - V0.3.2 Experimental]
Workaround for core game bug causing capital ship radars to fail to detect any enemies
- [2013-12-01 - V0.4.0 Experimental]
Added possibility to choose engagement distances
Removed XS ship categories (didn't make sense really)
Reordered "Assign Commander" steps to make it more easy to assign multiple ships at once (thanks to ShadowWalker999 for the idea)
Added "Real-time Fleet Status Report" feature when engaging enemies
Captains prioritize enemy capital ships for movement during combat (and try to have their most DPS efficient side towards the enemy)
Fixed the turret light problem for good
Implemented first "Fleet Command" - "Attack Zone"
- [2013-12-03 - V0.4.1 Beta]
Fixed a bug that caused the stock "Take me to..." and MCE's "Move to zone" to not work
Added functions to activate UFO scripts on all defence officers not running a UFO script on game load, as well as when assigning them
to work on a ship (i.e. replacement for discontinued CSE mod)
Also added possibility to set stances on defence officers when their ship is not part of a fleet"
- [2013-12-15 - V0.4.2 Beta]
Fixed bug that caused capital ships to not fire their main weapons (e.g. Balor torpedos)
Reintroduced gravidar checks for enemies (also fixes bug of ships not attacking stations)
Added option "Remove from Commander"
Added uninstallation script
- [2014-03-20 - V0.4.3 Beta]
Compatibility update for game version 1.25
Moved fleet menu to MAINMENU/3/4
Disabled in-zone boosting since it caused issues for many player
- [2014-05-01 - V0.5.0 Beta]
Major rewrite of almost everything in the mod
Added Fleet Management UI
- [2015-01-17 - V0.6.0 Beta]
Compatibility with X:Rebirth 3.10
Made Fleet Management UI accessible via the sidebar
- [2015-02-03 - V0.6.1 Beta]
Compatibility with X:Rebirth 3.20

=== Future Plans ===

- none
Last edited by Mad_Joker on Tue, 3. Feb 15, 22:21, edited 28 times in total.


jeroll3d
Posts: 646
Joined: Thu, 26. Jun 08, 02:28
x3ap

Post by jeroll3d » Thu, 28. Nov 13, 17:38

Hi Mad

Thanks for this.

A question: i use Manual "ManualCommandExtension" and "Combat System Extension". Exist any problem or conflict with UFO?
Entusiasta da série X3! The best game.

Mad_Joker
Posts: 274
Joined: Sun, 14. May 06, 11:21
x3

Post by Mad_Joker » Thu, 28. Nov 13, 17:43

jeroll3d wrote:Hi Mad

Thanks for this.

A question: i use Manual "ManualCommandExtension" and "Combat System Extension". Exist any problem or conflict with UFO?
Well, CSE just fixes the capital ship combat script being wrong, when a defence officer is assigned to a ship.

UFO on the other hand contains a complete custom defence officer script, which will overwrite the CSE one once you assign a ship to a commander.

About MCE: Absolutely. This mod should work perfectly with MCE. However, remember that once you give any order with MCE to a pilot, you have to re-assign it to it's commander if you want my mod to work again.

jeroll3d
Posts: 646
Joined: Thu, 26. Jun 08, 02:28
x3ap

Post by jeroll3d » Thu, 28. Nov 13, 17:47

Ok, thanks and congratulations. :)
Entusiasta da série X3! The best game.

Kierk
Posts: 115
Joined: Wed, 30. Oct 13, 17:38

Post by Kierk » Thu, 28. Nov 13, 18:23

Just spent a while looking through the scripts you wrote and they're amazing!
It does much of the same behavior I've been trying to create but with a much cleaner implementation. I love the priority target stuff especially.

From what I've read it looks like when a capship w/captain and defence officer is assigned as a subordinate the captain begins the escort movement and the defence officer begins scanning for targets. The defence officer script uses a double do while true loop, breaking out of the innermost loop when no enemies are around and scanning for attackers on a skill based timer. Is this correct?

Again amazing work!

mikeck
Posts: 98
Joined: Sat, 22. May 10, 21:20

Post by mikeck » Thu, 28. Nov 13, 19:11

So this mod makes my capital ships shoot at bad guys right? Basically? (If I place them in the command structure)

Mad_Joker
Posts: 274
Joined: Sun, 14. May 06, 11:21
x3

Post by Mad_Joker » Thu, 28. Nov 13, 19:58

Kierk wrote:Just spent a while looking through the scripts you wrote and they're amazing!
It does much of the same behavior I've been trying to create but with a much cleaner implementation. I love the priority target stuff especially.

From what I've read it looks like when a capship w/captain and defence officer is assigned as a subordinate the captain begins the escort movement and the defence officer begins scanning for targets. The defence officer script uses a double do while true loop, breaking out of the innermost loop when no enemies are around and scanning for attackers on a skill based timer. Is this correct?

Again amazing work!
Yes, the captain is responsible for following, and for flying towards enemies, when in 'aggressive' mode (which is the only one I am exposing right now).

The defence officer only scans for targets, and attacks them on sight in 'aggressive' mode (which again, is the only exposed mode right now). The outer while loop is just the stay alive loop that does periodic enemy checking. The inner while loop is the loop used when actually engaging enemies.
mikeck wrote:So this mod makes my capital ships shoot at bad guys right? Basically? (If I place them in the command structure)
Yes. :twisted:

Joleoo
Posts: 16
Joined: Thu, 28. Nov 13, 22:42
x4

Post by Joleoo » Thu, 28. Nov 13, 22:45

Hey, I recently installed this mod and so far as I've tried, my ships still won't open fire on my enemies, even when fired upon. :c

I've added them to my fleet and they definitely follow me properly now, but still won't fire. They all have defence officers onboard.

Another strange thing that's happened is that Plutarch (-30 rep) guns are blue to me, and won't fire unless I attack first. This only happens since I installed the mod.

Have I done something wrong?

Kierk
Posts: 115
Joined: Wed, 30. Oct 13, 17:38

Post by Kierk » Thu, 28. Nov 13, 22:54

sounds like problem with faction relations, the UFO script checks faction relation status before adding as enemy, do you have any other mods running?

iforgotmysocks
Posts: 1242
Joined: Fri, 8. Nov 13, 23:35
x4

Post by iforgotmysocks » Thu, 28. Nov 13, 22:57

Just epic. :s
Going to test it soon!

Joleoo
Posts: 16
Joined: Thu, 28. Nov 13, 22:42
x4

Post by Joleoo » Thu, 28. Nov 13, 23:18

Kierk wrote:sounds like problem with faction relations, the UFO script checks faction relation status before adding as enemy, do you have any other mods running?
At the time I had "core shields mod" to add a basic shield to cap-ships, since then I've installed CSE and MCE to see how that effects it. Turns out that these two mods didn't help either.

Do you think core shields might have caused this? Well there's only one way to be sure...

Mad_Joker
Posts: 274
Joined: Sun, 14. May 06, 11:21
x3

Post by Mad_Joker » Thu, 28. Nov 13, 23:23

I have just discovered a bug that causes the defence officer script to not run properly when the game is loaded.

Until release of V0.2.0 (which I will hopefully release within the hour) please always re-assign your ships after every game load.

Mad_Joker
Posts: 274
Joined: Sun, 14. May 06, 11:21
x3

Post by Mad_Joker » Fri, 29. Nov 13, 00:18

Ladies and Gents,

I have just released UFO V0.2.0. It features the possibility to assign orders to your fleet, controlling how they will behave in case of enemy contact.

Hafe vun!

User avatar
darthmoll
Posts: 196
Joined: Fri, 11. Sep 09, 16:24
x4

Post by darthmoll » Fri, 29. Nov 13, 00:29

woowww.. really impressive what you guys can do. this is absolutely the srcipt i need. thx alot.

i do have a question tho.
when egosoft brings out a new patch. will this script and all other scripts still work?

Post Reply

Return to “X Rebirth - Scripts and Modding”