[MOD] Miscellaneous IZ Combat Tweaks

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

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

R-TEAM
Posts: 61
Joined: Sun, 25. Dec 11, 20:50
xr

Post by R-TEAM » Mon, 27. Jul 15, 09:19

Hi,

nice addition to the game and an "musst have" for playing Xr with Fun :)
but ... would it possible in the future to dock the units (drones/fighters) regular to keep in with Immersion ... ?
I know ATM the actual solution work and is more error proof than the regular behavor ... but it would be nice to have it "right" ...

Regards
R-TEAM

w.evans
Posts: 2962
Joined: Tue, 18. Nov 14, 17:23
x4

Post by w.evans » Mon, 27. Jul 15, 09:26

Hi R-TEAM,

I agree that the way drones dock at the moment isn't very immersive. However, without this, drones sometimes get stranded, and this is, so far, the most reliable and effective solution that I could find.

If you would like to try doing without, you could get the version of the mod from the Nexus (link in OP), and delete the following files from the mod folder:

\aiscripts\move.dockat.drone.xml - removes accelerated drone docking
\aiscripts\move.dockat.xml - removes accelerated fighter docking

If doing without those two files does not result in orphaned drones, I would love to hear it. Might then be a difference between the published version and my personal version of the mod.

R-TEAM
Posts: 61
Joined: Sun, 25. Dec 11, 20:50
xr

Post by R-TEAM » Tue, 28. Jul 15, 14:04

Hi,

mmhh ... i dont know a simple resulotion for this problem .. but one way is (only a thinking without knowing of possibility ..) for carriers who the docking bay are non in-line with flight path to enable newtonian flight for drones/fighters on docking - so, the carrier accelerate to max 2/3 the max speed of the docking vessels and the vessels coming close to the carrier and fly parallel to him over the docking bay, then accelerate to the docking bays, as in newtonian flight, the forward movement will be stay and he can, like hover over the target, fly in the docking bay.
For carriers with docking bays in flight path, it is more simple, the carrier, again, accelerate to max 2/3 of the speed of the vessels and the vessels accelerate in the docking bay ...
Maybe in special situations, the way that the carrier is standing still is faster then the other way (lengt of path from the vessels to carrier can be to long in time VS the time to wait ...) - this can be simulatet by the quality of the captain , if he know from his experience which way is the fastest way to dock the vessels ...

Again - this is only on thought experiment and i dont know is this possible ...
But it is anyway hard to calculate an docking point for an carrier that moves ... so i would like to say (for me) it is even better if the carrier going on halt and dock all vessels as the teleporting way - maybe with check ,if it do dangerous to stay longer, he flay away and sacrifices the vesels for the health of the carrier ...

Regards
R-TEAM

w.evans
Posts: 2962
Joined: Tue, 18. Nov 14, 17:23
x4

Post by w.evans » Tue, 28. Jul 15, 17:10

Hey R-TEAM,

Thanks for your suggestions.
R-TEAM wrote:... to enable newtonian flight for drones/fighters on docking ...
don't know how to switch assisted flight on things other than the Skunk yet. Don't even know if it's possible, but I'll look into it.
R-TEAM wrote:Maybe in special situations, the way that the carrier is standing still is faster then the other way
This is actually easiest, and is already how Marvin handled it. If you have Marvin Martian's carriers installed, and remove

\aiscripts\move.dockat.xml

then carriers will stop moving while waiting for fighters to dock.

With regard to drones, the same could be done, but it could cause them to stop a lot, sometimes even in the middle of combat. Decided that the slight reduction in immersion that will be observed only if you're looking right at the drones while they're docking is preferable to losing capital ships due to lost mobility because they have to stop to wait for drones to dock.

Still, I know that it's not the best solution. Still working on it, so a better solution might present itself one of these days.

That said, no one has made a report on orphaned drones in this thread, so it's also very possible that the problem lies in my particular mix of mods, or in something that I habitually do. Would advise, in that case, that you remove the two files I mentioned two posts above, and see if that works for you.

