[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

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

Post by w.evans » Wed, 19. Aug 15, 20:41

19.August 2015 - Miscellaneous IZ Combat Tweaks updated to v0.31

UniBar was causing serious problems. Removed it for now. :(

BlackRain
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 6295
Joined: Mon, 15. Dec 03, 19:53
x4

Post by BlackRain » Thu, 20. Aug 15, 00:10

Hey w.evans, I have noticed the Succellus using it's IHC cannon with MOCT, but I have yet to see the Succellus Vanguard do so which leads me to believe it might not be working on that ship. Can you think of any reason why?

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

Post by w.evans » Thu, 20. Aug 15, 01:33

Could be that it's using the movement code for non-LR ships. Used to specify ships with range greater than 8000, but someone complained that the Xenon I was staying in stand-off range when it would be more effective at closer ranges, so narrowed it down to Sucellus and Balors. What's the macro? Also, if you have any other ships that you would like to use the LR movement code, you could give me their macro ids and I'll add them in.

That for the Sucellus is

macro.units_size_xl_red_destroyer_macro

BlackRain
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 6295
Joined: Mon, 15. Dec 03, 19:53
x4

Post by BlackRain » Thu, 20. Aug 15, 02:02

w.evans wrote:Could be that it's using the movement code for non-LR ships. Used to specify ships with range greater than 8000, but someone complained that the Xenon I was staying in stand-off range when it would be more effective at closer ranges, so narrowed it down to Sucellus and Balors. What's the macro? Also, if you have any other ships that you would like to use the LR movement code, you could give me their macro ids and I'll add them in.

That for the Sucellus is

macro.units_size_xl_red_destroyer_macro
Okay, some ships I would like to use the LR movement code

macro.units_size_xl_van_destroyer_macro

macro.units_size_l_player_harpy_macro

macro.units_size_l_missileb_01_macro

macro.units_size_l_dv_arb_new_defence_macro

macro.units_size_l_pir_besieger_frig_macro

First is the Succellus vanguard which definitely needs it.

The next three are all astrobee launcher based ships so I would think the LR code is better for that right?

The last uses HIVI turrets (like the xenon K). Probably should be LR too

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

Post by w.evans » Thu, 20. Aug 15, 02:09

Sorry, should have gone into a little more detail.

The main differences between the LR code and the normal code is that LR ships face their target (rather than pointing the side that has the most turrets), and they use the range of their long-ranged weapons (primary and secondary rather than turrets) to determine optimal ranges. Since Astrobee launchers and HIVI are both turrets, I don't think you'll want them on the LR code. Unless you've modified them to use integrated launchers and fire forward?

Will go ahead and add:

macro.units_size_xl_van_destroyer_macro

but will wait for your go-ahead to release, in case you want the others added after all.

BlackRain
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 6295
Joined: Mon, 15. Dec 03, 19:53
x4

Post by BlackRain » Thu, 20. Aug 15, 02:36

w.evans wrote:Sorry, should have gone into a little more detail.

The main differences between the LR code and the normal code is that LR ships face their target (rather than pointing the side that has the most turrets), and they use the range of their long-ranged weapons (primary and secondary rather than turrets) to determine optimal ranges. Since Astrobee launchers and HIVI are both turrets, I don't think you'll want them on the LR code. Unless you've modified them to use integrated launchers and fire forward?

Will go ahead and add:

macro.units_size_xl_van_destroyer_macro

but will wait for your go-ahead to release, in case you want the others added after all.
Ah ok, then no for the others! Hehe

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

Post by w.evans » Thu, 20. Aug 15, 03:27

20.August 2015 - Miscellaneous IZ Combat Tweaks updated to v0.32

Improved compatibility with IHC armed ships from other mods.

.......
@BlackRain, sorry took so long. Specifying the macro was causing it to spam the debuglog multiple times per second, so I had to get a little creative. Anything using a primary weapon with a range of 8000 meters or greater will use the LR movement code. The Balor is still specified by macro to avoid getting the Xenon I from using the LR code.

BlackRain
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 6295
Joined: Mon, 15. Dec 03, 19:53
x4

Post by BlackRain » Thu, 20. Aug 15, 03:52

Great news! Thanks

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

Post by w.evans » Thu, 20. Aug 15, 11:37

20.August 2015 - MICT_supp4 updated to v0.10

Bugfix

There was a variable inconsistency in the function that determines how many drones of a type to purchase. Should be more consistent now.

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

Post by w.evans » Thu, 20. Aug 15, 13:09

I'm curious. How do you organize your fleet(s)?

I tend to organize them by roles which kind of grew from just playing.

First off are the light interdiction squadrons:

1 Sucellus
2 Stromvoks

Have three of these squadrons. They do light patrols, the occasional escort duty, and gang up when facing larger groups. The Sucellus does the killing from range, and the Stromvoks mostly harass, draw fire, whittle down, and destroy fighters, keeping hostile ships from acquiring the Sucellus. Extremely mobile.

.......
Then there are the carrier wings:

1 Arawn
3 Drostans
4 Katanas

each Drostan leads a wing of 4-5 Talorcans, Hesus, or Vasio, although I'm now in the process of gradually replacing losses with Eterscels.

These provide area control. With a scanner range of 36,000 meters, the Arawn can detect hostile targets over a fairly large area, and the fighters are then slaved to the Arawn's fire control. So they go after ships when the Arawn does, but get there much faster to soften it up and for general harassment. Keep hostile fighters off of the Arawn's back pretty effectively too.

And carriers are cool.

.......
My pride-and-joy: the hunter-killer squadron

3 Sucellus
8 Balors

Their job is to destroy a large amount of hostile forces in nix time. I keep them on a tight leash, though, to minimize risk of friendly fire. Their job is to go berserk, demolish everything in sight, then leave. This squadron is not used for patrols. Pretty fire-and-forget, if you're absolutely sure that everything in a zone has to go.

.......
And last, my special task force:

4 Taranis
1 Light Sul

Attached to the Light Sul are:

1 Drostan
6 Katanas

The Drostan is escorted by every single pirate fighter I've managed to capture so far. Comes out pretty well-balanced since Maelchons appear to be quite effective IZ, while Cennelaths and Domelchs are actually more effective OOZ -- OOZ, damage is heavily skewed towards raw dps, and the Maelchon's armament is geared towards actually hitting what it shoots at, which only counts IZ. Takes a while to deploy and recover them, so I keep the fighters docked unless I actually want to use them. This task force seems to work well with hit and destroy missions where I can't or don't want to use my hunter-killer squadron. They quickly swoop in, destroy everything, then briefly hold a zone until reinforcements can arrive. Decidedly not fire-and-forget, though, since those Taranis have to get close to be effective, and the Sul is brittle. Requires preparation and some planning to use effectively.

When not on active assignment, they're usually patrolling somewhere close to where I expect danger, but not right where I expect danger. Most often used to reinforce the light interdiction squadrons when they bite off a bit more than they could chew.

And they make a pretty cool honor guard.

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

Post by Sparky Sparkycorp » Thu, 20. Aug 15, 13:33

Those ideas basically match mine, although I am further behind on the ship front as I've focused on the plot, supporting plot stations, and setting up few other player stations in DV. I basically have two 'fleets' :)

Fleet 1: Light Sul (care of PMC) with two Balor escorts, which look so cool together fly in tight formation. That basically get's left to patrol either Lava Flow for the jump beacon (early game) or Extinct Torch (after NPC shipyard construction), or I have called it to help with some Xenon Ks.

Fleet 2: A solo Taranis (plot 'prison ship' lol), which is normally left to patrol Heartache Mist (jump beacon) or is similarly called to support me on occasion.

Lastly, a 3rd Balor that is a general taxi/mission support ship (taking care, like with vanilla, to try to avoid collateral damage from blast areas or stray missiles).

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

Post by w.evans » Thu, 20. Aug 15, 13:57

20.August 2015 - MICT_supp2 updated to v0.28

MICT Fighters escorting capital ships now correctly use the capital ships' scanners to acquire targets.
MICT Fighters escorting Drostans now always scan for hostile targets, and attack them when found.
MICT Fighters escorting other fighters (m- or s- class) only engage at half their own scanner range to maintain unit cohesion until the very last moment.

.......
@Sparky, yeah, I remember how big a leap in firepower acquiring that plot Taranis was. Can't remember how I started out putting the fleet together, though; although I do remember that Taranis being it for a fairly long time, and spending lots of time capping Titurels.

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

Post by w.evans » Thu, 20. Aug 15, 15:23

A thing of beauty:

Code: Select all

<!-- MICT: launch drones from each drone bay in relay.
	Add a sorted list.  Drones should only engage targets within 100m of each other. -->
<do_if value="$dronetargets.count gt 0 and this.ship.availableunits.{unitcategory.defence}.count gt 0">
	<do_if value="player.age" min="$lastdronelaunch + 3s">
		<create_group groupname="$MICT_CapDroneTargets"/>
		<do_all exact="$dronetargets.count" counter="$i">
			<do_if value="$dronetargets.{$i}.isoperational">
				<do_if value="@$MICT_CapDronePrimTarget">
					<do_if value="this.ship.distanceto.{$dronetargets.{$i}} lt this.ship.distanceto.{$MICT_CapDronePrimTarget}">
						<set_value name="$MICT_CapDronePrimTarget" exact="$dronetargets.{$i}"/>
					</do_if>
				</do_if>
				<do_elseif value="this.ship.distanceto.{$dronetargets.{$i}} le 8km">
					<set_value name="$MICT_CapDronePrimTarget" exact="$dronetargets.{$i}"/>
				</do_elseif>
			</do_if>
		</do_all>
		<do_if value="@$MICT_CapDronePrimTarget and this.ship.availableunits.{unitcategory.defence}.count gt 0">
			<add_to_group groupname="$MICT_CapDroneTargets" object="$MICT_CapDronePrimTarget"/>
			<do_all exact="$dronetargets.count" counter="$i">
				<do_if value="$dronetargets.{$i} != $MICT_CapDronePrimTarget">
					<do_if value="$dronetargets.{$i}.isoperational">
						<do_if value="$MICT_CapDronePrimTarget.distanceto.{$dronetargets.{$i}} le 500m">
							<add_to_group groupname="$MICT_CapDroneTargets" object="$dronetargets.{$i}"/>
						</do_if>
					</do_if>
				</do_if>
			</do_all>
			<set_value name="$lastdronelaunch" exact="player.age"/>
			<find_object_component groupname="$MICT_CapDronePads" object="this.ship" class="class.dronelaunchpad" multiple="true" checkoperational="true"/>
			<set_value name="$MICT_CapMaxBays" exact="$MICT_CapDronePads.count"/>
			<set_value name="$MICT_CapUseBay" exact="0"/>
			<do_all exact="$MICT_CapDroneTargets.count" counter="$j">
				<do_if value="this.ship.availableunits.{unitcategory.defence}.count gt 0 and $MICT_CapDroneTargets.{$j}.exists and $MICT_CapDroneTargets.{$j}.isoperational">
					<do_if value="$MICT_CapMaxBays ge 1">
						<set_value name="$MICT_CapUseBay" operation="add"/>
					</do_if>
					<do_if value="$MICT_CapUseBay ge 1">
						<launch_drone name="$drone" object="$MICT_CapDronePads.{$MICT_CapUseBay}" exact="3" group="unitcategory.defence"/>
						<do_if value="$drone">
							<start_script object="$drone.pilot" name="'fight.attack.object.drone.leader'">
								<param name="target" value="$MICT_CapDroneTargets.{$j}"/>
								<param name="additionaltargets" value="$MICT_CapDroneTargets"/>
								<param name="checkrelation" value="$checkrelation"/>
							</start_script>
						</do_if>
						<show_notification caption="'=== MICT Targeting ==='" details="'%1 \n\n Launching drones. \n Primary Target: %3 \n Drone target count: %2 \n\n NODE 4'.[this.ship.knownname, 1 + $MICT_CapDroneTargets.count, $MICT_CapDroneTargets.{$j}.knownname]" queued="false" priority="9"/>
						<write_to_logbook category="general" text="'%1 \n\n Launching drones. \n Primary Target: %3 \n Drone target count: %2 \n\n NODE 4'.[this.ship.knownname, 1 + $MICT_CapDroneTargets.count, $MICT_CapDroneTargets.{$j}.knownname]"/>
					</do_if>
					<do_else>
						<continue/>
					</do_else>
					<do_if value="$MICT_CapUseBay" exact="$MICT_CapMaxBays">
						<wait min="157ms" sinceversion="3"/>
						<set_value name="$MICT_CapUseBay" exact="0"/>
					</do_if>
				</do_if>
			</do_all>
			<remove_value name="$MICT_CapUseBay"/>
			<remove_value name="$MICT_CapMaxBays"/>
			<remove_value name="$MICT_CapDronePads"/>
			<remove_value name="$MICT_CapDroneTargets"/>
			<remove_value name="$MICT_CapDronePrimTarget"/>
		</do_if>
	</do_if>
</do_if>
Been killing time this morning playing with capship drone launching. The initial release of MICT capship drone launching was, how shall we say, underwhelming. So spruced it up a bit.

- Capship DO looks for priority surface elements or fighters within 8km.
- If any are found, it looks for priority surface elements that are closer, and designates the closest one as ground zero.
- It then searches for any priority targets within 500 meters of ground zero.
- Priority targets acquired, it fires multiple groups of combat drones, each group consisting of three drones.
- If the capship has multiple drone bays (Marvin mentioned a mod that has a capship with 24!), it launches drones in relays from each drone bay, each group targeting a priority target within 500 meters of ground zero.

Thanks again to Marvin Martian for lending me his relay drone launch code.

Looks good so far, but I have to leave for an appointment in a bit, so further testing and release will have to wait.

BlackRain
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 6295
Joined: Mon, 15. Dec 03, 19:53
x4

Post by BlackRain » Thu, 20. Aug 15, 17:11

Is all of this intended?

Code: Select all

[General] *** aicontext<fight.attack.object.drone.leader,0x5a890>: 16824.873Overrun URV Mk1 droneleaderscript. No targets on DO blackboard?, going home
[General] *** aicontext<fight.attack.object.drone.leader,0x5b80e>: 16834.43Interceptor URV Mk1 droneleaderscript. No targets left, checking DO blackboard for a new one, entry: null, isoperational?: null
[General] *** aicontext<fight.attack.object.drone.leader,0x5b80e>: 16834.43Interceptor URV Mk1 droneleaderscript. No targets on DO blackboard?, going home
[General] *** aicontext<fight.attack.object.drone.leader,0x5b827>: 16834.58Interceptor URV Mk1 droneleaderscript. No targets left, checking DO blackboard for a new one, entry: null, isoperational?: null
[General] *** aicontext<fight.attack.object.drone.leader,0x5b827>: 16834.58Interceptor URV Mk1 droneleaderscript. No targets on DO blackboard?, going home
[General] *** aicontext<fight.attack.object.drone.leader,0x5cd5b>: 16858.67Interceptor URV Mk1 droneleaderscript. No targets left, checking DO blackboard for a new one, entry: null, isoperational?: null
[General] *** aicontext<fight.attack.object.drone.leader,0x5cd5b>: 16858.67Interceptor URV Mk1 droneleaderscript. No targets on DO blackboard?, going home
[General] *** aicontext<fight.attack.object.drone.leader,0x5cd42>: 16862.499Overrun URV Mk1 droneleaderscript. No targets left, checking DO blackboard for a new one, entry: null, isoperational?: null
[General] *** aicontext<fight.attack.object.drone.leader,0x5cd42>: 16862.499Overrun URV Mk1 droneleaderscript. No targets on DO blackboard?, going home
[General] ======================================
[=ERROR=] Invalid parameter index found in format string: '%2 \n In %3 \n Taking fire from %1 \n\n Threat Level: %6 \n\n Shields: %4% Hull: %5%'.['REI Sennin Frigate Raider','Arawn','Heartache Mist',91.4351f,100f,1]
[General] ======================================
[General] ======================================
[=ERROR=] Character '%' found at the end of the string: '%2 \n In %3 \n Taking fire from %1 \n\n Threat Level: %6 \n\n Shields: %4% Hull: %5%'.['REI Sennin Frigate Raider','Arawn','Heartache Mist',91.4351f,100f,1]
[General] ======================================
[General] ======================================
[=ERROR=] Invalid parameter index found in format string: '%2 \n In %3 \n Taking fire from %1 \n\n Threat Level: %6 \n\n Shields: %4% Hull: %5%'.['REI Sennin Frigate Raider','Arawn','Heartache Mist',91.4351f,100f,1]
[General] ======================================
[General] ======================================
[=ERROR=] Character '%' found at the end of the string: '%2 \n In %3 \n Taking fire from %1 \n\n Threat Level: %6 \n\n Shields: %4% Hull: %5%'.['REI Sennin Frigate Raider','Arawn','Heartache Mist',91.4351f,100f,1]
[General] ======================================
[General] ======================================
[=ERROR=] Error in AI script fight.attack.object.capital on entity 0x683a: Property lookup failed: '%2 \n In %3 \n Taking fire from %1 \n\n Threat Level: %6 \n\n Shields: %4% Hull: %5%'.['REI Sennin Frigate Raider','Arawn','Heartache Mist',91.4351f,100f,1]
* Expression: '%2 \n In %3 \n Taking fire from %1 \n\n Threat Level: %6 \n\n Shields: %4% Hull: %5%'.[this.ship.knownname, $target.knownname, this.zone.knownname, $target.shieldpercentage, $target.hullpercentage, $MOCT_ThreatReport]
[General] ======================================

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

Post by w.evans » Thu, 20. Aug 15, 17:15

BlackRain wrote:Is all of this intended?
Sorta. It's mostly this:

Code: Select all

[=ERROR=] Invalid parameter index found in format string: '%2 \n In %3 \n Taking fire from %1 \n\n Threat Level: %6 \n\n Shields: %4% Hull: %5%'.['REI Sennin Frigate Raider','Arawn','Heartache Mist',91.4351f,100f,1]
[General] ======================================
[General] ======================================
[=ERROR=] Character '%' found at the end of the string: '%2 \n In %3 \n Taking fire from %1 \n\n Threat Level: %6 \n\n Shields: %4% Hull: %5%'.['REI Sennin Frigate Raider','Arawn','Heartache Mist',91.4351f,100f,1]
[General] ======================================
which is caused by "%4%" which are so that it'll display, for example, "91.4351%" rather than just "91.4351" (because this last doesn't make any sense)

Necessary evil right now. Should go away once everything's moved to t-files.

EDIT: If you want to get rid of the error messages while you're troubleshooting CWIR, just change

%4% and %5% to

%4 and %5

in the MOCT fight scripts.

.......
I haven't seen these before:

Code: Select all

[General] *** aicontext<fight.attack.object.drone.leader,0x5b80e>: 16834.43Interceptor URV Mk1 droneleaderscript. No targets left, checking DO blackboard for a new one, entry: null, isoperational?: null 
Might be the BT code. I seem to remember it having a fight.attack.object.drone.leader. More likely caused by whatever has been causing things in general to lose targets in CWIR, though. You've posted error reports showing missing targets from capship DOs, station DOs, and now drones which are all error messages thrown due to lost targets, targets not existing, or just generally target == null.
Last edited by w.evans on Thu, 20. Aug 15, 17:21, edited 1 time in total.

Post Reply

Return to “X Rebirth - Scripts and Modding”