w.evans
Posts: 2962
Joined: Tue, 18. Nov 14, 17:23
x4

Post by w.evans » Wed, 29. Jul 15, 01:42

29.Jul.2015 - MICT_supp4 is up!

All stations now launch combat drones.

Number of drones launched depends on:
  • How many combat drones you have on a station,
  • the class of the target,
  • and the skill of the station's defence officer.
A less-experienced defence officer will tend to panic and launch all drones against a target, no matter what the target is. The reflexes of such an officer also won't be very good, and the defence officer can take a long time to acquire and engage targets.

An experienced defence officer will be able to engage multiple targets within the station's radar range, and will calibrate the number of drones sent depending on the severity of the threat, and drone availability in the station.

Only defence officers set to attack enemies will be authorized to launch drones.


TIP: I would strongly advise that you stock up on drones. At least 100 combat drones in a station are needed to present a credible deterrent.

note: tested in this supplement is new code that recovers all drones when you move OOZ. This is because the vanilla game does not use any combat drones OOZ, and using them OOZ would throw the balance off. Any reports on any station-based drones that are not recovered after you move OOZ, or any game slow downs aside from what ought to be caused by having possibly hundreds of drones flying at the same time would be greatly appreciated.

If this new code proves to be reliable and not too resource intensive, this will eventually replace the present solution that is accelerated drone docking.

w.evans
Posts: 2962
Joined: Tue, 18. Nov 14, 17:23
x4

Post by w.evans » Wed, 29. Jul 15, 13:26

A bit more information on MICT_supp4:

Station-based Defence Officers are authorized to launch drones when they are set to Attack Enemies.


number of drones:

Number of drones launched depends on:
  • How many combat drones you have on a station,
  • the class of the target,
  • and the skill of the station's defence officer.
If a defence officer is rated at 5 stars,
and there are 100 combat drones:

against an xl capital ship: 10-20 drones will be launched
l capital ship: 5-10 drones
fighter: 5 drones (per fighter, a wing of 4 fighters gets 20 drones)

These are calculated as percentages of total combat drones that a station has.

If a station is stocked with more drones, more drones will be launched per target;
if a station has less drones, less drones will be launched per target.

A station-based defence officer rated at 5 stars will be able to engage 5 xl capital ships, 10 l capital ships, or 20 fighters simultaneously.

A less experienced defence officer will tend to launch more drones per target, thus effectively being able to engage less targets.

A zero-star rated defence officer will tend to panic and launch all of a station's drones against the first thing he/she sees.


frequency:

Designating targets for drones, and deciding appropriate force strength, is a complex process.

As such, more experienced defence officers will be able to engage targets with the station's drones much faster, taking roughly ten seconds to assess the situation, designate a target, launch drones, and switch targets.

In comparison, a zero-star defence officer will take almost two minutes to go through the same process, and is likely to send all of the station's drones against the first thing he/she sees. In the time that such a defence officer takes to prep and launch drones, it is possible that the target it was engaging had already left or had already been destroyed.


code for the curious:

Code: Select all

<do_if value="@this.$config_attackenemies or (this.station.trueowner != faction.player)">
	<do_if value="$enemies.count gt 0 and this.station.availableunits.{unitcategory.defence}.count gt 0">
		<do_if value="player.age" min="@$MICT_lastdronelaunch + 60s">
			<do_all exact="$enemies.count" counter="$i">
				<wait min="(110 - this.combinedskill)s" sinceversion="4"/>
				<do_if value="@$enemies.{$i}.exists and @$enemies.{$i}.isoperational and this.station.distanceto.{$enemies.{$i}} le this.station.maxradarrange">
					<do_if value="$enemies.{$i}.isclass.ship_xl">
						<launch_drone name="$MICT_Drone" object="this.station" min="(this.station.units.{unitcategory.defence}.count)f * (1.1f - ((this.combinedskill)f / 100.0f))" max="(this.station.units.{unitcategory.defence}.count)f * (1.2f - ((this.combinedskill)f / 100.0f))" group="unitcategory.defence"/>
</do_if>
					<do_elseif value="$enemies.{$i}.isclass.ship_l">
						<launch_drone name="$MICT_Drone" object="this.station" min="(this.station.units.{unitcategory.defence}.count)f * (1.05f - ((this.combinedskill)f / 100.0f))" max="(this.station.units.{unitcategory.defence}.count)f * (1.1f - ((this.combinedskill)f / 100.0f))" group="unitcategory.defence"/>
</do_elseif>
					<do_elseif value="$enemies.{$i}.isclass.ship_s or $enemies.{$i}.isclass.ship_m">
						<launch_drone name="$MICT_Drone" object="this.station" exact="(this.station.units.{unitcategory.defence}.count)f * (1.05f - ((this.combinedskill)f / 100.0f))" group="unitcategory.defence"/>
					</do_elseif>

					<do_if value="@$MICT_Drone and @$enemies.{$i}.exists and @$enemies.{$i}.isoperational">
							<start_script object="$MICT_Drone.pilot" name="'fight.attack.object.drone.leader'">
								<param name="target" value="$enemies.{$i}" />
								<param name="additionaltargets" value="false" />
							</start_script>
							<remove_value name="$MICT_Drone"/>
					</do_if>
					<do_else>
							<start_script object="$MICT_Drone.pilot" name="'move.dockat.drone'">
								<param name="destination" value="this.station"/>
							</start_script>
							<remove_value name="$MICT_Drone"/>
					</do_else>
					<set_value name="$MICT_lastdronelaunch" exact="player.age"/>
				</do_if>
			</do_all>
		</do_if>
	</do_if>
</do_if>

Sparky Sparkycorp
Moderator (English)
Moderator (English)
Posts: 7873
Joined: Tue, 30. Mar 04, 12:28
x4

Post by Sparky Sparkycorp » Wed, 29. Jul 15, 14:15

More interesting stuff from Evans Works :)

After a designated target is destroyed, what happens if there are further targets in the local area? Would the drones switch to attack other things or redock? If the former, would they each pick close/random targets or whatever the DO is attacking with turrets?

Just wondering if a side effect of lower DO skills could be efficiency. E.g. slower to use drones but more likely to be an overwhelming usage, and then perhaps a slower rate of loss.

Sparky Sparkycorp
Moderator (English)
Moderator (English)
Posts: 7873
Joined: Tue, 30. Mar 04, 12:28
x4

Post by Sparky Sparkycorp » Wed, 29. Jul 15, 14:15

More interesting stuff from Evans Works :)

After a designated target is destroyed, what happens if there are further targets in the local area? Would the drones switch to attack other things or redock? If the former, would they each pick close/random targets or whatever the DO is attacking with turrets?

Just wondering if a side effect of lower DO skills could be efficiency. E.g. slower to use drones but more likely to be an overwhelming usage, and then perhaps a slower rate of loss.

w.evans
Posts: 2962
Joined: Tue, 18. Nov 14, 17:23
x4

Post by w.evans » Wed, 29. Jul 15, 14:45

Sparky Sparkycorp wrote:Would the drones switch to attack other things or redock?
At the moment, they'll redock. There's a actually a simple switch to allow drones to reacquire other targets, and this is on by default. However, I have been unable to ascertain how reliable it is, so I've deactivated it for station-based drones for now.
Sparky Sparkycorp wrote:Just wondering if a side effect of lower DO skills could be efficiency. E.g. slower to use drones but more likely to be an overwhelming usage, and then perhaps a slower rate of loss.
Yup, exactly. Less competent defence officers might actually be a better choice when just starting out building stations and the stations don't have many drones yet, though.

If a station only has something like 20 combat drones, a good defence officer will try to engage all hostiles within radar range, and will launch only around 4 drones against a Titurel, which is kinda like annoying an elephant with a couple of flies.

A bad defence officer will send all 20, which might make a dent on said Titurel. However, said officer will also send all 20 against a Domelch, and completely miss the Drostan that it's escorting! (The drone selection switch is on page 1143 of the station drone management manual, and a rookie officer simply hasn't read that far yet! Heh.)

Working on having the good officer always send a decent amount of drones against big targets. Not there yet.

Sparky Sparkycorp
Moderator (English)
Moderator (English)
Posts: 7873
Joined: Tue, 30. Mar 04, 12:28
x4

Post by Sparky Sparkycorp » Wed, 29. Jul 15, 14:51

Good stuff :)

IIRC correctly, drones focus on surface elements in the same way as fighters. COuld be funny seeing a Titurel finally arrive at at station around the time it runs out of weapons :)

w.evans
Posts: 2962
Joined: Tue, 18. Nov 14, 17:23
x4

Post by w.evans » Wed, 29. Jul 15, 15:01

Sparky Sparkycorp wrote:Good stuff :)

IIRC correctly, drones focus on surface elements in the same way as fighters. COuld be funny seeing a Titurel finally arrive at at station around the time it runs out of weapons :)
Yup. Could be used strategically too. For example, if you want to just capture Titurels for a while, you could plop a station in Cuspid Splint with just around 20 drones so they don't overwhelm your marks.

Sparky Sparkycorp
Moderator (English)
Moderator (English)
Posts: 7873
Joined: Tue, 30. Mar 04, 12:28
x4

Post by Sparky Sparkycorp » Wed, 29. Jul 15, 15:09

Oooh, nice idea. Combine that with the station being a Cell Recharge Fac and it's comedy capping gold.

w.evans
Posts: 2962
Joined: Tue, 18. Nov 14, 17:23
x4

Post by w.evans » Thu, 30. Jul 15, 12:38

30.Jul.2015 - MICT_supp4 updated to v0.03

- Launch interval tightened:
  • A station-based Defence Officer rated at 5 stars will take only 1 second to acquire a new target and launch drones.
  • An officer rated at 0 stars will take around 2 minutes to do the same.
- Station-based Defence Officers will try to launch at least:
  • 3 drones against fighters,
  • 7 drones against L-class capital ships,
  • 19 drones against XL-class capital ships
if their station has enough combat drones.

- Station-based Defence Officers will launch drones only if their stations are equipped with at least 5 combat drones.

- OOZ Drone recovery code slightly optimized.

- Added additional conditions when drones should break off attack and head home. Drones will head home if:
  • they do not have a target,
  • their target is destroyed,
  • their target is no longer in their superior's zone,
  • they are ship-based drones, and they are more than 10km from their superior,
  • they are station-based drones, and they are more than 50km away from their superior.
These precautions shouldn't be necessary, but best be sure.

w.evans
Posts: 2962
Joined: Tue, 18. Nov 14, 17:23
x4

Post by w.evans » Thu, 30. Jul 15, 13:16

30.Jul.2015 - MICT_supp2 updated to v0.20

MICT Squadrons should be more responsive when attack/patrol order is given to their squadron commander.
MICT Squadrons should recover all drones when they transit/are transited from IZ to OOZ.

w.evans
Posts: 2962
Joined: Tue, 18. Nov 14, 17:23
x4

Post by w.evans » Fri, 31. Jul 15, 09:54

31.Jul.2015 - MICT_supp4 updated to v0.04

Bugfix.*

* Found a cause of drones being orphaned: seems like some drones glitch out and aren't assigned a script. They're just launched, but no orders are given. Also seems to happen when drones are launched with conservative timings, such as in vanilla, but problem is more pronounced here since station-based drones are launched much more aggressively. Added a routine to check for those drones, and give them orders to dock.

Post Reply

Return to “X Rebirth - Scripts and Modding”